(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,367810,396817,634177,e=>{"use strict";var t=e.i(699173),r=e.i(592121),a=e.i(543836),i=e.i(271359),o=e.i(855128),n=e.i(296994),l=e.i(803976),s=e.i(698900),c=e.i(546504),u=e.i(778469),d=e.i(312610),p=e.i(942928),f=e.i(235453),m=e.i(714035),g=e.i(621790),h=e.i(73772),v=e.i(982538),y=Object.defineProperty,w=(e,t)=>y(e,"name",{value:t,configurable:!0}),x="Dialog",[b,E]=(0,o.createContextScope)(x),[I,S]=b(x),C=w(e=>{let{__scopeDialog:a,children:i,open:o,defaultOpen:s,onOpenChange:c,modal:u=!0}=e,d=r.useRef(null),p=r.useRef(null),[f,m]=(0,l.useControllableState)({prop:o,defaultProp:s??!1,onChange:c,caller:x}),[g,h]=r.useState(0),[v,y]=r.useState(0);return(0,t.jsx)(I,{scope:a,triggerRef:d,contentRef:p,contentId:(0,n.useId)(),titleId:(0,n.useId)(),descriptionId:(0,n.useId)(),titlePresent:g>0,descriptionPresent:v>0,setTitleCount:h,setDescriptionCount:y,open:f,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),modal:u,children:i})},"Dialog"),P=r.forwardRef(w(function(e,r){let{__scopeDialog:o,...n}=e,l=S("DialogTrigger",o),s=(0,i.useComposedRefs)(r,l.triggerRef);return(0,t.jsx)(p.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":z(l.open),...n,ref:s,onClick:(0,a.composeEventHandlers)(e.onClick,l.onOpenToggle)})},"DialogTrigger")),k="DialogPortal",[A,D]=b(k,{forceMount:void 0}),_=w(e=>{let{__scopeDialog:a,forceMount:i,children:o,container:n}=e,l=S(k,a);return(0,t.jsx)(A,{scope:a,forceMount:i,children:r.Children.map(o,e=>(0,t.jsx)(d.Presence,{present:i||l.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:e})}))})},"DialogPortal"),R="DialogOverlay",O=r.forwardRef(w(function(e,r){let a=D(R,e.__scopeDialog),{forceMount:i=a.forceMount,...o}=e,n=S(R,e.__scopeDialog);return n.modal?(0,t.jsx)(d.Presence,{present:i||n.open,children:(0,t.jsx)(j,{...o,ref:r})}):null},"DialogOverlay")),T=(0,v.createSlot)("DialogOverlay.RemoveScroll"),j=r.forwardRef(w(function(e,r){let{__scopeDialog:a,...o}=e,n=S(R,a),l=(0,s.useDismissableLayerSurface)(),c=(0,i.useComposedRefs)(r,l);return(0,t.jsx)(g.RemoveScroll,{as:T,allowPinchZoom:!0,shards:[n.contentRef],children:(0,t.jsx)(p.Primitive.div,{"data-state":z(n.open),...o,ref:c,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),N="DialogContent",F=r.forwardRef(w(function(e,r){let a=D(N,e.__scopeDialog),{forceMount:i=a.forceMount,...o}=e,n=S(N,e.__scopeDialog);return(0,t.jsx)(d.Presence,{present:i||n.open,children:n.modal?(0,t.jsx)(L,{...o,ref:r}):(0,t.jsx)(U,{...o,ref:r})})},"DialogContent")),L=r.forwardRef(w(function(e,o){let n=S(N,e.__scopeDialog),l=r.useRef(null),s=(0,i.useComposedRefs)(o,n.contentRef,l);return r.useEffect(()=>{let e=l.current;if(e)return(0,h.hideOthers)(e)},[]),(0,t.jsx)(H,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:(0,a.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,a.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),U=r.forwardRef(w(function(e,a){let i=S(N,e.__scopeDialog),o=r.useRef(!1),n=r.useRef(!1);return(0,t.jsx)(H,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||i.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let r=t.target;i.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})},"DialogContentNonModal")),H=r.forwardRef(w(function(e,r){let{__scopeDialog:a,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:n,...l}=e,u=S(N,a);return(0,f.useFocusGuards)(),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(c.FocusScope,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:n,children:(0,t.jsx)(s.DismissableLayer,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionPresent?u.descriptionId:void 0,"aria-labelledby":u.titlePresent?u.titleId:void 0,"data-state":z(u.open),...l,ref:r,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})},"DialogContentImpl")),M=r.forwardRef(w(function(e,r){let{__scopeDialog:a,...i}=e,o=S("DialogTitle",a),{setTitleCount:n}=o;return(0,m.useLayoutEffect)(()=>(n(e=>e+1),()=>n(e=>e-1)),[n]),(0,t.jsx)(p.Primitive.h2,{id:o.titleId,...i,ref:r})},"DialogTitle")),V=r.forwardRef(w(function(e,r){let{__scopeDialog:a,...i}=e,o=S("DialogDescription",a),{setDescriptionCount:n}=o;return(0,m.useLayoutEffect)(()=>(n(e=>e+1),()=>n(e=>e-1)),[n]),(0,t.jsx)(p.Primitive.p,{id:o.descriptionId,...i,ref:r})},"DialogDescription")),$=r.forwardRef(w(function(e,r){let{__scopeDialog:i,...o}=e,n=S("DialogClose",i);return(0,t.jsx)(p.Primitive.button,{type:"button",...o,ref:r,onClick:(0,a.composeEventHandlers)(e.onClick,()=>n.onOpenChange(!1))})},"DialogClose"));function z(e){return e?"open":"closed"}w(z,"getState"),e.s(["Close",0,$,"Content",0,F,"Description",0,V,"Overlay",0,O,"Portal",0,_,"Root",0,C,"Title",0,M,"Trigger",0,P],396817);var B=e.i(226602),G=e.i(632137),K=e.i(877957),W=e.i(294237);e.i(368847);let J=(0,W.cva)("",{variants:{type:{overlay:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-overlay bg-black/50",content:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-overlay w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-white shadow-lg duration-200 sm:max-w-md p-6",header:"mb-4 text-center",footer:"mt-6 flex flex-col-reverse gap-2 text-center"}},defaultVariants:{type:"content"}});function X({...e}){return(0,t.jsx)(_,{"data-slot":"dialog-portal",...e})}function Y({className:e,...r}){return(0,t.jsx)(O,{"data-slot":"dialog-overlay",className:(0,G.cn)(J({type:"overlay"}),e),...r})}function Z({className:e,overlayClassName:r,children:a,showCloseButton:i=!0,...o}){return(0,t.jsxs)(X,{"data-slot":"dialog-portal",children:[(0,t.jsx)(Y,{className:r}),(0,t.jsxs)(F,{"data-slot":"dialog-content",className:(0,G.cn)(J({type:"content"}),e),...o,children:[a,i&&(0,t.jsxs)($,{className:"absolute top-4 right-4 cursor-pointer transition-opacity hover:opacity-70 focus:outline-none",children:[(0,t.jsx)(B.Close,{className:"h-5 w-5 text-black"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function q({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,G.cn)(J({type:"header"}),e),...r})}function Q({className:e,children:r,...a}){return(0,t.jsx)(M,{"data-slot":"dialog-title",className:(0,G.cn)("pt-4 text-center",e),...a,children:r})}function ee({className:e,children:r,...a}){return(0,t.jsx)(V,{"data-slot":"dialog-description",className:(0,G.cn)("pb-4 text-center",e),...a,children:r})}function et({primary:e,secondary:r,className:a}){return(0,t.jsxs)("div",{className:(0,G.cn)("flex flex-col-reverse gap-3",a),children:[r&&(0,t.jsx)(K.Button,{variant:"secondary",onClick:r.onClick,className:"w-full",children:r.label}),e&&(0,t.jsx)(K.Button,{variant:"default",onClick:e.onClick,className:"w-full",children:e.label})]})}e.s(["dialogStyles",0,J],634177),e.s(["BasicDialog",0,function({title:e,description:r,primaryAction:a,secondaryAction:i,showCloseButton:o=!0,className:n,children:l,...s}){return(0,t.jsxs)(Z,{showCloseButton:o,className:(0,G.cn)("p-6",n),...s,children:[(0,t.jsx)(q,{children:(0,t.jsx)(Q,{children:e})}),(0,t.jsx)(ee,{children:r}),l,(a||i)&&(0,t.jsx)(et,{primary:a,secondary:i})]})},"Dialog",0,function({...e}){return(0,t.jsx)(C,{"data-slot":"dialog",...e})},"DialogClose",0,function({...e}){return(0,t.jsx)($,{"data-slot":"dialog-close",...e})},"DialogContent",0,Z,"DialogDescription",0,ee,"DialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,G.cn)(J({type:"footer"}),e),...r})},"DialogHeader",0,q,"DialogOverlay",0,Y,"DialogPortal",0,X,"DialogTitle",0,Q,"DialogTrigger",0,function({...e}){return(0,t.jsx)(P,{"data-slot":"dialog-trigger",...e})}],367810)},438335,e=>{"use strict";var t=e.i(546584);let r=/^[a-z][a-z0-9+.-]*:\/\//i,a=/[?#]/,i=/\/{2,}/g,o=e=>{if(!e)return e;let t=e.match(r),o=t?t[0].length:0,n=e.slice(0,o),l=e.slice(o),s=l.search(a),c=-1===s?l:l.slice(0,s),u=-1===s?"":l.slice(s);return n+c.replace(i,"/")+u},n=/\/+$/;e.s(["getPublicProductionURL",0,e=>{let r=t.default.env.VERCEL_TARGET_ENV_PRODUCTION_URL??"weather.com",a=t.default.env.VERCEL_PROJECT_PRODUCTION_URL??"weather.com",i=`https://${r??a}`;return(i=i.replace(n,""),e)?o(new URL(e,i).toString()):i},"getPublicURL",0,e=>{let r,a=(t.default.env.VERCEL_TARGET_ENV??"production")?.toLowerCase(),i=t.default.env.VERCEL_BRANCH_URL??"wx-next-web-git-releasebranch2026-09-03.vercel.weather.com",l=t.default.env.VERCEL_TARGET_ENV_URL??"weather.com",s="true"===t.default.env.NEXT_DEV_SERVER_INSECURE||"true"===t.default.env.NEXT_PUBLIC_NEXT_DEV_SERVER_INSECURE;switch(a){case"preview":r=`https://${i}`;break;case"development":r=s?`http://${l}`:`https://${l}`;break;default:r=`https://${l}`}return(r=r.replace(n,""),e)?o(new URL(e,r).toString()):r}],438335)},611540,e=>{"use strict";e.i(438335);let t=(e,...t)=>{if(!e)return"";let[r={},a=!1]=t,i=Object.entries(r).reduce((e,[t,r])=>void 0===r?e:e.replaceAll(`{${t}}`,r),e);return a?i:"/en-US"===i?"/":i.replace("/en-US/","/")};e.s(["URLS",0,{BannerTextHref:"/subscribe/checkout?products=e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb&tpcc=mktg-{pageKey}-mainmenu-mobilebanner",activityHubCamping:"/{locale}/activity-hub/camping/{locId}",activityHubCycling:"/{locale}/activity-hub/cycling/{locId}",activityHubGardening:"/{locale}/activity-hub/gardening/{locId}",activityHubGolf:"/{locale}/activity-hub/golf/{locId}",activityHubHiking:"/{locale}/activity-hub/hiking/{locId}",activityHubPage:"/{locale}/activity-hub/{locId}",activityHubRunning:"/{locale}/activity-hub/running/{locId}",activityHubTennis:"/{locale}/activity-hub/tennis/{locId}",airQuality:"/{locale}/forecast/air-quality/l/{locId}",alertDetails:"/{locale}/weather/alerts/localalerts/l/{locId}",alerts:"/{locale}/weather/alerts/localalerts/l/{locId}",allergy:"/{locale}/forecast/allergy/l/{locId}",apps:"/{locale}/{collectionId}/{assetName}",article:"/{locale}/{collectionId}/news/{articleTitle}",atmosphere:"/atmosphere",betterDecisions:"/mission",boatBeach:"/{locale}/forecast/boat-beach/l/{locId}",breathing:"/{locale}/forecast/breathing/l/{locId}",callforcode:"/callforcode",christmasCountdown:"/forecast/christmas-countdown/l/{locId}",coldFlu:"/{locale}/forecast/cold-flu/l/{locId}",covid19:"/{locale}/coronavirus/l/{locId}",covid19map:"/{locale}/coronavirus/map/l/{locId}",dataDefinitions:"/{locale}/data-definitions",dataInventory:"/{locale}/data-inventory",dataPartners:"/{locale}/data-partners",dataRights:"/{locale}/data-rights",explore:"/explore",farming:"/{locale}/forecast/agriculture/l/{locId}",fishing:"/{locale}/forecast/fishing/l/{locId}",fiveday:"/{locale}/weather/5day/l/{locId}",flights:"/flights",forgotPassword:"/{locale}/forgot-password",goRun:"/{locale}/forecast/gorun/l/{locId}",grilling:"/home-garden/grilling",home:"/{locale}",homeGarden:"/home-garden",hourly:"/{locale}/weather/hourbyhour/l/{locId}",hurricane:"/{locale}/hurricane",hurricaneCentral:"/storms/hurricane-central",hurricaneHub:"/hurricane/ian-2022",hurricaneNicole:"/hurricane/nicole-2022",hurricaneRetro:"/hurricane/sandy-2012",interactiveMap:"/{locale}/weather/radar/interactive/l/{locId}",legal:"/{locale}/{collectionId}/{assetName}",maps:"/maps/{collectionId}",memberLogin:"/{locale}/login",memberSettings:"/{locale}/member/settings",memberSignup:"/{locale}/signup",memberSubscription:"/{locale}/member/subscription",memorialdayCountdown:"/forecast/memorial-day-countdown/l/{locId}",mlbCountdown:"/{locale}/forecast/opening-day-countdown/l/{locId}",monthly:"/{locale}/weather/monthly/l/{locId}",myDashboard:"/{locale}/mydashboard",news:"/news",newsletter:"/{locale}/newsletter",notification:"/{locale}/life/manage-notifications",pets:"/pets",precipitation:"/{locale}/precipitation/l/{locId}",premiumOnboarding:"/{locale}/premium/onboarding",privacyPolicy:"/{locale}/privacy/privacy-policy",privacyPolicyDirectory:"/{locale}/privacy-policy-directory",privacySettings:"/{locale}/privacy-settings",radar:"/{locale}/weather/radar/interactive/l/{locId}",recipes:"/home-garden/recipes",resetPassword:"/{locale}/reset-password",rss:"/rss",safetyIndex:"/safety/index",samsungWeatherConditions:"/{locale}/weather-conditions/l/{locId}",scienceEnvironment:"/science/environment",search:"/{locale}/search/enhancedlocalsearch",shop:"https://shop.weather.com/",ski:"/{locale}/forecast/ski/l/{locId}",skinHealth:"/health/skin-health",slideshows:"/{locale}/slideshows",spaceSkywatching:"/science/space",stormRadar:"//apps.apple.com/us/app/storm-radar-weather-tracker/id1216396545",stormRadarFeatures:"/storm-radar",subsBundles:"/subscribe/bundle",subscriptionPhase2:"/{locale}/subscribe/phase2",tenday:"/{locale}/weather/tenday/l/{locId}",termsOfUse:"/{locale}/privacy/terms-of-use",thanksgivingCountdown:"/forecast/thanksgiving-countdown/l/{locId}",today:"/{locale}/weather/today/l/{locId}",tornadoCentral:"/storms/tornado-central",travel:"/travel",unsubscribe:"/{locale}/life/alerts/unsubscribe",usForecast:"/maps/currentusweather",usHealth:"/maps/health/allergies/treepollen",usSatAndRadar:"/maps/ussatellitemap",usSevereAlerts:"/maps/severealerts",usTravel:"/maps/travel/airport-delays",userSubscription:"/{locale}/subscribe",video:"/{locale}/{collectionId}/video/{videoTitle}",weatherAsProviderExplainer:"https://theweathercompany.info/{locale}/partners",weekend:"/{locale}/weather/weekend/l/{locId}",worldSatellite:"/maps/satellite/caribbeanweathermap",wu:"//www.wunderground.com",yesterday:"//www.wunderground.com/history/daily/{locId}/yesterday"},"interpolateLocationUrl",0,(e,{locale:r,locId:a,featureId:i})=>t(e,{locale:r,locId:(i?.startsWith("address.")?void 0:i)??a}),"interpolateUrl",0,t],611540)},598513,e=>{"use strict";var t=e.i(947118),r=e.i(737801),a=e.i(592121);e.s(["useSendInteractionEvent",0,()=>{let e="interaction",i=(0,t.useIsInitialized)(),o=(0,r.useEventAttributes)();return(0,a.useCallback)((t,r={})=>{let a={...o,...t};if(!i)return void console.warn("MParticle is not initialized");try{if(window.mParticle?.logEvent?.(e,window.mParticle?.EventType?.Other,a),r.flushImmediately)try{window.mParticle?.upload?.()}catch{}console.debug(`MParticle: Event "${e}" tracked`,a)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}},[o,i])}])},269153,e=>{"use strict";var t=e.i(546446),r=e.i(763886),a=e.i(132084);e.s(["useIsSamsungPartner",0,function(){return(0,t.useAtomValue)(r.partnerAtom)===a.Partner.SAMSUNG}])},559421,e=>{"use strict";var t=e.i(961123),r=e.i(89887),a=e.i(64412),i=e.i(942400),o=e.i(269153),n=e.i(512134);e.i(388706),e.s(["useCanonicalBasePath",0,function(){let e=(0,t.useParams)(),l=(0,t.usePathname)(),{location:s}=(0,a.useLocation)(),c=(0,i.usePageLocale)(),u=(0,o.useIsSamsungPartner)();if(!(0,n.useIsClient)()||u)return;let d=e?.canonicalLocation,p=e?.featureId;if(!(d?.length||p&&!l.includes("/l/")))return;let f=s?.canonicalID;if(f)return(0,r.buildLocationCanonicalBase)(f,c);if(l.includes("/byFeatureId/"))return;let m=/\/day-\d+$/.test(l)?l.substring(0,l.lastIndexOf("/")):l;return m.substring(0,m.lastIndexOf("/"))}])},683199,e=>{"use strict";var t=e.i(592121),r=e.i(546446),a=e.i(491045),i=e.i(537989);e.s(["usePremiumSource",0,()=>{let e=(0,r.useSetAtom)(a.purchaseSourceAttributionAtom),o=(0,r.useAtomValue)(i.pageIdAtom);return(0,t.useCallback)(({sourceModule:t,sourceElement:r,sourceUpsellPlacement:a})=>{e({sourcePage:o||null,sourceModule:t,sourceElement:r,sourceUpsellPlacement:a??null})},[e,o])}])},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,a){var i;let o,n=(0,t.useStore)(a),l=(i=n,(o=r.get(i))||(o=new WeakSet,r.set(i,o)),o);for(let[t,...r]of e)(!l.has(t)||(null==a?void 0:a.dangerouslyForceHydrate))&&(l.add(t),n.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),a=(0,t.atom)(null);e.s(["activeEventAtom",0,a,"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),a=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let i=(0,a.useStore)(),o=(0,t.useRef)(e);o.current=e,(0,t.useEffect)(()=>{for(let[e,t]of o.current)i.get(e)!==t&&i.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),a=e.i(301904),i=e.i(901351),o=e.i(310847),n=e.i(528600),l=e.i(617874),s=e.i(864723),c=e.i(553329),u=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,n.useUser)();return{saveMapSettings:(0,u.useCallback)(async r=>{if(!t)return!1;let{error:a}=await (0,c.tryCatch)(i.upsxClient.preference.updateMapSettings(e,r));if(!a)return!0;if(a instanceof d.APIError&&404===a.code){let{error:t}=await (0,c.tryCatch)(i.upsxClient.preference.createMapSettings(e,r));return!t||(p.warn("Failed to create map settings",t),!1)}return p.warn("Failed to update map settings",a),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,n.useUser)(),[u,d]=(0,t.useAtom)(r.userPreferencesAtom),[p,f]=(0,t.useAtom)(o.wxuUserPreferenceAtom),m=async()=>{let{data:e,error:t}=await (0,c.tryCatch)(i.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:a,opacity:o,roadOverlay:n,style:l}=e,s={...void 0!==r&&{animationSpeed:r},...void 0!==a&&{autoplay:a},...void 0!==o&&{opacity:o},...void 0!==n&&{roadOverlay:n},...void 0!==l&&{style:l}};return Object.keys(s).length>0?s:null},g=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 a,i=(a={...u,...t},d(a),f({...p,...t,locations:a.locations}),a);if(t?.unit){let e=(0,l.unitsSystemByName)(t.unit),r=e?.code||"e";(0,s.setCookie)(l.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await g(i),{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(),m()]);if(!e?.userID)return null;let{mapSettings:r,...o}=e,n={...o,mapSettings:{...a.DEFAULT_MAP_SETTINGS,...t}};return h(n,!1),n}catch{return null}},updatePreferences:h}}],776169)},491045,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),a=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,a])},185312,(e,t,r)=>{t.exports=e.r(16129)},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 a=Number(t);if(!Number.isFinite(a))return!1;return Date.now()-at,"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])},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",()=>O,"ExperimentProvider",()=>T,"default",()=>N,"useExperimentContext",()=>j],742436);var t=e.i(546584),r=e.i(699173),a=e.i(592121),i=e.i(185312),o=e.i(333350),n=e.i(310847),l=e.i(546446),s=e.i(737801),c=e.i(688070),u=e.i(158662),d=e.i(528600),p=e.i(646341),f=e.i(553329);let m="production"!==t.default.env.VERCEL_TARGET_ENV,g=new Set;e.s(["getExposureVariantOverride",()=>k,"resetExposures",()=>A,"useExposure",()=>D],283366);var h=e.i(695881),v=e.i(358273);let y=(0,h.createLogger)("useExposure"),w="wxu-exp-exposed:",x=new Set,b=()=>{try{return(0,v.getMetricsSession)()?.sessionId||null}catch{return null}},E=e=>{try{let t=localStorage.getItem(w+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},I=(e,t)=>{try{for(let t=localStorage.length-1;t>=0;t--){let r=localStorage.key(t);r?.startsWith(w)&&r!==w+e&&localStorage.removeItem(r)}localStorage.setItem(w+e,JSON.stringify([...t]))}catch{}},S=e=>{if(0===x.size)return;let t=E(e);for(let e of x)t.add(e);I(e,t),x.clear()},C=e=>{let t=b();return t?(S(t),E(t).has(e)):x.has(e)},P=new Map;function k(e){return P.get(e)}function A(){x.clear(),P.clear();let e=b();if(e)try{localStorage.removeItem(w+e)}catch{}}function D(e,t){let r=void 0!==t,i=t?.variant,n=(0,a.useContext)(O);(0,a.useEffect)(()=>{if(!o.default||!n||C(e)||r&&void 0===i)return;let{client:t}=n;if(!t)return;let a=()=>{if(!C(e)){(e=>{let t=b();if(!t)return x.add(e);S(t);let r=E(t);r.add(e),I(t,r)})(e),void 0!==i&&P.set(e,i);try{t.exposure(e)}catch(e){y.error("Failed to track exposure:",e)}}};window.mParticle?.isInitialized?.()?a():window.mParticle?.ready?.(a)},[n,e,r,i])}let _="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",R="production"!==t.default.env.VERCEL_TARGET_ENV,O=(0,a.createContext)(null),T=({children:e,scriptSrc:t})=>{let h,v,y=(0,l.useAtomValue)(n.wxuUserAnonymousIdAtom),w=(h=(0,s.useEventAttributes)(),v=(0,l.useAtomValue)(c.isWebViewOnlyAtom),(0,a.useCallback)((e,t={})=>{if(v)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={...h,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)}},[h,v])),x=(0,l.useSetAtom)(u.experimentJoinListAtom),{user:b}=(0,d.useUser)(),[E,I]=(0,a.useState)(!1),[S,C]=(0,a.useState)(!1),[,P]=(0,a.useState)(0),D=(0,a.useRef)(void 0),T=(0,a.useRef)(void 0),j=(0,p.getCookie)("ANON_C")?.toString();D.current=b.userID||void 0,T.current=j||y;let N=(0,a.useRef)(new Set),F=(0,a.useCallback)(e=>{let t=k(e.flag_key),r=void 0!==t?{...e,variant:t}:e,a=`${r.flag_key}::${r.variant??""}`;N.current.has(a)||(N.current.add(a),w(r),function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){m&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){m&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let a=`${e.flag_key}::${e.variant??""}`;if(g.has(a)){m&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${a}`);return}g.add(a);let i={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:m?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,f.tryCatch)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i),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}`):m&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}({exposure:r,userId:D.current,deviceId:T.current}))},[w]),[L,U]=(0,a.useState)({});(0,a.useEffect)(()=>{if(o.default){let e=(0,p.getCookie)("amplitude-variants");if(e)try{let t=JSON.parse(e.toString());U(t),R&&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,a.useEffect)(()=>{0===Object.keys(L).length?x(null):x(JSON.stringify(Object.entries(L).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",a=Math.floor(Date.now()/1e3);return`${e},${r},${a}`})))},[L,x]);let H=function(e,t,r){let i=(0,a.useRef)(null),[n,l]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!n&&o.default&&_&&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;i.current=window.Experiment.initialize(_,{debug:R,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:t=>{try{e(t),R&&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"}),l(!0),R&&(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)}}},[n,t,e,r]),i.current}(F,E,L);return(0,a.useEffect)(()=>{(async()=>{if(!H)return;let e=(0,p.getCookie)("ANON_C")?.toString()||y;if(!e&&!b.userID){R&&console.debug("[Experiment] No user identifier available"),C(!0);return}let t={device_id:e,...b.userID?{user_id:b.userID}:{},user_properties:{}};R&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await H.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{C(!0)}})()},[H,y,b.userID]),(0,a.useEffect)(()=>{N.current.clear(),g.clear(),A(),P(e=>e+1)},[b.userID]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{src:t,strategy:"afterInteractive",onLoad:()=>{I(!0),R&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(O.Provider,{value:{client:H,variant:(e,t)=>{if(!H)return t;let r=H.variant(e,t);return R&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!H)return Promise.resolve();if(!e){let e=(0,p.getCookie)("ANON_C")?.toString()||y;if(e||b.userID){let t={device_id:e,...b.userID?{user_id:b.userID}:{},user_properties:{}};return H.fetch(t)}}return H.fetch(e)},isFetchComplete:S},children:e})]})},j=()=>{let e=(0,a.useContext)(O);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},N=T},436028,e=>{"use strict";e.s(["hasLength",0,e=>Array.isArray(e)&&e.length>0])}]);