(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,535836,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getWWIRForecast=o;let r=e.r(417669),i=e.r(678651),s=e.r(414655);async function o(e){let t=(0,r.getWWIRForecastUrlConfig)(e),a=(0,i.urlFrom)(t),o=await fetch(a,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return await (0,s.handleFetchResponse)(o)}},698674,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getWeatherInsights=o;let r=e.r(449802),i=e.r(678651),s=e.r(414655);async function o(e){let t=(0,r.getSunV3WeatherInsightsUrlConfig)(e),a=(0,i.urlFrom)(t),o=await fetch(a,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return(0,s.handleFetchResponse)(o)}},474245,(e,t,a)=>{"use strict";var r,i;Object.defineProperty(a,"__esModule",{value:!0}),a.InsightType=void 0,(i=r||(a.InsightType=r={})).ALL="all",i.BREAKING_VIDEO_INSIGHT="breakingVideoInsight",i.CHANCE_PRECIP_INSIGHT="chancePrecipInsight",i.SUNNY_DAY_INSIGHT="sunnyDayInsight",i.POLLEN_INSIGHT="pollenInsight",i.TEMPERATURE_CHANGE_INSIGHT="temperatureChangeInsight",i.TRENDING_TEMPERATURE_INSIGHT="trendingTemperatureInsight",i.SUN_INSIGHT="sunInsight",i.SHORT_TERM_PRECIP_INSIGHT="shortTermPrecipInsight",i.THUNDERSTORM_SOON_INSIGHT="thunderstormSoonInsight",i.SEVERE_STORM_INSIGHT="severeStormInsight",i.PRECIP_INSIGHT="precipInsight"},449802,(e,t,a)=>{"use strict";e.i(288906),Object.defineProperty(a,"__esModule",{value:!0}),a.getSunV3WeatherInsightsUrlConfig=function({geocode:e,placeId:t,postalKey:a,insightType:i=r.InsightType.ALL,units:s,language:o,par:l,cscCountryCode:n}){let c={format:"json",units:s,language:o,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061",insightType:i,par:l,cscCountryCode:n};return e?c.geocode=e:t?c.placeid=t:a&&(c.postalKey=a),{host:"api.weather.com",protocol:"https",pathname:"/v3/insights",query:c}};let r=e.r(474245)},231486,(e,t,a)=>{"use strict";e.i(288906),Object.defineProperty(a,"__esModule",{value:!0}),a.getTileServerSeriesDynamicMapsUrlConfig=function(){return{host:"api.weather.com",protocol:"https",pathname:"/v3/TileServer/series/productSet/dynamicmaps",query:{apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}}},552588,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getDynamicMapsTileSeries=o;let r=e.r(678651),i=e.r(414655),s=e.r(231486);async function o(){let e=(0,s.getTileServerSeriesDynamicMapsUrlConfig)(),t=(0,r.urlFrom)(e),a=await fetch(t,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return(await (0,i.handleFetchResponse)(a)).seriesInfo}},911927,e=>{"use strict";var t=e.i(546446),a=e.i(458001);e.s(["useCscCountryCode",0,function(){return(0,t.useAtomValue)(a.cscCountryCodeAtom)}])},658864,e=>{"use strict";var t=e.i(902875),a=e.i(64412),r=e.i(495110),i=e.i(181462),s=e.i(725287),o=e.i(247865),l=e.i(381477),n=e.i(581014),c=e.i(546446),d=e.i(535836),u=e.i(552588),h=e.i(617874),p=e.i(674885),m=e.i(474245),g=e.i(911927),f=e.i(611540);let b={width:568,height:320},y={sm:b,lg:{width:800,height:600}},x={0:{title:"Local Radar",layer:"twcRadarHcMosaic",style:"light",key:"radar",frames:1,frameRatio:2,attributionColor:"white"},1:{title:"Rain is in View",layer:"radarFcstV2",style:"light",key:"rainView",frames:13,frameRatio:2,attributionColor:"white"},2:{title:"Snow is in View",layer:"radarFcstV2",style:"light",key:"snowView",frames:12,frameRatio:2,attributionColor:"white"},3:{title:"Wintry Mix is in View",layer:"radarFcstV2",style:"light",key:"mixView",frames:13,frameRatio:2,attributionColor:"white"},4:{title:"Storms in View",layer:"radarFcstV2",style:"light",key:"stormView",frames:13,frameRatio:2,attributionColor:"white"},5:{title:"Lightning in View",layer:"radarFcstV2",vector:"600",style:"light",key:"lightningView",frames:13,frameRatio:2,attributionColor:"white"}};var v=e.i(742740),w=e.i(308427);let I=e=>y[e]||b,M=(e,t)=>156.28921875/2**t*e,N=(e,t,a,r,i,s)=>{let o;return"fts"===e&&0===a||"ts"===e&&a===t.ts.length-1?s:("fts"===e&&(o=(t.fts?.[a]??0)*1e3),"ts"===e&&(o=(t.ts?.[a]??0)*1e3),(0,v.formatHourlyDate)({date:o,locale:r,timeZone:i,minutes:!0}))};var S=e.i(11697);let T={revalidateOnFocus:!1,dedupingInterval:6e4};var _=e.i(632137),j=e.i(380993),R=e.i(240058),C=e.i(368847),P=e.i(892186);let V=({geocode:e,lod:a,mapImageSize:r})=>{let i=(0,o.useMemo)(()=>{if(!(e&&a))return;let[t="",i=""]=e.split(",")||[],s=((e,t,a,r)=>{let i=(0,w.getLODRoundedVal)(e,a),s=(0,w.getLODRoundedVal)(t,a),[o,l,n,c]=[e.toString(),t.toString(),i,s].map(e=>parseFloat(e)),d=o-n,u=111.11*Math.cos(Math.PI*(o-d/2)/180)*(l-c),{width:h,height:p}=I(r);return{dx:u/M(h,a)*100,dy:111.11*d/M(p,a)*100}})(t,i,a,r);return{left:`calc(${50+s.dx}% - ${10}px)`,top:`calc(${50-s.dy}% - ${10}px)`}},[e,a,r]);return i?(0,t.jsx)("div",{className:"absolute h-[20px] w-[20px] rounded-full border-2 border-white bg-[#1944DE] opacity-95","data-testid":"LocationPin",style:i}):null},L=({mapImages:e,frame:a})=>{let r="absolute h-full w-full rounded-lg bg-[#9fcbf9]";return e.length?e.map((e,i)=>(0,t.jsx)("div",{className:`${r} bg-cover bg-center opacity-0 ${a===i?"!opacity-100":""}`,style:{backgroundImage:`url(${e.url})`}},e.id)):(0,t.jsx)("div",{className:r})};var A=e.i(846871);let E=({mapImages:e,geocode:a,lod:r=7,wwir:i,ctaLink:s,isLoading:l,enableAnimation:c=!0,enableLocationPin:d=!0,enableWWIRPhrase:u=!0,showMapBoxAttribution:h=!0,displayName:p,animationTiming:m=500,mapImageSize:g})=>{let[f,b]=(0,o.useState)(0),y=(0,n.useTranslations)("DynamicMap"),{frames:x}=i.product,v=(0,o.useMemo)(()=>e.length{let e;if(!(c&&v.length>1))return void b(0);let t=setTimeout(()=>{e=setInterval(()=>{b(e=>(e+1)%v.length)},m)},1500);return()=>{clearTimeout(t),clearInterval(e)}},[v.length,c,m]);let I=i.product.attributionColor,M=s?R.default:"div",N=p&&y.has("locationRadar")?y("locationRadar",{location:p}):y("radar");return(0,t.jsxs)(j.Card,{className:"@container/dynamicMap","aria-label":i.phrase?`${N} - ${i.phrase}`:N,"data-testid":"DynamicMap",children:[(0,t.jsx)(C.default,{variant:"Title.S",elementType:"h2",className:"mb-2 font-black",children:N}),(0,t.jsxs)("div",{className:"relative h-80 @md/dynamicMap:h-100",children:[(0,t.jsxs)(M,{href:s||"#",className:"absolute inset-0 block",children:[(0,t.jsx)(L,{mapImages:v,frame:f}),d&&e.length>0&&(0,t.jsx)(V,{geocode:a,lod:r,mapImageSize:g}),l&&(0,t.jsx)(A.Loader,{className:"absolute top-1/2 left-1/2 -translate-1/2",variant:"white",size:"lg",label:"Loading"}),(0,t.jsx)("div",{className:"absolute top-0 flex w-full items-start p-3",children:w?.time&&(0,t.jsx)(C.default,{variant:"Body.S",className:"justify-center rounded-lg bg-[rgba(37,36,34,0.8)] px-3 py-2 text-white","data-testid":"DynamicMapTimeStamp",children:w.time})}),(0,t.jsxs)("div",{className:(0,_.cn)("absolute bottom-0 flex w-full items-end justify-between gap-1 p-3","@max-md/dynamicMap:flex-col @max-md/dynamicMap:items-start"),children:[(0,t.jsx)("span",{}),u&&i.phrase&&(0,t.jsx)(C.default,{variant:"Body.S",className:"max-w-[300px] items-center rounded-xl bg-white/80 px-3 py-2 shadow-lg","data-testid":"DynamicMapWeatherPhrase",children:i.phrase})]})]}),h&&(0,t.jsx)(P.default,{position:"top-right",color:I,className:"!top-3 !right-3 z-1"})]})]})},D=({location:e,serverLocationDisplayName:a,initializing:r,initialError:i,enableLocationPin:b,enableWWIRPhrase:y,enableAnimation:v,mapImageSize:M,showMapBoxAttribution:_})=>{let j=(0,s.useParams)()?.locale,R=M??"sm",{loadingData:C,error:P,wwir:V,geocode:L,lod:A,ctaUrl:D,mapImages:$,ctaText:O,isDashboard:z}=((e,t,a="sm")=>{let r=(0,n.useTranslations)("DynamicMap"),i=(0,c.useAtomValue)(p.userUnitPreferenceAtom),s=((0,h.unitsSystemByName)(i)||h.imperial).code,b=(0,g.useCscCountryCode)(),{ianaTimeZone:y,countryCode:v,geocode:M}=e||{},{data:_,isLoading:j,error:R}=(0,l.default)(M?["get-wwir-forecaset",M,s,t]:null,([e,t,a,r])=>(0,d.getWWIRForecast)({geocode:t,units:a,language:r}),T),{data:C,isLoading:P,error:V}=(0,l.default)(M?"get-dynamic-maps-tile-series":null,()=>(0,u.getDynamicMapsTileSeries)(),T),L=_?.forecast,A=(0,o.useMemo)(()=>{let e=L?.overall_type??0;return{...L,phrase:L?.phrase||"",product:x[e]}},[L]),{data:E,isLoading:D}=(0,S.useGetWeatherInsights)({geoCode:e?.geocode||null,insightType:m.InsightType.PRECIP_INSIGHT,locale:t,par:"twc",cscCountryCode:b}),$=E?.length?6:9,O=r("now"),z=(0,o.useMemo)(()=>M?((e,t,a)=>{if(!e)return[];let{mapImageSize:r,geocode:i,lod:s,locale:o,timeZone:l,countryCode:n,samsungMA:c,nowText:d}=a,u=t.product,{width:h,height:p}=I(r),[m="",g=""]=i.split(",")||[],f=(0,w.getLODRoundedVal)(m,s),b=(0,w.getLODRoundedVal)(g,s),y=((e,t)=>{let{layer:a,frameRatio:r,frames:i}=t,s=e[a],o=s.series?.[0]?.fts||null,l=s.series||[];if(o){let e=o.slice().reverse(),t=i>1?e.slice(0,2*i):e.slice(0,1);return r&&(t=((e,t)=>{let a=[];for(let r=0;r{let{location:d,isLoading:u,error:h}=(0,a.useLocation)(),p=(0,r.useIsHydratingRender)(),m=(0,i.getServerLocationDisplayName)(c);return(0,t.jsx)(D,{location:d,serverLocationDisplayName:m,initializing:u||p&&!d,initialError:h,enableLocationPin:e,enableWWIRPhrase:s,enableAnimation:o,mapImageSize:l,showMapBoxAttribution:n})};e.s(["DynamicMapBlockClient",0,$,"default",0,$],658864)},58940,function(e){e.n(e.i(658864))},11697,e=>{"use strict";var t=e.i(381477),a=e.i(698674),r=e.i(546446),i=e.i(674885),s=e.i(617874);let o={revalidateOnFocus:!1,dedupingInterval:6e4};e.s(["useGetWeatherInsights",0,({key:e="get-weather-insights",geoCode:l,insightType:n,locale:c,par:d="twc",cscCountryCode:u})=>{let h=(0,r.useAtomValue)(i.userUnitPreferenceAtom),p=((0,s.unitsSystemByName)(h)||s.imperial).code;return(0,t.default)(l?[e,n,l,p,d,c]:null,([e,t,r,i,s,o])=>(0,a.getWeatherInsights)({geocode:r,units:i,language:o,insightType:t,par:s,cscCountryCode:"KR"===u?"KR":void 0}),o)}])},846871,e=>{"use strict";var t=e.i(902875),a=e.i(294237),r=e.i(632137);let i=(0,a.cva)("inline-block rounded-full border-solid animate-spin box-border",{variants:{size:{sm:"w-4 h-4 border-[2px]",md:"w-6 h-6 border-[2px]",lg:"w-8 h-8 border-[3px]"},variant:{white:"border-white border-b-transparent",primary:"border-brand-400 border-b-transparent",black:"border-[#252422] border-b-transparent"}},defaultVariants:{size:"sm",variant:"black"}});e.s(["Loader",0,({className:e,size:a,variant:s,label:o})=>(0,t.jsx)("div",{className:(0,r.cn)(i({size:a,variant:s}),e),"aria-label":o})])},308427,892186,e=>{"use strict";e.s(["getLODRoundedVal",0,(e,t)=>{let a=(e=>{if(e=12)return 3;throw Error("Cannot get precision from invalid level of detail")})(t),r=parseFloat(e),i=10**a,s=0===a?1:5;return(Math.sign(r)*Math.round(Math.abs(r)*i/s)*s/i).toFixed(a)}],308427);var t=e.i(902875),a=e.i(247865),r=e.i(632137),i=e.i(809058);let s={"top-left":"top-0 left-0 flex-row","top-right":"top-0 right-0 flex-row-reverse","bottom-left":"bottom-0 left-0 flex-row","bottom-right":"bottom-0 right-0 flex-row-reverse"},o={"top-left":"bottom","top-right":"bottom","bottom-left":"top","bottom-right":"top"},l={"top-left":"start","top-right":"end","bottom-left":"start","bottom-right":"end"},n={blue:"fill-brand-300",white:"fill-white"},c=({position:e="bottom-right",color:c="blue",className:u="",linksClassName:h="",stack:p=!1})=>{let[m,g]=(0,a.useState)(!1);return(0,t.jsx)("div",{className:(0,r.cn)("absolute flex items-start gap-1",s[e],u),"data-testid":"MapboxAttribution",children:(0,t.jsxs)(i.Popover,{open:m,onOpenChange:g,children:[(0,t.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:(0,r.cn)("flex cursor-pointer items-center p-0",n[c]),"aria-label":"Map Attribution","data-testid":"MapboxLinks",children:(0,t.jsx)(d,{})})}),(0,t.jsxs)(i.PopoverContent,{side:o[e],align:l[e],sideOffset:4,showArrow:!1,className:(0,r.cn)("!w-auto !rounded !border-none !bg-white/75 !p-1.5 !shadow-md","flex flex-wrap text-xs",p?"flex-col space-y-1":"flex-row items-center space-x-2",h),children:[(0,t.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://mapbox.com/about/maps",className:"text-blue-600 hover:underline",children:`\xa9 ${new Date().getFullYear()} Mapbox`}),(0,t.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.openstreetmap.org/about",className:"text-blue-600 hover:underline",children:"© OpenStreetMap"}),!p&&(0,t.jsx)("span",{className:"text-gray-400",children:"|"}),(0,t.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.mapbox.com/map-feedback/",className:"text-blue-600 hover:underline",children:"Improve this map"})]})]})})},d=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 800 180",className:"w-18.75 opacity-75 drop-shadow-[0_0_2px_black]",children:[(0,t.jsx)("title",{children:"Mapbox Logo"}),(0,t.jsx)("path",{d:"M594.6 49.8c-9.9 0-19.4 4.1-26.3 11.3V23c0-1.2-1-2.2-2.2-2.2h-13.4c-1.2 0-2.2 1-2.2 2.2v103c0 1.2 1 2.2 2.2 2.2h13.4c1.2 0 2.2-1 2.2-2.2v-7.1c6.9 7.2 16.3 11.3 26.3 11.3 20.9 0 37.8-18 37.8-40.2s-16.9-40.2-37.8-40.2zm-3.1 64.3c-12.7 0-23-10.6-23.1-23.8v-.6c.2-13.2 10.4-23.8 23.1-23.8 12.8 0 23.1 10.8 23.1 24.1s-10.4 24.1-23.1 24.1zM681.7 49.8c-22.6 0-40.9 18-40.9 40.2s18.3 40.2 40.9 40.2c22.6 0 40.9-18 40.9-40.2s-18.3-40.2-40.9-40.2zm-.1 64.3c-12.8 0-23.1-10.8-23.1-24.1s10.4-24.1 23.1-24.1 23.1 10.8 23.1 24.1-10.4 24.1-23.1 24.1zM431.6 51.8h-13.4c-1.2 0-2.2 1-2.2 2.2v7.1c-6.9-7.2-16.3-11.3-26.3-11.3-20.9 0-37.8 18-37.8 40.2s16.9 40.2 37.8 40.2c9.9 0 19.4-4.1 26.3-11.3v7.1c0 1.2 1 2.2 2.2 2.2h13.4c1.2 0 2.2-1 2.2-2.2V54c0-1.2-1-2.2-2.2-2.2zm-38.8 62.3c-12.8 0-23.1-10.8-23.1-24.1s10.4-24.1 23.1-24.1c12.7 0 23 10.6 23.1 23.8v.6c-.1 13.2-10.4 23.8-23.1 23.8zM498.5 49.8c-9.9 0-19.4 4.1-26.3 11.3V54c0-1.2-1-2.2-2.2-2.2h-13.4c-1.2 0-2.2 1-2.2 2.2v103c0 1.2 1 2.2 2.2 2.2H470c1.2 0 2.2-1 2.2-2.2v-38.1c6.9 7.2 16.3 11.3 26.3 11.3 20.9 0 37.8-18 37.8-40.2s-16.9-40.2-37.8-40.2zm-3.1 64.3c-12.7 0-23-10.6-23.1-23.8v-.6c.2-13.2 10.4-23.8 23.1-23.8 12.8 0 23.1 10.8 23.1 24.1s-10.3 24.1-23.1 24.1zM311.8 49.8c-10 .1-19.1 5.9-23.4 15-4.9-9.3-14.7-15.1-25.2-15-8.2 0-15.9 4-20.7 10.6V54c0-1.2-1-2.2-2.2-2.2h-13.4c-1.2 0-2.2 1-2.2 2.2v72c0 1.2 1 2.2 2.2 2.2h13.4c1.2 0 2.2-1 2.2-2.2V82.9c.5-9.6 7.2-17.3 15.4-17.3 8.5 0 15.6 7.1 15.6 16.4v44c0 1.2 1 2.2 2.2 2.2h13.5c1.2 0 2.2-1 2.2-2.2l-.1-44.8c1.2-8.8 7.5-15.6 15.2-15.6 8.5 0 15.6 7.1 15.6 16.4v44c0 1.2 1 2.2 2.2 2.2h13.5c1.2 0 2.2-1 2.2-2.2l-.1-49.5c0-14.8-12.6-26.7-28.1-26.7zM794.7 125.1l-23.2-35.3 23-35c.6-.9.3-2.2-.6-2.8-.3-.2-.7-.3-1.1-.3h-15.5c-1.2 0-2.3.6-2.9 1.6L760.9 76l-13.5-22.6c-.6-1-1.7-1.6-2.9-1.6H729c-1.1 0-2 .9-2 2 0 .4.1.8.3 1.1l23 35-23.2 35.3c-.6.9-.3 2.2.6 2.8.3.2.7.3 1.1.3h15.5c1.2 0 2.3-.6 2.9-1.6l13.8-23 13.8 23c.6 1 1.7 1.6 2.9 1.6H793c1.1 0 2-.9 2-2 0-.4-.1-.8-.3-1.2z"}),(0,t.jsxs)("g",{children:[(0,t.jsx)("path",{d:"M93.9 1.1C44.8 1.1 5 40.9 5 90s39.8 88.9 88.9 88.9 88.9-39.8 88.9-88.9c0-49.1-39.8-88.9-88.9-88.9zm42.2 110.7c-30.4 30.4-84.7 20.7-84.7 20.7s-9.8-54.2 20.7-84.7C89 30.9 117 31.6 134.7 49.2s18.3 45.7 1.4 62.6z"}),(0,t.jsx)("path",{d:"M104.1 53.2l-8.7 17.9-17.9 8.7 17.9 8.7 8.7 17.9 8.7-17.9 17.9-8.7-17.9-8.7z"})]})]}),u=(0,a.memo)(c);e.s(["MapboxAttribution",0,c,"default",0,u],892186)}]);