(function(u){document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("openPopupBtn"),n=document.getElementById("closePopupBtn"),o=document.getElementById("popupContent"),d=()=>{o.removeAttribute("hidden"),t.setAttribute("aria-expanded","true"),n.focus()},p=()=>{o.setAttribute("hidden",""),t.setAttribute("aria-expanded","false"),t.focus()};t.addEventListener("click",d),t.addEventListener("keydown",e=>{(e.key==="Enter"||e.keyCode===13)&&(e.preventDefault(),d())}),n.addEventListener("click",p),n.addEventListener("keydown",e=>{(e.key==="Enter"||e.keyCode===13||e.key==="Escape")&&(e.preventDefault(),p())})})})(jQuery); //# sourceMappingURL=main.min.js.map ; !function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";t.r(n);var r={log:function(){if(window.authentication_config&&window.authentication_config.debug){for(var e,n=arguments.length,t=new Array(n),r=0;r>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function a(e){var n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(i(n).replace(/(.)/g,function(e,n){var t=n.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t}))}catch(e){return i(n)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name="InvalidTokenError";var c=function(e,n){if("string"!=typeof e)throw new s("Invalid token specified");var t=!0===(n=n||{}).header?0:1;try{return JSON.parse(a(e.split(".")[t]))}catch(e){throw new s("Invalid token specified: "+e.message)}};function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function u(e){for(var n=1;n3?(o=h===r)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=w&&((o=t<2&&wr||r>h)&&(i[4]=t,i[5]=r,g.n=h,s=0))}if(o||t>1)return a;throw d=!0,r}return function(o,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&w(u,h),s=u,c=h;(n=s<2?e:c)||!d;){i||(s?s<3?(s>1&&(g.n=-1),w(s,c)):g.n=c:g.v=c);try{if(l=2,i){if(s||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,s<2&&(s=0)}else 1===s&&(n=i.return)&&n.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((n=(d=g.n<0)?c:t.call(r,g))!==a)break}catch(n){i=e,s=1,c=n}finally{l=1}}return{value:n,done:d}}}(t,o,i),!0),l}var a={};function s(){}function c(){}function l(){}n=Object.getPrototypeOf;var u=[][r]?n(n([][r]())):(m(n={},r,function(){return this}),n),d=l.prototype=s.prototype=Object.create(u);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,m(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,m(d,"constructor",l),m(l,"constructor",c),c.displayName="GeneratorFunction",m(l,o,"GeneratorFunction"),m(d),m(d,o,"Generator"),m(d,r,function(){return this}),m(d,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:g}})()}function m(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(m=function(e,n,t,r){function i(n,t){m(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(i("next",0),i("throw",1),i("return",2))})(e,n,t,r)}function y(e,n,t,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void t(e)}s.done?n(c):Promise.resolve(c).then(r,o)}function f(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)})}}function p(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=i.call(t)).done)&&(s.push(r.value),s.length!==n);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,n)||v(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=v(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=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,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw i}}}}function v(e,n){if(e){if("string"==typeof e)return L(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?L(e,n):void 0}}function L(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)for(var o=0;o0&&void 0!==arguments[0]&&arguments[0],n=s().hostname;e&&"string"==typeof e&&(n=e);var t=n.split(".");return"".concat(t[t.length-2],".").concat(t[t.length-1])};function d(){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 n=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(n)return r.log("archive check: stop checking because of: ",n),!1;r.log("archive check: business check good, now check date");var t=i.href.split("/"),o="".concat(t[4],"/").concat(t[5],"/").concat(t[3]);r.log(o);var a=new Date,s=new Date(o),c=new Date(s.setDate(s.getDate()+e));return r.log(c),r.log(a),a>c?(r.log("archive check: within the ".concat(e," days")),!0):(r.log("archive check: has not been 90 days yet"),!1)}function m(e){var n=document.querySelector("article")?document.querySelector("article").classList:null;if(null==n)return!1;var t,r=[],o=b((e=e.split(",")).entries());try{for(o.s();!(t=o.n()).done;){var i=p(t.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 s,c=b(r.entries());try{for(c.s();!(s=c.n()).done;){var l=p(s.value,2),u=l[0],d=l[1];if(d+="",n.contains(d))return!0;if(u===r.length-1)return!1}}catch(e){c.e(e)}finally{c.f()}}function y(e){var n=window.location.hostname;return n=n.replace("www.","").replace("preprod.","").replace("develop.","").replace("staging.",""),!(-1===e.indexOf(n))}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 n=0;n7&&void 0!==arguments[7]?arguments[7]:500,c=arguments.length>8&&void 0!==arguments[8]&&arguments[8];e.preventDefault();var l=function(e){var n=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?n.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."}}(n.val());if(I(l,t,n),l.valid&&r.length>0){var u,d=decodeURIComponent(r);try{u=JSON.parse(d)}catch(e){u=d}Array.isArray(u)&&(u=prefIds[0].id.split(",")),CnnXt.API.NewsletterSubscribe({email:n.val(),id:u,onSuccess:function(){o.hide(),a&&i.html(a),i.show(),L(u),I({valid:!0},t,n),n.val(""),localStorage.setItem("regwallSuccess","yes"),c&&P(),setTimeout(function(){Connext.Run()},s)},onError:function(e){g(e||(e={Message:"Error! Empty result or no connection"}))}})}else 0===r.length&&A("Newsletter field is empty",t,!0);function g(e){I({valid:!1,message:e.ErrorMessage||e.Message},t,n)}}function A(e,n,t){t?(n.html(e),n.show()):(n.text(""),n.hide())}function I(e,n,t){e.valid?(A("",n,!1),t.removeClass("connext-validation-error")):(A(e.message,n,!0),t.addClass("connext-validation-error"))}function _(e){var n;switch(e){case 1:n="A";break;case 2:n="B";break;case 3:n="C";break;case 4:n="D";break;case 5:n="E";break;default:n="empty"}return n}function k(){var e={},n=E(),t=n?n.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(v()),sophi_response:JSON.stringify(e)};t&&(r.sophi_conv=t),window.dataLayer.push(r)}return window.engageLibrary.sophiResponseCheckedAlready=!0,e}function C(e){for(var n="".concat(e,"="),t=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]?arguments[0]:[];if(Array.isArray(e)&&Connext){var n,t=null===(n=Connext.Storage.GetUserData().DigitalAccess.Subscription)||void 0===n?void 0:n.HouseholdSubscriptionLevel;return!!e.find(function(e){return e===t})}return!1},window.engageLibrary.getDataLayerEntry=function(e){if(void 0!==window.dataLayer&&e&&e.length>0){var n=window.dataLayer.find(function(n){return n[e]});return!!n&&n[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,n=localStorage.getItem("abLocal");n?window.dataLayer.push({event:"abLocal_event",abLocal:n}):(e=_(Math.floor(Math.random()*Math.floor(2))+1),localStorage.setItem("abLocal",e),window.dataLayer.push({event:"abLocal_event",abLocal:e}));var t=localStorage.getItem("abcLocal");t?window.dataLayer.push({event:"abcLocal_event",abcLocal:t}):(e=_(Math.floor(Math.random()*Math.floor(3))+1),localStorage.setItem("abcLocal",e),window.dataLayer.push({event:"abcLocal_event",abcLocal:e})),localStorage.getItem("abcdLocal")||(e=_(Math.floor(Math.random()*Math.floor(4))+1),localStorage.setItem("abcdLocal",e)),localStorage.getItem("abcdeLocal")||(e=_(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.getABVariant=function(){return localStorage.getItem("abLocal")},window.engageLibrary.getABCVariant=function(){return localStorage.getItem("abcLocal")},window.engageLibrary.getABCDVariant=function(){return localStorage.getItem("abcdLocal")},window.engageLibrary.testingSessionStorage=function(){var e;window.sessionStorage.getItem("abSession")||(e=_(Math.floor(Math.random()*Math.floor(2))+1),window.sessionStorage.setItem("abSession",e)),window.sessionStorage.getItem("abcSession")||(e=_(Math.floor(Math.random()*Math.floor(3))+1),window.sessionStorage.setItem("abcSession",e)),window.sessionStorage.getItem("abcdSession")||(e=_(Math.floor(Math.random()*Math.floor(4))+1),window.sessionStorage.setItem("abcdSession",e)),window.sessionStorage.getItem("abcdeSession")||(e=_(Math.floor(Math.random()*Math.floor(5))+1),window.sessionStorage.setItem("abcdeSession",e));var n="Nothing set since cookies already existed.";return e&&(n="Group set to ".concat(e)),"This function only sets cookies, does not return a value. ".concat(n)},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.","").replace("staging.","");var n=["dailycamera.com","denverpost.com","timescall.com","reporterherald.com","greeleytribune.com","eptrail.com","canoncitydailyrecord.com","journal-advocate.com","fortmorgantimes.com"],t=["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"],s=["thereporteronline.com","delcotimes.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","readingeagle.com"],c=["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!==s.indexOf(e)?a("PENN LOWA"):-1!==c.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!==n.indexOf(e)?a("DENV/PMP LOWA"):-1!==r.indexOf(e)?a("SCNG LOWA"):-1!==t.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):d()},window.engageLibrary.ocregisterIsMeteredArchive=function(){return-1===i.host.search("ocregister")?(r.log("archive check: not on ocregister"),!1):d()},window.engageLibrary.pressenterpriseIsMeteredArchive=function(){return-1===i.host.search("pressenterprise")?(r.log("archive check: not on pressenterprise"),!1):d()},window.engageLibrary.eastbayIsMeteredArchive=function(){return-1===i.host.search("eastbaytimes")?(r.log("archive check: not on eastbaytimes"),!1):d()},window.engageLibrary.marinijIsMeteredArchive=function(){return-1===i.host.search("marinij")?(r.log("archive check: not on marinij"),!1):d()},window.engageLibrary.bostonheraldIsMeteredArchive=function(){return-1===i.host.search("bostonherald")?(r.log("archive check: not on bostonherald"),!1):d()},window.engageLibrary.lowellsunIsMeteredArchive=function(){return-1===i.host.search("lowellsun")?(r.log("archive check: not on lowellsun"),!1):d()},window.engageLibrary.sentinelIsMeteredArchive=function(){return-1===i.host.search("sentinelandenterprise")?(r.log("archive check: not on sentinelandenterprise"),!1):d()},window.engageLibrary.dailyfreemanIsMeteredArchive=function(){return-1===i.host.search("dailyfreeman")?(r.log("archive check: not on dailyfreeman"),!1):d()},window.engageLibrary.dailycameraIsMeteredArchive=function(){return-1===i.host.search("dailycamera")?(r.log("archive check: not on dailycamera"),!1):d()},window.engageLibrary.greeleytribuneIsMeteredArchive=function(){return-1===i.host.search("greeleytribune")?(r.log("archive check: not on greeleytribune"),!1):d()},window.engageLibrary.reporterheraldIsMeteredArchive=function(){return-1===i.host.search("reporterherald")?(r.log("archive check: not on reporterherald"),!1):d()},window.engageLibrary.timescallIsMeteredArchive=function(){return-1===i.host.search("timescall")?(r.log("archive check: not on timescall"),!1):d()},window.engageLibrary.santacruzsentinelIsMeteredArchive=function(){return-1===i.host.search("santacruzsentinel")?(r.log("archive check: not on santacruzsentinel"),!1):d()},window.engageLibrary.montereyheraldIsMeteredArchive=function(){return-1===i.host.search("montereyherald")?(r.log("archive check: not on montereyherald"),!1):d()},window.engageLibrary.chicoerIsMeteredArchive=function(){return-1===i.host.search("chicoer")?(r.log("archive check: not on chicoer"),!1):d()},window.engageLibrary.courantIsMeteredArchive=function(){return-1===i.host.search("courant")?(r.log("archive check: not on courant"),!1):d(30)},window.engageLibrary.mcallIsMeteredArchive=function(){return-1===i.host.search("mcall")?(r.log("archive check: not on mcall"),!1):d(30)},window.engageLibrary.orlandosentinelIsMeteredArchive=function(){return-1===i.host.search("orlandosentinel")?(r.log("archive check: not on orlandosentinel"),!1):d(30)},window.engageLibrary.sunsentinelIsMeteredArchive=function(){return-1===i.host.search("sun-sentinel")?(r.log("archive check: not on sun-sentinel"),!1):d(30)},window.engageLibrary.pilotonlineIsMeteredArchive=function(){return-1===i.host.search("pilotonline")?(r.log("archive check: not on pilotonline"),!1):d(30)},window.engageLibrary.dailypressIsMeteredArchive=function(){return-1===i.host.search("dailypress")?(r.log("archive check: not on dailypress"),!1):d(30)},window.engageLibrary.nydailynewsIsMeteredArchive=function(){return-1===i.host.search("nydailynews")?(r.log("archive check: not on nydailynews"),!1):d(30)},window.engageLibrary.baltimoresunIsMeteredArchive=function(){return-1===i.host.search("baltimoresun")?(r.log("archive check: not on baltimoresun"),!1):d(30)},window.engageLibrary.capitalgazetteIsMeteredArchive=function(){return-1===i.host.search("capitalgazette")?(r.log("archive check: not on capitalgazette"),!1):d(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):d(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):d(e)},window.engageLibrary.WCEIsMeteredArchive=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return-1===i.host.search("wcexaminer")?(r.log("archive check: not on wcexaminer"),!1):d(e)},window.engageLibrary.articleSharingExpire=function(){var e,n,t,r;return void 0!==(null===(e=window.MNGAuthentication)||void 0===e?void 0:e.articleShare)&&"null"!==(null===(n=window.MNGAuthentication)||void 0===n?void 0:n.articleShare)&&!1!==(null===(t=window.MNGAuthentication)||void 0===t?void 0:t.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 M=function(e,n,t){var o="".concat(e,"=").concat(n,";");void 0!==t?(r.log("Setting cookie with options: ",t),Object.entries(t).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];if("expires"===t){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),o+="expires=".concat(i.toUTCString(),";")}else o+="".concat(t,"=").concat(r,";")})):o+="path=/;",document.cookie=o},O=function(){var e=l();return".".concat(e)},N=function(){var e=f(h().m(function e(n,t){var r;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,blueConicClient.profile.getProfile();case 1:(r=e.v).setValue(n,t),blueConicClient.profile.updateProfile(r);case 2:return e.a(2)}},e)}));return function(n,t){return e.apply(this,arguments)}}(),P=function(){"A"===window.engageLibrary.getABVariant()&&N("test_7_day_trial",!1),"B"===window.engageLibrary.getABVariant()&&N("test_7_day_trial",!0)};function E(){try{var e,n,t;return null!==(e=null===(n=window.Connext)||void 0===n?void 0:null===(t=n.Storage)||void 0===t?void 0:t.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(";"),n=window.location.hostname;n=n.replace("www.","").replace("preprod.","").replace("develop.","").replace("staging.","");var t=0;for(t=0;t0&&document.querySelector("main article").hasClass("tag-all-readers")},window.engageLibrary.isOpinionPiece=function(){return m("Opinion")},window.engageLibrary.isEspanolContent=function(){return m("espanol")||"Espanol"===window.engageLibrary.getSection()},window.engageLibrary.isPhotosAndVideos=function(){return m("photos and videos")},window.engageLibrary.isAthleteOfWeek=function(){return m("athlete of the week")},window.engageLibrary.isContests=function(){return m("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 y(["twincities.com"])},window.engageLibrary.pmpUrlCheck=function(){return y(["greeleytribune.com","dailycamera.com","timescall.com","reporterherald.com"])},window.engageLibrary.paywallTimer=function(){var e=Date.now(),n=0;"undefined"!=typeof MNG_SSO_TOOLS_GLOBAL_START_TIME&&(n=e-MNG_SSO_TOOLS_GLOBAL_START_TIME),window.dataLayer.push({"Timer.PaywallShown":n}),performance.mark("connext_onPaywallShown")},window.engageLibrary.inlineNewsletter=function(){r.log("inlineNewsletter start");var e=jQuery(".Mg2-newsletter-inline_notif_mng .connext-email-input"),n=jQuery(".Mg2-newsletter-inline_notif_mng .connext-error-message"),t=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){S(r,e,n,i,t,o,a)}),jQuery(document.body).on("input",".Mg2-newsletter-inline_notif_mng .connext-email-input",function(e){I({valid:!0})}),r.log("inlineNewsletter end")},window.engageLibrary.inlineRegwall1=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];window.engageLibrary.paywallTimer();var t=jQuery("#registration__form .connext-email-input"),r=jQuery("#registration__form .connext-error-message"),o=jQuery("#registrationWall1 .hide-on-success"),i=jQuery("#registrationWall1 .show-on-success"),a=jQuery("#registrationWall1 .registrationWallID").text(),s=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){S(c,t,r,a,o,i,s,e,n)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(e){I({valid:!0},r,t)})},window.engageLibrary.inlineRegwall=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];window.engageLibrary.paywallTimer();var t=jQuery("#registration__form .connext-email-input"),r=jQuery("#registration__form .connext-error-message"),o=jQuery("#registrationWall .hide-on-success"),i=jQuery("#registrationWall .show-on-success"),a=jQuery("#registrationWall .registrationWallID").text(),s=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){S(c,t,r,a,o,i,s,e,n)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(e){I({valid:!0},r,t)})},window.engageLibrary.regilite=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=jQuery(".regiwall-input"),r=jQuery(".connext-error-message");jQuery(document.body).on("click","#regiliteSubButtonId",function(t){S(t,jQuery(".regiwall-input"),jQuery(".connext-error-message"),jQuery(".registrationWallID").text(),jQuery(".hide-on-success"),jQuery(".show-on-success"),!1,e,n)}),jQuery(document.body).on("input",".regiwall-input",function(e){I({valid:!0},r,t)})},window.engageLibrary.loginLogoutButtons=function(){var e=document.querySelectorAll(".engageLogoutLink"),n=document.querySelectorAll(".engageLoginLink");window.engageLibrary.userIsAuthenticated()?(e.forEach(function(e){var n=e;n.style.visibility="visible",n.style.display="block",n.addEventListener("click",t),n.addEventListener("keydown",t)}),n.forEach(function(e){e.style.display="none"})):(n.forEach(function(e){var n=e;n.style.visibility="visible",n.style.display="block";var t=n.querySelector("a");if(t&&t.length>0){n.querySelector("a").textContent="Log in";var r=new URL(n.querySelector("a").href),o=new URLSearchParams(r);o.append("returnUrl",s()),n.querySelector("a").setAttribute("href","".concat(r,"?").concat(o))}}),e.forEach(function(e){e.style.display="none"}));var t=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']"),n=jQuery("[data-nxt-template-substep= 'Expanded']"),t=jQuery(".collapse-button"),r=jQuery(".expand-button");t.on("click",function(){n.hide(),e.show()}),r.on("click",function(){n.show(),e.hide()})})},window.engageLibrary.hybridHardwall=function(){window.engageLibrary.paywallTimer();var e=jQuery("#registration__form .connext-email-input"),n=jQuery("#registration__form .connext-error-message"),t=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){S(a,e,n,o,t,r,i)}),jQuery(document.body).on("input","#registration__form .connext-email-input",function(t){I({valid:!0},n,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=v(),n=E(),t=n?n.Name:null;console.log("Sophi isSophiVariantOrHoldout",e);var r={event:"sophi_cookie",sophi_type:"isSophiVariantOrHoldout",sophi_cookie_val:e};return t&&(r.sophi_conv=t),window.dataLayer.push(r),!!e&&(e.includes("variant")||e.includes("holdout"))},window.engageLibrary.isSophiVariant=function(){var e=v(),n=E(),t=n?n.Name:null;console.log("Sophi isSophiVariant",e);var r={event:"sophi_cookie",sophi_type:"isSophiVariant",sophi_cookie_val:e};return t&&(r.sophi_conv=t),window.dataLayer.push(r),!!e&&e.includes("variant")},window.engageLibrary.shouldLoadPaywall=function(){var e=E(),n=e?e.Name:null,t=k(),r=!1;"wallType"in t&&(r="paywall"===t.wallType);var o={event:"sophi_decision",sophi_type:"shouldLoadPaywall",sophi_response:r};return n&&(o.sophi_conv=n),window.dataLayer.push(o),console.log("Sophi shouldLoadPaywall",r),r},window.engageLibrary.shouldLoadRegwall=function(){var e=E(),n=e?e.Name:null,t=k(),r=!1;"wallType"in t&&(r="regwall"===t.wallType);var o={event:"sophi_decision",sophi_type:"shouldLoadRegwall",sophi_response:r};return n&&(o.sophi_conv=n),window.dataLayer.push(o),console.log("Sophi shouldLoadRegwall",r),r},window.engageLibrary.responseIsNowall=function(){var e=E(),n=e?e.Name:null,t=k(),r=!1;"wallVisibility"in t&&(r="never"===t.wallVisibility);var o={event:"sophi_decision",sophi_type:"responseIsNowall",sophi_response:r};return n&&(o.sophi_conv=n),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=f(h().m(function n(){var t,i,a,s,c,l,d,m,y,p,b,v,L,S,A,I,_,k;return h().w(function(n){for(;;)switch(n.n){case 0:return v=function(){a({valid:!0})},c=function(e){a({valid:!1,message:e})},t=function(){return document.getElementById("tribRegiwallEmailId")||document.getElementById("regiwallEmailId")},i=function(e,n){var t=document.querySelector(".connext-error-message");n?(r.log("Regwall Validate: ","show message: ".concat(e)),t.innerHTML=e,t.style.display="block"):(t.textContent="",t.style.display="none")},a=function(e){e.valid?(i("",!1),t().classList.remove("connext-validation-error")):(r.log("Regwall Validate: ","update message"),i(e.message,!0),t().classList.add("connext-validation-error"))},s=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 n=t();(window._matherq=window._matherq||[]).push(["paywallEvent",{type:"regwall",category:"regwall_registration",action:"completed"},{email:n.value}]),n.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")},l=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}},d=function(n){try{"string"==typeof n&&M(e,n,{domain:O(),path:"/",expires:365,secure:!0})}catch(e){r.log("Failed to set auth0_sub cookie: ",e)}},m=function(n){if(!C(e))try{var t=n.claims;if(null==t||"object"!==g(t)&&!Object.keys(t).includes("sub"))return;var o=t.sub;d(o)}catch(e){r.log("Failed to set auth0_sub: ",e)}},y=function(e,n){return new Promise(function(t){try{"undefined"==typeof CnnXt&&(r.log("Connext was not loaded."),t(!1)),r.log("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(n," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:n,onSuccess:function(){r.log("Signed user up to newsletter: ",n),t(!0)},onError:function(e){r.log("subscribeToNewsletter error: ",e),t(!1)}})}catch(e){r.log("subscribeToNewsletter Error:",e),t(!1)}})},p=function(){var e=f(h().m(function e(){var n,o,i,a,s,c,d;return h().w(function(e){for(;;)switch(e.n){case 0:if((n=document.getElementById("tribRegiwallSubButtonId")||document.getElementById("regiwallSubButtonId")).textContent="Validating...",o=t().value,i=window.simpleEmailValidation(o),a=l(),!i.valid){e.n=3;break}if((s=u({email:o},a)).auth0ClientId){e.n=1;break}return e.a(2,{valid:!0,message:"",exist:!1});case 1:return c="".concat(window.authentication_config.entitlementsEndpoint,"auth0/getDefaultUserConnection"),e.n=2,fetch(c,{method:"POST",body:JSON.stringify(s),headers:{"X-API-Key":window.authentication_config.entitlementsAPIKey}}).then(function(e){return e.json()}).then(function(e){return"object"===g(e)&&e.uuid?{valid:!0,message:"",exist:!0}:"object"===g(e)&&e.newUserCreated?(n.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),n.textContent="Continue",{valid:!1,message:"Email validation network error, try again.",exist:null}});case 2:return d=e.v,e.a(2,d);case 3:return e.a(2,{valid:!1,message:"This email is blocked, try another.",exist:null})}},e)}));return function(){return e.apply(this,arguments)}}(),b=function(){var e=f(h().m(function e(n){var t,u,d;return h().w(function(e){for(;;)switch(e.n){case 0:return r.log("Regwall Validate: ","starting subscribe function"),n.preventDefault(),t=document.querySelector(".registrationWallID").textContent,e.n=1,p();case 1:if(!1===(u=e.v).valid&&((document.getElementById("tribRegiwallSubButtonId")||document.getElementById("regiwallSubButtonId")).textContent="Continue"),a(u),!(u.valid&&t.length>0&&!1===u.exist)){e.n=3;break}return r.log("Regwall Validate: ","validation good, success message"),e.n=2,y(u.email,t);case 2:e.v?(r.log("Regwall Validate: ","newsletter subscription was successful."),l().sendEmail&&(window.localStorage.setItem(o,"false"),(d={claims:{}}).claims.sub=u.uuid,m(d),r.log("Regwall Validate: ","Set the ".concat(o," storage object."))),s(!0)):(r.log("Regwall Validate: ","newsletter subscription was a FAIL."),c("Newsletter subscription failed.")),e.n=4;break;case 3:u.valid&&t.length>0&&!0===u.exist?(r.log("Regwall Validate: ","validation failed, email already exists"),s(!1),i("Email already exists, try again.",!0)):0===t.length&&(r.log("Regwall Validate: ","validation failed, no newsletter code"),i("Newsletter field is empty",!0));case 4:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),L=window.engageLibrary.getPageType(),r.log("Regwall Validate: ","Page type is ",L),n.n=1,MNGAuthentication.getUserInfo();case 1:if(S=n.v,r.log("Regwall Validate: ","userInfo has: ",S),"article"===L&&!S.authenticated){n.n=2;break}return r.log("Regwall Validate: ","Returning, since page type was not article or user was logged in"),n.a(2);case 2:r.log("Regwall Validate: ","Starting regwall validation code, adding listeners."),(A=document.getElementById("tribRegiwallSubButtonId"))&&A.addEventListener("click",b),(I=document.getElementsByClassName("connext-trib-email-input")).length>0&&I[0].addEventListener("input",v),(_=document.getElementById("regiwallSubButtonId"))&&_.addEventListener("click",b),(k=document.getElementsByClassName("connext-email-input")).length>0&&k[0].addEventListener("input",v),document.addEventListener("keyup",function(e){"Enter"!==e.code||"tribRegiwallEmailId"!==document.activeElement.id&&"regiwallEmailId"!==document.activeElement.id||b(e)});case 3:return n.a(2)}},n)})),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:""},s=function(){var n=f(h().m(function n(){var t,a,s,u,d;return h().w(function(n){for(;;)switch(n.p=n.n){case 0:if(t=window.engageLibrary.userIsAuthenticated(),console.log("Comp Sub conversation | user found ",t),$("#solicit-header").text("Get a complimentary trial subscription to ".concat(o)),!t){n.n=5;break}return n.p=1,a=c(window.MNGAuthentication.authenticationReady.idToken),s=a.email,u=a.auth0Id,n.n=2,m(u);case 2:e=n.v,r.log("Comp Sub conversation | getting email, user details from services ",s,e),i=s,n.n=4;break;case 3:n.p=3,d=n.v,console.log("error in setup ",d);case 4:n.n=6;break;case 5:g("We are unable to provide this email address with this offer.");case 6:document.querySelector("#email-address").placeholder=i,document.querySelector("#compSignupButton").removeAttribute("disabled"),l();case 7:return n.a(2)}},n,null,[[1,3]])}));return function(){return n.apply(this,arguments)}}(),l=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",u)}),document.querySelector("#compSignupButton").addEventListener("click",d),document.querySelector("#closeModalAfterSuccess").addEventListener("click",function(){var e=f(h().m(function e(n){var t,r,o,i;return h().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!(t=localStorage.getItem("__MNG_Session"))){e.n=4;break}return e.p=1,o=JSON.parse(t),r=o.entitlementToken,e.n=2,y(r);case 2:window.location.replace(window.location.origin+window.location.pathname),e.n=4;break;case 3:e.p=3,i=e.v,console.error("Failed to parse __MNG_Session:",i),window.location.replace("/");case 4:return e.a(2)}},e,null,[[1,3]])}));return function(n){return e.apply(this,arguments)}}())},u=function(e){"zip-code"==e.target.id&&($("#zipError1").hide(),$(e.target).closest("div").css("border","1px solid #CCC"))},d=function(){var n=f(h().m(function n(t){var o,s,c,l,u,d,w,m,y,f,p,b,L;return h().w(function(n){for(;;)switch(n.p=n.n){case 0:if(o=$("#zip-code").val(),s=v(o),r.log("Comp Sub conversation | begin submit"),!s){n.n=5;break}return n.p=1,(l=new Date).setDate(l.getDate()+1),(u=new Date(l)).setDate(l.getDate()+180),(d=document.querySelector("#compSignupButton")).setAttribute("disabled",!0),d.textContent="Creating subscription",r.log("Comp Sub conversation | fields valid",s),w=window.engageLibrary.getDataLayerEntry("Publisher Domain"),(m=document.createElement("div")).classList.add("spring-spinner"),m.id="compSubSpinner",m.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
',d.appendChild(m),a.domain=w,a.email=i,a.zipCode=o,e&&null!==(c=e)&&void 0!==c&&c.fullName.includes(" ")?(y=e.fullName.split(" ")[0],f=e.fullName.split(" ")[1],a.firstName=y||"unknown",a.lastName=f||"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),n.n=2,fetch("".concat(window.authentication_config.entitlementsEndpoint,"comp/create"),{method:"POST",headers:{"X-Api-Key":window.authentication_config.entitlementsAPIKey},body:JSON.stringify(a)});case 2:return p=n.v,n.n=3,p.json();case 3:return b=n.v,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:[b.Result.SubscriptionId],sub_type:"comp",sub_start:[l.toISOString()],sub_end:[u.toISOString()]})):(r.log("Comp Sub conversation | fail - this is the body ",b),g("The provided email address does not qualify for a complimentary subscription at this time.")),n.a(2);case 4:n.p=4,L=n.v,r.log("Comp Sub conversation | fetch error ",L),g("We are unable to provide this email address with this offer.");case 5:s||($("#zip-code").closest("div").css("border","1px solid #F00"),$("#zipError1").show());case 6:return n.a(2)}},n,null,[[1,4]])}));return function(e){return n.apply(this,arguments)}}(),g=function(e){document.querySelector("#compSubFormBody").classList.add("hidden"),document.querySelector("#subAlreadyExistsBody").classList.remove("hidden"),document.querySelector("#error-message").textContent=e},w=function(e){var n=$("#zip-code").val(),t=v(n);"zip-code"===$(e.target).prop("id")&&(t||($(e.target).closest("div").css("border","1px solid #F00"),$("#zipError1").show()))},m=function(){var e=f(h().m(function e(n){var t,o,i;return h().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("".concat(window.authentication_config.entitlementsEndpoint,"auth0/users/").concat(n),{method:"GET",headers:{"X-Api-Key":window.authentication_config.entitlementsAPIKey}});case 1:return t=e.v,e.n=2,t.json();case 2:return o=e.v,r.log("Comp sub conversation | logged in user details ",o),e.a(2,o);case 3:e.p=3,i=e.v,console.log("Comp sub conversation | ",i),g("We are unable to provide this email address with this offer.");case 4:return e.a(2)}},e,null,[[0,3]])}));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=f(h().m(function e(n){var t,o,i,a;return h().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,r.log("Entitlements: refresh JWT start..."),n){e.n=1;break}return e.a(2,new Error("No token to refresh"));case 1:return r.log("Entitlements refresh: entitlement token: ",n),t={jwt:n},e.n=2,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(t)});case 2:return o=e.v,e.n=3,o.json();case 3:return i=e.v,e.n=4,p(i.jwt);case 4:e.n=6;break;case 5:e.p=5,a=e.v,console.log("error reseting token ",a);case 6:return e.a(2)}},e,null,[[0,5]])}));return function(n){return e.apply(this,arguments)}}(),p=function(){var e=f(h().m(function e(n){var o;return h().w(function(e){for(;;)switch(e.n){case 0:try{b(n),r.log("About to decode token before saving: ",n),o=c(n),window.localStorage.setItem(t,JSON.stringify({entitlementToken:n,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:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),b=function(e){M(n,e,{path:"/",domain:O(),expires:365,secure:!0})},v=function(e){return/^\d{5}(-\d{4})?$/.test(e)};s()};var x=function(e,n){return new Promise(function(t){try{"undefined"==typeof CnnXt&&(r.log("Connext was not loaded."),t(!1)),r.log("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(n," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:n,onSuccess:function(){r.log("Signed user up to newsletter: ",n),L(n),localStorage.setItem("regwallSuccess","yes"),t(!0)},onError:function(e){r.log("subscribeToNewsletter error: ",e),t(!1)}})}catch(e){r.log("subscribeToNewsletter Error:",e),t(!1)}})};window.engageLibrary.sspwSuscribeToNewsletter=function(){var e=f(h().m(function e(n,t){var o;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,x(n,t);case 1:return(o=e.v)?r.log("Subscribed to newsletter successfully"):r.log("Failed to subscribe to newsletter"),e.a(2,o)}},e)}));return function(n,t){return e.apply(this,arguments)}}(),window.engageLibrary.getEngageVsSophiCookieValue=function(){return C("engage_vs_sophi_sspw")}},A=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 I(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var c=r&&r.prototype instanceof s?r:s,l=Object.create(c.prototype);return _(l,"_invoke",function(t,r,o){var i,s,c,l=0,u=o||[],d=!1,g={p:0,n:0,v:e,a:w,f:w.bind(e,4),d:function(n,t){return i=n,s=0,c=e,g.n=t,a}};function w(t,r){for(s=t,c=r,n=0;!d&&l&&!o&&n3?(o=h===r)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=w&&((o=t<2&&wr||r>h)&&(i[4]=t,i[5]=r,g.n=h,s=0))}if(o||t>1)return a;throw d=!0,r}return function(o,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&w(u,h),s=u,c=h;(n=s<2?e:c)||!d;){i||(s?s<3?(s>1&&(g.n=-1),w(s,c)):g.n=c:g.v=c);try{if(l=2,i){if(s||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,s<2&&(s=0)}else 1===s&&(n=i.return)&&n.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((n=(d=g.n<0)?c:t.call(r,g))!==a)break}catch(n){i=e,s=1,c=n}finally{l=1}}return{value:n,done:d}}}(t,o,i),!0),l}var a={};function s(){}function c(){}function l(){}n=Object.getPrototypeOf;var u=[][r]?n(n([][r]())):(_(n={},r,function(){return this}),n),d=l.prototype=s.prototype=Object.create(u);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,_(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,_(d,"constructor",l),_(l,"constructor",c),c.displayName="GeneratorFunction",_(l,o,"GeneratorFunction"),_(d),_(d,o,"Generator"),_(d,r,function(){return this}),_(d,"toString",function(){return"[object Generator]"}),(I=function(){return{w:i,m:g}})()}function _(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(_=function(e,n,t,r){function i(n,t){_(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(i("next",0),i("throw",1),i("return",2))})(e,n,t,r)}function k(e,n,t,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void t(e)}s.done?n(c):Promise.resolve(c).then(r,o)}(function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){k(i,r,o,a,s,"next",e)}function s(e){k(i,r,o,a,s,"throw",e)}a(void 0)})}}(I().m(function e(){return I().w(function(e){for(;;)switch(e.n){case 0:S(),A(),console.log("Engage Library loaded: ".concat((new Date).getTime()));case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}})()()}]); //# sourceMappingURL=engageLibrary.min.js.map; (()=>{"use strict";var n,i,t,o,a;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.enableDashboardCancel,!!window.authentication_config&&window.authentication_config.enableDashboardBenefitHub,"1"===(null===(n=window.authentication_config)||void 0===n?void 0:n.articleSharingEnabled)&&(null===(i=window.authentication_config)||void 0===i||i.isEngageArticleSharing),"1"===(null===(t=window.authentication_config)||void 0===t?void 0:t.articleSharingEnabled)&&(null===(o=window.authentication_config)||void 0===o||o.isEngageArticleSharing),null===(a=window.authentication_config)||void 0===a||a.articleSavingEnabled,window.authentication_config&&window.authentication_config.prosperstackClientid,!!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 */ (()=>{var t={579(t,n,e){var o=e(3738).default;t.exports=function(t){if(null!=t){var n=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],e=0;if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}}}throw new TypeError(o(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},887(t,n,e){var o=e(6993),i=e(1791);t.exports=function(t,n,e,r,a){return new i(o().w(t,n,e,r),a||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},1791(t,n,e){var o=e(5172),i=e(5546);t.exports=function t(n,e){function r(t,i,a,u){try{var c=n[t](i),s=c.value;return s instanceof o?e.resolve(s.v).then(function(t){r("next",t,a,u)},function(t){r("throw",t,a,u)}):e.resolve(s).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,u)})}catch(t){u(t)}}var a;this.next||(i(t.prototype),i(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(t,n,o){function i(){return new e(function(n,e){r(t,o,n,e)})}return a=a?a.then(i,i):i()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},3612(t,n,e){"use strict";var o,i,r,a,u;e.d(n,{A:()=>c}),window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const c={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,enableDashboardCancel:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardCancel,enableDashboardBenefitHub:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardBenefitHub,enableEngageArticleGifting:"1"===(null===(o=window.authentication_config)||void 0===o?void 0:o.articleSharingEnabled)&&"1"===(null===(i=window.authentication_config)||void 0===i?void 0:i.isEngageArticleSharing),enableGiftedArticlesLink:"1"===(null===(r=window.authentication_config)||void 0===r?void 0:r.articleSharingEnabled)&&"1"!==(null===(a=window.authentication_config)||void 0===a?void 0:a.isEngageArticleSharing),enableSavedArticlesLink:"1"===(null===(u=window.authentication_config)||void 0===u?void 0:u.articleSavingEnabled),prosperstackClientid:window.authentication_config?window.authentication_config.prosperstackClientid:"",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}},3738(t){function n(e){return t.exports=n="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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},4373(t){t.exports=function(t){var n=Object(t),e=[];for(var o in n)e.unshift(o);return function t(){for(;e.length;)if((o=e.pop())in n)return t.value=o,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},4633(t,n,e){var o=e(5172),i=e(6993),r=e(5869),a=e(887),u=e(1791),c=e(4373),s=e(579);function l(){"use strict";var n=i(),e=n.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function d(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===f||"GeneratorFunction"===(n.displayName||n.name))}var p={throw:1,return:2,break:3,continue:3};function h(t){var n,e;return function(o){n||(n={stop:function(){return e(o.a,2)},catch:function(){return o.v},abrupt:function(t,n){return e(o.a,p[t],n)},delegateYield:function(t,i,r){return n.resultName=i,e(o.d,s(t),r)},finish:function(t){return e(o.f,t)}},e=function(t,e,i){o.p=n.prev,o.n=n.next;try{return t(e,i)}finally{n.next=o.n}}),n.resultName&&(n[n.resultName]=o.v,n.resultName=void 0),n.sent=o.v,n.next=o.n;try{return t.call(this,n)}finally{o.p=n.prev,o.n=n.next}}}return(t.exports=l=function(){return{wrap:function(t,e,o,i){return n.w(h(t),e,o,i&&i.reverse())},isGeneratorFunction:d,mark:n.m,awrap:function(t,n){return new o(t,n)},AsyncIterator:u,async:function(t,n,e,o,i){return(d(n)?a:r)(h(t),n,e,o,i)},keys:c,values:s}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},4756(t,n,e){var o=e(4633)();t.exports=o;try{regeneratorRuntime=o}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},5172(t){t.exports=function(t,n){this.v=t,this.k=n},t.exports.__esModule=!0,t.exports.default=t.exports},5546(t){function n(e,o,i,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}t.exports=n=function(t,e,o,i){function r(e,o){n(t,e,function(t){return this._invoke(e,o,t)})}e?a?a(t,e,{value:o,enumerable:!i,configurable:!i,writable:!i}):t[e]=o:(r("next",0),r("throw",1),r("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,o,i,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},5869(t,n,e){var o=e(887);t.exports=function(t,n,e,i,r){var a=o(t,n,e,i,r);return a.next().then(function(t){return t.done?t.value:a.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},6993(t,n,e){var o=e(5546);function i(){var n,e,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",u=r.toStringTag||"@@toStringTag";function c(t,i,r,a){var u=i&&i.prototype instanceof l?i:l,c=Object.create(u.prototype);return o(c,"_invoke",function(t,o,i){var r,a,u,c=0,l=i||[],f=!1,d={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(t,e){return r=t,a=0,u=n,d.n=e,s}};function p(t,o){for(a=t,u=o,e=0;!f&&c&&!i&&e3?(i=h===o)&&(u=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=n):r[0]<=p&&((i=t<2&&po||o>h)&&(r[4]=t,r[5]=o,d.n=h,a=0))}if(i||t>1)return s;throw f=!0,o}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),a=l,u=h;(e=a<2?n:u)||!f;){r||(a?a<3?(a>1&&(d.n=-1),p(a,u)):d.n=u:d.v=u);try{if(c=2,r){if(a||(i="next"),e=r[i]){if(!(e=e.call(r,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,a<2&&(a=0)}else 1===a&&(e=r.return)&&e.call(r),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);r=n}else if((e=(f=d.n<0)?u:t.call(o,d))!==s)break}catch(t){r=n,a=1,u=t}finally{c=1}}return{value:e,done:f}}}(t,r,a),!0),c}var s={};function l(){}function f(){}function d(){}e=Object.getPrototypeOf;var p=[][a]?e(e([][a]())):(o(e={},a,function(){return this}),e),h=d.prototype=l.prototype=Object.create(p);function w(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,u,"GeneratorFunction")),t.prototype=Object.create(h),t}return f.prototype=d,o(h,"constructor",d),o(d,"constructor",f),f.displayName="GeneratorFunction",o(d,u,"GeneratorFunction"),o(h),o(h,u,"Generator"),o(h,a,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:c,m:w}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}},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}e.d=(t,n)=>{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),(()=>{"use strict";function t(t,n,e,o,i,r,a){try{var u=t[r](a),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(o,i)}function n(n){return function(){var e=this,o=arguments;return new Promise(function(i,r){var a=n.apply(e,o);function u(n){t(a,i,r,u,c,"next",n)}function c(n){t(a,i,r,u,c,"throw",n)}u(void 0)})}}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){var n=function(t,n){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==o(n)?n:n+""}function r(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"onInit",o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.backupTimeoutLength;return o&&!this.runningSophi&&(i=t.defaultTimeoutLength),this.readyInstance&&!1!==this.promiseStatus?s("connextReady promise already exists, status is ".concat(this.promiseStatus,".")):(this.connextTimeout&&this.clearTimeouts(),s("Creating new connext ready promise with timeout of ".concat(i,".")),this.readyInstance=new Promise(function(r){var a=!1;n.promiseStatus="pending";var u=function(t){a||(n.promiseStatus=t,r(t),a=!0)};if("undefined"!=typeof Connext)return s("Connext already ready."),"string"==typeof e&&n.removeEventListener(e),void u(!0);if(!o){var c=1;n.subCheckInterval=setInterval(function(){if("undefined"!=typeof Connext)return s("Sub timeout check -- Connext loaded..."),n.clearTimeouts(),void u(!0);s("Sub timeout check, connext not loaded yet, interval ".concat(c,"...")),c+=1},t.subTimeoutInterval)}n.connextTimeout=setTimeout(function(){if("string"==typeof e&&n.removeEventListener(e),"undefined"!=typeof Connext)return s("Connext actually did load..."),void u(!0);s("Connext did not load in time. Resolving false..."),n.clearTimeouts(),u(!1)},i),s("Listening for Connext Ready event...");var l=function(){s("Connext loaded!"),n.clearTimeouts(),"string"==typeof e&&n.removeEventListener(e),u(!0)};document.addEventListener("string"==typeof e?e:"onFinish",l),"string"==typeof e&&(n.eventListeners[e]=l),s("Connext added event listener for ".concat(e))})),this.readyInstance}},{key:"runConnext",value:function(){s("Running Connext now..."),Connext.Run(),this.connextAlreadyRan=!0,this.runConnextIfSilentTimer&&clearTimeout(this.runConnextIfSilentTimer)}},{key:"clearTimeouts",value:function(){clearTimeout(this.connextTimeout),this.subCheckInterval&&clearInterval(this.subCheckInterval),this.connextTimeout=null,this.subCheckInterval=null}},{key:"rerunConnextEntitlements",value:(l=n(u.mark(function t(){var n,e,o=arguments;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]&&o[0],e=!(o.length>1&&void 0!==o[1])||o[1],t.next=1,this.connextReady("onInit",e);case 1:if(t.sent){t.next=2;break}return t.abrupt("return");case 2:if(Connext&&!this.connextAlreadyRan){t.next=3;break}return t.abrupt("return");case 3:n&&Connext.GetOptions().Silentmode?this.runConnext():n?s("Not rerunning Connext"):this.runConnext();case 4:case"end":return t.stop()}},t,this)})),function(){return l.apply(this,arguments)})},{key:"runConnextIfSilent",value:(c=n(u.mark(function t(){var n;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.connextReady();case 1:if(n=t.sent,!this.runningSophi&&!this.connextAlreadyRan){t.next=2;break}return t.abrupt("return");case 2:n&&Connext.GetOptions().Silentmode&&(s("Silent mode, running Connext now."),this.rerunConnextEntitlements());case 3:case"end":return t.stop()}},t,this)})),function(){return c.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,"."))}}],o&&r(e.prototype,o),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,o,i,c,l}();a(l,"defaultTimeoutLength",7e3),a(l,"backupTimeoutLength",1e5),a(l,"subTimeoutInterval",5e3),window.ConnextUtils=window.ConnextUtils||new l})()})(); //# sourceMappingURL=mng-digisubs.connextUtils.bundle.js.map;