"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1538],{m0Nu:function(e,t,r){r.d(t,{Os:function(){return h},Ti:function(){return s},Zn:function(){return d},eD:function(){return u}});var a=r("Kh6r"),n=r("ysjU"),o=r("TD78"),l=r("m+Kt"),i=r("NBFx"),c=r("qe1T");let s={[c.P.GOOD]:{color:"green",valueColorIndex:7,statusColorIndex:6,borderStartColorIndex:2,borderEndColorIndex:8,informationIcon:a.Z},[c.P.MODERATE]:{color:"yellow",valueColorIndex:6,statusColorIndex:5,borderStartColorIndex:2,borderEndColorIndex:6,informationIcon:n.Z},[c.P.UNHEALTHY_FOR_SENSITIVE]:{color:"yellow",valueColorIndex:9,statusColorIndex:9,borderStartColorIndex:5,borderEndColorIndex:9,informationIcon:o.Z},[c.P.UNHEALTHY]:{color:"red",valueColorIndex:7,statusColorIndex:6,borderStartColorIndex:3,borderEndColorIndex:6,informationIcon:o.Z},[c.P.VERY_UNHEALTHY]:{color:"violet",valueColorIndex:8,statusColorIndex:7,borderStartColorIndex:4,borderEndColorIndex:8,informationIcon:l.Z},[c.P.HAZARDOUS]:{color:"redViolet",valueColorIndex:9,statusColorIndex:8,borderStartColorIndex:5,borderEndColorIndex:9,informationIcon:i.Z}},d="currentLocation",u="airPopulation.getLocation",h={md:240,sm:200}},vKIh:function(e,t,r){r.d(t,{Z:function(){return eh}});var a=r("BGKE"),n=r("q1tI"),o=r("Eso5"),l=r("kfjY"),i=r("dDsW"),c=r("a5vB"),s=r("QW8v"),d=r("/npG"),u=(0,d.k)((e,t)=>{let{backgroundColor:r}=t;return{root:{},inner:{position:"relative",minHeight:260,".error-screen":{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",backgroundColor:r},".chart-screen":{position:"relative",zIndex:0}},icon:{flexShrink:0},errorScreenRoot:{[e.fn.smallerThan("sm")]:{justifyContent:"space-evenly"}}}});let h=(0,n.createContext)({});var m=r("2IpA"),g=r("Ag88"),p=r("ovJ4"),f=r("OAL+"),x=(0,d.k)(e=>({root:{},info:{[e.fn.largerThan("sm")]:{alignItems:"flex-start"}},colLeft:{[e.fn.smallerThan("sm")]:{order:2,textAlign:"center"},[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center"}},colRight:{display:"flex",justifyContent:"center",alignItems:"center"}})),v=r("m0Nu"),C=(0,d.k)((e,t)=>{let{size:r,backgroundColor:a}=t;return{root:{display:"flex",gap:24,backgroundColor:a,'button[data-variant="secondary"]':{borderColor:e.colors.gray[2]},[e.fn.smallerThan("sm")]:{gap:16,flexDirection:"column"}},colLeft:{[e.fn.largerThan("sm")]:{order:2}},colRight:{[e.fn.largerThan("sm")]:{width:v.Os[r],flexShrink:0,order:1}},locator:{display:"flex",flexDirection:"column",gap:2}}});let Layout=e=>{let{colLeft:t,colRight:r,styles:l,classNames:i,className:c,...s}=e,{size:d,backgroundColor:u}=(0,n.useContext)(h),{classes:m,cx:g}=C({size:d,backgroundColor:u},{name:"AirPopulation__Layout",styles:l,classNames:i});return(0,a.BX)(o.x,{...s,className:g(c,m.root),children:[(0,a.tZ)(o.x,{className:m.colLeft,children:t}),(0,a.tZ)(o.x,{className:m.colRight,children:r})]})},ErrorScreenGeneral=e=>{let{styles:t,classNames:r,...n}=e,{retryFetchInitData:o}=(0,s.W)(e=>({retryFetchInitData:e.retryFetchInitData}),c.X),{formatMessage:l}=(0,i.Z)(),{classes:d}=x(void 0,{name:"AirPopulation__ErrorScreenGeneral",styles:t,classNames:r});return(0,a.tZ)(Layout,{...n,classNames:{root:d.root,colLeft:d.colLeft,colRight:d.colRight},colLeft:(0,a.BX)(f.K,{spacing:16,className:d.info,children:[(0,a.tZ)(g.T,{size:"h3",children:l({id:"airPopulation.notFound.title",defaultMessage:"Opps!"})}),(0,a.tZ)(g.T,{size:"p2",variant:"secondary",children:l({id:"airPopulation.notFound.description",defaultMessage:"We couldn’t load the Air Pollution Tool right now. Please try again later or refresh the page."})}),(0,a.tZ)(p.B,{size:"lg",variant:"secondary",onClick:o,"data-event-category":"AQI","data-event-action":"retry AQI display","data-event-label":"click to retry",children:l({id:"airPopulation.retryButton.label"})})]}),colRight:(0,a.tZ)("img",{loading:"lazy",alt:"Result not found",width:120,height:120,src:m.C.getAssetPath("airPopulation/not-found.svg")})})};var y=(0,d.k)(e=>({root:{},info:{[e.fn.largerThan("sm")]:{alignItems:"flex-start"}},selector:{[e.fn.smallerThan("sm")]:{alignItems:"center"}},desc:{[e.fn.smallerThan("sm")]:{textAlign:"center"}},colLeft:{[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center"}},colRight:{display:"flex",justifyContent:"center",alignItems:"center"}})),b=r("DKnY"),Z=r("1Hbx"),N=r("IEKS"),I=r("0D4Z"),w=r("t/pd"),T=r("ChHM"),F=r("hXNO"),k=(0,d.k)(e=>({root:{position:"relative"},locator:{},locatorValue:{position:"relative",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:4,".loading-icon":{padding:8,svg:{width:16,height:16}}},selectTarget:{position:"absolute",left:0,bottom:0,right:0,[e.fn.smallerThan("sm")]:{left:"50%",right:"auto"}}})),A=r("c29y"),S=r("VZtU"),L=r("fEsb"),B=r("vaps"),R=r("SPK5"),z=r("Dmus"),E=r("mYVa"),P=(0,d.k)(e=>({root:{display:"flex",flexDirection:"column",gap:8,background:"#fff",border:"1px solid ".concat(e.colors.gray[1]),padding:4,borderRadius:12,width:254,boxShadow:"0px 0px 1px 0px #0000000A, 0px 2px 8px 0px #0000000A, 0px 10px 16px 0px #0000000A",[e.fn.smallerThan("sm")]:{transform:"translateX(-50%)"}},input:{input:{paddingLeft:40}},inputWrapper:{position:"relative"},searchIcon:{position:"absolute",top:10,left:16},item:{padding:"".concat((0,E.h)(8)," ").concat((0,E.h)(12)),transition:"background .2s ease",cursor:"pointer",'&[data-is-current-loc="true"]':{position:"relative",marginBottom:16,"&:before":{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,content:'""',borderBottom:"1px solid ".concat(e.colors.neutral[1])}},'&[data-selected="true"]':{cursor:"default"},'&[data-selected="true"],&:hover':{backgroundColor:e.colors.gray[1],borderRadius:8}}}));let Select=e=>{let{selectedItem:t,data:r=[],onClickItem:l,styles:c,classNames:s}=e,{formatMessage:d}=(0,i.Z)(),{classes:u,theme:h}=P(void 0,{name:"AirPopulation__Select",styles:c,classNames:s}),[m,p]=(0,n.useState)(""),f=(0,n.useMemo)(()=>{let e=(0,z.bG)(m),t=r.filter(t=>t.value===v.Zn||(0,z.bG)(t.label).includes((0,z.bG)(e)));return t.length>0?t:r},[m]);return(0,a.BX)(o.x,{className:u.root,children:[(0,a.BX)(o.x,{className:u.inputWrapper,children:[(0,a.tZ)(A.I,{className:u.input,value:m,onChange:p,placeholder:d({id:"airPopulation.locationSelector.placeholder",defaultMessage:"Search for city"}),"data-event-category":"AQI","data-event-action":"search AQI location","data-event-label":m}),(0,a.tZ)(S.Z,{size:20,color:h.colors.gray[3],className:u.searchIcon})]}),(0,a.tZ)(B.x.Autosize,{mah:320,type:"auto",scrollbarSize:6,children:f.map((e,r)=>{let n=t===e.label;return(0,a.BX)(R.k,{"data-is-current-loc":e.isUseCurrentLocation,"data-selected":n,className:u.item,align:"center",gap:8,onClick:()=>!n&&l(e.value),"data-event-category":"AQI","data-event-action":"choose AQI location","data-event-label":e.label,children:[e.isUseCurrentLocation?(0,a.tZ)(N.Z,{}):(0,a.tZ)(L.Z,{}),(0,a.tZ)(g.T,{size:"p2",children:e.label})]},String(r))})})]})},LocationSelector=e=>{let{styles:t,classNames:r}=e,{formatMessage:d}=(0,i.Z)(),{data:u,selectedValue:m,setSelectedValue:p,loading:f,firstLoading:x,selectorZIndex:C,onChangeValue:y}=(0,n.useContext)(h),{listProvinces:A}=(0,s.W)(e=>({listProvinces:e.listProvinces||[]}),c.X),S=(0,n.useMemo)(()=>[{label:d({id:v.eD}),value:v.Zn,isUseCurrentLocation:!0,icon:N.Z},...(A||[]).map(e=>({label:e,value:e}))],[A]),[L,B]=(0,n.useState)(!1),[R,z]=(0,n.useState)(),E=(0,T.O)(()=>B(!1)),{classes:P}=k(void 0,{name:"AirPopulation__LocationSelector",styles:t,classNames:r}),X=(0,n.useRef)(null),_=(0,F.d)();return(0,n.useEffect)(()=>{if(X.current){let e=X.current.getBoundingClientRect();z({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width})}},[x]),(0,n.useEffect)(()=>{if(u&&X.current){let e=X.current.getBoundingClientRect();z({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width})}},[u]),(0,n.useEffect)(()=>{B(!1)},[_]),(0,a.tZ)(o.x,{className:P.root,children:x?(0,a.tZ)(I.O,{height:24,radius:4,width:140}):(0,a.BX)(o.x,{className:P.locator,children:[(0,a.BX)(o.x,{className:P.locatorValue,onClick:()=>{if(!f){if(X.current){let e=X.current.getBoundingClientRect();z({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width})}B(!0)}},children:[(0,a.tZ)(g.T,{size:"h3",variant:"secondary",children:m===v.Zn?d({id:v.eD}):m}),f?(0,a.tZ)(b.L,{hideText:!0,className:"loading-icon"}):(0,a.tZ)(Z.Z,{size:22,color:"#111111",style:{transform:"rotate(".concat(L?"180deg":0,")")}})]}),(0,a.tZ)(o.x,{"data-target":!0,className:P.selectTarget,ref:X}),(0,a.tZ)(w.h,{children:(0,a.tZ)(l.u,{mounted:!!(L&&R),transition:"fade",children:e=>(0,a.tZ)(o.x,{ref:E,sx:{position:"absolute",top:null==R?void 0:R.top,left:null==R?void 0:R.left,width:null==R?void 0:R.width,borderRadius:8,zIndex:C,...e},children:(0,a.tZ)(Select,{selectedItem:m||"",data:S,onClickItem:e=>{var t,r;p(null===(r=S.filter(t=>t.value===e))||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.label),B(!1),null==y||y(e)}})})})})]})})},ErrorScreenNotFoundResult=e=>{let{styles:t,classNames:r,message:n,...o}=e,{formatMessage:l}=(0,i.Z)(),{classes:c}=y(void 0,{name:"AirPopulation__ErrorScreenNotFoundResult",styles:t,classNames:r});return(0,a.tZ)(Layout,{...o,classNames:{root:c.root,colLeft:c.colLeft,colRight:c.colRight},colLeft:(0,a.BX)(f.K,{spacing:16,className:c.info,children:[(0,a.BX)(f.K,{spacing:2,className:c.selector,children:[(0,a.tZ)(LocationSelector,{}),(0,a.tZ)(g.T,{size:"p3",variant:"error",children:l({id:"airPopulation.notFoundResult.error",defaultMessage:"Please reselect location"})})]}),(0,a.tZ)(g.T,{size:"p2",variant:"secondary",className:c.desc,children:n||l({id:"airPopulation.notFoundResult.description",defaultMessage:"Looks like there was an issue with your selected location. Try selecting it again!"})})]}),colRight:(0,a.tZ)("img",{loading:"lazy",alt:"Result not found",width:120,height:120,src:m.C.getAssetPath("airPopulation/result-not-found.svg")})})};var X=(0,d.k)(e=>({info:{display:"flex",flexDirection:"column",gap:16,[e.fn.largerThan("sm")]:{position:"absolute",top:"20%",left:0,bottom:0}},locator:{display:"flex",flexDirection:"column",gap:2,[e.fn.smallerThan("sm")]:{alignItems:"stretch",textAlign:"center"}},colLeft:{position:"relative",[e.fn.smallerThan("sm")]:{zIndex:2},[e.fn.largerThan("sm")]:{width:"100%"}},colRight:{paddingBottom:20,[e.fn.largerThan("sm")]:{}},infoColLeft:{[e.fn.smallerThan("sm")]:{display:"none"}},infoColRight:{[e.fn.largerThan("sm")]:{display:"none"}},chart:{display:"flex",flexDirection:"column",gap:24,[e.fn.smallerThan("sm")]:{alignItems:"center",gap:32}}})),_=r("yQSt"),D=r("AeFk");let H=(0,D.F4)({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}});var M=(0,d.k)((e,t)=>{var r,a,n,o,l;let{color:i,borderStartColorIndex:c,borderEndColorIndex:s,statusColorIndex:d,valueColorIndex:u,endCircleAngle:h,gapAngleLeft:m,circleAngle:g,firstLoading:p,size:f,borderOutsideColor:x,backgroundChartColor:C}=t,y=null===(r=e.colors[i])||void 0===r?void 0:r[c],b=null===(a=e.colors[i])||void 0===a?void 0:a[s],Z=null===(n=e.colors[i])||void 0===n?void 0:n[d],N=null===(o=e.colors[i])||void 0===o?void 0:o[u],I={display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%"},w=v.Os[f];return{root:{position:"relative",borderRadius:"50%",width:w,height:w,backgroundColor:x,...p&&{overflow:"hidden"}},border:{...I,width:w,height:"".concat(w,"px"),position:"relative",background:"conic-gradient(\n from 180deg,\n ".concat(C," 0deg ").concat(m,"deg,\n ").concat(x," ").concat(m,"deg,\n ").concat(x," ").concat(h,"deg,\n ").concat(C," ").concat(h,"deg ").concat(g,"deg\n )"),"&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,inset:0,borderRadius:"inherit",background:"conic-gradient(\n from 180deg,\n transparent 0deg ".concat(m,"deg,\n ").concat(y," ").concat(m,"deg,\n ").concat(b," var(--deg),\n transparent var(--deg) ").concat(h,"deg,\n transparent ").concat(h,"deg ").concat(g,"deg\n )"),...p&&{animation:"".concat(H," 2s linear infinite"),opacity:.5}}},borderWhite:{...I,width:w-6,height:w-6,backgroundColor:"#fff",zIndex:1},background:{...I,width:"100%",height:"100%",position:"relative","&:before":{content:'""',position:"absolute",top:6,left:6,width:w-18,height:w-18,background:p?e.colors.neutral[0]:null===(l=e.colors[i])||void 0===l?void 0:l[0],opacity:.5,borderRadius:"inherit"}},mainCircle:{...I,position:"relative",flexDirection:"column",width:w-68,height:w-68,backgroundColor:"#fff",boxShadow:"5px 7px 20px ".concat(N,"1F,\n 21px 30px 37px ").concat(N,"1A,\n 48px 67px 50px ").concat(N,"0F"),transition:"all .3s ease",...p&&{boxShadow:"5px 6px 8px ".concat(e.colors.gray[7],"1F,\n 8px 9px 10px ").concat(e.colors.gray[7],"1A,\n 10px 12px 14px ").concat(e.colors.gray[7],"0F")}},label:{},value:{fontSize:(0,E.h)("sm"===f?56:64),lineHeight:(0,E.h)(64),fontWeight:"sm"===f?_.F.halfBold:_.F.semiBold,color:N,marginTop:-10},status:{lineHeight:"".concat((0,E.h)(20)," !important"),color:"#fff"},tagArea:{position:"absolute",top:"calc(100% - 26px)",left:0,right:0,zIndex:1,display:"flex",justifyContent:"center",textAlign:"center"},tag:{backgroundColor:Z,borderRadius:20,padding:"".concat((0,E.h)("sm"===f?3:4)," ").concat((0,E.h)(16)," ").concat((0,E.h)("sm"===f?5:4)),minHeight:"sm"===f?28:32,display:"flex",alignItems:"center",justifyContent:"center",transition:"all .3s ease",opacity:p?0:1}}});r("Vg41");let V=(0,n.memo)(e=>{let{data:t}=(0,n.useContext)(h),{currentAqiusValue:l=0}=t||{},i=(0,n.useRef)(null),c=(0,n.useRef)(null),[s,d]=(0,n.useState)(null),u=(0,n.useRef)(0);return(0,n.useEffect)(()=>{Promise.all([r.e(2138),r.e(9467),r.e(4467),r.e(6966),r.e(5243),r.e(8132),r.e(1375),r.e(4561),r.e(1448),r.e(5465),r.e(1217),r.e(5480),r.e(731),r.e(2050),r.e(2008),r.e(8469),r.e(8214),r.e(1482),r.e(6817),r.e(467),r.e(5951),r.e(9357),r.e(747),r.e(5675),r.e(6753),r.e(4802),r.e(3046),r.e(5745),r.e(3437),r.e(252),r.e(6839),r.e(9424),r.e(5702),r.e(8922),r.e(6399),r.e(553),r.e(2902),r.e(4969),r.e(3257),r.e(6611),r.e(7538),r.e(6894),r.e(5341)]).then(r.t.bind(r,"qTOg",23)).then(e=>{let{default:t}=e;d(()=>t)})},[]),(0,n.useEffect)(()=>{if(!s||!i.current)return;i.current.innerHTML="";let e=document.createElement("span");e.textContent=String(Math.round(Number(l))||0),i.current.appendChild(e);let t=new s({el:e,value:Math.round(Number(l))||0,theme:"default",format:"(,ddd)"});c.current=t,u.current=Math.round(Number(l))||0,setTimeout(()=>t.update(u.current),100)},[s]),(0,n.useEffect)(()=>{if(!c.current)return;let e=Math.round(Number(l))||0,t=u.current;if(u.current=e,e===t)return;let r=Math.abs(e-t),a=Math.max(200,Math.min(30*r,300)),n=document.querySelectorAll(".odometer-ribbon-inner");n.forEach(e=>{e.setAttribute("style","transition-duration: ".concat(a,"ms !important; transition-timing-function: cubic-bezier(0.4,0,0.2,1) !important;"))}),c.current.update(e)},[l]),(0,a.tZ)(o.x,{...e,ref:i,sx:{overflow:"hidden"}})}),O=(0,n.memo)(e=>{let{styles:t,classNames:r}=e,{data:l,firstLoading:i,size:c,borderOutsideColor:s,backgroundChartColor:d}=(0,n.useContext)(h),{color:u="gray",valueColorIndex:m=7,statusColorIndex:p=6,borderEndColorIndex:f=7,borderStartColorIndex:x=3,category:v,currentAqiusValue:C=0}=l||{},y=(0,n.useMemo)(()=>{let e=Math.min((C||0)/500*270,270),t=i?120:e+45;return{gapAngleLeft:45,selectedDeg:t,endCircleAngle:315,circleAngle:360}},[C,i]),{classes:b,cx:Z}=M({color:i?"neutral":u,borderEndColorIndex:f,borderStartColorIndex:x,statusColorIndex:p,valueColorIndex:m,firstLoading:i,size:c,borderOutsideColor:s,backgroundChartColor:d,...y},{name:"AirPopulation__Chart",styles:t,classNames:r}),[N,I]=(0,n.useState)(y.selectedDeg),w=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=y.selectedDeg,t=e-N,r=performance.now(),animate=e=>{let a=Math.min((e-r)/200,1);I(N+t*(1-Math.pow(1-a,3))),a<1&&(w.current=requestAnimationFrame(animate))};return cancelAnimationFrame(w.current),w.current=requestAnimationFrame(animate),()=>cancelAnimationFrame(w.current)},[y.selectedDeg]),(0,a.BX)(o.x,{className:Z(b.root,"chart-root"),style:{"--deg":"".concat(N,"deg")},children:[(0,a.tZ)(o.x,{className:Z(b.border,"chart-border"),children:(0,a.tZ)(o.x,{className:Z(b.borderWhite,"chart-border-white"),children:(0,a.tZ)(o.x,{className:Z(b.background,"chart-background"),children:(0,a.tZ)(o.x,{className:b.mainCircle,children:!i&&(0,a.BX)(a.HY,{children:[(0,a.tZ)(g.T,{size:"title2",variant:"tertiary",className:Z(b.label,"chart-label"),children:"AQI"}),(0,a.tZ)(V,{className:b.value},"main-value")]})})})})}),(0,a.tZ)("div",{className:b.tagArea,children:(0,a.tZ)("div",{className:b.tag,children:(0,a.tZ)(g.T,{size:"sm"===c?"p3":"title2",className:b.status,weight:"semiBold",color:"#fff",children:v})})})]})});var K=r("8vDj");let Information=e=>{var t;let r=(0,K.rZ)(),{firstLoading:l,data:i}=(0,n.useContext)(h),{color:c="gray",description:s,informationIcon:d,valueColorIndex:u=7}=i||{},m="function"==typeof d?d:null;return l?(0,a.BX)(f.K,{spacing:8,...e,children:[(0,a.tZ)(I.O,{height:16,radius:4,width:200}),(0,a.tZ)(I.O,{height:16,radius:4,width:200}),(0,a.tZ)(I.O,{height:16,radius:4,width:130})]}):s?(0,a.BX)(o.x,{sx:{position:"relative",".info-label":{"&:before":{content:'""',display:"inline-block",width:20}},".info-icon":{position:"absolute",top:2,left:0}},...e,children:[m&&(0,a.tZ)(m,{size:16,color:null===(t=r.colors[c])||void 0===t?void 0:t[u],className:"info-icon"}),(0,a.tZ)(g.T,{size:"p3",className:"info-label",children:s})]}):null};var W=r("Wgwc"),Y=r.n(W);let TimeStatus=()=>{let{firstLoading:e,data:t}=(0,n.useContext)(h),{updatedTime:r}=t||{},{formatMessage:o}=(0,i.Z)();return e?(0,a.tZ)(I.O,{sx:{marginTop:6},height:12,radius:4,width:120}):(0,a.tZ)(g.T,{size:"p3",variant:"tertiary",children:o({id:"airPopulation.timeUpdate",defaultMessage:"{time} Update every {from} - {to}h"},{time:Y()(r).format("HH:mm"),from:1,to:2})})},Form=e=>{let{styles:t,classNames:r,className:n,...l}=e,{classes:i}=X(void 0,{name:"AirPopulation__Form",styles:t,classNames:r});return(0,a.tZ)(Layout,{...l,classNames:{colLeft:i.colLeft,colRight:i.colRight},colLeft:(0,a.BX)(o.x,{className:i.info,children:[(0,a.BX)(o.x,{className:i.locator,children:[(0,a.tZ)(LocationSelector,{}),(0,a.tZ)(TimeStatus,{})]}),(0,a.tZ)(o.x,{className:i.infoColLeft,children:(0,a.tZ)(Information,{})})]}),colRight:(0,a.BX)(o.x,{className:i.chart,children:[(0,a.tZ)(O,{}),(0,a.tZ)(o.x,{className:i.infoColRight,children:(0,a.tZ)(Information,{})})]})})},j={in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30%)"},transitionProperty:"transform, opacity"},Body=e=>{let{className:t,styles:r,classNames:d,...m}=e,{notShareLocationErr:g,notLoadResultError:p,backgroundColor:f,size:x}=(0,n.useContext)(h),{formatMessage:v}=(0,i.Z)(),{classes:C,cx:y}=u({size:x,backgroundColor:f},{name:"AirPopulation__Body",styles:r,classNames:d}),{errorInitLoad:b}=(0,s.W)(e=>({errorInitLoad:e.error}),c.X),Z="string"==typeof b,N="string"==typeof p;return(0,a.tZ)(o.x,{...m,className:y(C.root,t,"air-population-body"),children:(0,a.BX)(o.x,{className:C.inner,children:[(0,a.tZ)(l.u,{keepMounted:!0,mounted:!Z&&!N,transition:j,children:e=>(0,a.tZ)(o.x,{className:"chart-screen",style:e,children:(0,a.tZ)(Form,{})})}),(0,a.tZ)(l.u,{mounted:Z,keepMounted:!0,transition:j,children:e=>(0,a.tZ)(o.x,{style:e,className:"error-screen",children:(0,a.tZ)(ErrorScreenGeneral,{classNames:{root:C.errorScreenRoot}})})}),(0,a.tZ)(l.u,{mounted:N||g,transition:j,children:e=>(0,a.tZ)(o.x,{style:e,className:"error-screen",children:(0,a.tZ)(ErrorScreenNotFoundResult,{classNames:{root:C.errorScreenRoot},message:g?v({id:"airPopulation.notShareLocation.error",defaultMessage:"Cannot find your location. Please try again."}):""})})})]})})};var G=r("09QT"),U=r("Cov9"),Q=r("oQBk"),q=r("Fyo5"),J=r("Tk9B"),$=r("TD78"),ee=(0,d.k)(e=>({root:{backgroundColor:e.colors.neutral[0],padding:12},icon:{flexShrink:0}})),et=r("QJsO"),er=r("15qF"),ea=(0,d.k)(()=>({root:{position:"relative",cursor:"pointer",height:40,width:40},item:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",position:"absolute",top:0,left:0,right:0,bottom:0}})),en=r("vHtu"),eo=(0,d.k)(e=>({root:{},body:{padding:16,[e.fn.largerThan("sm")]:{padding:"".concat((0,E.h)(24)," ").concat((0,E.h)(24)," ").concat((0,E.h)(24)," ").concat((0,E.h)(48))}},modalBody:{padding:0},disclaimer:{justifyContent:"center"}}));let ModalDetail=e=>{let{className:t,...r}=e,{classes:n}=eo(void 0,{name:"AirPopulation__ModalDetail"});return(0,a.tZ)(eh,{selectorZIndex:500,children:e=>{var t;return(0,a.BX)(en.M,{...r,title:null==e?void 0:null===(t=e.cardInfo)||void 0===t?void 0:t.title,size:600,classNames:{body:n.modalBody},zIndex:500,children:[(0,a.tZ)(Body,{className:n.body}),(0,a.tZ)(eh.Disclaimer,{className:n.disclaimer})]})}})};var el=r("P60J"),ei=r("qe1T");let ec=(0,D.F4)({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}});var es=(0,d.k)((e,t)=>{var r,a,n,o;let{color:l,borderStartColorIndex:i,borderEndColorIndex:c,valueColorIndex:s,endCircleAngle:d,gapAngleLeft:u,circleAngle:h,firstLoading:m,selectedDeg:g,size:p}=t,f=null===(r=e.colors[l])||void 0===r?void 0:r[i],x=null===(a=e.colors[l])||void 0===a?void 0:a[c],v=null===(n=e.colors[l])||void 0===n?void 0:n[s],C={display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%"},y="md"===p?40:32,b="md"===p?40:32;return{root:{position:"relative",borderRadius:"50%",width:y,height:b,".warning-icon":{position:"absolute",top:0,left:"95%",zIndex:1}},border:{...C,width:y,height:y,position:"relative",background:null===(o=e.colors[l])||void 0===o?void 0:o[0],"&:before":{transform:"rotate(135deg)",content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:"conic-gradient(\n from 180deg,\n transparent 0deg ".concat(u,"deg,\n ").concat(f," ").concat(u,"deg,\n ").concat(x," ").concat(g,"deg,\n transparent ").concat(g,"deg ").concat(d,"deg,\n transparent ").concat(d,"deg ").concat(h,"deg\n )"),...m&&{animation:"".concat(ec," 2s linear infinite"),opacity:.5}}},borderWhite:{...C,flexDirection:"column",justifyContent:"center",width:y-4,height:y-4,backgroundColor:e.colors.neutral[0],zIndex:1},label:{fontSize:(0,E.h)("md"===p?8:6),lineHeight:(0,E.h)("md"===p?12:10)},value:{fontSize:(0,E.h)("md"===p?15:13),lineHeight:(0,E.h)("md"===p?15:13),fontWeight:"md"===p?_.F.semiBold:_.F.halfBold,color:v}}});let ed=(0,n.memo)(e=>{let{size:t,styles:r,classNames:l}=e,{data:i,firstLoading:c,size:s}=(0,n.useContext)(h),{color:d="gray",valueColorIndex:u=7,borderEndColorIndex:m=7,borderStartColorIndex:p=3,currentAqiusValue:f=0,keyCategory:x}=i||{},v=(0,n.useMemo)(()=>{let e=Math.min((f||0)/500*270,270),t=c?120:e+45;return{gapAngleLeft:45,selectedDeg:t,endCircleAngle:315,circleAngle:360}},[f,c]),{classes:C,cx:y}=es({color:c?"neutral":d,borderEndColorIndex:m,borderStartColorIndex:p,valueColorIndex:u,firstLoading:c,size:t||s,...v,selectedDeg:v.selectedDeg},{name:"AirPopulation__SimpleChart",styles:r,classNames:l});return(0,a.BX)(o.x,{className:C.root,children:[(0,a.tZ)(o.x,{className:C.border,children:(0,a.tZ)(o.x,{className:C.borderWhite,children:!c&&(0,a.BX)(a.HY,{children:[(0,a.tZ)(g.T,{size:"title2",variant:"secondary",className:y(C.label,"chart-label"),children:"AQI"}),(0,a.tZ)(o.x,{className:C.value,children:f})]})})}),x===ei.P.HAZARDOUS&&(0,a.tZ)(el.Z,{className:"warning-icon",color:"red",size:12})]})}),eu={in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(50%)"},transitionProperty:"transform, opacity"};var eh=Object.assign(e=>{let{children:t,size:r="md",borderOutsideColor:o,backgroundChartColor:l,backgroundColor:d="#fff",selectorZIndex:u}=e,{formatMessage:g}=(0,i.Z)(),{cardInfo:p,currentLocation:f,setCurrentLocation:x,listProvinces:C,currentData:y,fetchInitData:b}=(0,s.W)(e=>({cardInfo:e.cardInfo,listProvinces:e.listProvinces,currentData:e.currentData,currentLocation:e.currentLocation,fetchInitData:e.fetchInitData,setCurrentLocation:e.setCurrentLocation}),c.X),[Z,N]=(0,n.useState)(null),[I,w]=(0,n.useState)(null),[T,F]=(0,n.useState)(!0),[k,A]=(0,n.useState)(!1),[S,L]=(0,n.useState)(null),[B,R]=(0,n.useState)(!1),z=(0,K.rZ)(),E=(0,n.useCallback)(async()=>{try{if(A(!0),null==f?void 0:f.location)handleFetchResult({type:"geo",lat:String(f.location.latitude),lng:String(f.location.longitude)});else{let e=await (0,J.k)();(null==e?void 0:e.location)?(handleFetchResult({type:"geo",lat:String(e.location.latitude),lng:String(e.location.longitude)}),x(e)):(x(e),R(!0))}}catch(e){}finally{A(!1)}},[]),handleFetchResult=async e=>{try{A(!0);let t=await (0,G.d)(Q.y.HEALTH_TOOL.GET_AIR_POPULATION_SPECIFIC_PROVINCE,{params:e}),r=(0,U.h)(null==t?void 0:t.data),a=(0,q.rx)(r,"geo"===e.type);if(a&&(null==r?void 0:r.keyCategory)&&(0,q.B9)(r.keyCategory)){let e=v.Ti[null==r?void 0:r.keyCategory];w({...e,...r}),L(null)}else L("")}catch(e){L("")}finally{A(!1),R(!1)}};return(0,n.useEffect)(()=>{b()},[b]),(0,n.useEffect)(()=>{(null==C?void 0:C.length)&&"number"==typeof(null==y?void 0:y.currentAqiusValue)&&F(!1)},[C,y]),(0,n.useEffect)(()=>{if(!y)return;let e=v.Ti[null==y?void 0:y.keyCategory];w({...e,...y}),N(f?g({id:v.eD}):null==y?void 0:y.province)},[y]),(0,a.tZ)(_.T,{variant:_.C.LEADGEN,children:(0,a.tZ)(h.Provider,{value:{notShareLocationErr:B,notLoadResultError:S,data:I,setData:w,loading:k,firstLoading:T,heading:"Air polulation",disclaimer:"Information is for reference only and not a substitute for medical advice.",avatar:m.C.getAssetPath("tiki/maskcot.png"),size:r,borderOutsideColor:o||z.colors.neutral[0],backgroundChartColor:l||"#fff",backgroundColor:d,selectorZIndex:u,selectedValue:Z,setSelectedValue:N,onChangeValue:e=>{e===v.Zn?E():handleFetchResult({type:"state",name:e})},handleClickCurrentLocation:E},children:"function"==typeof t?t({cardInfo:p,result:I}):t||(0,a.tZ)(Body,{})})})},{Disclaimer:e=>{let{className:t,...r}=e,{classes:n,theme:o,cx:l}=ee(void 0,{name:"AirPopulation__Disclaimer"}),{disclaimer:i}=(0,s.W)(e=>{var t;return{disclaimer:null===(t=e.cardInfo)||void 0===t?void 0:t.disclaimer}},c.X);return i?(0,a.BX)(R.k,{gap:4,...r,className:l(t,n.root),children:[(0,a.tZ)($.Z,{size:16,color:o.colors.yellow[8],className:n.icon}),(0,a.tZ)(g.T,{size:"c1",children:i})]}):null},Heading:()=>{let{heading:e}=(0,n.useContext)(h);return e?(0,a.tZ)(g.T,{size:"h3",children:e}):null},Body:Body,Chart:O,IconChart:e=>{let{dataTracking:t,className:r,...i}=e,{firstLoading:c,size:s}=(0,n.useContext)(h),[d,u]=(0,n.useState)(!1),[m,g]=(0,n.useState)(!1),[p,f]=(0,n.useState)(!1),{classes:x,cx:v}=ea(void 0,{name:"AirPopulation__IconChart"});return(0,n.useEffect)(()=>{c||(g(e=>!e),u(!0))},[c]),(0,n.useEffect)(()=>{if(!d)return;let e=setInterval(()=>{g(e=>!e)},4e3);return()=>clearInterval(e)},[d]),(0,a.BX)(a.HY,{children:[(0,a.BX)(o.x,{...i,className:v(x.root,r),onClick:()=>f(!0),"data-event-category":null==t?void 0:t.dataEventCategory,"data-event-action":null==t?void 0:t.dataEventAction,"data-event-label":null==t?void 0:t.dataEventLabel,children:[(0,a.tZ)(o.x,{className:x.item,children:(0,a.tZ)(l.u,{mounted:!m,transition:eu,duration:400,timingFunction:"ease",children:e=>(0,a.tZ)(o.x,{style:e,children:(0,a.tZ)(et.z,{inline:!0,processing:!0,color:"green",size:8,sx:{marginTop:3},children:(0,a.tZ)(er.Z,{size:"md"===s?32:24})})})})}),(0,a.tZ)(o.x,{className:x.item,children:(0,a.tZ)(l.u,{mounted:m,transition:eu,duration:400,timingFunction:"ease",children:e=>(0,a.tZ)(o.x,{style:e,children:(0,a.tZ)(ed,{size:s})})})})]}),(0,a.tZ)(ModalDetail,{opened:p,onClose:()=>f(!1)})]})}})},"HPD/":function(e,t,r){r.d(t,{q:function(){return AirPopulationEmbedCard}});var a=r("BGKE"),n=r("NYLl"),o=r("vKIh");let AirPopulationEmbedCard=e=>{let{formProps:t,cardProps:r}=e;return(0,a.tZ)(o.Z,{...t,children:e=>{let{cardInfo:t}=e;return(0,a.BX)(n.H,{...r,children:[(0,a.tZ)(n.H.Banner,{isRevamp:!0,icon:(0,a.tZ)("img",{alt:"health-tool-icon",src:null==t?void 0:t.featuredImage,loading:"lazy"}),medicalReview:void 0,heading:(null==t?void 0:t.title)||"",disclaimer:(null==t?void 0:t.disclaimer)||""}),(0,a.tZ)(n.H.Body,{sx:e=>({padding:"24px 16px",[e.fn.largerThan("sm")]:{padding:"40px 48px"}}),children:(0,a.tZ)(o.Z.Body,{})})]})}})}},"YL+3":function(e,t,r){r.d(t,{A:function(){return CustomSelect}});var a=r("BGKE"),n=r("q1tI"),o=r("Ag88"),l=r("1Hbx"),i=r("Eso5"),c=r("SPK5"),s=r("kfjY"),d=r("vaps"),u=r("ChHM"),h=r("hXNO"),m=r("/npG"),g=r("mYVa"),p=(0,m.k)(e=>({root:{position:"relative"},selectedLabel:{padding:"".concat((0,g.h)(4)," 0"),cursor:"pointer",userSelect:"none",maxWidth:200},selectedLabelText:{},item:{userSelect:"none",whiteSpace:"nowrap",padding:"".concat((0,g.h)(8)," ").concat((0,g.h)(12)),transition:"background .2s ease",cursor:"pointer",'&[data-is-current-loc="true"]':{position:"relative",marginBottom:16,"&:before":{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,content:'""',borderBottom:"1px solid ".concat(e.colors.neutral[1])}},'&[data-selected="true"]':{cursor:"default",backgroundColor:e.colors.blue[0]},"&:hover":{backgroundColor:e.colors.gray[1]}},dropdownList:{minWidth:120,maxWidth:200,background:"#fff",position:"absolute",top:"100%",right:0,borderRadius:8,boxShadow:"0px 0px 1px 0px #0000000A, 0px 2px 8px 0px #0000000A, 0px 10px 16px 0px #0000000A"}}));let CustomSelect=e=>{var t;let{value:r,data:m=[],onSelectItem:g,styles:f,classNames:x,className:v,...C}=e,{classes:y,cx:b}=p(void 0,{name:"CustomSelect__Select",styles:f,classNames:x}),Z=(0,h.d)(),[N,I]=(0,n.useState)(!1),w=(0,u.O)(()=>I(!1)),[T,F]=(0,n.useState)("string"==typeof r&&(null===(t=m.filter(e=>e.value===r))||void 0===t?void 0:t[0])||null);return(0,a.BX)(i.x,{...C,className:b(y.root,v),ref:w,children:[(0,a.BX)(c.k,{justify:"space-between",align:"center",gap:8,onClick:()=>I(e=>!e),className:y.selectedLabel,children:[(0,a.tZ)(o.T,{className:y.selectedLabelText,size:Z?"p3":"p4",lineClamp:1,children:null==T?void 0:T.label}),(0,a.tZ)(l.Z,{size:20})]}),(0,a.tZ)(s.u,{mounted:N,transition:"fade",children:e=>(0,a.tZ)(i.x,{style:e,children:(0,a.tZ)(d.x.Autosize,{mah:320,type:"auto",scrollbarSize:6,className:y.dropdownList,children:m.map((e,t)=>{let r=(null==T?void 0:T.value)===e.value;return(0,a.tZ)(c.k,{"data-selected":r,className:y.item,align:"center",gap:8,onClick:()=>{r||(I(!1),g(e),F(e))},children:(0,a.tZ)(o.T,{size:Z?"p3":"p4",weight:r?"halfBold":"regular",lineClamp:1,children:e.label})},String(t))})})})})]})}},lMcb:function(e,t,r){r.d(t,{Z:function(){return T}});var a=r("BGKE"),n=r("Eso5"),o=r("C/sX"),l=r("q1tI");let i=(0,l.createContext)({});var c=r("iuhU");let FeatureCardContent=e=>{let{children:t,className:r,...o}=e;return(0,a.tZ)(n.x,{...o,className:(0,c.default)(r,"card-content"),children:t})};FeatureCardContent.displayName="FeatureCardContent";var s=r("Ag88"),d=r("hXNO");let FeatureCardHeading=e=>{let{children:t,...r}=e,n=(0,d.d)();return(0,a.tZ)(s.T,{size:n?"h4":"h2",as:"h2",variant:"primary",weight:"halfBold",...r,children:t})};FeatureCardHeading.displayName="FeatureCardHeading";var u=r("SPK5");let FeatureCardIcon=e=>{let{src:t}=e;return t?(0,a.tZ)(u.k,{align:"center",justify:"center",sx:e=>({img:{width:16,height:16},[e.fn.largerThan("sm")]:{boxShadow:"0px 0px 1px 0px #0000000A,\n0px 2px 8px 0px #0000000A,\n0px 10px 16px 0px #0000000A\n",width:80,height:80,borderRadius:"50%",img:{width:40,height:40}}}),children:(0,a.tZ)("img",{loading:"lazy",src:t,alt:""})}):null};FeatureCardIcon.displayName="FeatureCardIcon";var h=r("/npG"),m=(0,h.k)(e=>({root:{[e.fn.largerThan("sm")]:{paddingLeft:48,paddingRight:48}}}));let FeatureCardInner=e=>{let{children:t,styles:r,classNames:o,className:l,...i}=e,{classes:c,cx:s}=m(void 0,{name:"FeatureCard__Inner",styles:r,classNames:o});return(0,a.tZ)(n.x,{className:s("inner-section",l,c.root),...i,children:t})};FeatureCardInner.displayName="FeatureCardInner";let FeatureCardLeftContent=e=>{let{children:t}=e;return(0,a.tZ)(n.x,{children:t})};FeatureCardLeftContent.displayName="FeatureCardLeftContent";let FeatureCardRightContent=e=>{let{children:t}=e;return(0,a.tZ)(n.x,{children:t})};FeatureCardRightContent.displayName="FeatureCardRightContent";var g=(0,h.k)(e=>({root:{},icon:{display:"inline-block",verticalAlign:"middle",img:{display:"block"}},label:{display:"inline-block",verticalAlign:"middle",marginLeft:8,color:e.colors.gray[6],textTransform:"uppercase"}}));let FeatureCardSectionName=e=>{let{icon:t="",children:r,styles:o,classNames:c,className:d,...u}=e,{url:h}=(0,l.useContext)(i),{classes:m,cx:p}=g(void 0,{name:"FeatureCard__SectionName",styles:o,classNames:c});return(0,a.BX)(n.x,{...u,className:p(m.root,d),component:h?"a":"div",href:h,children:[t&&(0,a.tZ)(n.x,{className:m.icon,children:"string"==typeof t?(0,a.tZ)("img",{loading:"lazy",width:20,height:20,src:t,alt:""}):t}),(0,a.tZ)(s.T,{size:"title2",weight:"semiBold",as:"span",className:m.label,children:r})]})};FeatureCardSectionName.displayName="FeatureCardSectionName";var p=r("ovJ4"),f=r("le9Y"),x=(0,h.k)(e=>({root:{borderRadius:44,[e.fn.smallerThan("sm")]:{width:"100%"}}}));let FeatureCardViewAll=e=>{let{children:t,href:r,styles:n,classNames:o,className:c,...d}=e,{classes:u,cx:h}=x(void 0,{name:"FeatureCard__VerticalCenterLayout",styles:n,classNames:o}),{color:m,url:g}=(0,l.useContext)(i),v=r||g;return v?(0,a.tZ)(p.B,{className:h(u.root,c),component:"a",variant:"secondary",size:"lg",rightIcon:(0,a.tZ)(f.Z,{color:"currentColor",size:20}),color:"gray"===m?"yellow":m||"green",withColorHover:!0,href:v,...d,children:(0,a.tZ)(s.T,{size:"p1",color:"inherit",weight:"semiBold",children:t})}):null};FeatureCardViewAll.displayName="FeatureCardViewAll";var v=(0,h.k)((e,t)=>{var r,a;let{color:n}=t;return{root:{...n&&{backgroundColor:null===(a=e.colors)||void 0===a?void 0:null===(r=a[n])||void 0===r?void 0:r[0]},[e.fn.largerThan("sm")]:{borderRadius:24}},inner:{},header:{}}}),C=r("mYVa"),y=r("OAL+"),b=r("frWj");let HorizontalLayout=()=>{let{sectionName:e,heading:t,content:r,viewAll:o}=(0,l.useContext)(i);return(0,a.BX)(u.k,{sx:e=>({[e.fn.smallerThan("sm")]:{gap:24,flexDirection:"column",alignItems:"stretch",padding:"".concat((0,C.h)(40)," ").concat((0,C.h)(16))},[e.fn.largerThan("sm")]:{alignItems:"center",gap:64,padding:48}}),children:[(0,a.tZ)(n.x,{sx:e=>({[e.fn.largerThan("sm")]:{width:345,flexShrink:0}}),children:(0,a.BX)(y.K,{spacing:24,children:[(0,a.BX)(y.K,{sx:e=>({gap:12,[e.fn.largerThan("sm")]:{gap:16}}),children:[e,t]}),(0,a.tZ)(b.z,{smallerThan:"sm",styles:{display:"none "},children:(0,a.tZ)(n.x,{children:o})})]})}),(0,a.tZ)(n.x,{sx:e=>({[e.fn.largerThan("sm")]:{width:"calc(100% - 345px - 64px)"}}),children:r}),(0,a.tZ)(b.z,{largerThan:"sm",styles:{display:"none "},children:(0,a.tZ)(n.x,{children:o})})]})};var Z=(0,h.k)(e=>({root:{gap:24,padding:"".concat((0,C.h)(40)," ").concat((0,C.h)(16)),[e.fn.largerThan("sm")]:{padding:48}},body:{},header:{gap:12,[e.fn.largerThan("sm")]:{gap:24}}}));let VerticalLayout=e=>{let{styles:t,className:r,classNames:o}=e,{sectionName:c,heading:s,content:d}=(0,l.useContext)(i),{classes:u,cx:h}=Z(void 0,{name:"FeatureCard__VerticalLayout",styles:t,classNames:o});return(0,a.BX)(y.K,{className:h(r,u.root),children:[(0,a.BX)(y.K,{className:u.header,children:[c,s]}),(0,a.tZ)(n.x,{className:u.body,children:d})]})};var N=(0,h.k)(e=>({inner:{},header:{gap:12,[e.fn.smallerThan("sm")]:{padding:"".concat((0,C.h)(24)," ").concat((0,C.h)(24)," 0")},[e.fn.largerThan("sm")]:{alignItems:"center",gap:16,padding:40}}}));let VerticalCenterLayout=e=>{let{styles:t,classNames:r,...o}=e,{sectionName:c,icon:s,heading:d,content:u,viewAll:h}=(0,l.useContext)(i),{classes:m}=N(void 0,{name:"FeatureCard__VerticalCenterLayout",styles:t,classNames:r});return(0,a.BX)(y.K,{className:m.inner,...o,children:[(0,a.BX)(y.K,{className:m.header,children:[c,s,d,h&&(0,a.tZ)(b.z,{smallerThan:"sm",styles:{display:"none"},children:(0,a.tZ)(n.x,{children:h})})]}),u,h&&(0,a.tZ)(b.z,{largerThan:"sm",styles:{display:"none"},children:(0,a.tZ)(n.x,{className:"viewall-bottom",sx:{padding:"0 ".concat((0,C.h)(16)," ").concat((0,C.h)(16)," ").concat((0,C.h)(16))},children:h})})]})};var I=(0,h.k)(e=>({inner:{gap:24,[e.fn.largerThan("sm")]:{gap:32}},header:{gap:8,alignItems:"center",textAlign:"center",[e.fn.largerThan("sm")]:{alignItems:"flex-start"}}}));let VerticalCenterLayoutV2=e=>{let{styles:t,classNames:r,...o}=e,{sectionName:c,icon:s,heading:d,content:u,viewAll:h}=(0,l.useContext)(i),{classes:m}=I(void 0,{name:"FeatureCard__VerticalCenterLayoutV2",styles:t,classNames:r});return(0,a.BX)(y.K,{className:m.inner,...o,children:[(0,a.BX)(y.K,{className:m.header,children:[c,s,d,h&&(0,a.tZ)(b.z,{largerThan:"sm",styles:{display:"none"},children:(0,a.tZ)(n.x,{children:h})})]}),u]})};var w=r("ENdw");let FeatureCard=e=>{let{layout:t="vertical",color:r,children:l,styles:c,className:s,classNames:d,url:u,...h}=e,{classes:m,cx:g}=v({color:r},{name:"FeatureCard",styles:c,classNames:d}),p={sectionName:null,icon:null,heading:null,viewAll:null,content:null,left:null,right:null,inner:null},f=Array.isArray(l)?l:[l];return f.forEach(e=>{if(!(null==e?void 0:e.type))return;let t=e.type.displayName;switch(t){case"FeatureCardSectionName":p.sectionName=e;break;case"FeatureCardHeading":p.heading=e;break;case"FeatureCardIcon":p.icon=e;break;case"FeatureCardViewAll":p.viewAll=e;break;case"FeatureCardContent":p.content=e;break;case"FeatureCardLeftContent":p.left=e;break;case"FeatureCardRightContent":p.right=e;break;case"FeatureCardInner":p.inner=e}}),(0,a.tZ)(i.Provider,{value:{color:r,url:u,...p},children:(0,a.tZ)(n.x,{className:g(m.root,s),...h,children:"two-columns"===t?(0,a.tZ)(o.r,{children:l}):t===w.N.Horizontal?(0,a.tZ)(HorizontalLayout,{}):t===w.N.Vertical?(0,a.tZ)(VerticalLayout,{}):t===w.N.VerticalCenter?(0,a.tZ)(VerticalCenterLayout,{classNames:{inner:m.inner,header:m.header}}):t===w.N.VerticalCenterV2?(0,a.tZ)(VerticalCenterLayoutV2,{}):l})})};FeatureCard.SectionName=FeatureCardSectionName,FeatureCard.Heading=FeatureCardHeading,FeatureCard.Icon=FeatureCardIcon,FeatureCard.ViewAll=FeatureCardViewAll,FeatureCard.Content=FeatureCardContent,FeatureCard.LeftContent=FeatureCardLeftContent,FeatureCard.RightContent=FeatureCardRightContent,FeatureCard.Inner=FeatureCardInner;var T=FeatureCard},ENdw:function(e,t,r){var a,n;r.d(t,{N:function(){return a}}),(n=a||(a={})).Vertical="vertical",n.VerticalCenter="verticalCenter",n.Horizontal="horizontal",n.TwoColumns="two-columns",n.VerticalCenterV2="vertical-center-v2"}}]);