(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,590238,e=>{"use strict";var t=e.i(537989),i=e.i(827049),r=e.i(695203),n=e.i(604323),a=e.i(797770),o=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,o.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[i.pageLocaleAtom,e.pageLocale],[r.deviceClassAtom,e.deviceClass],[n.metricsArticleDataAtom,e.metricsArticleData],[a.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},86773,e=>{"use strict";var t=e.i(155252),i=e.i(206507);e.s(["default",0,function({candidate:e,failedMessage:r="Authentication failed. Please try again.",protectMessage:n="Remove your adblocker.",fetch:a,refresh:o,getCustomAccountInfo:s}){let[l,c]=(0,i.useState)(""),[u,d]=(0,i.useState)(!1),[m,f]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!1),g=(0,i.useRef)([]);(0,i.useEffect)(()=>{e.id!==g.current[0]&&(g.current=[e.id],e.transactIDs&&g.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let b=(0,i.useCallback)(()=>{try{a("/?adm_get_token=1").then(e=>{e.ok&&o()}).catch(()=>{c(r)})}catch{c(r)}},[a,r,o]),w=(0,i.useMemo)(()=>"u">typeof window?window:{admiral:{}},[]);return(0,i.useEffect)(()=>{typeof window>"u"||(w.admiral=w.admiral||function(...e){(w.admiral.q=w.admiral.q||[]).push(e)},w.admiral("after","measure.detected",function(t){if("abr"==e.requirement)t.adblocking?(c(n),d(!0)):p(!0);else if("account"==e.requirement||"benefits"==e.requirement){let t=!!s;w.admiral("after","visitor.latest",function(i){var r;if("account"===e.requirement)(t?s().registered:i.status.registered)||m||(c(n),d(!0));else if("benefits"===e.requirement){let i=[];if(t)i=s().benefits;else{let e=document.cookie.split(";");e&&(i=(null==(r=e.find(e=>e.startsWith("admbenefits=")))?void 0:r.split(","))??[])}if(i){let t=e.benefits??[];if(0==t.length)return void p(!0);let r=!1;for(let e of t)i.includes(e)&&(r=!0);r?p(!0):(c(n),d(!0))}else c(n),d(!0)}})}}))},[]),(0,i.useEffect)(()=>{h&&(p(!1),b())},[h,b]),(0,i.useEffect)(()=>{m||!u||(f(!0),w.admiral("targeting","force",{candidateIDs:g.current}))},[m,u,g,w]),(0,t.jsxs)("div",{children:[l||null," "]})}])},18358,e=>{"use strict";var t=e.i(947118),i=e.i(737801),r=e.i(206507);e.s(["useTrackEvent",0,()=>{let e=(0,t.useIsInitialized)(),n=(0,i.useEventAttributes)(),a=(0,r.useCallback)((t,i={})=>{let r={...n,...i};if(!e)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(t,window.mParticle.EventType.Other,r),console.debug(`MParticle: Event "${t}" tracked`,r)}catch(e){console.error(`MParticle: Event "${t}" failed`,e)}return a},[n,e]);return a}])},899507,e=>{"use strict";e.s(["isNil",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["isPrimitive",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["isTypedArray",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["isUnsafeProperty",0,function(e){return"__proto__"===e}],355200)},370220,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getEmailPreferencesStatusUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/status"}},i.getEmailPreferencesSetUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/set"}},i.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/change-email"}};let r="weather.com"},454307,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.setEmailPreferences=o,i.updateSubscription=s;let r=e.r(678651),n=e.r(414655),a=e.r(370220);async function o(e){let t=(0,a.getEmailPreferencesSetUrlConfig)(),i=(0,r.urlFrom)(t),o=JSON.stringify(function(e){let{subscriptions:t,email:i,mParticleId:r}=e,n={};return t&&(n.subscriptions=t),i&&(n.email=i),r&&(n.mParticleId=r),n}(e)),s=await fetch(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:o});return 200===s.status||400===s.status?await s.json():(0,n.handleFetchResponse)(s)}async function s(e,t,i){return o({subscriptions:[{subscriptionGroupName:e,isSubscribed:t,...i&&{attributes:i}}]})}},451086,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getEmailPreferencesStatus=o;let r=e.r(678651),n=e.r(414655),a=e.r(370220);async function o(){let e=(0,a.getEmailPreferencesStatusUrlConfig)(),t=(0,r.urlFrom)(e),i=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,n.handleFetchResponse)(i)}},952582,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_SUBSCRIPTIONS=i.ON_YOUR_RADAR_GROUP=i.MARKETING_EMAILS_GROUP=i.WEEKLY_BRIEF_GROUP=i.DAILY_NEWSLETTERS_GROUP=void 0,i.DAILY_NEWSLETTERS_GROUP="daily-newsletters-1",i.WEEKLY_BRIEF_GROUP="weekly-brief",i.MARKETING_EMAILS_GROUP="marketing-emails-1",i.ON_YOUR_RADAR_GROUP="on-your-radar",i.DEFAULT_SUBSCRIPTIONS=[{subscriptionGroupName:i.DAILY_NEWSLETTERS_GROUP,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:i.WEEKLY_BRIEF_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:i.MARKETING_EMAILS_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:i.ON_YOUR_RADAR_GROUP,subscriptionGroupId:"",isSubscribed:!1}]},422825,e=>{"use strict";var t=e.i(546446),i=e.i(381477),r=e.i(899507),n=e.i(449928),a=e.i(760430);function o(e){if((0,n.isPrimitive)(e))return e;if(Array.isArray(e)||(0,a.isTypedArray)(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){let t=new i(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let t=new i(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}var s=e.i(355200);function l(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t,i){let r=Object.keys(t);for(let n=0;n"boolean"==typeof e?{isSubscribed:e}:e;e.s(["useEmailPreferences",0,(e=!1)=>{let[n,a]=(0,t.useAtom)(m),{user:s}=(0,f.useUser)(),w=(0,g.useSubscriptionsEnabled)()||e,y=s?.userID||null,v=s?.isUserLoggedIn||!1,I=(0,p.useCallback)(e=>{if(y){var t;let i,r;a({userId:y,expiry:Date.now()+9e5,subscriptions:(t=n?.subscriptions,i=t?.length?t:h.DEFAULT_SUBSCRIPTIONS,r={},e?(i?.forEach(e=>{r[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=r[e.subscriptionGroupName]||{};r[e.subscriptionGroupName]=c(o(t),e,function e(t,i){if(Array.isArray(i))if(Array.isArray(t))return c(o(t),i,e);else return c([],i,e);if(l(i))if(l(t))return c(o(t),i,e);else return c({},i,e)})}),Object.values(r)):i)})}},[y,a,n?.subscriptions]),x=n&&n.userId===y&&n.expiry&&n.expiry>Date.now(),A=w&&y&&v&&!x,{isLoading:P}=(0,i.default)(A?`getEmailPreferencesStatus/${y}`:void 0,d.getEmailPreferencesStatus,{shouldRetryOnError:e=>!(e instanceof Error&&e.message.includes("401")),revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{y&&e&&I(e.subscriptions)}}),k=(0,p.useCallback)(async(e,t)=>{if(!w)return{status:"error",error:"Subscription is not enabled!"};let i=await (0,u.setEmailPreferences)({subscriptions:e,email:v?void 0:t});return"success"===i.status&&I(e),i},[I,w,v,n?.subscriptions]),j=(0,p.useCallback)(async({newsletter:e,weekly:t,onYourRadar:i,marketing:n})=>{let a=[!(0,r.isNil)(e)&&{subscriptionGroupName:"daily-newsletters-1",...b(e)},!(0,r.isNil)(t)&&{subscriptionGroupName:"weekly-brief",...b(t)},!(0,r.isNil)(i)&&{subscriptionGroupName:"on-your-radar",...b(i)},!(0,r.isNil)(n)&&{subscriptionGroupName:"marketing-emails-1",...b(n)}].filter(Boolean);return await k(a)},[k]);return{emailSubscriptions:y&&n?n.subscriptions:null,updateEmailSubscriptions:j,updateEmailPreference:k,isLoadingPreferences:P}}],422825)},143851,e=>{"use strict";var t=e.i(546446),i=e.i(897892),r=e.i(45846),n=e.i(310847),a=e.i(776169),o=e.i(671525),s=e.i(206507),l=e.i(947118),c=e.i(491240),u=e.i(18358),d=e.i(521350),m=e.i(391174),f=e.i(358273);e.s(["useUserLogin",0,function(){let e,h,p=(0,t.useSetAtom)(n.userHasLoggedInBeforeAtom),g=(0,t.useAtomValue)(n.wxuLoginRedirectPageAtom),b=(0,t.useAtomValue)(n.wxuUserAnonymousIdAtom),w=(0,i.useGetCookie)(),{syncPreferencesFromUpsx:y,updatePreferences:v}=(0,a.usePreferences)(),{navigate:I}=(0,o.default)(),{login:x}=(e=(0,l.useIsInitialized)(),h=(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let i={userIdentities:{customerid:t.customerid,email:t.email,other:(0,c.truncateIdentityValue)(t.other)}};return window.mParticle?.Identity?.identify?.(i)},[e]),{identify:h,login:(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let i={userIdentities:{customerid:t.customerid,email:t.email,facebook:t.facebook,facebookcustomaudienceid:t.facebookcustomaudienceid,google:t.google,microsoft:t.microsoft,other:(0,c.truncateIdentityValue)(t.other),other2:(0,c.truncateIdentityValue)(t.other2),other3:(0,c.truncateIdentityValue)(t.other3),other4:(0,c.truncateIdentityValue)(t.other4),twitter:t.twitter,yahoo:t.yahoo}};return window.mParticle?.Identity?.login?.(i)},[e]),logout:(0,s.useCallback)(()=>e?window.mParticle?.Identity?.logout?.({userIdentities:{}}):(console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"))),[e])}),A=(0,u.useTrackEvent)(),P=async()=>{try{if(w("premium"))return null;return await r.upsxClient.purchase.getPurchaseToken(),!0}catch(e){return console.error("Failed to get UPSX token:",e),!1}},k=()=>{(0,f.regenerateMetricsSession)();let e=new URLSearchParams(window.location.search).get("ref");I((e&&`https://${e}`)??g)},j=async(e,t=!0)=>{(0,m.invalidateUpsxCache)(),(0,d.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),p(!0),await y()||await v({}),P(),e?.userID&&(x({email:e.email,customerid:e.userID,other:b}),A("login"===e.type?"user-loggedin":"signup-complete",{url:window.location.pathname})),t&&k()};return{login:async(e,t)=>{try{let i=await r.upsxClient.auth.login({email:e,password:t});return i&&await j({email:i.email,userID:i.userID,type:"login"}),!0}catch(e){return console.error("Failed to login",e),!1}},authSuccess:j,authRedirect:k}}],143851)},855602,e=>{"use strict";var t=e.i(155252),i=e.i(206507),r=e.i(1567),n=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:a,moduleKey:o,variant:s="frontend",children:l})=>{let c=(0,i.useRef)(null),[u,d]=(0,i.useState)(!1),m=(0,i.useRef)(null),f=(0,r.useTrackModuleViewed)();return"admin"===s?(0,t.jsx)(t.Fragment,{children:l}):((0,i.useEffect)(()=>{if(u||!n.default||!c.current)return;let t=c.current,i=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?m.current||(m.current=setTimeout(()=>{f({moduleId:e,modulePosition:a}),d(!0),m.current=null},2e3)):m.current&&(clearTimeout(m.current),m.current=null)})},{threshold:1});i.observe(t);let r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return r.top>=0&&r.left>=0&&r.bottom{f({moduleId:e,modulePosition:a}),d(!0),m.current=null},2e3)),()=>{m.current&&clearTimeout(m.current),i.disconnect()}},[u,e,a,f]),(0,t.jsx)("div",{ref:c,className:"hide-empty","data-module-id":e,"data-module-key":o,"data-item-position":a,children:l}))}])},670279,e=>{"use strict";var t=e.i(155252),i=e.i(206507),r=e.i(585683),n=e.i(204782);let a=({pageTemplate:e,pageDashboard:a})=>{let o=(0,n.default)();return((0,i.useEffect)(()=>{o&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),a&&window._newsroom.push({pageDashboard:a}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[o,e,a]),o&&e)?(0,t.jsx)(r.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"afterInteractive",id:"newsroom_loader_script"}):null};e.s(["Newsroom",0,a,"default",0,a])},703123,e=>{"use strict";let t=(0,e.i(981030).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(571195);var t=e.i(155252),i=e.i(206507),r=e.i(585683),n=e.i(546446),a=e.i(981851),o=e.i(671525),s=e.i(901351),l=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),m=e.i(703123),f=e.i(404893),h=e.i(367810),p=e.i(792461);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:g=!0,isUserLoggedIn:b}){let w=(0,a.useTranslations)("GoogleLogin"),y=(0,n.useSetAtom)(f.googleLoginInitilizedAtom),{loginWithGoogle:v,error:I,clearError:x}=function(){let e=(0,a.useTranslations)("GoogleLogin"),[t,r]=(0,i.useState)(null),f=(0,n.useSetAtom)(l.userHasLoggedInBeforeAtom),h=(0,n.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:p}=(0,u.useEmailPreferences)(),{refresh:g}=(0,o.usePageNavigation)(),{syncPreferencesFromUpsx:b}=(0,c.usePreferences)(),{authSuccess:w,authRedirect:y}=(0,d.useUserLogin)();return{loginWithGoogle:(0,i.useCallback)(async t=>{let{credential:i}=t;r(null);try{let e=await s.upsxClient.auth.loginWithGoogle({google_id_token:i}),t=e?.isFirstLogin;await w({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:r,weekly:n,onYourRadar:a,marketing:o,alwaysSubscribe:l}=h||{};return(t||l)&&await p({newsletter:r,weekly:n,onYourRadar:a,marketing:o}).catch(e=>{console.error("Failed to update email subscriptions",e)}),y(),!0}catch(t){console.error("Failed to login with Google",t);try{let i=t?.data,n=i?.messageCode;if(!n)throw Error("No Error Message");switch(n){case 1e3:case 1026:case 1033:r({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:r({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){r({header:e("somethingWentWrong")})}return!1}},[f,b,g,w,y,p,h]),error:t,clearError:(0,i.useCallback)(()=>{r(null)},[])}}(),A=(0,p.useRefMemo)(v),P=(0,i.useRef)(null);I&&(P.current=I);let k=P.current;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{A.current?.(e)}}),y(!0)),e?.(),!b&&g&&t?.prompt()},id:"google-gsi-script"}),k&&(0,t.jsx)(h.Dialog,{open:!!I,onOpenChange:e=>!e&&x(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:k.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:k.body||""}}),primaryAction:{label:w("cancel"),onClick:x}})})]})}],874905)},499746,e=>{"use strict";var t=e.i(155252),i=e.i(206507),r=e.i(546446);e.i(304158);var n=e.i(485737),a=e.i(65816),o=e.i(145651),s=e.i(249725),l=e.i(663333),c=e.i(147732),u=e.i(381477),d=e.i(240058),m=e.i(316078),f=e.i(180193),h=e.i(368847),p=e.i(889951),g=e.i(343277),b=e.i(726249),w=e.i(674885),y=e.i(617874),v=e.i(184154),I=e.i(693796),x=e.i(526456),A=e.i(525936);let P=({identifier:e})=>{let n=(0,v.useParams)(),a=n?.locale||"en-US",o=(0,r.useAtomValue)(w.userUnitPreferenceAtom),l=(0,y.unitsSystemByName)(o)?.code,{fromLocationPoint:c}=(0,I.useLocationData)(),{recordFeatureId:P}=(0,s.useLocationFeatureIds)(),k=e.placeId?(0,b.pointKey)({kind:"placeId",value:e.placeId},a):e.geocode?(0,b.pointKey)({kind:"geocode",value:e.geocode},a):null,{data:j,isLoading:E}=(0,u.default)(k,()=>e.placeId?(0,g.getLocationPointByPlaceId)(e.placeId,a):e.geocode?(0,g.getLocationPointByGeocode)((0,b.formatGeocode)(e.geocode),a):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),S=e.placeId?void 0:e.geocode,N=j?c(j,S):void 0;(0,i.useEffect)(()=>{let e=j?.location;e?.placeId&&P({placeId:e.placeId,geocode:S??`${e.latitude},${e.longitude}`},e.featureId??null)},[j,S,P]);let{data:_,isLoading:C}=(0,u.default)(N&&["currentObservations",N.geocode,l,a],([e,t,i,r])=>(0,p.getCurrentObservations)({geocode:t,units:i,language:r}),{revalidateOnFocus:!1,dedupingInterval:6e4}),R=j?.location?.placeId??e.placeId,{path:L,isGeolocationLoading:G}=(0,A.default)(R||"",{targetGeocode:N?.geocode??e.geocode}),O=E||C||!N||G,U=_?.temperature,T=_?.wxPhraseLong,M=_?.iconCode??-1,D=e.name||N?.name||N?.city||N?.displayName,B=(0,t.jsxs)("div",{className:"default-hover-box-shadow box-border w-fit max-w-90 cursor-pointer rounded-2xl border border-[#0000001a] transition-[box-shadow,border] hover:border-transparent","aria-label":D?`${D} weather`:"Location weather",children:[(0,t.jsxs)("div",{className:"flex h-16 flex-col justify-center px-3 md:hidden",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)(h.default,{isLoading:O,skeletonClassName:"h-5 w-28",className:"flex items-center leading-[1.4] font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(x.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:D})]}),(0,t.jsx)(m.WxIcon,{isLoading:O,loadingIconClassName:"h-6 w-6 shrink-0",iconCode:M,className:"h-6 w-6 shrink-0","aria-hidden":"true",iconTheme:"lightBG"})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-4 w-6 shrink-0",className:"shrink-0 text-sm leading-normal",color:"secondary",children:(0,t.jsx)(f.Temperature,{value:U})})," ",(O||T)&&(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-4 w-22",color:"secondary",className:"truncate text-sm leading-normal",children:T})]})]}),(0,t.jsxs)("div",{className:"hidden h-20 items-center px-3 pl-4 md:flex",children:[(0,t.jsxs)("div",{className:"mr-2 flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsxs)(h.default,{isLoading:O,skeletonClassName:"h-5 w-28",className:"flex items-center text-xl leading-normal font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(x.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:D})]}),(O||T)&&(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-4 w-24",color:"secondary",className:"truncate text-sm leading-normal",children:T})]}),(0,t.jsx)(m.WxIcon,{isLoading:O,loadingIconClassName:"mr-1 h-12 w-12 shrink-0",iconCode:M,className:"mr-1 h-12 w-12 shrink-0","aria-hidden":"true",iconTheme:"lightBG"}),(0,t.jsx)(h.default,{isLoading:O,skeletonClassName:"h-8 w-12 shrink-0",className:"shrink-0 text-[40px] leading-none font-extrabold",children:(0,t.jsx)(f.Temperature,{value:U})})]})]});return L?(0,t.jsx)(d.default,{href:L,className:"no-underline md:block md:w-full",children:B}):B};var k=e.i(523084),j=e.i(47524),E=e.i(632137);let S={left:k.ChevronLeft,right:j.ChevronRight},N=({buttonClassName:e,containerClassName:r,onClick:n,tabIndex:a,direction:o,...s})=>{let[l,c]=(0,i.useState)(!1),u=S[o];return(0,t.jsx)("div",{className:(0,E.cn)("absolute",r),children:(0,t.jsx)("button",{className:(0,E.cn)("group/scroll-button absolute flex h-11 w-11 transform-[translate(-50%,-50%)] cursor-pointer items-center justify-center rounded-full bg-black opacity-80 transition-[opacity,height,width] duration-75 ease-linear hover:h-12 hover:w-12 hover:opacity-100",l&&"!h-11 !w-11"),onClick:()=>{c(!0),setTimeout(()=>c(!1),75),n?.()},tabIndex:a,...s,children:(0,t.jsx)(u,{className:(0,E.cn)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",l&&"!h-6 !w-6")})})})},_=({locationIdentifiers:e,showScrollButtons:r})=>{let[n,a]=(0,i.useState)(!1),[o,s]=(0,i.useState)(!1),l=(0,i.useRef)(null),u=(0,i.useRef)(null),d=(0,i.useRef)(!1),m=(0,i.useCallback)(()=>{let e=l.current;if(!e||!r){a(!1),s(!1);return}let{scrollLeft:t,offsetWidth:i,scrollWidth:n}=e,o=Math.abs(t),c=o>0,u=o+i(0,c.debounce)(m,150),[m]);(0,i.useEffect)(()=>{let e=l.current;return e&&(d.current="rtl"===getComputedStyle(e).direction),m(),window.addEventListener("resize",f),()=>{null!==u.current&&cancelAnimationFrame(u.current),f.cancel(),window.removeEventListener("resize",f)}},[m,f]);let h=(0,i.useCallback)(()=>{null===u.current&&(u.current=requestAnimationFrame(()=>{m(),u.current=null}))},[m]),p=(0,i.useCallback)(()=>{l.current?.scrollBy({left:-200,behavior:"smooth"})},[]),g=(0,i.useCallback)(()=>{l.current?.scrollBy({left:200,behavior:"smooth"})},[]);return 0===e.length?null:(0,t.jsxs)("div",{className:"relative -mt-2 -mb-4 overflow-hidden",children:[r&&(0,t.jsx)(N,{containerClassName:(0,E.cn)("absolute top-[50%] -left-14.5 transition-[left] md:-left-13.5",{"left-9.5 md:left-11":n}),onClick:p,tabIndex:n?0:-1,"aria-hidden":!n,"aria-label":"Scroll left",direction:"left"}),(0,t.jsx)("div",{className:"scrollbar-hide flex gap-2 overflow-x-auto p-4 py-6",role:"list","data-testid":"forecast-module",onScroll:h,ref:l,children:e.map((e,i)=>(0,t.jsx)("div",{role:"listitem",children:(0,t.jsx)(P,{identifier:e})},e.placeId??e.geocode??i))}),r&&(0,t.jsx)(N,{containerClassName:(0,E.cn)("absolute top-[50%] -right-14.5 transition-[right] md:-right-13.5",{"right-9.5 md:right-11":o}),onClick:g,tabIndex:o?0:-1,"aria-hidden":!o,"aria-label":"Scroll right",direction:"right"})]})},C=()=>{let e,c,u=(e=(0,a.useHtml5Geocode)(),c=(0,r.useAtomValue)(n.geoipGeocode),e||c||void 0),{favoriteLocations:d,recentLocations:m}=(0,o.default)(),{resolveFeatureId:f}=(0,s.useLocationFeatureIds)(),h=(0,r.useAtomValue)(l.deviceClassAtom),p=(0,i.useMemo)(()=>(function({detectedGeocode:e,favoriteLocations:t,recentLocations:i,resolveFeatureId:r}){let n=[],a=new Set,o=e=>{let t=[];if(e.featureId?t.push(`f:${e.featureId}`):(e.placeId&&t.push(`p:${e.placeId}`),e.geocode&&t.push(`g:${(0,b.formatGeocode)(e.geocode)}`)),0===t.length)return!0;let i=t.some(e=>a.has(e));for(let e of t)a.add(e);return!i};if(e){let t=(0,b.formatGeocode)(e);o({featureId:r({geocode:t}),geocode:t}),n.push({geocode:t,isGeoIPLocation:!0})}for(let e of t){if(n.length>=5)break;if(!e.coordinate)continue;let t=(0,b.formatGeocode)(e.coordinate),i=e.placeID??void 0;o({featureId:r({placeId:i,geocode:t}),placeId:i,geocode:t})&&n.push({geocode:t,placeId:i,name:e.name??void 0})}for(let e of i){if(n.length>=5)break;o({featureId:r({placeId:e}),placeId:e})&&n.push({placeId:e})}return n})({detectedGeocode:u,favoriteLocations:d,recentLocations:m,resolveFeatureId:f}),[u,d,m,f]);return 0===p.length?null:(0,t.jsx)(_,{locationIdentifiers:p,showScrollButtons:"mobile"!==h&&"tablet"!==h})};e.s(["ForecastModule",0,C,"default",0,C],499746)},711899,e=>{e.v(t=>Promise.all(["static/chunks/0ods0-bjat5jt.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/2pz2-5xjnibsl.js"].map(t=>e.l(t))).then(()=>t(72990)))},467814,e=>{e.v(t=>Promise.all(["static/chunks/2erl34w6o_is1.css","static/chunks/3usoy2b81pb90.js","static/chunks/31prg3gkhi6in.js","static/chunks/3rm_nwiiv1nec.js","static/chunks/3ez2p7_irinam.js","static/chunks/13vjo3reaalnh.js"].map(t=>e.l(t))).then(()=>t(469120)))}]);