(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,778828,e=>{"use strict";var a=e.i(902875),t=e.i(632137),n=e.i(240058),r=e.i(247865),s=e.i(581014),l=e.i(546446),i=e.i(877957),o=e.i(616448),d=e.i(526456),c=e.i(527207),u=e.i(498076);let m=({animationStrings:e})=>(0,a.jsx)(a.Fragment,{children:e.map(e=>(0,a.jsx)("span",{"data-nosnippet":!0,className:(0,t.cn)("animate-pulse","bg-gray-200","text-transparent","rounded-sm","box-decoration-clone"),children:e},e))});var h=e.i(436066);e.i(24959);var x=e.i(686557),p=e.i(64412),f=e.i(262453),g=e.i(214008);let b="bg-gray-900 text-white hover:bg-[#3A3938] active:bg-[#0C0B0B] focus-visible:ring-2 focus-visible:ring-blue-500";function v({locale:e,className:n,elevated:j=!1}){let y=(0,s.useTranslations)("Header"),w=(0,u.useIsMobile)(),N=(0,r.useRef)(null),k=(0,f.usePreciseGeocode)(),{location:S}=(0,p.useLocation)(),{location:A}=(0,p.useLocation)("geolocation"),C=S?.name||S?.city||S?.displayName,L=(0,g.isSameLocation)(S,A),[U,E]=(0,l.useAtom)(h.locationPickerOpenAtom),R=(0,r.useCallback)(()=>{E(!U)},[E,U]);return(0,r.useEffect)(()=>{if(!U||w)return;let e=e=>{N.current&&!N.current.contains(e.target)&&E(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[U,w,E]),(0,r.useEffect)(()=>{if(!U)return;let e=e=>{"Escape"===e.key&&E(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[U,E]),(0,a.jsxs)("div",{ref:N,className:(0,t.cn)("relative max-md:mr-auto",n),children:[(0,a.jsx)("div",{className:(0,t.cn)("rounded-4xl bg-white md:rounded-full md:bg-white/66 md:p-1 md:backdrop-blur-[16px] md:backdrop-saturate-[1.8] md:transition-shadow md:duration-200",j&&"md:shadow-[0_2px_8px_0_rgba(0,0,0,0.16)]"),children:(0,a.jsxs)(i.Button,{type:"button",variant:"ghostUI",onClick:R,"aria-expanded":U,"aria-haspopup":"dialog","aria-label":C??y("searchPlaceholderText"),"data-state":U?"open":"closed","data-testid":"location-picker-trigger",className:(0,t.cn)("inline-flex h-10 items-center justify-center gap-2 rounded-3xl px-3 py-0 text-sm font-bold transition-colors md:rounded-full md:ps-4 md:pe-3 md:font-medium","focus-visible:ring-offset-0 focus-visible:outline-none",b),children:[L&&k?(0,a.jsx)(d.CurrentLocationFilled,{className:"size-3 shrink-0 text-white","aria-hidden":"true",title:""}):L&&!k?(0,a.jsx)(o.CurrentLocation,{className:"size-3 shrink-0 text-white","aria-hidden":"true",title:""}):null,(0,a.jsx)("span",{className:"max-w-[140px] truncate md:max-w-[160px]",children:C||(0,a.jsx)(m,{animationStrings:["Location"]})}),(0,a.jsx)(c.ChevronUp,{className:(0,t.cn)("size-3 shrink-0 text-white transition-transform duration-150 md:size-3.5",!U&&"rotate-180"),"aria-hidden":"true",title:""})]})}),(0,a.jsx)("div",{className:(0,t.cn)(!w&&"absolute start-0 top-full z-110 mt-3 w-[400px]"),children:(0,a.jsx)(x.Search,{locale:e,open:U,onOpenChange:E})})]})}var j=e.i(559421),y=e.i(528600),w=e.i(731672),N=e.i(792461),k=e.i(190344),S=e.i(296990),A=e.i(674885),C=e.i(336726),L=e.i(725287),U=e.i(357508),E=e.i(942400);e.i(647872);var R=e.i(928083),_=e.i(598513),P=e.i(993269),M=e.i(859827),H=e.i(449172),z=e.i(316810);let I=({url:e,action:r,name:s,isNew:l,isExternal:i,isInGroup:o,onClick:d,sourceModule:c,sourceElement:u,modulePosition:m})=>{if(!e&&!r)return null;let h=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"relative flex items-center",children:[s,l&&(0,a.jsx)(z.default,{})]}),i&&(0,a.jsx)(H.ExternalLink,{size:"sm","data-testid":"external-link-icon"})]}),x=(0,t.cn)("group flex items-center gap-1 text-gray-700 hover:text-blue-600 py-2.5",o?"px-10":"px-6");return(0,a.jsx)("li",{className:o?"border-b border-[rgba(37,36,34,0.10)]":"",children:e?(0,a.jsx)(n.default,{href:e,className:x,target:i?"_blank":void 0,onClick:d,sourceModule:c,sourceElement:u,"data-module-key":m,children:h}):(0,a.jsx)("button",{onClick:r,className:(0,t.cn)(x,"cursor-pointer"),children:h})},s)},T=({isExpanded:e,toggleCategory:n,name:r,links:s,isNew:l})=>(0,a.jsxs)("div",{className:"w-full md:mb-6",children:[(0,a.jsx)("h2",{className:"contents",children:(0,a.jsxs)("button",{type:"button",onClick:n,"aria-expanded":!!e,"aria-label":`Toggle ${r} category`,className:(0,t.cn)("flex w-full cursor-pointer items-center justify-between px-6 py-2.5 text-left md:cursor-default","focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:outline-none"),children:[(0,a.jsxs)("span",{className:"relative flex items-center",children:[(0,a.jsx)("span",{className:"text-gray-900 md:font-bold",children:r}),l&&(0,a.jsx)(z.default,{})]}),(0,a.jsx)("span",{"aria-hidden":"true",children:e?(0,a.jsx)(P.Minus,{size:"md",className:"text-black"}):(0,a.jsx)(M.Plus,{size:"md",className:"text-black"})})]})}),(0,a.jsx)("ul",{className:(0,t.cn)("bg-[#ebecee] md:space-y-2",!e&&"hidden"),children:s.map(e=>(0,a.jsx)(I,{sourceModule:"header-nav",sourceElement:e.name,...e,isInGroup:!0},e.name))})]},r);var B=e.i(611540),O=e.i(304116),D=e.i(269153);let K=[{titleKey:"running",urlKey:"activityHubRunning"},{titleKey:"camping",urlKey:"activityHubCamping"},{titleKey:"hiking",urlKey:"activityHubHiking"},{titleKey:"golf",urlKey:"activityHubGolf"},{titleKey:"cycling",urlKey:"activityHubCycling"},{titleKey:"gardening",urlKey:"activityHubGardening"},{titleKey:"tennis",urlKey:"activityHubTennis"}],F={running:"running",camping:"camping",hiking:"hiking",golf:"golf",cycling:"cycling",gardening:"gardening",tennis:"tennis-pickleball"},G=(0,r.forwardRef)((e,n)=>{let[o,d]=(0,l.useAtom)(h.settingsMenuOpenAtom),m=(0,l.useAtomValue)(A.isImperialUnitsAtom),x=(0,L.useParams)(),f=(x?.locale||"en-US").split("-")[1],{location:g}=(0,p.useLocation)(),b=(0,j.useCanonicalBasePath)(),{user:{isUserLoggedIn:v}}=(0,y.useUser)(),P=(0,w.useUserLogout)(),M=(0,N.useRefMemo)(P),H=g?.placeId||"",z=g?.featureId,I=g?.canonicalID,G=(0,D.useIsSamsungPartner)(),V=(0,E.usePageLocale)(),q=(0,l.useAtomValue)(R.activityHubMenuEnabledAtom),W=(0,u.useIsMobile)(),$=(0,_.useSendInteractionEvent)(),Q=(0,s.useTranslations)("SidebarNavigation"),Y=(0,s.useTranslations)("ActivityHubDriver"),Z=(0,s.useTranslations)("UserRegistration"),J=(0,k.useVideoNavUrl)(),[X,ee]=(0,r.useState)({}),ea=(0,r.useCallback)(e=>(0,O.buildLocationPageHref)({pageType:e,locale:V,canonicalBasePath:b,canonicalID:I,featureId:z,placeId:H,skipCanonical:G}),[V,b,I,z,H,G]),et=(0,r.useMemo)(()=>[{name:Q("weatherForecasts"),links:[{name:Q("today"),url:ea("today")},{name:Q("hourly"),url:ea("hourbyhour")},{name:Q("tenday"),url:ea("tenday")}]},{name:Q("radarAndMaps"),links:[{name:Q("interactiveRadarMap"),url:`${(0,B.interpolateUrl)(B.URLS.interactiveMap,{locale:V,locId:H})}?animation=true`},..."en-US"===V?[{name:"US Forecast",url:B.URLS.usForecast},{name:"US Satellite & Radar",url:B.URLS.usSatAndRadar},{name:"World Satellite",url:B.URLS.worldSatellite},{name:"US Severe Alerts",url:B.URLS.usSevereAlerts},{name:"US Health",url:B.URLS.usHealth}]:[]]},..."en-US"===V?[{name:"News",links:[{name:Q("topStories"),url:B.URLS.news},{name:Q("hurricaneCentral"),url:"/storms/hurricane-central"},{name:Q("tornadoCentral"),url:"/storms/tornado-central"},{name:Q("safetyAndPrep"),url:"/safety/index"},{name:Q("spaceAndSkywatching"),url:B.URLS.spaceSkywatching},...J?[{name:Q("video"),url:J}]:[]]}]:J?[{name:Q("video"),links:[{name:Q("topStories"),url:J}]}]:[],..."en-US"===V&&q&&W?[{name:"Activity Hub",isNew:!0,analyticsElement:"activity-hub",links:K.map(({titleKey:e,urlKey:a},t)=>{let n=F[e],r=String(t);return{name:Y(e),url:(0,B.interpolateUrl)(B.URLS[a],{locale:V,locId:H}),onClick:()=>$({interactionType:"click",interactionElement:n,moduleId:"hamburger-menu",modulePosition:r,destinationPageId:n},{flushImmediately:!0}),sourceModule:"hamburger-menu",sourceElement:n,modulePosition:r}})}]:[],{name:Q("productAccount"),links:[..."en-US"===V?[{name:"Alexa Skill",url:"https://www.amazon.com/The-Weather-Company-Channel/dp/B07YPYHQ1Q",isExternal:!0}]:[],...v?[{name:Z("manageAccount"),url:(0,B.interpolateUrl)(B.URLS.memberSettings,{locale:V})},{name:Z("logOut"),action:M.current}]:[{name:Z("createAnAccount"),url:(0,B.interpolateUrl)(B.URLS.memberSignup,{locale:V})},{name:Z("logIn"),url:(0,B.interpolateUrl)(B.URLS.memberLogin,{locale:V})}]]},{name:Q("lifestyle"),links:[..."en-US"===V?[{name:"Atmosphere Reviews",url:"/atmosphere"},{name:"Shop",url:"https://shop.weather.com/",isExternal:!0},{name:Q("recipes"),url:"/home-garden/recipes"},{name:Q("homeAndGarden"),url:B.URLS.homeGarden},{name:Q("travelAndOutdoors"),url:B.URLS.travel},{name:Q("petsAndAnimals"),url:B.URLS.pets},{name:"Health",url:"/health"}]:[],{name:Q("allergyTracker"),url:ea("allergy")},{name:Q("airQualityIndex"),url:ea("air-quality")},{name:Q("coldAndFluTracker"),url:ea("cold-flu")},..."en-US"===V?[{name:Q("skinHealth"),url:B.URLS.skinHealth}]:[]]}],[v,M,H,V,ea,J,q,W,$]);return(0,a.jsxs)("nav",{ref:n,className:(0,t.cn)("md:h-unset z-overlay absolute top-full right-0 left-0 h-[calc(100dvh-56px)] w-full overflow-y-auto bg-white pb-14 shadow-md md:py-8 md:pb-0"),"data-testid":"header-nav-menu",children:[(0,a.jsxs)("div",{className:"relative flex items-center justify-between px-6 pt-4",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Menu"}),(0,a.jsxs)(i.Button,{variant:"ghostUI","data-settings-menu-trigger":!0,"aria-haspopup":"menu","aria-expanded":o,className:"text-brand-active ml-[10px] flex cursor-pointer items-center px-0 md:px-[6px] md:text-gray-900",onClick:()=>d(e=>!e),children:[(0,a.jsx)(S.Globe,{size:"md",className:"fill-brand-active md:fill-gray-900"}),(0,a.jsx)("span",{className:"px-[8px] text-[13px] md:text-lg md:font-bold",children:f}),(0,a.jsx)("span",{className:"border-l-brand-active border-l-[1px] pr-1 pl-2 text-[13px] md:border-l-gray-900 md:text-lg md:font-bold",children:m?"°F":"°C"}),o?(0,a.jsx)(c.ChevronUp,{className:"text-brand-active h-5 w-auto md:text-gray-900"}):(0,a.jsx)(C.ChevronDown,{className:"text-brand-active h-5 w-auto md:text-gray-900"})]}),(0,a.jsx)(U.default,{})]}),!o&&(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-7xl flex-col justify-center md:flex-row md:gap-3 md:px-4","data-testid":"header-nav-content",children:et.map(e=>(0,a.jsx)("div",{className:"flex w-full flex-col md:w-1/4",children:(0,a.jsx)(T,{isExpanded:X[e.name],toggleCategory:()=>{var a;e.analyticsElement&&!X[e.name]&&$({interactionElement:e.analyticsElement,interactionType:"expand",moduleId:"hamburger-menu"}),a=e.name,ee(e=>({...e,[a]:!e[a]}))},...e})},e.name))})]})});G.displayName="Navigation";var V=e.i(710746),q=e.i(747961);let W=(0,r.forwardRef)(({title:e,titleId:t,desc:n,descId:r,...s},l)=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:l,"aria-labelledby":t,"aria-describedby":r,...s,children:[n?(0,a.jsx)("desc",{id:r,children:n}):null,void 0===e?(0,a.jsx)("title",{id:t,children:"Hamburger"}):e?(0,a.jsx)("title",{id:t,children:e}):null,(0,a.jsx)("path",{fill:"currentColor",d:"M20 16a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zM20 11a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zM20 6a1 1 0 1 1 0 2H4a1 1 0 0 1 0-2z"})]})),$=r.default.forwardRef((e,t)=>(0,a.jsx)(q.BaseIcon,{ref:t,icon:W,...e}));function Q(){let[e,t]=(0,l.useAtom)(h.menuOpenAtom),n=(0,r.useRef)(null),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{e?document.querySelector("html")?.classList.add("overflow-hidden"):document.querySelector("html")?.classList.remove("overflow-hidden")},[e]),(0,r.useEffect)(()=>{function a(a){e&&n.current&&s.current&&!n.current.contains(a.target)&&!s.current.contains(a.target)&&t(!1)}return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[e,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Button,{ref:n,variant:"ghost",size:"icon","aria-label":"Menu",className:"h-10 w-10 shrink-0 cursor-pointer flex-col items-center justify-center p-0 hover:bg-transparent",onClick:()=>t(!e),"data-testid":"header-menu-button",children:e?(0,a.jsx)(V.Close,{}):(0,a.jsx)($,{})}),e&&(0,a.jsx)(G,{ref:s})]})}$.displayName="Hamburger";var Y=e.i(368847),Z=e.i(809058),J=e.i(837879),X=e.i(730921),ee=e.i(540768),ea=e.i(537989);let et=()=>{let e=(0,l.useAtomValue)(ea.pageIdAtom);return(0,r.useCallback)(a=>{let t=`${e}_${a}`;(0,ee.setCookie)("fromStr",t,{path:"/",domain:".weather.com"})},[e])};var en=e.i(683199);function er(){let{user:e,userProfile:t}=(0,y.useUser)(),l=(0,w.useUserLogout)(),{isUserLoggedIn:o,isUserPremium:d}=e,[c,u]=(0,r.useState)(!1),m=(0,J.useSubscriptionsEnabled)(),h=(0,s.useTranslations)("UserRegistration"),x=(0,X.useLocale)(),p=et(),f=(0,en.usePremiumSource)(),g="flex size-8 shrink-0 items-center justify-center rounded-full border-2 border-current text-sm leading-none font-bold text-inherit";return(0,a.jsx)("div",{"data-testid":"header-profile",className:"md:hidden",children:o?(0,a.jsxs)(Z.Popover,{trigger:"hover",openDelay:100,closeDelay:300,open:c,onOpenChange:u,children:[(0,a.jsx)(Z.PopoverTrigger,{asChild:!0,children:(0,a.jsx)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":c,className:g,"data-testid":"header-profile-button",children:t?.firstName?.charAt(0)?.toUpperCase()})}),(0,a.jsx)(Z.PopoverContent,{className:"z-9996 p-0",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(n.default,{href:(0,B.interpolateUrl)(B.URLS.memberSettings,{locale:x}),"data-testid":"header-profile-account",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,a.jsx)("span",{className:g,children:t?.firstName?.charAt(0)?.toUpperCase()}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(Y.default,{variant:"Body.S",children:t?.firstName}),(0,a.jsx)(Y.default,{className:"text-sm text-gray-500 hover:text-gray-700","data-testid":"header-profile-account",children:h("manageAccount")})]})]})}),!d&&m&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 border-t border-gray-200 p-4",children:[(0,a.jsx)(Y.default,{variant:"Body.L",className:"font-semibold",children:"Unlock our full potential"}),(0,a.jsx)(Y.default,{children:"Try our best radar and forecasting features for weather planning."}),(0,a.jsx)(n.default,{href:"/subscribe?tpcc=mktg-today-mainmenu-flyout",onClick:()=>{p("user_flyout_go_premium"),f({sourceModule:"top-menu",sourceElement:"get-premium"})},children:(0,a.jsx)(i.Button,{variant:"default",children:"Go Premium"})})]})]}),(0,a.jsx)("div",{className:"border-t border-gray-200 p-2",children:(0,a.jsx)(i.Button,{variant:"link",onClick:l,"data-testid":"header-profile-signout",children:h("signOut")})})]})})]}):(0,a.jsx)(n.default,{href:(0,B.interpolateUrl)(B.URLS.memberLogin,{locale:x}),sourceModule:"header",sourceElement:"sign-in",children:(0,a.jsx)(i.Button,{variant:"default",className:"whitespace-nowrap text-sm md:text-base py-0 px-3 md:px-4 h-8 md:h-12 font-bold bg-gray-900",children:h("logIn")})})})}var es=e.i(701600);function el(){let{user:e}=(0,y.useUser)(),{isUserPremium:r}=e,s=(0,J.useSubscriptionsEnabled)(),l=et(),i=(0,en.usePremiumSource)();return r||!s?null:(0,a.jsxs)(n.default,{href:"/subscribe?tpcc=mktg-home-mainmenu-subscribe",className:(0,t.cn)("group relative inline-flex h-10 items-center justify-center gap-2 overflow-hidden rounded-full ps-3 pe-4 py-0 text-sm font-medium transition-colors","focus-visible:ring-offset-0 focus-visible:outline-none"),style:{background:"linear-gradient(90deg, #3A61CC 0%, #6549D4 50%, #935EC3 100%)"},onClick:()=>{l("header_go_premium"),i({sourceModule:"top-menu",sourceElement:"get-premium"})},children:[(0,a.jsx)("div",{style:{background:"linear-gradient(90deg, #4872E5 0%, #785CEB 50%, #A86EDD 100%)"},className:"pointer-events-none absolute top-0 left-0 h-full w-full opacity-0 bg-blend-soft-light transition-opacity group-hover:opacity-100 group-focus:opacity-100"}),(0,a.jsx)(es.Premium,{"aria-hidden":"true",className:"relative z-2 size-4 text-white"}),(0,a.jsx)("span",{className:"relative text-sm font-medium whitespace-nowrap text-white",children:"Get Premium"})]})}let ei=(0,r.forwardRef)(({title:e,titleId:t,desc:n,descId:r,...s},l)=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":t,"aria-describedby":r,...s,children:[n?(0,a.jsx)("desc",{id:r,children:n}):null,void 0===e?(0,a.jsx)("title",{id:t,children:"User Avatar"}):e?(0,a.jsx)("title",{id:t,children:e}):null,(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M8 4a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"}),(0,a.jsx)("path",{d:"M8 1a7 7 0 1 0 7 7 7.01 7.01 0 0 0-7-7M5 13.188V12.5A1.5 1.5 0 0 1 6.5 11h3a1.5 1.5 0 0 1 1.5 1.5v.688a5.95 5.95 0 0 1-6 0m6.996-.725A2.5 2.5 0 0 0 9.5 10h-3a2.5 2.5 0 0 0-2.496 2.463 6 6 0 1 1 7.992 0"})]})]})),eo=r.default.forwardRef((e,t)=>(0,a.jsx)(q.BaseIcon,{ref:t,icon:ei,...e}));function ed({firstName:e,isPremium:n,isAdFree:r}){let s=e?.charAt(0)?.toUpperCase();return(0,a.jsxs)("div",{className:(0,t.cn)("relative flex h-8 w-8 items-center justify-center rounded-full border-1 border-gray-900 md:h-12 md:w-12"),children:[(0,a.jsx)("span",{className:(0,t.cn)("text-sm font-bold text-gray-900 md:text-base",{"translate-y-[-2.5px] md:translate-y-[-3px]":n}),children:s}),n&&(0,a.jsx)("span",{className:(0,t.cn)("absolute bottom-[-1px] left-[-1px] h-[9px] w-8 bg-white text-[6.25px] uppercase md:h-[13px] md:w-12 md:text-[10px]"),children:r?"Ad Free":"Premium"})]})}eo.displayName="UserAvatar";let ec="inline-flex h-10 cursor-pointer items-center gap-2 rounded-full ps-3 pe-3.5 text-sm font-medium whitespace-nowrap text-gray-900 no-underline transition-colors hover:bg-black/7 focus-visible:bg-black/7 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:outline-none",eu=()=>{let{user:e,userProfile:l}=(0,y.useUser)(),{isUserLoggedIn:o,isUserPremium:d,isUserAdFree:c}=e,u=(0,w.useUserLogout)(),m=(0,J.useSubscriptionsEnabled)(),h=(0,s.useTranslations)("SidebarNavigation"),x=(0,s.useTranslations)("UserRegistration"),p=(0,X.useLocale)(),f=(0,en.usePremiumSource)(),[g,b]=(0,r.useState)(!1),v=l?.firstName?.charAt(0)?.toUpperCase();return o?(0,a.jsxs)(Z.Popover,{open:g,onOpenChange:b,children:[(0,a.jsx)(Z.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":g,"data-testid":"header-account-button",className:(0,t.cn)(ec,g&&"bg-black/7"),children:[v?(0,a.jsx)("span",{"aria-hidden":"true",className:"flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-current text-[10px] leading-none font-bold",children:v}):(0,a.jsx)(eo,{"aria-hidden":"true",className:"size-4 shrink-0"}),h("myAccount")]})}),(0,a.jsx)(Z.PopoverContent,{side:"bottom",align:"end",sideOffset:8,className:"z-9996 p-0",showArrow:!1,children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(n.default,{href:(0,B.interpolateUrl)(B.URLS.memberSettings,{locale:p}),"data-testid":"header-profile-account",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,a.jsx)(ed,{firstName:l?.firstName,isPremium:d,isAdFree:c}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(Y.default,{variant:"Body.S",children:l?.firstName}),(0,a.jsx)(Y.default,{className:"text-sm text-gray-500 hover:text-gray-700",children:x("manageAccount")})]})]})}),!d&&m&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 border-t border-gray-200 p-4",children:[(0,a.jsx)(Y.default,{variant:"Body.L",className:"font-semibold",children:"Unlock our full potential"}),(0,a.jsx)(Y.default,{children:"Try our best radar and forecasting features for weather planning."}),(0,a.jsx)(n.default,{href:"/subscribe?tpcc=mktg-today-mainmenu-flyout",onClick:()=>f({sourceModule:"top-menu",sourceElement:"get-premium"}),children:(0,a.jsx)(i.Button,{variant:"default",children:"Go Premium"})})]})]}),(0,a.jsx)("div",{className:"border-t border-gray-200 p-2",children:(0,a.jsx)(i.Button,{variant:"link",onClick:u,"data-testid":"header-profile-signout",children:x("signOut")})})]})})]}):(0,a.jsxs)(n.default,{href:(0,B.interpolateUrl)(B.URLS.memberLogin,{locale:p}),sourceModule:"header",sourceElement:"sign-in","data-testid":"header-sign-in",className:ec,children:[(0,a.jsx)(eo,{"aria-hidden":"true",className:"size-4 shrink-0"}),x("logIn")]})},em=(0,r.forwardRef)(({title:e,titleId:t,desc:n,descId:r,...s},l)=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":t,"aria-describedby":r,...s,children:[n?(0,a.jsx)("desc",{id:r,children:n}):null,void 0===e?(0,a.jsx)("title",{id:t,children:"Settings"}):e?(0,a.jsx)("title",{id:t,children:e}):null,(0,a.jsxs)("g",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:.33,children:[(0,a.jsx)("path",{d:"M13.5 8.38v-.765l.96-.84a1.003 1.003 0 0 0 .19-1.275l-1.18-2a1.004 1.004 0 0 0-1.185-.45l-1.215.41a6 6 0 0 0-.655-.375l-.255-1.26a1 1 0 0 0-1-.805H6.82a1 1 0 0 0-1 .805l-.255 1.26a6 6 0 0 0-.66.375l-1.19-.43a1 1 0 0 0-.32-.03.993.993 0 0 0-.865.5l-1.18 2a1 1 0 0 0 .205 1.255l.945.865v.765l-.945.84A.996.996 0 0 0 1.35 10.5l1.18 2a.99.99 0 0 0 .865.5 1 1 0 0 0 .32-.05l1.215-.41q.314.21.655.375l.255 1.26a1 1 0 0 0 1 .805H9.2a1 1 0 0 0 1-.805l.255-1.26q.342-.165.66-.375l1.21.41a1 1 0 0 0 .32.05 1 1 0 0 0 .865-.5l1.14-2a1 1 0 0 0-.205-1.255zM12.605 12l-1.715-.58c-.402.34-.861.606-1.355.785L9.18 14H6.82l-.355-1.775a4.7 4.7 0 0 1-1.35-.785l-1.72.56-1.18-2 1.36-1.2a4.4 4.4 0 0 1 0-1.565L2.215 6l1.18-2 1.715.58a4.4 4.4 0 0 1 1.355-.785L6.82 2h2.36l.355 1.775c.49.184.947.45 1.35.785l1.72-.56 1.18 2-1.36 1.2a4.5 4.5 0 0 1 0 1.565L13.785 10z"}),(0,a.jsx)("path",{d:"M8 11a3 3 0 0 1-2.772-1.852 2.997 2.997 0 0 1 2.186-4.09A3.002 3.002 0 0 1 11 8a2.96 2.96 0 0 1-.87 2.13A2.96 2.96 0 0 1 8 11Zm0-5a1.96 1.96 0 0 0-1.428.572A1.96 1.96 0 0 0 6 8a1.95 1.95 0 0 0 1.227 1.86c.245.099.508.146.773.14a1.946 1.946 0 0 0 1.86-1.227c.098-.246.146-.508.14-.773a1.96 1.96 0 0 0-1.228-1.86A2 2 0 0 0 8 6Z"})]})]})),eh=r.default.forwardRef((e,t)=>(0,a.jsx)(q.BaseIcon,{ref:t,icon:em,...e}));eh.displayName="Settings";var ex=e.i(166763),ep=e.i(121301),ef=e.i(62544),eg=e.i(35137);function eb({open:e,onOpenChange:t,locale:n,handleLocaleChange:r}){return(0,a.jsx)(ef.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(ef.DialogContent,{showCloseButton:!1,"aria-describedby":void 0,overlayClassName:"bg-gray-900/80",className:"h-[min(720px,calc(100dvh-48px))] max-w-[calc(100%-2rem)] overflow-hidden rounded-3xl border-none p-0 shadow-[0_12px_32px_0_rgba(37,36,34,0.3)] sm:max-w-[480px]",children:(0,a.jsx)(eg.default,{locale:n,LOCALE_DATA:ex.LOCALE_DATA,handleLocaleChange:r,variant:"dialog",onClose:()=>t(!1),renderHeading:e=>(0,a.jsx)(ef.DialogTitle,{asChild:!0,className:"pt-0 text-start",children:e})})})})}var ev=e.i(524940);function ej(){let e=(0,s.useTranslations)("SidebarNavigation"),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1),d=(0,r.useRef)(null),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{u(d.current?.closest('[data-testid="header-utilities"]')??null)},[]);let m=(0,r.useMemo)(()=>({current:c}),[c]),{isImperial:h,isMetric:x,isHybrid:p,locale:f,handleUnitChange:g,handleLocaleChange:b}=(0,ev.useSettingsActions)({onBeforeLocaleNavigate:()=>o(!1)});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Z.Popover,{open:n,onOpenChange:l,children:[c&&(0,a.jsx)(Z.PopoverAnchor,{virtualRef:m}),(0,a.jsx)(Z.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{ref:d,type:"button","data-testid":"header-settings-button",className:(0,t.cn)(ec,n&&"bg-black/7"),children:[(0,a.jsx)(eh,{"aria-hidden":"true",className:"size-4 shrink-0"}),e("settings")]})}),(0,a.jsx)(Z.PopoverContent,{align:"end",sideOffset:6,showArrow:!1,className:"flex w-[380px] flex-col gap-1 rounded-2xl border border-solid border-gray-100 p-3 shadow-[0_12px_32px_0_rgba(37,36,34,0.2)]",children:(0,a.jsx)(ep.default,{isImperial:h,isMetric:x,isHybrid:p,locale:f,LOCALE_DATA:ex.LOCALE_DATA,handleUnitChange:g,onOpenLocationLanguage:()=>{l(!1),o(!0)},variant:"popover"})})]}),(0,a.jsx)(eb,{open:i,onOpenChange:o,locale:f,handleLocaleChange:b})]})}function ey({elevated:e,hideGoPremiumButton:n}){return(0,a.jsxs)("div",{"data-testid":"header-utilities","data-elevated":e,className:(0,t.cn)("hidden items-center gap-2 md:ms-auto md:flex","rounded-full bg-white/66 p-1 backdrop-blur-[16px] backdrop-saturate-[1.8] transition-shadow duration-200",e&&"shadow-[0_2px_8px_0_rgba(0,0,0,0.16)]"),children:[(0,a.jsx)(ej,{}),(0,a.jsx)(eu,{}),!n&&(0,a.jsx)(el,{})]})}function ew(e){return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)}var eN=e.i(521231);e.i(609717);var ek=e.i(950771);let eS={src:e.i(10993).default,width:208,height:74,blurWidth:0,blurHeight:0},eA=[{locales:["de-DE"],url:"https://www.focus.de/?utm_source=weather.com&utm_medium=referral&utm_campaign=unser+netzwerk",cobrandIconSrc:eS.src,cobrandIconWidth:eS.width,cobrandIconHeight:eS.height}];var eC=e.i(37429);let eL=e=>{let{classname:r}=e,s=(0,l.useAtomValue)(ek.pageLocaleAtom),{url:i,cobrandIconSrc:o,cobrandIconWidth:d,cobrandIconHeight:c}=eA.find(e=>e.locales.includes(s))||{};return i&&o?(0,a.jsx)("span",{className:"flex",children:(0,a.jsx)(n.default,{href:i,target:"_blank",className:(0,t.cn)("relative p-0",r,{"de-DE":"de-DE"===s}),children:(0,a.jsx)(eC.default,{className:"h-6 w-auto max-w-none",src:o,alt:"focus logo",width:d,height:c,rounded:!1})})}):null};var eU=e.i(888932);e.s(["default",0,function({locale:e,subnav:s,mobileOnlySubnav:i,hideLocationPicker:o,hideGoPremiumButton:d}){let c,m=(c=(0,u.useIsMobile)(),(0,L.usePathname)().includes("/subscribe")&&!c),x=(0,l.useAtomValue)(h.menuOpenAtom),p=(0,l.useAtomValue)(h.locationPickerOpenAtom),f=(0,r.useSyncExternalStore)(ew,()=>window.scrollY>0,()=>!1),g=(0,B.interpolateUrl)(B.URLS.home,{locale:e}),{ref:b,isOverDark:j}=(0,eU.useOverDarkBackground)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("header",{className:(0,t.cn)("relative top-0",m?"w-full md:fixed md:w-auto":"w-full md:sticky",x||p?"z-overlay":"z-sticky"),children:(0,a.jsx)("div",{className:"text-black max-md:bg-white","data-component":"header-main","data-testid":"header-main",children:(0,a.jsxs)("div",{className:"mx-auto flex items-center justify-between gap-2 px-3 py-2 md:justify-start md:gap-4 md:pr-2",children:[!m&&(0,a.jsx)("span",{className:"contents md:hidden",children:(0,a.jsx)(Q,{})}),(0,a.jsxs)("div",{ref:b,className:(0,t.cn)("flex items-center md:gap-4",o&&"max-md:mr-auto"),children:[(0,a.jsx)(n.default,{href:g,className:"flex items-center","data-testid":"header-logo",children:(0,a.jsx)(eN.default,{className:(0,t.cn)("h-10 w-auto transition-colors duration-200 md:h-12",j?"md:text-white":"text-[#003399]")})}),(0,a.jsx)("span",{className:"hidden md:contents",children:(0,a.jsx)(eL,{})})]}),!m&&(0,a.jsxs)(a.Fragment,{children:[!o&&(0,a.jsx)(v,{locale:e,elevated:f}),!i&&(0,a.jsx)("div",{className:"hidden md:contents",children:s}),(0,a.jsx)(ey,{elevated:f,hideGoPremiumButton:d}),(0,a.jsx)(er,{})]})]})})}),!m&&(0,a.jsx)("div",{className:(0,t.cn)("z-sticky sticky top-2 mb-6 px-3 md:hidden",x||p?"hidden":"block"),children:s})]})}],778828)}]);