(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,837879,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(961123),n=e.i(485737),a=e.i(739971),s=e.i(725296),o=e.i(394481),l=e.i(763886),u=e.i(132084);e.s(["useSubscriptionsEnabled",0,()=>{let e=(0,r.useAtomValue)(a.subscriptionsEnabledAtom),c=(0,r.useAtomValue)(n.geoipCountry),d=(0,i.useParams)()?.locale,p=(0,r.useAtomValue)(o.privacyRegimeAtom)??s.Regime.EXEMPT,m=(0,r.useAtomValue)(l.partnerAtom);return(0,t.useMemo)(()=>null!==e?e:"US"===c&&"en-US"===d&&s.US_REGIMES.includes(p)&&m!==u.Partner.OPPO,[e,c,d,p,m])}])},226602,e=>{"use strict";var t=e.i(699173),r=e.i(592121),i=e.i(747961);let n=(0,r.forwardRef)(({title:e,titleId:r,desc:i,descId:n,...a},s)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":r,"aria-describedby":n,...a,children:[i?(0,t.jsx)("desc",{id:n,children:i}):null,void 0===e?(0,t.jsx)("title",{id:r,children:"Close"}):e?(0,t.jsx)("title",{id:r,children:e}):null,(0,t.jsx)("path",{fill:"currentColor",d:"M12.809 4.113a.652.652 0 1 0-.922-.922L8 7.078 4.113 3.19a.652.652 0 1 0-.922.922L7.078 8 3.19 11.887a.652.652 0 0 0 .922.922L8 8.922l3.887 3.887a.652.652 0 1 0 .922-.922L8.922 8z"})]})),a=r.default.forwardRef((e,r)=>(0,t.jsx)(i.BaseIcon,{ref:r,icon:n,...e}));a.displayName="Close",e.s(["Close",0,a])},671525,e=>{"use strict";var t=e.i(961123);let r=()=>{let e=(0,t.useRouter)();return{navigate:(t,r={})=>{let{mpa:i=!0,replace:n=!1}=r;i?n?window.location.replace(t):window.location.href=t:n?e.replace(t):e.push(t)},refresh:(t={})=>{let{mpa:r=!0}=t;r?window.location.reload():e.refresh()},router:e}};e.s(["default",0,r,"usePageNavigation",0,r])},756227,95870,391174,e=>{"use strict";var t=e.i(546446),r=e.i(284007),i=e.i(889753),n=e.i(310847),a=e.i(613646);e.s(["mutate",()=>a.j],95870);var a=a,s=e.i(318849);let o=()=>{(0,a.j)(e=>"string"==typeof e&&e.startsWith("upsx/"),void 0,{revalidate:!1});try{localStorage.removeItem(s.SWR_CACHE_STORAGE_KEY)}catch{}};e.s(["invalidateUpsxCache",0,o],391174),e.s(["useResetAuthState",0,function(){let e=(0,t.useSetAtom)(i.userProfileAtom),a=(0,t.useSetAtom)(n.wxuUserAccountUserAccountResponseAtom);return()=>{o(),e(r.RESET),a(null)}}],756227)},609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(592121);let i=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,i],674339),e.s(["useDebugSystem",0,function(){let[e,n]=(0,t.useAtom)(i),a=(0,r.useCallback)((e,t)=>{n(r=>{let i=r?.[e]||{},n="object"==typeof t&&null!==t&&"object"==typeof i?{...i,...t}:t;return{...r,[e]:n}})},[n]),s=(0,r.useCallback)((e,t)=>{n(r=>{let i=r||{timestamp:new Date().toISOString()},n=i.components||{};if(null===t){let t={...n};return delete t[e],{...i,components:t}}return{...i,components:{...n,[e]:t}}})},[n]),o=(0,r.useCallback)(e=>{a("page",e)},[a]),l=(0,r.useCallback)(e=>{a("route",e)},[a]),u=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&a(e,t)})},[a]);return{debugData:e,updateSection:a,updateComponentData:s,setPageData:o,clearAllDebugData:(0,r.useCallback)(()=>{n({timestamp:new Date().toISOString()})},[n]),updateRouteInfo:l,updatePageDebug:u}}],609858)},752496,e=>{"use strict";var t=e.i(592121),r=e.i(609858);let i=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:n,page:a,onUpdateData:s,onSetPageData:o}){let{updateComponentData:l,setPageData:u}=(0,r.useDebugSystem)(),c=(0,t.useRef)(!1),d=s||l,p=o||u;return(0,t.useEffect)(()=>{if(n)return i.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(n),hasPerformance:!!n.performance,hasContext:!!n.context}),d(e,{...n,_collectedAt:new Date().toISOString()}),()=>{i.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,n,d]),(0,t.useEffect)(()=>{a&&!c.current&&(i.lifecycle("Setting page metadata",{title:a.title,assetName:a.assetName,collection:a.collection}),p({...a,_updatedAt:new Date().toISOString()}),c.current=!0)},[a,p]),null}])},18358,e=>{"use strict";var t=e.i(947118),r=e.i(737801),i=e.i(592121);e.s(["useTrackEvent",0,()=>{let e=(0,t.useIsInitialized)(),n=(0,r.useEventAttributes)(),a=(0,i.useCallback)((t,r={})=>{let i={...n,...r};if(!e)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(t,window.mParticle.EventType.Other,i),console.debug(`MParticle: Event "${t}" tracked`,i)}catch(e){console.error(`MParticle: Event "${t}" failed`,e)}return a},[n,e]);return a}])},806262,e=>{"use strict";e.i(592121);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,i){var n;let a,s=(0,t.useStore)(i),o=(n=s,(a=r.get(n))||(a=new WeakSet,r.set(n,a)),a);for(let[t,...r]of e)(!o.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(o.add(t),s.set(t,...r))}])},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),i=(0,t.atom)(null);e.s(["activeEventAtom",0,i,"layoutStateAtom",0,r])},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},991511,e=>{"use strict";var t=e.i(592121),r=e.i(806262),i=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let n=(0,i.useStore)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)n.get(e)!==t&&n.set(e,t)})}])},553329,e=>{"use strict";async function t(e){try{return{data:await e,error:null}}catch(e){return{data:null,error:e}}}e.s(["tryCatch",0,t])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),n=e.i(901351),a=e.i(310847),s=e.i(528600),o=e.i(617874),l=e.i(858040),u=e.i(553329),c=e.i(592121),d=e.i(245943);let p=(0,e.i(695881).createLogger)("useMapSettings");e.s(["WEB_MAP_SETTINGS_PLATFORM",0,"twc","useMapSettings",0,function(e="twc"){let{user:{isUserLoggedIn:t}}=(0,s.useUser)();return{saveMapSettings:(0,c.useCallback)(async r=>{if(!t)return!1;let{error:i}=await (0,u.tryCatch)(n.upsxClient.preference.updateMapSettings(e,r));if(!i)return!0;if(i instanceof d.APIError&&404===i.code){let{error:t}=await (0,u.tryCatch)(n.upsxClient.preference.createMapSettings(e,r));return!t||(p.warn("Failed to create map settings",t),!1)}return p.warn("Failed to update map settings",i),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,s.useUser)(),[c,d]=(0,t.useAtom)(r.userPreferencesAtom),[p,m]=(0,t.useAtom)(a.wxuUserPreferenceAtom),f=async()=>{let{data:e,error:t}=await (0,u.tryCatch)(n.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:i,opacity:a,roadOverlay:s,style:o}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==a&&{opacity:a},...void 0!==s&&{roadOverlay:s},...void 0!==o&&{style:o}};return Object.keys(l).length>0?l:null},g=async e=>{try{await n.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},v=async(t,r=!0)=>{try{let i,n=(i={...c,...t},d(i),m({...p,...t,locations:i.locations}),i);if(t?.unit){let e=(0,o.unitsSystemByName)(t.unit),r=e?.code||"e";(0,l.setCookie)(o.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await g(n),{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([n.upsxClient.preference.getPreference(),f()]);if(!e?.userID)return null;let{mapSettings:r,...a}=e,s={...a,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...t}};return v(s,!1),s}catch{return null}},updatePreferences:v}}],776169)},318849,e=>{"use strict";let t=!1,r="upsx-recent-purchase-at";e.s(["SWR_CACHE_LEGACY_STORAGE_KEY",0,"app-cache","SWR_CACHE_STORAGE_KEY",0,"wxu-swr-cache-v1","disableSwrPersist",0,()=>{t=!0},"hasRecentPurchase",0,e=>{try{let t=localStorage.getItem(r);if(!t)return!1;let i=Number(t);if(!Number.isFinite(i))return!1;return Date.now()-it,"markRecentPurchase",0,()=>{try{localStorage.setItem(r,String(Date.now()))}catch{}}])},45846,e=>{"use strict";let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},491045,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),i=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,i])},185312,(e,t,r)=>{t.exports=e.r(16129)},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])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},688070,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["isWebViewOnlyAtom",0,t])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},742436,283366,e=>{"use strict";e.s(["ExperimentContext",()=>D,"ExperimentProvider",()=>R,"default",()=>N,"useExperimentContext",()=>M],742436);var t=e.i(546584),r=e.i(699173),i=e.i(592121),n=e.i(185312),a=e.i(333350),s=e.i(310847),o=e.i(546446),l=e.i(737801),u=e.i(688070),c=e.i(158662),d=e.i(528600),p=e.i(530102),m=e.i(553329);let f="production"!==t.default.env.VERCEL_TARGET_ENV,g=new Set;e.s(["getExposureVariantOverride",()=>_,"resetExposures",()=>P,"useExposure",()=>I],283366);var v=e.i(695881),y=e.i(358273);let x=(0,v.createLogger)("useExposure"),S="wxu-exp-exposed:",h=new Set,w=()=>{try{return(0,y.getMetricsSession)()?.sessionId||null}catch{return null}},E=e=>{try{let t=localStorage.getItem(S+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},A=(e,t)=>{try{for(let t=localStorage.length-1;t>=0;t--){let r=localStorage.key(t);r?.startsWith(S)&&r!==S+e&&localStorage.removeItem(r)}localStorage.setItem(S+e,JSON.stringify([...t]))}catch{}},b=e=>{if(0===h.size)return;let t=E(e);for(let e of h)t.add(e);A(e,t),h.clear()},k=e=>{let t=w();return t?(b(t),E(t).has(e)):h.has(e)},C=new Map;function _(e){return C.get(e)}function P(){h.clear(),C.clear();let e=w();if(e)try{localStorage.removeItem(S+e)}catch{}}function I(e,t){let r=void 0!==t,n=t?.variant,s=(0,i.useContext)(D);(0,i.useEffect)(()=>{if(!a.default||!s||k(e)||r&&void 0===n)return;let{client:t}=s;if(!t)return;let i=()=>{if(!k(e)){(e=>{let t=w();if(!t)return h.add(e);b(t);let r=E(t);r.add(e),A(t,r)})(e),void 0!==n&&C.set(e,n);try{t.exposure(e)}catch(e){x.error("Failed to track exposure:",e)}}};window.mParticle?.isInitialized?.()?i():window.mParticle?.ready?.(i)},[s,e,r,n])}let O="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",T="production"!==t.default.env.VERCEL_TARGET_ENV,D=(0,i.createContext)(null),R=({children:e,scriptSrc:t})=>{let v,y,x=(0,o.useAtomValue)(s.wxuUserAnonymousIdAtom),S=(v=(0,l.useEventAttributes)(),y=(0,o.useAtomValue)(u.isWebViewOnlyAtom),(0,i.useCallback)((e,t={})=>{if(y)return void console.debug("Skipping enrolled-in-experiment in webview mode");if(!window.mParticle?.isInitialized?.())return void console.warn("MParticle is not initialized");if(!e)return void console.warn("No exposure data provided to trackEnrolledInExperiment");if(!e.experiment_key)return void console.debug(`[Experiment] Skipping exposure tracking for ${e.flag_key} - no experiment_key (feature flag only)`);try{let r={...v,newVariant:e.variant||"",newExperiment:e.experiment_key,newExperimentReceivedAt:Date.now()};window.mParticle?.logEvent?.("enrolled-in-experiment",window.mParticle?.EventType?.Other,r,t),console.debug(`MParticle: Event tracked - enrolled-in-experiment for ${e.flag_key||"unknown"}:${e.variant}`)}catch(e){console.error("MParticle: Failed to track event",e)}},[v,y])),h=(0,o.useSetAtom)(c.experimentJoinListAtom),{user:w}=(0,d.useUser)(),[E,A]=(0,i.useState)(!1),[b,k]=(0,i.useState)(!1),[,C]=(0,i.useState)(0),I=(0,i.useRef)(void 0),R=(0,i.useRef)(void 0),M=(0,p.getCookie)("ANON_C")?.toString();I.current=w.userID||void 0,R.current=M||x;let N=(0,i.useRef)(new Set),j=(0,i.useCallback)(e=>{let t=_(e.flag_key),r=void 0!==t?{...e,variant:t}:e,i=`${r.flag_key}::${r.variant??""}`;N.current.has(i)||(N.current.add(i),S(r),function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){f&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){f&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let i=`${e.flag_key}::${e.variant??""}`;if(g.has(i)){f&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${i}`);return}g.add(i);let n={api_key:"bb1117981ed2a95dc4fa64b75661d681",events:[{event_type:"$exposure",user_id:t,device_id:r,ip:"$remote",event_properties:{flag_key:e.flag_key,variant:e.variant,experiment_key:e.experiment_key,platform:"web",app_name:"wx-next-web",environment:f?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,m.tryCatch)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0}));return r?console.error("[Experiment] Failed to send exposure to Amplitude HTTP API:",r):t&&!t.ok?console.error(`[Experiment] Amplitude HTTP API returned ${t.status}`):f&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}({exposure:r,userId:I.current,deviceId:R.current}))},[S]),[F,V]=(0,i.useState)({});(0,i.useEffect)(()=>{if(a.default){let e=(0,p.getCookie)("amplitude-variants");if(e)try{let t=JSON.parse(e.toString());V(t),T&&Object.keys(t).length>0&&console.debug("[Experiment] Loaded server variants from cookie:",Object.keys(t))}catch(e){console.error("[Experiment] Failed to parse variants cookie:",e)}}},[]),(0,i.useEffect)(()=>{0===Object.keys(F).length?h(null):h(JSON.stringify(Object.entries(F).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",i=Math.floor(Date.now()/1e3);return`${e},${r},${i}`})))},[F,h]);let $=function(e,t,r){let n=(0,i.useRef)(null),[s,o]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!s&&a.default&&O&&t){if(!window.Experiment)return void console.error("Amplitude Experiment SDK not loaded. Script may still be loading.");try{let t=Object.keys(r).length>0;n.current=window.Experiment.initialize(O,{debug:T,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:t=>{try{e(t),T&&console.debug("[Experiment] Exposure tracked:",t)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}}},initialVariants:t?r:void 0,source:t?"initialVariants":"localStorage"}),o(!0),T&&(t?console.debug("[Experiment] SDK initialized with server variants:",Object.keys(r)):console.debug("[Experiment] SDK initialized (will fetch from API)"))}catch(e){console.error("Failed to initialize Amplitude Experiment SDK:",e)}}},[s,t,e,r]),n.current}(j,E,F);return(0,i.useEffect)(()=>{(async()=>{if(!$)return;let e=(0,p.getCookie)("ANON_C")?.toString()||x;if(!e&&!w.userID){T&&console.debug("[Experiment] No user identifier available"),k(!0);return}let t={device_id:e,...w.userID?{user_id:w.userID}:{},user_properties:{}};T&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await $.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{k(!0)}})()},[$,x,w.userID]),(0,i.useEffect)(()=>{N.current.clear(),g.clear(),P(),C(e=>e+1)},[w.userID]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t,strategy:"afterInteractive",onLoad:()=>{A(!0),T&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(D.Provider,{value:{client:$,variant:(e,t)=>{if(!$)return t;let r=$.variant(e,t);return T&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!$)return Promise.resolve();if(!e){let e=(0,p.getCookie)("ANON_C")?.toString()||x;if(e||w.userID){let t={device_id:e,...w.userID?{user_id:w.userID}:{},user_properties:{}};return $.fetch(t)}}return $.fetch(e)},isFetchComplete:b},children:e})]})},M=()=>{let e=(0,i.useContext)(D);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},N=R},436028,e=>{"use strict";e.s(["hasLength",0,e=>Array.isArray(e)&&e.length>0])}]);