',n.convoEl=n.convoWrapper.querySelector(".".concat(n.baseClass,"__placeholder")),e.parentNode.insertBefore(n.convoWrapper,e)}),(0,_defineProperty2.default)(this,"insertAd",function(){var e=document.createElement("div");e.classList.add("".concat(n.baseClass,"__ad")),e.setAttribute("data-openweb-ad",""),e.setAttribute("data-row",1),e.setAttribute("data-column",1);var t=document.querySelector(".layout-with-rail__rail");if(n.isMobileView||!t){var r=n.convoWrapper.querySelector(".".concat(n.baseClass,"__placeholder"));n.convoWrapper.insertBefore(e,r)}else t.appendChild(e)}),(0,_defineProperty2.default)(this,"init",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.SSOEnabled){e.next=3;break}return e.next=3,n.setupSSO();case 3:return document.addEventListener("spot-im-conversation-viewed",function(){var e;n.trackAnalytics({interaction:"module load",componentName:"commenting module",componentStellarId:(null===(e=n.el.dataset)||void 0===e?void 0:e.uri)||""})}),document.addEventListener("spot-im-show-more-comments-clicked",function(){n.trackAnalytics({interaction:"commenting:load more comments"})}),document.addEventListener("spot-im-current-user-sent-message-succeed",function(e){var t=e.detail.message_type;n.trackAnalytics({interaction:"commenting:message success:".concat("comment"===t?"post":"reply")})}),document.addEventListener("spot-im-user-up-vote-click",function(){n.trackAnalytics({interaction:"commenting:upvote comment"})}),document.addEventListener("spot-im-user-down-vote-click",function(){n.trackAnalytics({interaction:"commenting:downvote comment"})}),document.addEventListener("ow-open-custom-user-profile",function(){window.location.assign("/account/settings")}),n.openwebCommentCounter=new OpenwebCommentCounter({ssoEnabled:n.SSOEnabled,convoEl:n.convoEl,convoAboveOBR:n.convoAboveOBR,convoWrapper:n.convoWrapper,ctaTracking:n.trackAnalytics,isMobileView:n.isMobileView}),e.next=12,n.openwebCommentCounter.init();case 12:n.adEnabled&&subscribe(actions.ADS.SET_AD_VARIANT,function(e){e.adVariant===AD_VARIANTS.DEFAULT&&n.insertAd()});case 13:case"end":return e.stop()}},e)}))),(0,_defineProperty2.default)(this,"setupSSO",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var t,r,o,a;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.el.dataset,r=t.registerRedirect,o=t.loginRedirect,document.addEventListener("spot-im-signup-start",function(){window.location.assign("".concat(o||"/account/log-in/commenting","?redirect=").concat(window.location.pathname))}),document.addEventListener("spot-im-login-start",function(){window.location.assign("".concat(r||"/account/register/commenting","?redirect=").concat(window.location.pathname))}),document.addEventListener("spot-im-api-ready",function(){n.spotIM=window.SPOTIM}),!authClient.tokenWithAuthn()){e.next=15;break}if(document.addEventListener("spot-im-renew-sso",n.startOWSSO,!1),null===(a=window.SPOTIM)||void 0===a||!a.startSSO){e.next=11;break}return e.next=9,n.startOWSSO();case 9:e.next=12;break;case 11:document.addEventListener("spot-im-api-ready",n.startOWSSO,!1);case 12:document.addEventListener("spot-im-user-logout",function(){authClient.tokenWithAuthn()&&(dispatch(ACCOUNT_NAV.LOGOUT_SUCCESS),trackMetrics({type:"user-account",data:{action:"logout_success",component:"openweb-convo",method:"spotImEventListener_user-logged-out"}}))}),e.next=16;break;case 15:n.logoutOW();case 16:subscribe(ACCOUNT_NAV.LOGOUT_SUCCESS,function(){n.logoutOW()});case 17:case"end":return e.stop()}},e)}))),(0,_defineProperty2.default)(this,"startOWSSO",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var t,r;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t,r){var n,o;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,authClient.openwebSSO({codeA:t},authClient.getToken());case 3:n=e.sent,o=n.data,r(o.codeB),e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(0),log("error","Error starting OpenWeb SSO",e.t0),r(null,e.t0),e.abrupt("return");case 13:case"end":return e.stop()}},e,null,[[0,8]])}));return function(t,r){return e.apply(this,arguments)}}(),e.prev=1,e.next=4,null===(r=n.spotIM)||void 0===r?void 0:r.startSSO({callback:t,userId:authClient.getStoredUID()});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),log("error","Error starting OpenWeb SSO",e.t0);case 9:case"end":return e.stop()}},e,null,[[1,6]])}))),(0,_defineProperty2.default)(this,"logoutOW",function(){n.spotIM&&n.spotIM.logout?n.spotIM.logout():document.addEventListener("spot-im-api-ready",function(){n.spotIM.logout()},!1)}),(0,_defineProperty2.default)(this,"trackAnalytics",function(e){try{trackMetrics({type:"user-interaction",data:e})}catch(e){log("error","Could not track metrics",e)}}),this.el=t,this.baseClass="openweb-convo",this.SSOEnabled=EnvVars.get("ENABLE_OPENWEB_SSO"),this.adEnabled=EnvVars.get("ENABLE_OPENWEB_AD"),this.spotIM=window.SPOTIM,this.convoEl=t.querySelector(".".concat(this.baseClass,"__placeholder")),this.convoWrapper=t.querySelector(".".concat(this.baseClass,"__placeholder-wrapper")),this.convoPlacements={ABOVE_OBR:"above-obr",INLINE:"inline"},mediumMaxWidthListener(function(e){n.isMobileView=e});var o=EnvVars.get("OPENWEB_LAUNCHER_SRC"),a=EnvVars.get("OPENWEB_SSO_LAUNCHER_SRC"),i=null===(r=window.CNN)||void 0===r?void 0:r.contentModel,s=this.el.dataset,c=s.displayMessageCount,u=s.sortBy,l=s.openwebPlacement;this.convoAboveOBR=l===this.convoPlacements.ABOVE_OBR,this.convoAboveOBR&&this.insertConvoModule(),addScriptTag({src:this.SSOEnabled?a:o,async:!0,id:"openweb-launcher-script",data:{"spotim-module":"spotim-launcher","post-url":(null==i?void 0:i.canonicalUrl)||window.location.href,"article-tags":(null==i?void 0:i.pageTags)||"","post-id":(null==i?void 0:i.pageStellarId)||"","spotim-autorun":"false","display-message-count":c,"sort-by":u,"custom-section":null==i?void 0:i.section}},!0)});module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var r,n,o,a;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["iab","data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","measure-ads","product-develop"],o="true"===t.dataset.showModule||(null===(r=window.optimizelyTest)||void 0===r?void 0:r.showCommentModule),!(checkGeoCountry("US")&&window.WM.UserConsent.inUserConsentState(n)&&o)){e.next=6;break}return a=new OpenwebConvo(t),e.next=6,a.init();case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();
}).call(this)}).call(this,"/components/openweb-convo/client.js")}, {"5":5,"9":9,"10":10,"11":11,"12":12,"16":16,"17":17,"18":18,"24":24,"25":25,"29":29,"35":35,"44":44,"107":107,"253":253}];
window.modules["headline.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),rest=require(30);module.exports=function(e){var r=e.getAttribute("data-request-headline-data"),t=function(r,t){for(var a in e.classList.add("".concat(e.classList[0],"--updating")),r)if(t){var n=r[a],i=t[n.responseField],o=e.querySelector(n.selector);o&&(o.innerText=i)}};if(r)var a=JSON.parse(r),n=a.endpoint,i=a.elementsToUpdate,o=setInterval((0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var r;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,rest.get(n);case 3:(r=e.sent).length&&(t(i,r[0]),clearInterval(o)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error fetching profile data for headline: ".concat(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),5e3)};
}, {"10":10,"24":24,"25":25,"30":30}];
window.modules["article.client"] = [function(require,module,exports){"use strict";var _require=require(37),addScrollDepthAnalytics=_require.addScrollDepthAnalytics,EnvVars=require(5),_require2=require(39),initActivation=_require2.initActivation,_require3=require(38),isPaywallEnabled=_require3.isPaywallEnabled,paywallTypes=_require3.paywallTypes;function addAnalytics(e){addScrollDepthAnalytics(e,{"scroll-25":.25,"scroll-50":.5,"scroll-75":.75,"scroll-100":1},{event_type:"article_scroll",author:window.CNN.contentModel.author,cms_id:window.CNN.contentModel.cmsId,headline:window.CNN.contentModel.headline,source_id:window.CNN.contentModel.sourceId,subsection:window.CNN.contentModel.subsection,view_name:window.CNN.contentModel.canonicalUrl})}module.exports=function(e){var l=isPaywallEnabled(paywallTypes.METERED)&&"true"!==e.dataset.paywallDisabled,i=isPaywallEnabled(paywallTypes.EXCLUSIVE)&&"true"==e.dataset.subscriptionOnly;(EnvVars.get("REGWALL_FEATURE_ENABLED")&&"true"!==e.dataset.regwallDisabled||i||l)&&initActivation(e,l,i),document.addEventListener("init-wall-activation",function(l){var i,a,n,t,r=null===(i=null===(a=l.detail)||void 0===a?void 0:a.paywallEnabled)||void 0===i||i,o=null===(n=null===(t=l.detail)||void 0===t?void 0:t.isSubOnlyWall)||void 0===n||n;initActivation(e,r,o,!0)}),addAnalytics(e)};
}, {"5":5,"37":37,"38":38,"39":39}];
window.modules["user-account-reg-wall.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_createClass2=_interopRequireDefault(require(12)),_classCallCheck2=_interopRequireDefault(require(11)),_defineProperty2=_interopRequireDefault(require(18)),_require=require(44),authClient=_require.authClient,_require2=require(37),zionEventHandler=_require2.zionEventHandler,_require3=require(107),trackMetrics=_require3.trackMetrics,_require4=require(242),suppressToasts=_require4.suppressToasts,_require5=require(46),defaultManageWallVisibility=_require5.defaultManageWallVisibility,_require6=require(17),smallMaxWidthListener=_require6.smallMaxWidthListener,UserAccountRegWall=(0,_createClass2.default)(function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return function(){return defaultManageWallVisibility(e)()}};(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"init",function(){var e,t;n.userIsLoggedIn=authClient.tokenWithAuthn();var i=n.el.dataset,l=i.source,o=i.componentId,r=i.componentName,a=i.dismissible,s=i.componentStellarId,c=i.interactionBase,u=i.wallCount,d=i.wallMax;n.componentId=o,n.source=l,n.wallCount=null!=u?u:1,n.wallMax=null!=d?d:1,n.signUpBtn=n.el.querySelector("#regwall-cta-btn"),n.signInLink=n.el.querySelector("#regwall-cta-link"),n.tooltip=n.el.querySelector(".".concat(n.class,"__info")),n.componentName=r,n.componentStellarId=s,n.interactionBase=c,n.dismissible=a,n.wallCountAnalyticsValue=n.wallCount?":".concat(n.wallCount):"";var p=document.querySelector(n.class);p&&p.remove(),n.el.querySelector(".".concat(n.class,"__content")).addEventListener("click",function(e){var t=e.target,i=t===n.signInLink;if(i||t===n.signUpBtn){var l=i?"sign in":"sign up";trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.interactionBase,":").concat(l).concat(n.wallCountAnalyticsValue)}})}},!0),null===(e=n.tooltip)||void 0===e||e.addEventListener("mouseover",function(){trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.interactionBase,":what-is-this").concat(n.wallCountAnalyticsValue)}})}),a&&n.el.querySelectorAll(".".concat(n.class,"__dismiss, .").concat(n.class,"__overlay")).forEach(function(e){return e.addEventListener("click",function(){n.handleClose()})}),null===(t=n.manageWallVisibility)||void 0===t||t.call(n,n.showWall)()}),(0,_defineProperty2.default)(this,"triggerZionTracking",function(){zionEventHandler({component_id:n.componentId,component_type:"banner",traits:{source:n.source}},"ComponentOnScreen")}),(0,_defineProperty2.default)(this,"restrictView",function(){n.updateInitialOverflow(),document.documentElement.style.overflow="hidden",smallMaxWidthListener(function(e){e&&!n.dismissible&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.height="100vh")}),n.istyle=document.createElement("style"),n.istyle.type="text/css",n.istyle.id="cnnrwhideiframe",n.istyle.appendChild(document.createTextNode(".obp-rec { display: none !important; }")),document.head.appendChild(n.istyle)}),(0,_defineProperty2.default)(this,"showWall",function(){n.open||(suppressToasts(),n.handleOpen(),n.restrictView(),n.triggerZionTracking(),trackMetrics({type:"user-interaction",data:{interaction:"module load",componentStellarId:n.componentStellarId,componentViewCount:n.wallCount,componentName:n.componentName,componentType:n.componentType}}))}),(0,_defineProperty2.default)(this,"handleOpen",function(){n.el.classList.remove(n.hideClass),n.open=!0}),(0,_defineProperty2.default)(this,"handleClose",function(){var e;trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.componentType,":").concat(n.componentName,":dismiss").concat(n.wallCountAnalyticsValue)}}),n.el.classList.add(n.hideClass),n.open=!1,null===(e=document.getElementById(n.istyle.id))||void 0===e||e.remove(),document.documentElement.style.overflowX=n.initialOverflowX,document.documentElement.style.overflowY=n.initialOverflowY,smallMaxWidthListener(function(e){e&&!n.dismissible&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.height="unset")})}),(0,_defineProperty2.default)(this,"updateInitialOverflow",function(){n.initialOverflowX=document.documentElement.style.overflowX,n.initialOverflowY=document.documentElement.style.overflowY}),this.el=t,this.manageWallVisibility=i,this.class="user-account-reg-wall",this.componentType="regwall",this.hideClass="".concat(this.class,"--hide"),this.open=!1});module.exports=function(e,t){var n=new UserAccountRegWall(e,t);return n.init(),n};
}, {"10":10,"11":11,"12":12,"17":17,"18":18,"37":37,"44":44,"46":46,"107":107,"242":242}];
window.modules["ad-feedback.client"] = [function(require,module,exports){"use strict";var _require=require(7),AdFeedback=_require.AdFeedback,_require2=require(6),ENABLE_AD_FEEDBACK_DISPLAY_ADS=_require2.ENABLE_AD_FEEDBACK_DISPLAY_ADS,ENABLE_AD_FEEDBACK_VIDEO_ADS=_require2.ENABLE_AD_FEEDBACK_VIDEO_ADS,_require3=require(6),shouldHideAdFeedbackLink=_require3.shouldHideAdFeedbackLink;if((ENABLE_AD_FEEDBACK_DISPLAY_ADS||ENABLE_AD_FEEDBACK_VIDEO_ADS)&&!shouldHideAdFeedbackLink){var adFeedback=new AdFeedback;adFeedback.initialize()}
}, {"6":6,"7":7}];
window.modules["ad-slot-header.client"] = [function(require,module,exports){"use strict";var throttle=require(28),_require=require(17),mediumMaxWidthListener=_require.mediumMaxWidthListener,_require2=require(16),subscribe=_require2.subscribe,actions=_require2.actions,_require3=require(9),AD_VARIANTS=_require3.AD_VARIANTS;module.exports=function(e){subscribe(actions.ADS.SET_AD_VARIANT,function(t){if(t.adVariant===AD_VARIANTS.DEFAULT){var r,i=e.querySelector(".ad-slot"),n=e.querySelector(".adSlotHeaderContainer");if(!i)return;var a=function(){"mobile"===r&&(e.style.height="".concat(i.clientHeight,"px"),n.style.height="".concat(i.clientHeight,"px"))};document.addEventListener("GPTRenderComplete",function(e){var t=e.detail;t&&t.divId===(r&&i&&i.dataset["".concat(r,"SlotId")])&&a()}),function(){var e=document.createElement("iframe");e.className="resizeListenerIframe",e.src="about:blank",e.tabIndex=-1,e.frameBorder=0,e.setAttribute("aria-hidden",!0),i.appendChild(e);try{e.contentDocument.defaultView.addEventListener("resize",throttle(a,100))}catch(e){a()}}(),mediumMaxWidthListener(function(e){r=e?"mobile":"desktop",a()})}})};
}, {"9":9,"16":16,"17":17,"28":28}];
window.modules["header.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_slicedToArray2=_interopRequireDefault(require(36)),_toConsumableArray2=_interopRequireDefault(require(23)),_asyncToGenerator2=_interopRequireDefault(require(24)),HEADER_ICON_IDS=["headerMenuIcon","headerSearchIcon","headerCloseIcon"],MORE_DROPDOWN_LINK_ID="moreDropdown",_require=require(161),calculateNavLeftMaxWidth=_require.calculateNavLeftMaxWidth,isSubscriber=_require.isSubscriber,_require2=require(145),calculatePageStickyThreshold=_require2.calculatePageStickyThreshold,_get=require(1),_require3=require(29),checkGeoCountry=_require3.checkGeoCountry,getCookie=_require3.getCookie,_require4=require(107),trackMetrics=_require4.trackMetrics,_require5=require(97),setAdobeAnalyticsDataForCookie=_require5.setAdobeAnalyticsDataForCookie,EnvVars=require(5),initializeMenu=function(e){var r=e.classList;HEADER_ICON_IDS.map(function(e){return document.getElementById(e)}).filter(function(e){return e}).forEach(function(e){e.addEventListener("click",function(){r.toggle("header--active");var e=window.document.body;if(r.contains("header--active"))e.style.top="-".concat(window.scrollY,"px"),e.classList.toggle("menu-opened");else{e.classList.toggle("menu-opened");var t=e.style.top;e.style.top="",window.scrollTo(0,-1*parseInt(t||"0"))}})})};function fireTrackingMetrics(e){var r=e.interaction,t=e.type;trackMetrics({type:void 0===t?"user-interaction":t,data:{interaction:r}})}var moreDropdownLink,moreSection,moreCaret,hoverStartTime,updateSubscribeView=function(){var e=(0,_asyncToGenerator2.default)(function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _regenerator.default.mark(function t(){var n,o;return _regenerator.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=6;break}return t.next=3,isSubscriber();case 3:n=t.sent,e.style.display=n?"none":"block",r&&(o=e.closest(".header"),formatNavBar(o));case 6:case"end":return t.stop()}},t)})()});return function(r){return e.apply(this,arguments)}}(),initializeSubscribeButton=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){var t,n,o;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.querySelector(".header__subscribe-button"),n=checkGeoCountry("US"),o=getCookie(EnvVars.get("APP_VIEW_COOKIE")),!t||o||!n){e.next=11;break}return r.querySelector(".header__inner").classList.add("header__inner--subscription"),e.next=8,updateSubscribeView(t);case 8:t.addEventListener("click",function(e){var t="".concat(window.location.protocol,"//").concat(window.location.hostname,"/subscription");window.zion_analytics.track(new window.ZION_SDK.GenericLinkClick({href:t,type:e.target.tagName,customAttributes:{Component_id:r.dataset.uri,Component_text:e.target.innerText.trim(),Component_type:"button",Container_type:"navigation"}})),fireTrackingMetrics({interaction:"nav:subscribe"});var n=new URL(t);n.searchParams.append("source","sub_web_nav"),n.searchParams.append("redirect",window.location.href),window.location.href=n.href}),document.addEventListener("login",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,updateSubscribeView(t,!0);case 2:case"end":return e.stop()}},e)}))),document.addEventListener("logout",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,updateSubscribeView(t,!0);case 2:case"end":return e.stop()}},e)})));case 11:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}(),initializeAccordion=function(e){e.querySelectorAll(".header__nav-item-accordion").forEach(function(e){e.addEventListener("click",function(){var r;e.classList.toggle("header__nav-item-accordion--open"),null===(r=e.querySelector(".header__nav-item-dropdown"))||void 0===r||r.classList.toggle("header__nav-item-dropdown--open")})})},initializeEditionizers=function(e){var r=e.querySelectorAll(".header__editionizer"),t=e.querySelectorAll(".header__editionizer-button");(0,_toConsumableArray2.default)(t).forEach(function(e){return e.addEventListener("click",function(){e.setAttribute("aria-expanded","true"===e.getAttribute("aria-expanded")?"false":"true"),(0,_toConsumableArray2.default)(r).forEach(function(e){return e.classList.toggle("header__editionizer--active")})})})},formatNavBar=function(e){var r=e.querySelector(".header__right");if(e.getBoundingClientRect().width<960)r&&(r.style.visibility="visible");else if(!window.location.pathname.startsWith("/webview")){var t=function(e){return e.style.display="block"},n=function(e){return e.style.display="none"},o=function(){return e.querySelector(".header__left").getBoundingClientRect().width},i=function(e){d.querySelectorAll(".header__nav-item:nth-child(n+".concat(d.childElementCount-e,")")).forEach(n)},a=e.querySelector(".header__nav");a&&(a.style.visibility="hidden");var c=e.querySelector(".header__nav-more"),u=e.querySelector(".header__nav-more > .header__nav-item-dropdown"),d=e.querySelector(".header__left .header__nav-container");if(d){d.querySelectorAll(".header__nav-item").forEach(t),u.querySelectorAll(".header__nav-item-dropdown-item").forEach(n),n(c);for(var s=calculateNavLeftMaxWidth(e),l=o(),v=!1,_=1;l>s;)v=!0,i(_),l=o(),_++;v&&(t(c),(l=o())>s&&(i(_),l=o(),_++));var m=d.querySelector(".promotion-link")?0:1;u.querySelectorAll(".header__nav-item-dropdown-item:nth-child(n+".concat(d.childElementCount-_+m,")")).forEach(t),a&&(a.style.visibility="visible"),r&&(r.style.visibility="visible")}}},moreDropdownLinkZJSAttrs={},onMoreDropdownMouseEnter=function(){hoverStartTime=Date.now()},onMoreDropdownMouseLeave=function(){hoverStartTime&&(window.zion_analytics.track(new window.ZION_SDK.GenericHover({traits:{canonical_url:_get(window,"CNN.contentModel.canonicalUrl",null),component_id:moreDropdownLinkZJSAttrs.zjsComponent_id,cms_id:moreDropdownLinkZJSAttrs.zjsContainer_id,component_text:moreDropdownLinkZJSAttrs.zjsComponent_text,component_type:moreDropdownLinkZJSAttrs.zjsComponent_type,hover_time:Date.now()-hoverStartTime}})),hoverStartTime=0)},updateMoreDropdownHoverEvent=function(e){e?(moreDropdownLink.addEventListener("mouseenter",onMoreDropdownMouseEnter,!0),moreDropdownLink.addEventListener("mouseleave",onMoreDropdownMouseLeave,!0)):(moreDropdownLink.removeEventListener("mouseenter",onMoreDropdownMouseEnter,!0),moreDropdownLink.removeEventListener("mouseleave",onMoreDropdownMouseLeave,!0))},mediaQueryHoverNone=window.matchMedia("(any-hover: none)"),convertDatasetToAttributeName=function(e){return"data-".concat(e.split(/(?=[A-Z])/).join("-").toLowerCase())},updateMoreDropdownZJS=function(){var e=mediaQueryHoverNone.matches;if(updateMoreDropdownHoverEvent(!e),e)for(var r=0,t=Object.entries(moreDropdownLinkZJSAttrs);r
=u||c===t?(o.classList.remove("hide"),i.classList.remove("header__subnav-mount--scrolled")):(o.classList.add("hide"),i.classList.add("header__subnav-mount--scrolled"))})})}module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.addEventListener("click",setNavigationAdobeAnalytics),initializeMenu(r),e.next=4,initializeSubscribeButton(r);case 4:initializeEditionizers(r),initializeAccordion(r),initializeMoreDropdown(),calculatePageStickyThreshold(),formatNavBar(r),initializeNavBorderStyleUpdate(r),window.addEventListener("resize",function(){formatNavBar(r)});case 11:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}();
}, {"1":1,"5":5,"10":10,"23":23,"24":24,"25":25,"29":29,"36":36,"97":97,"107":107,"145":145,"161":161}];
window.modules["image.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_createClass2=_interopRequireDefault(require(12)),_classCallCheck2=_interopRequireDefault(require(11)),_inherits2=_interopRequireDefault(require(14)),_possibleConstructorReturn2=_interopRequireDefault(require(13)),_getPrototypeOf2=_interopRequireDefault(require(15));function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,i=(0,_getPrototypeOf2.default)(e);if(t){var l=(0,_getPrototypeOf2.default)(this).constructor;r=Reflect.construct(i,arguments,l)}else r=i.apply(this,arguments);return(0,_possibleConstructorReturn2.default)(this,r)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var _require=require(16),ClientModel=_require.ClientModel,initializeOnExec=_require.initializeOnExec,elementResizeObserver=require(68),Image=function(e){(0,_inherits2.default)(r,e);var t=_createSuper(r);function r(e){var i;return(0,_classCallCheck2.default)(this,r),i=t.call(this,e),elementResizeObserver.observe(e),i}return(0,_createClass2.default)(r)}(ClientModel);module.exports=initializeOnExec(Image);
}, {"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"68":68}];
window.modules["alerts.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_typeof2=_interopRequireDefault(require(19)),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12)),_get=require(1),rest=require(30),STORAGE_KEY="CLOSED_ALERTS",_require=require(16),dispatch=_require.dispatch,_require2=require(31),STICKY_HEADER=_require2.STICKY_HEADER,Alerts=function(){function e(t){var r=this;(0,_classCallCheck2.default)(this,e),_get(window,"kiln.locals",!0)&&(this.banner=t,this.check(),setInterval(function(){return r.check()},3e4))}return(0,_createClass2.default)(e,[{key:"check",value:function(){var e=this,t=this.storageGet();rest.get("/public/api/alerts").then(function(r){r.alerts.filter(function(e){return!t.includes(e.hash)}).forEach(function(t){e.add(t)}),e.banner.childNodes.length?e.showBanner():e.hideBanner(),dispatch(STICKY_HEADER.RECALCULATE)})}},{key:"alertExists",value:function(e){return!!this.banner.querySelector("#".concat(this.instance(e)))}},{key:"instance",value:function(e){return e.uri.split("/").pop().split("@").shift()}},{key:"add",value:function(e){this.alertExists(e)?e.hash!==this.banner.firstChild.getAttribute("data-alert-hash")&&this.banner.replaceChild(this.create(e),this.banner.firstChild):this.banner.appendChild(this.create(e))}},{key:"create",value:function(e){var t=this,r=function(e,t,r){var i=document.createElement("div");return i.className=e,"string"==typeof t&&(i.innerHTML=t),"object"===(0,_typeof2.default)(t)&&i.appendChild(t),r&&(i.id=r),i},i=r("alerts__close","",this.instance(e)),n=r("alerts__container",i);e.title&&n.appendChild(r("alerts__title",e.title)),n.appendChild(r("alerts__content",e.content));var a=r("alerts__item",n);return a.setAttribute("data-alert-hash",e.hash),i.addEventListener("click",function(r){var i=r.target;return t.close(i.id,e.hash)}),a}},{key:"showBanner",value:function(){this.banner.classList.add("alerts--visible")}},{key:"hideBanner",value:function(){this.banner.classList.remove("alerts--visible")}},{key:"close",value:function(e,t){for(var r=this.banner.querySelector("#".concat(e));"alerts__item"!==r.className;)r=r.parentNode;r.parentNode.removeChild(r),this.storageSet(t),dispatch(STICKY_HEADER.RECALCULATE)}},{key:"storageGet",value:function(){var e=window.sessionStorage.getItem(STORAGE_KEY);return e?e.split(",").filter(function(e){return null!=e&&""!=e}):[]}},{key:"storageSet",value:function(e){var t=this.storageGet().join(",");window.sessionStorage.setItem(STORAGE_KEY,t.concat(",",encodeURIComponent(e)))}}]),e}();module.exports=function(e){return new Alerts(e)};
}, {"1":1,"10":10,"11":11,"12":12,"16":16,"19":19,"30":30,"31":31}];
window.modules["ad-slot-client-injector.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_typeof2=_interopRequireDefault(require(19)),_toConsumableArray2=_interopRequireDefault(require(23)),_defineProperty2=_interopRequireDefault(require(18));function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;tu}).map(function(e){return e>u?e+1:e}),a++)};e.forEach(function(t,l){0===l&&(u(t,0),o=t);var s=e.find(function(e){return e>=o+r});s&&a=l&&bt+f.buffer-1;m&&y&&p.push(b)}s=p}}),q=s,O&&(S(s,r),o&&document.addEventListener("live-story.updated",function(){_(h)})),document.dispatchEvent(new CustomEvent("QuantumPlacementComplete",{detail:{openSlots:q}})))},_=function(e){var t=(null==p?void 0:p.adSlotIdPattern)||"";if("object"===(0,_typeof2.default)(e)&&!Array.isArray(e)&&t){var r=document.querySelectorAll('[data-ad-id^="'.concat(t,'"]'))||[];r.length&&r.forEach(function(e){var t,r;null===(t=window.AdFuel)||void 0===t||t.destroySlots([null===(r=e.dataset)||void 0===r?void 0:r.adId]),e.remove()}),g(e),O&&w().setupIntersectObserver()}};if(b(function(e){m=e?"mobile":"desktop"}),window.CNN.ads&&(window.CNN.ads.quantum={updateAdSlotPositions:_,toggleShowAdsOnDesktop:function(){y=!y,O=!0,w().init()},getOpenSlots:function(){return q}}),"mobile"!==m||"true"!==e.dataset.enabled)return!1;O=!0,w().init()};module.exports=function(e){subscribe(actions.ADS.SET_AD_VARIANT,function(t){t.adVariant===AD_VARIANTS.DEFAULT&&client(e)})};
}, {"9":9,"10":10,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23}];
window.modules["personalized-recirc.client"] = [function(require,module,exports){(function (__filename){(function (){
"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(257),getRelatedArticle=_require.getRelatedArticle,_require2=require(108),lineClamp=_require2.lineClamp,_require3=require(17),mediumMaxWidthListener=_require3.mediumMaxWidthListener,_require4=require(37),addComponentLoadedAnalytics=_require4.addComponentLoadedAnalytics,addZJSClickAttributes=_require4.addZJSClickAttributes,_require5=require(34),isArticle=_require5.isArticle,log=require(35).setup({file:__filename}),_require6=require(16),dispatch=_require6.dispatch,subscribe=_require6.subscribe,_require7=require(31),TOAST_POPUP=_require7.TOAST_POPUP;function initializePersonalizationRelated(e){return _initializePersonalizationRelated.apply(this,arguments)}function _initializePersonalizationRelated(){return(_initializePersonalizationRelated=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var r,i,n,a,c,o,l,u,s,d,_,p,m,q,f,b,v,A;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=mediumMaxWidthListener(null,{onlyOnce:!0}),isArticle(window.CNN.contentModel)&&r){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,c=null===(i=window.CNN.contentModel)||void 0===i?void 0:i.pageStellarId,e.next=8,getRelatedArticle(c,"stellar_id","pdx-personalized-recirc-toast");case 8:if(o=e.sent){e.next=13;break}return null==(l=document.querySelector(".toast-popup__container"))||l.remove(),e.abrupt("return");case 13:u=o.url,s=o.headline,d=t.dataset.uri,"recirculation toast",_=null===(n=window.CNN.contentModel)||void 0===n?void 0:n.canonicalUrl,p=null===(a=window.CNN.contentModel)||void 0===a?void 0:a.cmsId,m=t.querySelector(".personalied-recirc__headline"),q=t.querySelector(".personalized-recirc__image-container"),f=t.querySelector(".personalized-recirc__image"),"trending.article"===o.tenantId&&dispatch(TOAST_POPUP.UPDATE_TITLE,{title:"Trending",componentId:d}),m.innerHTML=s,lineClamp(m,3," ..."),m.setAttribute("href",u),addZJSClickAttributes(m,{href:u,click_action:"link click",component_type:"recirculation toast",component_id:d,component_text:s,canonical_url:_,cms_id:p}),q.classList.add(o.imageUrlWithCorrectAspectRatio?"personalized-recirc__default-image-scaling":""),q.setAttribute("href",u),addZJSClickAttributes(q,{href:u,click_action:"link click",component_type:"recirculation toast",component_id:d,component_text:s,canonical_url:_,cms_id:p}),b=o.imageUrlWithCorrectAspectRatio||o.thumbnail,v=b.indexOf("?c=original"),A=v>0?"".concat(b.slice(0,v),"?c=16x9&q=h_270,w_480,c_fill"):b,f.setAttribute("lazy",!0),f.setAttribute("src",A),subscribe(TOAST_POPUP.CREATED,function(e){var r=t.dataset.uri;if(r===e.childEl.dataset.uri){var i=e.el.querySelector(".toast-popup__close-icon");addZJSClickAttributes(i,{click_action:"close button",component_type:"recirculation toast",component_id:r,component_text:s,canonical_url:_,cms_id:p})}}),window.addEventListener("toast.popped",function(){addComponentLoadedAnalytics({componentType:"recirculation toast",componentId:d,traits:{canonical_url:_,cms_id:p,component_text:s}})}),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(4),log("error",e.t0.message,{stack:e.t0.stack});case 42:case"end":return e.stop()}},e,null,[[4,39]])}))).apply(this,arguments)}module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",initializePersonalizationRelated(t));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();
}).call(this)}).call(this,"/components/personalized-recirc/client.js")}, {"10":10,"16":16,"17":17,"24":24,"25":25,"31":31,"34":34,"35":35,"37":37,"108":108,"257":257}];
window.modules["subnav.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_slicedToArray2=_interopRequireDefault(require(36)),_asyncToGenerator2=_interopRequireDefault(require(24));module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){var t,a,n,i,o,u,l,s,c;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t={},a={zjsNavigationLocation:"header,footer"},n=0,i=Object.entries(a);n0?t.length:"",r=e.closest("[data-".concat(DATA_ATTRIBUTE_PREFIX,"-collection]"))||document.body,o=r===document.body?"body":r.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Collection")],i="";o===ZONE_COMPONENT_NAME&&(i=t.indexOf(r));var a=Array.from(r.querySelectorAll('[data-uri*="/_components/"]')),c=a.length;return{collection_type:o,collection_type_index:i,collection_type_length:n,collection_item_index:a.indexOf(e),collection_item_length:c}}function getWordCount(e){return e.innerText?e.innerText.match(/\w+/g).length:0}function getAggregateComponentElement(e){return e.closest("[data-".concat(DATA_ATTRIBUTE_PREFIX,'-aggregate-events="true"]'))}function trackZionEvent(e){window.zion_analytics&&window.zion_analytics.track(e)}function initializeOnOffEvents(){if(EnvVars.get("ENABLE_ZION_ANALYTICS_ON_OFF_EVENTS")){var e=function(e){window.ZION_SDK&&e.forEach(function(e){var t=e.target,n=e.isIntersecting,r=t.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")];if(r===COMPONENT_ON_EVENT&&n||r===COMPONENT_OFF_EVENT&&!n){var o=n?window.ZION_SDK.ComponentOnScreen:window.ZION_SDK.ComponentOffScreen,i=t.dataset.uri,a=function(){return setTimeout(function(){return trackZionEvent(new o({component_type:getComponentName(i),component_id:getComponentInstance(i),traits:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},getCommonEventProperties()),getCollectionProperties(t)),getOptionalOnOffProperties(t)),{},{word_count:getWordCount(t)})}))},1500)};window.requestIdleCallback?window.requestIdleCallback(a,{timeout:500}):a(),t.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")]=n?COMPONENT_OFF_EVENT:COMPONENT_ON_EVENT}})},t=Object.keys(OBSERVED_COMPONENT_THRESHOLDS).reduce(function(t,n){return _objectSpread(_objectSpread({},t),{},(0,_defineProperty2.default)({},n,new IntersectionObserver(e,{threshold:OBSERVED_COMPONENT_THRESHOLDS[n]})))},{});ZION_ON_OFF_OBSERVED_COMPONENTS.forEach(function(e){document.querySelectorAll('[data-uri*="/_components/'.concat(e,'/"]')).forEach(function(n){n.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")]=COMPONENT_ON_EVENT,t[e]?t[e].observe(n):t.default.observe(n)})})}}function initializeClickEvents(){EnvVars.get("ENABLE_ZION_ANALYTICS_CLICK_EVENTS")&&document.body.addEventListener("click",function(e){var t="",n="",r="",o=e.target,i=o.closest("a[href]"),a=o.closest("[data-uri]"),c=getAggregateComponentElement(o);i&&i.href&&(r=i.href);var _=_objectSpread(_objectSpread({},getCustomProperties(o=c||a)),c?getCustomProperties(a):{}),s=e.target!==o?getCustomProperties(e.target):{};if(o){if(n=o.dataset.uri,"gallery"===(t=getComponentName(n))){var l,E=e.target.classList[0];E.includes("next")?l=_.carousel_item_index===_.carousel_item_length?1:_.carousel_item_index+1:E.includes("prev")&&(l=1===_.carousel_item_index?_.carousel_item_length:_.carousel_item_index-1),_.carousel_item_index=l}ZION_CLICK_OBSERVED_COMPONENTS.includes(t)&&trackZionEvent(new window.ZION_SDK.GenericClick({component_id:getComponentInstance(n),component_type:getComponentName(n),traits:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},getCommonEventProperties()),getCollectionProperties(o)),_objectSpread(_objectSpread({},s),_)),{},{word_count:getWordCount(o),destination_url:r})}))}})}function initializeAnalyticsEvents(){isPageVariant(ZION_BEHAVIOURAL_ENABLED_PAGE_VARIANTS)&&(initializeOnOffEvents(),initializeClickEvents())}window.ZION_SDK?initializeAnalyticsEvents():window.addEventListener("zion.loaded",initializeAnalyticsEvents);
}, {"2":2,"5":5,"10":10,"18":18,"44":44,"89":89,"241":241}];
window.modules["article-scroll-metrics.legacy"] = [function(require,module,exports){"use strict";var _require=require(107),trackMetrics=_require.trackMetrics,METRICS=[{value:1,type:"article-start",data:{interaction:"article start"}},{value:25,type:"article-twentyfive",data:{interaction:"article 25"}},{value:50,type:"article-fifty",data:{interaction:"article 50"}},{value:75,type:"article-seventyfive",data:{interaction:"article 75"}},{value:100,type:"article-complete",data:{interaction:"article complete"}}],TRACK_PERCENTAGES=METRICS.map(function(e){return e.value}),_values=[].concat(METRICS);function manageMetrics(e){TRACK_PERCENTAGES.forEach(function(t){if(e>=t){if(i=t,!_values.find(function(e){return e.value===i}))return;var a=METRICS.find(function(e){return e.value===t}),r=a.type,n=a.data;trackMetrics({type:r,data:n}),_values=_values.filter(function(e){return e.value!==t})}var i})}function trackPercentageSeen(e){var t=e.querySelectorAll("p.paragraph"),a=t.length,r=Math.round(.25*a),n=Math.round(.5*a),i=Math.round(.75*a),c=new IntersectionObserver(function(e,t){e.forEach(function(e){if(e.isIntersecting){var c=e.target.para_index;c===a||1===a?(manageMetrics(100),t.disconnect()):c===i?manageMetrics(75):c===n?manageMetrics(50):c===r?manageMetrics(25):1===c&&manageMetrics(1),t.unobserve(e.target)}})});t.forEach(function(e,t){e.para_index=t+1,c.observe(e)})}window.addEventListener("load",function(){var e=document.querySelector(".article__content");e&&trackPercentageSeen(e)});
}, {"107":107}];
window.modules["bizdev-wunderkind.legacy"] = [function(require,module,exports){"use strict";var _require=require(9),AD_VARIANTS=_require.AD_VARIANTS,_require2=require(16),subscribe=_require2.subscribe,actions=_require2.actions,EnvVars=require(5),_require3=require(29),isEditionPage=_require3.isEditionPage,isEspanolPage=_require3.isEspanolPage,_require4=require(428),isEligibleForFocusMode=_require4.isEligibleForFocusMode,ucStates=["iab","data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","measure-ads","measure-market","product-develop"],initWunderkind=function(){var e=isEspanolPage()?EnvVars.get("ENABLE_WUNDERKIND_ES"):EnvVars.get("ENABLE_WUNDERKIND"),i=!!isEspanolPage()&&EnvVars.get("WUNDERKIND_SRC_ES")||(isEditionPage()?EnvVars.get("WUNDERKIND_SRC_EDITION"):EnvVars.get("WUNDERKIND_SRC"));e&&window.WM.UserConsent.addScript({src:i,id:"wunderkind_script",async:!0},ucStates)},waitForAdVariant=function(){subscribe(actions.ADS.SET_AD_VARIANT,function(e){e.adVariant===AD_VARIANTS.DEFAULT&&initWunderkind()})};isEligibleForFocusMode()?waitForAdVariant():initWunderkind();
}, {"5":5,"9":9,"16":16,"29":29,"428":428}];
window.modules["campaign-promo-events.legacy"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(44),authClient=_require.authClient,NewsletterClient=require(250),campaignPromos=document.createElement("campaignPromos"),newsletterClient=new NewsletterClient(authClient),trackCampaignPromoEvent=function(e,n){var t=n.campaign_id,r=n.campaign_type,a=n.campaign_name,i=n.campaign_objective;window.zion_analytics.track(new e({component_id:"promo_body",component_type:"".concat(r,"_promo"),traits:{campaign_id:t,campaign_type:r,campaign_name:a,campaign_objective:i}}))};campaignPromos.addEventListener("close",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentOffScreen,n)}),campaignPromos.addEventListener("impression",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentOnScreen,n)}),campaignPromos.addEventListener("submission",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.GenericSubmit,n)}),campaignPromos.addEventListener("activation",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentLoaded,n)}),campaignPromos.getSubscribedNewsletters=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var n;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,newsletterClient.retrieveSubscriptions({useCache:!0});case 2:return n=e.sent,e.abrupt("return",n.filter(function(e){return e.subscribed}).map(function(e){return e.newsletterName}));case 4:case"end":return e.stop()}},e)})),window.CNN.campaignPromos=campaignPromos,window.dispatchEvent(new CustomEvent("CNN.campaignPromos.loaded"));
}, {"10":10,"24":24,"25":25,"44":44,"250":250}];
window.modules["chartbeat-setup.legacy"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12)),_defineProperty2=_interopRequireDefault(require(18)),_require=require(45),isSection=_require.isSection,SECTIONS=_require.SECTIONS,isStrategyRegistered=!1,CnnChartbeatVideoStrategy=function(){function e(t){var i=this;(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"_cbPlayer",null),(0,_defineProperty2.default)(this,"_currentAdPosition",null),(0,_defineProperty2.default)(this,"_ready",!1),(0,_defineProperty2.default)(this,"_strategyName","CNN"),(0,_defineProperty2.default)(this,"_videoPlayed",!1),(0,_defineProperty2.default)(this,"_videoStartTime",null),(0,_defineProperty2.default)(this,"_viewStartTime",this._now()),(0,_defineProperty2.default)(this,"_onPlaybackReady",function(){i._ready=!0}),(0,_defineProperty2.default)(this,"_onVideoPlaying",function(){i._videoPlayed||(i._videoStartTime=i._now(),i._videoPlayed=!0)}),this._cbPlayer=t,this._subscribeEvents()}return(0,_createClass2.default)(e,[{key:"_now",value:function(){return(new Date).getTime()}},{key:"_subscribeEvents",value:function(){this._cbPlayer.readyState>2&&this._onPlaybackReady(),this._cbPlayer.currentTime>0&&!this._cbPlayer.paused&&!this._cbPlayer.ended&&this._onVideoPlaying(),this._cbPlayer.canplay.add(this._onPlaybackReady),this._cbPlayer.playing.add(this._onVideoPlaying)}},{key:"getAdPosition",value:function(){return this._cbPlayer.getAdPosition()}},{key:"getAutoplayType",value:function(){return this._cbPlayer.getAutoplayType()}},{key:"getBitrate",value:function(){return this._cbPlayer.getBitrate()}},{key:"getContentType",value:function(){return this._cbPlayer.getContentType()}},{key:"getCurrentPlayTime",value:function(){return this._cbPlayer.getCurrentPlayTime()}},{key:"getPlayerType",value:function(){return this._cbPlayer.getPlayerType()}},{key:"getSections",value:function(){return this._cbPlayer.getSections()}},{key:"getState",value:function(){return this._cbPlayer.getState()}},{key:"getStrategyName",value:function(){return this._strategyName}},{key:"getThumbnailPath",value:function(){return this._cbPlayer.getThumbnailPath()}},{key:"getTitle",value:function(){return this._cbPlayer.getTitle()}},{key:"getTotalDuration",value:function(){return this._cbPlayer.getTotalDuration()}},{key:"getVideoPath",value:function(){return this._cbPlayer.getVideoPath()}},{key:"getViewAdPlayTime",value:function(){return this.timeElapsed(this._viewStartTime)}},{key:"getViewPlayTime",value:function(){if(this._videoPlayed)return this.timeElapsed(this._viewStartTime)}},{key:"getViewStartTime",value:function(){return this.timeElapsed(this._viewStartTime)||0}},{key:"isReady",value:function(){return this._ready}},{key:"timeElapsed",value:function(e){return void 0===e?0:this._now()-e}}]),e}();function registerChartbeatVideoStrategy(){!0!==isStrategyRegistered&&(window._cbv_strategies=window._cbv_strategies||[],window._cbv_strategies.push(CnnChartbeatVideoStrategy),isStrategyRegistered=!0)}(0,_defineProperty2.default)(CnnChartbeatVideoStrategy,"verify",function(e){return"function"==typeof e.fromFave}),function(){function e(){window.WM.UserConsent.addScript({src:"//static.chartbeat.com/js/chartbeat_video.js",async:!0},["data-store","content-person","measure-content"])}var t=(window.CNN||{}).contentModel||{},i=(window.CNN||{}).omniture||{};registerChartbeatVideoStrategy();var n,r,a,o,l=window._sf_async_config=window._sf_async_config||{};l.uid=37612,l.domain=(o="cnn.com","es"===(null===(n=window.CNN.contentModel)||void 0===n?void 0:n.brandSite)&&(o="cnnespanol.".concat(o)),-1!=window.location.hostname.indexOf("edition")&&(o="edition.".concat(o)),"prod"!=(null===(r=window.CNN)||void 0===r?void 0:null===(a=r.contentModel)||void 0===a?void 0:a.environment)&&(o="dev.".concat(o)),o),l.sections=t.vertical,l.authors=i.cap_author,l.title=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return isSection(SECTIONS.HOMEPAGE)?e.replace(" Desktop","").replace(" Mobile",""):e}(i.headline),l.flickerControl=!1,l.articleBlockSelector="div.card,div.container__item,p.paragraph>a",l.autoDetect=!1,l.path=function(){var e,t,i=window.location.hostname,n=null===(e=(t=document.querySelector("[rel=canonical]")).getAttribute)||void 0===e?void 0:e.call(t,"href");try{return i+new URL(n).pathname}catch(e){return i+document.location.pathname}}(),window.WM.UserConsent?e():window.addEventListener("user-consent.loaded",e)}(),module.exports={CnnChartbeatVideoStrategy:CnnChartbeatVideoStrategy};
}, {"10":10,"11":11,"12":12,"18":18,"45":45}];
window.modules["focus-mode-gpt-service.legacy"] = [function(require,module,exports){"use strict";var focusModeEventTimeout,_interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),EnvVars=require(5),_require=require(428),FOCUS_MODE_EVENT=_require.FOCUS_MODE_EVENT,FOCUS_MODE_CONFIGS=_require.FOCUS_MODE_CONFIGS,isEligibleForFocusMode=_require.isEligibleForFocusMode,_require2=require(29),getCookie=_require2.getCookie,FOCUS_MODE_TIMEOUT=EnvVars.get("FOCUS_MODE_TIMEOUT"),PRISM_SCRIPT_SRC=EnvVars.get("PRISM_SRC"),GPT_SCRIPT_SRC=EnvVars.get("FOCUS_MODE_GPT_SCRIPT_SRC"),ENABLE_FOCUS_MODE=EnvVars.get("ENABLE_FOCUS_MODE"),FOCUS_MODE_UC_STATES=["data-store","ads-contextual","ads-person-prof","ads-person","vendor"],GPT_SCRIPT_ID="GPTScript",FOCUS_MODE_CLASS="focus-mode-sponsored",FOCUS_MODE_STYLES="\nhtml[data-layout-uri*='layout-with-rail'] .".concat(FOCUS_MODE_CLASS,' .ad-slot:not(.adSlotLoaded)[data-uri*="/_components/ad-slot/"]:not([data-desktop-slot-id="ad_focus_btf_01"]),\nhtml[data-layout-uri*=\'layout-with-rail\'] .').concat(FOCUS_MODE_CLASS," .ad-qtm,\nhtml[data-layout-uri*='layout-with-rail'] .").concat(FOCUS_MODE_CLASS," [data-uri*=\"/_components/bizdev\"],\nhtml[data-layout-uri*='layout-with-rail'] .").concat(FOCUS_MODE_CLASS," .teads-inread,\nhtml .").concat(FOCUS_MODE_CLASS," .ad-slot-rail {\n display: none;\n}\nhtml .").concat(FOCUS_MODE_CLASS," .ad-slot-dynamic[data-uri*='cnn-focus-mode-inline-ad'] {\n display: flex;\n}\n"),SECTION=window.CNN.contentModel.section,isEdition=window.CNN.contentModel.edition,RECIRC_DATA={pageElement:{wrapperClassName:"layout__end",elementClassName:"content-recs"},upNext:{recsmodel:"related",title:"Up next",numberOfItems:5,contentTypes:"article",layout:"container_list-headlines-with-read-times"},mostRead:{recsmodel:"popularity",title:"Most read",numberOfItems:10,contentTypes:"article",layout:"container_list-headlines-ranked"}},sendCustomEventOnce=function(e){void 0===window.CNN.ads.isFocusMode&&(document.dispatchEvent(new CustomEvent(FOCUS_MODE_EVENT,{detail:{isFocusMode:e}})),window.CNN.ads.isFocusMode=e)},injectGpt=function(){window.googletag=window.googletag||{cmd:[]},document.querySelector("#".concat(GPT_SCRIPT_ID))?console.warn("Focus Mode: GPT script already exists"):window.WM.UserConsent.addScript({src:GPT_SCRIPT_SRC,async:!0,id:GPT_SCRIPT_ID},FOCUS_MODE_UC_STATES)},insertFocusModeStyles=function(){var e=document.createElement("style");e.textContent=FOCUS_MODE_STYLES,document.head.appendChild(e)},getLimitedAdsParam=function(){var e,t=null===(e=getUrlParam("adsqa"))||void 0===e?void 0:e.split("=");return Boolean(t&&"status"===t[0]&&"limited_ads"===t[1])},getCDPID=function(){return new Promise(function(e){var t=getCookie("CDPID");if(t){var n=JSON.parse(t).cdpId;e(n)}else window.addEventListener("message",function(t){var n,o=null===(n=document.getElementById("prism_toolkit"))||void 0===n?void 0:n.contentWindow;t.source==o&&e(t.data)}),window.WM.UserConsent.addScript({src:PRISM_SCRIPT_SRC},FOCUS_MODE_UC_STATES)})},defineAdSlot=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var n,o,a,r,i,s,d,c,u,l,_,S,g,C,p,m,E,O,f,T;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.networkId,o=t.adDimensions,a=t.elementId,r=t.targeting,i=SECTION?"".concat(n,"/").concat(SECTION):n,s=window.CNN.cep_topics||{},d=s.cep_brsf,c=void 0===d?[]:d,u=s.cep_iabt,l=void 0===u?[]:u,_=s.cep_sent,S=void 0===_?[]:_,g=s.cep_tags,C=void 0===g?[]:g,p=s.short_source_id,m=void 0===p?"":p,E=s.source_id,O=void 0===E?"":E,getLimitedAdsParam()&&(r.status=["limited_ads"]),(f=document.createElement("div")).id=a,f.classList.add("focus-mode-top-ad"),document.querySelector(".ad-slot-header__container").appendChild(f),e.next=10,getCDPID();case 10:T=e.sent,googletag.cmd.push(function(){r.status?googletag.defineSlot(i,o,a).setTargeting("pos",r.pos).setTargeting("status",r.status).addService(googletag.pubads()):googletag.defineSlot(i,o,a).setTargeting("pos",r.pos).addService(googletag.pubads()),googletag.pubads().setTargeting("cep_brsf",c).setTargeting("cep_iabt",l).setTargeting("cep_sent",S).setTargeting("cep_tags",C).setTargeting("short_source_id",m).setTargeting("source_id",O).setPublisherProvidedId(T).collapseEmptyDivs(),googletag.enableServices()});case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),handleSlotRenderEnded=function(e,t,n){if(e.slot.getSlotElementId()===t){var o=e.slot.getTargeting("pos"),a=e.isEmpty,r=o.includes(n[0])&&!a;r&&(insertFocusModeStyles(),document.body.classList.add(FOCUS_MODE_CLASS),clearTimeout(focusModeEventTimeout),sendCustomEventOnce(r),isEdition||(insertRecircModule("mostRead"),insertRecircModule("upNext")))}},checkSponsoredSession=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t,n){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(e){window.googletag&&googletag.apiReady?e():googletag.cmd.push(e)});case 2:googletag.cmd.push(function(){googletag.display(t)}),googletag.cmd.push(function(){googletag.pubads().addEventListener("slotRenderEnded",function(e){handleSlotRenderEnded(e,t,n)})});case 4:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),getUrlParam=function(e){return new URLSearchParams(window.location.search).get(e)},insertRecircModule=function(e){if(RECIRC_DATA[e]){var t=document.querySelector(".".concat(RECIRC_DATA.pageElement.wrapperClassName)),n=document.createElement("div"),o="recirc-module-".concat(e.replace(/[\s-]+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase());Object.keys(RECIRC_DATA[e]).forEach(function(t){n.dataset[t]=RECIRC_DATA[e][t]}),n.classList.add(o,RECIRC_DATA.pageElement.elementClassName),t.prepend(n),window.CNN.launchContentRecs(document.querySelector(".".concat(o)))}},isOptedOut=function(){var e=getUrlParam("focus_mode");return!isEligibleForFocusMode()||"false"===e||null===e&&!getLimitedAdsParam()&&!1===ENABLE_FOCUS_MODE},handleOptInRedirect=function(){var e=getUrlParam("focus_mode"),t=getUrlParam("adsqa");"true"!==e||t||(window.location.search+="".concat(window.location.search?"&":"","adsqa=status%3Dlimited_ads"))},initGptService=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!isOptedOut()){e.next=4;break}sendCustomEventOnce(!1),e.next=10;break;case 4:return handleOptInRedirect(),focusModeEventTimeout=setTimeout(function(){var e=getLimitedAdsParam();sendCustomEventOnce(e)},FOCUS_MODE_TIMEOUT),injectGpt(),e.next=9,defineAdSlot(FOCUS_MODE_CONFIGS.gptSlot);case 9:checkSponsoredSession(FOCUS_MODE_CONFIGS.gptSlot.elementId,FOCUS_MODE_CONFIGS.gptSlot.targeting.pos);case 10:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();initGptService(),module.exports={FOCUS_MODE_CLASS:FOCUS_MODE_CLASS,GPT_SCRIPT_ID:GPT_SCRIPT_ID};
}, {"5":5,"10":10,"24":24,"25":25,"29":29,"428":428}];
window.modules["relevance-user.legacy"] = [function(require,module,exports){"use strict";var _require=require(421),trackUserViewedContent=_require.trackUserViewedContent;trackUserViewedContent(window.CNN.contentModel);
}, {"421":421}];
window.modules["shared-arkose-newsletters.legacy"] = [function(require,module,exports){"use strict";var nlArkoseEnforcement,daexData,_interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(251),createArkoseScript=_require.createArkoseScript,getDaexData=_require.getDaexData,enforcementOnError=_require.enforcementOnError,MAX_RETRY_COUNT=_require.MAX_RETRY_COUNT,retryCount=0,setupCbName="setupArkoseDualNewsletters",nlLoadedEvent="cnn-nl-arkose-loaded",setArkoseConfig=function(e){var r=e.arkoseOnReady,n=e.arkoseOnCompleted,t=e.arkoseOnError,a=e.setBy;nlArkoseEnforcement.setConfig({data:daexData&&{blob:daexData}||{},onReady:function(){r&&r({enforcement:nlArkoseEnforcement})},onCompleted:n,onError:function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return retryCount++,e.next=3,enforcementOnError({enforcementInstance:nlArkoseEnforcement,callbackFnName:setupCbName,retryTimes:retryCount});case 3:retryCount===MAX_RETRY_COUNT&&t&&t();case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()}),window.arkoseEnforcementCNN.lastSetBy=a,nlArkoseEnforcement.reset()},resetArkoseConfig=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(daexData){e.next=4;break}return e.next=3,getDaexData("NEWSLETTERS");case 3:daexData=e.sent;case 4:nlArkoseEnforcement?setArkoseConfig(r):(createArkoseScript({srcEnvVar:"ARKOSE_NEWSLETTERS_SRC",callbackFnName:setupCbName,id:"arkose-newsletters-script"}),document.addEventListener(nlLoadedEvent,function(){setArkoseConfig(r)}));case 5:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}();window.arkoseEnforcementCNN={},window[setupCbName]=function(e){nlArkoseEnforcement=e,document.dispatchEvent(new CustomEvent(nlLoadedEvent))},window.arkoseEnforcementCNN.enforcementSetup=resetArkoseConfig;
}, {"10":10,"24":24,"25":25,"251":251}];
window.modules["zeta.legacy"] = [function(require,module,exports){"use strict";var clientHashKey=window.zeta.client_hash_key,partnerHashKey=window.zeta.partner_hash_key,tagShortName=window.zeta.tag_short_name,siteId=window.zeta.site_id,resourceId=window.CNN.contentModel.sourceId,resourceType=window.CNN.contentModel.pageType,section=window.CNN.contentModel.section,cacheBuster=Date.now(),src="https://live.rezync.com/sync?"+"c=".concat(clientHashKey)+"&p=".concat(partnerHashKey)+"&k=".concat(tagShortName)+"&zmpID=".concat(siteId)+"&custom1=".concat(resourceId)+"&custom2=".concat(resourceType)+"&custom3=".concat(section)+"&cache_buster=".concat(cacheBuster),async=!0,ucStates=["data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","content-person-prof","content-person","measure-ads","measure-content","measure-market","product-develop"];function init(){window.WM.UserConsent.addScript({src:src,async:async},ucStates)}window.WM.UserConsent?init():window.addEventListener("user-consent.loaded",init);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/))
.forEach((key) => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules)
.filter((key) => typeof key === 'string' && key.match(/\.client$/))
.forEach((key) => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `production` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = 'production';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]