1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{4305:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(5903)}])},6243:function(e,t,r){"use strict";var i=r(1527),n=r(2578),a=r(6419);t.Z=()=>(0,i.jsx)(n.xu,{children:(0,i.jsx)(a.x,{children:"Failed to Fetch Data"})})},7783:function(e,t,r){"use strict";var i=r(1527),n=r(2578),a=r(701);t.Z=()=>(0,i.jsx)(n.xu,{width:"100%",textAlign:"center",marginY:4,children:(0,i.jsx)(a.D,{isIndeterminate:!0,color:"orange.400"})})},1944:function(e,t,r){"use strict";r.d(t,{XW:function(){return v},_f:function(){return m},I0:function(){return p}});var i=r(1527),n=r(1153),Error=r(6243),a=r(7783),l=r(2578),o=r(5087);let s=(0,o.E)(l.xu);var d=r(377),c=r(6419),x=r(9253),u=r.n(x);let f=e=>Intl.NumberFormat("id-ID",{maximumFractionDigits:0}).format(e);var g=e=>{let{value:t,title:r,color:n,valueColor:a="white",titleColor:o="white",asText:d=!1,flex:x}=e;return(0,i.jsx)(s,{display:"flex",background:d?void 0:n,borderRadius:15,height:d?void 0:100,boxShadow:d?void 0:"0px 20px 20px -16px rgba(0, 0, 0, 0.25);",alignItems:"center",marginY:3,flexBasis:x?"47%":void 0,_odd:{marginRight:x?"3%":void 0},_even:{marginLeft:x?"3%":void 0},variants:{before:{opacity:0,y:20,scale:.8,transition:{type:"spring",damping:16,stiffness:200}},after:{opacity:1,y:0,scale:1,transition:{type:"spring",damping:16,stiffness:200}}},children:(0,i.jsxs)(l.xu,{flexBasis:"100%",textAlign:"center",children:[(0,i.jsx)(c.x,{color:o,fontWeight:"500",fontSize:x?"1.25rem":"1.5rem",children:(0,i.jsx)(u(),{value:t,formatValue:f})}),(0,i.jsx)(c.x,{color:a,fontSize:x?"0.5rem":"0.625rem",textTransform:"uppercase",fontWeight:"light",letterSpacing:"4px",children:r})]})})},h=e=>{let{value:t,title:r,valueColor:n,titleColor:a,textAlign:o,flexBasis:d}=e;return(0,i.jsx)(s,{borderRadius:15,alignItems:"center",marginY:4,flexBasis:d,variants:{before:{opacity:0,y:20,scale:.8,transition:{type:"spring",damping:16,stiffness:200}},after:{opacity:1,y:0,scale:1,transition:{type:"spring",damping:16,stiffness:200}}},children:(0,i.jsxs)(l.xu,{flexBasis:"100%",textAlign:o,children:[(0,i.jsx)(c.x,{color:n,fontWeight:"500",fontSize:"1.25rem",children:(0,i.jsx)(u(),{value:t,formatValue:f})}),(0,i.jsx)(c.x,{color:a,fontSize:"0.5rem",textTransform:"uppercase",fontWeight:"light",letterSpacing:"4px",children:r})]})})},v=e=>{let{country:t}=e,{data:r,isError:l,isLoading:o}=(0,d.N)(t);return o?(0,i.jsx)(a.Z,{}):l||!r?(0,i.jsx)(Error.Z,{}):(0,i.jsx)(s,{variants:{before:{},after:{transition:{staggerChildren:.06}}},initial:"before",animate:"after",children:(0,i.jsxs)(n.k,{children:[(0,i.jsx)(h,{value:r.confirmed.value,title:"confirmed",valueColor:"orange.500",titleColor:"orange.600",textAlign:"left",flexBasis:"33%"}),(0,i.jsx)(h,{value:r.recovered.value,title:"recovered",valueColor:"teal.400",titleColor:"green.400",textAlign:"center",flexBasis:"33%"}),(0,i.jsx)(h,{value:r.deaths.value,title:"deaths",valueColor:"red.300",titleColor:"red.400",textAlign:"right",flexBasis:"33%"})]})})},m=e=>{let{confirmedValue:t,recoveredValue:r,deathsValue:a}=e;return(0,i.jsxs)(s,{variants:{before:{},after:{transition:{staggerChildren:.06}}},initial:"before",animate:"after",children:[(0,i.jsx)(g,{value:t,title:"confirmed",color:"linear-gradient(85.21deg, #DD6B20 0%, #F6AD55 100%);",valueColor:"white",titleColor:"white"}),(0,i.jsxs)(n.k,{children:[(0,i.jsx)(g,{value:r,title:"recovered",color:"linear-gradient(71.78deg, #319795 0%, #81E6D9 99.11%);",valueColor:"white",titleColor:"white",flex:!0}),(0,i.jsx)(g,{value:a,title:"deaths",color:"linear-gradient(69.82deg, #822727 0%, #F56565 100%);",valueColor:"white",titleColor:"white",flex:!0})]})]})},p=e=>{let{confirmedValue:t,treatedValue:r,recoveredValue:n,deathsValue:a,flex:l=!1}=e;return(0,i.jsxs)(s,{variants:{before:{},after:{transition:{staggerChildren:.06}}},initial:"before",animate:"after",marginBottom:8,display:l?"flex":void 0,flexWrap:l?"wrap":"inherit",children:[(0,i.jsx)(g,{asText:!0,value:t,title:"confirmed",valueColor:l?"yellow.400":void 0,titleColor:l?"yellow.500":void 0,flex:l}),r&&(0,i.jsx)(g,{asText:!0,value:r,title:"treated",valueColor:l?"orange.400":void 0,titleColor:l?"orange.400":void 0,flex:l}),(0,i.jsx)(g,{asText:!0,value:n,title:"recovered",valueColor:l?"teal.400":void 0,titleColor:l?"green.400":void 0,flex:l}),(0,i.jsx)(g,{asText:!0,value:a,title:"deaths",valueColor:l?"red.300":void 0,titleColor:l?"red.400":void 0,flex:l})]})}},377:function(e,t,r){"use strict";r.d(t,{N:function(){return n}});var i=r(5363);let n=e=>(0,i.v)({path:"".concat("/countries","/").concat(e)})},5363:function(e,t,r){"use strict";r.d(t,{v:function(){return l}});var i=r(4707),n=r(4641);let a=e=>{let{url:t,params:r,method:i="GET"}=e;return(0,n.Z)({url:t,params:r,method:i,baseURL:"https://covid19.mathdro.id/api"}).then(e=>e.data)},l=e=>{let{path:t,method:r,params:n,fallbackData:l}=e,{data:o,error:s,mutate:d}=(0,i.ZP)({url:t,method:r,params:n},a,{fallbackData:l});return{data:o,isLoading:!s&&!o,isError:s,mutate:d}}},5903:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return k},default:function(){return D}});var i=r(1527),n=r(2578),a=r(1153),l=r(2270),o=r(6419),s=r(959),d=r(6053),Error=r(6243),c=r(7783),x=r(1944),u=r(5363);let f=e=>(0,u.v)({path:"/countries",fallbackData:e});var g=e=>{let{countryListFallback:t}=e,{data:r,isError:a,isLoading:u}=f(t),[g,h]=s.useState(""),v=s.useMemo(()=>null==r?void 0:r.countries.map(e=>({value:e.name,label:e.name})),[null==r?void 0:r.countries]);return u?(0,i.jsx)(c.Z,{}):a||!r?(0,i.jsx)(Error.Z,{}):(0,i.jsxs)(n.xu,{marginBottom:12,paddingX:2,flexBasis:["100%","100%","50%"],children:[(0,i.jsx)(l.X,{fontSize:"1rem",fontWeight:"300",alignSelf:"center",textAlign:"center",marginBottom:4,children:"Search by country:"}),(0,i.jsx)(d.ZP,{placeholder:(0,i.jsx)(o.x,{children:"Select Country..."}),options:v,value:""===g?null:{value:g,label:g},styles:{singleValue:e=>({...e,color:"#4A5568",fontWeight:"600"}),option:e=>({...e,color:"#4A5568"})},isClearable:!0,onChange:e=>{if(!e){h("");return}h(e.value)}}),""!==g&&(0,i.jsx)(x.XW,{country:g})]})},h=r(8833),v=r.n(h);let m=e=>(0,u.v)({path:"/",fallbackData:e}),p=v()(()=>r.e(660).then(r.bind(r,6660)),{loadableGenerated:{webpack:()=>[6660]},ssr:!1});var j=e=>{let{globalDataFallback:t}=e,{data:r,isLoading:a,isError:o}=m(t);return a?(0,i.jsx)(c.Z,{}):o||!r?(0,i.jsx)(Error.Z,{}):(0,i.jsxs)(n.xu,{flexBasis:["100%","100%","50%"],paddingLeft:["none","none","5%"],children:[(0,i.jsxs)(n.xu,{marginY:8,children:[(0,i.jsx)(l.X,{fontSize:"2.25rem",fontWeight:"500",alignSelf:"center",children:"Global Data"}),(0,i.jsx)(p,{time:r.lastUpdate})]}),(0,i.jsx)(x._f,{confirmedValue:r.confirmed.value,recoveredValue:r.recovered.value,deathsValue:r.deaths.value})]})},b=r(2086),w=()=>(0,i.jsxs)(a.k,{flexBasis:["100%","100%","50%"],children:[(0,i.jsx)(b.E,{src:"/medical-mask-pana.svg",width:"60%"}),(0,i.jsx)(o.x,{marginLeft:"auto",flexBasis:"40%",maxWidth:"30%",textAlign:"right",alignSelf:"center",fontSize:"1.125rem",fontWeight:"500",children:"Stay Safe, Keep Social Distancing"})]}),C=r(4799),S=r.n(C),y=r(377);let _=v()(()=>r.e(660).then(r.bind(r,6660)),{loadableGenerated:{webpack:()=>[6660]},ssr:!1});var B=()=>{let{data:e,isLoading:t,isError:r}=(0,y.N)("IDN");return t?(0,i.jsx)(c.Z,{}):r||!e?(0,i.jsx)(Error.Z,{}):(0,i.jsxs)(n.xu,{textAlign:"center",background:"linear-gradient(29.55deg, #822727 0%, #ED64A6 100%);",borderRadius:15,paddingBottom:8,paddingTop:1,boxShadow:"0px 20px 20px -16px rgba(0, 0, 0, 0.25);",color:"white",flexBasis:["100%","100%","45%"],marginLeft:["none","none","5%"],children:[(0,i.jsxs)(n.xu,{marginY:8,children:[(0,i.jsx)(l.X,{fontSize:"1.5rem",fontWeight:"500",alignSelf:"center",children:"Indonesia"}),(0,i.jsx)(_,{time:e.lastUpdate,withTime:!1})]}),(0,i.jsx)(x.I0,{confirmedValue:e.confirmed.value,recoveredValue:e.recovered.value,deathsValue:e.deaths.value}),(0,i.jsx)(o.x,{as:S(),href:"/indonesia",fontWeight:"500",textDecoration:"underline",textAlign:"center",children:"More Details"})]})},k=!0,D=e=>{let{globalDataFallback:t,countryListFallback:r}=e;return(0,i.jsxs)(n.xu,{mb:8,w:"full",children:[(0,i.jsxs)(a.k,{wrap:"wrap",children:[(0,i.jsx)(w,{}),(0,i.jsx)(j,{globalDataFallback:t})]}),(0,i.jsxs)(a.k,{wrap:"wrap",marginY:8,alignItems:"top",children:[(0,i.jsx)(g,{countryListFallback:r}),(0,i.jsx)(B,{})]})]})}}},function(e){e.O(0,[710,474,774,888,179],function(){return e(e.s=4305)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.