(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,792302,e=>{"use strict";var t=e.i(699173),r=e.i(301857),i=e.i(546446),n=e.i(5397),a=e.i(592121),o=e.i(806262),s=e.i(674339),l=e.i(961123),u=e.i(695881),c=e.i(609858);let d=(0,u.createLogger)("AtomDebugHydrationBoundaries"),m=({debugData:e})=>{let{updateSection:t}=(0,c.useDebugSystem)(),r=(0,l.usePathname)();return d.info("Initial props received",{hasDebugData:!!e,currentPath:r}),(0,o.useHydrateAtoms)([[s.debugDataAtom,e||{timestamp:new Date().toISOString()}]]),(0,a.useEffect)(()=>{d.lifecycle("Path changed",r);let i=sessionStorage.getItem("lastPath"),n=!i||i===r;d.info("Navigation type",n?"Direct load/refresh":"Client-side navigation"),t("route",r),n&&!e?t("meta",{dataState:"stale",lastConfirmedPath:i||null,currentPath:r,isDirectLoad:!0,timestamp:new Date().toISOString()}):(t("components",{}),e&&(d.info("Updating with new debug data for path",r),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:r,currentPath:r,isDirectLoad:n,timestamp:new Date().toISOString()}))),sessionStorage.setItem("lastPath",r??"")},[r,e,t]),d.lifecycle("Hydration complete",{debugData:e,pathname:r}),null};var p=e.i(104777);let g=(0,p.createServerReference)("403272f695e27784b40e8c91c05e377c01af45384b",p.callServer,void 0,p.findSourceMapURL,"translateDebugDataAction");var f=e.i(64412);let w=(0,u.createLogger)("LocationCollector"),h=(0,u.createLogger)("DataCollector");function v({pageProps:e,userRoles:t}){let r=(0,l.usePathname)(),i=(0,l.useSearchParams)(),{updateSection:n}=(0,c.useDebugSystem)(),o=(0,a.useRef)(!1);!function(){let{updateSection:e}=(0,c.useDebugSystem)(),{location:t,isLoading:r}=(0,f.useLocation)();(0,a.useEffect)(()=>{t&&!r&&(w.info("Location data updated",t.displayName),e("location",{...t,_observedFrom:"useLocation",_collectedBy:"LocationCollector",_updatedAt:new Date().toISOString()}))},[t,r,e])}(),(0,a.useEffect)(()=>{if(t&&t.length>0){let e=Array.isArray(t)?t:[];n("userRoles",e),h.info("DataCollector","User roles updated",e)}},[t,n]);let s=(0,a.useCallback)(async()=>{try{h.info("DataCollector","Collecting data for route:",{path:r,paramsCount:i?Array.from(i.keys()).length:0});let t={};i?.forEach((e,r)=>{t[r]=e}),h.lifecycle("DataCollector","Calling translateDebugDataAction");let a=await g({route:r??"",params:t,pageProps:e});a&&(h.info("DataCollector","Debug data received",{route:a.route,hasPage:!!a.page,hasMatch:!!a.match,hasHeaders:!!a.headers,hasEnvironment:!!a.environment}),a.route&&(n("route",a.route),h.info("DataCollector","Route updated",a.route)),a.page&&(n("page",a.page),h.info("DataCollector","Page data updated",{title:a.page.title,id:a.page.id}),n("meta",{dataState:"fresh",lastConfirmedPath:r,currentPath:r,isDirectLoad:!1,timestamp:new Date().toISOString()})),a.match&&(n("match",a.match),h.info("DataCollector","Match data updated",{hasMatch:!0,matchKeys:Object.keys(a.match||{})})),a.headers&&(n("headers",a.headers),h.info("DataCollector","Headers updated",{headerCount:Object.keys(a.headers||{}).length})),a.environment&&(n("environment",a.environment),h.info("DataCollector","Environment data updated",{envVarCount:Object.keys(a.environment||{}).length})),n("timestamp",new Date().toISOString()))}catch(e){h.error("DataCollector","Error collecting debug data:",e),n("errors",{dataCollection:{message:e.message,timestamp:new Date().toISOString()}})}},[r,i,e,n]);return(0,a.useEffect)(()=>{h.lifecycle("DataCollector","Setting up data collection for path",r),o.current||(o.current=!0);let e=setTimeout(()=>{s()},200);return()=>{clearTimeout(e),h.lifecycle("DataCollector","Cleanup for path",r)}},[s,r]),null}function y({children:e,pageProps:r}){return(0,t.jsxs)(i.Provider,{children:[(0,t.jsx)(m,{debugData:null}),(0,t.jsx)(v,{pageProps:r}),e]})}let S=(0,r.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.useAtomValue)(n.showAdminHeaderAtom)?(0,t.jsxs)(y,{children:[(0,t.jsx)(S,{}),e]}):(0,t.jsx)(t.Fragment,{children:e})}],792302)},723417,(e,t,r)=>{"use strict";var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.supportsEvent=r.isBridgeMode=void 0,r.emit=c;let n=e.r(695881),a=i(e.r(333350)),o=(0,n.createLogger)("webviewBridge"),s=a.default?window.__twcWebviewAnalytics:void 0;r.isBridgeMode=s?.mode==="native-bridge"&&!!s.bridge,r.supportsEvent=e=>Array.isArray(s?.bridge?.events)&&s.bridge.events.includes(e);let l=new Set(["accepted","unsupported","invalid","no-host"]),u=e=>e&&"object"==typeof e&&"status"in e&&l.has(e.status)?e:{status:"invalid",detail:"malformed reply"};async function c(e,t){if(!r.isBridgeMode)return{status:"no-host"};if(!(0,r.supportsEvent)(e))return o.info(`bridge: host does not support "${e}"`),{status:"unsupported",detail:"not in manifest"};let i={v:1,event:e,payload:t,clientTs:Date.now()};o.info(`bridge: sending "${e}"`);try{let e=window.webkit?.messageHandlers?.twcAnalyticsBridge;if(e)return u(await e.postMessage(i));let t=window.TwcAnalyticsBridge;if(t)return u(JSON.parse(t.post(JSON.stringify(i))));return{status:"no-host"}}catch(t){return o.error(`bridge: "${e}" failed`,t),{status:"invalid",detail:String(t)}}}},569579,e=>{"use strict";var t=e.i(699173),r=e.i(358273),i=e.i(333350);if(i.default){let e=(0,r.getMetricsSession)();(!e||(0,r.checkSessionTimestampExpired)())&&(0,r.setIsNewMestricsSession)(),(0,r.setMetricsSession)(e)}let n=()=>null;var a=e.i(592121),o=e.i(546446);e.i(546584);var s=e.i(947118),l=e.i(310847),u=e.i(382602),c=e.i(528600),d=e.i(688070),m=e.i(456215),p=e.i(647292),g=e.i(491240),f=e.i(915044),w=e.i(959194),h=e.i(737801),v=e.i(630986),y=e.i(800462),S=e.i(608201),I=e.i(236593),b=e.i(491045),P=e.i(64412),A=e.i(797770);let E=(0,e.i(981030).atom)(!1);var D=e.i(513539);let C=["article","video","liveblog"];var U=e.i(521350);let T="location-viewed-last-fired";var _=e.i(961123),k=e.i(147732);let L=new Date().getTime(),M=(0,k.debounce)(()=>{window.scrollY>R&&(R=window.scrollY)},250);i.default&&window.addEventListener("scroll",M);let R=i.default&&window.innerHeight>0?window.innerHeight:0,O=({scriptSrc:e})=>{let i=(0,o.useAtomValue)(d.isWebViewOnlyAtom);(()=>{let e=(0,o.useAtomValue)(d.isWebViewOnlyAtom),t=(0,o.useAtomValue)(p.webViewPlatformAtom),i="us2-fb061d169ced8343850163112c402d41",n=(0,s.useIsInitialized)(),f=(0,a.useRef)(n),{user:{isUserLoggedIn:w,userID:h}}=(0,c.useUser)(),v=(0,o.useAtomValue)(u.userEmailAtom),y=w?h:null,S=w?v:"",I=(0,o.useAtomValue)(l.wxuUserAnonymousIdAtom),b=(({hasInvokedMPInit:e,apiKey:t,isUserLoggedIn:r,customerid:i,email:n,other:a})=>!e&&t&&a&&(r&&i&&n||!r))({hasInvokedMPInit:f.current,apiKey:i,isUserLoggedIn:w,customerid:y,email:S,other:I});(0,a.useEffect)(()=>{if(b){f.current=!0;let n={isDevelopmentMode:!1,logLevel:"warning",identifyRequest:{userIdentities:{email:S,customerid:y,other:(0,g.truncateIdentityValue)(I)}},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=JSON.parse(localStorage.getItem("wxu-web/keyval:mparticleUser")||"{}"),i=t?.value?.mpid;if(i&&i!==e){let e=(0,r.getMetricsSession)();if(e&&Number.isFinite(e.sessionStartTime)&&Date.now()-e.sessionStartTime{let e=(0,s.useIsInitialized)(),t=(0,_.usePathname)(),r=(0,h.useEventAttributes)(),i=(0,v.useCMSAttributes)(),n=(0,o.useAtomValue)(S.sourcePageAtom),l=(0,o.useAtomValue)(I.sourceModuleAtom),[u,c]=(0,a.useState)(!1),d=(0,a.useRef)(!1),m=(0,a.useMemo)(()=>({author:i?.author||"",contentId:i?.contentId,premiumContent:i?.premiumContent,publishDate:i?.publishDate,provider:i?.provider,title:i?.title,nodeTypes:i?.nodeType,pageTemplate:i?.pageTemplate,iabContent:i?.iabContent??null,tagsAnalytics:i?.tagsAnalytics,tagsGeo:i?.tagsGeo,tagsKeyword:i?.tagsKeyword,tagsStorm:i?.tagsStorm,collection:i?.collection,entitlements:i?.entitlements,createdDate:i?.createdDate,...r,fromString:r.fromString??"",url:t?(0,w.stripLastPartOfSlug)(t):"",sourcePage:n??"",sourceModule:l?.id??null,sourceModuleName:l?.name??null,...l?.modulePosition!=null&&{sourcePosition:l.modulePosition},sourceElement:l?.element??null}),[r,i,t,n,l]);return(0,a.useEffect)(()=>{(0,w.areObjectValuesDefined)(m)&&!u&&c(!0)},[m,u]),(0,a.useCallback)(async()=>{if(m?.pageId==="article"&&e&&u&&!d.current)try{window.mParticle?.logEvent?.("article-viewed",window.mParticle?.EventType?.Other,m),console.debug(`MParticle: Event "article-viewed" tracked - ${m?.pageId}`),d.current=!0}catch(e){console.error('MParticle: Event "article-viewed" failed',e)}},[e,m,u])})();return((0,a.useEffect)(()=>{n()},[n]),(0,a.useEffect)(()=>{y()},[y]),i)?(0,t.jsx)("script",{id:"mparticle-webview-sdk",dangerouslySetInnerHTML:{__html:`(function(){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.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")});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)})();`}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{}),(0,t.jsx)("script",{src:e})]})},N=()=>{let e,t=(()=>{let e=(0,s.useIsInitialized)(),t=(0,h.useEventAttributes)(),[i,n]=(0,a.useState)(!1),o=(0,a.useRef)(!1),l=(0,a.useMemo)(()=>({...t}),[t]);return(0,a.useEffect)(()=>{(0,w.areObjectValuesDefined)(l)&&!i&&n(!0)},[l,i]),(0,a.useCallback)(async()=>{if((0,r.isNewMetricsSession)()&&e&&i&&!o.current)try{window.mParticle?.logEvent?.("session-start",window.mParticle?.EventType?.Other,l),o.current=!0,(0,r.deleteIsNewMestricsSession)(),console.debug(`MParticle: Event "session-start" tracked - sessionId: ${l.sessionId}`)}catch(e){console.error('MParticle: Event "session-start" failed',e)}},[e,l,i])})(),n=(()=>{let e=(0,s.useIsInitialized)(),t=(0,h.useEventAttributes)(),n=(0,v.useCMSAttributes)(),l=t.pageId,u=i.default&&!["video","article"].includes(l)?window.location.href:"",[c,d]=(0,a.useState)(!1),m=(0,a.useRef)(!1),p=(0,a.useRef)(void 0),[g,f]=(0,o.useAtom)(y.fromSearchResultAtom),[U,T]=(0,o.useAtom)(S.sourcePageAtom),[_,k]=(0,o.useAtom)(I.sourceModuleAtom),{location:L}=(0,P.useLocation)(),M=(0,o.useAtomValue)(A.adsMetricsUnitAndZoneAtom),R=(0,o.useAtomValue)(E),O=(0,o.useAtomValue)(b.purchaseSourceAttributionAtom),N="subscribe"===l||"subscribe-checkout"===l?O:null,x=(0,o.useAtomValue)(D.layoutStateAtom),V=(0,o.useAtomValue)(D.activeEventAtom),j=(0,a.useMemo)(()=>{let e=C.includes(l)&&n?{...null!=n.title&&{title:n.title},...null!=n.author&&{author:n.author},...null!=n.contentId&&{contentId:n.contentId},...null!=n.collection&&{collection:n.collection},...null!=n.createdDate&&{createdDate:n.createdDate},...null!=n.entitlements&&{entitlements:n.entitlements},...null!=n.nodeType&&{nodeTypes:n.nodeType},...null!=n.iabContent&&{iabContent:n.iabContent},...null!=n.pageTemplate&&{pageTemplate:n.pageTemplate},...null!=n.premiumContent&&{premiumContent:n.premiumContent},...null!=n.provider&&{provider:n.provider},...null!=n.publishDate&&{publishDate:n.publishDate},...null!=n.tagsAnalytics&&{tagsAnalytics:n.tagsAnalytics},...null!=n.tagsGeo&&{tagsGeo:n.tagsGeo},...null!=n.tagsKeyword&&{tagsKeyword:n.tagsKeyword},...null!=n.tagsStorm&&{tagsStorm:n.tagsStorm},...null!=n.cmsUrl&&{cmsUrl:n.cmsUrl}}:{};return{...t,...L?.presentationName&&{wlocPresentationName:L?.presentationName},...g&&{fromSearchResult:g},sourcePage:N?.sourcePage??U??"",sourceModule:N?.sourceModule??_?.id??null,sourceModuleName:_?.name??null,..._?.position!=null&&{sourcePosition:_.position},sourceElement:N?.sourceElement??_?.element??null,...N?.sourceUpsellPlacement&&{sourceUpsellPlacement:N.sourceUpsellPlacement},adBlock:R,...M&&{adsMetricsUnitAndZone:M},...e,fullUrl:u,articleHeadline:"",layoutState:x,activeEvent:V}},[t,L,g,U,_,N,R,M,n,u,x,V]);return(0,a.useEffect)(()=>{(0,w.areObjectValuesDefined)(j)&&!c&&d(!0)},[j,c]),(0,a.useCallback)(async()=>{if(p.current!==j.pageId&&(m.current=!1,p.current=j.pageId),e&&c&&!m.current)try{window.mParticle?.logEvent?.("page-viewed",window.mParticle?.EventType?.Other,j),m.current=!0,g&&f(null),U&&T(null),_&&k(null),(0,r.incrementMetricsSessionCount)(),console.debug(`MParticle: Event "page-viewed" tracked - ${j.pageId}`)}catch(e){console.error('MParticle: Event "page-viewed" failed',e)}},[e,j,c,g,f,U,T,_,k])})(),l=(()=>{let{location:e}=(0,P.useLocation)(),t=(0,s.useIsInitialized)(),r=(0,h.useEventAttributes)(),n=e?.geocode,o=n?.split?.(","),l=o?.[0]?parseFloat(o[0]):void 0,u=o?.[1]?parseFloat(o[1]):void 0,c=e?.ianaTimeZone,d="string"==typeof c&&c.length>0?c.slice(0,255):"Etc/UTC",m=r.sessionId,p=(0,a.useMemo)(()=>({...r,latitude:l,longitude:u,ianaTimeZone:d}),[r,l,u,d]);return(0,a.useCallback)(async()=>{if(!i.default||!t||!n||!m||!Number.isFinite(l)||!Number.isFinite(u)||!(0,w.areObjectValuesDefined)(p))return;let r=(()=>{if(!(0,U.isLocalStorageAvailable)())return null;try{let e=localStorage.getItem(T);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(!r||r.geocode!==n||r.sessionId!==m)try{window.mParticle?.logEvent?.("location-viewed",window.mParticle?.EventType?.Other,p);if((0,U.isLocalStorageAvailable)())try{localStorage.setItem(T,JSON.stringify({geocode:n,sessionId:m}))}catch{}console.debug(`MParticle: Event "location-viewed" tracked - ${e?.displayName||"Unknown location"}`)}catch(e){console.error('MParticle: Event "location-viewed" failed',e)}},[t,p,n,m,l,u,e?.displayName])})();return e=(0,h.useEventAttributes)(),(0,a.useEffect)(()=>{let t=()=>{if(window.mParticle?.isInitialized?.()){let t,r,i,n=(new Date().getTime()-L)/1e3,a=(t=document.documentElement.scrollHeight,r=window.innerHeight,R=R||window.scrollY,(i=t===r?100:Math.round(R/(t-r)*100))>100?i=100:i{window.removeEventListener("beforeunload",t),window.removeEventListener("blur",t)}},[e]),(0,a.useEffect)(()=>{t()},[t]),(0,a.useEffect)(()=>{n()},[n]),(0,a.useEffect)(()=>{l()},[l]),null};var x=e.i(695881),V=e.i(553329),j=e.i(723417),F=e.i(537989),$=e.i(604323);let B=(0,x.createLogger)("useArticleViewWebview"),z=e=>{if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t},H=()=>(0,o.useAtomValue)(d.isWebViewOnlyAtom)?(0,t.jsx)(W,{}):null,W=()=>{let e,t,r,n,s,l,u,c,m,p,g;return e=(0,_.usePathname)(),t=(0,o.useAtomValue)(F.pageIdAtom),r=(0,o.useAtomValue)($.metricsArticleDataAtom),n=(0,o.useAtomValue)(d.isWebViewOnlyAtom),s=(0,a.useMemo)(()=>{if(!i.default||!n||"article"!==t&&"liveblog"!==t)return null;try{return crypto.randomUUID()}catch{return`${Date.now()}-${Math.random().toString(36).slice(2)}`}},[n,t,e]),(l=(0,a.useRef)(s)).current=s,u=(0,a.useRef)(new Set),c=(0,a.useCallback)(async(e,t)=>{if(u.current.has(e))return;u.current.add(e);let{data:r,error:i}=await (0,V.tryCatch)((0,j.emit)("article-view-end",{articleViewId:e,endTime:Date.now(),articleExitReason:t}));i?B.error('bridge: "article-view-end" failed',i):B.info(`bridge: "article-view-end" ${r.status} (${t})`)},[]),m=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)(e),(0,a.useEffect)(()=>{g.current!==e&&(g.current=e,m.current&&(c(m.current,"navigated"),m.current=null))},[e,c]),(0,a.useEffect)(()=>{if(!s||p.current===e)return;let t=r?.contentId;t&&(p.current=e,m.current=s,(async()=>{let{data:i,error:n}=await (0,V.tryCatch)((0,j.emit)("article-viewed",{articleViewId:s,startTime:Date.now(),contentId:t,collection:r?.collection??null,author:r?.author??null,provider:r?.provider??null,publishDate:z(r?.publishDate),createdDate:z(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}));n?B.error('bridge: "article-viewed" failed',n):B.info(`bridge: "article-viewed" ${i.status} - ${e}`)})())},[s,e,r]),(0,a.useEffect)(()=>{if(!i.default||!n)return;let e=e=>{l.current&&c(l.current,e)};window.__twcArticleFlush=()=>e("dismissed");let t=()=>{"hidden"===document.visibilityState&&e("backgrounded")},r=()=>e("navigated");return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",r),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",r),delete window.__twcArticleFlush}},[n,c]),null};var K=e.i(864723),J=e.i(673915);let G=({scriptSrc:e})=>{let r,i;return r=(0,o.useSetAtom)(J.fromStringAtom),(0,a.useEffect)(()=>{let e=(0,K.getCookie)("fromStr");e&&(r(String(e)),(0,K.deleteCookie)("fromStr",{domain:".weather.com"}))},[]),i=(0,o.useSetAtom)(E),(0,a.useEffect)(()=>{let e=!1,t=null,r=null,n=null;return Promise.all([new Promise(e=>{(n=document.createElement("div")).id="ad-detector-bait",n.className="ad-banner ad-unit ad-placeholder",n.style.cssText="width:1px !important;height:1px !important;position:absolute;left:-9999px !important;top:-1000px !important;",document.body.appendChild(n),t=setTimeout(()=>{if(t=null,!n)return e(!1);let r=window.getComputedStyle(n),i=!document.body.contains(n)||null===n.offsetParent||"none"===r.display||"hidden"===r.visibility;n.remove(),n=null,e(i)},50)}),new Promise(e=>{r=setTimeout(()=>{r=null,e(!0)},3e3),fetch("https://securepubads.g.doubleclick.net/pagead/ppub_config",{method:"HEAD",mode:"no-cors"}).then(()=>{null!==r&&clearTimeout(r),r=null,e(!1)}).catch(()=>{null!==r&&clearTimeout(r),r=null,e(!0)})})]).then(([t,r])=>{e||i(t||r)}),()=>{e=!0,null!==t&&clearTimeout(t),null!==r&&clearTimeout(r),n?.remove(),n=null}},[i]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n,{}),(0,t.jsx)(O,{scriptSrc:e}),(0,t.jsx)(H,{})]})};e.s(["Analytics",0,G,"default",0,G],569579)},639524,e=>{"use strict";var t=e.i(807079),r=e.i(754219);e.s(["Toaster",()=>t.Toaster,"toast",()=>r.toast])},572739,e=>{"use strict";var t=e.i(699173),r=e.i(185312),i=e.i(798973),n=e.i(546446),a=e.i(592121),o=e.i(725296),s=e.i(528600),l=e.i(37423);e.s(["default",0,function({regime:e,isUserLoggedIn:u}){let c=(0,n.useStore)(),{user:{userID:d},isUserIdLoading:m}=(0,s.useUser)();return(0,a.useEffect)(()=>{let e=window.top?.__twcResolveUserId;e&&(u?d?e(d):m||e(""):e(""))},[u,d,m]),o.RESTRICTIVE_REGIMES.includes(e)&&(0,i.preload)("https://cdn.privacy-mgmt.com/unified/wrapperMessagingWithoutDetection.js",{as:"script"}),(0,a.useEffect)(()=>{(async()=>{window?.DprSdk?.isInitialized&&(await window?.DprSdk.isInitialized,c.set(l.dprSdkIsInitializedAtom,!0))})()},[c]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{id:"dprsdk-script",src:"https://weather.com/api/v1/script/dprSdkScript.js",strategy:"beforeInteractive"}),(0,t.jsx)(r.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 ${u}; }, }); } catch (_error) { // do nothing. } } initDprSdk(); } `})]})}])},987070,e=>{"use strict";var t=e.i(699173),r=e.i(592121),i=e.i(381477);let n=(0,e.i(695881).createLogger)("SWRProvider");e.s(["SWRProvider",0,({children:e,fallback:a={}})=>{let[o]=(0,r.useState)(()=>new Map);return(0,t.jsx)(i.SWRConfig,{value:{provider:()=>o,fallback:a,onDiscarded:e=>n.warn("response discarded",{key:e})},children:e})}])},85617,e=>{"use strict";var t=e.i(592121),r=e.i(528600),i=e.i(45846),n=e.i(436028),a=e.i(546584),o=e.i(725296),s=e.i(521350),l=e.i(313983);let u=async()=>{try{let e=await m();await p({upsxConsentResponse:e}),await h({upsxConsentResponse:e})}catch(e){console.log(e)}},c=({purpose:e,upsxConsentResponse:t})=>{let r=t?.find?.(t=>t?.purpose===e);return r?.consent},d=async({purpose:e,value:t,setByUser:r})=>{let n={purpose:e,consent:t,setByUser:r,consentDateTime:new Date().toISOString()};await i.upsxClient.consent.createUserConsent(n)},m=async()=>await i.upsxClient.consent.getUserConsent(),p=async({upsxConsentResponse:e})=>{let t=c({purpose:"sale-of-data",upsxConsentResponse:e}),{localSaleOfDataConsent:r,setByUser:i}=g();f({localSaleOfDataConsent:r,upsxSaleOfDataConsent:t}),w({upsxSaleOfDataConsent:t})&&await d({purpose:"sale-of-data",value:r,setByUser:i})},g=()=>{let e=window.DprSdk,t=e?.getUserConsent("sale-of-data"),r="boolean"==typeof t;return{localSaleOfDataConsent:r?t:e?.getRegimePurposeDefaultValue("sale-of-data")??!0,setByUser:r}},f=({localSaleOfDataConsent:e,upsxSaleOfDataConsent:t})=>{let r=window.DprSdk,i=window.navigator.globalPrivacyControl,n=(0,s.isLocalStorageAvailable)()?localStorage.getItem("saleOfDataConflict"):null,a=(0,o.getRegime)()===o.Regime.USA_CCPA&&!0===t&&!1===e&&!i;a&&!n?(0,s.isLocalStorageAvailable)()&&localStorage.setItem("saleOfDataConflict","true"):!a&&n&&(0,s.isLocalStorageAvailable)()&&localStorage.removeItem("saleOfDataConflict"),!1===t&&!0===e&&r?.setUserConsents({"sale-of-data":!1},{skipLogUserConsent:!0})},w=({upsxSaleOfDataConsent:e})=>{let t=!1,r=window.navigator.globalPrivacyControl;return("boolean"!=typeof e||r&&!0===e)&&(t=!0),t},h=async({upsxConsentResponse:e})=>{if((0,o.getRegime)()!==o.Regime.USA_CCPA)return;let t=c({purpose:l.Purpose.SENSITIVE_DATA,upsxConsentResponse:e}),{localSensitiveDataConsent:r}=v();y({localSensitiveDataConsent:r,upsxSensitiveDataConsent:t}),function({upsxSensitiveDataConsent:e}){let t=!1;return"boolean"!=typeof e&&(t=!0),t}({upsxSensitiveDataConsent:t})&&await d({purpose:l.Purpose.SENSITIVE_DATA,value:!0,setByUser:!1})},v=()=>{let{DprSdk:e}=window,t=e?.getUserConsent(l.Purpose.SENSITIVE_DATA),r="boolean"==typeof t;return{localSensitiveDataConsent:r?t:e?.getRegimePurposeDefaultValue(l.Purpose.SENSITIVE_DATA)??!0,setByUser:r}},y=async({localSensitiveDataConsent:e,upsxSensitiveDataConsent:t})=>{let{DprSdk:r}=window;"boolean"==typeof t&&t!==e&&r?.setUserConsents({[l.Purpose.SENSITIVE_DATA]:t},{skipLogUserConsent:!0})};e.s(["UserAuthSync",0,()=>(!function(){let[e,l]=(0,t.useState)(!1),[u,c]=(0,t.useState)(null),d=(0,t.useRef)(!1),m=(0,o.getRegime)(),{user:{isUserLoggedIn:p,userID:g,anonId:f}}=(0,r.useUser)(),w=(0,t.useCallback)(async(e={})=>{if(g){l(!0),c(null);try{let t,r,s,l,u,c=await i.upsxClient.applications.getApplications(e.appId||"twc-web-registered",e.endpointId||g),w=c?.partners||[],h=(t=[],(r=a.default.env.NEXT_PUBLIC_OMNITURE_ID||null)&&t.push({name:"omniture",id:r}),(s=function({upsxId:e,anonId:t}){return e||t||null}({upsxId:g,anonId:f}))&&(t.push({name:"amplitude",id:s}),t.push({name:"airlytics",id:s})),(l=a.default.env.NEXT_PUBLIC_MPARTICLE_ID||null)&&t.push({name:"mParticle",id:l}),!p&&l&&t.push({name:"braze",id:l}),p&&g&&(t.push({name:"zuora",id:g}),t.push({name:"braze",id:g})),u=a.default.env.NEXT_PUBLIC_SOURCEPOINT_DSR_ID||null,o.RESTRICTIVE_REGIMES.includes(m)&&u&&t.push({name:"sourcepoint",id:u}),t),v=(0,n.hasLength)(w)?h.filter(e=>{let t=w.find(t=>t.name===e.name);return!t||t.id!==e.id}):h;return v.length&&(c?await i.upsxClient.applications.addPartner(e.appId||"twc-web-registered",e.endpointId||g,{partners:v,version:"1.0.0"}):await i.upsxClient.applications.createApplication({appId:e.appId||"twc-web-registered",endpointId:e.endpointId||g,partners:v,version:"1.0.0"})),d.current=!0,{success:!0,addedOrUpdated:v}}catch(t){let e=t instanceof Error?t:Error("Unknown error occurred");return c(e),{success:!1,error:e.message}}finally{l(!1),(0,s.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","false")}}},[g]);(0,t.useEffect)(()=>{if(!(0,s.isLocalStorageAvailable)())return;let e=localStorage.getItem("PARTNERS_SYNC"),t=e&&JSON.parse(e);p&&g&&t&&!d.current&&(async()=>{await w()})()},[g,p,w])}(),!function(){let e=(0,t.useRef)(!1),{user:{isUserLoggedIn:i}}=(0,r.useUser)();(0,t.useEffect)(()=>{i&&!e.current&&(u(),e.current=!0)},[i])}(),null)],85617)},231457,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["pushlyInitializedAtom",0,t])},959377,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(231457);e.s(["useInitializeSdk",0,function(e){let{domainKey:n,serviceWorkerPath:a,enabled:o=!1}=e,[s,l]=(0,r.useAtom)(i.pushlyInitializedAtom);return(0,t.useEffect)(()=>{if(o)try{window.PushlySDK=window.PushlySDK||[],window.pushly=window.pushly||function(...e){window.PushlySDK.push(e)},window.pushly("load",{domainKey:n,sw:a}),l(!0)}catch(e){console.error("Failed to initialize Pushly SDK:",e)}},[n,a,o,l]),{isInitialized:s}}])},330871,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(231457);function n(e){let{isPremium:t,isUserLoggedIn:r,userHasLoggedInBefore:i,locationData:n,upsUserId:a}=e;return{is_premium:t,is_registered_user:i||r,place_id:n?.placeId,twc_latitude:n?.latitude,twc_longitude:n?.longitude,twc_postal_code:n?.postalCode,twc_feature_id:n?.featureId,...r&&a&&{upsx_id:a}}}e.s(["usePushlyProfile",0,function(e){let a=(0,t.useRef)(!1),o=(0,t.useRef)(e),s=(0,r.useAtomValue)(i.pushlyInitializedAtom);(0,t.useEffect)(()=>{o.current=e},[e]),(0,t.useEffect)(()=>{if(!s||!window.pushly||!e)return;let{mParticleId:t}=e,r=n(e);try{window.pushly("profile",r),t&&window.pushly("external_id",t),a.current||(a.current=!0,window.pushly("on_permission_allowed",()=>{let e=o.current;if(!e||!window.pushly)return;let t=n(e);window.pushly("profile",t),e.mParticleId&&window.pushly("external_id",e.mParticleId)}))}catch(e){console.error("Failed to set Pushly profile:",e)}},[e,s])}])},369769,e=>{"use strict";e.i(546584);var t=e.i(699173),r=e.i(185312),i=e.i(592121),n=e.i(959377),a=e.i(330871),o=e.i(528600),s=e.i(546446),l=e.i(310847),u=e.i(64412);e.i(646341);let c=()=>{let e=window?.mParticle?.Identity?.getCurrentUser?.()?.getMPID?.();return e||null},d=()=>{let{user:e}=(0,o.useUser)(),t=(0,s.useAtomValue)(l.userHasLoggedInBeforeAtom),{location:r}=(0,u.useLocation)(),[n,d]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e;(e=c())&&e!==n&&d(e);let t=setInterval(()=>{let e=c();e&&(d(e),clearInterval(t))},1e3);return()=>clearInterval(t)},[n]);let{latitude:m,longitude:p}=(e=>{if(!e)return{latitude:void 0,longitude:void 0};let[t,r]=e.split(",");return{latitude:t?parseFloat(t):void 0,longitude:r?parseFloat(r):void 0}})(r?.geocode);return(0,a.usePushlyProfile)({isPremium:e.isUserPremium,isUserLoggedIn:e.isUserLoggedIn,userHasLoggedInBefore:t??!1,locationData:r?{placeId:r.placeId,latitude:m,longitude:p,postalCode:r.postalCode,featureId:r.featureId}:void 0,upsUserId:e.userID||void 0,mParticleId:n||void 0}),null},m="samsung_widget",p="en-US";e.s(["Pushly",0,({serviceWorkerPath:e,partner:a,locale:o="en-US"})=>{let[s,l]=(0,i.useState)(!1),u="XJe7TqRv7lQ0gyF5biuPnAchWgRhgAjeQc0h";return((0,n.useInitializeSdk)({domainKey:u||"",serviceWorkerPath:e,enabled:s&&a!==m&&o===p&&!!u}),a===m||o!==p)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{src:`https://cdn.p-n.io/pushly-sdk.min.js?domain_key=${u}`,strategy:"afterInteractive",onLoad:()=>{console.log("Pushly SDK loaded"),l(!0)},onError:e=>{console.error("Failed to load Pushly SDK:",e)}}),(0,t.jsx)(d,{})]})}],369769)},157725,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(528600),n=e.i(776169),a=e.i(310847);let o=!1;var s=e.i(961123),l=e.i(343277),u=e.i(553329),c=e.i(145651),d=e.i(249725);e.s(["UserPreferenceSync",0,()=>(!function(){let{user:{isUserLoggedIn:e,userID:s},userProfile:l}=(0,i.useUser)(),{updatePreferences:u}=(0,n.usePreferences)(),c=(0,r.useAtomValue)(a.wxuUserPreferenceAtom);(0,t.useEffect)(()=>{(async()=>{if(e&&l&&s&&!o){o=!0;try{c&&await u(c,!1)}catch(e){console.error("Failed to sync user preferences:",e),o=!1}}})()},[e,l,s,u,c])}(),!function(){let e=(0,s.useParams)(),i=e?.locale||"en-US",{favoriteLocations:n}=(0,c.default)(),{hasResolvedPlaceId:o,recordFeatureId:m}=(0,d.useLocationFeatureIds)(),[p,g]=(0,r.useAtom)(a.wxuUserLocationFeatureIdSweepVersionAtom),f=(0,t.useRef)(!1),w=(0,t.useRef)(!1);(0,t.useEffect)(()=>()=>{w.current=!0},[]),(0,t.useEffect)(()=>{if(f.current||1===p)return;let e=function(e,t){let r=new Set,i=[];for(let n of e){let e=n.placeID;!e||r.has(e)||t(e)||(r.add(e),i.push(e))}return i}(n,o);if(0===e.length){n.length>0&&1!==p&&g(1);return}f.current=!0,(async()=>{let t=!0;for(let r=0;r{let{data:r,error:n}=await (0,u.tryCatch)((0,l.getLocationPointByPlaceId)(e,i));if(w.current)return;if(n){t=!1;return}let a=r?.location;m({placeId:e,geocode:a?`${a.latitude},${a.longitude}`:void 0},a?.featureId??null)}))}t&&!w.current&&g(1)})()},[n,o,m,p,g,i])}(),null)],157725)},599827,e=>{"use strict";var t=e.i(592121),r=e.i(646341),i=e.i(528600),n=e.i(901351);function a(){let e=new URLSearchParams(window.location.search),t=e.get("re");e.delete("re"),window.history.replaceState({},"",window.location.href.replace(`${0==[...e].length?"?":""}re=${t}`,"")),t||(e.set("re",Date.now().toString()),window.location.search=e.toString())}e.s(["PurchaseTokenRefresh",0,()=>{let{user:e}=(0,i.useUser)();return(0,t.useEffect)(()=>{if(!e.isUserLoggedIn)return;let t=(0,r.getCookie)("premium"),i=!1;if(t&&"string"==typeof t){let e=t.split(".")[1];if(e)try{let{expirationDateTime:t,iat:r,premium:n}=JSON.parse(atob(e))||{};if(n){let e=new Date(t);e.setDate(e.getDate()-1);let n=new Date,a=new Date(1e3*r);a.setDate(a.getDate()+1),i=n>=a&&n>=e}}catch(e){console.error("Failed to parse premium cookie JWT:",e)}}i&&(async()=>{try{let e=await n.upsxClient.purchase.getPurchaseToken();e?.premium&&a()}catch(e){console.error("Failed to refresh purchase token:",e)}})()},[e.isUserLoggedIn]),null},"reloadPageWithLoopCheck",0,a])},71977,e=>{"use strict";var t=e.i(646341),r=e.i(546446),i=e.i(949920),n=e.i(889753),a=e.i(543512),o=e.i(901351),s=e.i(892504),l=e.i(528600);async function u(e){try{if((0,t.getCookie)("premium")||(0,s.purchaseCheckedRecently)())return null;let r=await o.upsxClient.purchase.getPurchaseToken();if((0,s.markPurchaseChecked)(),r?.premium){let t=a.UserSubscriptionTiersMap[r.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,l.useUser)(),t=(0,r.useSetAtom)(n.userTierAtom);(0,i.default)(e.isUserLoggedIn?"upsx/cookie/purchase":null,()=>u(t))}(),null)],71977)}]);