!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r={log:function(){if(window.authentication_config&&window.authentication_config.debug){for(var e,t=arguments.length,n=new Array(t),r=0;r>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return c};function a(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(i(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return i(t)}}function c(e){this.message=e}c.prototype=new Error,c.prototype.name="InvalidTokenError";var s=function(e,t){if("string"!=typeof e)throw new c("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(a(e.split(".")[n]))}catch(e){throw new c("Invalid token specified: "+e.message)}};function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new M(r||[]);return o(a,"_invoke",{value:C(e,n,c)}),a}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var w="suspendedStart",f="suspendedYield",y="executing",m="completed",p={};function v(){}function b(){}function L(){}var S={};u(S,a,function(){return this});var A=Object.getPrototypeOf,I=A&&A(A(P([])));I&&I!==n&&r.call(I,a)&&(S=I);var _=L.prototype=v.prototype=Object.create(S);function x(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function k(e,t){function n(o,i,a,c){var s=g(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==h(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,c)},function(e){n("throw",e,a,c)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,c)})}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=w;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=E(c,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===w)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var l=g(t,n,r);if("normal"===l.type){if(o=r.done?m:f,l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=g(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0)for(var o=0;o0&&void 0!==arguments[0]&&arguments[0],t=c().hostname;e&&"string"==typeof e&&(t=e);var n=t.split(".");return"".concat(n[n.length-2],".").concat(n[n.length-1])};function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90;if("undefined"==typeof dataLayer)return r.log("false: no data layer"),!1;var t=window.dataLayer.find(function(e){return"free"===e.Paywall_Level||"premium"===e.Paywall_Level||"article"!==e["Page Type"]&&"UA-61435456-39"===e.ga_ua});if(t)return r.log("archive check: stop checking because of: ",t),!1;r.log("archive check: business check good, now check date");var n=i.href.split("/"),o="".concat(n[4],"/").concat(n[5],"/").concat(n[3]);r.log(o);var a=new Date,c=new Date(o),s=new Date(c.setDate(c.getDate()+e));return r.log(s),r.log(a),a>s?(r.log("archive check: within the ".concat(e," days")),!0):(r.log("archive check: has not been 90 days yet"),!1)}function f(e){var t=document.querySelector("article")?document.querySelector("article").classList:null;if(null==t)return!1;var n,r=[],o=p((e=e.split(",")).entries());try{for(o.s();!(n=o.n()).done;){var i=m(n.value,2),a=(i[0],i[1]);a=(a=(a=(a="tag-"+a).toLowerCase()).replaceAll(" ","-")).replaceAll("--","-"),r.push(a)}}catch(e){o.e(e)}finally{o.f()}var c,s=p(r.entries());try{for(s.s();!(c=s.n()).done;){var l=m(c.value,2),u=l[0],d=l[1];if(d+="",t.contains(d))return!0;if(u===r.length-1)return!1}}catch(e){s.e(e)}finally{s.f()}}function v(e){var t=window.location.hostname;return t=t.replace("www.","").replace("preprod.","").replace("develop.",""),!(-1===e.indexOf(t))}window.engageLibrary.userIsAuthenticated=function(){if(void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady)return r.log("engageLibrary.js | Authentication already ready: ",window.MNGAuthentication.authenticationReady),window.MNGAuthentication.authenticationReady.isAuthenticated;var e=JSON.parse(window.localStorage.getItem("__MNG_Session"));return!!e&&!!e.idToken},window.engageLibrary.tagsExist=function(e){if(Array.isArray(e)){for(var t=0;t7&&void 0!==arguments[7]?arguments[7]:500;e.preventDefault();var l=function(e){var t=new RegExp(/^(([^<>()\[\]\\.,;:\s@']+(\.[^<>()\[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i);return e?t.test(e)?(jQuery("#registration__form .submit").text("submitting..."),{valid:!0,message:""}):{valid:!1,message:"Please, enter a valid email."}:{valid:!1,message:"Please, enter an email."}}(t.val());if(A(l,n,t),l.valid&&o.length>0){var u,d=decodeURIComponent(o);try{u=JSON.parse(d)}catch(e){u=d}Array.isArray(u)&&(u=prefIds[0].id.split(",")),CnnXt.API.NewsletterSubscribe({email:t.val(),id:u,onSuccess:function(){i.hide(),c&&a.html(c),a.show(),function(e){window.engageLibrary.allowedSophiPrefIds.includes(e)&&((window._matherq=window._matherq||[]).push(["paywallEvent",{category:"registration_lite",action:"created"}]),window.localStorage.setItem("sophiRegiliteUser","yes"),r.log("Dispatched registration_lite event to mather."))}(u),A({valid:!0},n,t),t.val(""),localStorage.setItem("regwallSuccess","yes"),setTimeout(function(){Connext.Run()},s)},onError:function(e){g(e||(e={Message:"Error! Empty result or no connection"}))}})}else 0===o.length&&S("Newsletter field is empty",n,!0);function g(e){A({valid:!1,message:e.ErrorMessage||e.Message},n,t)}}function S(e,t,n){n?(t.html(e),t.show()):(t.text(""),t.hide())}function A(e,t,n){e.valid?(S("",t,!1),n.removeClass("connext-validation-error")):(S(e.message,t,!0),n.addClass("connext-validation-error"))}function I(e){var t;switch(e){case 1:t="A";break;case 2:t="B";break;case 3:t="C";break;case 4:t="D";break;case 5:t="E";break;default:t="empty"}return t}function _(){var e={},t=E(),n=t?t.Name:null;if(window.sophiWallConfig&&!window.sophiWallConfig.error&&(e=window.sophiWallConfig),!window.engageLibrary.sophiResponseCheckedAlready){var r={event:"sophi_decision",sophi_type:"getSophiDataDenver",sophi_variant:JSON.stringify(b()),sophi_response:JSON.stringify(e)};n&&(r.sophi_conv=n),window.dataLayer.push(r)}return window.engageLibrary.sophiResponseCheckedAlready=!0,e}function x(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]?arguments[0]:[];if(Array.isArray(e)&&Connext){var t,n=null===(t=Connext.Storage.GetUserData().DigitalAccess.Subscription)||void 0===t?void 0:t.HouseholdSubscriptionLevel;return!!e.find(function(e){return e===n})}return!1},window.engageLibrary.getDataLayerEntry=function(e){if(void 0!==window.dataLayer&&e&&e.length>0){var t=window.dataLayer.find(function(t){return t[e]});return!!t&&t[e]}return!1},window.engageLibrary.getPageType=function(){if(void 0!==window.dataLayer){var e=window.dataLayer.find(function(e){return e["Page Type"]});return!!e&&e["Page Type"]}return!1},window.engageLibrary.getSection=function(){if("undefined"!=typeof dataLayer){var e=window.dataLayer.find(function(e){return e.Section});return!!e&&e.Section}return!1},window.engageLibrary.getPaywallLevel=function(){if("undefined"!=typeof dataLayer){var e=window.dataLayer.find(function(e){return e.Paywall_Level});return!!e&&e.Paywall_Level}return!1},window.engageLibrary.testingLocalStorage=function(){var e,t=localStorage.getItem("abLocal");t?window.dataLayer.push({event:"abLocal_event",abLocal:t}):(e=I(Math.floor(Math.random()*Math.floor(2))+1),localStorage.setItem("abLocal",e),window.dataLayer.push({event:"abLocal_event",abLocal:e}));var n=localStorage.getItem("abcLocal");n?window.dataLayer.push({event:"abcLocal_event",abcLocal:n}):(e=I(Math.floor(Math.random()*Math.floor(3))+1),localStorage.setItem("abcLocal",e),window.dataLayer.push({event:"abcLocal_event",abcLocal:e})),localStorage.getItem("abcdLocal")||(e=I(Math.floor(Math.random()*Math.floor(4))+1),localStorage.setItem("abcdLocal",e)),localStorage.getItem("abcdeLocal")||(e=I(Math.floor(Math.random()*Math.floor(5))+1),localStorage.setItem("abcdeLocal",e));var r="Nothing set since cookies already existed.";return e&&(r="Group set to ".concat(e)),"This function only sets cookies, does not return a value. ".concat(r)},window.engageLibrary.testingSessionStorage=function(){var e;window.sessionStorage.getItem("abSession")||(e=I(Math.floor(Math.random()*Math.floor(2))+1),window.sessionStorage.setItem("abSession",e)),window.sessionStorage.getItem("abcSession")||(e=I(Math.floor(Math.random()*Math.floor(3))+1),window.sessionStorage.setItem("abcSession",e)),window.sessionStorage.getItem("abcdSession")||(e=I(Math.floor(Math.random()*Math.floor(4))+1),window.sessionStorage.setItem("abcdSession",e)),window.sessionStorage.getItem("abcdeSession")||(e=I(Math.floor(Math.random()*Math.floor(5))+1),window.sessionStorage.setItem("abcdeSession",e));var t="Nothing set since cookies already existed.";return e&&(t="Group set to ".concat(e)),"This function only sets cookies, does not return a value. ".concat(t)},window.engageLibrary.premiumFeatureExclusiveDP=function(){return window.location.hostname.includes("denverpost")&&document.getElementById("main").querySelector("article").className.includes("feature-exclusive")},window.engageLibrary.bcLowaCheck=function(){var e=i.hostname;e=e.replace("www.","").replace("preprod.","").replace("develop.","");var t=["dailycamera.com","denverpost.com","timescall.com","reporterherald.com","greeleytribune.com","eptrail.com","canoncitydailyrecord.com","journal-advocate.com","fortmorgantimes.com"],n=["mercurynews.com","eastbaytimes.com","marinij.com","santacruzsentinel.com"],r=["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pasadenastarnews.com","pe.com","pressenterprise.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],o=["morningjournal.com","news-herald.com"],c=["thereporteronline.com","delcotimes.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","readingeagle.com"],s=["dailyfreeman.com","oneidadispatch.com","saratogian.com","troyrecord.com"],l=["bostonherald.com","lowellsun.com","sentinelandenterprise.com"],u=["montereyherald.com","chicoer.com","orovillemr.com","redbluffdailynews.com","paradisepost.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","record-bee.com","ukiahdailyjournal.com","times-standard.com"];return-1!==["dailytribune.com","macombdaily.com","morningjournal.com","pressandguide.com","thenewsherald.com","themorningsun.com","theoaklandpress.com"].indexOf(e)?a("MICH LOWA"):-1!==o.indexOf(e)?a("OHIO LOWA"):-1!==c.indexOf(e)?a("PENN LOWA"):-1!==s.indexOf(e)?a("NY LOWA"):-1!==l.indexOf(e)?a("BOSTON LOWA"):-1!==u.indexOf(e)?a("NORCAL LOWA"):"twincities.com"===e?a("TWIN CITIES LOWA"):-1!==t.indexOf(e)?a("DENV/PMP LOWA"):-1!==r.indexOf(e)?a("SCNG LOWA"):-1!==n.indexOf(e)?a("BANG LOWA"):e.includes("mcall.com")?a("AMC LOWA"):e.includes("courant.com")?a("HC LOWA"):e.includes("growthspotter.com")?a("GS LOWA"):e.includes("orlandosentinel.com")?a("ORL LOWA"):e.includes("sun-sentinel.com")?a("SS LOWA"):e.includes("dailypress.com")?a("NNDP LOWA"):e.includes("pilotonline.com")?a("VP LOWA"):e.includes("nydailynews.com")?a("NYDN LOWA"):e.includes("baltimoresun.com")?a("BAL LOWA"):e.includes("capitalgazette.com")?a("CG LOWA"):e.includes("chicagotribune.com")?a("CHI LOWA"):-1!==["citizensvoice.com","republicanherald.com","standardspeaker.com","thetimes-tribune.com","wcexaminer.com"].indexOf(e)&&a("NEPA LOWA")},window.engageLibrary.mercurynewsIsMeteredArchive=function(){return-1===i.host.search("mercurynews")?(r.log("archive check: not on mercurynews"),!1):g()},window.engageLibrary.ocregisterIsMeteredArchive=function(){return-1===i.host.search("ocregister")?(r.log("archive check: not on ocregister"),!1):g()},window.engageLibrary.pressenterpriseIsMeteredArchive=function(){return-1===i.host.search("pressenterprise")?(r.log("archive check: not on pressenterprise"),!1):g()},window.engageLibrary.eastbayIsMeteredArchive=function(){return-1===i.host.search("eastbaytimes")?(r.log("archive check: not on eastbaytimes"),!1):g()},window.engageLibrary.marinijIsMeteredArchive=function(){return-1===i.host.search("marinij")?(r.log("archive check: not on marinij"),!1):g()},window.engageLibrary.bostonheraldIsMeteredArchive=function(){return-1===i.host.search("bostonherald")?(r.log("archive check: not on bostonherald"),!1):g()},window.engageLibrary.lowellsunIsMeteredArchive=function(){return-1===i.host.search("lowellsun")?(r.log("archive check: not on lowellsun"),!1):g()},window.engageLibrary.sentinelIsMeteredArchive=function(){return-1===i.host.search("sentinelandenterprise")?(r.log("archive check: not on sentinelandenterprise"),!1):g()},window.engageLibrary.dailyfreemanIsMeteredArchive=function(){return-1===i.host.search("dailyfreeman")?(r.log("archive check: not on dailyfreeman"),!1):g()},window.engageLibrary.dailycameraIsMeteredArchive=function(){return-1===i.host.search("dailycamera")?(r.log("archive check: not on dailycamera"),!1):g()},window.engageLibrary.greeleytribuneIsMeteredArchive=function(){return-1===i.host.search("greeleytribune")?(r.log("archive check: not on greeleytribune"),!1):g()},window.engageLibrary.reporterheraldIsMeteredArchive=function(){return-1===i.host.search("reporterherald")?(r.log("archive check: not on reporterherald"),!1):g()},window.engageLibrary.timescallIsMeteredArchive=function(){return-1===i.host.search("timescall")?(r.log("archive check: not on timescall"),!1):g()},window.engageLibrary.santacruzsentinelIsMeteredArchive=function(){return-1===i.host.search("santacruzsentinel")?(r.log("archive check: not on santacruzsentinel"),!1):g()},window.engageLibrary.montereyheraldIsMeteredArchive=function(){return-1===i.host.search("montereyherald")?(r.log("archive check: not on montereyherald"),!1):g()},window.engageLibrary.chicoerIsMeteredArchive=function(){return-1===i.host.search("chicoer")?(r.log("archive check: not on chicoer"),!1):g()},window.engageLibrary.courantIsMeteredArchive=function(){return-1===i.host.search("courant")?(r.log("archive check: not on courant"),!1):g(30)},window.engageLibrary.mcallIsMeteredArchive=function(){return-1===i.host.search("mcall")?(r.log("archive check: not on mcall"),!1):g(30)},window.engageLibrary.orlandosentinelIsMeteredArchive=function(){return-1===i.host.search("orlandosentinel")?(r.log("archive check: not on orlandosentinel"),!1):g(30)},window.engageLibrary.sunsentinelIsMeteredArchive=function(){return-1===i.host.search("sun-sentinel")?(r.log("archive check: not on sun-sentinel"),!1):g(30)},window.engageLibrary.pilotonlineIsMeteredArchive=function(){return-1===i.host.search("pilotonline")?(r.log("archive check: not on pilotonline"),!1):g(30)},window.engageLibrary.dailypressIsMeteredArchive=function(){return-1===i.host.search("dailypress")?(r.log("archive check: not on dailypress"),!1):g(30)},window.engageLibrary.nydailynewsIsMeteredArchive=function(){return-1===i.host.search("nydailynews")?(r.log("archive check: not on nydailynews"),!1):g(30)},window.engageLibrary.baltimoresunIsMeteredArchive=function(){return-1===i.host.search("baltimoresun")?(r.log("archive check: not on baltimoresun"),!1):g(30)},window.engageLibrary.capitalgazetteIsMeteredArchive=function(){return-1===i.host.search("capitalgazette")?(r.log("archive check: not on capitalgazette"),!1):g(30)},window.engageLibrary.SDUTIsMeteredArchive=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return-1===i.host.search("sandiegouniontribune")?(r.log("archive check: not on sandiegouniontribune"),!1):g(e)},window.engageLibrary.NEPAIsMeteredArchive=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90;return-1===i.host.search("republicanherald|standardspeaker|citizensvoice|thetimes-tribune|wcexaminer")?(r.log("archive check: not on republicanherald, standardspeaker, citizensvoice, thetimes-tribune, or wcexaminer"),!1):g(e)},window.engageLibrary.articleSharingExpire=function(){var e,t,n,r;return void 0!==(null===(e=window.MNGAuthentication)||void 0===e?void 0:e.articleShare)&&"null"!==(null===(t=window.MNGAuthentication)||void 0===t?void 0:t.articleShare)&&!1!==(null===(n=window.MNGAuthentication)||void 0===n?void 0:n.articleShare)&&""!==(null===(r=window.MNGAuthentication)||void 0===r?void 0:r.articleShare)},window.engageLibrary.getRegwallSuccess=function(){return!!localStorage.getItem("regwallSuccess")&&"yes"},window.engageLibrary.getRegwallKnown=function(){return!!localStorage.getItem("regwallKnown")&&"yes"};var k=function(e,t,n){var o="".concat(e,"=").concat(t,";");void 0!==n?(r.log("Setting cookie with options: ",n),Object.entries(n).forEach(function(e){var t=m(e,2),n=t[0],r=t[1];if("expires"===n){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),o+="expires=".concat(i.toUTCString(),";")}else o+="".concat(n,"=").concat(r,";")})):o+="path=/;",document.cookie=o},C=function(){var e=u();return".".concat(e)};function E(){try{var e,t,n;return null!==(e=null===(t=window.Connext)||void 0===t?void 0:null===(n=t.Storage)||void 0===n?void 0:n.GetCurrentConversation())&&void 0!==e?e:null}catch(e){return r.log("MNG getConnextConversation:",e),null}}window.engageLibrary.checkBCForNonSub=function(){var e=decodeURIComponent(document.cookie).split(";"),t=window.location.hostname;t=t.replace("www.","").replace("preprod.","").replace("develop.","");var n=0;for(n=0;n0&&document.querySelector("main article").hasClass("tag-all-readers")},window.engageLibrary.isOpinionPiece=function(){return f("Opinion")},window.engageLibrary.isEspanolContent=function(){return f("espanol")||"Espanol"===window.engageLibrary.getSection()},window.engageLibrary.isPhotosAndVideos=function(){return f("photos and videos")},window.engageLibrary.isAthleteOfWeek=function(){return f("athlete of the week")},window.engageLibrary.isContests=function(){return f("contests")},window.engageLibrary.getTaxonomy1=function(){if("undefined"!=typeof dataLayer){var e=window.dataLayer.find(function(e){return e.Taxonomy1});return!!e&&e.Taxonomy1}return!1},window.engageLibrary.profileDropDownExists=function(){return!!document.getElementById("profileDropDown")},window.engageLibrary.twinCitiesKnownEmail=function(){return a("Twincities - known email")},window.engageLibrary.twinCitiesUrlCheck=function(){return v(["twincities.com"])},window.engageLibrary.pmpUrlCheck=function(){return v(["greeleytribune.com","dailycamera.com","timescall.com","reporterherald.com"])},window.engageLibrary.paywallTimer=function(){var e=Date.now(),t=0;"undefined"!=typeof MNG_SSO_TOOLS_GLOBAL_START_TIME&&(t=e-MNG_SSO_TOOLS_GLOBAL_START_TIME),window.dataLayer.push({"Timer.PaywallShown":t}),performance.mark("connext_onPaywallShown")},window.engageLibrary.inlineNewsletter=function(){r.log("inlineNewsletter start");var e=jQuery(".Mg2-newsletter-inline_notif_mng .connext-email-input"),t=jQuery(".Mg2-newsletter-inline_notif_mng .connext-error-message"),n=jQuery(".Mg2-newsletter-inline_notif_mng .hide-on-success"),o=jQuery(".Mg2-newsletter-inline_notif_mng .show-on-success"),i=jQuery(".Mg2-newsletter-inline_notif_mng span[data-tmpl-action-name='Newsletter']").text(),a=jQuery(".Mg2-newsletter-inline_notif_mng div[data-tmpl-action-name='Success message']").html()||jQuery(".Mg2-newsletter-inline_notif_mng div[data-tmpl-action-name='Success message']").data("tmpl-action-value");jQuery(".Mg2-newsletter-inline_notif_mng span[data-tmpl-action-name='Error message']").html(),jQuery(document.body).on("click",".Mg2-newsletter-inline_notif_mng .submit",function(r){L(r,e,t,i,n,o,a)}),jQuery(document.body).on("input",".Mg2-newsletter-inline_notif_mng .connext-email-input",function(e){A({valid:!0})}),r.log("inlineNewsletter end")},window.engageLibrary.inlineRegwall1=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;window.engageLibrary.paywallTimer();var t=jQuery("#registration__form .connext-email-input"),n=jQuery("#registration__form .connext-error-message"),r=jQuery("#registrationWall1 .hide-on-success"),o=jQuery("#registrationWall1 .show-on-success"),i=jQuery("#registrationWall1 .registrationWallID").text(),a=jQuery("#registration__form div[data-tmpl-action-name='Success message']").html()||jQuery("#registration__form div[data-tmpl-action-name='Success message']").data("tmpl-action-value");jQuery("#registration__form span[data-tmpl-action-name='Error message']").html(),jQuery(document.body).on("click","#registration__form .submit",function(c){L(c,t,n,i,r,o,a,e)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(e){A({valid:!0},n,t)})},window.engageLibrary.inlineRegwall=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;window.engageLibrary.paywallTimer();var t=jQuery("#registration__form .connext-email-input"),n=jQuery("#registration__form .connext-error-message"),r=jQuery("#registrationWall .hide-on-success"),o=jQuery("#registrationWall .show-on-success"),i=jQuery("#registrationWall .registrationWallID").text(),a=jQuery("#registration__form div[data-tmpl-action-name='Success message']").html()||jQuery("#registration__form div[data-tmpl-action-name='Success message']").data("tmpl-action-value");jQuery("#registration__form span[data-tmpl-action-name='Error message']").html(),jQuery(document.body).on("click","#registration__form .submit",function(c){L(c,t,n,i,r,o,a,e)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(e){A({valid:!0},n,t)})},window.engageLibrary.regilite=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,t=jQuery(".regiwall-input"),n=jQuery(".connext-error-message");jQuery(document.body).on("click","#regiliteSubButtonId",function(t){L(t,jQuery(".regiwall-input"),jQuery(".connext-error-message"),jQuery(".registrationWallID").text(),jQuery(".hide-on-success"),jQuery(".show-on-success"),!1,e)}),jQuery(document.body).on("input",".regiwall-input",function(e){A({valid:!0},n,t)})},window.engageLibrary.loginLogoutButtons=function(){var e=document.querySelectorAll(".engageLogoutLink"),t=document.querySelectorAll(".engageLoginLink");window.engageLibrary.userIsAuthenticated()?(e.forEach(function(e){var t=e;t.style.visibility="visible",t.style.display="block",t.addEventListener("click",n),t.addEventListener("keydown",n)}),t.forEach(function(e){e.style.display="none"})):(t.forEach(function(e){var t=e;t.style.visibility="visible",t.style.display="block";var n=t.querySelector("a");if(n&&n.length>0){t.querySelector("a").textContent="Log in";var r=new URL(t.querySelector("a").href),o=new URLSearchParams(r);o.append("returnUrl",c()),t.querySelector("a").setAttribute("href","".concat(r,"?").concat(o))}}),e.forEach(function(e){e.style.display="none"}));var n=function(e){try{void 0!==window.MNGAuthentication&&("keydown"===e.type&&"Enter"===e.key||"click"===e.type)&&(e.preventDefault(),window.MNGAuthentication.logout())}catch(e){r.log(e)}}},window.engageLibrary.expandCollapseJquery=function(){jQuery(document).ready(function(){var e=jQuery("[data-nxt-template-substep= 'Collapsed']"),t=jQuery("[data-nxt-template-substep= 'Expanded']"),n=jQuery(".collapse-button"),r=jQuery(".expand-button");n.on("click",function(){t.hide(),e.show()}),r.on("click",function(){t.show(),e.hide()})})},window.engageLibrary.hybridHardwall=function(){window.engageLibrary.paywallTimer();var e=jQuery("#registration__form .connext-email-input"),t=jQuery("#registration__form .connext-error-message"),n=jQuery("#registrationWall .hide-on-success"),r=jQuery("#registrationWall .show-on-success"),o=jQuery("#registrationWallID").text(),i=jQuery("#registration__form div[data-tmpl-action-name='Success message']").html()||jQuery("#registration__form div[data-tmpl-action-name='Success message']").data("tmpl-action-value");jQuery("#registration__form span[data-tmpl-action-name='Error message']").html(),jQuery(document.body).on("click","#registration__form .submit",function(a){L(a,e,t,o,n,r,i)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(n){A({valid:!0},t,e)})},window.engageLibrary.lowaLoginEvent=function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"lowa_login_click",lowa_click:"login"})},window.engageLibrary.lowaCloseEvent=function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"lowa_login_click",lowa_click:"dismiss"})},window.engageLibrary.whySubscribePageCheck=function(){return"why-subscribe"===window.location.pathname.split("/")[1]},window.engageLibrary.isSophiVariantOrHoldout=function(){var e=b(),t=E(),n=t?t.Name:null;console.log("Sophi isSophiVariantOrHoldout",e);var r={event:"sophi_cookie",sophi_type:"isSophiVariantOrHoldout",sophi_cookie_val:e};return n&&(r.sophi_conv=n),window.dataLayer.push(r),!!e&&(e.includes("variant")||e.includes("holdout"))},window.engageLibrary.isSophiVariant=function(){var e=b(),t=E(),n=t?t.Name:null;console.log("Sophi isSophiVariant",e);var r={event:"sophi_cookie",sophi_type:"isSophiVariant",sophi_cookie_val:e};return n&&(r.sophi_conv=n),window.dataLayer.push(r),!!e&&e.includes("variant")},window.engageLibrary.shouldLoadPaywall=function(){var e=E(),t=e?e.Name:null,n=_(),r=!1;"wallType"in n&&(r="paywall"===n.wallType);var o={event:"sophi_decision",sophi_type:"shouldLoadPaywall",sophi_response:r};return t&&(o.sophi_conv=t),window.dataLayer.push(o),console.log("Sophi shouldLoadPaywall",r),r},window.engageLibrary.shouldLoadRegwall=function(){var e=E(),t=e?e.Name:null,n=_(),r=!1;"wallType"in n&&(r="regwall"===n.wallType);var o={event:"sophi_decision",sophi_type:"shouldLoadRegwall",sophi_response:r};return t&&(o.sophi_conv=t),window.dataLayer.push(o),console.log("Sophi shouldLoadRegwall",r),r},window.engageLibrary.responseIsNowall=function(){var e=E(),t=e?e.Name:null,n=_(),r=!1;"wallVisibility"in n&&(r="never"===n.wallVisibility);var o={event:"sophi_decision",sophi_type:"responseIsNowall",sophi_response:r};return t&&(o.sophi_conv=t),window.dataLayer.push(o),console.log("Sophi responseIsNowall",r),r},window.engageLibrary.regwallObj=function(){return!!localStorage.getItem("regwallAlreadyRegistered")},window.engageLibrary.userIsInSegments=function(e){return Array.isArray(e)?a(e):(r.log("No segments provided"),!1)},window.engageLibrary.getUserHhsl=function(){var e;return(null===(e=Connext.Storage.GetUserData().DigitalAccess.Subscription)||void 0===e?void 0:e.HouseholdSubscriptionLevel)||[]},window.engageLibrary.marinRegwallListener=y(l().mark(function t(){var n,i,a,c,s,u,g,f,m,p,v,b,L,S,A,I,_,E;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return b=function(){a({valid:!0})},s=function(e){a({valid:!1,message:e})},n=function(){return document.getElementById("tribRegiwallEmailId")||document.getElementById("regiwallEmailId")},i=function(e,t){var n=document.querySelector(".connext-error-message");t?(r.log("Regwall Validate: ","show message: ".concat(e)),n.innerHTML=e,n.style.display="block"):(n.textContent="",n.style.display="none")},a=function(e){e.valid?(i("",!1),n().classList.remove("connext-validation-error")):(r.log("Regwall Validate: ","update message"),i(e.message,!0),n().classList.add("connext-validation-error"))},c=function(e){if(r.log("Regwall Validate: ","In goToSuccessStep"),w(document.querySelectorAll(".hide-on-success")).forEach(function(e){e.style.display="none"}),r.log("Hid .hide-on-success elements"),a({valid:!0}),!0===e){r.log("Regwall Validate: ","Registration success was successful."),w(document.querySelectorAll(".show-on-success")).forEach(function(e){e.style.display="block"}),r.log("Showing .show-on-success elements");var t=n();(window._matherq=window._matherq||[]).push(["paywallEvent",{type:"regwall",category:"regwall_registration",action:"completed"},{email:t.value}]),t.value="",localStorage.setItem("regwallSuccess","yes")}else r.log("Regwall Validate: ","Registration is not unique."),document.querySelector(".show-on-alreadyRegisterd").style.display="block",localStorage.setItem("regwallAlreadyRegistered","yes")},u=function(){return void 0!==window.authentication_config?"1"===window.authentication_config.auth0RegwallUserEmail?{sendEmail:!0,siteURL:window.location.origin,auth0ClientId:window.authentication_config.auth0ClientId,includeLoginLink:!1}:{sendEmail:!1,auth0ClientId:window.authentication_config.auth0ClientId}:{sendEmail:!1,auth0ClientId:!1}},g=function(t){try{"string"==typeof t&&k(e,t,{domain:C(),path:"/",expires:365,secure:!0})}catch(e){r.log("Failed to set auth0_sub cookie: ",e)}},f=function(t){if(!x(e))try{var n=t.claims;if(null===n||void 0===n||"object"!==h(n)&&!Object.keys(n).includes("sub"))return;var o=n.sub;g(o)}catch(e){r.log("Failed to set auth0_sub: ",e)}},m=function(e,t){return new Promise(function(n){try{"undefined"==typeof CnnXt&&(r.log("Connext was not loaded."),n(!1)),r.log("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){r.log("Signed user up to newsletter: ",t),n(!0)},onError:function(e){r.log("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){r.log("subscribeToNewsletter Error:",e),n(!1)}})},p=function(){var e=y(l().mark(function e(){var t,o,i,a,c,s,g;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=document.getElementById("tribRegiwallSubButtonId")||document.getElementById("regiwallSubButtonId")).textContent="Validating...",o=n().value,i=window.simpleEmailValidation(o),a=u(),!i.valid){e.next=14;break}if((c=d({email:o},a)).auth0ClientId){e.next=9;break}return e.abrupt("return",{valid:!0,message:"",exist:!1});case 9:return s="".concat(window.authentication_config.entitlementsEndpoint,"auth0/getDefaultUserConnection"),e.next=12,fetch(s,{method:"POST",body:JSON.stringify(c),headers:{"X-API-Key":window.authentication_config.entitlementsAPIKey}}).then(function(e){return e.json()}).then(function(e){return"object"===h(e)&&e.uuid?{valid:!0,message:"",exist:!0}:"object"===h(e)&&e.newUserCreated?(t.textContent="Submitting...",{valid:!0,message:"",exist:!1,uuid:e.newUserCreated,email:o}):{valid:!0,message:"",exist:!1,email:o}}).catch(function(e){return r.log("Regwall Validate: ",e),t.textContent="Continue",{valid:!1,message:"Email validation network error, try again.",exist:null}});case 12:return g=e.sent,e.abrupt("return",g);case 14:return e.abrupt("return",{valid:!1,message:"This email is blocked, try another.",exist:null});case 15:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(){var e=y(l().mark(function e(t){var n,d,g;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.log("Regwall Validate: ","starting subscribe function"),t.preventDefault(),n=document.querySelector(".registrationWallID").textContent,e.next=5,p();case 5:if(!1===(d=e.sent).valid&&((document.getElementById("tribRegiwallSubButtonId")||document.getElementById("regiwallSubButtonId")).textContent="Continue"),a(d),!(d.valid&&n.length>0&&!1===d.exist)){e.next=16;break}return r.log("Regwall Validate: ","validation good, success message"),e.next=12,m(d.email,n);case 12:e.sent?(r.log("Regwall Validate: ","newsletter subscription was successful."),u().sendEmail&&(window.localStorage.setItem(o,"false"),(g={claims:{}}).claims.sub=d.uuid,f(g),r.log("Regwall Validate: ","Set the ".concat(o," storage object."))),c(!0)):(r.log("Regwall Validate: ","newsletter subscription was a FAIL."),s("Newsletter subscription failed.")),e.next=17;break;case 16:d.valid&&n.length>0&&!0===d.exist?(r.log("Regwall Validate: ","validation failed, email already exists"),c(!1),i("Email already exists, try again.",!0)):0===n.length&&(r.log("Regwall Validate: ","validation failed, no newsletter code"),i("Newsletter field is empty",!0));case 17:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),L=window.engageLibrary.getPageType(),r.log("Regwall Validate: ","Page type is ",L),t.next=16,MNGAuthentication.getUserInfo();case 16:if(S=t.sent,r.log("Regwall Validate: ","userInfo has: ",S),"article"===L&&!S.authenticated){t.next=21;break}return r.log("Regwall Validate: ","Returning, since page type was not article or user was logged in"),t.abrupt("return");case 21:r.log("Regwall Validate: ","Starting regwall validation code, adding listeners."),(A=document.getElementById("tribRegiwallSubButtonId"))&&A.addEventListener("click",v),(I=document.getElementsByClassName("connext-trib-email-input")).length>0&&I[0].addEventListener("input",b),(_=document.getElementById("regiwallSubButtonId"))&&_.addEventListener("click",v),(E=document.getElementsByClassName("connext-email-input")).length>0&&E[0].addEventListener("input",b),document.addEventListener("keyup",function(e){"Enter"!==e.code||"tribRegiwallEmailId"!==document.activeElement.id&&"regiwallEmailId"!==document.activeElement.id||v(e)});case 31:case"end":return t.stop()}},t)})),window.engageLibrary.showModal=function(e){},window.engageLibrary.createCompSubModal=function(){var e,o=document.querySelector(".hidden-logo a").getAttribute("aria-label"),i="",a={domain:"",email:"",firstName:"",lastName:"",phone:"5555555555",zipCode:""},c=function(){var t=y(l().mark(function t(){var n,a,c,d;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=window.engageLibrary.userIsAuthenticated(),console.log("Comp Sub conversation | user found ",n),$("#solicit-header").text("Get a complimentary trial subscription to ".concat(o)),!n){t.next=18;break}return t.prev=4,a=s(window.MNGAuthentication.authenticationReady.idToken),c=a.email,d=a.auth0Id,t.next=8,f(d);case 8:e=t.sent,r.log("Comp Sub conversation | getting email, user details from services ",c,e),i=c,t.next=16;break;case 13:t.prev=13,t.t0=t.catch(4),console.log("error in setup ",t.t0);case 16:t.next=19;break;case 18:h("We are unable to provide this email address with this offer.");case 19:document.querySelector("#email-address").placeholder=i,document.querySelector("#compSignupButton").removeAttribute("disabled"),u();case 22:case"end":return t.stop()}},t,null,[[4,13]])}));return function(){return t.apply(this,arguments)}}(),u=function(){document.querySelector("#trialCompClose").addEventListener("click",function(e){e.preventDefault(),window.location.replace("/")}),document.querySelector("#compCancelButton").addEventListener("click",function(e){e.preventDefault(),window.location.replace("/")}),document.querySelectorAll(".trial-form-input").forEach(function(e){e.addEventListener("blur",w),e.addEventListener("focus",d)}),document.querySelector("#compSignupButton").addEventListener("click",g),document.querySelector("#closeModalAfterSuccess").addEventListener("click",function(){var e=y(l().mark(function e(t){var n,r,o;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=localStorage.getItem("__MNG_Session"))){e.next=14;break}return e.prev=2,o=JSON.parse(n),r=o.entitlementToken,e.next=7,m(r);case 7:window.location.replace(window.location.origin+window.location.pathname),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),console.error("Failed to parse __MNG_Session:",e.t0),window.location.replace("/");case 14:case"end":return e.stop()}},e,null,[[2,10]])}));return function(t){return e.apply(this,arguments)}}())},d=function(e){"zip-code"==e.target.id&&($("#zipError1").hide(),$(e.target).closest("div").css("border","1px solid #CCC"))},g=function(){var t=y(l().mark(function t(n){var o,c,s,u,d,g,w,f,y,m,p,v;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=$("#zip-code").val(),c=b(o),r.log("Comp Sub conversation | begin submit"),!c){t.next=38;break}return t.prev=4,(u=new Date).setDate(u.getDate()+1),(d=new Date(u)).setDate(u.getDate()+180),(g=document.querySelector("#compSignupButton")).setAttribute("disabled",!0),g.textContent="Creating subscription",r.log("Comp Sub conversation | fields valid",c),w=window.engageLibrary.getDataLayerEntry("Publisher Domain"),(f=document.createElement("div")).classList.add("spring-spinner"),f.id="compSubSpinner",f.innerHTML='\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
',g.appendChild(f),a.domain=w,a.email=i,a.zipCode=o,e&&null!==(s=e)&&void 0!==s&&s.fullName.includes(" ")?(y=e.fullName.split(" ")[0],m=e.fullName.split(" ")[1],a.firstName=y||"unknown",a.lastName=m||"unknown"):(a.firstName?a.firstName=e.fullName:a.firstName="unknown",e.nickname?a.lastName=e.nickname:a.lastName="unknown"),r.log("Comp Sub conversation | parameters submit body ",a),t.next=26,fetch("".concat(window.authentication_config.entitlementsEndpoint,"comp/create"),{method:"POST",headers:{"X-Api-Key":window.authentication_config.entitlementsAPIKey},body:JSON.stringify(a)});case 26:return p=t.sent,t.next=29,p.json();case 29:return v=t.sent,200===p.status?(document.querySelector("#compSubFormBody").classList.add("hidden"),r.log("Comp Sub conversation | Success! this should add a comp sub to the user ",p),document.querySelector("#compSubSuccessBody").classList.remove("hidden"),window.dataLayer.push({event:"digisubs_subscription",sub_id:[v.Result.SubscriptionId],sub_type:"comp",sub_start:[u.toISOString()],sub_end:[d.toISOString()]})):(r.log("Comp Sub conversation | fail - this is the body ",v),h("The provided email address does not qualify for a complimentary subscription at this time.")),t.abrupt("return");case 34:t.prev=34,t.t0=t.catch(4),r.log("Comp Sub conversation | fetch error ",t.t0),h("We are unable to provide this email address with this offer.");case 38:c||($("#zip-code").closest("div").css("border","1px solid #F00"),$("#zipError1").show());case 39:case"end":return t.stop()}},t,null,[[4,34]])}));return function(e){return t.apply(this,arguments)}}(),h=function(e){document.querySelector("#compSubFormBody").classList.add("hidden"),document.querySelector("#subAlreadyExistsBody").classList.remove("hidden"),document.querySelector("#error-message").textContent=e},w=function(e){var t=$("#zip-code").val(),n=b(t);"zip-code"===$(e.target).prop("id")&&(n||($(e.target).closest("div").css("border","1px solid #F00"),$("#zipError1").show()))},f=function(){var e=y(l().mark(function e(t){var n,o;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(window.authentication_config.entitlementsEndpoint,"auth0/users/").concat(t),{method:"GET",headers:{"X-Api-Key":window.authentication_config.entitlementsAPIKey}});case 3:return n=e.sent,e.next=6,n.json();case 6:return o=e.sent,r.log("Comp sub conversation | logged in user details ",o),e.abrupt("return",o);case 11:e.prev=11,e.t0=e.catch(0),console.log("Comp sub conversation | ",e.t0),h("We are unable to provide this email address with this offer.");case 15:case"end":return e.stop()}},e,null,[[0,11]])}));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=y(l().mark(function e(t){var n,o,i;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r.log("Entitlements: refresh JWT start..."),t){e.next=4;break}return e.abrupt("return",new Error("No token to refresh"));case 4:return r.log("Entitlements refresh: entitlement token: ",t),n={jwt:t},e.next=8,fetch("".concat(window.authentication_config.entitlementsEndpoint,"session/refresh"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":window.authentication_config.entitlementsAPIKey},body:JSON.stringify(n)});case 8:return o=e.sent,e.next=11,o.json();case 11:return i=e.sent,e.next=14,p(i.jwt);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),console.log("error reseting token ",e.t0);case 19:case"end":return e.stop()}},e,null,[[0,16]])}));return function(t){return e.apply(this,arguments)}}(),p=function(){var e=y(l().mark(function e(t){var o;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:try{v(t),r.log("About to decode token before saving: ",t),o=s(t),window.localStorage.setItem(n,JSON.stringify({entitlementToken:t,expiration:o.entitlement_expiry,entitlementSource:o.entitlement_source,isEntitled:o.entitlement_entitled,adFree:o.entitlement_extras_adfree||!1,entitlementLevel:o.entitlement_level}))}catch(e){r.log("Entitlements: Failed to save token: ",e)}case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),v=function(e){k(t,e,{path:"/",domain:C(),expires:365,secure:!0})},b=function(e){return/^\d{5}(-\d{4})?$/.test(e)};c()}},S=function(){window.engageLibrary=window.engageLibrary||{},window.engageLibrary.runTest=function(){r.log("pageIsInPreview() - Page is on preview: ",window.engageLibrary.pageIsInPreview()),r.log("subscribersForMigration() - Is on Subscriber for Migration segment: ",window.engageLibrary.subscribersForMigration()),r.log("isEntitledValue() - Has entitled access: ",window.engageLibrary.isEntitledValue()),r.log("printCheck() - Is print level: ",window.engageLibrary.printCheck()),r.log("getPageType() - Page type is: ",window.engageLibrary.getPageType()),r.log("getSection() - Section is: ",window.engageLibrary.getSection()),r.log("getPaywallLevel() - Paywall level is: ",window.engageLibrary.getPaywallLevel()),r.log("premiumFeatureExclusiveDP() - DP article flagged as exclusive feature: ",window.engageLibrary.premiumFeatureExclusiveDP()),r.log("regwallObj() - Regwall is already registered: ",window.engageLibrary.regwallObj()),r.log("allReadersTag() - Article contains all readers tag: ",window.engageLibrary.allReadersTag()),r.log("isOpinionPiece() - Contains Opinion tag: ",window.engageLibrary.isOpinionPiece()),r.log("isEspanolContent() - Contains espanol tag: ",window.engageLibrary.isEspanolContent()),r.log("isPhotosAndVideos() - Contains photos and videos tag: ",window.engageLibrary.isPhotosAndVideos()),r.log("isAthleteOfWeek() - Contains athlete of the week tag: ",window.engageLibrary.isAthleteOfWeek()),r.log("isContests() - Contains contests tag: ",window.engageLibrary.isContests()),r.log("getTaxonomy1() - Is Taxonomy1 present: ",window.engageLibrary.getTaxonomy1()),r.log("profileDropDownExists() - Does profile dropdown exist: ",window.engageLibrary.profileDropDownExists()),r.log("twinCitiesKnownEmail() - User is in segment Twincities - known email: ",window.engageLibrary.twinCitiesKnownEmail()),r.log("twinCitiesUrlCheck() - Is current url twincities.com: ",window.engageLibrary.twinCitiesUrlCheck()),r.log("pmpUrlCheck() - Is current url PMP ",window.engageLibrary.pmpUrlCheck()),r.log("whySubscribePageCheck() Is user on why-subscribe page: ",window.engageLibrary.whySubscribePageCheck()),window.sophi&&(r.log("isSophiVariant() - Is Sophi variant: ",window.engageLibrary.isSophiVariant()),r.log("shouldLoadPaywall() - Sophi should load Paywall: ",window.engageLibrary.shouldLoadPaywall()),r.log("shouldLoadRegwall() - Sophi should load Regwall: ",window.engageLibrary.shouldLoadRegwall()),r.log("responseIsNowall() - Sophi no wall response: ",window.engageLibrary.responseIsNowall())),r.log("mercurynewsIsMeteredArchive() - mercurynews is metered archive: ",window.engageLibrary.mercurynewsIsMeteredArchive()),r.log("ocregisterIsMeteredArchive() - ocregister is metered archive: ",window.engageLibrary.ocregisterIsMeteredArchive()),r.log("pressenterpriseIsMeteredArchive() - pressenterprise is metered archive: ",window.engageLibrary.pressenterpriseIsMeteredArchive()),r.log("eastbayIsMeteredArchive() - eastbay is metered archive: ",window.engageLibrary.eastbayIsMeteredArchive()),r.log("marinijIsMeteredArchive() - marinij is metered archive: ",window.engageLibrary.marinijIsMeteredArchive()),r.log("bostonheraldIsMeteredArchive() - bostonherald is metered archive: ",window.engageLibrary.bostonheraldIsMeteredArchive()),r.log("lowellsunIsMeteredArchive() - lowellsun is metered archive: ",window.engageLibrary.lowellsunIsMeteredArchive()),r.log("sentinelIsMeteredArchive() - sentinel is metered archive: ",window.engageLibrary.sentinelIsMeteredArchive()),r.log("dailyfreemanIsMeteredArchive() - dailyfreeman is metered archive: ",window.engageLibrary.dailyfreemanIsMeteredArchive()),r.log("dailycameraIsMeteredArchive() - dailycamera is metered archive: ",window.engageLibrary.dailycameraIsMeteredArchive()),r.log("greeleytribuneIsMeteredArchive() - greeleytribune is metered archive: ",window.engageLibrary.greeleytribuneIsMeteredArchive()),r.log("reporterheraldIsMeteredArchive() - reporterherald is metered archive: ",window.engageLibrary.reporterheraldIsMeteredArchive()),r.log("timescallIsMeteredArchive() - timescall is metered archive",window.engageLibrary.timescallIsMeteredArchive()),r.log("santacruzsentinelIsMeteredArchive() - santacruzsentinel is metered archive: ",window.engageLibrary.santacruzsentinelIsMeteredArchive()),r.log("montereyheraldIsMeteredArchive() - montereyherald is metered archive: ",window.engageLibrary.montereyheraldIsMeteredArchive()),r.log("chicoerIsMeteredArchive() - chicoer is metered archive: ",window.engageLibrary.chicoerIsMeteredArchive()),r.log("courantIsMeteredArchive() - courant is metered archive: ",window.engageLibrary.courantIsMeteredArchive()),r.log("mcallIsMeteredArchive() - mcall is metered archive",window.engageLibrary.mcallIsMeteredArchive()),r.log("orlandosentinelIsMeteredArchive() - orlandosentinel is metered archive: ",window.engageLibrary.orlandosentinelIsMeteredArchive()),r.log("sunsentinelIsMeteredArchive() - sunsentinel is metered archive: ",window.engageLibrary.sunsentinelIsMeteredArchive()),r.log("pilotonlineIsMeteredArchive() - pilotonline is metered archive: ",window.engageLibrary.pilotonlineIsMeteredArchive()),r.log("dailypressIsMeteredArchive() - dailypress is metered archive: ",window.engageLibrary.dailypressIsMeteredArchive()),r.log("nydailynewsIsMeteredArchive() - nydailynews is metered archive: ",window.engageLibrary.nydailynewsIsMeteredArchive()),r.log("baltimoresunIsMeteredArchive() - baltimoresun is metered archive: ",window.engageLibrary.baltimoresunIsMeteredArchive()),r.log("capitalgazetteIsMeteredArchive() - capitalgazette is metered archive: ",window.engageLibrary.capitalgazetteIsMeteredArchive()),r.log("articleSharingExpire() - Article share expire status: ",window.engageLibrary.articleSharingExpire()),r.log("getRegwallSuccess() - regwallSuccess exists on local storage: ",window.engageLibrary.getRegwallSuccess()),r.log("getRegwallKnown() - regwallKnown exists on local storage: ",window.engageLibrary.getRegwallKnown()),r.log("userIsAuthenticated() - Is user authenticated: ",window.engageLibrary.userIsAuthenticated()),r.log("getUserHhsl() - User current Hhsl is: ",window.engageLibrary.getUserHhsl())},window.engageLibrary.bcRunTests=function(){r.log("panymaGiveBCAccess() Page is on preview: ",window.engageLibrary.panymaGiveBCAccess()),r.log("bcLowaCheck() - segment for LOWA user: ",window.engageLibrary.bcLowaCheck()),r.log("checkBCForNonSub() - Check for non-sub: ",window.engageLibrary.checkBCForNonSub()),r.log("allSubsGiveBCAccess() - User is on All Active Subscribers segment: ",window.engageLibrary.allSubsGiveBCAccess()),r.log("crossOverGiveBCAccess() - User is on CrossOver PremSubs segment: ",window.engageLibrary.crossOverGiveBCAccess()),r.log("caGiveBCAccess() - User is on CA Print Only Subs segment: ",window.engageLibrary.caGiveBCAccess()),r.log("bcAdblockDetection() - User is on Adblock Users segment",window.engageLibrary.bcAdblockDetection()),r.log("pmpGiveBCAccess() - User is on PMP_KnownNonSubsAll segment",window.engageLibrary.pmpGiveBCAccess())}};function A(e){"@babel/helpers - typeof";return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */I=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),c=new M(r||[]);return o(a,"_invoke",{value:C(e,n,c)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var g="suspendedStart",h="suspendedYield",w="executing",f="completed",y={};function m(){}function p(){}function v(){}var b={};l(b,a,function(){return this});var L=Object.getPrototypeOf,S=L&&L(L(P([])));S&&S!==n&&r.call(S,a)&&(b=S);var _=v.prototype=m.prototype=Object.create(b);function x(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function k(e,t){function n(o,i,a,c){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==A(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,c)},function(e){n("throw",e,a,c)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,c)})}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=g;return function(i,a){if(o===w)throw Error("Generator is already running");if(o===f){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=E(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===g)throw o=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=w;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?f:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=f,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function _(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}(function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){_(i,r,o,a,c,"next",e)}function c(e){_(i,r,o,a,c,"throw",e)}a(void 0)})}}(I().mark(function e(){return I().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L(),S(),console.log("Engage Library loaded: ".concat((new Date).getTime()));case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}})()()}]); //# sourceMappingURL=engageLibrary.min.js.map; (()=>{"use strict";window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;window.authentication_config.debug,window.authentication_config&&window.authentication_config.sessionServer,!!window.authentication_config&&window.authentication_config.entitlementsEnabled,!!window.authentication_config&&window.authentication_config.dropdownEnabled,!!window.authentication_config&&window.authentication_config.enableReaderDashboardLink,!!window.authentication_config&&window.authentication_config.oneTapEnabled,!!window.authentication_config&&window.authentication_config.useTribMainGoogle,!!window.authentication_config&&window.authentication_config.isAdfreeArticle,window.authentication_config&&window.authentication_config.auth0Domain,window.authentication_config&&window.authentication_config.auth0ClientId,window.authentication_config&&window.authentication_config.entitlementsEndpoint,window.authentication_config&&window.authentication_config.entitlementsAPIKey,!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,!!window.authentication_config&&window.authentication_config.serverEntitlements,window.authentication_config&&window.authentication_config.googleClientId,window.authentication_config&&window.authentication_config.newsletterId,window.authentication_config&&window.authentication_config.pluginSecret,!!window.authentication_config&&window.authentication_config.newslettersEnabled,!!window.authentication_config.bcLowaSegements&&window.authentication_config.bcLowaSegements,!!window.authentication_config.blueconicEnabled&&window.authentication_config.blueconicEnabled,!!window.authentication_config.enableDatadog&&window.authentication_config.enableDatadog})(); //# sourceMappingURL=mng-digisubs.settings.bundle.js.map; /*! For license information please see mng-digisubs.connextUtils.bundle.js.LICENSE.txt */ (()=>{"use strict";var t={8805:(t,n,e)=>{e.d(n,{A:()=>o}),window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const o={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog}}},n={};function e(o){var i=n[o];if(void 0!==i)return i.exports;var r=n[o]={exports:{}};return t[o](r,r.exports,e),r.exports}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,n,e,o,i,r,a){try{var c=t[r](a),u=c.value}catch(t){return void e(t)}c.done?n(u):Promise.resolve(u).then(o,i)}function r(t){return function(){var n=this,e=arguments;return new Promise((function(o,r){var a=t.apply(n,e);function c(t){i(a,o,r,c,u,"next",t)}function u(t){i(a,o,r,c,u,"throw",t)}c(void 0)}))}}function a(t,n){for(var e=0;e{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var u=e(8805);const s=function(){if(u.A.debug){for(var t,n=arguments.length,e=new Array(n),o=0;o=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),g}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var o=e.completion;if("throw"===o.type){var i=o.arg;A(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(n,e,o){return this.delegate={iterator:R(n),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=t),g}},n}var h=function(t,n){function e(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"readyInstance",null),c(this,"promiseStatus",null),c(this,"connextAlreadyRan",!1),c(this,"eventListeners",{}),c(this,"runConnextIfSilentTimer",void 0)}var o,i,u;return o=e,i=[{key:"init",value:function(){this.setupRunTimer()}},{key:"setupRunTimer",value:function(){var t=this;this.runConnextIfSilentTimer=setTimeout(r(f().mark((function n(){return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.connextReady("onInit");case 2:n.sent&&(s("".concat(l," second Connext timer is up.")),t.rerunConnextEntitlements());case 4:case"end":return n.stop()}}),n)}))),1e3*l)}},{key:"connextReady",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onFinish";return this.readyInstance&&!1!==this.promiseStatus?s("connextReady promise already exists, status is ".concat(this.promiseStatus,".")):(this.connextTimeout&&clearTimeout(this.connextTimeout),s("Creating new connext ready promise..."),this.readyInstance=new Promise((function(e){var o=!1;t.promiseStatus="pending";var i=function(n){o||(t.promiseStatus=n,e(n),o=!0)},r=setTimeout((function(){"string"==typeof n&&t.removeEventListener(n),"undefined"!=typeof Connext?(s("Connext actually did load..."),clearTimeout(r),t.connextTimeout=null,i(!0)):(s("Connext did not load in time. Resolving false..."),clearTimeout(r),t.connextTimeout=null,i(!1))}),7e3);if(t.connextTimeout=r,"undefined"!=typeof Connext)s("Connext already ready."),clearTimeout(r),"string"==typeof n&&t.removeEventListener(n),i(!0);else{s("Listening for Connext Ready event...");var a=function(){clearTimeout(r),s("Connext loaded!"),i(!0),"string"==typeof n&&t.removeEventListener(n)};document.addEventListener("string"==typeof n?n:"onFinish",a),"string"==typeof n&&(t.eventListeners[n]=a),s("Connext added event listener.")}}))),this.readyInstance}},{key:"runConnext",value:function(){s("Running Connext now..."),Connext.Run(),this.connextAlreadyRan=!0,this.runConnextIfSilentTimer&&clearTimeout(this.runConnextIfSilentTimer)}},{key:"rerunConnextEntitlements",value:function(){return(t=t||r(f().mark((function t(){var n,e=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]&&e[0],t.next=3,this.connextReady("onInit");case 3:if(t.sent){t.next=6;break}return t.abrupt("return");case 6:if(Connext&&!this.connextAlreadyRan){t.next=8;break}return t.abrupt("return");case 8:n&&Connext.GetOptions().Silentmode?this.runConnext():n?s("Not rerunning Connext"):this.runConnext();case 9:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}},{key:"runConnextIfSilent",value:function(){return(n=n||r(f().mark((function t(){var n,e,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.connextReady("onInit");case 2:if(o=t.sent,"1"!==(null===(n=window.authentication_config)||void 0===n?void 0:n.sophiSDKEnabled)&&"1"!==(null===(e=window.authentication_config)||void 0===e?void 0:e.sophiOnDevice)&&!this.connextAlreadyRan){t.next=5;break}return t.abrupt("return");case 5:o&&Connext.GetOptions().Silentmode&&(s("Silent mode, running Connext now."),this.rerunConnextEntitlements());case 6:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}},{key:"removeEventListener",value:function(t){this.eventListeners[t]?(document.removeEventListener(t,this.eventListeners[t]),delete this.eventListeners[t],s("Connext removed event listener for ".concat(t,"."))):s("No event listener to remove for ".concat(t,"."))}}],i&&a(o.prototype,i),u&&a(o,u),e}();window.ConnextUtils=window.ConnextUtils||new h})(); //# sourceMappingURL=mng-digisubs.connextUtils.bundle.js.map;