(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,477877,e=>{"use strict";var t=e.i(458201),n=e.i(538167),i=e.i(2248),r=e.i(652517),o=e.i(846871),a=e.i(302027);e.s(["EmbedReloadBridge",0,()=>{let[e,l]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{if(window.parent!==window)return(0,r.x)(e=>{l(!0),window.parent.postMessage({type:a.j,action:"reload"},"*"),window.setTimeout(e,a.V)})},[]),e)?(0,i.createPortal)((0,t.jsx)("div",{className:"z-overlay fixed inset-0 flex items-center justify-center bg-white/80","aria-busy":"true",children:(0,t.jsx)(o.f,{size:"lg",variant:"primary"})}),document.body):null}])},599827,e=>{"use strict";var t=e.i(538167),n=e.i(584169),i=e.i(528600),r=e.i(901351),o=e.i(652517);e.s(["PurchaseTokenRefresh",0,()=>{let{user:e}=(0,i.f)();return(0,t.useEffect)(()=>{if(!e.isUserLoggedIn)return;let t=(0,n.getCookie)("premium"),i=!1;if(t&&"string"==typeof t){let e=t.split(".")[1];if(e)try{let{expirationDateTime:t,iat:n,premium:r}=JSON.parse(atob(e))||{};if(r){let e=new Date(t);e.setDate(e.getDate()-1);let r=new Date,o=new Date(1e3*n);o.setDate(o.getDate()+1),i=r>=o&&r>=e}}catch(e){console.error("Failed to parse premium cookie JWT:",e)}}i&&(async()=>{try{let e,t,n=await r.f.purchase.getPurchaseToken();n?.premium&&(t=(e=new URLSearchParams(window.location.search)).get("re"),e.delete("re"),window.history.replaceState({},"",window.location.href.replace(`${0==[...e].length?"?":""}re=${t}`,"")),t||(e.set("re",Date.now().toString()),(0,o.Q)(()=>{window.location.search=e.toString()})))}catch(e){console.error("Failed to refresh purchase token:",e)}})()},[e.isUserLoggedIn]),null}])},71977,e=>{"use strict";var t=e.i(584169),n=e.i(282446),i=e.i(42318),r=e.i(889753),o=e.i(543512),a=e.i(901351),l=e.i(892504),s=e.i(528600);async function c(e){try{if((0,t.getCookie)("premium")||(0,l.r)())return null;let n=await a.f.purchase.getPurchaseToken();if((0,l.q)(),n?.premium){let t=o.j[n.product];t&&e(t)}return!0}catch(e){return console.error("Failed to get UPSX token:",e),!1}}e.s(["PurchaseTokenSync",0,()=>(!function(){let{user:e}=(0,s.f)(),t=(0,n.F)(r.x);(0,i.f)(e.isUserLoggedIn?"upsx/cookie/purchase":null,()=>c(t))}(),null)],71977)},987070,e=>{"use strict";var t=e.i(458201),n=e.i(538167),i=e.i(794120);let r=(0,e.i(695881).createLogger)("SWRProvider");e.s(["SWRProvider",0,({children:e,fallback:o={}})=>{let[a]=(0,n.useState)(()=>new Map);return(0,t.jsx)(i.K,{value:{provider:()=>a,fallback:o,onDiscarded:e=>r.warn("response discarded",{key:e})},children:e})}])},165341,e=>{"use strict";var t=e.i(538167),n=e.i(282446),i=e.i(584169),r=e.i(889753),o=e.i(513513),a=e.i(810564),l=e.i(731672);e.i(543512),(0,e.i(695881).createLogger)("upsxVerify");let s="upsx_stale_session";e.s(["StaleSessionLogout",0,()=>{let e=(0,l.f)({reload:!1,clearOnError:!0}),c=(0,o.J)((0,n.y)(r.x)),u=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{!u.current&&(0,i.getCookie)(s)&&(u.current=!0,(0,i.deleteCookie)(s,{domain:(0,a.o)(window.location.hostname),path:"/"}),c||e())},[c,e]),null}],165341)},85617,e=>{"use strict";var t=e.i(538167),n=e.i(282446),i=e.i(528600),r=e.i(889753),o=e.i(45846),a=e.i(436028),l=e.i(839315),s=e.i(725296),c=e.i(521350),u=e.i(584169),d=e.i(313983);let f=async()=>{try{let e=await m();await S({upsxConsentResponse:e}),await w({upsxConsentResponse:e}),await I({upsxConsentResponse:e})}catch(e){console.log(e)}},p=({purpose:e,upsxConsentResponse:t})=>{let n=t?.find?.(t=>t?.purpose===e);return n?.consent},g=async({purpose:e,value:t,setByUser:n})=>{let i={purpose:e,consent:t,setByUser:n,consentDateTime:new Date().toISOString()};await o.f.consent.createUserConsent(i)},m=async()=>await o.f.consent.getUserConsent(),w=async({upsxConsentResponse:e})=>{let t=p({purpose:"sale-of-data",upsxConsentResponse:e}),{localSaleOfDataConsent:n,setByUser:i}=y();h({localSaleOfDataConsent:n,upsxSaleOfDataConsent:t}),v({upsxSaleOfDataConsent:t})&&await g({purpose:"sale-of-data",value:n,setByUser:i})},y=()=>{let e=window.DprSdk,t=e?.getUserConsent("sale-of-data"),n="boolean"==typeof t;return{localSaleOfDataConsent:n?t:e?.getRegimePurposeDefaultValue("sale-of-data")??!0,setByUser:n}},h=({localSaleOfDataConsent:e,upsxSaleOfDataConsent:t})=>{let n=window.DprSdk,i=window.navigator.globalPrivacyControl,r=(0,c.isLocalStorageAvailable)()?localStorage.getItem("saleOfDataConflict"):null,o=(0,s.o)()===s.Q.USA_CCPA&&!0===t&&!1===e&&!i;o&&!r?(0,c.isLocalStorageAvailable)()&&localStorage.setItem("saleOfDataConflict","true"):!o&&r&&(0,c.isLocalStorageAvailable)()&&localStorage.removeItem("saleOfDataConflict"),!1===t&&!0===e&&n?.setUserConsents({"sale-of-data":!1},{skipLogUserConsent:!0})},v=({upsxSaleOfDataConsent:e})=>{let t=!1,n=window.navigator.globalPrivacyControl;return("boolean"!=typeof e||n&&!0===e)&&(t=!0),t},S=async({upsxConsentResponse:e})=>{if(!s.D.includes((0,s.o)())||window.navigator.globalPrivacyControl||!(()=>{let e=(0,u.getCookie)("premium");if(!e||"string"!=typeof e)return!1;let t=e.split(".")[1];if(!t)return!1;try{let{expirationDateTime:e,firstTransactionDateTime:n}=JSON.parse(atob(t))||{};if(!n||!e)return!1;return new Date(e).getTime()t?.find?.(t=>t?.purpose===e)?.setByUser)({purpose:"sale-of-data",upsxConsentResponse:e});if(!0===n||!0===t&&!1===n)return;await g({purpose:"sale-of-data",value:!0,setByUser:!1});let i=e?.find?.(e=>e?.purpose==="sale-of-data");i?(i.consent=!0,i.setByUser=!1):Array.isArray(e)&&e.push({purpose:"sale-of-data",consent:!0,setByUser:!1,consentDateTime:new Date().toISOString(),consentID:"",userID:""})},I=async({upsxConsentResponse:e})=>{if((0,s.o)()!==s.Q.USA_CCPA)return;let t=p({purpose:d.f.SENSITIVE_DATA,upsxConsentResponse:e}),{localSensitiveDataConsent:n}=C();b({localSensitiveDataConsent:n,upsxSensitiveDataConsent:t}),function({upsxSensitiveDataConsent:e}){let t=!1;return"boolean"!=typeof e&&(t=!0),t}({upsxSensitiveDataConsent:t})&&await g({purpose:d.f.SENSITIVE_DATA,value:!0,setByUser:!1})},C=()=>{let{DprSdk:e}=window,t=e?.getUserConsent(d.f.SENSITIVE_DATA),n="boolean"==typeof t;return{localSensitiveDataConsent:n?t:e?.getRegimePurposeDefaultValue(d.f.SENSITIVE_DATA)??!0,setByUser:n}},b=async({localSensitiveDataConsent:e,upsxSensitiveDataConsent:t})=>{let{DprSdk:n}=window;"boolean"==typeof t&&t!==e&&n?.setUserConsents({[d.f.SENSITIVE_DATA]:t},{skipLogUserConsent:!0})};e.s(["UserAuthSync",0,()=>(!function(){let[e,u]=(0,t.useState)(!1),[d,f]=(0,t.useState)(null),p=(0,t.useRef)(!1),g=(0,s.o)(),{user:{isUserLoggedIn:m,userID:w,anonId:y}}=(0,i.f)(),{twcID:h}=(0,n.y)(r.s),v=(0,t.useCallback)(async(e={})=>{if(w){u(!0),f(null);try{let t,n,i,r,c,u=await o.f.applications.getApplications(e.appId||"twc-web-registered",e.endpointId||w),d=u?.partners||[],f=(t=[],(n=(0,l.d)())&&t.push({name:"omniture",id:n}),(i=(0,l.S)({upsxId:w,anonId:y}))&&(t.push({name:"amplitude",id:i}),t.push({name:"airlytics",id:i})),y&&t.push({name:"installationID",id:y}),h&&t.push({name:"twcID",id:h}),(r=(0,l.u)())&&t.push({name:"mParticle",id:r}),!m&&r&&t.push({name:"braze",id:r}),m&&w&&(t.push({name:"zuora",id:w}),t.push({name:"braze",id:w})),c=(0,l.t)(),s.E.includes(g)&&c&&t.push({name:"sourcepoint",id:c}),t),v=(0,a.f)(d)?f.filter(e=>{let t=d.find(t=>t.name===e.name);return!t||t.id!==e.id}):f;return v.length&&(u?await o.f.applications.addPartner(e.appId||"twc-web-registered",e.endpointId||w,{partners:v,version:"1.0.0"}):await o.f.applications.createApplication({appId:e.appId||"twc-web-registered",endpointId:e.endpointId||w,partners:v,version:"1.0.0"})),p.current=!0,{success:!0,addedOrUpdated:v}}catch(t){let e=t instanceof Error?t:Error("Unknown error occurred");return f(e),{success:!1,error:e.message}}finally{u(!1),(0,c.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","false")}}},[w,y,m,h]);(0,t.useEffect)(()=>{if(!(0,c.isLocalStorageAvailable)())return;let e=localStorage.getItem("PARTNERS_SYNC"),t=e&&JSON.parse(e);m&&w&&t&&!p.current&&(async()=>{await v()})()},[w,m,v])}(),!function(){let e=(0,t.useRef)(!1),{user:{isUserLoggedIn:n}}=(0,i.f)();(0,t.useEffect)(()=>{n&&!e.current&&(f(),e.current=!0)},[n])}(),null)],85617)},157725,e=>{"use strict";var t=e.i(538167),n=e.i(282446),i=e.i(528600),r=e.i(776169),o=e.i(310847);let a=!1;var l=e.i(935251),s=e.i(343277),c=e.i(553329),u=e.i(145651),d=e.i(249725);e.s(["UserPreferenceSync",0,()=>(!function(){let{user:{isUserLoggedIn:e,userID:l},userProfile:s}=(0,i.f)(),{updatePreferences:c}=(0,r.f)(),u=(0,n.y)(o.o);(0,t.useEffect)(()=>{(async()=>{if(e&&s&&l&&!a){a=!0;try{u&&await c(u,!1)}catch(e){console.error("Failed to sync user preferences:",e),a=!1}}})()},[e,s,l,c,u])}(),!function(){let e=(0,l.useParams)(),i=e?.locale||"en-US",{favoriteLocations:r}=(0,u.f)(),{hasResolvedPlaceId:a,recordFeatureId:f}=(0,d.S)(),[p,g]=(0,n.q)(o.Q),m=(0,t.useRef)(!1),w=(0,t.useRef)(!1);(0,t.useEffect)(()=>()=>{w.current=!0},[]),(0,t.useEffect)(()=>{if(m.current||1===p)return;let e=function(e,t){let n=new Set,i=[];for(let r of e){let e=r.placeID;!e||n.has(e)||t(e)||(n.add(e),i.push(e))}return i}(r,a);if(0===e.length){r.length>0&&1!==p&&g(1);return}m.current=!0,(async()=>{let t=!0;for(let n=0;n{let{data:n,error:r}=await (0,c.f)((0,s.getLocationPointByPlaceId)(e,i));if(w.current)return;if(r){t=!1;return}let o=n?.location;f({placeId:e,geocode:o?`${o.latitude},${o.longitude}`:void 0},o?.featureId??null)}))}t&&!w.current&&g(1)})()},[r,a,f,p,g,i])}(),null)],157725)},569579,e=>{"use strict";var t=e.i(458201),n=e.i(538167),i=e.i(282446),r=e.i(74492),o=e.i(695881),a=e.i(553329),l=e.i(333350),s=e.i(889753),c=e.i(398444),u=e.i(901351),d=e.i(528600);let f=(0,o.createLogger)("useResolveIdentity");var p=e.i(935251),g=e.i(540223),m=e.i(608201),w=e.i(236593),y=e.i(800462),h=e.i(736677),v=e.i(220126),S=e.i(50727),I=e.i(694211),C=e.i(358273);let b=()=>{let e,t,r,o,a,l,s=(0,p.usePathname)(),c=(0,I.f)(),u=(0,i.F)(g.f),d=(e=(0,i.F)(m.f),t=(0,i.F)(w.f),r=(0,i.F)(y.f),o=(0,i.F)(h.f),a=(0,i.F)(v.f),l=(0,i.F)(S.f),(0,n.useCallback)(()=>{e(null),t(null),r(null),o(null),a(null),l(null)},[e,t,r,o,a,l])),f=(0,n.useRef)(c);return(0,n.useEffect)(()=>{if(!s)return;c!==f.current&&(f.current=c,d());let e=(0,C.N)();(!e||(0,C.C)())&&(0,C.H)(),(0,C.y)(e),(0,C.b)(s,c),u({pathname:s,restore:c,count:(0,C.N)()?.pageCount||1})},[s,c,u,d]),null};var E=e.i(199690),D=e.i(947118),T=e.i(221085),k=e.i(310847),A=e.i(382602),_=e.i(839315),P=e.i(688070),L=e.i(456215),O=e.i(647292),N=e.i(491240),R=e.i(915044),U=e.i(293163),M=e.i(737801),x=e.i(236433);let F=()=>{let e=(0,p.usePathname)(),t=(0,i.y)(x.f);return!!e&&t===e};var V=e.i(630986),H=e.i(128541);let G=["subscribe","subscribe-checkout","subscribe-stripe-checkout","subscribe-checkout-embed","subscribe-stripe-checkout-embed"],$=["subscribe-checkout","subscribe-stripe-checkout","subscribe-checkout-embed","subscribe-stripe-checkout-embed"],W={sourcePage:"direct",sourceModule:null,sourceElement:"direct",sourceUpsellPlacement:null};function j(e,t,n,i){return null!=e&&G.includes(e)?t||(null!=e&&$.includes(e)&&!n&&!i?W:null):null}var B=e.i(64412),K=e.i(797770),J=e.i(866137),q=e.i(513539);let z=["article","video","liveblog"];var Y=e.i(521350);let Q="location-viewed-last-fired";var Z=e.i(147732),X=e.i(694897);let ee=new Date().getTime(),et=(0,Z.f)(()=>{er()},250);l.default&&(window.addEventListener("scroll",et),(0,X.q)(()=>{ee=new Date().getTime(),ei=en(),er()}));let en=()=>l.default&&window.innerHeight>0?window.innerHeight:0,ei=en();function er(){window.scrollY>ei&&(ei=window.scrollY)}let eo='window.mParticle=window.mParticle||{EventType:{Unknown:0,Navigation:1,Location:2,Search:3,Transaction:4,UserContent:5,UserPreference:6,Social:7,Other:8}};window.mParticle.eCommerce={Cart:{}};window.mParticle.Identity={};window.mParticle.config=window.mParticle.config||{};window.mParticle.config.rq=window.mParticle.config.rq||[];window.mParticle.ready=function(t){window.mParticle.config.rq.push(t)};function e(e,o){return function(){if(o){e=o+"."+e}var t=Array.prototype.slice.call(arguments);t.unshift(e);window.mParticle.config.rq.push(t)}}var o=["endSession","logError","logEvent","logForm","logLink","logPageView","setSessionAttribute","setAppName","setAppVersion","setOptOut","setPosition","startNewSession","startTrackingLocation","stopTrackingLocation"];var n=["setCurrencyCode","logCheckout"];var i=["identify","login","logout","modify"];o.forEach(function(t){window.mParticle[t]=e(t)});n.forEach(function(t){window.mParticle.eCommerce[t]=e(t,"eCommerce")});i.forEach(function(t){window.mParticle.Identity[t]=e(t,"Identity")});',ea='if(window.mParticle&&typeof window.mParticle.init==="function"){return}',el=`(function(){${ea}${eo}})();`,es=({scriptSrc:e})=>{let r=(0,i.y)(P.f);(0,n.useEffect)(()=>(0,T.x)(e),[e]),(()=>{let e=(0,i.y)(P.f),t=(0,i.y)(O.f),r="us2-fb061d169ced8343850163112c402d41",o=(0,D.f)(),a=(0,T.s)(),l=(0,n.useRef)(o),{user:{isUserLoggedIn:s,userID:c}}=(0,d.f)(),u=(0,i.y)(A.i),f=s?c:null,p=s?u:"",g=(0,i.y)(k.E),m=(({hasInvokedMPInit:e,apiKey:t,isUserLoggedIn:n,customerid:i,email:r,other:o})=>!e&&t&&o&&(n&&i&&r||!n))({hasInvokedMPInit:l.current,apiKey:r,isUserLoggedIn:s,customerid:f,email:p,other:g});(0,n.useEffect)(()=>{if(m){if("function"!=typeof window.mParticle?.init)return;l.current=!0;let n={isDevelopmentMode:!1,logLevel:"warning",identifyRequest:{userIdentities:{email:p,customerid:f,other:(0,N.f)(g)}},v1SecureServiceUrl:"mparticle.weather.com/webevents/v1/JS/",v2SecureServiceUrl:"mparticle.weather.com/webevents/v2/JS/",v3SecureServiceUrl:"mparticle.weather.com/webevents/v3/JS/",configUrl:"mparticle.weather.com/tags/JS/v2/",identityUrl:"mparticle.weather.com/identity/v1/",aliasUrl:"mparticle.weather.com/webevents/v1/identity/",dataPlan:{planId:"weather_web",planVersion:3},identityCallback:e=>{if(e?.getUser()){let t=e.getUser().getMPID();t&&(console.debug("MParticle: Identity callback triggered",t),(e=>{try{let t=(0,_.N)();if(t&&t!==e){let e=(0,C.N)();if(e&&Number.isFinite(e.sessionStartTime)&&Date.now()-e.sessionStartTime{let e=(0,D.f)(),t=(0,p.usePathname)(),r=(0,M.f)(),o=(0,V.f)(),a=(0,i.y)(m.f),l=(0,i.y)(w.f),[s,c]=(0,n.useState)(!1),u=(0,I.f)(),d=(0,n.useRef)(null),f=(0,n.useMemo)(()=>({author:o?.author||"",contentId:o?.contentId,premiumContent:o?.premiumContent,publishDate:o?.publishDate,provider:o?.provider,title:o?.title,nodeTypes:o?.nodeType,pageTemplate:o?.pageTemplate,iabContent:o?.iabContent??null,tagsAnalytics:o?.tagsAnalytics,tagsGeo:o?.tagsGeo,tagsKeyword:o?.tagsKeyword,tagsStorm:o?.tagsStorm,collection:o?.collection,entitlements:o?.entitlements,createdDate:o?.createdDate,...r,fromString:r.fromString??"",url:t?(0,U.Z)(t):"",sourcePage:a??"",sourceModule:l?.id??null,sourceModuleName:l?.name??null,...l?.modulePosition!=null&&{sourcePosition:l.modulePosition},sourceElement:l?.element??null}),[r,o,t,a,l]);return(0,n.useEffect)(()=>{(0,U.k)(f)&&!s&&c(!0)},[f,s]),(0,n.useCallback)(async()=>{if(f?.pageId==="article"&&e&&s&&void 0!==f.pageCount&&d.current!==u)try{window.mParticle?.logEvent?.("article-viewed",window.mParticle?.EventType?.Other,f),console.debug(`MParticle: Event "article-viewed" tracked - ${f?.pageId}`),d.current=u}catch(e){console.error('MParticle: Event "article-viewed" failed',e)}},[u,e,f,s])})();if((0,n.useEffect)(()=>{o()},[o]),(0,n.useEffect)(()=>{a()},[a]),r)return(0,t.jsx)("script",{id:"mparticle-webview-sdk",dangerouslySetInnerHTML:{__html:`(function(){${ea}${eo}var r=document.createElement("script");r.type="text/javascript";r.async=true;r.src="${e}";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(r,c)})();`}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{}),(0,t.jsx)("script",{id:"mparticle-bootstrap",dangerouslySetInnerHTML:{__html:el}}),(0,t.jsx)("script",{src:e,async:!0})]})},ec=()=>{let e,t=(()=>{let e=(0,D.f)(),t=(0,M.f)(),[i,r]=(0,n.useState)(!1),o=(0,I.f)(),a=(0,n.useRef)(null),l=(0,n.useMemo)(()=>({...t}),[t]);return(0,n.useEffect)(()=>{(0,U.k)(l)&&!i&&r(!0)},[l,i]),(0,n.useCallback)(async()=>{if((0,C.g)()&&e&&i&&void 0!==l.pageCount&&a.current!==o)try{let e=(0,U.l)();window.mParticle?.logEvent?.("session-start",window.mParticle?.EventType?.Other,{...l,...e}),a.current=o,(0,C.v)(),(0,U.m)(e),console.debug(`MParticle: Event "session-start" tracked - sessionId: ${l.sessionId}`)}catch(e){console.error('MParticle: Event "session-start" failed',e)}},[o,e,l,i])})(),r=(()=>{let e=(0,D.f)(),t=F(),r=(0,I.f)(),o=(0,M.f)(),a=(0,V.f)(),s=o.pageId,c=l.default&&!["video","article"].includes(s)?window.location.href:"",[u,d]=(0,n.useState)(!1),f=(0,n.useRef)(!1),p=(0,n.useRef)(void 0),[g,h]=(0,i.q)(y.f),[v,S]=(0,i.q)(m.f),[C,b]=(0,i.q)(w.f),{location:E}=(0,B.f)(),T=(0,i.y)(K.f),k=(0,i.y)(J.f),A=j(s,(0,i.y)(H.f),v,C),_=(0,i.y)(q.D),P=(0,i.y)(q.M),L=(0,n.useMemo)(()=>{let e=z.includes(s)&&a?{...null!=a.title&&{title:a.title},...null!=a.author&&{author:a.author},...null!=a.contentId&&{contentId:a.contentId},...null!=a.collection&&{collection:a.collection},...null!=a.createdDate&&{createdDate:a.createdDate},...null!=a.entitlements&&{entitlements:a.entitlements},...null!=a.nodeType&&{nodeTypes:a.nodeType},...null!=a.iabContent&&{iabContent:a.iabContent},...null!=a.pageTemplate&&{pageTemplate:a.pageTemplate},...null!=a.premiumContent&&{premiumContent:a.premiumContent},...null!=a.provider&&{provider:a.provider},...null!=a.publishDate&&{publishDate:a.publishDate},...null!=a.tagsAnalytics&&{tagsAnalytics:a.tagsAnalytics},...null!=a.tagsGeo&&{tagsGeo:a.tagsGeo},...null!=a.tagsKeyword&&{tagsKeyword:a.tagsKeyword},...null!=a.tagsStorm&&{tagsStorm:a.tagsStorm},...null!=a.cmsUrl&&{cmsUrl:a.cmsUrl}}:{};return{...o,...E?.presentationName&&{wlocPresentationName:E?.presentationName},...g&&{fromSearchResult:g},sourcePage:A?.sourcePage??v??"",sourceModule:A?.sourceModule??C?.id??null,sourceModuleName:C?.name??null,...C?.position!=null&&{sourcePosition:C.position},...A===W&&{sourcePosition:null},sourceElement:A?.sourceElement??C?.element??null,...A?.sourceUpsellPlacement&&{sourceUpsellPlacement:A.sourceUpsellPlacement},adBlock:k,...T&&{adsMetricsUnitAndZone:T},...e,fullUrl:c,articleHeadline:"",layoutState:_,activeEvent:P}},[o,E,g,v,C,A,k,T,a,c,_,P]);return(0,n.useEffect)(()=>{(0,U.k)(L)&&!u&&d(!0)},[L,u]),(0,n.useCallback)(async()=>{let n=`${r}:${L.pageId}`;if(p.current!==n&&(f.current=!1,p.current=n),e&&t&&u&&void 0!==L.pageCount&&!f.current)try{window.mParticle?.logEvent?.("page-viewed",window.mParticle?.EventType?.Other,L),f.current=!0,g&&h(null),v&&S(null),C&&b(null),console.debug(`MParticle: Event "page-viewed" tracked - ${L.pageId}`)}catch(e){console.error('MParticle: Event "page-viewed" failed',e)}},[r,e,t,L,u,g,h,v,S,C,b])})(),o=(()=>{let{location:e}=(0,B.f)(),t=(0,D.f)(),i=(0,M.f)(),r=e?.geocode,o=r?.split?.(","),a=o?.[0]?parseFloat(o[0]):void 0,s=o?.[1]?parseFloat(o[1]):void 0,c=e?.ianaTimeZone,u="string"==typeof c&&c.length>0?c.slice(0,255):"Etc/UTC",d=i.sessionId,f=(0,n.useMemo)(()=>({...i,latitude:a,longitude:s,ianaTimeZone:u}),[i,a,s,u]);return(0,n.useCallback)(async()=>{if(!l.default||!t||!r||!d||!Number.isFinite(a)||!Number.isFinite(s)||!(0,U.k)(f))return;let n=(()=>{if(!(0,Y.isLocalStorageAvailable)())return null;try{let e=localStorage.getItem(Q);if(!e)return null;let t=JSON.parse(e);if("string"!=typeof t?.geocode||"string"!=typeof t?.sessionId)return null;return t}catch{return null}})();if(!n||n.geocode!==r||n.sessionId!==d)try{window.mParticle?.logEvent?.("location-viewed",window.mParticle?.EventType?.Other,f);if((0,Y.isLocalStorageAvailable)())try{localStorage.setItem(Q,JSON.stringify({geocode:r,sessionId:d}))}catch{}console.debug(`MParticle: Event "location-viewed" tracked - ${e?.displayName||"Unknown location"}`)}catch(e){console.error('MParticle: Event "location-viewed" failed',e)}},[t,f,r,d,a,s,e?.displayName])})();return e=(0,M.f)(),(0,n.useEffect)(()=>{let t=()=>{if(window.mParticle?.isInitialized?.()){let t,n,i,r=(new Date().getTime()-ee)/1e3,o=(t=document.documentElement.scrollHeight,n=window.innerHeight,ei=ei||window.scrollY,(i=t===n?100:Math.round(ei/(t-n)*100))>100?i=100:i{window.removeEventListener("beforeunload",t),window.removeEventListener("blur",t)}},[e]),(0,n.useEffect)(()=>{t()},[t]),(0,n.useEffect)(()=>{r()},[r]),(0,n.useEffect)(()=>{o()},[o]),null};var eu=e.i(526932),ed=e.i(216809);let ef=["pba"],ep=(0,o.createLogger)("AppsFlyer"),eg=()=>{let e,r,o=(0,i.y)(P.f),a=(0,ed.f)(),l=function(){let e=(0,D.f)(),t=(0,i.y)(c.f),{twcID:n}=(0,i.y)(s.s);return t?n??null:e&&window.mParticle?.Identity?.getCurrentUser?.()?.getMPID()||null}(),u="website-weather.com",[d,f]=(0,n.useState)(!1),p=(0,n.useRef)(null);return((0,n.useEffect)(()=>{},[u]),(0,n.useEffect)(()=>{if(!d||!l||p.current===l)return;let e=window.AF;e&&(e("pba","setCustomerUserId",l),p.current=l)},[d,l]),o||!a)?null:(0,t.jsx)(eu.default,{id:"appsflyer-websdk-bootstrap",strategy:"afterInteractive",onReady:()=>f(!0),onError:()=>ep.error("AppsFlyer Web SDK failed to load"),children:(e=ef.join(","),r=JSON.stringify(u),`window.AppsFlyerSdkObject=${JSON.stringify("AF")};window.AF=window.AF||function(){(window.AF.q=window.AF.q||[]).push([Date.now()].concat(Array.prototype.slice.call(arguments)))};window.AF.id=window.AF.id||{pba:{webAppId:${r}}};window.AF.plugins={};var o=document.createElement("script"),p=document.getElementsByTagName("script")[0];o.async=1;o.src=${JSON.stringify(`https://websdk.appsflyersdk.com?st=${e}&af_id=`)}+encodeURIComponent(${r});p.parentNode.insertBefore(o,p);`)})};var em=e.i(402525);let ew={oneLinkURL:E.default.env.NEXT_PUBLIC_APPSFLYER_ONELINK_URL||"https://weather.onelink.me/2902176432",webReferrer:"web_referrer",afParameters:{mediaSource:{keys:["utm_source","pid"],defaultValue:"organic_web"},campaign:{keys:["utm_campaign","c"],defaultValue:"direct_web"},adSet:{keys:["af_adset"]},channel:{keys:["af_channel","utm_medium"]},afSub1:{keys:["googleClickIdKey"]},afSub2:{keys:["fbclid"]},afSub3:{keys:["ttclid"]},afSub5:{keys:["gbraid","af_sub5"]},ad:{keys:["af_ad"]},deepLinkValue:{keys:["deep_link_value"]},afCustom:[{paramKey:"af_dp",keys:["af_dp"]},{paramKey:"af_ad_type",keys:["content"]},{paramKey:"is_retargeting",keys:["(none)"],defaultValue:"TRUE"},{paramKey:"clickid",keys:["clickid"]},{paramKey:"utm_source",keys:["utm_source"],defaultValue:"direct"},{paramKey:"utm_medium",keys:["utm_medium"]},{paramKey:"utm_campaign",keys:["utm_campaign"]},{paramKey:"utm_id",keys:["utm_id"]},{paramKey:"utm_term",keys:["utm_term"]},{paramKey:"utm_content",keys:["utm_content"]},{paramKey:"af_ss_ui",defaultValue:"true"}]}},ey=(0,o.createLogger)("AppsFlyerSmartScript"),eh=()=>{let e=(0,i.y)(P.f),r=(0,ed.f)(),o=(0,i.F)(em.H),a=(0,n.useCallback)(()=>{let e=window.AF_SMART_SCRIPT;if(!e)return void ey.error("Smart Script loaded but window.AF_SMART_SCRIPT is missing");let t=e.generateOneLinkURL(ew);window.AF_SMART_SCRIPT_RESULT=t;let n=(0,em.Z)(t);n?o(n):ey.info("Smart Script generated no URL; CTAs keep their fallback")},[o]);return e||!r?null:(0,t.jsx)(eu.default,{id:"appsflyer-onelink-smart-script",src:"/wx-next-web/static/vendor/@appsflyer/[email protected]/onelink-smart-script.min.js",strategy:"afterInteractive",onReady:a,onError:()=>ey.error("Smart Script failed to load")})};var ev=e.i(605781),eS=e.i(128713),eI=e.i(201542),eC=e.i(143778),eb=e.i(160317),eE=e.i(145651),eD=e.i(45587),eT=e.i(529603);let ek=[],eA=()=>{for(;ek[0]?.();)ek.shift()},e_=!1,eP=null,eL=e=>{let t=e_?eP:(0,_.u)()||(0,_.N)()||e.event.userId;return t&&0===ek.length?(e.event.userId=t,e):new Promise(n=>{ek.push(()=>{let i=t||(e_?eP:window.htevents?.user()?.id()??null);return!!i&&(e.event.userId=i,n(e),!0)}),eA()})},eO={name:"user-id-plugin",type:"before",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:eL,page:eL};var eN=e.i(24638),eR=e.i(963722),eU=e.i(313983);let eM={"daily-newsletters-1":"newsletter","marketing-emails-1":"marketing","weekly-brief":"weekly"},ex=e=>`[${e.map(e=>`'${e}'`).join(",")}]`;var eF=e.i(682142),eV=e.i(181848);let eH={latitude:null,longitude:null,country_code:null,region_code:null,city_name:null,dma_code:null,location_source:null},eG="htConsentStateTimestamps",e$=(e,t,n,i)=>{let r=n[e],o=r?.consented===t?r.timestamp:i;return n[e]={consented:t,timestamp:o},{regulation:"ccpa"===e?"CCPA":"GDPR",consented:t,timestamp_unixtime_ms:o}},eW=e=>{if(!e)return;let t=Number(e);return Number.isFinite(t)?t:void 0},ej=e=>{if(!e.event.context)return e;e.event.context.ht_eventsource="weather_web",e.event.context.ht_environment="production";let t=(()=>{let e=(0,eR.u)(eU.f.SALE_OF_DATA),t=(0,eR.u)(eU.f.SENSITIVE_DATA);if(null===e||null===t)return;let n=(()=>{try{return JSON.parse(localStorage.getItem(eG)??"{}")}catch{return{}}})(),i=String(Date.now()),r={ccpa:{data_sale_opt_out:e$("ccpa",!e,n,i)},gdpr:{sensitivedata:e$("gdpr",t,n,i)}};try{localStorage.setItem(eG,JSON.stringify(n))}catch{}return r})();t&&(e.event.context.consent_state=t);let n=(()=>{let e;if(!(0,eV.b)())return{...eH};let t=(0,eF.f)();if(!t)return;let n={latitude:eW(t["TWC-GeoIP-Lat"]),longitude:eW(t["TWC-GeoIP-Long"]),country_code:t["TWC-GeoIP-Country"]||void 0,region_code:t["TWC-GeoIP-Region"]||void 0,city_name:(e=t["TWC-GeoIP-City"])?decodeURIComponent(e).toLowerCase().replace(/(^|[\s-])\p{L}/gu,e=>e.toUpperCase()):void 0,dma_code:eW(t["TWC-GeoIP-DMA"]),location_source:"ip_lookup"};return Object.keys(n).forEach(e=>{void 0===n[e]&&delete n[e]}),Object.keys(n).length>1?n:void 0})();return n&&(e.event.context.location=n),e},eB={name:"web-feed-context-plugin",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:ej,page:ej,identify:ej},eK=e=>{let{properties:t}=e.event;return t&&!(0,eV.b)()&&(e.event.properties=(0,eV.m)(t,t.physicalCountry)),e},eJ={name:"full-metrics-consent-plugin",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:eK,page:eK};var eq=e.i(157112);let ez=(e,t)=>{if(!t){let t;(0,eq.f)("hightouchEventDropped",{event:e.event.event??e.event.type,type:e.event.type,reason:(t=e.failedDelivery()?.reason)instanceof Error?t.message:t&&"object"==typeof t&&"reason"in t?String(t.reason??""):t?String(t):""})}},eY={name:"delivery-monitor-plugin",type:"utility",version:"1.0.0",isLoaded:()=>!0,load:(e,t)=>(t.queue.on("flush",ez),Promise.resolve()),unload:(e,t)=>{t.queue.off("flush",ez)}};var eQ=e.i(126807);let eZ=(0,o.createLogger)("useRegisterPlugins"),eX=(0,o.createLogger)("useIdentify"),e0=["isLoggedIn","isRegisteredUser","premium","premiumProductTier","Amplitude.device_id","$FirstName","$Gender","saleOfDataAuthorization","sensitiveDataAuthorization","premiumProductId","premiumExpiration","premiumStart","premiumFirstTransactionDate","premiumProductAutoRenew","premiumPrice","premiumProductName","premiumProductTerm","recentLocationsCount","favoriteLocationsCount","appVersion","installationId","twcId"];var e1=e.i(867059),e3=e.i(782937),e2=e.i(950771),e7=e.i(537989),e5=e.i(695203),e4=e.i(158662),e6=e.i(777638),e8=e.i(727365),e9=e.i(896363),te=e.i(924776),tt=e.i(122124);let tn=(0,o.createLogger)("useSessionStart"),ti=["SUN","MON","TUE","WED","THU","FRI","SAT"],tr=new Set(["email-campaign","email-triggered","push-campaign","push-triggered","webpush-campaign","webpush-triggered","iam-campaign","iam-triggered"]),to=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),ta=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),tl=["cookiesEnabled","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","privProducts","regime","schemaVersion","sessionId","sessionStartTime","wlocCity","wlocCountry","wlocDMA","wlocState"],ts=(0,o.createLogger)("useLocationViewed"),tc=["SUN","MON","TUE","WED","THU","FRI","SAT"],tu=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),td=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),tf="wx-ht-location-viewed-last-fired",tp=e=>Math.trunc(10*e)/10,tg=["cookiesEnabled","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","regime","schemaVersion","sessionId","sessionStartTime","siteMode","wlocCity","wlocCountry","wlocDMA","wlocState"];var tm=e.i(673915),tw=e.i(604323);let ty=(0,o.createLogger)("usePageView"),th=["SUN","MON","TUE","WED","THU","FRI","SAT"],tv=new Set(["email-campaign","email-triggered","push-campaign","push-triggered","webpush-campaign","webpush-triggered","iam-campaign","iam-triggered"]),tS=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),tI=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),tC=["article","video","liveblog"],tb=["url","fullUrl","dayOfWeek","adsMetricsUnitAndZone","pageId","pageCount","schemaVersion","sessionId","sessionStartTime","locale","partner","deviceClass","wlocCity","wlocCountry","wlocState","siteMode","regime","cookiesEnabled","gpcSignalOptOut","functionalTechnologies","geographicallyRelevantAds","priv","hourOfDay","physicalCountry","physicalState","wlocDMA"],tE=null,tD=(0,o.createLogger)("usePageViewEnd"),tT=["SUN","MON","TUE","WED","THU","FRI","SAT"],tk=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),tA=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),t_=["adLoaded","adRequested","adsMetricsUnitAndZone","cookiesEnabled","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageCount","pageId","partner","physicalCountry","physicalState","priv","regime","schemaVersion","sessionId","sessionStartTime","siteMode","url","wlocCity","wlocCountry","wlocDMA","wlocState"],tP=l.default?new Date().getTime():0,tL=()=>l.default&&window.innerHeight>0?window.innerHeight:0,tO=tL();function tN(){window.scrollY>tO&&(tO=window.scrollY)}l.default&&(window.addEventListener("scroll",tN),(0,X.q)(()=>{tP=new Date().getTime(),tO=tL(),tN()}));let tR=null,tU=null,tM=new Set,tx=()=>tU,tF=e=>(tM.add(e),()=>{tM.delete(e)}),tV=(0,o.createLogger)("useArticleView"),tH=["SUN","MON","TUE","WED","THU","FRI","SAT"],tG=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),t$=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),tW=["appVersion","author","contentId","cookiesEnabled","createdDate","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","interestBasedAds","locale","pageId","pageType","partner","physicalCountry","physicalState","priv","publishDate","regime","sessionId","sessionStartTime","siteMode","url","wlocCity","wlocCountry","wlocDMA","wlocState"],tj=null;var tB=e.i(361957);let tK=(0,o.createLogger)("useArticleViewWebview"),tJ=e=>{if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t};var tq=e.i(320209),tz=e.i(409628);let tY=(0,o.createLogger)("useArticleViewEnd"),tQ=null,tZ=new Set,tX=e=>{let t=tQ;if(tQ=null,!t||tZ.has(t.payload.articleViewId))return;var n,i=t.payload.articleViewId;if(tZ.add(i),tZ.size>10){let e=tZ.values().next().value;void 0!==e&&tZ.delete(e)}n=t.payload.articleViewId,tR?.id===n&&(tR=null),tU?.id===n&&(tU=null,tM.forEach(e=>e()));let r=new Date;try{(0,ev.J)({...t.payload,articleExitReason:e,dayOfWeek:tz.f[r.getDay()]??"",hourOfDay:r.getHours()}),tY.info(`Hightouch: Event "article-view-end" tracked (${e})`)}catch(e){tY.error('Hightouch: Event "article-view-end" failed',{error:e})}},t0=(0,o.createLogger)("useSessionEnd"),t1="hightouch-session-end-snapshot",t3=e=>{(0,Y.isLocalStorageAvailable)()&&localStorage.setItem(t1,JSON.stringify(e))},t2=(0,o.createLogger)("useTrackPageMonetized"),t7=/top300|position1/i,t5=e=>e[0]?.slot?.getSlotElementId?.()??"";var t4=e.i(723469);let t6="data-track-string";(0,o.createLogger)("Hightouch");let t8=({scriptSrc:e})=>{if((0,i.y)(P.f))return(0,t.jsx)(ne,{});let n=E.default.env.NEXT_PUBLIC_HIGHTOUCH_API_HOST||"us-east-1.hightouch-events.com";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(t9,{}),(0,t.jsx)(eu.default,{id:"hightouch-sdk",strategy:"afterInteractive",children:`!function(){var e=window.htevents=window.htevents||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Hightouch snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.push(n),e}};for(var t=0;t{let e,t,r;return e=(0,i.F)(eS.f),(0,n.useEffect)(()=>{if(!l.default)return;let t=!1,n=()=>{window.htevents&&!t&&(t=!0,window.htevents.ready(()=>{window.htevents&&((0,ev.t)(window.htevents),e(!0))}))};return n(),window.addEventListener("htevents:loaded",n),()=>{window.removeEventListener("htevents:loaded",n)}},[e]),t=(0,i.y)(eS.f),(0,n.useEffect)(()=>{if(!l.default||t)return;let e=setTimeout(()=>(0,eq.f)("hightouchSdkNotLoaded"),1e4);return()=>clearTimeout(e)},[t]),(()=>{let e=(0,i.F)(eD.e),t=(0,i.F)(eD.C),{user:r,isUserIdLoading:o}=(0,d.f)(),{anonId:a,userID:u,isUserLoggedIn:f,isUserPremium:p,subscriptionTier:g}=r,m=(0,i.y)(A.I),w=(0,i.y)(A.P),y=(0,i.y)(A.i),h=(0,i.y)(eC.f),v=(0,i.y)(k.m),{recentLocations:S,favoriteLocations:I}=(0,eE.f)(),C=(0,i.y)(c.f),{twcID:b}=(0,i.y)(s.s);(0,D.f)();let E=l.default?(0,_.u)():null,T=(0,eN.f)(),P=void 0!==T,L=C?b:E,O=(0,n.useMemo)(()=>{if(!l.default||!P||f&&!u&&o)return null;let e=function(e){if(!e)return{};let[,t]=e.split(".");if(!t)return{};let n=t.replace(/-/g,"+").replace(/_/g,"/");try{return JSON.parse(window.atob(n))}catch{return{}}}((0,eI.getCookie)("subscription")??""),t="6bbd4204dd7437768dd9e31d47333d570221fb89",n=f&&h?.userId===u?(h.subscriptions??[]).flatMap(e=>{let t=eM[e.subscriptionGroupName];return e.isSubscribed&&t?[t]:[]}):[];return{isLoggedIn:f,isRegisteredUser:f||v||!1,premium:p??!1,premiumProductTier:(0,eb.f)(g),...f&&u?{upsxId:u}:{},"Amplitude.device_id":a,$FirstName:m??"",$Gender:w??"",saleOfDataAuthorization:(0,eR.u)(eU.f.SALE_OF_DATA,T),sensitiveDataAuthorization:(0,eR.u)(eU.f.SENSITIVE_DATA,T),premiumProductId:e.productID??null,premiumExpiration:e.expirationDateTime??null,premiumStart:e.transactionDateTime??null,premiumFirstTransactionDate:e.firstTransactionDateTime??null,premiumProductAutoRenew:e.autoRenew??null,premiumPrice:e.price??null,premiumProductName:e.productName??null,premiumProductTerm:e.term??null,recentLocationsCount:S.length,favoriteLocationsCount:I.length,...f&&y?{registeredEmail:y}:{},appVersion:t.slice(0,10),buildVersion_ds:t,emailSubscriptions:ex(n),subscribedAlerts_ds:ex([]),experiment_ds:null,variant_ds:null,lotame_id:null,triggerIds_ds:null,triggersLastUpdated_ds:null,ppid:null,premiumBundle:null,routines:null,routinesCount:0,transunionL2:null,transunionL3:null,videoAutoplaySettings_ds:null,installationId:a,twcId:L??"",devUser:!1}},[f,v,p,g,u,a,m,w,y,h,S,I,L,T,P,o]);(0,n.useEffect)(()=>{O&&(e(O),(0,eT.k)(O),e_=C,eP=b,t(!0))},[O,C,b,e,t])})(),(()=>{let e=(0,i.y)(eS.f),[t,r]=(0,i.q)(eQ.f);(0,n.useEffect)(()=>{l.default&&e&&window.htevents&&(t||window.htevents.register(eO,eT.Y,eB,eJ,eY).then(()=>r(!0)).catch(e=>eZ.error("Failed to register Hightouch plugins",e)))},[e,t,r])})(),(()=>{let e=(0,i.y)(c.f),{twcID:t,authSignature:r}=(0,i.y)(s.s),o=(0,i.y)(eS.f),a=(0,i.y)(eQ.f),u=(0,i.y)(eD.C),f=(0,i.y)(eD.e);(0,D.f)(),(0,n.useEffect)(()=>{(0,Y.isLocalStorageAvailable)()&&(localStorage.removeItem("wx-ht-identified"),localStorage.removeItem("wx-ht-identities"))},[]);let{user:p,isUserIdLoading:g}=(0,d.f)(),{anonId:m,userID:w,isUserLoggedIn:y}=p,h=`${m}|${w}`,v=(0,n.useRef)(null),[S,I]=(0,n.useState)(null),C=o&&u&&!g&&!(y&&!w);(0,n.useEffect)(()=>{if(!window.htevents||!m||!C)return;let e=!0;return Promise.resolve(window.htevents.user()).then(t=>{e&&window.htevents&&(t.traits()?.upsxId&&!w&&(window.htevents.reset(),v.current=null,eX.info("Hightouch: reset() called on logout")),t.anonymousId()!==m&&window.htevents.setAnonymousId(m),I({key:h}))}),()=>{e=!1}},[m,w,h,C]);let b=e?t:l.default?(0,_.u)():null,E=o&&a&&S?.key===h&&u&&!!f&&!!b&&e0.every(e=>void 0!==f[e])&&!g&&(f.upsxId??"")===w&&f.twcId===b&&(e?r===`${y}:${w}`:!!f.upsxId==!!(0,_.H)());(0,n.useEffect)(()=>{if(!window.htevents||!b||!E)return;let e=JSON.stringify({userId:b,traits:f});e!==v.current&&(v.current=e,(0,ev.W)(b,f),eA(),eX.info(`Hightouch: identify() called - userId: ${b}`))},[b,f,E,S])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=(0,i.y)(e2.f),o=(0,i.y)(e5.f),a=(0,i.y)(e4.f),{location:s,isLoading:c}=(0,B.f)(),u=(0,eN.f)(),d=(0,te.f)()&&void 0!==u,f=(0,e1.f)(),g=F(),m=(0,I.f)(),w=(0,n.useRef)(null),y=(0,n.useMemo)(()=>{if(!l.default||!t)return null;let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),c=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),d=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),p=window.DprSdk?.getGdprConsentOptInsString()??"",g=window.DprSdk?.getCcpaSaleOptInString()??"",m=window.navigator?.globalPrivacyControl??!1,w=(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,u),y=(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,u),h=(0,eR.u)(eU.f.SALE_OF_DATA,u),v=(0,eR.u)(eU.f.SENSITIVE_DATA,u),S=navigator?.cookieEnabled??!1,I=(0,eI.getCookie)("partner")||"",b=(0,e3.i)(I)??I,E=(0,C.N)(),D=E?.sessionId||"",T=new Date(E?.sessionStartTime||0).toISOString(),k=new Date,A=k.getHours(),_=ti[k.getDay()]??"",P=t&&["article","video"].includes(t)?e?.split("/").slice(0,-1).join("/")??"":(0,tt.N)(e??""),L=document.referrer,{utmSource:O,utmMedium:N,utmCampaign:R,utmContent:U,utmTerm:M}=(0,e6.k)(),x=(0,e8.f)(s?.type),F=s?.featureSource??null;return{pageId:t,schemaVersion:"nextgen",pageCount:f,sessionId:D,sessionStartTime:T,locale:r,partner:b,deviceClass:o,wlocCity:s?.city??null,wlocCountry:s?.countryCode??null,wlocState:s?.adminDistrictCode??null,wlocDMA:s?.dmaCd??null,wlocId:s?.placeId??null,wlocFeatureSource:null!=F&&ta.has(F)?F:void 0,wlocTags:s?.tags?.length?(0,e9.f)(s.tags):null,wlocType:null!==x&&to.has(x)?x:void 0,wlocFeatureId:s?.featureId??null,siteMode:"normal",dayOfWeek:_,regime:d??"",cookiesEnabled:S,gpcSignalOptOut:m,functionalTechnologies:w,geographicallyRelevantAds:y,priv:p,privProducts:g,saleOfDataAuthorization:h,sensitiveDataAuthorization:v,interestBasedAds:u?.[eU.f.INTEREST_BASED_ADS]??null,hourOfDay:A,physicalCountry:i??"",physicalState:c??"",url:P,referrer:L,utmSource:O,utmMedium:null!==N&&tr.has(N)?N:null,utmCampaign:R,utmContent:U,utmTerm:M,campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:a,weatherMode:"normal",samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[f,t,r,o,s,e,a,u]),h=d&&void 0!==f&&g&&null!==y&&!c&&tl.every(e=>void 0!==y[e]);(0,n.useEffect)(()=>{if(y&&h&&(0,C.Y)()&&w.current!==m)try{(0,ev.g)(y),w.current=m,(0,C.D)(),tn.info(`Hightouch: Event "session-start" tracked - sessionId: ${y.sessionId}`)}catch(e){tn.error('Hightouch: Event "session-start" failed',{error:e})}},[y,h,m])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e2.f),r=(0,i.y)(e5.f),o=(0,i.y)(e4.f),{location:a}=(0,B.f)(),s=(0,eN.f)(),c=(0,te.f)()&&void 0!==s,u=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),l=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),s=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),c=(0,eI.getCookie)("partner")||"",u=(0,e3.i)(c)??c,d=new Date;return{sessionId:e.sessionId,sessionStartTime:new Date(e.sessionStartTime).toISOString(),duration:Math.max(0,Math.round((e.lastActiveTime-e.sessionStartTime)/1e3)),locale:t,deviceClass:r,partner:u,siteMode:"normal",dayOfWeek:tz.f[d.getDay()]??"",hourOfDay:d.getHours(),regime:s??"",cookiesEnabled:navigator?.cookieEnabled??!1,gpcSignalOptOut:window.navigator?.globalPrivacyControl??!1,priv:window.DprSdk?.getGdprConsentOptInsString()??"",referrer:document.referrer,campaign:(0,e6.s)(),experimentJoinList:o,weatherMode:"normal",physicalCountry:i??"",physicalState:l??"",wlocCity:a?.city??null,wlocCountry:a?.countryCode??null,wlocState:a?.adminDistrictCode??null,wlocDMA:a?.dmaCd??null,samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[t,r,o,a]),f=(0,n.useCallback)(()=>{if(!l.default||!c)return;let e=(0,C.N)();if(!e?.sessionId)return;let t=(()=>{if(!(0,Y.isLocalStorageAvailable)())return null;try{let e=JSON.parse(localStorage.getItem(t1)??"null");return e?.sessionId?e:null}catch{return null}})(),n=Date.now();if(t&&t.sessionId!==e.sessionId){if(u.current!==t.sessionId){u.current=t.sessionId;try{(0,ev.m)(d(t)),t0.info(`Hightouch: Event "session-end" tracked - sessionId: ${t.sessionId}`)}catch(e){t0.error('Hightouch: Event "session-end" failed',{error:e})}}t3({sessionId:e.sessionId,sessionStartTime:e.sessionStartTime,lastActiveTime:n});return}t&&(0,C.C)()||t3({sessionId:e.sessionId,sessionStartTime:e.sessionStartTime,lastActiveTime:n})},[c,d]);(0,n.useEffect)(()=>{f()},[f,e]),(0,n.useEffect)(()=>{if(!l.default)return;let e=()=>{"hidden"===document.visibilityState&&f()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[f])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=!!t,o=(0,i.y)(e2.f),a=(0,i.y)(e5.f),s=(0,i.y)(K.f),{location:c,isLoading:u}=(0,B.f)(),d=(0,eN.f)(),f=(0,te.f)()&&void 0!==d,g=(0,e1.f)(),m=(0,I.f)(),w=F(),y=(0,i.y)(tm.f),b=(0,i.y)(tw.f),E=(0,i.y)(e4.f),D=(0,i.y)(q.D),T=(0,i.y)(q.M),[k,A]=(0,i.q)(h.f),[_,P]=(0,i.q)(v.f),[L,O]=(0,i.q)(S.f),N=j(t,(0,i.y)(H.f),k,_),R=(0,n.useMemo)(()=>{if(!l.default||!t||void 0===g)return null;let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),u=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),f=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),p=window.DprSdk?.getGdprConsentOptInsString()??"",m=window.DprSdk?.getCcpaSaleOptInString()??"",w=window.navigator?.globalPrivacyControl??!1,h=(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,d),v=(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,d),S=(0,eR.u)(eU.f.SALE_OF_DATA,d),I=navigator?.cookieEnabled??!1,A=(0,eI.getCookie)("partner")||"",P=(0,e3.i)(A)??A,O=document.referrer,{utmSource:R,utmMedium:U,utmCampaign:M,utmContent:x,utmTerm:F}=(0,e6.k)(),V=(0,eR.u)(eU.f.SENSITIVE_DATA,d),H=(0,C.N)(),G=H?.sessionId||"",$=new Date(H?.sessionStartTime||0).toISOString(),W=new Date,j=W.getHours(),B=th[W.getDay()]??"",K=r&&["article","video"].includes(t)?e?.split("/").slice(0,-1).join("/")??"":(0,tt.N)(e??""),J=r&&!["video","article"].includes(t)?window.location.href:"",q=(0,e8.f)(c?.type),z=c?.featureSource??null,Y=tC.includes(t)?{author:b?.author??null,collection:b?.collection??null,contentId:b?.contentId??null,createdDate:b?.createdDate??null,entitlements:b?.entitlements??null,iabContent:b?.iabContent??void 0,nodeTypes:b?.nodeType??null,pageTemplate:b?.pageTemplate??null,premiumContent:b?.premiumContent!=null?String(b.premiumContent):null,provider:b?.provider??null,publishDate:b?.publishDate??null,tagsGeo:b?.tagsGeo??null,tagsKeyword:b?.tagsKeyword??null,tagsStorm:b?.tagsStorm??null}:{};return{url:K,fullUrl:J,dayOfWeek:B,adsMetricsUnitAndZone:s,pageId:t,pageCount:g,schemaVersion:"nextgen",sessionId:G,sessionStartTime:$,locale:o,partner:P,deviceClass:a,wlocCity:c?.city??null,wlocCountry:c?.countryCode??null,wlocState:c?.adminDistrictCode??null,siteMode:"normal",regime:f??"",cookiesEnabled:I,gpcSignalOptOut:w,functionalTechnologies:h,geographicallyRelevantAds:v,priv:p,privProducts:m,saleOfDataAuthorization:S,hourOfDay:j,physicalCountry:i??"",physicalState:u??"",wlocDMA:c?.dmaCd??null,wlocId:c?.placeId??null,wlocFeatureSource:null!=z&&tI.has(z)?z:void 0,wlocTags:c?.tags?.length?(0,e9.f)(c.tags):null,wlocType:null!==q&&tS.has(q)?q:void 0,samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10),interestBasedAds:d?.[eU.f.INTEREST_BASED_ADS]??null,sensitiveDataAuthorization:V,referrer:O,fromString:y,fromSearchResult:L??null,utmSource:R,utmMedium:null!==U&&tv.has(U)?U:null,utmCampaign:M,utmContent:x,utmTerm:F,campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:E,weatherMode:"normal",layoutState:D??void 0,activeEvent:T,wlocPresentationName:c?.presentationName??null,wlocFeatureId:c?.featureId??null,sourcePage:N?.sourcePage??k??null,sourceModule:N?.sourceModule??_?.id??null,sourcePosition:_?.position!=null?String(_.position):null,sourceElement:N?.sourceElement??_?.element??null,...Y}},[g,e,t,o,a,s,c,y,k,_,N,L,b,E,D,T,d]),U=f&&w&&null!==R&&!u&&r&&tb.every(e=>void 0!==R[e]);(0,n.useEffect)(()=>{let t=`${m}:${e}`;if(R&&U&&tE!==t){try{(0,ev.d)(R),tE=t,ty.info(`Hightouch: Event "page-viewed" tracked - ${e}`)}catch(e){ty.error('Hightouch: Event "page-viewed" failed',{error:e})}k&&A(null),_&&P(null),L&&O(null)}},[e,m,R,U,k,A,_,P,L,O])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=(0,i.y)(e2.f),o=(0,i.y)(e5.f),a=(0,i.y)(e4.f),{location:s,isLoading:c}=(0,B.f)(),u=(0,eN.f)(),d=(0,te.f)()&&void 0!==u,f=F(),g=(0,n.useRef)(null),m=(0,e1.f)(),w=s?.geocode,y=(0,n.useMemo)(()=>{if(!l.default||void 0===m||!t||!w)return null;let[n,i]=w.split(","),c=Number(n),d=Number(i);if(!Number.isFinite(c)||!Number.isFinite(d))return null;let f=(0,eF.f)(),p=f?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),g=f?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),y=f?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),h=window.DprSdk?.getGdprConsentOptInsString()??"",v=window.DprSdk?.getCcpaSaleOptInString()??"",S=window.navigator?.globalPrivacyControl??!1,I=(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,u),b=(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,u),E=(0,eR.u)(eU.f.SALE_OF_DATA,u),D=(0,eR.u)(eU.f.SENSITIVE_DATA,u),T=navigator?.cookieEnabled??!1,k=(0,eI.getCookie)("partner")||"",A=(0,e3.i)(k)??k,_=(0,C.N)(),P=_?.sessionId||"",L=new Date(_?.sessionStartTime||0).toISOString(),O=new Date,N=O.getHours(),R=tc[O.getDay()]??"",U=["article","video"].includes(t)?e?.split("/").slice(0,-1).join("/")??"":(0,tt.N)(e??""),M=document.referrer,x=(0,e8.f)(s?.type),F=s?.featureSource??null,V=s?.ianaTimeZone;return{pageId:t,schemaVersion:"nextgen",sessionId:P,sessionStartTime:L,locale:r,partner:A,deviceClass:o,latitude:tp(c),longitude:tp(d),ianaTimeZone:"string"==typeof V&&V.length>0?V.slice(0,255):"Etc/UTC",postalCode:s?.postalCode??void 0,type:s?.type??void 0,wlocCity:s?.city??null,wlocCountry:s?.countryCode??null,wlocState:s?.adminDistrictCode??null,wlocDMA:s?.dmaCd??null,wlocId:s?.placeId??null,wlocFeatureSource:null!=F&&td.has(F)?F:void 0,wlocTags:s?.tags?.length?(0,e9.f)(s.tags):null,wlocType:null!==x&&tu.has(x)?x:void 0,wlocFeatureId:s?.featureId??null,siteMode:"normal",dayOfWeek:R,regime:y??"",cookiesEnabled:T,gpcSignalOptOut:S,functionalTechnologies:I,geographicallyRelevantAds:b,priv:h,privProducts:v,saleOfDataAuthorization:E,sensitiveDataAuthorization:D,interestBasedAds:u?.[eU.f.INTEREST_BASED_ADS]??null,hourOfDay:N,physicalCountry:p??"",physicalState:g??"",url:U,referrer:M,campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:a??null,weatherMode:"normal",samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[m,t,r,o,a,s,w,e,u]),h=d&&f&&null!==y&&!c&&tg.every(e=>void 0!==y[e]);(0,n.useEffect)(()=>{if(!y||!h||!w||!y.sessionId)return;let e=`${w}|${y.sessionId}`;if(g.current===e)return;let t=(()=>{if(!(0,Y.isLocalStorageAvailable)())return null;try{let e=localStorage.getItem(tf);if(!e)return null;let t=JSON.parse(e);if("string"!=typeof t?.geocode||"string"!=typeof t?.sessionId)return null;return t}catch{return null}})();if(t?.geocode===w&&t.sessionId===y.sessionId){g.current=e;return}(0,ev.L)(y),g.current=e;var n={geocode:w,sessionId:y.sessionId};if((0,Y.isLocalStorageAvailable)())try{localStorage.setItem(tf,JSON.stringify(n))}catch{}ts.info(`Hightouch: Event "location-viewed" tracked - ${s?.displayName??w}`)},[y,h,w,s?.displayName])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=!!t,o=(0,i.y)(e2.f),a=(0,i.y)(e5.f),s=(0,i.y)(K.f),{location:c,isLoading:u}=(0,B.f)(),d=(0,eN.f)(),f=(0,te.f)()&&void 0!==d,g=(0,e1.f)(),m=(0,I.f)(),w=F(),y=(0,i.y)(tm.f),h=(0,i.y)(e4.f),v=(0,n.useMemo)(()=>{if(!l.default||!t||void 0===g)return null;let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),u=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),f=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),p=window.DprSdk?.getGdprConsentOptInsString()??"",m=window.DprSdk?.getCcpaSaleOptInString()??"",w=window.navigator?.globalPrivacyControl??!1,v=(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,d),S=(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,d),I=(0,eR.u)(eU.f.SALE_OF_DATA,d),b=(0,eR.u)(eU.f.SENSITIVE_DATA,d),E=navigator?.cookieEnabled??!1,D=(0,eI.getCookie)("partner")||"",T=(0,e3.i)(D)??D,k=(0,C.N)(),A=k?.sessionId||"",_=new Date(k?.sessionStartTime||0).toISOString(),P=new Date,L=P.getHours(),O=tT[P.getDay()]??"",N=r&&["article","video"].includes(t)?e?.split("/").slice(0,-1).join("/")??"":(0,tt.N)(e??""),R=document.referrer,U=window.location.search.replace(/^\?/,"")||null,M=(0,e8.f)(c?.type),x=c?.featureSource??null;return{adLoaded:null,adRequested:null,adsMetricsUnitAndZone:s,url:N,dayOfWeek:O,pageId:t,pageCount:g,schemaVersion:"nextgen",sessionId:A,sessionStartTime:_,locale:o,partner:T,deviceClass:a,wlocCity:c?.city??null,wlocCountry:c?.countryCode??null,wlocState:c?.adminDistrictCode??null,wlocDMA:c?.dmaCd??null,wlocId:c?.placeId??null,wlocFeatureSource:null!=x&&tA.has(x)?x:void 0,wlocTags:c?.tags?.length?(0,e9.f)(c.tags):null,wlocType:null!==M&&tk.has(M)?M:void 0,wlocFeatureId:c?.featureId??null,siteMode:"normal",regime:f??"",cookiesEnabled:E,gpcSignalOptOut:w,functionalTechnologies:v,geographicallyRelevantAds:S,priv:p,privProducts:m,saleOfDataAuthorization:I,sensitiveDataAuthorization:b,interestBasedAds:d?.[eU.f.INTEREST_BASED_ADS]??null,referrer:R,pageQuery:U,fromString:y,campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:h,weatherMode:"normal",hourOfDay:L,physicalCountry:i??"",physicalState:u??"",samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10),timeOnPage:0}},[g,e,t,o,a,s,c,y,h,d]),S=f&&w&&null!==v&&!u&&r&&t_.every(e=>void 0!==v[e]),b=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!v||!S)return;let e=()=>{let e,t;if(b.current===m)return;b.current=m;let n=(new Date().getTime()-tP)/1e3,i=(e=document.documentElement.scrollHeight,e===(t=window.innerHeight)?100:Math.min(100,Math.max(0,Math.round(tO/(e-t)*100))));try{(0,ev.c)({...v,timeOnPage:n,scrollDepth:i}),tD.info(`Hightouch: Event "page-view-end" tracked - timeOnPage: ${n}`)}catch(e){tD.error('Hightouch: Event "page-view-end" failed',{error:e})}};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[v,S,m])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=(0,i.y)(e2.f),o=(0,i.y)(e5.f),a=(0,i.y)(tw.f),s=(0,i.y)(h.f),c=(0,i.y)(v.f),u=(0,i.y)(tm.f),d=(0,i.y)(e4.f),{location:f,isLoading:g}=(0,B.f)(),m=(0,eN.f)(),w=(0,te.f)()&&void 0!==m,y=F(),S=(0,e1.f)(),b=(0,I.f)(),E=(0,n.useMemo)(()=>{if(!l.default||void 0===S||"article"!==t&&"liveblog"!==t)return null;let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),p=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),g=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),w=window.DprSdk?.getGdprConsentOptInsString()??"",y=window.DprSdk?.getCcpaSaleOptInString()??"",h=window.navigator?.globalPrivacyControl??!1,v=(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,m),I=(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,m),b=navigator?.cookieEnabled??!1,E=(0,eI.getCookie)("partner")||"",D=(0,e3.i)(E)??E,T=(0,C.N)(),k=T?.sessionId||"",A=new Date(T?.sessionStartTime||0).toISOString(),_=new Date,P=_.getHours(),L=tH[_.getDay()]??"",O=e?.split("/").slice(0,-1).join("/")??"",N=document.referrer,R=(0,e8.f)(f?.type),U=f?.featureSource??null;return{articleViewId:e?(tR?.pathname!==e&&(tR={pathname:e,id:(()=>{try{return crypto.randomUUID()}catch{return`${Date.now()}-${Math.random().toString(36).slice(2)}`}})()}),tR.id):null,pageId:t,pageType:"liveblog"===t?"liveblog":"article",author:a?.author||"",contentId:a?.contentId??"",createdDate:a?.createdDate??"",publishDate:a?.publishDate??"",collection:a?.collection??null,entitlements:a?.entitlements??null,nodeTypes:a?.nodeType??null,pageTemplate:a?.pageTemplate??null,premiumContent:a?.premiumContent??null,provider:a?.provider??null,tagsGeo:a?.tagsGeo??null,tagsKeyword:a?.tagsKeyword??null,tagsStorm:a?.tagsStorm??null,sourcePage:s??null,sourceModule:c?.id??null,sourceElement:c?.element??null,sourcePosition:c?.modulePosition??null,sessionId:k,sessionStartTime:A,locale:r,partner:D,deviceClass:o,wlocCity:f?.city??null,wlocCountry:f?.countryCode??null,wlocState:f?.adminDistrictCode??null,wlocDMA:f?.dmaCd??null,wlocId:f?.placeId??null,wlocFeatureSource:null!=U&&t$.has(U)?U:void 0,wlocTags:f?.tags?.length?(0,e9.f)(f.tags):null,wlocType:null!==R&&tG.has(R)?R:void 0,wlocFeatureId:f?.featureId??null,siteMode:"normal",dayOfWeek:L,regime:g??"",cookiesEnabled:b,gpcSignalOptOut:h,functionalTechnologies:v,geographicallyRelevantAds:I,priv:w,hourOfDay:P,physicalCountry:i??"",physicalState:p??"",url:O,samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10),interestBasedAds:m?.[eU.f.INTEREST_BASED_ADS]??null,privProducts:y,referrer:N,fromString:u,schemaVersion:"nextgen",campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:d,weatherMode:"normal"}},[S,t,r,o,f,a,s,c,e,u,d,m]),D=w&&y&&null!==E&&!g&&tW.every(e=>void 0!==E[e]);(0,n.useEffect)(()=>{let t=`${b}:${e}`;if(E&&D&&tj!==t)try{var n;(0,ev.K)(E),tj=t,e&&E.articleViewId&&(n=E.articleViewId,tU={pathname:e,id:n},tM.forEach(e=>e())),tV.info(`Hightouch: Event "article-viewed" tracked - ${e}`)}catch(e){tV.error('Hightouch: Event "article-viewed" failed',{error:e})}},[e,b,E,D])})(),(()=>{let e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=(0,i.y)(e2.f),o=(0,i.y)(e5.f),a=(0,i.y)(tw.f),s=(0,i.y)(e4.f),{location:c}=(0,B.f)(),u=(0,eN.f)(),d=(0,te.f)()&&void 0!==u,f=(0,n.useSyncExternalStore)(tF,tx,()=>null),g=(0,n.useMemo)(()=>{if(!l.default||!e||"article"!==t&&"liveblog"!==t||!a?.contentId||f?.pathname!==e)return null;let n=(0,eF.f)(),i=n?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),d=n?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),p=n?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),g=window.DprSdk?.getGdprConsentOptInsString()??"",m=(0,eI.getCookie)("partner")||"",w=(0,C.N)(),y=new Date;return{articleViewId:f.id,contentId:a.contentId,pageId:t,url:e.split("/").slice(0,-1).join("/"),schemaVersion:"nextgen",locale:r,deviceClass:o,partner:(0,e3.i)(m)??m,sessionId:w?.sessionId||"",sessionStartTime:new Date(w?.sessionStartTime||0).toISOString(),siteMode:"normal",weatherMode:"normal",dayOfWeek:tz.f[y.getDay()]??"",hourOfDay:y.getHours(),regime:p??"",cookiesEnabled:navigator?.cookieEnabled??!1,gpcSignalOptOut:window.navigator?.globalPrivacyControl??!1,functionalTechnologies:(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY,u),geographicallyRelevantAds:(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,u),interestBasedAds:u?.[eU.f.INTEREST_BASED_ADS]??null,priv:g,privProducts:window.DprSdk?.getCcpaSaleOptInString()??"",experimentJoinList:s,physicalCountry:i??"",physicalState:d??"",wlocCity:c?.city??null,wlocCountry:c?.countryCode??null,wlocState:c?.adminDistrictCode??null,wlocDMA:c?.dmaCd??null,appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[e,f,t,a,r,o,s,c,u]);(0,n.useEffect)(()=>{tQ&&tQ.pathname!==e&&tX("navigated")},[e]),(0,n.useEffect)(()=>{d&&g&&e&&(tQ={pathname:e,payload:g})},[d,g,e]),(0,n.useEffect)(()=>{if(!l.default)return;let e=()=>tX("dismissed");return window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("pagehide",e)}},[])})(),(()=>{let e=(0,i.y)(e7.f),t=(0,i.y)(e2.f),r=(0,i.y)(e5.f),o=(0,i.y)(K.f),a=(0,i.y)(tm.f),s=(0,i.y)(e4.f),c=(0,p.usePathname)(),{location:u}=(0,B.f)(),d=(0,eN.f)(),f=(0,te.f)()&&void 0!==d,g=(0,e1.f)(),m=(0,n.useCallback)((n,i)=>{let l=(0,eF.f)(),f=l?.["TWC-GeoIP-Country"]??(0,eI.getCookie)("twc-location-country"),p=l?.["TWC-GeoIP-Region"]??(0,eI.getCookie)("twc-location-region"),g=l?.["TWC-Privacy"]??(0,eI.getCookie)("twc-privacy"),m=window.DprSdk?.getGdprConsentOptInsString()??"",w=window.DprSdk?.getCcpaSaleOptInString()??"",y=(0,eR.u)(eU.f.SALE_OF_DATA),h=(0,eI.getCookie)("partner")||"",v=(0,e3.i)(h)??h,S=(0,C.N)(),I=new Date;return{adPosition:n,adsMetricsUnitAndZone:o,pageId:e??"",url:e&&["article","video"].includes(e)?c?.split("/").slice(0,-1).join("/")??"":(0,tt.N)(c??""),pageCount:i,schemaVersion:"nextgen",referrer:document.referrer,fromString:a,locale:t,deviceClass:r,partner:v,sessionId:S?.sessionId||"",sessionStartTime:new Date(S?.sessionStartTime||0).toISOString(),siteMode:"normal",dayOfWeek:tz.f[I.getDay()]??"",hourOfDay:I.getHours(),regime:g??"",cookiesEnabled:navigator?.cookieEnabled??!1,gpcSignalOptOut:window.navigator?.globalPrivacyControl??!1,functionalTechnologies:(0,eR.u)(eU.f.FUNCTIONAL_TECHNOLOGY),geographicallyRelevantAds:(0,eR.u)(eU.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING),interestBasedAds:d?.[eU.f.INTEREST_BASED_ADS]??null,priv:m,privProducts:w,saleOfDataAuthorization:y,sensitiveDataAuthorization:(0,eR.u)(eU.f.SENSITIVE_DATA),campaign:(0,e6.s)(),tpcc:(0,e6.J)(),linkReferral:(0,e6.W)(),experimentJoinList:s,weatherMode:"normal",physicalCountry:f??"",physicalState:p??"",wlocCity:u?.city??null,wlocCountry:u?.countryCode??null,wlocState:u?.adminDistrictCode??null,wlocDMA:u?.dmaCd??null,samsungVersion:(0,e6.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[e,t,r,o,a,s,c,u,d]),w=(0,n.useRef)(m);w.current=m;let y=(0,n.useRef)(g);y.current=g;let h=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!l.default||!f||void 0===g||h.current)return;h.current=!0;let e=window;e.__HeliosQ=e.__HeliosQ||[],e.__HeliosQ.push(()=>{e.__Helios?.waitForEvent("SLOT_ON_LOAD",{filter:({args:e})=>t7.test(t5(e))}).then(({args:e})=>{(0,ev.b)(w.current(t5(e),y.current??g)),t2.info('Hightouch: Event "page-monetized" tracked')}).catch(e=>{t2.error('Hightouch: Event "page-monetized" failed',{error:e})})})},[f,g])})(),(0,tq.f)(),r=(0,t4.f)(),(0,n.useEffect)(()=>{let e=e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`[${t6}]`)?.getAttribute(t6);t&&"false"!==t&&r(t)};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[r]),null},ne=()=>{let e,t,r,o,s,c,u,d,f,g,m;return e=(0,p.usePathname)(),t=(0,i.y)(e7.f),r=(0,i.y)(tw.f),o=(0,i.y)(P.f),s=(0,n.useMemo)(()=>{if(!l.default||!o||"article"!==t&&"liveblog"!==t)return null;try{return crypto.randomUUID()}catch{return`${Date.now()}-${Math.random().toString(36).slice(2)}`}},[o,t,e]),(c=(0,n.useRef)(s)).current=s,u=(0,n.useRef)(new Set),d=(0,n.useCallback)(async(e,t)=>{if(u.current.has(e))return;u.current.add(e);let{data:n,error:i}=await (0,a.f)((0,tB.emit)("article-view-end",{articleViewId:e,endTime:Date.now(),articleExitReason:t}));i?tK.error('bridge: "article-view-end" failed',i):tK.info(`bridge: "article-view-end" ${n.status} (${t})`)},[]),f=(0,n.useRef)(null),g=(0,n.useRef)(null),m=(0,n.useRef)(e),(0,n.useEffect)(()=>{m.current!==e&&(m.current=e,f.current&&(d(f.current,"navigated"),f.current=null))},[e,d]),(0,n.useEffect)(()=>{if(!s||g.current===e)return;let t=r?.contentId;t&&(g.current=e,f.current=s,(async()=>{let{data:n,error:i}=await (0,a.f)((0,tB.emit)("article-viewed",{articleViewId:s,startTime:Date.now(),contentId:t,collection:r?.collection??null,author:r?.author??null,provider:r?.provider??null,publishDate:tJ(r?.publishDate),createdDate:tJ(r?.createdDate),nodeType:r?.nodeType??null,pageTemplate:r?.pageTemplate??null,premiumContent:r?.premiumContent??null,entitlements:r?.entitlements??null,tagsKeyword:r?.tagsKeyword??null,tagsStorm:r?.tagsStorm??null,tagsGeo:r?.tagsGeo??null}));i?tK.error('bridge: "article-viewed" failed',i):tK.info(`bridge: "article-viewed" ${n.status} - ${e}`)})())},[s,e,r]),(0,n.useEffect)(()=>{if(!l.default||!o)return;let e=e=>{c.current&&d(c.current,e)};window.__twcArticleFlush=()=>e("dismissed");let t=()=>{"hidden"===document.visibilityState&&e("backgrounded")},n=()=>e("navigated");return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",n),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",n),delete window.__twcArticleFlush}},[o,d]),null};var nt=e.i(691458);e.s(["Analytics",0,({scriptSrc:e,hightouchScriptSrc:o})=>{let p,g,m;return p=(0,i.F)(tm.f),(0,n.useEffect)(()=>{let e=(0,eI.getCookie)("fromStr");e&&(p(String(e)),(0,eI.deleteCookie)("fromStr",{domain:".weather.com"}))},[]),g=(0,i.F)(J.f),(0,n.useEffect)(()=>{let e=!1,t=null,n=null,i=null;return Promise.all([new Promise(e=>{(i=document.createElement("div")).id="ad-detector-bait",i.className="ad-banner ad-unit ad-placeholder",i.style.cssText="width:1px !important;height:1px !important;position:absolute;left:-9999px !important;top:-1000px !important;",document.body.appendChild(i),t=setTimeout(()=>{if(t=null,!i)return e(!1);let n=window.getComputedStyle(i),r=!document.body.contains(i)||null===i.offsetParent||"none"===n.display||"hidden"===n.visibility;i.remove(),i=null,e(r)},50)}),new Promise(e=>{n=setTimeout(()=>{n=null,e(!0)},3e3),fetch("https://securepubads.g.doubleclick.net/pagead/ppub_config",{method:"HEAD",mode:"no-cors"}).then(()=>{null!==n&&clearTimeout(n),n=null,e(!1)}).catch(()=>{null!==n&&clearTimeout(n),n=null,e(!0)})})]).then(([t,n])=>{e||g(t||n)}),()=>{e=!0,null!==t&&clearTimeout(t),null!==n&&clearTimeout(n),i?.remove(),i=null}},[g]),function(){let{user:{anonId:e,isUserLoggedIn:t,userID:o}}=(0,d.f)(),[p,g]=(0,i.q)(s.s),m=(0,i.y)(c.f),w=p.expiresAt?Date.parse(p.expiresAt):0/0,y=!Number.isFinite(w)||w{if(!l.default||!e||!I||!m)return;let t=!1;return(async()=>{let{data:n,error:i}=await (0,a.f)(u.f.identity.resolve(e));if(!t){if(i||!n)return void f.error("Failed to resolve identity",i);g({twcID:n.twcID,hashedTwcID:n.hashedTwcID,expiresAt:n.expiresAt,manifestVersion:n.manifestVersion,installationID:e,authSignature:v})}})(),()=>{t=!0}},[e,I,v,g,m]),(0,n.useEffect)(()=>{m||null===p.twcID||g(r.s)},[m,p.twcID,g]),p.twcID,p.hashedTwcID}(),m=(0,i.f)(),(0,n.useEffect)(()=>{let e=()=>{let e=m.get(nt.n);e&&((0,eR.O)(e),m.set(nt.a,!0))};return e(),m.sub(nt.n,e)},[m]),(0,n.useEffect)(()=>{if(!window.DprSdk)return void m.set(nt.a,!0);let e=window.setTimeout(()=>m.set(nt.a,!0),3e3);return()=>window.clearTimeout(e)},[m]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{}),(0,t.jsx)(es,{scriptSrc:e}),(0,t.jsx)(eg,{}),(0,t.jsx)(eh,{}),(0,t.jsx)(t8,{scriptSrc:o})]})}],569579)},572739,e=>{"use strict";var t=e.i(458201),n=e.i(526932),i=e.i(2248),r=e.i(282446),o=e.i(538167),a=e.i(725296),l=e.i(528600),s=e.i(691458);e.s(["default",0,function({regime:e,isUserLoggedIn:c}){let u=(0,r.f)(),{user:{userID:d},isUserIdLoading:f}=(0,l.f)();return(0,o.useEffect)(()=>{let e=window.top?.__twcResolveUserId;e&&(c?d?e(d):f||e(""):e(""))},[c,d,f]),a.E.includes(e)&&(0,i.preload)("https://cdn.privacy-mgmt.com/unified/wrapperMessagingWithoutDetection.js",{as:"script"}),(0,o.useEffect)(()=>{(async()=>{window?.DprSdk?.isInitialized&&(await window?.DprSdk.isInitialized,u.set(s.D,!0))})()},[u]),(0,o.useEffect)(()=>{let e=window.top,t=e?.DprSdk?.isUserConsentsInitialized;if(!e||!t)return;let n=!0,i=e=>u.set(s.n,{...e});return(async()=>{await t,n&&(e.__twcUserConsents&&i(e.__twcUserConsents),e.__twcOnUserConsents=i)})(),()=>{n=!1,delete e.__twcOnUserConsents}},[u]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.default,{id:"dprsdk-script",src:"https://weather.com/api/v1/script/dprSdkScript.js",strategy:"beforeInteractive"}),(0,t.jsx)(n.default,{id:"dprsdk-init",strategy:"beforeInteractive",children:` if (window.top?.DprSdk) { var w = window.top; if (!w.__twcUserId) { w.__twcUserId = new Promise(function (r) { w.__twcResolveUserId = r; }); } var getRegisteredUserId = function () { return w.__twcUserId; }; async function initDprSdk() { try { await w.DprSdk.init({ getApplicationInfo: function () { return { id: 'weather.com', version: '2.0.0' }; }, getUserRegime: function () { return '${e}'; }, getUserId: getRegisteredUserId, getRegisteredUserId: getRegisteredUserId, getIsUserLoggedIn: function () { return ${c}; }, setUserConsents: function (consents) { w.__twcUserConsents = consents; if (w.__twcOnUserConsents) w.__twcOnUserConsents(consents); }, }); } catch (_error) { // do nothing. } } initDprSdk(); } `})]})}])},595315,e=>{"use strict";var t=e.i(538167),n=e.i(333350),i=e.i(742436),r=e.i(569014);let o=new Set;e.s(["default",0,function({env1:e}){let a=null!==(0,t.useContext)(i.ExperimentContext);return(0,t.useEffect)(()=>{if(n.default&&a)for(let t of(0,r.o)(e)){let e=(0,r.C)(t);if(o.has(e))continue;let n=()=>{let n=window.__wxExposureSink;!n||o.has(e)||(o.add(e),n(t))};window.mParticle?.isInitialized?.()?n():window.mParticle?.ready?.(n)}},[a,e]),null}])},792302,e=>{"use strict";var t=e.i(458201),n=e.i(289818),i=e.i(282446),r=e.i(5397),o=e.i(538167),a=e.i(26752),l=e.i(674339),s=e.i(935251),c=e.i(695881),u=e.i(609858);let d=(0,c.createLogger)("AtomDebugHydrationBoundaries"),f=({debugData:e})=>{let{updateSection:t}=(0,u.f)(),n=(0,s.usePathname)();return d.info("Initial props received",{hasDebugData:!!e,currentPath:n}),(0,a.f)([[l.f,e||{timestamp:new Date().toISOString()}]]),(0,o.useEffect)(()=>{d.lifecycle("Path changed",n);let i=sessionStorage.getItem("lastPath"),r=!i||i===n;d.info("Navigation type",r?"Direct load/refresh":"Client-side navigation"),t("route",n),r&&!e?t("meta",{dataState:"stale",lastConfirmedPath:i||null,currentPath:n,isDirectLoad:!0,timestamp:new Date().toISOString()}):(t("components",{}),e&&(d.info("Updating with new debug data for path",n),e.page&&t("page",e.page),e.match&&t("match",e.match),e.timestamp&&t("timestamp",e.timestamp),e.headers&&t("headers",e.headers),e.environment&&t("environment",e.environment),e.location&&t("location",{...e.location,source:"server-hydration",_updatedAt:new Date().toISOString()}),t("meta",{dataState:"fresh",lastConfirmedPath:n,currentPath:n,isDirectLoad:r,timestamp:new Date().toISOString()}))),sessionStorage.setItem("lastPath",n??"")},[n,e,t]),d.lifecycle("Hydration complete",{debugData:e,pathname:n}),null};var p=e.i(668969);let g=(0,p.createServerReference)("4076ee8f1c596d4c1ddebb5ec36a07d01c06635a4e",p.callServer,void 0,p.findSourceMapURL,"translateDebugDataAction");var m=e.i(64412);let w=(0,c.createLogger)("LocationCollector"),y=(0,c.createLogger)("DataCollector");function h({pageProps:e,userRoles:t}){let n=(0,s.usePathname)(),i=(0,s.useSearchParams)(),{updateSection:r}=(0,u.f)(),a=(0,o.useRef)(!1);!function(){let{updateSection:e}=(0,u.f)(),{location:t,isLoading:n}=(0,m.f)();(0,o.useEffect)(()=>{t&&!n&&(w.info("Location data updated",t.displayName),e("location",{...t,_observedFrom:"useLocation",_collectedBy:"LocationCollector",_updatedAt:new Date().toISOString()}))},[t,n,e])}(),(0,o.useEffect)(()=>{if(t&&t.length>0){let e=Array.isArray(t)?t:[];r("userRoles",e),y.info("DataCollector","User roles updated",e)}},[t,r]);let l=(0,o.useCallback)(async()=>{try{y.info("DataCollector","Collecting data for route:",{path:n,paramsCount:i?Array.from(i.keys()).length:0});let t={};i?.forEach((e,n)=>{t[n]=e}),y.lifecycle("DataCollector","Calling translateDebugDataAction");let o=await g({route:n??"",params:t,pageProps:e});o&&(y.info("DataCollector","Debug data received",{route:o.route,hasPage:!!o.page,hasMatch:!!o.match,hasHeaders:!!o.headers,hasEnvironment:!!o.environment}),o.route&&(r("route",o.route),y.info("DataCollector","Route updated",o.route)),o.page&&(r("page",o.page),y.info("DataCollector","Page data updated",{title:o.page.title,id:o.page.id}),r("meta",{dataState:"fresh",lastConfirmedPath:n,currentPath:n,isDirectLoad:!1,timestamp:new Date().toISOString()})),o.match&&(r("match",o.match),y.info("DataCollector","Match data updated",{hasMatch:!0,matchKeys:Object.keys(o.match||{})})),o.headers&&(r("headers",o.headers),y.info("DataCollector","Headers updated",{headerCount:Object.keys(o.headers||{}).length})),o.environment&&(r("environment",o.environment),y.info("DataCollector","Environment data updated",{envVarCount:Object.keys(o.environment||{}).length})),r("timestamp",new Date().toISOString()))}catch(e){y.error("DataCollector","Error collecting debug data:",e),r("errors",{dataCollection:{message:e.message,timestamp:new Date().toISOString()}})}},[n,i,e,r]);return(0,o.useEffect)(()=>{y.lifecycle("DataCollector","Setting up data collection for path",n),a.current||(a.current=!0);let e=setTimeout(()=>{l()},200);return()=>{clearTimeout(e),y.lifecycle("DataCollector","Cleanup for path",n)}},[l,n]),null}function v({children:e,pageProps:n}){return(0,t.jsxs)(i.g,{children:[(0,t.jsx)(f,{debugData:null}),(0,t.jsx)(h,{pageProps:n}),e]})}let S=(0,n.default)(()=>e.A(186044).then(e=>({default:e.FrontendAdminHeader})),{loadableGenerated:{modules:[451309]},ssr:!1,loading:()=>null});e.s(["AdminHeaderWrapper",0,function({children:e}){return(0,i.y)(r.f)?(0,t.jsxs)(v,{children:[(0,t.jsx)(S,{}),e]}):(0,t.jsx)(t.Fragment,{children:e})}],792302)},369769,e=>{"use strict";var t=e.i(458201),n=e.i(526932),i=e.i(538167),r=e.i(282446),o=e.i(959377),a=e.i(330871),l=e.i(528600),s=e.i(310847),c=e.i(64412),u=e.i(839315),d=e.i(889753),f=e.i(398444);let p=()=>{let{user:e}=(0,l.f)(),t=(0,r.y)(s.m),{location:n}=(0,c.f)(),o=(0,r.y)(d.s),p=o.installationID===e.anonId&&o.authSignature===`${e.isUserLoggedIn}:${e.userID}`?o.twcID:null,g=(0,r.y)(f.f),[m,w]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e;if(g)return;(e=(0,u.u)())&&e!==m&&w(e);let t=setInterval(()=>{let e=(0,u.u)();e&&(w(e),clearInterval(t))},1e3);return()=>clearInterval(t)},[m,g]);let{latitude:y,longitude:h}=(e=>{if(!e)return{latitude:void 0,longitude:void 0};let[t,n]=e.split(",");return{latitude:t?parseFloat(t):void 0,longitude:n?parseFloat(n):void 0}})(n?.geocode);return(0,a.usePushlyProfile)({isPremium:e.isUserPremium,isUserLoggedIn:e.isUserLoggedIn,userHasLoggedInBefore:t??!1,locationData:n?{placeId:n.placeId,latitude:y,longitude:h,postalCode:n.postalCode,featureId:n.featureId}:void 0,upsUserId:e.userID||void 0,externalId:(g?p:m)||void 0,twcId:p||void 0}),null};var g=e.i(7150);let m="samsung_widget",w="en-US";e.s(["Pushly",0,({serviceWorkerPath:e,partner:a,locale:l="en-US"})=>{let[s,c]=(0,i.useState)(!1),u=(0,r.y)(g.f),d="XJe7TqRv7lQ0gyF5biuPnAchWgRhgAjeQc0h";return((0,o.useInitializeSdk)({domainKey:d||"",serviceWorkerPath:e,enabled:s&&a!==m&&l===w&&!!d&&!u}),a===m||l!==w)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.default,{src:`https://cdn.p-n.io/pushly-sdk.min.js?domain_key=${d}`,strategy:"afterInteractive",onLoad:()=>{console.log("Pushly SDK loaded"),c(!0)},onError:e=>{console.error("Failed to load Pushly SDK:",e)}}),(0,t.jsx)(p,{})]})}],369769)},231457,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},959377,e=>{"use strict";var t=e.i(538167),n=e.i(282446),i=e.i(231457);e.s(["useInitializeSdk",0,function(e){let{domainKey:r,serviceWorkerPath:o,enabled:a=!1}=e,[l,s]=(0,n.q)(i.f);return(0,t.useEffect)(()=>{if(a)try{window.PushlySDK=window.PushlySDK||[],window.pushly=window.pushly||function(...e){window.PushlySDK.push(e)},window.pushly("load",{domainKey:r,sw:o}),s(!0)}catch(e){console.error("Failed to initialize Pushly SDK:",e)}},[r,o,a,s]),{isInitialized:l}}])},330871,e=>{"use strict";var t=e.i(538167),n=e.i(282446),i=e.i(231457);function r(e){let{isPremium:t,isUserLoggedIn:n,userHasLoggedInBefore:i,locationData:r,upsUserId:o,twcId:a}=e;return{is_premium:t,is_registered_user:i||n,place_id:r?.placeId,twc_latitude:r?.latitude,twc_longitude:r?.longitude,twc_postal_code:r?.postalCode,twc_feature_id:r?.featureId,...n&&o&&{upsx_id:o},...a&&{twc_id:a}}}e.s(["usePushlyProfile",0,function(e){let o=(0,t.useRef)(!1),a=(0,t.useRef)(e),l=(0,n.y)(i.f);(0,t.useEffect)(()=>{a.current=e},[e]),(0,t.useEffect)(()=>{if(!l||!window.pushly||!e)return;let{externalId:t}=e,n=r(e);try{window.pushly("profile",n),t&&window.pushly("external_id",t),o.current||(o.current=!0,window.pushly("on_permission_allowed",()=>{let e=a.current;if(!e||!window.pushly)return;let t=r(e);window.pushly("profile",t),e.externalId&&window.pushly("external_id",e.externalId)}))}catch(e){console.error("Failed to set Pushly profile:",e)}},[e,l])}])},639524,e=>{"use strict";e.i(822016),e.S([807079,"Toaster,f"])},398444,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},361957,(e,t,n)=>{"use strict";var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.supportsEvent=n.isBridgeMode=void 0,n.emit=u;let r=e.r(695881),o=i(e.r(333350)),a=(0,r.createLogger)("webviewBridge"),l=o.default?window.__twcWebviewAnalytics:void 0;n.isBridgeMode=l?.mode==="native-bridge"&&!!l.bridge,n.supportsEvent=e=>Array.isArray(l?.bridge?.events)&&l.bridge.events.includes(e);let s=new Set(["accepted","unsupported","invalid","no-host"]),c=e=>e&&"object"==typeof e&&"status"in e&&s.has(e.status)?e:{status:"invalid",detail:"malformed reply"};async function u(e,t){if(!n.isBridgeMode)return{status:"no-host"};if(!(0,n.supportsEvent)(e))return a.info(`bridge: host does not support "${e}"`),{status:"unsupported",detail:"not in manifest"};let i={v:1,event:e,payload:t,clientTs:Date.now()};a.info(`bridge: sending "${e}"`);try{let e=window.webkit?.messageHandlers?.twcAnalyticsBridge;if(e)return c(await e.postMessage(i));let t=window.TwcAnalyticsBridge;if(t)return c(JSON.parse(t.post(JSON.stringify(i))));return{status:"no-host"}}catch(t){return a.error(`bridge: "${e}" failed`,t),{status:"invalid",detail:String(t)}}}}]);