(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,806262,e=>{"use strict";e.i(247865);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,n){var a;let i,s=(0,t.useStore)(n),o=(a=s,(i=r.get(a))||(i=new WeakSet,r.set(a,i)),i);for(let[t,...r]of e)(!o.has(t)||(null==n?void 0:n.dangerouslyForceHydrate))&&(o.add(t),s.set(t,...r))}])},753764,e=>{"use strict";var t=e.i(730921),r=e.i(902875);e.s(["default",0,function({locale:e,...n}){if(!e)throw Error(void 0);return(0,r.jsx)(t.IntlProvider,{locale:e,...n})}])},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},604323,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["metricsArticleDataAtom",0,t])},513539,e=>{"use strict";var t=e.i(981030);let r=(0,t.atom)(null),n=(0,t.atom)(null);e.s(["activeEventAtom",0,n,"layoutStateAtom",0,r])},236433,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["pageAtomsPathnameAtom",0,t])},647292,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["webViewPlatformAtom",0,t])},122124,e=>{"use strict";var t=e.i(388706);let r=Object.fromEntries(t.PAGE_TYPE_CONFIG.map(e=>[e.suffix,e.urlType])),n=RegExp(`^(?/[a-z]{2}-[A-Z]{2})?/.+/(?:city|locality|neighborhood|postcode|poi|ski|airport)/[^/]+/(?${t.SUFFIX_ALTERNATION})(?:/day-[1-9][0-9]*)?$`);e.s(["getAnonymizedPath",0,function(e){var t,a;let i,s,o,l,c,u=(i=e,s=e?.indexOf?.("?"),o=e?.indexOf?.("#"),s>-1?i=i.substring(0,s):o>-1&&(i=i.substring(0,o)),i);if(t=u,l=n.exec(t)?.groups,a=u=(c=l?.suffix?r[l.suffix]:void 0)?`${l?.locale??""}/${c}/l`:t,"/index.html"===(u=a?.replace?.(/\/l\/[^/]+/gi,"/l"))||"/"===u||""===u)u="/";else{let e=u?.split("/")||[],t=e.length-1,r=e[t]??"";"news"!==(t>0?e[t-1]:"")&&(r.match(/[A-Z]/)||r.match(/[0-9]/)||r.match(/[@#$%&!*:]/)||""===r)&&e.pop(),u=e.join("/")}return u},"stripLastPartOfSlug",0,(e="")=>{let t=e.split("/");return t?.[t.length-1]===""&&t.pop(),t.slice(0,t.length-1).join("/")}])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},947118,221085,e=>{"use strict";let t;var r=e.i(247865);let n=new Set,a=0,i=()=>"function"==typeof window.mParticle?.init,s=()=>{void 0!==t&&(clearInterval(t),t=void 0)},o=()=>{if(!i()||(s(),0===n.size))return;let e=[...n];for(let t of(n.clear(),e))t()},l=()=>{void 0===t&&(a=0,t=setInterval(()=>{a+=100,o(),a>=3e4&&s()},100))},c=e=>(n.add(e),l(),()=>{n.delete(e)}),u=e=>i()?(e(),()=>{}):c(e),d=e=>i()?()=>{}:c(e),p=()=>!1;e.s(["subscribeSdkLoaded",0,u,"useIsSdkLoaded",0,()=>(0,r.useSyncExternalStore)(d,i,p),"watchForSdkLoad",0,e=>{if("u"{};if(i())return o(),()=>{};l();let t=Array.from(document.scripts).find(t=>t.getAttribute("src")===e);if(!t)return()=>{};let r=()=>o();return t.addEventListener("load",r),()=>{t.removeEventListener("load",r)}}],221085);let m=e=>"function"==typeof window.mParticle?.ready?(window.mParticle?.ready?.(e),()=>{}):u(()=>{window.mParticle?.ready?.(e),e()}),f=()=>!!window.mParticle?.isInitialized?.(),g=()=>!1;e.s(["useIsInitialized",0,()=>(0,r.useSyncExternalStore)(m,f,g)],947118)},491240,e=>{"use strict";let t=(0,e.i(695881).createLogger)("MParticleIdentity");e.s(["truncateIdentityValue",0,e=>"string"==typeof e&&e.length>256?(t.warn(`identity value exceeded 256 chars (${e.length}); truncating`),e.slice(0,256)):e])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},456215,e=>{"use strict";e.s(["isSnowCastWebView",0,function(e){return"snowcast"===e||e.startsWith("snowcast-")},"isWebViewIos",0,function(e){return"ios"===e||e.endsWith("-ios")}])},520362,e=>{"use strict";var t=e.i(902875),r=e.i(247865);let n=e=>{let{apiRoute:t,depth:n,refresh:a,serverURL:i}=e,s=(0,r.useRef)(!1),o=(0,r.useCallback)(e=>{e.origin===i&&e.data&&"object"==typeof e.data&&"payload-document-event"===e.data.type&&("function"==typeof a?a():console.error("You must provide a refresh function to `RefreshRouteOnSave`"))},[a,i]);return(0,r.useEffect)(()=>("u">typeof window&&window.addEventListener("message",o),s.current||(s.current=!0,(e=>{let{serverURL:t}=e;if("u">typeof window){let e=window?.opener||window?.parent;e?.postMessage({type:"payload-live-preview",ready:!0},t)}})({serverURL:i}),a()),()=>{"u">typeof window&&window.removeEventListener("message",o)}),[i,o,n,t,a]),null};var a=e.i(725287);let i=(0,e.i(695881).createLogger)("BlockHighlightOverlay"),s={position:"absolute",pointerEvents:"none",border:"2px solid #5B9BD5",backgroundColor:"rgba(91, 155, 213, 0.04)",borderRadius:"8px",boxShadow:"0 0 8px rgba(91, 155, 213, 0.3)",zIndex:"9999",transition:"opacity 150ms ease"},o=e=>{let r=(0,a.useRouter)();return(0,t.jsx)(n,{...e,refresh:r.refresh})};e.s(["LivePreviewListener",0,o],346267),e.i(346267),e.s(["BlockHighlightOverlay",0,()=>{let e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,r.useRef)(null),a=(0,r.useRef)(null),o=(0,r.useRef)(null),l=(0,r.useCallback)(()=>{if("u"{let r=t.current,a=e.current;if(!r||!a)return;if(!r.isConnected){t.current=null,a.style.opacity="0",n.current?.disconnect();return}let i=r.getBoundingClientRect();a.style.top=`${i.top+window.scrollY}px`,a.style.left=`${i.left+window.scrollX}px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.opacity="1"},[]),u=(0,r.useCallback)(()=>{t.current=null,o.current=null,e.current&&(e.current.style.opacity="0"),n.current?.disconnect()},[]),d=(0,r.useCallback)(()=>{t.current&&null===a.current&&(a.current=requestAnimationFrame(()=>{a.current=null,c()}))},[c]),p=(0,r.useCallback)(e=>{if(e===o.current)return;let r=document.querySelector(`[data-block-id="${CSS.escape(e)}"]`);if(!r)return void i.debug("No element found for block ID",{blockId:e});let a=(e=>{let t=e,r=t.getBoundingClientRect();for(let e=0;e{let t=e=>{var t;(e=>{if(e===window.location.origin)return!0;try{let{hostname:t}=new URL(e);return"weather.com"===t||t.endsWith(".weather.com")}catch{return!1}})(e.origin)&&"object"==typeof(t=e.data)&&null!==t&&"type"in t&&("wx:block-highlight-clear"===t.type||"wx:block-highlight"===t.type&&"blockId"in t&&"string"==typeof t.blockId)&&("wx:block-highlight"===e.data.type?p(e.data.blockId):u())};return window.addEventListener("message",t),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d,{passive:!0}),()=>{window.removeEventListener("message",t),window.removeEventListener("scroll",d),window.removeEventListener("resize",d),null!==a.current&&cancelAnimationFrame(a.current),n.current?.disconnect(),e.current?.remove()}},[p,u,d]),null},"LivePreviewListener",0,o],520362)},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},752496,e=>{"use strict";var t=e.i(247865),r=e.i(609858);let n=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:a,page:i,onUpdateData:s,onSetPageData:o}){let{updateComponentData:l,setPageData:c}=(0,r.useDebugSystem)(),u=(0,t.useRef)(!1),d=s||l,p=o||c;return(0,t.useEffect)(()=>{if(a)return n.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(a),hasPerformance:!!a.performance,hasContext:!!a.context}),d(e,{...a,_collectedAt:new Date().toISOString()}),()=>{n.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,a,d]),(0,t.useEffect)(()=>{i&&!u.current&&(n.lifecycle("Setting page metadata",{title:i.title,assetName:i.assetName,collection:i.collection}),p({...i,_updatedAt:new Date().toISOString()}),u.current=!0)},[i,p]),null}])},609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(247865);let n=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,n],674339),e.s(["useDebugSystem",0,function(){let[e,a]=(0,t.useAtom)(n),i=(0,r.useCallback)((e,t)=>{a(r=>{let n=r?.[e]||{},a="object"==typeof t&&null!==t&&"object"==typeof n?{...n,...t}:t;return{...r,[e]:a}})},[a]),s=(0,r.useCallback)((e,t)=>{a(r=>{let n=r||{timestamp:new Date().toISOString()},a=n.components||{};if(null===t){let t={...a};return delete t[e],{...n,components:t}}return{...n,components:{...a,[e]:t}}})},[a]),o=(0,r.useCallback)(e=>{i("page",e)},[i]),l=(0,r.useCallback)(e=>{i("route",e)},[i]),c=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&i(e,t)})},[i]);return{debugData:e,updateSection:i,updateComponentData:s,setPageData:o,clearAllDebugData:(0,r.useCallback)(()=>{a({timestamp:new Date().toISOString()})},[a]),updateRouteInfo:l,updatePageDebug:c}}],609858)},725296,e=>{"use strict";var t,r=e.i(965586),n=((t={}).CA="ca",t.CA_QC="ca-qc",t.EXEMPT="exempt",t.GDPR="gdpr",t.JP="jp",t.KR="kr",t.LATAM_CO="latam-co",t.LATAM_DO="latam-do",t.LATAM_PE="latam-pe",t.LGPD="lgpd",t.PIPL="pipl",t.TR_KVKK="tr-kvkk",t.USA="usa",t.USA_CCPA="usa-ccpa",t.USA_CO="usa-co",t.USA_CT="usa-ct",t.USA_VA="usa-va",t);Object.values(n);let a={"usa-ut":"usa"},i=e=>e?a[e]??e:void 0;e.s(["RESTRICTIVE_REGIMES",0,["ca-qc","gdpr","latam-co","latam-do","latam-pe","lgpd","pipl","tr-kvkk"],"Regime",()=>n,"US_REGIMES",0,["usa","usa-ccpa","usa-co","usa-ct","usa-va"],"default",0,n,"getRegime",0,()=>(()=>{let e=(0,r.getCookie)("ci")?.toString();if(e)for(let t of e.split("&")){let e=t.indexOf("=");if(e>-1&&"TWC-Privacy"===t.slice(0,e))return i(t.slice(e+1))}})()??i((0,r.getCookie)("twc-privacy")?.toString())??"exempt"])},7150,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["pushlyPromptSuppressedAtom",0,t])},756227,e=>{"use strict";var t=e.i(546446),r=e.i(284007),n=e.i(889753),a=e.i(905059),i=e.i(310847),s=e.i(960576),o=e.i(317298),l=e.i(391174),c=e.i(735526),u=e.i(90543);e.s(["useResetAuthState",0,function(){let e=(0,t.useSetAtom)(n.userProfileAtom),d=(0,t.useSetAtom)(i.wxuUserAccountUserAccountResponseAtom),p=(0,t.useSetAtom)(a.mapLayerOrderAtom);return()=>{(0,l.invalidateUpsxCache)(),(0,o.clearNextSessionIntent)(),e(r.RESET),d(null),p(r.RESET),(0,s.clearEarlyAnonId)(),(0,c.clearAccountCreated)(),(0,u.bumpAuthEpoch)()}}])},735526,e=>{"use strict";let t="wx-next/account-created";e.s(["clearAccountCreated",0,function(){try{sessionStorage.removeItem(t)}catch{}},"markAccountCreated",0,function(){try{sessionStorage.setItem(t,"true")}catch{}},"wasAccountCreated",0,function(){try{return"true"===sessionStorage.getItem(t)}catch{return!1}}])},90543,e=>{"use strict";var t=e.i(521350);let r="wxu-auth-epoch",n="wxu-rendered-tier";function a(e){return(0,t.isLocalStorageAvailable)()?localStorage.getItem(e):null}function i(e,r){(0,t.isLocalStorageAvailable)()&&localStorage.setItem(e,r)}e.s(["bumpAuthEpoch",0,function(){i(r,String(Date.now()))},"isStaleRestore",0,function({renderedTier:e,recordedTier:t,epochAtLoad:r,currentEpoch:n}){return null!==t&&t!==e||void 0!==r&&r!==n},"readAuthEpoch",0,function(){return a(r)},"readRecordedTier",0,function(){return a(n)},"recordTier",0,function(e){i(n,e)}])},391174,95870,e=>{"use strict";var t=e.i(613646);e.s(["mutate",()=>t.j],95870);var t=t,r=e.i(892504);e.s(["invalidateUpsxCache",0,()=>{(0,t.j)(e=>"string"==typeof e&&e.startsWith("upsx/"),void 0,{revalidate:!1}),(0,r.clearPurchaseChecked)()}],391174)},45846,e=>{"use strict";e.i(288906);var t=e.i(245943),r=e.i(810564);let n=new t.UPSXClient({baseUrl:(0,r.upsxApiUrl)("https://upsx.weather.com")});e.s(["upsxClient",0,n])},378869,e=>{"use strict";let t=(0,e.i(284007).atomWithStorage)("wxu-web/keyval:emailSubscriptions",null,void 0,{getOnInit:!0});e.s(["emailPreferencesAtom",0,t])},905059,e=>{"use strict";let t=(0,e.i(284007).atomWithStorage)("wx-next/user:mapLayerOrder",null,void 0,{getOnInit:!0});e.s(["mapLayerOrderAtom",0,t])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),n=e.i(301904),a=e.i(905059),i=e.i(901351),s=e.i(310847),o=e.i(528600),l=e.i(617874),c=e.i(540768),u=e.i(553329),d=e.i(247865),p=e.i(245943);let m=(0,e.i(695881).createLogger)("useMapSettings");e.s(["WEB_MAP_SETTINGS_PLATFORM",0,"twc","useMapSettings",0,function(e="twc"){let{user:{isUserLoggedIn:r}}=(0,o.useUser)(),n=(0,t.useSetAtom)(a.mapLayerOrderAtom),s=(0,d.useCallback)(async t=>{if(!r)return!1;let{error:n}=await (0,u.tryCatch)(i.upsxClient.preference.updateMapSettings(e,t));if(!n)return!0;if(n instanceof p.APIError&&404===n.code){let{error:r}=await (0,u.tryCatch)(i.upsxClient.preference.createMapSettings(e,t));return!r||(m.warn("Failed to create map settings",r),!1)}return m.warn("Failed to update map settings",n),!1},[r,e]),l=(0,d.useCallback)((e,t)=>{n(e?.layerOrder??t)},[n]),c=(0,d.useCallback)(async t=>{if(!r||0===t.length)return!1;n(t);let{data:a,error:s}=await (0,u.tryCatch)(i.upsxClient.preference.reorderMapSettingsLayers(e,{order:t}));if(!s)return l(a,t),!0;if(s instanceof p.APIError&&404===s.code){let{data:r,error:n}=await (0,u.tryCatch)(i.upsxClient.preference.createMapSettings(e,{layerOrder:t}));if(!n)return l(r,t),!0;if(n instanceof p.APIError&&409===n.code){let{data:r,error:n}=await (0,u.tryCatch)(i.upsxClient.preference.reorderMapSettingsLayers(e,{order:t}));return n?(m.warn("Failed to reorder map layers after create",n),!1):(l(r,t),!0)}return m.warn("Failed to create map settings layer order",n),!1}return m.warn("Failed to reorder map layers",s),!1},[r,e,l,n]),f=(0,d.useCallback)(async(t,a,s)=>{if(!r)return!1;n(s);let{data:o,error:d}=await (0,u.tryCatch)(i.upsxClient.preference.moveMapSettingsLayer(e,t,{placement:a}));return d?d instanceof p.APIError&&(404===d.code||400===d.code)?c(s):(m.warn("Failed to move map layer",d),!1):(l(o,s),!0)},[r,e,l,c,n]);return{saveMapSettings:s,saveLayerOrder:c,moveLayer:f}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,o.useUser)(),[d,p]=(0,t.useAtom)(r.userPreferencesAtom),[m,f]=(0,t.useAtom)(s.wxuUserPreferenceAtom),g=(0,t.useSetAtom)(a.mapLayerOrderAtom),y=async()=>{let{data:e,error:t}=await (0,u.tryCatch)(i.upsxClient.preference.getMapSettings("twc"));if(t)return{ok:!1,mapSettings:null,layerOrder:null};if(!e)return{ok:!0,mapSettings:null,layerOrder:null};let{animationSpeed:r,autoplay:n,opacity:a,roadOverlay:s,style:o}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==n&&{autoplay:n},...void 0!==a&&{opacity:a},...void 0!==s&&{roadOverlay:s},...void 0!==o&&{style:o}};return{ok:!0,mapSettings:Object.keys(l).length>0?l:null,layerOrder:e.layerOrder?.length?e.layerOrder:null}},w=async e=>{try{await i.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},h=async(t,r=!0)=>{try{let n,a=(n={...d,...t},p(n),f({...m,...t,locations:n.locations}),n);if(t?.unit){let e=(0,l.unitsSystemByName)(t.unit),r=e?.code||"e";(0,c.setCookie)(l.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await w(a),{success:!0}}catch(e){return console.error("Failed to update preferences:",e),{success:!1,error:e instanceof Error?e.message:"Failed to update preferences"}}};return{syncPreferencesFromUpsx:async()=>{try{let[e,t]=await Promise.all([i.upsxClient.preference.getPreference(),y()]);if(!e?.userID)return null;let{mapSettings:r,layerOrder:a,ok:s}=t;s&&g(a);let{mapSettings:o,...l}=e,c={...l,mapSettings:{...n.DEFAULT_MAP_SETTINGS,...r}};return h(c,!1),c}catch{return null}},updatePreferences:h}}],776169)},317298,e=>{"use strict";let t="wxu-next-session-intent",r=["fpdprobnsitop1intent","fpdprobnsitop2intent","fpdprobnsitop3intent"];e.s(["clearNextSessionIntent",0,function(){try{localStorage.removeItem(t)}catch{}},"hasRadarIntent",0,function(e){return!!e&&r.some(t=>{let r=e[t];return"string"==typeof r&&"radar"===r.trim().toLowerCase()})},"readNextSessionIntent",0,function(){try{let e=localStorage.getItem(t);if(!e)return null;let r=JSON.parse(e);if(r&&"object"==typeof r&&"promotesRadar"in r&&"boolean"==typeof r.promotesRadar)return{promotesRadar:r.promotesRadar};return null}catch{return null}},"writeNextSessionIntent",0,function(e){try{localStorage.setItem(t,JSON.stringify({promotesRadar:e.promotesRadar}))}catch{}}])},892504,e=>{"use strict";let t="upsx-purchase-checked-at";e.s(["clearPurchaseChecked",0,()=>{try{localStorage.removeItem(t)}catch{}},"markPurchaseChecked",0,()=>{try{localStorage.setItem(t,String(Date.now()))}catch{}},"purchaseCheckedRecently",0,()=>{try{let e=localStorage.getItem(t);if(!e)return!1;let r=Number(e);if(!Number.isFinite(r))return!1;return Date.now()-r{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["getSmartScriptClickUrl",0,function(e){let t=e?.clickURL;return"string"==typeof t&&t?t:null},"smartScriptClickUrlAtom",0,t,"withCtaAttribution",0,function(e,{trackAdset:t,deepLinkValue:r}){if(!URL.canParse(e))return e;let n=new URL(e);return t&&n.searchParams.set("af_adset",t.replace(/ /g,"_")),r&&n.searchParams.set("deep_link_value",r),n.toString()}])},216809,e=>{"use strict";var t=e.i(247865),r=e.i(553329);e.s(["useAppsFlyerConsent",0,function(){let[e,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let e=!1;return(async()=>{let t=window.DprSdk?.isInitialized;if(!t)return;let{error:a}=await (0,r.tryCatch)(t);a||e||n(!!window.DprSdk?.getFeatureFlags()?.appsFlyer)})(),()=>{e=!0}},[]),e}])},991511,e=>{"use strict";var t=e.i(247865),r=e.i(806262),n=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let a=(0,n.useStore)(),i=(0,t.useRef)(e);i.current=e,(0,t.useEffect)(()=>{for(let[e,t]of i.current)a.get(e)!==t&&a.set(e,t)})}])}]);