(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,125408,(e,l,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FLU_STRAIN_DATA_URL=void 0,a.getFluStrainData=r,a.getDistrictFluStrain=n;let t=e.r(414655);async function r(){let e=await fetch(a.FLU_STRAIN_DATA_URL,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:21600}});return(0,t.handleFetchResponse)(e)}async function n(e,l){return function(e,l,a=new Date){if(!l)return;let t=a.getFullYear(),r=String(t),n=String(t-1);for(let a=e.length-1;a>=0;a--){let t=e[a];if(t&&t.REGION===l&&(t.YEAR===r||t.YEAR===n))return t}}(await r(),e,l)}a.FLU_STRAIN_DATA_URL="https://s.w-x.co/ai-core/WHO_NREVSS_Clinical_Labs_small.json"},302675,e=>{"use strict";var l=e.i(458201),a=e.i(64412),t=e.i(538167),r=e.i(695881),n=e.i(789422),s=e.i(380993),i=e.i(368847),o=e.i(170689),c=e.i(436441);let d=["A","B"],u=({value:e,type:a})=>{let t=(0,n.r)("FluStrainInfo");return(0,l.jsxs)("li",{className:"flex grow basis-0 items-center py-4 pr-4",children:[(0,l.jsx)(o.f,{value:e??0,maxValue:100,diameter:84,strokeWidth:4,strokeColor:"#1B4DE4",displayValue:null==e?"--":(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)("tspan",{className:"text-base font-semibold",children:"%"})]}),icon:null===e?c.f:void 0,textClassName:"fill-[#424a50] text-xl font-semibold",className:"min-w-[84px]"}),(0,l.jsxs)("div",{className:"ml-5 grow",children:[(0,l.jsx)(i.p,{variant:"Caption.M",color:"secondary",elementType:"span",className:"mb-1 block tracking-wider uppercase",children:t("strain",{type:a})}),(0,l.jsx)(i.p,{variant:"Title.XS",elementType:"h3",className:"mb-1",children:t("influenzaType",{type:a})}),(0,l.jsx)(i.p,{variant:"Body.S",color:"secondary",children:t("A"===a?"strainANarrative":"strainBNarrative")})]})]})};var m=e.i(341669);let x=()=>(0,l.jsxs)("li",{className:"flex grow basis-0 items-center py-4 pr-4",children:[(0,l.jsx)(m.f,{skeletonClassName:"h-[84px] w-[84px] min-w-[84px] rounded-full"}),(0,l.jsxs)("div",{className:"ml-5 grow",children:[(0,l.jsx)(m.f,{skeletonClassName:"mb-1 block h-3 max-w-16"}),(0,l.jsx)(m.f,{skeletonClassName:"mb-2 block h-4.5 max-w-44"}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(m.f,{skeletonClassName:"block h-3 w-full"}),(0,l.jsx)(m.f,{skeletonClassName:"block h-3 w-full"}),(0,l.jsx)(m.f,{skeletonClassName:"block h-3 w-3/4"})]})]})]}),p=({data:e=[],isLoading:a=!1,error:t=null})=>{let r=(0,n.r)("FluStrainInfo");return a||t||0!==e.length?(0,l.jsxs)(s.N,{"data-testid":"FluStrainInfoModule","aria-label":r("heading"),children:[(0,l.jsx)(s.Y,{text:r("heading")}),(0,l.jsx)(s.O,{children:t?(0,l.jsx)(i.p,{variant:"Body.M",color:"secondary",className:"flex min-h-32 items-center justify-center py-4 text-center",children:r("errorMsg")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.p,{variant:"Body.S",color:"secondary",className:"mb-4",children:r("subHeading")}),(0,l.jsx)("ul",{className:"flex flex-col @lg/card:flex-row @lg/card:gap-6",children:a?d.map(e=>(0,l.jsx)(x,{},e)):e.map(e=>(0,l.jsx)(u,{value:e.value,type:e.type},e.type))}),(0,l.jsx)(i.p,{variant:"Caption.M",color:"secondary",className:"mt-4",children:r("source")})]})})]}):null};var f=e.i(794120),h=e.i(125408);let g=(0,r.createLogger)("FluStrainInfo"),j=({location:e,initializing:a,initialError:r})=>{let{data:n,isLoading:s,error:i}=function(e){let l,a,t,r,n,s,i=e?.adminDistrict,{data:o,error:c,isLoading:u}=(0,f.U)(i?["districtFluStrain",i]:null,([e,l])=>(0,h.getDistrictFluStrain)(l),{revalidateOnFocus:!1,dedupingInterval:36e5});return{data:(l=o?parseInt(o["TOTAL A"],10):0/0,a=o?parseInt(o["TOTAL B"],10):0/0,t=Number.isFinite(l)?l:0,n=t+(r=Number.isFinite(a)?a:0),s=e=>n>0?parseInt((100*e/n).toFixed(0),10):null,d.map(e=>({type:e,value:"A"===e?s(t):s(r)}))),isLoading:u,error:c}}(e),o=r||i||null;return(0,t.useEffect)(()=>{o&&g.error("Failed to load flu strain info",o)},[o]),(0,l.jsx)(p,{data:n,isLoading:a||s,error:o})},N=()=>{let{location:e,isLoading:t,error:r}=(0,a.f)();return(0,l.jsx)(j,{location:e,initializing:t,initialError:r})};e.s(["FluStrainInfoBlockClient",0,N,"default",0,N],302675)},682228,function(e){e.n(e.i(302675))}]);