(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,247503,e=>{"use strict";var t=e.i(271645),a=e.i(618566),l=e.i(348650),s=e.i(958861),n=e.i(135517);function i(e,t){let a=e[t];return"string"==typeof a&&a?a:null}function r(){if(!window.assertive)return;let e=window.assertive.analytics;if(!e)return;let t=window.dataLayer?.[0]??{},a=i(t,"page_type"),r=i(t,"account_type"),o=i(t,"login_status"),d=i(t,"trsource")||(0,n.getTrafficSource)(),u=window.brsafe||i(t,"brsafe")||i(t,"brandsafe"),c=i(t,"brtype")||i(t,"br_type")||(0,l.getBrowserType)()||null,m=i(t,"section");e.custom={...e.custom,layout:a,userState:r??o,custom_1:d,custom_2:a,custom_3:u,custom_4:c,custom_5:m,custom_6:(0,s.getPbsVendor)()}}e.s(["default",0,function(){let e=(0,a.usePathname)(),l=(0,t.useRef)(!0);return(0,t.useEffect)(()=>{r();let e=()=>r();return window.addEventListener("dataLayerClientReady",e),window.addEventListener("dataLayerReady",e),()=>{window.removeEventListener("dataLayerClientReady",e),window.removeEventListener("dataLayerReady",e)}},[]),(0,t.useEffect)(()=>{if(l.current){l.current=!1;return}try{r(),window.assertive?.nextPage?.()}catch{}},[e]),null}],247503)},333709,e=>{"use strict";e.i(247167);var t=e.i(843476),a=e.i(3303);e.s(["default",0,function(){let e=` !function(e,t,c,n,o,a,m){ function getCookie(name) { var row = (t.cookie || '').split('; ').find(function(r) { return r.indexOf(name + '=') === 0; }); if (!row) return ''; try { return decodeURIComponent(row.split('=').slice(1).join('=')); } catch(_) { return row.split('=').slice(1).join('='); } } var pianoUser = e.tp && e.tp.pianoId && e.tp.pianoId.getUser ? e.tp.pianoId.getUser() : null; n = (pianoUser && pianoUser.uid) || getCookie('nwsubl') || ''; e._ml = e._ml || {}; e._ml.eid = '70139'; e._ml.fp = n; var cd = new Date(); a = t.createElement(c); a.async = true; a.src = 'https://ml314.com/tag.aspx?' + cd.getDate() + cd.getMonth(); m = t.getElementsByTagName(c)[0]; m.parentNode.insertBefore(a, m); e._bmb||(o=e._bmb=function(){o.x?o.x.apply(o,arguments):o.q.push(arguments)},o.q=[],a=t.createElement(c),a.async=true,a.src="https://vi.ml314.com/get?eid=70139&tk=f0hbCAHlZU2LMNNWPrw2b2bqbmwno2Zukhks82b2bFt9j5w3d&fp="+encodeURIComponent(n),m=t.getElementsByTagName(c)[0],m.parentNode.insertBefore(a,m)) }(window,document,"script"); window.googletag = window.googletag || {cmd: []}; googletag.cmd.push(function() { _bmb('vi', function(data){ if (data != null) { var tmpSegment = [ data.industry_id, data.revenue_id, data.size_id, data.functional_area_id, data.professional_group_id, data.seniority_id, data.decision_maker_id, data.install_data_id, data.topic_id, data.interest_group_id, data.segment, data.b2b_interest_cluster_id ].filter(Boolean).join(','); if (tmpSegment != '') { var seg = tmpSegment.split(','); googletag.pubads().setTargeting("bmb", seg); } } }); }); `;return(0,t.jsx)(a.default,{id:"bombora-loader",strategy:"afterInteractive",children:e})}])},131558,e=>{"use strict";var t=e.i(271645),a=e.i(389526);let l="newsweek-liveconnect";e.s(["default",0,function({enabled:e}){return(0,t.useEffect)(()=>{if(!e||(0,a.isUspOptOutClient)()||!1===window.__shouldLoadAds||document.getElementById(l))return;let t=document.createElement("script");t.id=l,t.type="text/javascript",t.src="https://b-code.liadm.com/a-08dr.min.js",t.async=!0,document.body.appendChild(t)},[e]),null}])},2210,e=>{"use strict";var t=e.i(271645),a=e.i(31499),l=e.i(225862),s=e.i(67175),n=e.i(742544);let i=()=>{let{isActiveSubscriber:e}=(0,a.useAuthContext)();return(0,t.useEffect)(()=>{"1"===(0,s.getCookie)("nwsucrp")?(document.body.setAttribute("data-subscriber","true"),document.documentElement.classList.add("subscriber-active")):(document.body.removeAttribute("data-subscriber"),document.documentElement.classList.remove("subscriber-active"));let t=()=>{let t;document.hidden||(t=(0,n.isActiveSubscriber)())!==e&&(t?(document.body.setAttribute("data-subscriber","true"),document.documentElement.classList.add("subscriber-active")):(document.body.removeAttribute("data-subscriber"),document.documentElement.classList.remove("subscriber-active")))};return document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[e]),(0,l.useInterval)(()=>{let t=(0,n.isActiveSubscriber)();t!==e&&(t?(document.body.setAttribute("data-subscriber","true"),document.documentElement.classList.add("subscriber-active")):(document.body.removeAttribute("data-subscriber"),document.documentElement.classList.remove("subscriber-active")))},5e3),null};e.s(["SubscriberAdBlocker",0,i,"default",0,i])},696395,e=>{"use strict";let t;var a=e.i(271645),l=e.i(225862),s=e.i(389526);function n(){let e=(0,s.isUspOptOutClient)(),a=window;if(document.documentElement.classList.toggle("usp-optout",e),document.body?.classList.toggle("usp-optout",e),void 0===t){t=e,e&&(a.__shouldLoadAds=!1);return}e!==t&&(t=e,a.__shouldLoadAds=!e,window.dispatchEvent(new CustomEvent("shouldLoadAdsChanged",{detail:{shouldLoadAds:!e}})),window.location.reload())}e.s(["UspOptOutHandler",0,function(){return(0,a.useEffect)(()=>{n()},[]),(0,l.useInterval)(()=>{n()},3e3),null}])},555977,e=>{e.v({altBackground:"ArticleFooter-module-scss-module__9WOupa__altBackground",bottom:"ArticleFooter-module-scss-module__9WOupa__bottom",column:"ArticleFooter-module-scss-module__9WOupa__column",columnItem:"ArticleFooter-module-scss-module__9WOupa__columnItem",columnList:"ArticleFooter-module-scss-module__9WOupa__columnList",columnTitle:"ArticleFooter-module-scss-module__9WOupa__columnTitle",desktopColumns:"ArticleFooter-module-scss-module__9WOupa__desktopColumns",expanded:"ArticleFooter-module-scss-module__9WOupa__expanded",footerContainer:"ArticleFooter-module-scss-module__9WOupa__footerContainer",hide:"ArticleFooter-module-scss-module__9WOupa__hide",middle:"ArticleFooter-module-scss-module__9WOupa__middle",mobileDivider:"ArticleFooter-module-scss-module__9WOupa__mobileDivider",mobileList:"ArticleFooter-module-scss-module__9WOupa__mobileList",mobileSection:"ArticleFooter-module-scss-module__9WOupa__mobileSection",sectionList:"ArticleFooter-module-scss-module__9WOupa__sectionList",sectionTitle:"ArticleFooter-module-scss-module__9WOupa__sectionTitle",sectionToggle:"ArticleFooter-module-scss-module__9WOupa__sectionToggle",socialLink:"ArticleFooter-module-scss-module__9WOupa__socialLink",socialLinks:"ArticleFooter-module-scss-module__9WOupa__socialLinks",toggleIcon:"ArticleFooter-module-scss-module__9WOupa__toggleIcon",top:"ArticleFooter-module-scss-module__9WOupa__top"})},786310,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(343794),s=e.i(618566),n=e.i(82293),i=e.i(825536),r=e.i(358444),o=e.i(555977);let d=({width:e=12,height:a=12,color:l="black",rotate:s=0})=>(0,t.jsx)("svg",{width:e,height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${s}deg)`,transition:"transform 0.3s ease"},children:(0,t.jsx)("path",{fill:l,d:"M0 7.33l2.829-2.83 9.175 9.339 9.167-9.339 2.829 2.83-11.996 12.17z"})});var u=e.i(198768);let c=({color:e="#68645A",width:a=20,height:l=20,...s})=>(0,t.jsxs)("svg",{width:a,height:l,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_14644_22)",children:(0,t.jsx)("g",{clipPath:"url(#clip1_14644_22)",children:(0,t.jsx)("path",{d:"M10 0C4.4772 0 0 4.4772 0 10C0 14.6896 3.2288 18.6248 7.5844 19.7056V13.056H5.5224V10H7.5844V8.6832C7.5844 5.2796 9.1248 3.702 12.4664 3.702C13.1 3.702 14.1932 3.8264 14.6404 3.9504V6.7204C14.4044 6.6956 13.9944 6.6832 13.4852 6.6832C11.8456 6.6832 11.212 7.3044 11.212 8.9192V10H14.4784L13.9172 13.056H11.212V19.9268C16.1636 19.3288 20.0004 15.1128 20.0004 10C20 4.4772 15.5228 0 10 0Z",fill:e})})}),(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:"clip0_14644_22",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})}),(0,t.jsx)("clipPath",{id:"clip1_14644_22",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})})]})]}),m=({width:e=20,height:a=20,...l})=>(0,t.jsxs)("svg",{width:e,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_14644_31)",children:(0,t.jsxs)("g",{clipPath:"url(#clip1_14644_31)",children:[(0,t.jsx)("path",{d:"M10 1.80078C12.6719 1.80078 12.9883 1.8125 14.0391 1.85937C15.0156 1.90234 15.543 2.06641 15.8945 2.20313C16.3594 2.38281 16.6953 2.60156 17.043 2.94922C17.3945 3.30078 17.6094 3.63281 17.7891 4.09766C17.9258 4.44922 18.0898 4.98047 18.1328 5.95312C18.1797 7.00781 18.1914 7.32422 18.1914 9.99219C18.1914 12.6641 18.1797 12.9805 18.1328 14.0313C18.0898 15.0078 17.9258 15.5352 17.7891 15.8867C17.6094 16.3516 17.3906 16.6875 17.043 17.0352C16.6914 17.3867 16.3594 17.6016 15.8945 17.7813C15.543 17.918 15.0117 18.082 14.0391 18.125C12.9844 18.1719 12.668 18.1836 10 18.1836C7.32813 18.1836 7.01172 18.1719 5.96094 18.125C4.98438 18.082 4.45703 17.918 4.10547 17.7813C3.64063 17.6016 3.30469 17.3828 2.95703 17.0352C2.60547 16.6836 2.39063 16.3516 2.21094 15.8867C2.07422 15.5352 1.91016 15.0039 1.86719 14.0313C1.82031 12.9766 1.80859 12.6602 1.80859 9.99219C1.80859 7.32031 1.82031 7.00391 1.86719 5.95312C1.91016 4.97656 2.07422 4.44922 2.21094 4.09766C2.39063 3.63281 2.60938 3.29688 2.95703 2.94922C3.30859 2.59766 3.64063 2.38281 4.10547 2.20313C4.45703 2.06641 4.98828 1.90234 5.96094 1.85937C7.01172 1.8125 7.32813 1.80078 10 1.80078ZM10 0C7.28516 0 6.94531 0.0117187 5.87891 0.0585938C4.81641 0.105469 4.08594 0.277344 3.45313 0.523438C2.79297 0.78125 2.23438 1.12109 1.67969 1.67969C1.12109 2.23438 0.78125 2.79297 0.523438 3.44922C0.277344 4.08594 0.105469 4.8125 0.0585938 5.875C0.0117188 6.94531 0 7.28516 0 10C0 12.7148 0.0117188 13.0547 0.0585938 14.1211C0.105469 15.1836 0.277344 15.9141 0.523438 16.5469C0.78125 17.207 1.12109 17.7656 1.67969 18.3203C2.23438 18.875 2.79297 19.2188 3.44922 19.4727C4.08594 19.7188 4.8125 19.8906 5.875 19.9375C6.94141 19.9844 7.28125 19.9961 9.99609 19.9961C12.7109 19.9961 13.0508 19.9844 14.1172 19.9375C15.1797 19.8906 15.9102 19.7188 16.543 19.4727C17.1992 19.2188 17.7578 18.875 18.3125 18.3203C18.8672 17.7656 19.2109 17.207 19.4648 16.5508C19.7109 15.9141 19.8828 15.1875 19.9297 14.125C19.9766 13.0586 19.9883 12.7188 19.9883 10.0039C19.9883 7.28906 19.9766 6.94922 19.9297 5.88281C19.8828 4.82031 19.7109 4.08984 19.4648 3.45703C19.2188 2.79297 18.8789 2.23438 18.3203 1.67969C17.7656 1.125 17.207 0.78125 16.5508 0.527344C15.9141 0.28125 15.1875 0.109375 14.125 0.0625C13.0547 0.0117188 12.7148 0 10 0Z",fill:"#68645A"}),(0,t.jsx)("path",{d:"M10 4.86328C7.16406 4.86328 4.86328 7.16406 4.86328 10C4.86328 12.8359 7.16406 15.1367 10 15.1367C12.8359 15.1367 15.1367 12.8359 15.1367 10C15.1367 7.16406 12.8359 4.86328 10 4.86328ZM10 13.332C8.16016 13.332 6.66797 11.8398 6.66797 10C6.66797 8.16016 8.16016 6.66797 10 6.66797C11.8398 6.66797 13.332 8.16016 13.332 10C13.332 11.8398 11.8398 13.332 10 13.332Z",fill:"#68645A"}),(0,t.jsx)("path",{d:"M16.5391 4.66012C16.5391 5.32418 16 5.85934 15.3398 5.85934C14.6758 5.85934 14.1406 5.32028 14.1406 4.66012C14.1406 3.99606 14.6797 3.4609 15.3398 3.4609C16 3.4609 16.5391 3.99996 16.5391 4.66012Z",fill:"#68645A"})]})}),(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:"clip0_14644_31",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})}),(0,t.jsx)("clipPath",{id:"clip1_14644_31",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})})]})]}),_=({color:e="#68645A",width:a=20,height:l=20,...s})=>(0,t.jsxs)("svg",{width:a,height:l,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_14644_28)",children:(0,t.jsx)("g",{clipPath:"url(#clip1_14644_28)",children:(0,t.jsx)("path",{d:"M18.5195 0H1.47656C0.660156 0 0 0.644531 0 1.44141V18.5547C0 19.3516 0.660156 20 1.47656 20H18.5195C19.3359 20 20 19.3516 20 18.5586V1.44141C20 0.644531 19.3359 0 18.5195 0ZM5.93359 17.043H2.96484V7.49609H5.93359V17.043ZM4.44922 6.19531C3.49609 6.19531 2.72656 5.42578 2.72656 4.47656C2.72656 3.52734 3.49609 2.75781 4.44922 2.75781C5.39844 2.75781 6.16797 3.52734 6.16797 4.47656C6.16797 5.42188 5.39844 6.19531 4.44922 6.19531ZM17.043 17.043H14.0781V12.4023C14.0781 11.2969 14.0586 9.87109 12.5352 9.87109C10.9922 9.87109 10.7578 11.0781 10.7578 12.3242V17.043H7.79688V7.49609H10.6406V8.80078H10.6797C11.0742 8.05078 12.043 7.25781 13.4844 7.25781C16.4883 7.25781 17.043 9.23438 17.043 11.8047V17.043Z",fill:e})})}),(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:"clip0_14644_28",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})}),(0,t.jsx)("clipPath",{id:"clip1_14644_28",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})})]})]}),f=({...e})=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",children:(0,t.jsx)("path",{d:"M10.04 2.05a1.667 1.667 0 1 0-.011-.721 2.69 2.69 0 0 0-2.4 2.673v.008c-1.466.062-2.804.48-3.866 1.138A2.335 2.335 0 1 0 1.345 9.11C1.422 11.82 4.375 14 8.009 14s6.592-2.182 6.665-4.896a2.336 2.336 0 1 0-2.423-3.96c-1.072-.664-2.425-1.08-3.906-1.136v-.007c0-.992.738-1.815 1.694-1.95zM3.668 8.477c.039-.847.601-1.497 1.255-1.497s1.154.687 1.115 1.534S5.512 9.67 4.857 9.67 3.63 9.324 3.669 8.477m7.426-1.497c.655 0 1.217.65 1.256 1.497s-.535 1.192-1.189 1.192c-.653 0-1.142-.307-1.182-1.155-.039-.847.46-1.534 1.115-1.534m-.778 3.457c.123.012.201.14.153.254a2.667 2.667 0 0 1-4.922 0 .185.185 0 0 1 .154-.254 23 23 0 0 1 2.307-.113c.812 0 1.589.04 2.308.113",fill:"#68645a"})}),h=({...e})=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,t.jsx)("path",{d:"m14.74 9.27-.26-.124c-.157-2.844-1.71-4.469-4.313-4.48h-.042c-1.563 0-2.854.657-3.656 1.876l1.437.979a2.5 2.5 0 0 1 2.25-1.094q1.282 0 1.927.74.459.531.604 1.458a11 11 0 0 0-2.468-.104c-2.48.135-4.063 1.583-3.959 3.594.052 1.02.552 1.895 1.427 2.468.73.49 1.678.73 2.657.667a3.96 3.96 0 0 0 3.02-1.469 5.4 5.4 0 0 0 1.042-2.708q.938.573 1.323 1.458a3.65 3.65 0 0 1-.885 4c-1.177 1.177-2.604 1.688-4.74 1.709q-3.573-.031-5.344-2.271Q3.125 13.875 3.094 10q.021-3.875 1.666-5.969 1.77-2.24 5.344-2.27 3.604.041 5.438 2.28a7.4 7.4 0 0 1 1.333 2.73l1.688-.458a9.1 9.1 0 0 0-1.688-3.396Q14.52.04 10.105 0 5.696.03 3.416 2.917 1.385 5.52 1.354 10q.042 4.5 2.063 7.083Q5.688 19.97 10.104 20c2.604-.02 4.438-.698 5.948-2.208a5.42 5.42 0 0 0 1.27-5.97 5.1 5.1 0 0 0-2.582-2.551m-4.48 4.22c-1.093.062-2.218-.417-2.28-1.47-.043-.78.551-1.645 2.343-1.75l.604-.01q.97 0 1.802.178c-.208 2.572-1.406 2.99-2.479 3.052",fill:"#68645a"})}),g=({...e})=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",children:(0,t.jsx)("path",{d:"M12.56 0H9.19v13.623c0 1.623-1.297 2.957-2.91 2.957s-2.91-1.334-2.91-2.957c0-1.594 1.268-2.898 2.824-2.956v-3.42C2.766 7.303 0 10.115 0 13.622 0 17.16 2.823 20 6.309 20s6.309-2.87 6.309-6.377V6.638a7.8 7.8 0 0 0 4.465 1.507v-3.42C14.548 4.638 12.56 2.55 12.56 0",fill:"#68645a"})}),p=({color:e="#68645A",width:a=20,height:l=20,...s})=>(0,t.jsxs)("svg",{width:a,height:l,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_14644_25)",children:(0,t.jsx)("path",{d:"M15.2719 1.58661H18.0832L11.9415 8.60619L19.1667 18.1582H13.5094L9.0784 12.365L4.00833 18.1582H1.1954L7.76457 10.65L0.833374 1.58661H6.6343L10.6395 6.88189L15.2719 1.58661ZM14.2853 16.4756H15.843L5.78787 3.18089H4.11626L14.2853 16.4756Z",fill:e})}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_14644_25",children:(0,t.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]});e.s(["default",0,({menuData:e})=>{let[v,x]=(0,a.useState)({}),b=(0,s.usePathname)(),w=(0,a.useMemo)(()=>b?.includes("/subscribe"),[b]),C=e=>{e.preventDefault();let t=window,a=t.ketch||t.Ketch;"function"==typeof a&&a("showExperience")},j=(e.social||[]).reduce((e,t)=>(t.subMenu&&t.subMenu.length>0&&(e[t.label.toLowerCase()]=t.subMenu),e),{}),y=[{name:"Facebook",url:"https://facebook.com/newsweek",icon:(0,t.jsx)(c,{})},{name:"Twitter",url:"https://twitter.com/newsweek",icon:(0,t.jsx)(p,{})},{name:"LinkedIn",url:"https://linkedin.com/company/newsweek",icon:(0,t.jsx)(_,{})},{name:"Instagram",url:"https://instagram.com/newsweek",icon:(0,t.jsx)(m,{})},{name:"Reddit",url:"https://www.reddit.com/user/newsweek/",icon:(0,t.jsx)(f,{})},{name:"Tik Tok",url:"https://www.tiktok.com/@newsweek",icon:(0,t.jsx)(g,{})},{name:"Threads",url:"https://www.threads.com/@newsweek",icon:(0,t.jsx)(h,{})}];return(0,t.jsxs)("footer",{className:(0,l.default)(o.default.footerContainer,{[o.default.altBackground]:w}),"data-gtm-action":"Footer_Links",children:[(0,t.jsxs)("section",{className:o.default.top,"data-gtm-action":"Footer-Top",children:[(0,t.jsx)(i.default,{href:r.NEWSWEEK_BASE_URL,"aria-label":"Newsweek Logo","data-gtm-action":"Footer_NW_Logo","data-gtm-text":"Newsweek Logo",attributes:{"aria-label":"home"},children:(0,t.jsx)(u.default,{height:26,width:160,color:"black"})}),(0,t.jsx)("div",{className:o.default.socialLinks,children:y.map((e,a)=>(0,t.jsx)(i.default,{href:e.url,external:!0,className:o.default.socialLink,attributes:{title:e.name},"data-gtm-action":`Footer_Social_Icon_${a+1}`,"data-gtm-text":e.name,children:e.icon},e.name))})]}),(0,t.jsxs)("section",{className:o.default.middle,children:[(0,t.jsx)("div",{className:o.default.desktopColumns,children:Object.entries(j).map(([e,a])=>(0,t.jsxs)("div",{className:o.default.column,children:[(0,t.jsx)("h3",{className:(0,l.default)("text-system-semibold-md",o.default.columnTitle),children:e}),(0,t.jsx)("ul",{className:o.default.columnList,children:a.map((e,a)=>(0,t.jsx)("li",{className:o.default.columnItem,children:"Privacy Settings"===e.label?(0,t.jsx)("button",{type:"button",onClick:C,"data-gtm-action":`Footer_Link_${a+1}`,"data-gtm-text":e.label,"aria-label":"Open Privacy Settings",className:"text-system-regular-sm",children:"Privacy Settings"}):(0,t.jsx)(i.default,{href:e.url,attributes:{"data-gtm-action":`Footer_Link_${a+1}`,"data-gtm-text":e.label},className:"text-system-regular-sm",children:e.label})},e.label))})]},e))}),(0,t.jsxs)("div",{className:o.default.mobileList,children:[(0,t.jsx)("div",{className:o.default.mobileDivider,children:(0,t.jsx)(n.default,{})}),Object.entries(j).map(([e,a],s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:o.default.mobileSection,children:[(0,t.jsxs)("button",{className:o.default.sectionToggle,onClick:()=>{x(t=>({...t,[e]:!t[e]}))},"aria-expanded":v[e]||!1,"aria-controls":`mobile-section-${e}`,children:[(0,t.jsx)("h3",{className:(0,l.default)("text-system-semibold-md",o.default.columnTitle),children:e}),(0,t.jsx)("span",{className:(0,l.default)(o.default.toggleIcon,{[o.default.expanded]:v[e]}),children:(0,t.jsx)(d,{})})]}),(0,t.jsx)("ul",{className:(0,l.default)(o.default.sectionList,{[o.default.expanded]:v[e]}),id:`mobile-section-${e}`,children:a.map((e,a)=>(0,t.jsx)("li",{className:o.default.columnItem,children:"Privacy Settings"===e.label?(0,t.jsx)("button",{type:"button",onClick:C,"aria-label":"Open Privacy Settings","data-gtm-action":`Footer_Link_${a+1}`,"data-gtm-text":"Privacy Settings",className:"text-system-regular-sm",children:"Privacy Settings"}):(0,t.jsx)(i.default,{href:e.url,"data-gtm-action":`Footer_Link_${a+1}`,"data-gtm-text":e.label,"aria-label":e.label,className:"text-system-regular-sm",children:e.label})},e.label))})]}),s{e.v({accountMenuAnchor:"ArticleHeader-module-scss-module__W_gXQa__accountMenuAnchor",alignment:"ArticleHeader-module-scss-module__W_gXQa__alignment",brand:"ArticleHeader-module-scss-module__W_gXQa__brand","button-loading-spinner":"ArticleHeader-module-scss-module__W_gXQa__button-loading-spinner",center:"ArticleHeader-module-scss-module__W_gXQa__center",centered:"ArticleHeader-module-scss-module__W_gXQa__centered",centeredContainer:"ArticleHeader-module-scss-module__W_gXQa__centeredContainer",closeSearch:"ArticleHeader-module-scss-module__W_gXQa__closeSearch",container:"ArticleHeader-module-scss-module__W_gXQa__container",disclosureButton:"ArticleHeader-module-scss-module__W_gXQa__disclosureButton",hasBreakingBar:"ArticleHeader-module-scss-module__W_gXQa__hasBreakingBar",hasScrolled:"ArticleHeader-module-scss-module__W_gXQa__hasScrolled",headerSpacer:"ArticleHeader-module-scss-module__W_gXQa__headerSpacer",homepageMobileCollapsed:"ArticleHeader-module-scss-module__W_gXQa__homepageMobileCollapsed",homepageSpacer:"ArticleHeader-module-scss-module__W_gXQa__homepageSpacer",isAuthenticated:"ArticleHeader-module-scss-module__W_gXQa__isAuthenticated",item:"ArticleHeader-module-scss-module__W_gXQa__item",left:"ArticleHeader-module-scss-module__W_gXQa__left",loading:"ArticleHeader-module-scss-module__W_gXQa__loading","loading-spinner":"ArticleHeader-module-scss-module__W_gXQa__loading-spinner",loadingContent:"ArticleHeader-module-scss-module__W_gXQa__loadingContent",loggedIn:"ArticleHeader-module-scss-module__W_gXQa__loggedIn",login:"ArticleHeader-module-scss-module__W_gXQa__login",loginButton:"ArticleHeader-module-scss-module__W_gXQa__loginButton",loginText:"ArticleHeader-module-scss-module__W_gXQa__loginText",logo:"ArticleHeader-module-scss-module__W_gXQa__logo",logoCentered:"ArticleHeader-module-scss-module__W_gXQa__logoCentered",menu:"ArticleHeader-module-scss-module__W_gXQa__menu",menuItemContainer:"ArticleHeader-module-scss-module__W_gXQa__menuItemContainer",menuItemIcon:"ArticleHeader-module-scss-module__W_gXQa__menuItemIcon",menuItemOpen:"ArticleHeader-module-scss-module__W_gXQa__menuItemOpen",menuItemText:"ArticleHeader-module-scss-module__W_gXQa__menuItemText",menuLabel:"ArticleHeader-module-scss-module__W_gXQa__menuLabel",menuLink:"ArticleHeader-module-scss-module__W_gXQa__menuLink",navBar:"ArticleHeader-module-scss-module__W_gXQa__navBar",noPiano:"ArticleHeader-module-scss-module__W_gXQa__noPiano",notificationBell:"ArticleHeader-module-scss-module__W_gXQa__notificationBell",notificationButton:"ArticleHeader-module-scss-module__W_gXQa__notificationButton",oldLoginBtn:"ArticleHeader-module-scss-module__W_gXQa__oldLoginBtn",right:"ArticleHeader-module-scss-module__W_gXQa__right",scrolled:"ArticleHeader-module-scss-module__W_gXQa__scrolled",search:"ArticleHeader-module-scss-module__W_gXQa__search",searchButton:"ArticleHeader-module-scss-module__W_gXQa__searchButton",searchContainer:"ArticleHeader-module-scss-module__W_gXQa__searchContainer",searchInput:"ArticleHeader-module-scss-module__W_gXQa__searchInput",searchOpen:"ArticleHeader-module-scss-module__W_gXQa__searchOpen",sideMenuBtn:"ArticleHeader-module-scss-module__W_gXQa__sideMenuBtn",subMenuContainer:"ArticleHeader-module-scss-module__W_gXQa__subMenuContainer",submenu:"ArticleHeader-module-scss-module__W_gXQa__submenu",submenuLink:"ArticleHeader-module-scss-module__W_gXQa__submenuLink",submenuOpen:"ArticleHeader-module-scss-module__W_gXQa__submenuOpen",subscribe:"ArticleHeader-module-scss-module__W_gXQa__subscribe",subscribeButton:"ArticleHeader-module-scss-module__W_gXQa__subscribeButton",vfbutton:"ArticleHeader-module-scss-module__W_gXQa__vfbutton",viafoura:"ArticleHeader-module-scss-module__W_gXQa__viafoura",visible:"ArticleHeader-module-scss-module__W_gXQa__visible"})},123038,e=>{e.v({badge:"BreakingBar-module-scss-module__M8Nv1a__badge",breakingBar:"BreakingBar-module-scss-module__M8Nv1a__breakingBar",breakingBarContainer:"BreakingBar-module-scss-module__M8Nv1a__breakingBarContainer",closeBtn:"BreakingBar-module-scss-module__M8Nv1a__closeBtn",content:"BreakingBar-module-scss-module__M8Nv1a__content",title:"BreakingBar-module-scss-module__M8Nv1a__title"})},170979,e=>{e.v({closeButton:"ArticleSideMenu-module-scss-module__BCgKKW__closeButton",container:"ArticleSideMenu-module-scss-module__BCgKKW__container",fadeIn:"ArticleSideMenu-module-scss-module__BCgKKW__fadeIn",header:"ArticleSideMenu-module-scss-module__BCgKKW__header",menu:"ArticleSideMenu-module-scss-module__BCgKKW__menu",open:"ArticleSideMenu-module-scss-module__BCgKKW__open",overlay:"ArticleSideMenu-module-scss-module__BCgKKW__overlay",searchButton:"ArticleSideMenu-module-scss-module__BCgKKW__searchButton",searchContainer:"ArticleSideMenu-module-scss-module__BCgKKW__searchContainer"})},278824,e=>{e.v({item:"ArticleSideMenuItem-module-scss-module__Y8ctQW__item",label:"ArticleSideMenuItem-module-scss-module__Y8ctQW__label",open:"ArticleSideMenuItem-module-scss-module__Y8ctQW__open",subMenu:"ArticleSideMenuItem-module-scss-module__Y8ctQW__subMenu",subMenuItem:"ArticleSideMenuItem-module-scss-module__Y8ctQW__subMenuItem"})},13979,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(770703),s=e.i(561612);let n=()=>e.A(541881),i=(0,l.default)(n,{ssr:!1});e.s(["default",0,function(){let{isOpen:e}=(0,s.useForYouContext)(),[l,n]=(0,a.useState)(!1);return e&&!l&&n(!0),l?(0,t.jsx)(i,{}):null},"preloadForYouExperience",0,()=>{n()}])},74176,e=>{e.v({label:"ForYouLabel-module-scss-module__nVxWaq__label",text:"ForYouLabel-module-scss-module__nVxWaq__text"})},831305,e=>{e.v({button:"ForYouNavItem-module-scss-module__fcDXJq__button",item:"ForYouNavItem-module-scss-module__fcDXJq__item",separator:"ForYouNavItem-module-scss-module__fcDXJq__separator"})},243306,e=>{e.v({active:"HomepageSubnav-module-scss-module__fvkh7W__active",hasBreakingBar:"HomepageSubnav-module-scss-module__fvkh7W__hasBreakingBar",mobileCollapsedHidden:"HomepageSubnav-module-scss-module__fvkh7W__mobileCollapsedHidden",subnav:"HomepageSubnav-module-scss-module__fvkh7W__subnav",tab:"HomepageSubnav-module-scss-module__fvkh7W__tab",tabs:"HomepageSubnav-module-scss-module__fvkh7W__tabs"})},853819,e=>{"use strict";var t=e.i(271645),a=e.i(387644),l=e.i(135517);let s=()=>{let e=window.dataLayer;if(e&&e.length>0){let t=e.find(e=>e.page_type&&("node"===e.entityType||"taxonomy_term"===e.entityType||"homepage"===e.entityType||"user"===e.entityType));if(t){let e=t.page_type;switch(e){case"homepage":return"NWUS-HOME";case"article":return"NWUS-ARTICLE";case"categories":if("categories"in t&&t.categories){let e=t.categories.toUpperCase();return`NWUS-${e}`}return"NWUS-CATEGORY";case"topic":return"NWUS-TOPIC";case"authors":return"NWUS-AUTHOR";default:{let t=String(e).charAt(0).toUpperCase()+String(e).slice(1);return`NWUS-${t}`}}}}let t=window.location.hostname,a=window.location.pathname;if(t.startsWith("ranking."))return"NWUS-RANKING";if(t.startsWith("magazine."))return"NWUS-MAGAZINE";if("www.newsweek.com"===t||"newsweek.com"===t||"localhost"===t){if("/"===a||""===a)return"NWUS-HOME";if(a.startsWith("/topic/"))return"NWUS-TOPIC";if(a.startsWith("/authors/"))return"NWUS-AUTHOR";if(a.startsWith("/sports/"))return"NWUS-SPORTS";let e=a.match(/^\/([^/]+)$/);if(e){let t=e[1];if(/^[a-z]+$/.test(t)&&t.length<20){let e=t.charAt(0).toUpperCase()+t.slice(1);return`NWUS-${e}`}}}return"NWUS-ARTICLE"};var n=e.i(233655);e.s(["default",0,function(){let e=(0,t.useRef)("NWUS-ARTICLE"),i=(0,t.useRef)(new Set),r=(0,t.useCallback)(e=>{var t;let s,n,{detail:r}=e,o={...r,trsource:r?.trsource||(0,l.setTrsource)(),paywall_referrer:void 0!==r?.paywall_referrer?r.paywall_referrer:localStorage.getItem("paywallReferrer")},d=(t=()=>{(0,a.sendGTMEvent)(o),i.current.delete(d)},s=null,n=null,s=setTimeout(()=>{t(),s=null,n=null},200),requestAnimationFrame(()=>{n=setTimeout(()=>{s&&clearTimeout(s),t(),s=null,n=null},50)}),()=>{s&&(clearTimeout(s),s=null),n&&(clearTimeout(n),n=null)});i.current.add(d)},[]);return(0,t.useEffect)(()=>{e.current=s();let t=new AbortController,{signal:l}=t,o=[],d=null,u=i.current,c=t=>{try{if(!t||t.nodeType!==Node.ELEMENT_NODE)return;let l=null,n=t.tagName;if(!(l="A"===n||"BUTTON"===n?t:t.closest("a, button")))return;let i=null,r=null,o=null,d=null,u=l;for(;u&&u!==document.body;){let e=u.dataset;if(void 0!==e.gtmSkip){i=u;break}if(!r&&e.gtmAction&&(r=u),!o&&e.gtmCategory&&(o=u),!d&&e.gtmType&&(d=u),r&&o)break;u=u.parentElement}if(i)return;if(!r&&"A"===l.tagName){let t=l.getAttribute("href")||"",n=l.dataset.gtmText||l.textContent?.trim()||"",i=n&&t?`${n} / ${t}`:t||n,r=t.startsWith("/")||t.includes("newsweek.com"),o=e.current;o||(e.current=o=s());let d={event:"analyticsEvent",eventCategory:"NWUS-Subscribe"===o?"Subscription":o,eventAction:`Content_${r?"Internal_Link":"External_Link"}`,eventLabel:i,eventType:"Link",generic_section:"Content",generic_type:"Link",link_destination:r?"internal":"external"};(0,a.sendGTMEvent)(d);return}let c=l.dataset,m=r?.dataset.gtmAction||"",_=o?.dataset.gtmCategory||e.current||s(),f=l.getAttribute("href")||"",h=c.gtmText||l.textContent?.trim()||"",g=h&&f?`${h} / ${f}`:f||h,p="Link";if(d?.dataset.gtmType?p=d.dataset.gtmType:l.matches("img, svg")?p="Image":l.firstElementChild&&l.firstElementChild.matches("img, svg")&&(p="Image"),_&&m&&g){let e={event:"analyticsEvent",eventCategory:"NWUS-Subscribe"===_?"Subscription":_,eventAction:m,eventLabel:g,eventType:p};(0,a.sendGTMEvent)(e)}}catch(e){"reportError"in window&&window.reportError(e)}};return document.addEventListener("click",e=>{if(e.defaultPrevented||void 0!==e.button&&0!==e.button)return;let t=e.target;t&&t.nodeType===Node.ELEMENT_NODE&&(0===o.length&&(null!==d&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{d=null,(()=>{if(0===o.length)return;let e=o.splice(0);"scheduler"in window&&"postTask"in window.scheduler?e.forEach(e=>{window.scheduler.postTask(()=>{c(e)},{priority:"background"})}):(0,n.safeRequestIdleCallback)(()=>{e.forEach(e=>{c(e)})},{timeout:1e3})})()})),o.push(t))},{passive:!0,capture:!1,signal:l}),document.addEventListener("triggerGTMEvent",r,{signal:l}),window.addEventListener("message",e=>{let t=e.data;if(!t||"triggerGTMEvent"!==t.type)return;let a=new CustomEvent("triggerGTMEvent",{detail:{...t.detail,eventLabel:t.detail.eventLabel?t.detail.eventLabel:""!==window.document.referrer?window.document.referrer:window.location.href}});document.dispatchEvent(a)},{signal:l}),()=>{t.abort(),null!==d&&cancelAnimationFrame(d),u.forEach(e=>e()),u.clear()}},[r]),null}],853819)},606137,e=>{e.v({tray:"GlobalHeader-module-scss-module__CzWG2q__tray"})},385596,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(343794),s=e.i(618566),n=e.i(825536);let i=({width:e=12,height:a=12,color:l="black",rotate:s=0})=>(0,t.jsx)("svg",{width:e,height:a,viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${s}deg)`,transition:"transform 0.3s ease"},children:(0,t.jsx)("path",{fill:l,d:"M11.6035 0.907227L6 6.51074L0.396484 0.907227L1.10352 0.200195L6 5.09668L10.8965 0.200195L11.6035 0.907227Z"})});var r=e.i(278824);let o=({item:e,onItemClicked:s})=>{let[o,d]=(0,a.useState)(!1);return(0,t.jsxs)("li",{className:r.default.item,children:[(0,t.jsx)("div",{role:"button",tabIndex:0,className:(0,l.default)(r.default.label,{[r.default.open]:o}),onClick:()=>d(!o),onKeyDown:e=>{"Enter"===e.key&&d(!o)},children:e.subMenu.length?(0,t.jsxs)(t.Fragment,{children:[e.label,(0,t.jsx)(i,{})]}):(0,t.jsx)(n.default,{href:e.url,"data-gtm-action":"Header_burger_Menu_Link_1","data-gtm-text":e.label,size:"large",variant:"primary",underline:!1,children:e.label})}),!!e.subMenu.length&&(0,t.jsx)("div",{className:(0,l.default)(r.default.subMenu,{[r.default.open]:o}),children:e.subMenu.map((e,a)=>(0,t.jsx)(n.default,{href:e.url,onClick:s,className:r.default.subMenuItem,variant:"secondary",size:"default",underline:!1,"data-gtm-action":`Header_burger_Menu_Link_${a+1}`,"data-gtm-text":e.label,children:e.label},a))})]})};var d=e.i(13979),u=e.i(475524),c=e.i(525803),m=e.i(74176);let _=()=>(0,t.jsxs)("span",{className:m.default.label,children:[(0,t.jsx)(c.default,{src:"/NW-icon-alt.svg",alt:"",width:20,height:20}),(0,t.jsx)("span",{className:m.default.text,children:"For You"}),(0,t.jsx)(u.default,{text:"BETA",variant:"beta",size:"small",rounded:!0,noClickable:!0})]}),f=e=>(0,t.jsx)("svg",{height:"20",width:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 330 330",...e,children:(0,t.jsx)("path",{d:"M15 180h263.787l-49.394 49.394c-5.858 5.857-5.858 15.355 0 21.213C232.322 253.535 236.161 255 240 255s7.678-1.465 10.606-4.394l75-75c5.858-5.857 5.858-15.355 0-21.213l-75-75c-5.857-5.857-15.355-5.857-21.213 0s-5.858 15.355 0 21.213L278.787 150H15c-8.284 0-15 6.716-15 15s6.716 15 15 15"})});var h=e.i(40140);let g=({onClick:e})=>{let{GTMEventTracker:a}=(0,h.useGTMEventTracker)(),l=()=>{a({event:"analyticsEvent",eventCategory:"AI Homepage",eventAction:"header_burger_click_forYou",eventLabel:`${document.title} / ${window.location.href}`}),e()};return(0,t.jsx)("li",{className:r.default.item,children:(0,t.jsxs)("div",{role:"button",tabIndex:0,className:r.default.label,onClick:l,onKeyDown:e=>{"Enter"===e.key&&l()},children:[(0,t.jsx)(_,{}),(0,t.jsx)(f,{"aria-hidden":"true"})]})})};var p=e.i(515148),v=e.i(561612),x=e.i(686511),b=e.i(170979);let w=({onClickOutside:e,open:s,headerData:n,setArticleSideMenuOpen:i})=>{let{ref:r}=(0,x.useClickOutside)({onClickOutside:e}),{canAccessForYou:u,openForYou:c}=(0,v.useForYouContext)();(0,a.useEffect)(()=>{s&&u&&(0,d.preloadForYouExperience)()},[s,u]);let m=(0,a.useRef)(null),_=(0,a.useRef)(null),f=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(s){f.current=document.activeElement;let e=document.querySelector("main"),t=document.querySelector('nav:not([class*="ArticleSideMenu"])');e&&(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")),t&&(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true")),setTimeout(()=>{m.current?.focus()},100)}else{let e=document.querySelector("main"),t=document.querySelector('nav:not([class*="ArticleSideMenu"])');e&&(e.removeAttribute("inert"),e.removeAttribute("aria-hidden")),t&&(t.removeAttribute("inert"),t.removeAttribute("aria-hidden")),f.current&&f.current.focus()}},[s]),(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("div",{className:b.default.overlay,onClick:()=>i(!1),"aria-hidden":"true"}),(0,t.jsxs)("div",{className:(0,l.default)(b.default.container,{[b.default.open]:s}),ref:e=>{r&&"current"in r&&(r.current=e),"current"in _&&(_.current=e)},onKeyDown:e=>{if(s){if("Escape"===e.key)return void i(!1);if("Tab"===e.key){let t=_.current?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!t||0===t.length)return;let a=t[0],l=t[t.length-1];e.shiftKey?document.activeElement===a&&(e.preventDefault(),l.focus()):document.activeElement===l&&(e.preventDefault(),a.focus())}}},role:"dialog","aria-modal":"true","aria-label":"Navigation menu",tabIndex:-1,onMouseDown:e=>e.preventDefault(),children:[(0,t.jsx)("div",{className:b.default.header,children:(0,t.jsx)("button",{ref:m,className:b.default.closeButton,onClick:()=>i(!1),"aria-label":"Close menu",type:"button",children:(0,t.jsx)(p.default,{})})}),(0,t.jsxs)("ul",{className:b.default.menu,children:[u&&(0,t.jsx)(g,{onClick:()=>{c(),i(!1)}}),n?.map((e,a)=>(0,t.jsx)(o,{item:e,onItemClicked:()=>i?.(!1)},a))]})]})]})};var C=e.i(384644),j=e.i(831305);let y=({onClick:e})=>{let{GTMEventTracker:a}=(0,h.useGTMEventTracker)();return(0,t.jsxs)("li",{className:j.default.item,role:"none",children:[(0,t.jsx)("span",{className:j.default.separator,"aria-hidden":"true"}),(0,t.jsx)("button",{type:"button",className:j.default.button,onClick:()=>{a({event:"analyticsEvent",eventCategory:"AI Homepage",eventAction:"header_nav_click_forYou",eventLabel:`${document.title} / ${window.location.href}`}),e()},onPointerEnter:d.preloadForYouExperience,onFocus:d.preloadForYouExperience,onTouchStart:d.preloadForYouExperience,children:(0,t.jsx)(_,{})})]})};var A=e.i(243306);let k=({tabs:e,handleTabChange:a,isTabSelected:s,className:n})=>(0,t.jsx)("div",{className:(0,l.default)(A.default.tabs,n),role:"tablist",children:e.map(e=>(0,t.jsx)("button",{type:"button",role:"tab",id:`homepage-tab-${e.id}`,"aria-selected":s(e.id),"aria-controls":"latest"===e.id?"homepage-panel-latest":void 0,className:(0,l.default)(A.default.tab,"text-system-semibold-sm",{[A.default.active]:s(e.id)}),onClick:()=>a(e.id),children:"forYou"===e.id?(0,t.jsx)(_,{}):e.label},e.id))}),N=e=>(0,t.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_14522_2640)",children:[(0,t.jsx)("path",{d:"M15.3332 12.6667V14H0.666504V12.6667H15.3332Z",fill:"#1F1E19"}),(0,t.jsx)("path",{d:"M15.3332 2V3.33333H0.666504V2H15.3332Z",fill:"#1F1E19"}),(0,t.jsx)("path",{d:"M15.3332 7.33333V8.66667H0.666504V7.33333H15.3332Z",fill:"#1F1E19"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_14522_2640",children:(0,t.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),L=({size:e=24,...l})=>{let s=(0,a.useId)();return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,...l,children:[(0,t.jsxs)("g",{clipPath:`url(#${s})`,children:[(0,t.jsx)("path",{d:"M11.4797 7.39584V16.9714H13.7621V20.4821H5.4528V16.9714H7.58856V3.48336H5.4528V0.10824H5.4504V0H0V24H24V20.4821H20.7254L11.4797 7.39584Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M11.1855 0L20.1104 12.653V3.48336H17.8578V0H11.1855Z",fill:"currentColor"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:s,children:(0,t.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})};var S=e.i(358444),H=e.i(529546);let E=({visible:e,onSideMenuToggle:a,sideMenuBtnRef:s,...i})=>{let{canAccessForYou:r}=(0,v.useForYouContext)();return(0,t.jsxs)("div",{className:(0,l.default)(H.default.collapsedNav,{[H.default.visible]:e}),"aria-label":"Homepage navigation","aria-hidden":!e,children:[(0,t.jsxs)("div",{className:H.default.brand,children:[(0,t.jsx)(n.default,{href:"#",className:H.default.sideMenuBtn,ref:s,onClick:a,"aria-label":"Toggle navigation menu",tabIndex:e?0:-1,children:(0,t.jsx)(N,{})}),!r&&(0,t.jsx)(n.default,{href:S.NEWSWEEK_BASE_URL,className:H.default.logo,"aria-label":"Newsweek Home",tabIndex:e?0:-1,children:(0,t.jsx)(L,{size:20})})]}),(0,t.jsx)(k,{...i,className:H.default.tabs})]})},M=({hasBreakingBar:e=!1,isMobileCollapsed:a=!1,...s})=>(0,t.jsx)("nav",{className:(0,l.default)(A.default.subnav,{[A.default.hasBreakingBar]:e,[A.default.mobileCollapsedHidden]:a}),"aria-label":"Homepage sections",children:(0,t.jsx)(k,{...s})}),W=[{id:"latest",label:"Latest"},{id:"forYou",label:"For You"}],I=({isMobile:e,isCollapsed:l,hasBreakingBar:s=!1,onSideMenuToggle:n,sideMenuBtnRef:i})=>{let r=(()=>{let[e,t]=(0,a.useState)("latest"),{openForYou:l,closeForYou:s,isOpen:n,canAccessForYou:i}=(0,v.useForYouContext)(),{GTMEventTracker:r}=(0,h.useGTMEventTracker)();(0,a.useEffect)(()=>{n||"forYou"!==e||t("latest")},[n,e]);let o="latest"===e&&!n,d=n||"forYou"===e;return{tabs:W,handleTabChange:a=>{if("forYou"===a){if(!i||n)return;r({event:"analyticsEvent",eventCategory:"Homepage",eventAction:"Subnav Tab Click",eventLabel:"For You"}),l(),t("forYou");return}("latest"!==e||n)&&(r({event:"analyticsEvent",eventCategory:"Homepage",eventAction:"Subnav Tab Click",eventLabel:"Latest"}),s(),t("latest"))},isLatestSelected:o,isForYouSelected:d,isTabSelected:e=>"latest"===e?o:d}})();return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(E,{...r,visible:l,onSideMenuToggle:n,sideMenuBtnRef:i}),(0,t.jsx)(M,{...r,isMobileCollapsed:l,hasBreakingBar:s})]})};var T=e.i(876362),B=e.i(33783),F=e.i(645221),V=e.i(31499),O=e.i(534845),R=e.i(990527);let D=e=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:(0,t.jsx)("path",{d:"M12.2761 7.99999L4.80477 15.4713L3.86206 14.5286L10.3907 7.99999L3.86206 1.47135L4.80477 0.528641L12.2761 7.99999Z",fill:"#1F1E19"})});var P=e.i(40387);let Z="/myaccount",Q=({open:e,onClickOutside:s,setOpen:i})=>{let{ref:r}=(0,x.useClickOutside)({onClickOutside:s}),{logout:o}=(0,V.useAuthContext)(),d=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>d.current?.focus(),100);return()=>clearTimeout(t)},[e]),(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)("div",{className:O.default.overlay,onClick:()=>i(!1),"aria-hidden":"true"}),(0,t.jsxs)("div",{className:(0,l.default)(O.default.container,{[O.default.open]:e}),ref:r,onKeyDown:e=>{"Escape"===e.key&&i(!1)},role:"dialog","aria-modal":"true","aria-label":"Account menu",children:[(0,t.jsxs)("div",{className:O.default.header,children:[(0,t.jsxs)("div",{className:O.default.title,children:[(0,t.jsx)(F.default,{variant:"brand",size:20,"aria-hidden":"true"}),(0,t.jsx)("span",{children:"Account"})]}),(0,t.jsx)(C.default,{ref:d,rounded:!0,className:O.default.closeButton,onClick:()=>i(!1),"aria-label":"Close menu",children:(0,t.jsx)(p.default,{height:16,width:16})})]}),(0,t.jsx)(T.Divider,{}),(0,t.jsxs)("nav",{className:O.default.menu,children:[(0,t.jsxs)("div",{className:O.default.subMenu,children:[(0,t.jsxs)(n.default,{href:`${Z}#membership`,className:O.default.navItemClass,underline:!1,external:!0,onClick:()=>i(!1),children:[(0,t.jsx)("span",{className:"text-system-regular-md",children:"Membership"}),(0,t.jsx)(D,{})]}),(0,t.jsxs)(n.default,{href:`${Z}#profile`,className:O.default.navItemClass,underline:!1,external:!0,onClick:()=>i(!1),children:[(0,t.jsx)("span",{className:"text-system-regular-md",children:"Profile & Login"}),(0,t.jsx)(D,{})]})]}),(0,t.jsx)(T.Divider,{}),(0,t.jsxs)("div",{className:O.default.subMenu,children:[(0,t.jsxs)(n.default,{href:`${Z}#following`,className:O.default.navItemClass,underline:!1,external:!0,onClick:()=>i(!1),children:[(0,t.jsx)("span",{className:"text-system-regular-md",children:"Following"}),(0,t.jsx)(D,{})]}),(0,t.jsxs)(n.default,{href:`${Z}#newsletters`,className:O.default.navItemClass,underline:!1,external:!0,onClick:()=>i(!1),children:[(0,t.jsx)("span",{className:"text-system-regular-md",children:"Newsletters"}),(0,t.jsx)(D,{})]})]}),(0,t.jsx)(T.Divider,{}),(0,t.jsxs)("div",{className:O.default.subMenu,children:[(0,t.jsxs)(n.default,{href:`mailto:${B.SUPPORT_EMAIL}`,className:(0,l.default)(O.default.navItemWithIcon),children:[(0,t.jsx)(P.default,{fill:"#1F1E0A"}),(0,t.jsx)("span",{className:"text-system-regular-md",children:"Get Support"})]}),(0,t.jsxs)(n.default,{className:(0,l.default)(O.default.navButton,O.default.navItemWithIcon),onClick:()=>{i(!1),o()},children:[(0,t.jsx)(R.default,{}),(0,t.jsx)("span",{className:"text-system-regular-md",children:"Sign Out"})]})]})]})]})]})};var $=e.i(657688);let X=({width:e=12,height:a=12,color:l="#1F1E19",rotate:s=0})=>(0,t.jsx)("svg",{width:e,height:a,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${s}deg)`,transition:"transform 0.3s ease"},children:(0,t.jsx)("path",{d:"M11.6035 3.90723L6 9.51074L0.396484 3.90723L1.10352 3.2002L6 8.09668L10.8965 3.2002L11.6035 3.90723Z",fill:l})});function U({menuData:e,styles:s,className:i,role:r="menubar",trailingSlot:o}){let[d,u]=(0,a.useState)(null),{GTMEventTracker:c}=(0,h.useGTMEventTracker)(),m=(e,t)=>{"open"===t?u(e):"close"===t?u(null):u(d===e?null:e)};return(0,t.jsxs)("ul",{className:(0,l.default)(s.menu,i),role:r,children:[e?.map((e,a)=>{let i=`menu-${a}`,r=e.subMenu?.length>0,o=d===i;return(0,t.jsx)("li",{className:(0,l.default)(s.item,{[s.menuItemWithSubMenu]:r,[s.menuItemOpen]:o}),role:"none",onMouseEnter:()=>r&&m(i,"open"),onMouseLeave:()=>r&&m(i,"close"),children:r?(0,t.jsxs)("div",{className:s.menuItemContainer,children:[(0,t.jsx)(n.default,{href:e.url,className:s.menuLink,"data-gtm-action":`Header_Nav_Menu_Link_${a+1}`,"data-gtm-text":e.label,"aria-label":`${e.label} menu`,onClick:()=>{c({event:"analyticsEvent",eventCategory:"Recirculation",eventAction:`header_nav_click_${e.url}`,eventLabel:window.location.href})},trailing:(0,t.jsx)("span",{id:`${i}-disclosure`,className:s.disclosureButton,role:"button","aria-haspopup":"menu","aria-expanded":o,"aria-controls":`${i}-submenu`,"aria-label":`${o?"Close":"Open"} ${e.label} submenu`,tabIndex:0,onClick:e=>{e.preventDefault(),e.stopPropagation(),m(i,"toggle")},onKeyDown:e=>((e,t)=>{let a=d===t;switch(e.key){case"Enter":case" ":e.preventDefault(),a?m(t,"close"):(m(t,"open"),setTimeout(()=>{let e=document.querySelector(`#${t}-submenu [role="menuitem"]`);e?.focus()},50));break;case"ArrowDown":e.preventDefault(),a||(m(t,"open"),setTimeout(()=>{let e=document.querySelector(`#${t}-submenu [role="menuitem"]`);e?.focus()},50));break;case"Escape":if(a){e.preventDefault(),m(t,"close");let a=document.getElementById(`${t}-disclosure`);a?.focus()}}})(e,i),children:(0,t.jsx)(X,{})}),children:e.label}),(0,t.jsx)("ul",{id:`${i}-submenu`,className:(0,l.default)(s.submenu,{[s.submenuOpen]:o}),role:"menu","aria-labelledby":`${i}-disclosure`,children:e.subMenu?.map((l,i)=>(0,t.jsx)("li",{role:"none",children:(0,t.jsxs)(n.default,{href:l.url,className:s.submenuLink,"data-gtm-action":`Header_Nav_Menu_Link_${a+1}`,"data-gtm-text":e.label,size:"default",onClick:()=>{console.log("clicked",l.url),c({event:"analyticsEvent",eventCategory:"Recirculation",eventAction:`header_nav_click_${l.url}`,eventLabel:window.location.href})},children:["newsletters"===e.label.toLowerCase()&&l.img&&(0,t.jsx)($.default,{src:l.img,alt:"",width:24,height:24,className:s.menuItemIcon}),(0,t.jsx)("span",{className:s.menuItemText,children:l.label})]})},i))})]}):(0,t.jsx)(n.default,{href:e.url,className:s.menuLink,underline:!1,"data-gtm-action":`Header_Nav_Menu_Link_${a+1}`,"data-gtm-text":e.label,onClick:()=>{c({event:"analyticsEvent",eventCategory:"Recirculation",eventAction:`header_nav_click_${e.url}`,eventLabel:window.location.href})},children:e.label})},e.label||a)}),o]})}var z=e.i(198768);let q=e=>(0,t.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_16541_3474)",children:[(0,t.jsx)("path",{d:"M11.9993 5.99984C11.9993 3.7907 10.2085 1.99984 7.99935 1.99984C5.79043 2.00008 3.99935 3.79085 3.99935 5.99984V9.51025L3.91211 9.6639L2.96029 11.3332H13.0397L12.0879 9.6639L11.9993 9.51025V5.99984ZM13.3327 9.15478L15.334 12.6665H0.666016L2.66602 9.15739V5.99984C2.66602 3.05447 5.05405 0.666746 7.99935 0.666504C10.9449 0.666504 13.3327 3.05432 13.3327 5.99984V9.15478Z",fill:"#1F1E19"}),(0,t.jsx)("path",{d:"M9.33333 13.9998V15.3332H6.66666V13.9998H9.33333Z",fill:"#1F1E19"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_16541_3474",children:(0,t.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),Y=({width:e=157,height:a=24,...l})=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:a,viewBox:"0 0 157 24",fill:"none",color:"var(--foreground-default)",...l,children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_16266_5748)",children:[(0,t.jsx)("path",{d:"M56.3732 10.439H58.3201L56.7654 16.4171L53.4529 6.7124H50.567L47.3107 16.4218L45.7342 10.439H47.8482V6.7124H39.5576V10.439H41.0342L45.2295 23.4952H48.6201L52.0107 13.5858L55.3998 23.4952H58.6561L62.4154 10.439H63.6576V6.7124H56.3732V10.439Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M31.547 6.47812C25.9407 6.47812 22.9204 10.2375 22.9204 15.2719C22.9204 20.3063 26.2767 23.9984 31.3782 23.9984C35.9439 23.9984 38.6626 21.5141 39.2657 18.1578H34.7345C34.4657 19.3656 33.4923 20.1375 31.647 20.1375C29.3017 20.1375 28.0376 18.7344 27.7985 16.5125H39.5689V15.6063C39.5689 10.2688 36.6814 6.47656 31.547 6.47656V6.47812ZM31.547 10.1703C33.4517 10.1703 34.536 11.3656 34.8017 13.4938H27.847C28.197 11.3016 29.5392 10.1703 31.547 10.1703Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M23.4297 0H14.2313V3.99375H16.8156V14.5141L6.57813 0H0V3.99375H2.45V19.4688H0V23.4953H9.53282V19.4688H6.91407V8.48281L17.5219 23.4953H21.2813V3.99375H23.4297V0Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M130.286 6.47812C124.679 6.47812 121.659 10.2375 121.659 15.2719C121.659 20.3063 125.015 23.9984 130.117 23.9984C134.681 23.9984 137.401 21.5141 138.004 18.1578H133.473C133.204 19.3656 132.231 20.1375 130.386 20.1375C128.04 20.1375 126.776 18.7344 126.537 16.5125H138.308V15.6063C138.308 10.2688 135.42 6.47656 130.286 6.47656V6.47812ZM130.286 10.1703C132.19 10.1703 133.275 11.3656 133.54 13.4938H126.586C126.936 11.3016 128.278 10.1703 130.286 10.1703Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M73.9296 13.4594L71.0421 12.5876C69.7999 12.2172 69.364 11.8485 69.364 11.1438C69.364 10.3719 70.0687 9.83442 71.0421 9.83442C72.8202 9.83442 73.9624 11.311 74.3312 12.1501H77.9233V6.71255H73.9952V8.09849C73.2983 7.27349 72.0921 6.51099 70.2015 6.51099C67.214 6.51099 64.6968 8.45786 64.6968 11.4782C64.6968 14.4985 66.6765 15.8422 68.8593 16.4797L72.2499 17.486C73.3921 17.8219 73.8608 18.2922 73.8608 18.9626C73.8608 19.8016 73.3233 20.4047 72.2155 20.4047C70.1671 20.4047 69.0124 18.9954 68.6765 17.7204H64.7155V23.4938H68.9108V22.0266C69.914 23.1422 71.4937 23.7969 72.9874 23.7969C76.4452 23.7969 78.5265 21.8501 78.5265 18.5938C78.5265 15.6407 76.6468 14.2641 73.928 13.4579L73.9296 13.4594Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M112.495 6.47812C106.889 6.47812 103.869 10.2375 103.869 15.2719C103.869 20.3063 107.225 23.9984 112.326 23.9984C116.892 23.9984 119.611 21.5141 120.214 18.1578H115.683C115.414 19.3656 114.441 20.1375 112.595 20.1375C110.25 20.1375 108.986 18.7344 108.747 16.5125H120.517V15.6063C120.517 10.2688 117.63 6.47656 112.495 6.47656V6.47812ZM112.495 10.1703C114.401 10.1703 115.484 11.3656 115.751 13.4938H108.797C109.147 11.3016 110.489 10.1703 112.497 10.1703H112.495Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M96.3171 10.439H98.264L96.7093 16.4171L93.3968 6.7124H90.5108L87.2546 16.4218L85.6765 10.439H87.7921V6.7124H79.5015V10.439H80.978L85.1733 23.4952H88.564L91.953 13.5858L95.3437 23.4952H98.5999L102.359 10.439H103.601V6.7124H96.3171V10.439Z",fill:"var(--foreground-default)"}),(0,t.jsx)("path",{d:"M154.178 19.7703L150.056 14.3344L153.498 10.4391H155.914V6.67969H151.248L145.173 13.6484V0H138.695V3.75938H140.809V19.7703H138.762V23.4953H147.086V19.7703H145.173V16.4813V14.9703L151.45 23.4953H153.367H156.25V19.8031V19.7703H154.178Z",fill:"var(--foreground-default)"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_16266_5748",children:(0,t.jsx)("rect",{width:"156.25",height:"24",fill:"white"})})})]}),K=e=>(0,t.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_16541_3476)",children:[(0,t.jsx)("path",{d:"M14.6667 8C14.6667 6.23189 13.9638 4.5367 12.7135 3.28646C11.4633 2.03622 9.76812 1.33333 8 1.33333C6.23189 1.33333 4.5367 2.03622 3.28646 3.28646C2.03622 4.5367 1.33333 6.23189 1.33333 8C1.33333 9.76812 2.03622 11.4633 3.28646 12.7135C4.5367 13.9638 6.23189 14.6667 8 14.6667C9.76813 14.6667 11.4633 13.9638 12.7135 12.7135C13.9638 11.4633 14.6667 9.76813 14.6667 8ZM16 8C16 10.1217 15.1565 12.156 13.6562 13.6562C12.156 15.1565 10.1217 16 8 16C5.87827 16 3.84404 15.1565 2.34375 13.6562C0.843465 12.156 0 10.1217 0 8C0 5.87827 0.84346 3.84404 2.34375 2.34375C3.84404 0.84346 5.87827 0 8 0C10.1217 0 12.156 0.843465 13.6562 2.34375C15.1565 3.84404 16 5.87827 16 8Z",fill:"#1F1E19"}),(0,t.jsx)("path",{d:"M8.00004 10.6667C11.1224 10.6667 13.1927 11.7369 13.9297 12.1901L13.2318 13.3255C12.6416 12.9626 10.8108 12 8.00004 12C5.18922 12 3.35847 12.9626 2.76827 13.3255L2.07035 12.1901C2.80735 11.7369 4.87764 10.6667 8.00004 10.6667Z",fill:"#1F1E19"}),(0,t.jsx)("path",{d:"M10.3333 6.33333C10.3333 5.7145 10.0873 5.12118 9.64974 4.68359C9.26682 4.30068 8.76467 4.06473 8.23047 4.01172L8 4C7.38116 4 6.78785 4.24601 6.35026 4.68359C5.91268 5.12118 5.66667 5.7145 5.66667 6.33333L5.67839 6.5638C5.7314 7.098 5.96734 7.60016 6.35026 7.98307C6.78785 8.42066 7.38116 8.66667 8 8.66667C8.61884 8.66667 9.21215 8.42066 9.64974 7.98307C10.0873 7.54549 10.3333 6.95217 10.3333 6.33333ZM11.6667 6.33333C11.6667 7.30579 11.2801 8.23815 10.5924 8.92578C9.90481 9.61341 8.97246 10 8 10C7.02754 10 6.09519 9.61341 5.40755 8.92578C4.80578 8.32401 4.43483 7.53484 4.35156 6.69531L4.33333 6.33333C4.33333 5.36087 4.71992 4.42852 5.40755 3.74089C6.09519 3.05325 7.02754 2.66667 8 2.66667L8.36198 2.6849C9.20151 2.76816 9.99067 3.13911 10.5924 3.74089C11.2801 4.42852 11.6667 5.36087 11.6667 6.33333Z",fill:"#1F1E19"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_16541_3476",children:(0,t.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]});var G=e.i(854321),J=e.i(398143),ee=e.i(466827),et=e.i(476411);function ea(e){if(!e)return!1;let t=!!(e.label&&e.label.trim().length>0),a=!!(e.title&&e.title.trim().length>0||e.post?.title&&e.post.title.trim().length>0);return t&&a}var el=e.i(612615),es=e.i(123038),en=e.i(939761),ei=e.i(68012);function er({className:e,onClose:a,data:s}){if(!ea(s))return null;let n=s.title?.trim()||s.post?.title;return(0,t.jsxs)("div",{className:(0,l.default)(es.default.breakingBarContainer,e),children:[(0,t.jsx)(en.NewsweekLink,{href:s?.post?.uri??"#",className:(0,l.default)(es.default.breakingBar),"aria-label":n,children:(0,t.jsxs)("div",{className:es.default.content,children:[(0,t.jsx)(u.default,{text:s.label,className:es.default.badge}),(0,t.jsx)("span",{className:(0,l.default)(es.default.title,"text-body-semibold-xs"),children:n})]})}),(0,t.jsx)("button",{type:"button",onClick:a,className:es.default.closeBtn,"aria-label":"Close breaking news",children:(0,t.jsx)(ei.default,{color:"#68645A","aria-hidden":"true",focusable:"false"})})]})}let eo=({menuData:e,breakingBarData:i,showBreakingBar:r=!0,setShowBreakingBar:o})=>{let{isAuthenticated:d,isActiveSubscriber:c}=(0,V.useAuthContext)(),{canAccessForYou:m,openForYou:_}=(0,v.useForYouContext)(),{openViafouraNotificationDrawer:f,userNotificationsCount:g}=(0,J.useViafouraContext)(),[p,x]=(0,a.useState)(!1),{isRankingsSubdomain:b}=(0,G.useLayoutContext)(),{GTMEventTracker:j}=(0,h.useGTMEventTracker)(),A=e.primary,k=e.hamburger,L=(0,a.createRef)(),[H,E]=(0,a.useState)(!1),[M,W]=(0,a.useState)(!1),[T,B]=(0,a.useState)(!1),[F,O]=(0,a.useState)(!1),[R,D]=(0,a.useState)(!1),P=(0,a.useRef)(null),Z=(0,s.usePathname)(),$=(0,a.useMemo)(()=>Z?.includes("/subscribe"),[Z]),X=(0,a.useMemo)(()=>!c&&!$,[c,$]),es=(0,a.useRef)(!1),en=(0,a.useRef)(!1),ei=(0,a.useRef)(!1),eo=(0,a.useRef)(!1),ed=(0,a.useRef)(0),eu=(0,a.useRef)(null),{isMobile:ec,isTablet:em,isMobileXl:e_}=(0,ee.default)(),[ef,eh]=(0,a.useState)(!0);(0,a.useLayoutEffect)(()=>{eh(window.innerWidth>1279)},[]);let eg=(0,a.useMemo)(()=>"/"===Z,[Z]),ep=eg&&b,ev=ef&&!ec&&!em,ex=eg&&!ep,eb=eg&&!ep&&m,ew=eb&&ec&&T,eC=(0,a.useMemo)(()=>{if(eg)return!1;let e=Z.split("/").filter(Boolean),t=e[e.length-1];return e.length>0&&!!t&&/\d{6,}$/.test(t)},[Z,eg]),ej=(0,a.useMemo)(()=>Z?.startsWith("/myaccount"),[Z]),ey=(0,a.useMemo)(()=>ej&&e_,[ej,e_]),eA=(eg||eC)&&!b,ek=eg&&ev&&!T&&!b?"centered":"default",eN=(0,a.useMemo)(()=>eA&&r,[eA,r]),eL=(0,a.useCallback)(e=>{L.current!==e&&E(!1)},[]),eS=(0,a.useCallback)(e=>{e.preventDefault(),E(e=>!e)},[]),eH=(0,a.useCallback)(e=>{P.current?.contains(e)||W(!1)},[]),eE=(0,a.useCallback)(e=>{e.preventDefault(),W(e=>!e)},[]),eM=(0,a.useCallback)(()=>{o?.(!1)},[o]),eW=(0,a.useCallback)(e=>{e.preventDefault(),O(!0),setTimeout(()=>{j({event:"analyticsEvent",eventCategory:"Subscription",eventAction:"header_login_start",eventLabel:window.location.href}),x(!0),"btnLogin"in window&&window.btnLogin()},0)},[]),eI=(0,a.useCallback)(()=>{O(!1)},[]);(0,et.default)({prefix:"header_",subscribe:p,setSubscribe:x,options:{close_event:!0}});let eT=(0,a.useRef)(eg),eB=(0,a.useRef)(ec);return(0,a.useEffect)(()=>{eT.current=eg},[eg]),(0,a.useEffect)(()=>{eB.current=ec},[ec]),(0,a.useEffect)(()=>{window.addEventListener("stopLoading",eI);let e=null,t=null,a=!1,l=()=>{a||(e=requestAnimationFrame(()=>{let t,l,s,n,i;(l=(t=window.scrollY||0)>0)!==es.current&&(es.current=l,B(l)),(s=window.innerWidth<1220)&&en.current&&(en.current=!1,E(!1)),s&&ei.current&&(ei.current=!1,W(!1)),n=t>ed.current,i=eT.current&&eB.current,t<=0||i?eo.current&&(eo.current=!1,D(!1)):n&&t>80?eo.current||(eo.current=!0,D(!0)):!n&&eo.current&&(eo.current=!1,D(!1)),ed.current=t,a=!1,e=null}),a=!0)},s=()=>{null!==t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let e=(window.scrollY||0)>0;e!==es.current&&(es.current=e,B(e));let a=window.innerWidth<1220;a&&en.current&&(en.current=!1,E(!1)),a&&ei.current&&(ei.current=!1,W(!1)),t=null})};return window.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",s,{passive:!0}),()=>{window.removeEventListener("stopLoading",eI),window.removeEventListener("scroll",l),window.removeEventListener("resize",s),null!==e&&cancelAnimationFrame(e),null!==t&&cancelAnimationFrame(t)}},[eI]),(0,a.useEffect)(()=>{es.current=T},[T]),(0,a.useEffect)(()=>{en.current=H},[H]),(0,a.useEffect)(()=>{ei.current=M},[M]),(0,a.useEffect)(()=>{eo.current=R},[R]),(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)("div",{ref:eu,className:(0,l.default)(el.default.container,{[el.default.hiddenMobile]:R,[el.default.homepageMobileCollapsed]:ew}),children:[eN&&ea(i)&&(0,t.jsx)("div",{className:(0,l.default)(el.default.visible,el.default.breakingBarContainer),children:(0,t.jsx)(er,{onClose:eM,data:i})}),(0,t.jsxs)("nav",{className:(0,l.default)(el.default.navBar,{[el.default.centered]:"centered"===ek,[el.default.sideMenuOpen]:H,[el.default.hasScrolled]:T&&!ey}),children:[(0,t.jsx)("div",{className:el.default.left,children:(0,t.jsxs)("div",{className:el.default.brand,children:[k&&!$&&(0,t.jsx)(n.default,{href:"#",className:el.default.sideMenuBtn,ref:L,onClick:eS,"aria-label":"Toggle navigation menu","data-gtm-action":"Header_Hamburger_Menu","data-gtm-text":"Hamburger Menu",children:(0,t.jsx)(N,{})}),(0,t.jsx)(n.default,{href:S.NEWSWEEK_BASE_URL,className:el.default.logo,"aria-label":"Newsweek Home","data-gtm-action":"Header_NW_Logo","data-gtm-text":"Newsweek Logo",children:(0,t.jsx)(z.default,{variant:"default",height:24})})]})}),!$&&(0,t.jsxs)("div",{className:el.default.center,children:[(0,t.jsx)(n.default,{href:S.NEWSWEEK_BASE_URL,className:el.default.logoCentered,"aria-label":"Newsweek Home","aria-hidden":"centered"!==ek,"data-gtm-action":"Header_NW_Logo","data-gtm-text":"Newsweek Logo",children:(0,t.jsx)(Y,{})}),(0,t.jsx)(U,{menuData:A,styles:el.default,trailingSlot:m?(0,t.jsx)(y,{onClick:_}):void 0})]}),(0,t.jsxs)("div",{className:(0,l.default)(el.default.right),children:[X&&(0,t.jsx)(C.default,{variant:"primary",size:"small",className:el.default.subscribeButton,href:`${S.NEWSWEEK_BASE_URL}/subscribe`,onClick:()=>{j({event:"analyticsEvent",eventCategory:"Subscription",eventAction:"header_nav_click",eventLabel:window.location.href})},children:"Subscribe"}),(0,t.jsx)("div",{className:(0,l.default)(el.default.notificationBell,{[el.default.isAuthenticated]:d}),children:(0,t.jsx)("button",{id:"vfContainer",className:el.default.vfbutton,onClick:f,"aria-label":"Open notifications",children:(0,t.jsxs)("div",{className:"viafoura bellContainer",children:[(0,t.jsx)(q,{}),g>0&&(0,t.jsx)("div",{className:el.default.notificationCount,id:"vfNotificationCounter",children:(0,t.jsx)(u.default,{text:g.toString(),rounded:!0,variant:"breaking-news",size:"small"})})]})})}),!d&&(0,t.jsx)(C.default,{variant:"ghost",size:"small",className:(0,l.default)(el.default.loginButton,{[el.default.loading]:F}),buttonContainerClass:(0,l.default)("auth-hidden","signin-button"),onClick:eW,disabled:F,"data-gtm-action":"Header_Nav_Login_1","data-gtm-text":"Sign In",children:"Sign In"}),d&&(0,t.jsx)("div",{ref:P,className:el.default.accountMenuAnchor,children:(0,t.jsx)(C.default,{variant:"ghost",size:"small",className:(0,l.default)(el.default.loginButton,{[el.default.loading]:F,[el.default.loggedIn]:d}),buttonContainerClass:(0,l.default)("auth-hidden","myaccount-button"),onClick:eE,disabled:F,attributes:{"aria-expanded":M,"aria-haspopup":"dialog"},"data-gtm-action":"Header_Nav_Login_1","data-gtm-text":"My Account",children:(0,t.jsx)(K,{"aria-label":"my account"})})})]})]})]}),k&&!$&&(0,t.jsx)(w,{open:H,onClickOutside:eL,setArticleSideMenuOpen:E,headerData:k}),d&&(0,t.jsx)(Q,{open:M,onClickOutside:eH,setOpen:W}),(0,t.jsx)("div",{"data-header-spacer":!0,className:(0,l.default)(ex?el.default.homepageSpacer:el.default.headerSpacer,{[el.default.hasBreakingBar]:eN&&ea(i),[el.default.withSubnav]:eb})}),eb&&(0,t.jsx)(I,{isMobile:ec,isCollapsed:ew,hasBreakingBar:!!(eN&&ea(i)),onSideMenuToggle:eS,sideMenuBtnRef:L})]})};var ed=e.i(606137);e.s(["default",0,({menuData:e})=>{let[l,s]=(0,a.useState)(!0),[n,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{e.breakingBar&&ea(e.breakingBar)?s(!0):s(!1)},[e.breakingBar]),(0,a.useEffect)(()=>{i(!0)},[]),(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(eo,{menuData:e,breakingBarData:e.breakingBar,showBreakingBar:l,setShowBreakingBar:s}),(0,t.jsx)("div",{className:`viafoura ${ed.default.tray}`,children:n&&(0,t.jsx)("vf-tray",{})})]})}],385596)},670054,e=>{"use strict";e.i(247167);var t=e.i(843476),a=e.i(271645),l=e.i(3303),s=e.i(31499);e.s(["default",0,()=>{let[e,n]=(0,a.useState)(!1),{handleLoginUpdateState:i,isAuthenticated:r,authStatus:o}=(0,s.useAuthContext)(),d=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/piano/setDisplayName",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e.token})}),a=await t.json();"ok"===a.status?i():console.error("Error setting display name:",a)}catch(e){console.error("Error setting display name:",e)}},[]),u=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/googleonetap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({credential:e.credential,action_origin:"homepage"})}),a=await t.json();"ok"===a.status&&i()}catch(e){console.error("Error handling credential response:",e)}},[]),c=(0,a.useCallback)(()=>{if(window.google&&!r)try{window.google.accounts.id.initialize({client_id:"144500973655-a59hh235g37cgu1b50s8tu2gdv8epe7q.apps.googleusercontent.com",callback:u,context:"signin",ux_mode:"popup",auto_select:!1,use_fedcm_for_prompt:"IdentityCredential"in window,login_hint:!1}),window.google.accounts.id.prompt(e=>{e.isNotDisplayed()?console.debug("One Tap was not displayed:",e.getNotDisplayedReason()):e.isSkippedMoment()?console.debug("One Tap was skipped:",e.getSkippedReason()):e.isDismissedMoment()&&console.debug("One Tap was dismissed:",e.getDismissedReason())})}catch(e){e instanceof Error&&e.message.includes("Only one navigator.credentials.get request may be outstanding at one time")?(console.debug("FedCM request already in progress. Waiting before retrying..."),setTimeout(c,1e3)):console.error("Error initializing Google One Tap:",e)}},[u,r]);return(0,a.useEffect)(()=>{window.onUserInfoChanged=d,e&&"ready"===o&&!r&&c()},[e,c,o,d,r]),(0,t.jsx)(l.default,{src:"https://accounts.google.com/gsi/client",async:!0,defer:!0,onLoad:()=>n(!0),strategy:"lazyOnload"})}])},529546,e=>{e.v({brand:"HomepageCollapsedNav-module-scss-module__-u7W9a__brand",collapsedNav:"HomepageCollapsedNav-module-scss-module__-u7W9a__collapsedNav",logo:"HomepageCollapsedNav-module-scss-module__-u7W9a__logo",sideMenuBtn:"HomepageCollapsedNav-module-scss-module__-u7W9a__sideMenuBtn",tabs:"HomepageCollapsedNav-module-scss-module__-u7W9a__tabs",visible:"HomepageCollapsedNav-module-scss-module__-u7W9a__visible"})},844736,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(31499),s=e.i(72529);e.s(["default",0,()=>{let{pageOrigin:e}=(0,l.useAuthContext)();return(0,a.useEffect)(()=>{(0,s.safeClientLogger)(s.LogLevel.DEBUG,"LoadEnvVariables","pageOrigin in LoadEnvVariables",e),window.wo_pagetype=e.toString()},[e]),(0,t.jsx)(t.Fragment,{})}])},534845,e=>{e.v({closeButton:"MyAccountSideNav-module-scss-module__LDF9zq__closeButton",container:"MyAccountSideNav-module-scss-module__LDF9zq__container",fadeIn:"MyAccountSideNav-module-scss-module__LDF9zq__fadeIn",header:"MyAccountSideNav-module-scss-module__LDF9zq__header",menu:"MyAccountSideNav-module-scss-module__LDF9zq__menu",navButton:"MyAccountSideNav-module-scss-module__LDF9zq__navButton",navItem:"MyAccountSideNav-module-scss-module__LDF9zq__navItem",navItemClass:"MyAccountSideNav-module-scss-module__LDF9zq__navItemClass",navItemWithIcon:"MyAccountSideNav-module-scss-module__LDF9zq__navItemWithIcon",open:"MyAccountSideNav-module-scss-module__LDF9zq__open",overlay:"MyAccountSideNav-module-scss-module__LDF9zq__overlay",subMenu:"MyAccountSideNav-module-scss-module__LDF9zq__subMenu",title:"MyAccountSideNav-module-scss-module__LDF9zq__title"})},144889,e=>{e.v({isShown:"PaywallDrawer-module-scss-module__WUV-FW__isShown",paywallDrawer:"PaywallDrawer-module-scss-module__WUV-FW__paywallDrawer"})},409119,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(343794),s=e.i(618566),n=e.i(31499),i=e.i(854321),r=e.i(40140),o=e.i(227502),d=e.i(144889);e.s(["default",0,()=>{let e=(0,s.usePathname)(),{isRankingsSubdomain:u}=(0,i.useLayoutContext)(),{isAuthenticated:c,isPianoAvailable:m,setShouldReloadOnLogin:_}=(0,n.useAuthContext)(),{GTMEventTracker:f}=(0,r.useGTMEventTracker)(),[h,g]=(0,a.useState)(!1),p=(0,o.shouldShowPaywallDrawer)({pathname:e,isRankingsSubdomain:u,isRegistered:c}),v=(0,a.useRef)(p),x=(0,a.useRef)(()=>{}),b=`${e}:${p}`,[w,C]=(0,a.useState)(b);return(w!==b&&(C(b),g(!1)),(0,a.useLayoutEffect)(()=>{v.current=p,x.current=()=>{g(!1),f({event:"analyticsEvent",eventCategory:"Subscription",eventAction:"paywall_drawer_close",eventLabel:window.location.href})}},[p,f]),(0,a.useEffect)(()=>{m&&((0,o.pushPianoCommand)(["addHandler","customEvent",function(e){v.current&&"close"===e.eventName&&"#paywall-drawer"===e.containerSelector&&x.current()}]),(0,o.pushPianoCommand)(["addHandler","showTemplate",function(e){v.current&&"#paywall-drawer"===e.containerSelector&&(g(!0),_(!0))}]))},[m,_]),p)?(0,t.jsx)("section",{className:(0,l.default)(d.default.paywallDrawer,{[d.default.isShown]:h}),children:(0,t.jsx)("div",{id:"paywall-drawer"})}):null}])},519927,e=>{"use strict";var t=e.i(271645);e.s(["default",0,()=>{let e=(0,t.useRef)(null),a=(0,t.useRef)(Date.now());return(0,t.useEffect)(()=>{if(window.pianoSafariInitialized)return void console.log("[PIANO SAFARI] Already initialized, skipping");if(window.pianoSafariInitializing)return void console.log("[PIANO SAFARI] Already initializing, skipping duplicate call");window.pianoSafariInitializing=!0,console.log("[PIANO SAFARI] Starting Safari cookie configuration...");let t=(l=0)=>{if(l>=30){let e=Date.now()-a.current;console.error(`[PIANO SAFARI] Failed to initialize after 30 attempts (${e}ms)`),window.pianoSafariInitializing=!1;return}if(window.tp)try{let e=(()=>{if(!(!("u"t(l+1),100)};return t(),()=>{e.current&&clearTimeout(e.current)}},[]),null}],519927)},216348,e=>{"use strict";var t=e.i(271645),a=e.i(618566),l=e.i(31499),s=e.i(854321),n=e.i(72529),i=e.i(227502);e.s(["default",0,()=>{let e=(0,a.usePathname)(),{isRankingsSubdomain:r}=(0,s.useLayoutContext)(),{isPianoAvailable:o}=(0,l.useAuthContext)(),d=(0,t.useRef)(null),u=(0,t.useRef)(e);return(0,t.useLayoutEffect)(()=>{(0,i.syncPianoContentSection)(e,r)},[e,r]),(0,t.useEffect)(()=>{if(!o||"function"!=typeof window.tp?.experience?.execute||d.current===e)return;let t=null===d.current&&e===u.current;if(d.current=e,!t)try{(0,n.safeClientLogger)(n.LogLevel.DEBUG,"PIANO","Executing Composer on client navigation",{pathname:e}),window.tp.experience.execute()}catch(e){console.error("[PIANO] experience.execute failed",e)}},[e,o,r]),null}])},198768,e=>{"use strict";var t=e.i(843476);let a={default:"var(--color-default)",brand:"var(--brand-default)",alt:"var(--color-alt)"};e.s(["default",0,({variant:e="default",height:l=24,...s})=>{let n=a[e]??e;return(0,t.jsx)("svg",{...s,height:l,viewBox:"0 0 157 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{color:n},"aria-label":s["aria-label"]??"Newsweek logotype",children:(0,t.jsx)("path",{d:"M56.37 10.44h1.95l-1.55 5.98-3.32-9.7h-2.88l-3.26 9.7-1.58-5.98h2.12V6.7h-8.3v3.73h1.48l4.2 13.06h3.39l3.4-9.91 3.38 9.9h3.26l3.76-13.05h1.24V6.7h-7.29v3.73ZM31.55 6.48c-5.6 0-8.63 3.76-8.63 8.8 0 5.03 3.36 8.72 8.46 8.72 4.56 0 7.28-2.49 7.89-5.84h-4.54c-.26 1.2-1.24 1.98-3.08 1.98-2.35 0-3.61-1.4-3.85-3.63h11.77v-.9c0-5.34-2.89-9.13-8.02-9.13Zm0 3.69c1.9 0 2.99 1.2 3.25 3.32h-6.95c.35-2.19 1.69-3.32 3.7-3.32ZM23.43 0h-9.2v4h2.59V14.5L6.58 0H0v4h2.45v15.47H0v4.03h9.53v-4.03H6.91V8.48L17.52 23.5h3.76V4h2.15V0ZM130.29 6.48c-5.61 0-8.63 3.76-8.63 8.8 0 5.03 3.36 8.72 8.46 8.72 4.56 0 7.28-2.49 7.88-5.84h-4.53c-.26 1.2-1.24 1.98-3.08 1.98-2.35 0-3.61-1.4-3.85-3.63h11.77v-.9c0-5.34-2.89-9.13-8.02-9.13Zm0 3.69c1.9 0 2.99 1.2 3.25 3.32h-6.95c.35-2.19 1.69-3.32 3.7-3.32ZM73.93 13.46l-2.89-.87c-1.24-.37-1.68-.74-1.68-1.45 0-.77.7-1.3 1.68-1.3 1.78 0 2.92 1.47 3.3 2.31h3.58V6.71H74V8.1a4.76 4.76 0 0 0-3.8-1.59c-2.99 0-5.5 1.95-5.5 4.97 0 3.02 1.98 4.36 4.16 5l3.39 1c1.14.34 1.61.81 1.61 1.48 0 .84-.54 1.44-1.64 1.44-2.05 0-3.2-1.4-3.54-2.68h-3.96v5.77h4.2v-1.46a5.63 5.63 0 0 0 4.07 1.77c3.46 0 5.54-1.95 5.54-5.2 0-2.96-1.88-4.34-4.6-5.14ZM112.5 6.48c-5.61 0-8.63 3.76-8.63 8.8 0 5.03 3.35 8.72 8.46 8.72 4.56 0 7.28-2.49 7.88-5.84h-4.53c-.27 1.2-1.24 1.98-3.09 1.98-2.34 0-3.6-1.4-3.84-3.63h11.77v-.9c0-5.34-2.89-9.13-8.02-9.13Zm0 3.69c1.9 0 2.98 1.2 3.25 3.32h-6.95c.35-2.19 1.69-3.32 3.7-3.32ZM96.32 10.44h1.94l-1.55 5.98-3.31-9.7H90.5l-3.26 9.7-1.57-5.98h2.11V6.7H79.5v3.73h1.48l4.2 13.06h3.38l3.4-9.91 3.38 9.9h3.26l3.76-13.05h1.24V6.7h-7.28v3.73ZM154.18 19.77l-4.12-5.44 3.44-3.9h2.41V6.69h-4.66l-6.08 6.97V0h-6.47v3.76h2.1v16.01h-2.04v3.73h8.33v-3.73h-1.92v-4.8l6.28 8.53h4.8v-3.73h-2.07Z"})})}])},108923,e=>{"use strict";var t=e.i(271645);e.s(["default",0,function({masterEnabled:e,modes:a}){return(0,t.useEffect)(()=>{console.log("[WP Fetch Mode]",{masterEnabled:e,...a})},[e,a]),null}])},225862,e=>{"use strict";var t=e.i(271645);e.s(["useInterval",0,function(e,a){let l=(0,t.useRef)();(0,t.useEffect)(()=>{l.current=e},[e]),(0,t.useEffect)(()=>{if(null===a)return;let e=null;return e=setInterval(()=>{("u"{e&&clearInterval(e)}},[a])}])},984847,e=>{e.v({root:"Reshaped-module__NZVd3q__root"})},953400,e=>{"use strict";var t=e.i(843476);e.i(368649);var a=e.i(963072),a=a,l=e.i(593851),s=e.i(271645),n=e.i(89540),i=e.i(708345),r=e.i(502545),o=e.i(701510),d=e.i(808115);let u=e=>{let{defaultMode:a,mode:l,scopeRef:u,children:c}=e,[m,_]=s.default.useState(a),f=(0,d.useGlobalColorMode)(),h=s.default.useCallback(e=>{(0,o.getRootThemeEl)(u?.current).setAttribute("data-rs-color-mode",e),f.mode&&!u&&f.setMode(e),_(e)},[u,f]);(0,n.useIsomorphicLayoutEffect)(()=>{(0,i.disableTransitions)(),(0,i.onNextFrame)(()=>{(0,i.enableTransitions)()})},[m,l]),(0,n.useIsomorphicLayoutEffect)(()=>{let e=(0,o.getRootThemeEl)(u?.current).getAttribute("data-rs-color-mode");e&&h(e)},[h,u]);let g=s.default.useMemo(()=>({mode:l||m,setMode:h,invertMode:()=>{h("light"===m?"dark":"light")}}),[m,l,h]);return(0,t.jsx)(r.GlobalColorModeContext.Provider,{value:g,children:c})};u.displayName="GlobalColorMode";var c=e.i(106663);let m={short:4e3,long:8e3},_=["top-start","top","top-end","bottom-start","bottom","bottom-end"],f={queues:_.reduce((e,t)=>({[t]:[],...e}),{}),id:"",show:()=>{},hide:()=>{},remove:()=>{},add:()=>""},h=s.default.createContext(f);e.i(928339);var g=e.i(40740),p=e.i(258245),v=e.i(896665),x=e.i(684498),b=e.i(107852),w=e.i(371983),C=e.i(547090),j=e.i(962537);let y=e=>{let{size:a="small",text:l,children:n,color:i="inverted",icon:r,title:o,actionsSlot:d,startSlot:u,collapsed:m,className:_,attributes:f}=e,h="inverted"===i||"neutral"===i?"elevation-overlay":i;"neutral"===i&&(h=m?"neutral":"elevation-overlay");let g="small"===a?"span":"div",v="large"===a,x=[];d&&(x=Array.isArray(d)?d:[d]);let y=(o||l)&&(0,t.jsxs)(s.default.Fragment,{children:[o&&(0,t.jsxs)(C.default,{variant:"body-3",weight:"bold",as:g,children:[o," "]}),(0,t.jsx)(C.default,{variant:"body-3",as:g,children:l})]}),A=(0,t.jsxs)(j.default,{backgroundColor:h,borderColor:"neutral"===i?"neutral-faded":"transparent",padding:4,borderRadius:"medium",animated:!0,direction:"row",gap:3,align:v?"start":"center",className:[p.default.toast,_],attributes:f,children:[r&&(0,t.jsx)(w.default,{size:5,svg:r,className:p.default.icon}),u&&!r&&(0,t.jsx)(j.default.Item,{children:u}),(0,t.jsx)(j.default.Item,{grow:!0,children:(0,t.jsxs)(j.default,{direction:v?"column":"row",align:v?"start":"center",gap:3,children:[(0,t.jsx)(j.default.Item,{grow:!0,children:y&&n||"small"!==a?(0,t.jsxs)(j.default,{gap:.5,children:[y,n&&(0,t.jsx)(j.default,{gap:3,children:n})]}):y||n}),x.length&&(0,t.jsx)(j.default,{direction:"row",align:"center",gap:2,children:x.map((e,t)=>{let l="large"===a?0===t:t===x.length-1;return e.type===b.default?(0,s.createElement)(b.default,{variant:l?"solid":"ghost",size:"small",color:l?"neutral"===i||"inverted"===i?"neutral":"media":"inherit",elevated:"neutral"!==i,...e.props,key:t}):e})})]})})]});return"inverted"===i?(0,t.jsx)(c.default,{colorMode:"inverted",children:A}):A};y.displayName="Toast";let A=e=>{let{toastProps:a,id:n,status:r,inspected:o,index:d}=e,{timeout:u="short"}=a,{show:c,hide:_,remove:f}=s.default.useContext(h),[g,b]=s.default.useState(),w=s.default.useRef(null),C=s.default.useRef(!1),j=s.default.useRef(null),A="entered"===r,k=(0,l.classNames)(p.default.container,A&&p.default["container--visible"],0===d&&p.default[`container--index-${d}`],!o&&(1===d||2===d)&&p.default[`container--index-${d}`],!o&&d>=3&&p.default["container--index-overflow"]),N=s.default.useCallback(()=>{w.current&&clearTimeout(w.current)},[]),L=s.default.useCallback(()=>{N();let e="string"==typeof u?m[u]:u;0!==u&&(w.current=setTimeout(()=>{(0,i.checkTransitions)()?_(n):f(n)},e??m.short))},[_,n,f,u,N]);return s.default.useEffect(()=>{A&&(o?N():L())},[o,L,N,A]),s.default.useEffect(()=>{j.current&&b(j.current.clientHeight),c(n),L()},[c,n,L]),s.default.useEffect(()=>{if(!j.current)return;let e=new v.TrapFocus;A?e.trap(j.current,{includeTrigger:!0,mode:"content-menu"}):(0,x.checkKeyboardMode)()&&e.release()},[A]),s.default.useEffect(()=>{if(!A||d>0)return;let e=()=>{C.current=!0,(0,i.onNextFrame)(()=>{C.current=!1}),j.current&&b(j.current.clientHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[A,d]),(0,t.jsx)("li",{className:k,style:{height:"entered"===r?`calc(${g}px + var(--rs-unit-x2) + 2px)`:0,transitionDuration:C.current?"0s":void 0},onTransitionEnd:e=>{"height"!==e.propertyName||A||f(n)},onFocus:N,onBlur:L,children:(0,t.jsx)("span",{className:p.default.wrapper,children:(0,t.jsx)(y,{...a,collapsed:d>0&&!o,attributes:{...a.attributes,ref:j}})})})};A.displayName="ToastContainer";let k=e=>{let{position:a,nested:n}=e,{queues:i,options:r}=s.default.useContext(h),[o,d]=s.default.useState(!1),u=s.default.useRef(!1),c=s.default.useRef(null),m=i[a],{width:_,expanded:f}=r?.[a]||{},v=(0,l.classNames)(p.default.region,p.default[`region--position-${a}`],n&&p.default["region--nested"]),x=m.filter(e=>"entered"===e.status).length,b=0;return(s.default.useEffect(()=>{0===m.length&&d(!1)},[m.length]),m.length)?(0,t.jsx)("ul",{role:"region","aria-live":"polite",className:v,ref:c,onTouchStart:()=>{u.current=!0},onClick:e=>{let t=e.target,a=!1;for(;t&&t!==c.current&&!a;)a=t.matches(g.focusableSelector),t=t.parentElement;a||d(e=>!e),u.current=!1},onMouseEnter:()=>{u.current||d(!0)},onMouseLeave:()=>{u.current||d(!1)},style:{width:_},children:m.map((e,a)=>{let l=x-a+b-1;return"entered"!==e.status&&(b+=1),(0,t.jsx)(A,{...e,index:l,inspected:o||!!f},e.id)})}):null};k.displayName="ToastRegion";let N=0,L=(e,t)=>{let a;switch(t.type){case"add":{let{position:a="bottom-end",...l}=t.payload.toastProps||{};return{...e,[a]:[...e[a],{id:t.payload.id,toastProps:l,status:"entering"}]}}case"show":{let{id:l}=t.payload;return a={...e},_.forEach(e=>{a[e]=a[e].map(e=>"entering"!==e.status?e:e.id===l?{...e,status:"entered"}:e)}),a}case"hide":{let{id:l}=t.payload;return a={...e},_.forEach(e=>{a[e]=a[e].map(e=>e.id===l?{...e,status:"exiting"}:e)}),a}case"remove":{let{id:l}=t.payload;return a={...e},_.forEach(e=>{a[e]=a[e].filter(e=>e.id!==l)}),a}}},S=e=>{let{children:a,options:l}=e,n=(()=>{let{add:e,hide:t,id:a}=s.default.useContext(h);return s.default.useMemo(()=>({show:e,hide:t,id:a}),[e,t,a])})(),i=s.default.useId(),[r,o]=s.default.useReducer(L,f.queues),d=s.default.useCallback(e=>{let t=`__rs-toast-${N++}`;return o({type:"add",payload:{toastProps:e,id:t}}),t},[]),u=s.default.useCallback(e=>{o({type:"show",payload:{id:e}})},[]),c=s.default.useCallback(e=>{o({type:"hide",payload:{id:e}})},[]),m=s.default.useCallback(e=>{o({type:"remove",payload:{id:e}})},[]),g=s.default.useMemo(()=>({queues:r,id:i,add:d,show:u,hide:c,remove:m,inspecting:!1,options:l}),[r,u,c,d,m,i,l]);return(0,t.jsxs)(h.Provider,{value:g,children:[a,_.map(e=>(0,t.jsx)(k,{position:e,nested:!!n.id},e))]})};S.displayName="ToastProiver";var H=e.i(486793),E=e.i(984847);let M=e=>{let{theme:n,defaultTheme:i="reshaped",colorMode:r,defaultColorMode:o,defaultViewport:m,toastOptions:_,scoped:f,className:h}=e,g=(0,l.classNames)(E.default.root,h),p=s.default.useRef(null),v=(0,d.useGlobalColorMode)();return(0,t.jsx)(a.default,{children:(0,t.jsx)(u,{defaultMode:o||v.mode||"light",mode:r,scopeRef:v&&f?p:void 0,children:(0,t.jsx)(c.PrivateTheme,{name:n,defaultName:i,className:g,scoped:f,scopeRef:v&&f?p:void 0,children:(0,t.jsx)(H.SingletonViewportProvider,{defaultViewport:m,children:(0,t.jsx)(S,{options:_,children:e.children})})})})})};M.displayName="Reshaped",e.s(["default",0,M],953400)},258245,e=>{e.v({container:"Toast-module__xjZkDa__container","container--index-0":"Toast-module__xjZkDa__container--index-0","container--index-1":"Toast-module__xjZkDa__container--index-1","container--index-2":"Toast-module__xjZkDa__container--index-2","container--index-overflow":"Toast-module__xjZkDa__container--index-overflow","container--visible":"Toast-module__xjZkDa__container--visible",region:"Toast-module__xjZkDa__region","region--nested":"Toast-module__xjZkDa__region--nested","region--position-bottom":"Toast-module__xjZkDa__region--position-bottom","region--position-bottom-end":"Toast-module__xjZkDa__region--position-bottom-end","region--position-bottom-start":"Toast-module__xjZkDa__region--position-bottom-start","region--position-top":"Toast-module__xjZkDa__region--position-top","region--position-top-end":"Toast-module__xjZkDa__region--position-top-end","region--position-top-start":"Toast-module__xjZkDa__region--position-top-start",wrapper:"Toast-module__xjZkDa__wrapper"})}]);