@undp/data-viz 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +2 -2
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +107 -106
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +2 -2
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +24 -32
- package/dist/DonutChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +2 -2
- package/dist/{GraphEl-D5MUfp45.cjs → GraphEl-D5RBCD7p.cjs} +2 -2
- package/dist/{GraphEl-D5MUfp45.cjs.map → GraphEl-D5RBCD7p.cjs.map} +1 -1
- package/dist/{GraphEl-BZne2JIx.js → GraphEl-VtiYqELy.js} +2 -2
- package/dist/{GraphEl-BZne2JIx.js.map → GraphEl-VtiYqELy.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +2 -2
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/XAxesLabels-Bt5NZBmX.cjs +2 -0
- package/dist/XAxesLabels-Bt5NZBmX.cjs.map +1 -0
- package/dist/XAxesLabels-Dy8E1SEo.js +63 -0
- package/dist/XAxesLabels-Dy8E1SEo.js.map +1 -0
- package/dist/YAxesLabels-DesLesUP.cjs +2 -0
- package/dist/YAxesLabels-DesLesUP.cjs.map +1 -0
- package/dist/YAxesLabels-a57ZRv-0.js +61 -0
- package/dist/YAxesLabels-a57ZRv-0.js.map +1 -0
- package/dist/imageDownload-BU4qnxJP.js +991 -0
- package/dist/imageDownload-BU4qnxJP.js.map +1 -0
- package/dist/imageDownload-NYXbvKob.cjs +15 -0
- package/dist/imageDownload-NYXbvKob.cjs.map +1 -0
- package/dist/{index-Ceppbd8C.js → index-B2LQV7Tk.js} +109 -116
- package/dist/index-B2LQV7Tk.js.map +1 -0
- package/dist/index-xRHRLDIp.cjs +2 -0
- package/dist/index-xRHRLDIp.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
- package/readme.md +1 -1
- package/dist/XAxesLabels-C1XSXoWG.cjs +0 -2
- package/dist/XAxesLabels-C1XSXoWG.cjs.map +0 -1
- package/dist/XAxesLabels-Dmbk50u4.js +0 -75
- package/dist/XAxesLabels-Dmbk50u4.js.map +0 -1
- package/dist/YAxesLabels-1XTb-D0_.js +0 -72
- package/dist/YAxesLabels-1XTb-D0_.js.map +0 -1
- package/dist/YAxesLabels-pjdsVwIM.cjs +0 -2
- package/dist/YAxesLabels-pjdsVwIM.cjs.map +0 -1
- package/dist/imageDownload-BX6SILNZ.js +0 -497
- package/dist/imageDownload-BX6SILNZ.js.map +0 -1
- package/dist/imageDownload-CgDcm1Sj.cjs +0 -3
- package/dist/imageDownload-CgDcm1Sj.cjs.map +0 -1
- package/dist/index-C6LorfZ-.cjs +0 -2
- package/dist/index-C6LorfZ-.cjs.map +0 -1
- package/dist/index-Ceppbd8C.js.map +0 -1
package/dist/BarGraph.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("react"),ye=require("./getSliderMarks-BmADcPQt.cjs"),me=require("./parse-hMnG_lRV.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),oe=require("./index-CSNtgibC.cjs"),je=require("./index-DQA8q5sC.cjs"),we=require("./Modal-JW_IExO3.cjs"),ue=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-4dJo4_AF.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),$e=require("./string2HTML-CPGr_I5E.cjs"),Te=require("./YAxesLabels-pjdsVwIM.cjs"),Ee=require("./Axis-DxRV2yMi.cjs"),Oe=require("./AxisTitle-sS5bLLR7.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),ke=require("./ReferenceLine-BH0qdf4R.cjs"),De=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./XAxesLabels-C1XSXoWG.cjs"),Ce=require("./use-in-view-QcfiW0w3.cjs"),Re=require("./linear-BwPAspcq.cjs"),fe=require("./band-VYfcZeJ2.cjs"),Me=require("./index-DG2bgAva.cjs"),Zt=require("./proxy-BxvUI_9l.cjs"),Be=require("./GraphHeader.cjs"),Fe=require("./GraphFooter.cjs"),Pe=require("./ColorLegendWithMouseOver.cjs"),ce=require("./Colors.cjs"),qe=require("./EmptyState-sAEZ_5rU.cjs"),be=require("./index-DRXx7m-C.cjs"),he=require("./ensureCompleteData-I6nYmT8E.cjs"),Le=require("./uniqBy-O05lp2S5.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs"),He=require("./sort-O96oMZLb.cjs"),Ge=require("./init-DU0ybBc_.cjs"),Ie=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs");function Xe(e){const t=i.compilerRuntimeExports.c(122),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,barColors:et,barPadding:xt,showTicks:k,truncateBy:I,width:y,height:z,suffix:Nt,prefix:ct,showValues:Vt,showLabels:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,rtl:H,labelOrder:Q,maxBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=L===void 0?100:L,J=qt===void 0?40:qt,ut=Dt===void 0?25:Dt,Ft=yt===void 0?10:yt,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?ut+25:ut;let r;t[3]!==Ft||t[4]!==Z||t[5]!==J||t[6]!==zt?(r={top:zt,bottom:Ft,left:Z,right:J},t[3]=Ft,t[4]=Z,t[5]=J,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==et||t[11]!==xt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==Q||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==U||t[31]!==Tt||t[32]!==j||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==st||t[37]!==mt||t[38]!==h||t[39]!==ct||t[40]!==dt||t[41]!==F||t[42]!==H||t[43]!==Y||t[44]!==B||t[45]!==k||t[46]!==Vt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==Nt||t[54]!==ut||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==Q?(rt=(v,O)=>({...v,id:Q?`${v.label}`:`${O}`}),t[72]=Q,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Q||St.map(_e),E=Re.linear().domain([j,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.min(R,U*Gt.length):R]).paddingInner(xt),It=fe.band().domain(d[0].size.map(Ze)).range([0,Ut.bandwidth()]).paddingInner(.1),Kt=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=k?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Kt.filter(Qe),x:Kt.filter(Ke).map(v=>E(v)),y1:0-ut,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:Nt,prefix:ct,labelType:"secondary",showGridLines:!0,precision:h}):null;const Lt=pt/2,Qt=0-c.top+15,Wt=s?.xAxis?.title,Pt=o?.xAxis?.title;t[74]!==W||t[75]!==Lt||t[76]!==Qt||t[77]!==Wt||t[78]!==Pt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Lt,y:Qt,style:Wt,className:Pt,text:W}),t[74]=W,t[75]=Lt,t[76]=Qt,t[77]=Wt,t[78]=Pt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(Je).map(We),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(v=>_t.checkIfNullOrUndefined(Ut(v.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:0,y:Ut(`${v.id}`)},whileInView:{x:0,y:Ut(`${v.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[v.size.map((O,n)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?et[n]===Y?1:.3:.85,onMouseEnter:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX),mt?.({...v,sizeIndex:n})},onMouseMove:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),mt?.(void 0)},onClick:()=>{(st||$)&&(je.isEqual(C,{...v,sizeIndex:n})&&F?(S(void 0),st?.(void 0)):(S({...v,sizeIndex:n}),st&&st({...v,sizeIndex:n})))},children:[_t.checkIfNullOrUndefined(O)?null:i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:It(`${n}`),variants:{initial:{width:0,x:E(0),fill:et[n]},whileInView:{width:_t.checkIfNullOrUndefined(O)?0:O>=0?E(O)-E(0):E(0)-E(O),x:O>=0?E(0):E(O),fill:et[n],transition:{duration:u.duration}}},exit:{width:0,x:E(0),transition:{duration:u.duration}},height:It.bandwidth(),initial:"initial",animate:bt?"whileInView":"initial"}),Vt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:It(`${n}`)+It.bandwidth()/2,style:{textAnchor:O&&O<0?"end":"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm",o?.graphObjectValues),dx:O&&O<0?-5:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,fill:T||et[n]},whileInView:{x:E(O||0),opacity:1,fill:T||et[n],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:ue.numberFormattingFunction(O,A,h,ct,Nt)}):null]},`${v.label}-${x[n]||n}`)),B?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${v.label}`.length<I?`${v.label}`:`${`${v.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:E(j<0?0:j)+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null]},v.label));const Ot=o?.yAxis?.axis;let Yt;t[82]!==Ot?(Yt={axis:Ot},t[82]=Ot,t[83]=Yt):Yt=t[83];const Jt=s?.yAxis?.axis;let V;t[84]!==Jt?(V={axis:Jt},t[84]=Jt,t[85]=V):V=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(j<0?0:j),x2:E(j<0?0:j),y1:-2.5,y2:R+c.bottom,classNames:Yt,styles:V}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((v,O)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:v.text,color:v.color,x:E(v.value),y1:0-c.top,y2:R+c.bottom,textSide:E(v.value)>pt*.75||H?"left":"right",classNames:v.classNames,styles:v.styles,animate:u,isInView:bt},O))}):null,t[8]=u,t[9]=W,t[10]=et,t[11]=xt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=Q,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=U,t[31]=Tt,t[32]=j,t[33]=C,t[34]=A,t[35]=a,t[36]=st,t[37]=mt,t[38]=h,t[39]=ct,t[40]=dt,t[41]=F,t[42]=H,t[43]=Y,t[44]=B,t[45]=k,t[46]=Vt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=Nt,t[54]=ut,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(Ue).map(Ye),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==it?($t=D&&it&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:it,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=it,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function Ye(e){return e.layer}function Ue(e){return e.position==="after"}function We(e){return e.layer}function Je(e){return e.position==="before"}function Ke(e){return e!==0}function Qe(e){return e!==0}function Ze(e,t){return`${t}`}function _e(e){return`${e.id}`}function ti(e){const t=i.compilerRuntimeExports.c(130),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,truncateBy:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,labelOrder:H,maxBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==z||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==H||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==Q||t[33]!==Tt||t[34]!==j||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==st||t[39]!==mt||t[40]!==x||t[41]!==y||t[42]!==dt||t[43]!==U||t[44]!==Y||t[45]!==Nt||t[46]!==Vt||t[47]!==ct||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==I||t[55]!==B||t[56]!==W||t[57]!==et){const b=Re.linear().domain([j,Tt]).range([pt,0]).nice();let rt;t[72]!==H?(rt=(N,Rt)=>({...N,id:H?`${N.label}`:`${Rt}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(ri),E=fe.band().domain(Gt).range([0,Q?Math.min(nt,Q*Gt.length):nt]).paddingInner(z),Ut=fe.band().domain(d[0].size.map(ai)).range([0,E.bandwidth()]).paddingInner(.1),It=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const Kt=b(j<0?0:j),Lt=b(j<0?0:j),Qt=j<0?0:j;let Wt;t[74]!==m||t[75]!==x||t[76]!==y||t[77]!==I||t[78]!==Qt?(Wt=ue.numberFormattingFunction(Qt,m,x,y,I),t[74]=m,t[75]=x,t[76]=y,t[77]=I,t[78]=Qt,t[79]=Wt):Wt=t[79];const Pt=s?.xAxis?.axis,Ot=s?.yAxis?.labels;let Yt;t[80]!==Pt||t[81]!==Ot?(Yt={axis:Pt,label:Ot},t[80]=Pt,t[81]=Ot,t[82]=Yt):Yt=t[82];const Jt=a?.xAxis?.axis,V=a?.yAxis?.labels;let v;t[83]!==Jt||t[84]!==V?(v={axis:Jt,label:V},t[83]=Jt,t[84]=V,t[85]=v):v=t[85],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Kt,y2:Lt,x1:0-A,x2:nt+r.right,label:Wt,labelPos:{x:0-A,dx:0,dy:Tt<0?"1em":-5,y:b(j<0?0:j)},classNames:Yt,styles:v}),tt=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:It.filter(li),y:It.filter(oi).map(N=>b(N)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const O=0-A-15,n=pt/2,f=a?.yAxis?.title,ee=s?.yAxis?.title;t[86]!==$||t[87]!==O||t[88]!==n||t[89]!==f||t[90]!==ee?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:O,y:n,style:f,className:ee,text:$,rotate90:!0}),t[86]=$,t[87]=O,t[88]=n,t[89]=f,t[90]=ee,t[91]=K):K=t[91],t[92]!==h?(M=h.filter(ni).map(si),t[92]=h,t[93]=M):M=t[93],R=Me.AnimatePresence,lt=St.map(N=>_t.checkIfNullOrUndefined(E(N.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:E(`${N.id}`),y:0},whileInView:{x:E(`${N.id}`),y:0,transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[N.size.map((Rt,l)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?k[l]===Y?1:.3:.85,onMouseEnter:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX),mt?.({...N,sizeIndex:l})},onMouseMove:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),mt?.(void 0)},onClick:()=>{(st||F)&&(je.isEqual(p,{...N,sizeIndex:l})&&U?(C(void 0),st?.(void 0)):(C({...N,sizeIndex:l}),st&&st({...N,sizeIndex:l})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:Ut(`${l}`),width:Ut.bandwidth(),variants:{initial:{height:0,y:b(0),fill:k[l]},whileInView:{height:_t.checkIfNullOrUndefined(Rt)?0:Math.abs(b(Rt)-b(0)),y:_t.checkIfNullOrUndefined(Rt)?b(0):Rt>0?b(Rt):b(0),fill:k[l],transition:{duration:o.duration}}},exit:{height:0,y:b(0),transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial"}),ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:Ut(`${l}`)+Ut.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:Rt?Rt>=0?"-5px":"1em":"-5px",variants:{initial:{y:b(0),opacity:0,fill:W||k[l]},whileInView:{y:b(Rt||0),opacity:1,fill:W||k[l],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(Rt,m,x,y,I)}):null]},`${N.label}-${u[l]||l}`)),Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${N.label}`.length<B?`${N.label}`:`${`${N.label}`.substring(0,B)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null]},N.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((N,Rt)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:N.text,color:N.color,y:b(N.value),x1:0-A,x2:nt+r.right,classNames:N.classNames,styles:N.styles,animate:o,isInView:G},Rt))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=z,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=H,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=Q,t[33]=Tt,t[34]=j,t[35]=p,t[36]=m,t[37]=T,t[38]=st,t[39]=mt,t[40]=x,t[41]=y,t[42]=dt,t[43]=U,t[44]=Y,t[45]=Nt,t[46]=Vt,t[47]=ct,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=I,t[55]=B,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[94]!==R||t[95]!==lt||t[96]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[94]=R,t[95]=lt,t[96]=P,t[97]=gt):gt=t[97];let jt;t[98]!==h?(jt=h.filter(ii).map(ei),t[98]=h,t[99]=jt):jt=t[99];let wt;t[100]!==_||t[101]!==tt||t[102]!==K||t[103]!==M||t[104]!==gt||t[105]!==jt||t[106]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[100]=_,t[101]=tt,t[102]=K,t[103]=M,t[104]=gt,t[105]=jt,t[106]=ft,t[107]=wt):wt=t[107];let at;t[108]!==g||t[109]!==ht||t[110]!==kt||t[111]!==ot||t[112]!==Ct||t[113]!==X||t[114]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[108]=g,t[109]=ht,t[110]=kt,t[111]=ot,t[112]=Ct,t[113]=X,t[114]=wt,t[115]=at):at=t[115];let At;t[116]!==s?.tooltip||t[117]!==S||t[118]!==Mt||t[119]!==c||t[120]!==a?.tooltip||t[121]!==it?(At=c&&it&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:it,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[116]=s?.tooltip,t[117]=S,t[118]=Mt,t[119]=c,t[120]=a?.tooltip,t[121]=it,t[122]=At):At=t[122];let $t;t[123]!==F||t[124]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[123]=F,t[124]=p,t[125]=$t):$t=t[125];let Et;return t[126]!==at||t[127]!==At||t[128]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[126]=at,t[127]=At,t[128]=$t,t[129]=Et):Et=t[129],Et}function ei(e){return e.layer}function ii(e){return e.position==="after"}function si(e){return e.layer}function ni(e){return e.position==="before"}function oi(e){return e!==0}function li(e){return e!==0}function ai(e,t){return`${t}`}function ri(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,showColorScale:mt,padding:dt,backgroundColor:Tt,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,graphID:T,maxValue:a,minValue:s,onSeriesMouseClick:o,graphDownload:u,dataDownload:x,language:h,labelOrder:m,minHeight:A,theme:Z,maxBarThickness:J,ariaLabel:ut,resetSelectionOnDoubleClick:Ft,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:bt,valueColor:zt,styles:r,classNames:c,filterNA:D,animate:p,precision:C,customLayers:S,timeline:w,naLabel:Mt,sortParameter:vt,sortData:nt,orientation:pt}=e,R=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,g=et===void 0?.25:et,_=xt===void 0?!0:xt,tt=k===void 0?999:k,K=Vt===void 0?"":Vt,M=B===void 0?"":B,ht=it===void 0?!0:it,kt=mt===void 0?!0:mt,ot=Tt===void 0?!1:Tt,Ct=Q===void 0?!0:Q,X=u===void 0?!1:u,lt=x===void 0?!1:x,P=h===void 0?"en":h,ft=A===void 0?0:A,gt=Z===void 0?"light":Z,jt=Ft===void 0?!0:Ft,wt=bt===void 0?5:bt,at=D===void 0?!0:D,At=p===void 0?!1:p,$t=C===void 0?2:C;let Et;t[0]!==S?(Et=S===void 0?[]:S,t[0]=S,t[1]=Et):Et=t[1];const b=Et,rt=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,St=Mt===void 0?"NA":Mt,E=(pt===void 0?"vertical":pt)==="horizontal"?Xe:ti,[Ut,It]=q.useState(0),[Kt,Lt]=q.useState(0),[Qt,Wt]=q.useState(rt.autoplay),Pt=He.sort(Le.uniqBy(d,"date",!0).map(Xt=>me.parse(`${Xt}`,rt.dateFormat||"yyyy",new Date).getTime()),Ci),[Ot,Yt]=q.useState(rt.autoplay?0:Pt.length-1),[Jt,V]=q.useState(void 0),v=q.useRef(null),O=q.useRef(null);let n,f;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{const Xt=new ResizeObserver(Bt=>{It(Bt[0].target.clientWidth||620),Lt(Bt[0].target.clientHeight||480)});return v.current&&Xt.observe(v.current),()=>Xt.disconnect()},f=[],t[2]=n,t[3]=f):(n=t[2],f=t[3]),q.useEffect(n,f),q.useEffect(()=>{const Xt=setInterval(()=>{Yt(Bt=>Bt<Pt.length-1?Bt+1:0)},(rt.speed||2)*1e3);return Qt||clearInterval(Xt),()=>clearInterval(Xt)},[Pt,Qt,rt.speed]);const ee=ye.getSliderMarks(Pt,Ot,rt.showOnlyActiveDate,rt.dateFormat||"yyyy"),N=ve.GraphContainer,Rt=c?.graphContainer,l=r?.graphContainer;let ie;t[4]!==c?.description||t[5]!==c?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==r?.description||t[12]!==r?.title||t[13]!==y?(ie=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:c?.title,description:c?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?O:void 0,dataDownload:lt?d.map(ki).filter(Oi).length>0?d.map(Ei).filter($i):d.filter(Ai):null}):null,t[4]=c?.description,t[5]=c?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=r?.description,t[12]=r?.title,t[13]=y,t[14]=ie):ie=t[14];const se=rt.enabled&&Pt.length>0&&ee?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Wt(!Qt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Qt?"Click to pause animation":"Click to play animation",children:Qt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Pt[0],max:Pt[Pt.length-1],marks:ee,step:null,defaultValue:Pt[Pt.length-1],value:Pt[Ot],onChangeComplete:Xt=>{Yt(Pt.indexOf(Xt))},onChange:Xt=>{Yt(Pt.indexOf(Xt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,xe="grow flex flex-col justify-center gap-3 w-full",pe=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[kt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:R,colorLegendTitle:ct,setSelectedColor:V,showNAColor:!1,className:c?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:v,children:Ut&&Kt?i.jsxRuntimeExports.jsx(E,{data:vt!==void 0?vt==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(wi):Xt),vi,[nt||"asc"]):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(bi):Xt),Xt=>_t.checkIfNullOrUndefined(Xt.size[vt])?-1/0:Xt.size[vt],[nt||"asc"]):he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>at?!Xt.size.every(yi):Xt),barColors:R,width:Ut,height:Kt,suffix:K,prefix:M,showValues:ht,barPadding:g,showTicks:_,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,truncateBy:tt,showLabels:Ct,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(a)?Math.max(...d.map(fi))<0?0:Math.max(...d.map(pi)):a,minValue:_t.checkIfNullOrUndefined(s)?Math.min(...d.map(mi))>=0?0:Math.min(...d.map(ui)):s,onSeriesMouseClick:o,selectedColor:Jt,labelOrder:m,rtl:P==="he"||P==="ar",maxBarThickness:J,resetSelectionOnDoubleClick:jt,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:wt,valueColor:zt,styles:r,classNames:c,colorDomain:Nt,animate:At===!0?{duration:.5,once:!0,amount:.5}:At||{duration:0,once:!0,amount:0},precision:$t,customLayers:b,naLabel:St}):null})]});let re;t[15]!==pe?(re=i.jsxRuntimeExports.jsx("div",{className:xe,children:pe}),t[15]=pe,t[16]=re):re=t[16];let ne;t[17]!==c?.footnote||t[18]!==c?.source||t[19]!==z||t[20]!==Dt||t[21]!==r?.footnote||t[22]!==r?.source||t[23]!==y?(ne=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:Dt,footNote:z,width:y}):null,t[17]=c?.footnote,t[18]=c?.source,t[19]=z,t[20]=Dt,t[21]=r?.footnote,t[22]=r?.source,t[23]=y,t[24]=ne):ne=t[24];let le;return t[25]!==N||t[26]!==ut||t[27]!==ot||t[28]!==T||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==dt||t[33]!==U||t[34]!==Rt||t[35]!==l||t[36]!==ie||t[37]!==se||t[38]!==re||t[39]!==ne||t[40]!==gt||t[41]!==y?(le=i.jsxRuntimeExports.jsxs(N,{className:Rt,style:l,id:T,ref:O,"aria-label":ut,backgroundColor:ot,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:dt,children:[ie,se,re,ne]}),t[25]=N,t[26]=ut,t[27]=ot,t[28]=T,t[29]=I,t[30]=P,t[31]=ft,t[32]=dt,t[33]=U,t[34]=Rt,t[35]=l,t[36]=ie,t[37]=se,t[38]=re,t[39]=ne,t[40]=gt,t[41]=y,t[42]=le):le=t[42],le}function ui(e){return Math.min(...e.size.filter(xi))}function xi(e){return!_t.checkIfNullOrUndefined(e)}function mi(e){return Math.min(...e.size.filter(di))}function di(e){return!_t.checkIfNullOrUndefined(e)}function pi(e){return Math.max(...e.size.filter(hi))}function hi(e){return!_t.checkIfNullOrUndefined(e)}function fi(e){return Math.max(...e.size.filter(gi))}function gi(e){return!_t.checkIfNullOrUndefined(e)}function yi(e){return e==null}function bi(e){return e==null}function vi(e){return oe.sum(e.size.filter(ji))}function ji(e){return!_t.checkIfNullOrUndefined(e)}function wi(e){return e==null}function Ai(e){return e!==void 0}function $i(e){return e!==void 0}function Ei(e){return e.data}function Oi(e){return e!==void 0}function ki(e){return e.data}function Ci(e,t){return Ge.ascending(e,t)}function Ri(e){const t=i.compilerRuntimeExports.c(125),{data:d,barColor:L,suffix:qt,prefix:Dt,barPadding:yt,showValues:et,showTicks:xt,truncateBy:k,width:I,height:y,colorDomain:z,topMargin:Nt,bottomMargin:ct,leftMargin:Vt,rightMargin:B,showLabels:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,highlightedDataPoints:st,maxValue:Y,minValue:H,onSeriesMouseClick:Q,labelOrder:U,rtl:F,maxBarThickness:$,minBarThickness:W,resetSelectionOnDoubleClick:T,detailsOnClick:a,barAxisTitle:s,valueColor:o,noOfTicks:u,styles:x,classNames:h,animate:m,dimmedOpacity:A,precision:Z,customLayers:J,naLabel:ut}=e,Ft=Nt===void 0?25:Nt,Ht=ct===void 0?10:ct,G=Vt===void 0?100:Vt,bt=B===void 0?40:B,zt=q.useRef(null);let r;t[0]!==m.amount||t[1]!==m.once?(r={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=r):r=t[2];const c=Ce.useInView(zt,r),[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=s?Ft+25:Ft;let R;t[3]!==Ht||t[4]!==G||t[5]!==bt||t[6]!==pt?(R={top:pt,bottom:Ht,left:G,right:bt},t[3]=Ht,t[4]=G,t[5]=bt,t[6]=pt,t[7]=R):R=t[7];const g=R,_=I-g.left-g.right,tt=y-g.top-g.bottom;let K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt,at;if(t[8]!==m||t[9]!==s||t[10]!==L||t[11]!==yt||t[12]!==h?.graphObjectValues||t[13]!==h?.xAxis?.gridLines||t[14]!==h?.xAxis?.labels||t[15]!==h?.xAxis?.title||t[16]!==h?.yAxis?.axis||t[17]!==h?.yAxis?.labels||t[18]!==z||t[19]!==J||t[20]!==d||t[21]!==a||t[22]!==A||t[23]!==tt||t[24]!==_||t[25]!==y||t[26]!==st||t[27]!==c||t[28]!==U||t[29]!==g.bottom||t[30]!==g.left||t[31]!==g.top||t[32]!==$||t[33]!==Y||t[34]!==W||t[35]!==H||t[36]!==C||t[37]!==ut||t[38]!==u||t[39]!==Q||t[40]!==dt||t[41]!==Z||t[42]!==Dt||t[43]!==Tt||t[44]!==T||t[45]!==F||t[46]!==j||t[47]!==it||t[48]!==xt||t[49]!==et||t[50]!==x?.graphObjectValues||t[51]!==x?.xAxis?.gridLines||t[52]!==x?.xAxis?.labels||t[53]!==x?.xAxis?.title||t[54]!==x?.yAxis?.axis||t[55]!==x?.yAxis?.labels||t[56]!==qt||t[57]!==Ft||t[58]!==k||t[59]!==o||t[60]!==I){let E;t[75]!==U?(E=(n,f)=>({...n,id:U?`${n.label}`:`${f}`}),t[75]=U,t[76]=E):E=t[76];const Ut=d.map(E),It=Re.linear().domain([H,Y]).range([0,_]).nice(),Kt=U||Ut.map(Fi),Lt=fe.band().domain(Kt).range([0,W?Math.max(tt,W*Kt.length):$?Math.min(tt,$*Kt.length):tt]).paddingInner(yt),Qt=It.ticks(u);M=Zt.motion.svg,X=zt,lt=`${I}px`,P=`${y}px`,ft=`0 0 ${I} ${y}`,gt="ltr",ht=`translate(${g.left},${g.top})`,kt=xt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Qt.filter(Bi),x:Qt.filter(zi).map(n=>It(n)),y1:0-Ft,y2:tt+g.bottom,styles:{gridLines:x?.xAxis?.gridLines,labels:x?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:qt,prefix:Dt,labelType:"secondary",showGridLines:!0,precision:Z}):null;const Wt=_/2,Pt=0-g.top+15,Ot=x?.xAxis?.title,Yt=h?.xAxis?.title;t[77]!==s||t[78]!==Wt||t[79]!==Pt||t[80]!==Ot||t[81]!==Yt?(ot=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Wt,y:Pt,style:Ot,className:Yt,text:s}),t[77]=s,t[78]=Wt,t[79]=Pt,t[80]=Ot,t[81]=Yt,t[82]=ot):ot=t[82],t[83]!==J?(Ct=J.filter(Di).map(Si),t[83]=J,t[84]=Ct):Ct=t[84],K=Me.AnimatePresence,jt=Ut.map(n=>_t.checkIfNullOrUndefined(Lt(n.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85},whileInView:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:f=>{p(n),nt(f.clientY),Mt(f.clientX),dt?.(n)},onClick:()=>{(Q||a)&&(je.isEqual(C,n)&&T?(S(void 0),Q?.(void 0)):(S(n),Q?.(n)))},onMouseMove:f=>{p(n),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),dt?.(void 0)},children:[n.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{variants:{initial:{width:0,x:It(0),y:Lt(`${n.id}`),fill:d.filter(Ti).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray},whileInView:{width:n.size>=0?It(n.size)-It(0):It(0)-It(n.size),x:n.size>=0?It(0):It(n.size),y:Lt(`${n.id}`),fill:d.filter(Ii).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{width:0,x:It(0),transition:{duration:m.duration}},height:Lt.bandwidth()}):null,it?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${n.label}`.length<k?`${n.label}`:`${`${n.label}`.substring(0,k)}...`,y:Lt(n.id)||0,x:(n.size||0)<0?It(0):0-g.left,width:(n.size||0)<0?I-It(0):It(0)+g.left,height:Lt.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:x?.yAxis?.labels,className:h?.yAxis?.labels,animate:m,isInView:c}):null,et?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:n.size&&n.size<0?"end":"start",...x?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!o&&L.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",h?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",variants:{initial:{x:It(0),y:Lt(`${n.id}`)+Lt.bandwidth()/2,opacity:0,fill:o||(d.filter(Vi).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray)},whileInView:{x:n.size?It(n.size):It(0),opacity:1,y:Lt(`${n.id}`)+Lt.bandwidth()/2,fill:o||(d.filter(Ni).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(n.size,ut,Z,Dt,qt)}):null]},n.label));const Jt=h?.yAxis?.axis;let V;t[85]!==Jt?(V={axis:Jt},t[85]=Jt,t[86]=V):V=t[86];const v=x?.yAxis?.axis;let O;t[87]!==v?(O={axis:v},t[87]=v,t[88]=O):O=t[88],wt=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:It(H<0?0:H),x2:It(H<0?0:H),y1:-2.5,y2:tt+g.bottom,classNames:V,styles:O}),at=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((n,f)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:n.text,color:n.color,x:It(n.value),y1:0-g.top,y2:tt+g.bottom,textSide:It(n.value)>_*.75||F?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:c},f))}):null,t[8]=m,t[9]=s,t[10]=L,t[11]=yt,t[12]=h?.graphObjectValues,t[13]=h?.xAxis?.gridLines,t[14]=h?.xAxis?.labels,t[15]=h?.xAxis?.title,t[16]=h?.yAxis?.axis,t[17]=h?.yAxis?.labels,t[18]=z,t[19]=J,t[20]=d,t[21]=a,t[22]=A,t[23]=tt,t[24]=_,t[25]=y,t[26]=st,t[27]=c,t[28]=U,t[29]=g.bottom,t[30]=g.left,t[31]=g.top,t[32]=$,t[33]=Y,t[34]=W,t[35]=H,t[36]=C,t[37]=ut,t[38]=u,t[39]=Q,t[40]=dt,t[41]=Z,t[42]=Dt,t[43]=Tt,t[44]=T,t[45]=F,t[46]=j,t[47]=it,t[48]=xt,t[49]=et,t[50]=x?.graphObjectValues,t[51]=x?.xAxis?.gridLines,t[52]=x?.xAxis?.labels,t[53]=x?.xAxis?.title,t[54]=x?.yAxis?.axis,t[55]=x?.yAxis?.labels,t[56]=qt,t[57]=Ft,t[58]=k,t[59]=o,t[60]=I,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt,t[72]=jt,t[73]=wt,t[74]=at}else K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71],jt=t[72],wt=t[73],at=t[74];let At;t[89]!==K||t[90]!==jt||t[91]!==wt||t[92]!==at?(At=i.jsxRuntimeExports.jsxs(K,{children:[jt,wt,at]}),t[89]=K,t[90]=jt,t[91]=wt,t[92]=at,t[93]=At):At=t[93];let $t;t[94]!==J?($t=J.filter(Li).map(Mi),t[94]=J,t[95]=$t):$t=t[95];let Et;t[96]!==ht||t[97]!==kt||t[98]!==ot||t[99]!==Ct||t[100]!==At||t[101]!==$t?(Et=i.jsxRuntimeExports.jsxs("g",{transform:ht,children:[kt,ot,Ct,At,$t]}),t[96]=ht,t[97]=kt,t[98]=ot,t[99]=Ct,t[100]=At,t[101]=$t,t[102]=Et):Et=t[102];let b;t[103]!==M||t[104]!==X||t[105]!==lt||t[106]!==P||t[107]!==ft||t[108]!==gt||t[109]!==Et?(b=i.jsxRuntimeExports.jsx(M,{ref:X,width:lt,height:P,viewBox:ft,direction:gt,children:Et}),t[103]=M,t[104]=X,t[105]=lt,t[106]=P,t[107]=ft,t[108]=gt,t[109]=Et,t[110]=b):b=t[110];let rt;t[111]!==h?.tooltip||t[112]!==w||t[113]!==vt||t[114]!==D||t[115]!==x?.tooltip||t[116]!==mt?(rt=D&&mt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:mt,xPos:w,yPos:vt,backgroundStyle:x?.tooltip,className:h?.tooltip}):null,t[111]=h?.tooltip,t[112]=w,t[113]=vt,t[114]=D,t[115]=x?.tooltip,t[116]=mt,t[117]=rt):rt=t[117];let St;t[118]!==a||t[119]!==C?(St=a&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof a=="string"?{__html:$e.string2HTML(a,C)}:void 0,children:typeof a=="function"?a(C):null})}):null,t[118]=a,t[119]=C,t[120]=St):St=t[120];let Gt;return t[121]!==b||t[122]!==rt||t[123]!==St?(Gt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[b,rt,St]}),t[121]=b,t[122]=rt,t[123]=St,t[124]=Gt):Gt=t[124],Gt}function Mi(e){return e.layer}function Li(e){return e.position==="after"}function Ni(e){return e.color}function Vi(e){return e.color}function Ii(e){return e.color}function Ti(e){return e.color}function Si(e){return e.layer}function Di(e){return e.position==="before"}function zi(e){return e!==0}function Bi(e){return e!==0}function Fi(e){return`${e.id}`}function Pi(e){const t=i.compilerRuntimeExports.c(133),{leftMargin:d,rightMargin:L,topMargin:qt,bottomMargin:Dt,data:yt,width:et,height:xt,barColor:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,colorDomain:B,truncateBy:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,maxValue:st,minValue:Y,highlightedDataPoints:H,onSeriesMouseClick:Q,labelOrder:U,maxBarThickness:F,minBarThickness:$,resetSelectionOnDoubleClick:W,detailsOnClick:T,barAxisTitle:a,valueColor:s,noOfTicks:o,styles:u,classNames:x,dimmedOpacity:h,animate:m,precision:A,customLayers:Z,naLabel:J}=e,ut=d===void 0?20:d,Ft=L===void 0?20:L,Ht=qt===void 0?20:qt,G=Dt===void 0?25:Dt,bt=q.useRef(null);let zt;t[0]!==m.amount||t[1]!==m.once?(zt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=zt):zt=t[2];const r=Ce.useInView(bt,zt),c=a?ut+30:ut;let D;t[3]!==G||t[4]!==Ft||t[5]!==c||t[6]!==Ht?(D={top:Ht,bottom:G,left:c,right:Ft},t[3]=G,t[4]=Ft,t[5]=c,t[6]=Ht,t[7]=D):D=t[7];const p=D,[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),[pt,R]=q.useState(void 0),g=et-p.left-p.right,_=xt-p.top-p.bottom;let tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt;if(t[8]!==m||t[9]!==a||t[10]!==k||t[11]!==z||t[12]!==x?.graphObjectValues||t[13]!==x?.xAxis?.axis||t[14]!==x?.xAxis?.labels||t[15]!==x?.yAxis?.gridLines||t[16]!==x?.yAxis?.labels||t[17]!==x?.yAxis?.title||t[18]!==B||t[19]!==Z||t[20]!==yt||t[21]!==T||t[22]!==h||t[23]!==_||t[24]!==g||t[25]!==xt||t[26]!==H||t[27]!==r||t[28]!==U||t[29]!==ut||t[30]!==p.bottom||t[31]!==p.left||t[32]!==p.right||t[33]!==p.top||t[34]!==F||t[35]!==st||t[36]!==$||t[37]!==Y||t[38]!==w||t[39]!==J||t[40]!==o||t[41]!==Q||t[42]!==dt||t[43]!==A||t[44]!==y||t[45]!==Tt||t[46]!==W||t[47]!==j||t[48]!==Nt||t[49]!==Vt||t[50]!==ct||t[51]!==u?.graphObjectValues||t[52]!==u?.xAxis?.axis||t[53]!==u?.xAxis?.labels||t[54]!==u?.yAxis?.gridLines||t[55]!==u?.yAxis?.labels||t[56]!==u?.yAxis?.title||t[57]!==I||t[58]!==it||t[59]!==s||t[60]!==et){const Gt=Re.linear().domain([Y,st]).range([_,0]).nice();let E;t[75]!==U?(E=(l,ie)=>({...l,id:U?`${l.label}`:`${ie}`}),t[75]=U,t[76]=E):E=t[76];const Ut=yt.map(E),It=U||Ut.map(Zi),Kt=fe.band().domain(It).range([0,$?Math.max(g,$*It.length):F?Math.min(g,F*It.length):g]).paddingInner(z),Lt=Gt.ticks(o);K=Zt.motion.svg,Ct=bt,X=`${et}px`,lt=`${xt}px`,P=`0 0 ${et} ${xt}`,ft="ltr",wt=`translate(${p.left},${p.top})`;const Qt=Gt(Y<0?0:Y),Wt=Gt(Y<0?0:Y),Pt=Y<0?0:Y;let Ot;t[77]!==J||t[78]!==A||t[79]!==y||t[80]!==I||t[81]!==Pt?(Ot=ue.numberFormattingFunction(Pt,J,A,y,I),t[77]=J,t[78]=A,t[79]=y,t[80]=I,t[81]=Pt,t[82]=Ot):Ot=t[82];const Yt=x?.xAxis?.axis,Jt=x?.yAxis?.labels;let V;t[83]!==Yt||t[84]!==Jt?(V={axis:Yt,label:Jt},t[83]=Yt,t[84]=Jt,t[85]=V):V=t[85];const v=u?.xAxis?.axis,O=u?.yAxis?.labels;let n;t[86]!==v||t[87]!==O?(n={axis:v,label:O},t[86]=v,t[87]=O,t[88]=n):n=t[88],M=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Qt,y2:Wt,x1:0-ut,x2:g+p.right,label:Ot,labelPos:{x:0-ut,dx:0,dy:st<0?"1em":-5,y:Gt(Y<0?0:Y)},classNames:V,styles:n}),ht=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Lt.filter(Qi),y:Lt.filter(Ki).map(l=>Gt(l)),x1:0-ut,x2:g+p.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:A}):null;const f=0-ut-15,ee=_/2,N=u?.yAxis?.title,Rt=x?.yAxis?.title;t[89]!==a||t[90]!==f||t[91]!==ee||t[92]!==N||t[93]!==Rt?(kt=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:f,y:ee,style:N,className:Rt,text:a,rotate90:!0}),t[89]=a,t[90]=f,t[91]=ee,t[92]=N,t[93]=Rt,t[94]=kt):kt=t[94],t[95]!==Z?(ot=Z.filter(Ji).map(Wi),t[95]=Z,t[96]=ot):ot=t[96],tt=Me.AnimatePresence,gt=Ut.map((l,ie)=>_t.checkIfNullOrUndefined(Kt(l.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85},whileInView:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85,transition:{duration:m.duration}}},exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:se=>{S(l),R(se.clientY),nt(se.clientX),dt?.(l)},onClick:()=>{(Q||T)&&(je.isEqual(w,l)&&W?(Mt(void 0),Q?.(void 0)):(Mt(l),Q?.(l)))},onMouseMove:se=>{S(l),R(se.clientY),nt(se.clientX)},onMouseLeave:()=>{S(void 0),nt(void 0),R(void 0),dt?.(void 0)},children:[l.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{width:Kt.bandwidth(),initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{height:0,x:Kt(`${l.id}`),y:Gt(0),fill:yt.filter(Ui).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray},whileInView:{height:l.size?Math.abs(Gt(l.size)-Gt(0)):0,y:l.size&&l.size>0?Gt(l.size):Gt(0),x:Kt(`${l.id}`),fill:yt.filter(Yi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray,transition:{duration:m.duration}}},exit:{height:0,y:Gt(0),transition:{duration:m.duration}}}):null,Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${l.label}`.length<it?`${l.label}`:`${`${l.label}`.substring(0,it)}...`,y:(l.size||0)<0?0:Gt(0)+5,x:Kt(`${l.id}`),width:Kt.bandwidth(),height:(l.size||0)<0?Gt(0)-5:p.bottom,style:u?.xAxis?.labels,className:x?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:m,isInView:r}):null,ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...u?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!s&&k.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",x?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(0),opacity:0,fill:s||(yt.filter(Xi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray)},whileInView:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(l.size||0),fill:s||(yt.filter(Gi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:r?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(l.size,J,A,y,I)}):null]},l.label)),jt=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((l,ie)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:l.text,color:l.color,y:Gt(l.value),x1:0-ut,x2:g+p.right,classNames:l.classNames,styles:l.styles,animate:m,isInView:r},ie))}):null,t[8]=m,t[9]=a,t[10]=k,t[11]=z,t[12]=x?.graphObjectValues,t[13]=x?.xAxis?.axis,t[14]=x?.xAxis?.labels,t[15]=x?.yAxis?.gridLines,t[16]=x?.yAxis?.labels,t[17]=x?.yAxis?.title,t[18]=B,t[19]=Z,t[20]=yt,t[21]=T,t[22]=h,t[23]=_,t[24]=g,t[25]=xt,t[26]=H,t[27]=r,t[28]=U,t[29]=ut,t[30]=p.bottom,t[31]=p.left,t[32]=p.right,t[33]=p.top,t[34]=F,t[35]=st,t[36]=$,t[37]=Y,t[38]=w,t[39]=J,t[40]=o,t[41]=Q,t[42]=dt,t[43]=A,t[44]=y,t[45]=Tt,t[46]=W,t[47]=j,t[48]=Nt,t[49]=Vt,t[50]=ct,t[51]=u?.graphObjectValues,t[52]=u?.xAxis?.axis,t[53]=u?.xAxis?.labels,t[54]=u?.yAxis?.gridLines,t[55]=u?.yAxis?.labels,t[56]=u?.yAxis?.title,t[57]=I,t[58]=it,t[59]=s,t[60]=et,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft,t[72]=gt,t[73]=jt,t[74]=wt}else tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71],gt=t[72],jt=t[73],wt=t[74];let at;t[97]!==tt||t[98]!==gt||t[99]!==jt?(at=i.jsxRuntimeExports.jsxs(tt,{children:[gt,jt]}),t[97]=tt,t[98]=gt,t[99]=jt,t[100]=at):at=t[100];let At;t[101]!==Z?(At=Z.filter(Hi).map(qi),t[101]=Z,t[102]=At):At=t[102];let $t;t[103]!==M||t[104]!==ht||t[105]!==kt||t[106]!==ot||t[107]!==at||t[108]!==At||t[109]!==wt?($t=i.jsxRuntimeExports.jsxs("g",{transform:wt,children:[M,ht,kt,ot,at,At]}),t[103]=M,t[104]=ht,t[105]=kt,t[106]=ot,t[107]=at,t[108]=At,t[109]=wt,t[110]=$t):$t=t[110];let Et;t[111]!==K||t[112]!==Ct||t[113]!==X||t[114]!==lt||t[115]!==P||t[116]!==ft||t[117]!==$t?(Et=i.jsxRuntimeExports.jsx(K,{ref:Ct,width:X,height:lt,viewBox:P,direction:ft,children:$t}),t[111]=K,t[112]=Ct,t[113]=X,t[114]=lt,t[115]=P,t[116]=ft,t[117]=$t,t[118]=Et):Et=t[118];let b;t[119]!==x?.tooltip||t[120]!==vt||t[121]!==pt||t[122]!==C||t[123]!==u?.tooltip||t[124]!==mt?(b=C&&mt&&vt&&pt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:C,body:mt,xPos:vt,yPos:pt,backgroundStyle:u?.tooltip,className:x?.tooltip}):null,t[119]=x?.tooltip,t[120]=vt,t[121]=pt,t[122]=C,t[123]=u?.tooltip,t[124]=mt,t[125]=b):b=t[125];let rt;t[126]!==T||t[127]!==w?(rt=T&&w!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:w!==void 0,onClose:()=>{Mt(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof T=="string"?{__html:$e.string2HTML(T,w)}:void 0,children:typeof T=="function"?T(w):null})}):null,t[126]=T,t[127]=w,t[128]=rt):rt=t[128];let St;return t[129]!==Et||t[130]!==b||t[131]!==rt?(St=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Et,b,rt]}),t[129]=Et,t[130]=b,t[131]=rt,t[132]=St):St=t[132],St}function qi(e){return e.layer}function Hi(e){return e.position==="after"}function Gi(e){return e.color}function Xi(e){return e.color}function Yi(e){return e.color}function Ui(e){return e.color}function Wi(e){return e.layer}function Ji(e){return e.position==="before"}function Ki(e){return e!==0}function Qi(e){return e!==0}function Zi(e){return`${e.id}`}function _i(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,suffix:Dt,sources:yt,prefix:et,graphDescription:xt,barPadding:k,showValues:I,showTicks:y,truncateBy:z,height:Nt,width:ct,footNote:Vt,colorDomain:B,colorLegendTitle:it,highlightedDataPoints:mt,padding:dt,backgroundColor:Tt,topMargin:j,bottomMargin:st,leftMargin:Y,rightMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,showColorScale:T,graphID:a,maxValue:s,minValue:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,sortData:m,labelOrder:A,language:Z,showNAColor:J,minHeight:ut,theme:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,styles:S,classNames:w,filterNA:Mt,animate:vt,dimmedOpacity:nt,precision:pt,customLayers:R,timeline:g,naLabel:_,orientation:tt}=e,K=Dt===void 0?"":Dt,M=et===void 0?"":et,ht=k===void 0?.25:k,kt=I===void 0?!0:I,ot=y===void 0?!0:y,Ct=z===void 0?999:z;let X;t[0]!==mt?(X=mt===void 0?[]:mt,t[0]=mt,t[1]=X):X=t[1];const lt=X,P=Tt===void 0?!1:Tt,ft=Q===void 0?!0:Q,gt=T===void 0?!0:T,jt=x===void 0?!1:x,wt=h===void 0?!1:h,at=Z===void 0?"en":Z,At=J===void 0?!0:J,$t=ut===void 0?0:ut,Et=Ft===void 0?"light":Ft,b=r===void 0?!0:r,rt=p===void 0?5:p,St=Mt===void 0?!0:Mt,Gt=vt===void 0?!1:vt,E=nt===void 0?.3:nt,Ut=pt===void 0?2:pt;let It;t[2]!==R?(It=R===void 0?[]:R,t[2]=R,t[3]=It):It=t[3];const Kt=It,Lt=g===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:g,Qt=_===void 0?"NA":_,Wt=tt===void 0?"vertical":tt,Pt=Wt==="horizontal"?Ri:Pi,[Ot,Yt]=q.useState(0),[Jt,V]=q.useState(0),[v,O]=q.useState(Lt.autoplay),n=He.sort(Le.uniqBy(d,"date",!0).map(te=>me.parse(`${te}`,Lt.dateFormat||"yyyy",new Date).getTime()),fs),[f,ee]=q.useState(Lt.autoplay?0:n.length-1),[N,Rt]=q.useState(void 0),l=q.useRef(null),ie=q.useRef(null);let se,xe;t[4]===Symbol.for("react.memo_cache_sentinel")?(se=()=>{const te=new ResizeObserver(de=>{Yt(de[0].target.clientWidth||620),V(de[0].target.clientHeight||480)});return l.current&&te.observe(l.current),()=>te.disconnect()},xe=[],t[4]=se,t[5]=xe):(se=t[4],xe=t[5]),q.useEffect(se,xe),q.useEffect(()=>{const te=setInterval(()=>{ee(de=>de<n.length-1?de+1:0)},(Lt.speed||2)*1e3);return v||clearInterval(te),()=>clearInterval(te)},[n,v,Lt.speed]);const pe=ye.getSliderMarks(n,f,Lt.showOnlyActiveDate,Lt.dateFormat||"yyyy"),re=ve.GraphContainer,ne=w?.graphContainer,le=S?.graphContainer;let Xt;t[6]!==w?.description||t[7]!==w?.title||t[8]!==d||t[9]!==wt||t[10]!==xt||t[11]!==jt||t[12]!==L||t[13]!==S?.description||t[14]!==S?.title||t[15]!==ct?(Xt=L||xt||jt||wt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:S?.title,description:S?.description},classNames:{title:w?.title,description:w?.description},graphTitle:L,graphDescription:xt,width:ct,graphDownload:jt?ie:void 0,dataDownload:wt?d.map(hs).filter(ps).length>0?d.map(ds).filter(ms):d.filter(xs):null}):null,t[6]=w?.description,t[7]=w?.title,t[8]=d,t[9]=wt,t[10]=xt,t[11]=jt,t[12]=L,t[13]=S?.description,t[14]=S?.title,t[15]=ct,t[16]=Xt):Xt=t[16];const Bt=Lt.enabled&&n.length>0&&pe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center pb-4",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{O(!v)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":v?"Click to pause animation":"Click to play animation",children:v?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:n[0],max:n[n.length-1],marks:pe,step:null,defaultValue:n[n.length-1],value:n[f],onChangeComplete:te=>{ee(n.indexOf(te))},onChange:te=>{ee(n.indexOf(te))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,ae=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[gt&&d.filter(us).length!==0?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:ct,colorLegendTitle:it,colors:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:B||Le.uniqBy(d,"color",!0),setSelectedColor:Rt,showNAColor:At,className:w?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:l,children:Ot&&Jt?i.jsxRuntimeExports.jsx(Pt,{data:m?Ne.orderBy(he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te),[te=>te.size===void 0?m==="asc"?(Wt==="horizontal"?1:-1)*(1/0):(Wt==="horizontal"?-1:1)*(1/0):te.size],[m]).filter((te,de)=>G?de<G:!0):he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te).filter((te,de)=>G?de<G:!0),barColor:d.filter(cs).length===0?qt?[qt]:[ce.Colors.primaryColors["blue-600"]]:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:d.filter(rs).length===0?[]:B||Le.uniqBy(d,"color",!0),selectedColor:N,width:Ot,height:Jt,suffix:K,prefix:M,barPadding:ht,showValues:kt,showTicks:ot,leftMargin:Y,rightMargin:H,topMargin:j,bottomMargin:st,truncateBy:Ct,showLabels:ft,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(s)?Math.max(...d.filter(as).map(ls))<0?0:Math.max(...d.filter(os).map(ns)):s,minValue:_t.checkIfNullOrUndefined(o)?Math.min(...d.filter(ss).map(is))>=0?0:Math.min(...d.filter(es).map(ts)):o,highlightedDataPoints:lt,onSeriesMouseClick:u,labelOrder:A,rtl:at==="he"||at==="ar",maxBarThickness:Ht,minBarThickness:bt,resetSelectionOnDoubleClick:b,detailsOnClick:c,barAxisTitle:D,noOfTicks:rt,valueColor:C,classNames:w,styles:S,animate:Gt===!0?{duration:.5,once:!0,amount:.5}:Gt||{duration:0,once:!0,amount:0},dimmedOpacity:E,precision:Ut,customLayers:Kt,naLabel:Qt}):null})]});let ge;t[17]!==w?.footnote||t[18]!==w?.source||t[19]!==Vt||t[20]!==yt||t[21]!==S?.footnote||t[22]!==S?.source||t[23]!==ct?(ge=yt||Vt?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{sources:yt,footNote:Vt,width:ct,styles:{footnote:S?.footnote,source:S?.source},classNames:{footnote:w?.footnote,source:w?.source}}):null,t[17]=w?.footnote,t[18]=w?.source,t[19]=Vt,t[20]=yt,t[21]=S?.footnote,t[22]=S?.source,t[23]=ct,t[24]=ge):ge=t[24];let Ve;return t[25]!==re||t[26]!==zt||t[27]!==P||t[28]!==a||t[29]!==Nt||t[30]!==at||t[31]!==$t||t[32]!==dt||t[33]!==U||t[34]!==ne||t[35]!==le||t[36]!==Xt||t[37]!==Bt||t[38]!==ae||t[39]!==ge||t[40]!==Et||t[41]!==ct?(Ve=i.jsxRuntimeExports.jsxs(re,{className:ne,style:le,id:a,ref:ie,"aria-label":zt,backgroundColor:P,theme:Et,language:at,minHeight:$t,width:ct,height:Nt,relativeHeight:U,padding:dt,children:[Xt,Bt,ae,ge]}),t[25]=re,t[26]=zt,t[27]=P,t[28]=a,t[29]=Nt,t[30]=at,t[31]=$t,t[32]=dt,t[33]=U,t[34]=ne,t[35]=le,t[36]=Xt,t[37]=Bt,t[38]=ae,t[39]=ge,t[40]=Et,t[41]=ct,t[42]=Ve):Ve=t[42],Ve}function ts(e){return e.size}function es(e){return!_t.checkIfNullOrUndefined(e.size)}function is(e){return e.size}function ss(e){return!_t.checkIfNullOrUndefined(e.size)}function ns(e){return e.size}function os(e){return!_t.checkIfNullOrUndefined(e.size)}function ls(e){return e.size}function as(e){return!_t.checkIfNullOrUndefined(e.size)}function rs(e){return e.color}function cs(e){return e.color}function us(e){return e.color}function xs(e){return e!==void 0}function ms(e){return e!==void 0}function ds(e){return e.data}function ps(e){return e!==void 0}function hs(e){return e.data}function fs(e,t){return Ge.ascending(e,t)}function gs(e){const t=i.compilerRuntimeExports.c(122),{data:d,barColors:L,barPadding:qt,showTicks:Dt,topMargin:yt,bottomMargin:et,leftMargin:xt,rightMargin:k,truncateBy:I,width:y,height:z,tooltip:Nt,onSeriesMouseOver:ct,showLabels:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,rtl:Y,labelOrder:H,maxBarThickness:Q,minBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=yt===void 0?25:yt,J=et===void 0?10:et,ut=xt===void 0?100:xt,Ft=k===void 0?40:k,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?Z+25:Z;let r;t[3]!==J||t[4]!==ut||t[5]!==Ft||t[6]!==zt?(r={top:zt,bottom:J,left:ut,right:Ft},t[3]=J,t[4]=ut,t[5]=Ft,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==L||t[11]!==qt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==H||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==Q||t[31]!==Tt||t[32]!==U||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==j||t[37]!==ct||t[38]!==h||t[39]!==it||t[40]!==dt||t[41]!==F||t[42]!==Y||t[43]!==st||t[44]!==Vt||t[45]!==Dt||t[46]!==mt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==B||t[54]!==Z||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==H?(rt=(V,v)=>({...V,id:H?`${V.label}`:`${v}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(Os),E=Re.linear().domain([0,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.max(R,U*Gt.length):Q?Math.min(R,Q*Gt.length):R]).paddingInner(qt),It=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=Dt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:It.filter(Es),x:It.filter($s).map(V=>E(V)),y1:0-Z,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,precision:h}):null;const Kt=pt/2,Lt=0-c.top+15,Qt=s?.xAxis?.title,Wt=o?.xAxis?.title;t[74]!==W||t[75]!==Kt||t[76]!==Lt||t[77]!==Qt||t[78]!==Wt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Kt,y:Lt,style:Qt,className:Wt,text:W}),t[74]=W,t[75]=Kt,t[76]=Lt,t[77]=Qt,t[78]=Wt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(As).map(ws),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(V=>_t.checkIfNullOrUndefined(Ut(V.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:Ut(`${V.id}`)},whileInView:{x:0,y:Ut(`${V.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[V.size.map((v,O)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?L[O]===st?1:.3:1,onMouseEnter:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX),ct?.({...V,sizeIndex:O})},onMouseMove:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),ct?.(void 0)},onClick:()=>{(j||$)&&(je.isEqual(C,{...V,sizeIndex:O})&&F?(S(void 0),j?.(void 0)):(S({...V,sizeIndex:O}),j&&j({...V,sizeIndex:O})))},children:[v?i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:0,style:{fill:L[O]},height:Ut.bandwidth(),exit:{width:0,x:E(0),transition:{duration:u.duration}},variants:{initial:{width:0,x:E(0),fill:L[O]},whileInView:{width:E(v||0),x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n))),fill:L[O],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial"},O):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Ut.bandwidth()/2,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dy:"0.33em",className:i.mo("graph-value text-sm",o?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:E(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(L[O])},whileInView:{x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n)))+E(v||0)/2,opacity:v&&E(v)/ue.numberFormattingFunction(v,A,h,it,B).length>12?1:0,fill:Ie.getTextColorBasedOnBgColor(L[O]),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(v,A,h,it,B)}):null]},`${V.label}-${x[O]||O}`)),Vt?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${V.label}`.length<I?`${V.label}`:`${`${V.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:0+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{className:i.mo("graph-value graph-value-total text-sm",T?"":" fill-primary-gray-700 dark:fill-primary-gray-300",o?.graphObjectValues),style:{...T?{fill:T}:{},textAnchor:"start",...s?.graphObjectValues||{}},y:Ut.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,...T?{fill:T}:{}},whileInView:{x:E(oe.sum(V.size.map(js))),opacity:1,...T?{fill:T}:{},transition:{duration:u.duration}}},exit:{opacity:0,transition:{duration:u.duration}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(V.size.filter(vs)),A,h,it,B)}):null]},V.label));const Pt=o?.yAxis?.axis;let Ot;t[82]!==Pt?(Ot={axis:Pt},t[82]=Pt,t[83]=Ot):Ot=t[83];const Yt=s?.yAxis?.axis;let Jt;t[84]!==Yt?(Jt={axis:Yt},t[84]=Yt,t[85]=Jt):Jt=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(0),x2:E(0),y1:-2.5,y2:R+c.bottom,classNames:Ot,styles:Jt}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((V,v)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:V.text,color:V.color,x:E(V.value),y1:0-c.top,y2:R+c.bottom,textSide:E(V.value)>pt*.75||Y?"left":"right",classNames:V.classNames,styles:V.styles,animate:u,isInView:bt},v))}):null,t[8]=u,t[9]=W,t[10]=L,t[11]=qt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=H,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=Q,t[31]=Tt,t[32]=U,t[33]=C,t[34]=A,t[35]=a,t[36]=j,t[37]=ct,t[38]=h,t[39]=it,t[40]=dt,t[41]=F,t[42]=Y,t[43]=st,t[44]=Vt,t[45]=Dt,t[46]=mt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=B,t[54]=Z,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(bs).map(ys),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==Nt?($t=D&&Nt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:Nt,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=Nt,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function ys(e){return e.layer}function bs(e){return e.position==="after"}function vs(e){return e}function js(e){return e||0}function ws(e){return e.layer}function As(e){return e.position==="before"}function $s(e){return e!==0}function Es(e){return e!==0}function Os(e){return`${e.id}`}function ks(e){const t=i.compilerRuntimeExports.c(129),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,barPadding:I,showLabels:y,showTicks:z,truncateBy:Nt,tooltip:ct,onSeriesMouseOver:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,labelOrder:Y,maxBarThickness:H,minBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==I||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==Y||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==H||t[33]!==Tt||t[34]!==Q||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==j||t[39]!==Vt||t[40]!==x||t[41]!==it||t[42]!==dt||t[43]!==U||t[44]!==st||t[45]!==y||t[46]!==z||t[47]!==mt||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==B||t[55]!==Nt||t[56]!==W||t[57]!==et){const b=Re.linear().domain([0,Tt]).range([pt,0]).nice();let rt;t[72]!==Y?(rt=(f,ee)=>({...f,id:Y?`${f.label}`:`${ee}`}),t[72]=Y,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Y||St.map(Ss),E=fe.band().domain(Gt).range([0,Q?Math.max(nt,Q*Gt.length):H?Math.min(nt,H*Gt.length):nt]).paddingInner(I),Ut=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const It=b(0),Kt=b(0);let Lt;t[74]!==m||t[75]!==x||t[76]!==it||t[77]!==B?(Lt=ue.numberFormattingFunction(0,m,x,it,B),t[74]=m,t[75]=x,t[76]=it,t[77]=B,t[78]=Lt):Lt=t[78];const Qt=s?.xAxis?.axis,Wt=s?.yAxis?.labels;let Pt;t[79]!==Qt||t[80]!==Wt?(Pt={axis:Qt,label:Wt},t[79]=Qt,t[80]=Wt,t[81]=Pt):Pt=t[81];const Ot=a?.xAxis?.axis,Yt=a?.yAxis?.labels;let Jt;t[82]!==Ot||t[83]!==Yt?(Jt={axis:Ot,label:Yt},t[82]=Ot,t[83]=Yt,t[84]=Jt):Jt=t[84],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:It,y2:Kt,x1:0-A,x2:nt+r.right,label:Lt,labelPos:{x:0-A,y:b(0),dx:0,dy:-5},classNames:Pt,styles:Jt}),tt=z?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Ut.filter(Ts),y:Ut.filter(Is).map(f=>b(f)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const V=0-A-15,v=pt/2,O=a?.yAxis?.title,n=s?.yAxis?.title;t[85]!==$||t[86]!==V||t[87]!==v||t[88]!==O||t[89]!==n?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:V,y:v,style:O,className:n,text:$,rotate90:!0}),t[85]=$,t[86]=V,t[87]=v,t[88]=O,t[89]=n,t[90]=K):K=t[90],t[91]!==h?(M=h.filter(Vs).map(Ns),t[91]=h,t[92]=M):M=t[92],R=Me.AnimatePresence,lt=St.map(f=>_t.checkIfNullOrUndefined(E(f.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:E(`${f.id}`),y:0},whileInView:{x:E(`${f.id}`),y:0,transition:{duration:o.duration}}},transition:{duration:o.duration},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[f.size.map((ee,N)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?k[N]===st?1:.3:1,onMouseEnter:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX),Vt?.({...f,sizeIndex:N})},onMouseMove:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),Vt?.(void 0)},onClick:()=>{(j||F)&&(je.isEqual(p,{...f,sizeIndex:N})&&U?(C(void 0),j?.(void 0)):(C({...f,sizeIndex:N}),j&&j({...f,sizeIndex:N})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:0,width:E.bandwidth(),variants:{initial:{height:0,fill:k[N],y:b(0)},whileInView:{height:Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt)))),y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt))),fill:k[N],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{height:0,y:b(0),transition:{duration:o.duration}}}),mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:E.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:"0.33em",variants:{initial:{y:b(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(k[N])},whileInView:{y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))+Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))/2,opacity:ee&&Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))>20?1:0,fill:Ie.getTextColorBasedOnBgColor(k[N]),transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(ee,m,x,it,B)}):null]},`${f.label}-${u[N]||N}`)),y?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${f.label}`.length<Nt?`${f.label}`:`${`${f.label}`.substring(0,Nt)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...a?.graphObjectValues||{}},x:E.bandwidth()/2,dy:-10,className:i.mo("graph-value graph-value-total",W?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",s?.graphObjectValues),variants:{initial:{y:b(0),opacity:0,...W&&{fill:W}},whileInView:{y:b(oe.sum(f.size.map(Ls))),opacity:1,...W&&{fill:W},transition:{duration:o.duration}}},exit:{opacity:0,transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(f.size.filter(Ms)),m,x,it,B)}):null]},f.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((f,ee)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:f.text,color:f.color,y:b(f.value),x1:0-A,x2:nt+r.right,classNames:f.classNames,styles:f.styles,animate:o,isInView:G},ee))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=I,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=Y,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=H,t[33]=Tt,t[34]=Q,t[35]=p,t[36]=m,t[37]=T,t[38]=j,t[39]=Vt,t[40]=x,t[41]=it,t[42]=dt,t[43]=U,t[44]=st,t[45]=y,t[46]=z,t[47]=mt,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=B,t[55]=Nt,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[93]!==R||t[94]!==lt||t[95]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[93]=R,t[94]=lt,t[95]=P,t[96]=gt):gt=t[96];let jt;t[97]!==h?(jt=h.filter(Rs).map(Cs),t[97]=h,t[98]=jt):jt=t[98];let wt;t[99]!==_||t[100]!==tt||t[101]!==K||t[102]!==M||t[103]!==gt||t[104]!==jt||t[105]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[99]=_,t[100]=tt,t[101]=K,t[102]=M,t[103]=gt,t[104]=jt,t[105]=ft,t[106]=wt):wt=t[106];let at;t[107]!==g||t[108]!==ht||t[109]!==kt||t[110]!==ot||t[111]!==Ct||t[112]!==X||t[113]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[107]=g,t[108]=ht,t[109]=kt,t[110]=ot,t[111]=Ct,t[112]=X,t[113]=wt,t[114]=at):at=t[114];let At;t[115]!==s?.tooltip||t[116]!==S||t[117]!==Mt||t[118]!==c||t[119]!==a?.tooltip||t[120]!==ct?(At=c&&ct&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:ct,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[115]=s?.tooltip,t[116]=S,t[117]=Mt,t[118]=c,t[119]=a?.tooltip,t[120]=ct,t[121]=At):At=t[121];let $t;t[122]!==F||t[123]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[122]=F,t[123]=p,t[124]=$t):$t=t[124];let Et;return t[125]!==at||t[126]!==At||t[127]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[125]=at,t[126]=At,t[127]=$t,t[128]=Et):Et=t[128],Et}function Cs(e){return e.layer}function Rs(e){return e.position==="after"}function Ms(e){return e}function Ls(e){return e||0}function Ns(e){return e.layer}function Vs(e){return e.position==="before"}function Is(e){return e!==0}function Ts(e){return e!==0}function Ss(e){return`${e.id}`}function Ds(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,padding:Vt,backgroundColor:B,topMargin:it,bottomMargin:mt,leftMargin:dt,rightMargin:Tt,tooltip:j,onSeriesMouseOver:st,suffix:Y,prefix:H,showLabels:Q,relativeHeight:U,showValues:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,labelOrder:x,minHeight:h,theme:m,maxBarThickness:A,sortParameter:Z,maxNumberOfBars:J,minBarThickness:ut,showColorScale:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,timeline:vt,naLabel:nt,sortData:pt,orientation:R}=e,g=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,_=et===void 0?.25:et,tt=xt===void 0?!0:xt,K=k===void 0?999:k,M=B===void 0?!1:B,ht=Y===void 0?"":Y,kt=H===void 0?"":H,ot=Q===void 0?!0:Q,Ct=F===void 0?!0:F,X=s===void 0?!1:s,lt=o===void 0?!1:o,P=u===void 0?"en":u,ft=h===void 0?0:h,gt=m===void 0?"light":m,jt=Ft===void 0?!0:Ft,wt=G===void 0?!0:G,at=r===void 0?5:r,At=C===void 0?!0:C,$t=S===void 0?!1:S,Et=w===void 0?2:w;let b;t[0]!==Mt?(b=Mt===void 0?[]:Mt,t[0]=Mt,t[1]=b):b=t[1];const rt=b,St=vt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:vt,Gt=nt===void 0?"NA":nt,Ut=(R===void 0?"vertical":R)==="horizontal"?gs:ks,[It,Kt]=q.useState(0),[Lt,Qt]=q.useState(0),[Wt,Pt]=q.useState(St.autoplay),Ot=He.sort(Le.uniqBy(d,"date",!0).map(Bt=>me.parse(`${Bt}`,St.dateFormat||"yyyy",new Date).getTime()),Ks),[Yt,Jt]=q.useState(St.autoplay?0:Ot.length-1),[V,v]=q.useState(void 0),O=q.useRef(null),n=q.useRef(null);let f,ee;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{const Bt=new ResizeObserver(ae=>{Kt(ae[0].target.clientWidth||620),Qt(ae[0].target.clientHeight||480)});return O.current&&Bt.observe(O.current),()=>Bt.disconnect()},ee=[],t[2]=f,t[3]=ee):(f=t[2],ee=t[3]),q.useEffect(f,ee),q.useEffect(()=>{const Bt=setInterval(()=>{Jt(ae=>ae<Ot.length-1?ae+1:0)},(St.speed||2)*1e3);return Wt||clearInterval(Bt),()=>clearInterval(Bt)},[Ot,Wt,St.speed]);const N=ye.getSliderMarks(Ot,Yt,St.showOnlyActiveDate,St.dateFormat||"yyyy"),Rt=ve.GraphContainer,l=p?.graphContainer,ie=D?.graphContainer;let se;t[4]!==p?.description||t[5]!==p?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==D?.description||t[12]!==D?.title||t[13]!==y?(se=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:p?.title,description:p?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?n:void 0,dataDownload:lt?d.map(Js).filter(Ws).length>0?d.map(Us).filter(Ys):d.filter(Xs):null}):null,t[4]=p?.description,t[5]=p?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=D?.description,t[12]=D?.title,t[13]=y,t[14]=se):se=t[14];const xe=St.enabled&&Ot.length>0&&N?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!Wt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Wt?"Click to pause animation":"Click to play animation",children:Wt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Ot[0],max:Ot[Ot.length-1],marks:N,step:null,defaultValue:Ot[Ot.length-1],value:Ot[Yt],onChangeComplete:Bt=>{Jt(Ot.indexOf(Bt))},onChange:Bt=>{Jt(Ot.indexOf(Bt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,pe="grow flex flex-col justify-center gap-3 w-full",re=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:g,colorLegendTitle:ct,setSelectedColor:v,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:O,children:It&&Lt?i.jsxRuntimeExports.jsx(Ut,{data:Z!==void 0?Z==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Gs):Bt),qs,[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Ps):Bt),Bt=>_t.checkIfNullOrUndefined(Bt.size[Z])?-1/0:Bt.size[Z],[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Fs):Bt).filter((Bt,ae)=>J?ae<J:!0),barColors:g,width:It,height:Lt,barPadding:_,showTicks:tt,leftMargin:dt,rightMargin:Tt,topMargin:it,bottomMargin:mt,truncateBy:K,showLabels:ot,tooltip:j,onSeriesMouseOver:st,showValues:Ct,suffix:ht,prefix:kt,refValues:$,maxValue:_t.checkIfNullOrUndefined(T)?Math.max(...d.map(zs)):T,onSeriesMouseClick:a,selectedColor:V,rtl:P==="he"||P==="ar",labelOrder:x,maxBarThickness:A,minBarThickness:ut,resetSelectionOnDoubleClick:wt,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:at,valueColor:c,classNames:p,styles:D,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},colorDomain:Nt,precision:Et,customLayers:rt,naLabel:Gt}):null})]});let ne;t[15]!==re?(ne=i.jsxRuntimeExports.jsx("div",{className:pe,children:re}),t[15]=re,t[16]=ne):ne=t[16];let le;t[17]!==p?.footnote||t[18]!==p?.source||t[19]!==z||t[20]!==Dt||t[21]!==D?.footnote||t[22]!==D?.source||t[23]!==y?(le=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:Dt,footNote:z,width:y}):null,t[17]=p?.footnote,t[18]=p?.source,t[19]=z,t[20]=Dt,t[21]=D?.footnote,t[22]=D?.source,t[23]=y,t[24]=le):le=t[24];let Xt;return t[25]!==Rt||t[26]!==Ht||t[27]!==M||t[28]!==W||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==Vt||t[33]!==U||t[34]!==l||t[35]!==ie||t[36]!==se||t[37]!==xe||t[38]!==ne||t[39]!==le||t[40]!==gt||t[41]!==y?(Xt=i.jsxRuntimeExports.jsxs(Rt,{className:l,style:ie,id:W,ref:n,"aria-label":Ht,backgroundColor:M,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:Vt,children:[se,xe,ne,le]}),t[25]=Rt,t[26]=Ht,t[27]=M,t[28]=W,t[29]=I,t[30]=P,t[31]=ft,t[32]=Vt,t[33]=U,t[34]=l,t[35]=ie,t[36]=se,t[37]=xe,t[38]=ne,t[39]=le,t[40]=gt,t[41]=y,t[42]=Xt):Xt=t[42],Xt}function zs(e){return oe.sum(e.size.filter(Bs))||0}function Bs(e){return!_t.checkIfNullOrUndefined(e)}function Fs(e){return e==null}function Ps(e){return e==null}function qs(e){return oe.sum(e.size.filter(Hs))}function Hs(e){return!_t.checkIfNullOrUndefined(e)}function Gs(e){return e==null}function Xs(e){return e!==void 0}function Ys(e){return e!==void 0}function Us(e){return e.data}function Ws(e){return e!==void 0}function Js(e){return e.data}function Ks(e,t){return Ge.ascending(e,t)}function Qs(e){const t=i.compilerRuntimeExports.c(61),{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,orientation:S,styles:w,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt}=e,K=S===void 0?"vertical":S;let M;return t[0]!==nt||t[1]!==zt||t[2]!==ct||t[3]!==D||t[4]!==Dt||t[5]!==I||t[6]!==Mt||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==g||t[11]!==d||t[12]!==h||t[13]!==c||t[14]!==pt||t[15]!==vt||t[16]!==j||t[17]!==mt||t[18]!==x||t[19]!==T||t[20]!==L||t[21]!==dt||t[22]!==o||t[23]!==J||t[24]!==m||t[25]!==et||t[26]!==Ht||t[27]!==G||t[28]!==a||t[29]!==bt||t[30]!==Ft||t[31]!==s||t[32]!==tt||t[33]!==p||t[34]!==u||t[35]!==F||t[36]!==K||t[37]!==H||t[38]!==R||t[39]!==B||t[40]!==$||t[41]!==Q||t[42]!==r||t[43]!==xt||t[44]!==W||t[45]!==z||t[46]!==ut||t[47]!==yt||t[48]!==Nt||t[49]!==Z||t[50]!==it||t[51]!==w||t[52]!==Vt||t[53]!==A||t[54]!==_||t[55]!==U||t[56]!==k||t[57]!==y||t[58]!==C||t[59]!==Tt?(M=i.jsxRuntimeExports.jsx(_i,{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,styles:w,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt,orientation:K}),t[0]=nt,t[1]=zt,t[2]=ct,t[3]=D,t[4]=Dt,t[5]=I,t[6]=Mt,t[7]=st,t[8]=Y,t[9]=qt,t[10]=g,t[11]=d,t[12]=h,t[13]=c,t[14]=pt,t[15]=vt,t[16]=j,t[17]=mt,t[18]=x,t[19]=T,t[20]=L,t[21]=dt,t[22]=o,t[23]=J,t[24]=m,t[25]=et,t[26]=Ht,t[27]=G,t[28]=a,t[29]=bt,t[30]=Ft,t[31]=s,t[32]=tt,t[33]=p,t[34]=u,t[35]=F,t[36]=K,t[37]=H,t[38]=R,t[39]=B,t[40]=$,t[41]=Q,t[42]=r,t[43]=xt,t[44]=W,t[45]=z,t[46]=ut,t[47]=yt,t[48]=Nt,t[49]=Z,t[50]=it,t[51]=w,t[52]=Vt,t[53]=A,t[54]=_,t[55]=U,t[56]=k,t[57]=y,t[58]=C,t[59]=Tt,t[60]=M):M=t[60],M}function Zs(e){const t=i.compilerRuntimeExports.c(57),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,sortParameter:Z,sortData:J,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,orientation:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}=e,R=c===void 0?"vertical":c;let g;return t[0]!==S||t[1]!==Ft||t[2]!==dt||t[3]!==bt||t[4]!==et||t[5]!==Y||t[6]!==p||t[7]!==Nt||t[8]!==ct||t[9]!==qt||t[10]!==Mt||t[11]!==d||t[12]!==u||t[13]!==G||t[14]!==C||t[15]!==z||t[16]!==yt||t[17]!==o||t[18]!==W||t[19]!==L||t[20]!==I||t[21]!==h||t[22]!==x||t[23]!==Tt||t[24]!==ut||t[25]!==T||t[26]!==m||t[27]!==a||t[28]!==pt||t[29]!==zt||t[30]!==s||t[31]!==F||t[32]!==R||t[33]!==mt||t[34]!==w||t[35]!==B||t[36]!==$||t[37]!==Q||t[38]!==Ht||t[39]!==j||t[40]!==vt||t[41]!==H||t[42]!==xt||t[43]!==it||t[44]!==J||t[45]!==Z||t[46]!==Dt||t[47]!==D||t[48]!==Vt||t[49]!==A||t[50]!==nt||t[51]!==U||t[52]!==st||t[53]!==k||t[54]!==r||t[55]!==y?(g=i.jsxRuntimeExports.jsx(ci,{orientation:R,data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,sortParameter:Z,sortData:J,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,styles:D,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}),t[0]=S,t[1]=Ft,t[2]=dt,t[3]=bt,t[4]=et,t[5]=Y,t[6]=p,t[7]=Nt,t[8]=ct,t[9]=qt,t[10]=Mt,t[11]=d,t[12]=u,t[13]=G,t[14]=C,t[15]=z,t[16]=yt,t[17]=o,t[18]=W,t[19]=L,t[20]=I,t[21]=h,t[22]=x,t[23]=Tt,t[24]=ut,t[25]=T,t[26]=m,t[27]=a,t[28]=pt,t[29]=zt,t[30]=s,t[31]=F,t[32]=R,t[33]=mt,t[34]=w,t[35]=B,t[36]=$,t[37]=Q,t[38]=Ht,t[39]=j,t[40]=vt,t[41]=H,t[42]=xt,t[43]=it,t[44]=J,t[45]=Z,t[46]=Dt,t[47]=D,t[48]=Vt,t[49]=A,t[50]=nt,t[51]=U,t[52]=st,t[53]=k,t[54]=r,t[55]=y,t[56]=g):g=t[56],g}function _s(e){const t=i.compilerRuntimeExports.c(58),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,orientation:D,styles:p,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R}=e,g=D===void 0?"vertical":D;let _;return t[0]!==w||t[1]!==Ht||t[2]!==B||t[3]!==zt||t[4]!==et||t[5]!==z||t[6]!==C||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==vt||t[11]!==d||t[12]!==o||t[13]!==bt||t[14]!==S||t[15]!==j||t[16]!==yt||t[17]!==s||t[18]!==W||t[19]!==L||t[20]!==dt||t[21]!==h||t[22]!==u||t[23]!==k||t[24]!==A||t[25]!==ut||t[26]!==T||t[27]!==Ft||t[28]!==m||t[29]!==R||t[30]!==r||t[31]!==a||t[32]!==U||t[33]!==g||t[34]!==H||t[35]!==Mt||t[36]!==mt||t[37]!==$||t[38]!==F||t[39]!==G||t[40]!==I||t[41]!==nt||t[42]!==ct||t[43]!==xt||t[44]!==Vt||t[45]!==J||t[46]!==Z||t[47]!==Dt||t[48]!==p||t[49]!==it||t[50]!==x||t[51]!==pt||t[52]!==Q||t[53]!==y||t[54]!==Nt||t[55]!==c||t[56]!==Tt?(_=i.jsxRuntimeExports.jsx(Ds,{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,styles:p,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R,orientation:g}),t[0]=w,t[1]=Ht,t[2]=B,t[3]=zt,t[4]=et,t[5]=z,t[6]=C,t[7]=st,t[8]=Y,t[9]=qt,t[10]=vt,t[11]=d,t[12]=o,t[13]=bt,t[14]=S,t[15]=j,t[16]=yt,t[17]=s,t[18]=W,t[19]=L,t[20]=dt,t[21]=h,t[22]=u,t[23]=k,t[24]=A,t[25]=ut,t[26]=T,t[27]=Ft,t[28]=m,t[29]=R,t[30]=r,t[31]=a,t[32]=U,t[33]=g,t[34]=H,t[35]=Mt,t[36]=mt,t[37]=$,t[38]=F,t[39]=G,t[40]=I,t[41]=nt,t[42]=ct,t[43]=xt,t[44]=Vt,t[45]=J,t[46]=Z,t[47]=Dt,t[48]=p,t[49]=it,t[50]=x,t[51]=pt,t[52]=Q,t[53]=y,t[54]=Nt,t[55]=c,t[56]=Tt,t[57]=_):_=t[57],_}exports.GroupedBarGraph=Zs;exports.SimpleBarGraph=Qs;exports.StackedBarGraph=_s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("react"),ye=require("./getSliderMarks-BmADcPQt.cjs"),me=require("./parse-hMnG_lRV.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),oe=require("./index-CSNtgibC.cjs"),je=require("./index-DQA8q5sC.cjs"),we=require("./Modal-JW_IExO3.cjs"),ue=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-4dJo4_AF.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),$e=require("./string2HTML-CPGr_I5E.cjs"),Te=require("./YAxesLabels-DesLesUP.cjs"),Ee=require("./Axis-DxRV2yMi.cjs"),Oe=require("./AxisTitle-sS5bLLR7.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),ke=require("./ReferenceLine-BH0qdf4R.cjs"),De=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./XAxesLabels-Bt5NZBmX.cjs"),Ce=require("./use-in-view-QcfiW0w3.cjs"),Re=require("./linear-BwPAspcq.cjs"),fe=require("./band-VYfcZeJ2.cjs"),Me=require("./index-DG2bgAva.cjs"),Zt=require("./proxy-BxvUI_9l.cjs"),Be=require("./GraphHeader.cjs"),Fe=require("./GraphFooter.cjs"),Pe=require("./ColorLegendWithMouseOver.cjs"),ce=require("./Colors.cjs"),qe=require("./EmptyState-sAEZ_5rU.cjs"),be=require("./index-DRXx7m-C.cjs"),he=require("./ensureCompleteData-I6nYmT8E.cjs"),Le=require("./uniqBy-O05lp2S5.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs"),He=require("./sort-O96oMZLb.cjs"),Ge=require("./init-DU0ybBc_.cjs"),Ie=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs");function Xe(e){const t=i.compilerRuntimeExports.c(122),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,barColors:et,barPadding:xt,showTicks:k,truncateBy:I,width:y,height:z,suffix:Nt,prefix:ct,showValues:Vt,showLabels:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,rtl:H,labelOrder:Q,maxBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=L===void 0?100:L,J=qt===void 0?40:qt,ut=Dt===void 0?25:Dt,Ft=yt===void 0?10:yt,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?ut+25:ut;let r;t[3]!==Ft||t[4]!==Z||t[5]!==J||t[6]!==zt?(r={top:zt,bottom:Ft,left:Z,right:J},t[3]=Ft,t[4]=Z,t[5]=J,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==et||t[11]!==xt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==Q||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==U||t[31]!==Tt||t[32]!==j||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==st||t[37]!==mt||t[38]!==h||t[39]!==ct||t[40]!==dt||t[41]!==F||t[42]!==H||t[43]!==Y||t[44]!==B||t[45]!==k||t[46]!==Vt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==Nt||t[54]!==ut||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==Q?(rt=(v,O)=>({...v,id:Q?`${v.label}`:`${O}`}),t[72]=Q,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Q||St.map(_e),E=Re.linear().domain([j,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.min(R,U*Gt.length):R]).paddingInner(xt),It=fe.band().domain(d[0].size.map(Ze)).range([0,Ut.bandwidth()]).paddingInner(.1),Kt=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=k?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Kt.filter(Qe),x:Kt.filter(Ke).map(v=>E(v)),y1:0-ut,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:Nt,prefix:ct,labelType:"secondary",showGridLines:!0,precision:h}):null;const Lt=pt/2,Qt=0-c.top+15,Wt=s?.xAxis?.title,Pt=o?.xAxis?.title;t[74]!==W||t[75]!==Lt||t[76]!==Qt||t[77]!==Wt||t[78]!==Pt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Lt,y:Qt,style:Wt,className:Pt,text:W}),t[74]=W,t[75]=Lt,t[76]=Qt,t[77]=Wt,t[78]=Pt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(Je).map(We),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(v=>_t.checkIfNullOrUndefined(Ut(v.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:0,y:Ut(`${v.id}`)},whileInView:{x:0,y:Ut(`${v.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[v.size.map((O,n)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?et[n]===Y?1:.3:.85,onMouseEnter:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX),mt?.({...v,sizeIndex:n})},onMouseMove:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),mt?.(void 0)},onClick:()=>{(st||$)&&(je.isEqual(C,{...v,sizeIndex:n})&&F?(S(void 0),st?.(void 0)):(S({...v,sizeIndex:n}),st&&st({...v,sizeIndex:n})))},children:[_t.checkIfNullOrUndefined(O)?null:i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:It(`${n}`),variants:{initial:{width:0,x:E(0),fill:et[n]},whileInView:{width:_t.checkIfNullOrUndefined(O)?0:O>=0?E(O)-E(0):E(0)-E(O),x:O>=0?E(0):E(O),fill:et[n],transition:{duration:u.duration}}},exit:{width:0,x:E(0),transition:{duration:u.duration}},height:It.bandwidth(),initial:"initial",animate:bt?"whileInView":"initial"}),Vt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:It(`${n}`)+It.bandwidth()/2,style:{textAnchor:O&&O<0?"end":"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm",o?.graphObjectValues),dx:O&&O<0?-5:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,fill:T||et[n]},whileInView:{x:E(O||0),opacity:1,fill:T||et[n],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:ue.numberFormattingFunction(O,A,h,ct,Nt)}):null]},`${v.label}-${x[n]||n}`)),B?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${v.label}`.length<I?`${v.label}`:`${`${v.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:E(j<0?0:j)+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null]},v.label));const Ot=o?.yAxis?.axis;let Yt;t[82]!==Ot?(Yt={axis:Ot},t[82]=Ot,t[83]=Yt):Yt=t[83];const Jt=s?.yAxis?.axis;let V;t[84]!==Jt?(V={axis:Jt},t[84]=Jt,t[85]=V):V=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(j<0?0:j),x2:E(j<0?0:j),y1:-2.5,y2:R+c.bottom,classNames:Yt,styles:V}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((v,O)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:v.text,color:v.color,x:E(v.value),y1:0-c.top,y2:R+c.bottom,textSide:E(v.value)>pt*.75||H?"left":"right",classNames:v.classNames,styles:v.styles,animate:u,isInView:bt},O))}):null,t[8]=u,t[9]=W,t[10]=et,t[11]=xt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=Q,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=U,t[31]=Tt,t[32]=j,t[33]=C,t[34]=A,t[35]=a,t[36]=st,t[37]=mt,t[38]=h,t[39]=ct,t[40]=dt,t[41]=F,t[42]=H,t[43]=Y,t[44]=B,t[45]=k,t[46]=Vt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=Nt,t[54]=ut,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(Ue).map(Ye),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==it?($t=D&&it&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:it,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=it,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function Ye(e){return e.layer}function Ue(e){return e.position==="after"}function We(e){return e.layer}function Je(e){return e.position==="before"}function Ke(e){return e!==0}function Qe(e){return e!==0}function Ze(e,t){return`${t}`}function _e(e){return`${e.id}`}function ti(e){const t=i.compilerRuntimeExports.c(130),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,truncateBy:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,labelOrder:H,maxBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==z||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==H||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==Q||t[33]!==Tt||t[34]!==j||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==st||t[39]!==mt||t[40]!==x||t[41]!==y||t[42]!==dt||t[43]!==U||t[44]!==Y||t[45]!==Nt||t[46]!==Vt||t[47]!==ct||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==I||t[55]!==B||t[56]!==W||t[57]!==et){const b=Re.linear().domain([j,Tt]).range([pt,0]).nice();let rt;t[72]!==H?(rt=(N,Rt)=>({...N,id:H?`${N.label}`:`${Rt}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(ri),E=fe.band().domain(Gt).range([0,Q?Math.min(nt,Q*Gt.length):nt]).paddingInner(z),Ut=fe.band().domain(d[0].size.map(ai)).range([0,E.bandwidth()]).paddingInner(.1),It=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const Kt=b(j<0?0:j),Lt=b(j<0?0:j),Qt=j<0?0:j;let Wt;t[74]!==m||t[75]!==x||t[76]!==y||t[77]!==I||t[78]!==Qt?(Wt=ue.numberFormattingFunction(Qt,m,x,y,I),t[74]=m,t[75]=x,t[76]=y,t[77]=I,t[78]=Qt,t[79]=Wt):Wt=t[79];const Pt=s?.xAxis?.axis,Ot=s?.yAxis?.labels;let Yt;t[80]!==Pt||t[81]!==Ot?(Yt={axis:Pt,label:Ot},t[80]=Pt,t[81]=Ot,t[82]=Yt):Yt=t[82];const Jt=a?.xAxis?.axis,V=a?.yAxis?.labels;let v;t[83]!==Jt||t[84]!==V?(v={axis:Jt,label:V},t[83]=Jt,t[84]=V,t[85]=v):v=t[85],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Kt,y2:Lt,x1:0-A,x2:nt+r.right,label:Wt,labelPos:{x:0-A,dx:0,dy:Tt<0?"1em":-5,y:b(j<0?0:j)},classNames:Yt,styles:v}),tt=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:It.filter(li),y:It.filter(oi).map(N=>b(N)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const O=0-A-15,n=pt/2,f=a?.yAxis?.title,ee=s?.yAxis?.title;t[86]!==$||t[87]!==O||t[88]!==n||t[89]!==f||t[90]!==ee?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:O,y:n,style:f,className:ee,text:$,rotate90:!0}),t[86]=$,t[87]=O,t[88]=n,t[89]=f,t[90]=ee,t[91]=K):K=t[91],t[92]!==h?(M=h.filter(ni).map(si),t[92]=h,t[93]=M):M=t[93],R=Me.AnimatePresence,lt=St.map(N=>_t.checkIfNullOrUndefined(E(N.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:E(`${N.id}`),y:0},whileInView:{x:E(`${N.id}`),y:0,transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[N.size.map((Rt,l)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?k[l]===Y?1:.3:.85,onMouseEnter:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX),mt?.({...N,sizeIndex:l})},onMouseMove:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),mt?.(void 0)},onClick:()=>{(st||F)&&(je.isEqual(p,{...N,sizeIndex:l})&&U?(C(void 0),st?.(void 0)):(C({...N,sizeIndex:l}),st&&st({...N,sizeIndex:l})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:Ut(`${l}`),width:Ut.bandwidth(),variants:{initial:{height:0,y:b(0),fill:k[l]},whileInView:{height:_t.checkIfNullOrUndefined(Rt)?0:Math.abs(b(Rt)-b(0)),y:_t.checkIfNullOrUndefined(Rt)?b(0):Rt>0?b(Rt):b(0),fill:k[l],transition:{duration:o.duration}}},exit:{height:0,y:b(0),transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial"}),ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:Ut(`${l}`)+Ut.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:Rt?Rt>=0?"-5px":"1em":"-5px",variants:{initial:{y:b(0),opacity:0,fill:W||k[l]},whileInView:{y:b(Rt||0),opacity:1,fill:W||k[l],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(Rt,m,x,y,I)}):null]},`${N.label}-${u[l]||l}`)),Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${N.label}`.length<B?`${N.label}`:`${`${N.label}`.substring(0,B)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null]},N.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((N,Rt)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:N.text,color:N.color,y:b(N.value),x1:0-A,x2:nt+r.right,classNames:N.classNames,styles:N.styles,animate:o,isInView:G},Rt))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=z,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=H,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=Q,t[33]=Tt,t[34]=j,t[35]=p,t[36]=m,t[37]=T,t[38]=st,t[39]=mt,t[40]=x,t[41]=y,t[42]=dt,t[43]=U,t[44]=Y,t[45]=Nt,t[46]=Vt,t[47]=ct,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=I,t[55]=B,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[94]!==R||t[95]!==lt||t[96]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[94]=R,t[95]=lt,t[96]=P,t[97]=gt):gt=t[97];let jt;t[98]!==h?(jt=h.filter(ii).map(ei),t[98]=h,t[99]=jt):jt=t[99];let wt;t[100]!==_||t[101]!==tt||t[102]!==K||t[103]!==M||t[104]!==gt||t[105]!==jt||t[106]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[100]=_,t[101]=tt,t[102]=K,t[103]=M,t[104]=gt,t[105]=jt,t[106]=ft,t[107]=wt):wt=t[107];let at;t[108]!==g||t[109]!==ht||t[110]!==kt||t[111]!==ot||t[112]!==Ct||t[113]!==X||t[114]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[108]=g,t[109]=ht,t[110]=kt,t[111]=ot,t[112]=Ct,t[113]=X,t[114]=wt,t[115]=at):at=t[115];let At;t[116]!==s?.tooltip||t[117]!==S||t[118]!==Mt||t[119]!==c||t[120]!==a?.tooltip||t[121]!==it?(At=c&&it&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:it,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[116]=s?.tooltip,t[117]=S,t[118]=Mt,t[119]=c,t[120]=a?.tooltip,t[121]=it,t[122]=At):At=t[122];let $t;t[123]!==F||t[124]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[123]=F,t[124]=p,t[125]=$t):$t=t[125];let Et;return t[126]!==at||t[127]!==At||t[128]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[126]=at,t[127]=At,t[128]=$t,t[129]=Et):Et=t[129],Et}function ei(e){return e.layer}function ii(e){return e.position==="after"}function si(e){return e.layer}function ni(e){return e.position==="before"}function oi(e){return e!==0}function li(e){return e!==0}function ai(e,t){return`${t}`}function ri(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,showColorScale:mt,padding:dt,backgroundColor:Tt,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,graphID:T,maxValue:a,minValue:s,onSeriesMouseClick:o,graphDownload:u,dataDownload:x,language:h,labelOrder:m,minHeight:A,theme:Z,maxBarThickness:J,ariaLabel:ut,resetSelectionOnDoubleClick:Ft,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:bt,valueColor:zt,styles:r,classNames:c,filterNA:D,animate:p,precision:C,customLayers:S,timeline:w,naLabel:Mt,sortParameter:vt,sortData:nt,orientation:pt}=e,R=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,g=et===void 0?.25:et,_=xt===void 0?!0:xt,tt=k===void 0?999:k,K=Vt===void 0?"":Vt,M=B===void 0?"":B,ht=it===void 0?!0:it,kt=mt===void 0?!0:mt,ot=Tt===void 0?!1:Tt,Ct=Q===void 0?!0:Q,X=u===void 0?!1:u,lt=x===void 0?!1:x,P=h===void 0?"en":h,ft=A===void 0?0:A,gt=Z===void 0?"light":Z,jt=Ft===void 0?!0:Ft,wt=bt===void 0?5:bt,at=D===void 0?!0:D,At=p===void 0?!1:p,$t=C===void 0?2:C;let Et;t[0]!==S?(Et=S===void 0?[]:S,t[0]=S,t[1]=Et):Et=t[1];const b=Et,rt=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,St=Mt===void 0?"NA":Mt,E=(pt===void 0?"vertical":pt)==="horizontal"?Xe:ti,[Ut,It]=q.useState(0),[Kt,Lt]=q.useState(0),[Qt,Wt]=q.useState(rt.autoplay),Pt=He.sort(Le.uniqBy(d,"date",!0).map(Xt=>me.parse(`${Xt}`,rt.dateFormat||"yyyy",new Date).getTime()),Ci),[Ot,Yt]=q.useState(rt.autoplay?0:Pt.length-1),[Jt,V]=q.useState(void 0),v=q.useRef(null),O=q.useRef(null);let n,f;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{const Xt=new ResizeObserver(Bt=>{It(Bt[0].target.clientWidth||620),Lt(Bt[0].target.clientHeight||480)});return v.current&&Xt.observe(v.current),()=>Xt.disconnect()},f=[],t[2]=n,t[3]=f):(n=t[2],f=t[3]),q.useEffect(n,f),q.useEffect(()=>{const Xt=setInterval(()=>{Yt(Bt=>Bt<Pt.length-1?Bt+1:0)},(rt.speed||2)*1e3);return Qt||clearInterval(Xt),()=>clearInterval(Xt)},[Pt,Qt,rt.speed]);const ee=ye.getSliderMarks(Pt,Ot,rt.showOnlyActiveDate,rt.dateFormat||"yyyy"),N=ve.GraphContainer,Rt=c?.graphContainer,l=r?.graphContainer;let ie;t[4]!==c?.description||t[5]!==c?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==r?.description||t[12]!==r?.title||t[13]!==y?(ie=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:c?.title,description:c?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?O:void 0,dataDownload:lt?d.map(ki).filter(Oi).length>0?d.map(Ei).filter($i):d.filter(Ai):null}):null,t[4]=c?.description,t[5]=c?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=r?.description,t[12]=r?.title,t[13]=y,t[14]=ie):ie=t[14];const se=rt.enabled&&Pt.length>0&&ee?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Wt(!Qt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Qt?"Click to pause animation":"Click to play animation",children:Qt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Pt[0],max:Pt[Pt.length-1],marks:ee,step:null,defaultValue:Pt[Pt.length-1],value:Pt[Ot],onChangeComplete:Xt=>{Yt(Pt.indexOf(Xt))},onChange:Xt=>{Yt(Pt.indexOf(Xt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,xe="grow flex flex-col justify-center gap-3 w-full",pe=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[kt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:R,colorLegendTitle:ct,setSelectedColor:V,showNAColor:!1,className:c?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:v,children:Ut&&Kt?i.jsxRuntimeExports.jsx(E,{data:vt!==void 0?vt==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(wi):Xt),vi,[nt||"asc"]):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(bi):Xt),Xt=>_t.checkIfNullOrUndefined(Xt.size[vt])?-1/0:Xt.size[vt],[nt||"asc"]):he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>at?!Xt.size.every(yi):Xt),barColors:R,width:Ut,height:Kt,suffix:K,prefix:M,showValues:ht,barPadding:g,showTicks:_,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,truncateBy:tt,showLabels:Ct,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(a)?Math.max(...d.map(fi))<0?0:Math.max(...d.map(pi)):a,minValue:_t.checkIfNullOrUndefined(s)?Math.min(...d.map(mi))>=0?0:Math.min(...d.map(ui)):s,onSeriesMouseClick:o,selectedColor:Jt,labelOrder:m,rtl:P==="he"||P==="ar",maxBarThickness:J,resetSelectionOnDoubleClick:jt,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:wt,valueColor:zt,styles:r,classNames:c,colorDomain:Nt,animate:At===!0?{duration:.5,once:!0,amount:.5}:At||{duration:0,once:!0,amount:0},precision:$t,customLayers:b,naLabel:St}):null})]});let re;t[15]!==pe?(re=i.jsxRuntimeExports.jsx("div",{className:xe,children:pe}),t[15]=pe,t[16]=re):re=t[16];let ne;t[17]!==c?.footnote||t[18]!==c?.source||t[19]!==z||t[20]!==Dt||t[21]!==r?.footnote||t[22]!==r?.source||t[23]!==y?(ne=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:Dt,footNote:z,width:y}):null,t[17]=c?.footnote,t[18]=c?.source,t[19]=z,t[20]=Dt,t[21]=r?.footnote,t[22]=r?.source,t[23]=y,t[24]=ne):ne=t[24];let le;return t[25]!==N||t[26]!==ut||t[27]!==ot||t[28]!==T||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==dt||t[33]!==U||t[34]!==Rt||t[35]!==l||t[36]!==ie||t[37]!==se||t[38]!==re||t[39]!==ne||t[40]!==gt||t[41]!==y?(le=i.jsxRuntimeExports.jsxs(N,{className:Rt,style:l,id:T,ref:O,"aria-label":ut,backgroundColor:ot,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:dt,children:[ie,se,re,ne]}),t[25]=N,t[26]=ut,t[27]=ot,t[28]=T,t[29]=I,t[30]=P,t[31]=ft,t[32]=dt,t[33]=U,t[34]=Rt,t[35]=l,t[36]=ie,t[37]=se,t[38]=re,t[39]=ne,t[40]=gt,t[41]=y,t[42]=le):le=t[42],le}function ui(e){return Math.min(...e.size.filter(xi))}function xi(e){return!_t.checkIfNullOrUndefined(e)}function mi(e){return Math.min(...e.size.filter(di))}function di(e){return!_t.checkIfNullOrUndefined(e)}function pi(e){return Math.max(...e.size.filter(hi))}function hi(e){return!_t.checkIfNullOrUndefined(e)}function fi(e){return Math.max(...e.size.filter(gi))}function gi(e){return!_t.checkIfNullOrUndefined(e)}function yi(e){return e==null}function bi(e){return e==null}function vi(e){return oe.sum(e.size.filter(ji))}function ji(e){return!_t.checkIfNullOrUndefined(e)}function wi(e){return e==null}function Ai(e){return e!==void 0}function $i(e){return e!==void 0}function Ei(e){return e.data}function Oi(e){return e!==void 0}function ki(e){return e.data}function Ci(e,t){return Ge.ascending(e,t)}function Ri(e){const t=i.compilerRuntimeExports.c(125),{data:d,barColor:L,suffix:qt,prefix:Dt,barPadding:yt,showValues:et,showTicks:xt,truncateBy:k,width:I,height:y,colorDomain:z,topMargin:Nt,bottomMargin:ct,leftMargin:Vt,rightMargin:B,showLabels:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,highlightedDataPoints:st,maxValue:Y,minValue:H,onSeriesMouseClick:Q,labelOrder:U,rtl:F,maxBarThickness:$,minBarThickness:W,resetSelectionOnDoubleClick:T,detailsOnClick:a,barAxisTitle:s,valueColor:o,noOfTicks:u,styles:x,classNames:h,animate:m,dimmedOpacity:A,precision:Z,customLayers:J,naLabel:ut}=e,Ft=Nt===void 0?25:Nt,Ht=ct===void 0?10:ct,G=Vt===void 0?100:Vt,bt=B===void 0?40:B,zt=q.useRef(null);let r;t[0]!==m.amount||t[1]!==m.once?(r={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=r):r=t[2];const c=Ce.useInView(zt,r),[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=s?Ft+25:Ft;let R;t[3]!==Ht||t[4]!==G||t[5]!==bt||t[6]!==pt?(R={top:pt,bottom:Ht,left:G,right:bt},t[3]=Ht,t[4]=G,t[5]=bt,t[6]=pt,t[7]=R):R=t[7];const g=R,_=I-g.left-g.right,tt=y-g.top-g.bottom;let K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt,at;if(t[8]!==m||t[9]!==s||t[10]!==L||t[11]!==yt||t[12]!==h?.graphObjectValues||t[13]!==h?.xAxis?.gridLines||t[14]!==h?.xAxis?.labels||t[15]!==h?.xAxis?.title||t[16]!==h?.yAxis?.axis||t[17]!==h?.yAxis?.labels||t[18]!==z||t[19]!==J||t[20]!==d||t[21]!==a||t[22]!==A||t[23]!==tt||t[24]!==_||t[25]!==y||t[26]!==st||t[27]!==c||t[28]!==U||t[29]!==g.bottom||t[30]!==g.left||t[31]!==g.top||t[32]!==$||t[33]!==Y||t[34]!==W||t[35]!==H||t[36]!==C||t[37]!==ut||t[38]!==u||t[39]!==Q||t[40]!==dt||t[41]!==Z||t[42]!==Dt||t[43]!==Tt||t[44]!==T||t[45]!==F||t[46]!==j||t[47]!==it||t[48]!==xt||t[49]!==et||t[50]!==x?.graphObjectValues||t[51]!==x?.xAxis?.gridLines||t[52]!==x?.xAxis?.labels||t[53]!==x?.xAxis?.title||t[54]!==x?.yAxis?.axis||t[55]!==x?.yAxis?.labels||t[56]!==qt||t[57]!==Ft||t[58]!==k||t[59]!==o||t[60]!==I){let E;t[75]!==U?(E=(n,f)=>({...n,id:U?`${n.label}`:`${f}`}),t[75]=U,t[76]=E):E=t[76];const Ut=d.map(E),It=Re.linear().domain([H,Y]).range([0,_]).nice(),Kt=U||Ut.map(Fi),Lt=fe.band().domain(Kt).range([0,W?Math.max(tt,W*Kt.length):$?Math.min(tt,$*Kt.length):tt]).paddingInner(yt),Qt=It.ticks(u);M=Zt.motion.svg,X=zt,lt=`${I}px`,P=`${y}px`,ft=`0 0 ${I} ${y}`,gt="ltr",ht=`translate(${g.left},${g.top})`,kt=xt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Qt.filter(Bi),x:Qt.filter(zi).map(n=>It(n)),y1:0-Ft,y2:tt+g.bottom,styles:{gridLines:x?.xAxis?.gridLines,labels:x?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:qt,prefix:Dt,labelType:"secondary",showGridLines:!0,precision:Z}):null;const Wt=_/2,Pt=0-g.top+15,Ot=x?.xAxis?.title,Yt=h?.xAxis?.title;t[77]!==s||t[78]!==Wt||t[79]!==Pt||t[80]!==Ot||t[81]!==Yt?(ot=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Wt,y:Pt,style:Ot,className:Yt,text:s}),t[77]=s,t[78]=Wt,t[79]=Pt,t[80]=Ot,t[81]=Yt,t[82]=ot):ot=t[82],t[83]!==J?(Ct=J.filter(Di).map(Si),t[83]=J,t[84]=Ct):Ct=t[84],K=Me.AnimatePresence,jt=Ut.map(n=>_t.checkIfNullOrUndefined(Lt(n.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85},whileInView:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:f=>{p(n),nt(f.clientY),Mt(f.clientX),dt?.(n)},onClick:()=>{(Q||a)&&(je.isEqual(C,n)&&T?(S(void 0),Q?.(void 0)):(S(n),Q?.(n)))},onMouseMove:f=>{p(n),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),dt?.(void 0)},children:[n.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{variants:{initial:{width:0,x:It(0),y:Lt(`${n.id}`),fill:d.filter(Ti).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray},whileInView:{width:n.size>=0?It(n.size)-It(0):It(0)-It(n.size),x:n.size>=0?It(0):It(n.size),y:Lt(`${n.id}`),fill:d.filter(Ii).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{width:0,x:It(0),transition:{duration:m.duration}},height:Lt.bandwidth()}):null,it?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${n.label}`.length<k?`${n.label}`:`${`${n.label}`.substring(0,k)}...`,y:Lt(n.id)||0,x:(n.size||0)<0?It(0):0-g.left,width:(n.size||0)<0?I-It(0):It(0)+g.left,height:Lt.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:x?.yAxis?.labels,className:h?.yAxis?.labels,animate:m,isInView:c}):null,et?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:n.size&&n.size<0?"end":"start",...x?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!o&&L.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",h?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",variants:{initial:{x:It(0),y:Lt(`${n.id}`)+Lt.bandwidth()/2,opacity:0,fill:o||(d.filter(Vi).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray)},whileInView:{x:n.size?It(n.size):It(0),opacity:1,y:Lt(`${n.id}`)+Lt.bandwidth()/2,fill:o||(d.filter(Ni).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(n.size,ut,Z,Dt,qt)}):null]},n.label));const Jt=h?.yAxis?.axis;let V;t[85]!==Jt?(V={axis:Jt},t[85]=Jt,t[86]=V):V=t[86];const v=x?.yAxis?.axis;let O;t[87]!==v?(O={axis:v},t[87]=v,t[88]=O):O=t[88],wt=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:It(H<0?0:H),x2:It(H<0?0:H),y1:-2.5,y2:tt+g.bottom,classNames:V,styles:O}),at=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((n,f)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:n.text,color:n.color,x:It(n.value),y1:0-g.top,y2:tt+g.bottom,textSide:It(n.value)>_*.75||F?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:c},f))}):null,t[8]=m,t[9]=s,t[10]=L,t[11]=yt,t[12]=h?.graphObjectValues,t[13]=h?.xAxis?.gridLines,t[14]=h?.xAxis?.labels,t[15]=h?.xAxis?.title,t[16]=h?.yAxis?.axis,t[17]=h?.yAxis?.labels,t[18]=z,t[19]=J,t[20]=d,t[21]=a,t[22]=A,t[23]=tt,t[24]=_,t[25]=y,t[26]=st,t[27]=c,t[28]=U,t[29]=g.bottom,t[30]=g.left,t[31]=g.top,t[32]=$,t[33]=Y,t[34]=W,t[35]=H,t[36]=C,t[37]=ut,t[38]=u,t[39]=Q,t[40]=dt,t[41]=Z,t[42]=Dt,t[43]=Tt,t[44]=T,t[45]=F,t[46]=j,t[47]=it,t[48]=xt,t[49]=et,t[50]=x?.graphObjectValues,t[51]=x?.xAxis?.gridLines,t[52]=x?.xAxis?.labels,t[53]=x?.xAxis?.title,t[54]=x?.yAxis?.axis,t[55]=x?.yAxis?.labels,t[56]=qt,t[57]=Ft,t[58]=k,t[59]=o,t[60]=I,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt,t[72]=jt,t[73]=wt,t[74]=at}else K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71],jt=t[72],wt=t[73],at=t[74];let At;t[89]!==K||t[90]!==jt||t[91]!==wt||t[92]!==at?(At=i.jsxRuntimeExports.jsxs(K,{children:[jt,wt,at]}),t[89]=K,t[90]=jt,t[91]=wt,t[92]=at,t[93]=At):At=t[93];let $t;t[94]!==J?($t=J.filter(Li).map(Mi),t[94]=J,t[95]=$t):$t=t[95];let Et;t[96]!==ht||t[97]!==kt||t[98]!==ot||t[99]!==Ct||t[100]!==At||t[101]!==$t?(Et=i.jsxRuntimeExports.jsxs("g",{transform:ht,children:[kt,ot,Ct,At,$t]}),t[96]=ht,t[97]=kt,t[98]=ot,t[99]=Ct,t[100]=At,t[101]=$t,t[102]=Et):Et=t[102];let b;t[103]!==M||t[104]!==X||t[105]!==lt||t[106]!==P||t[107]!==ft||t[108]!==gt||t[109]!==Et?(b=i.jsxRuntimeExports.jsx(M,{ref:X,width:lt,height:P,viewBox:ft,direction:gt,children:Et}),t[103]=M,t[104]=X,t[105]=lt,t[106]=P,t[107]=ft,t[108]=gt,t[109]=Et,t[110]=b):b=t[110];let rt;t[111]!==h?.tooltip||t[112]!==w||t[113]!==vt||t[114]!==D||t[115]!==x?.tooltip||t[116]!==mt?(rt=D&&mt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:mt,xPos:w,yPos:vt,backgroundStyle:x?.tooltip,className:h?.tooltip}):null,t[111]=h?.tooltip,t[112]=w,t[113]=vt,t[114]=D,t[115]=x?.tooltip,t[116]=mt,t[117]=rt):rt=t[117];let St;t[118]!==a||t[119]!==C?(St=a&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof a=="string"?{__html:$e.string2HTML(a,C)}:void 0,children:typeof a=="function"?a(C):null})}):null,t[118]=a,t[119]=C,t[120]=St):St=t[120];let Gt;return t[121]!==b||t[122]!==rt||t[123]!==St?(Gt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[b,rt,St]}),t[121]=b,t[122]=rt,t[123]=St,t[124]=Gt):Gt=t[124],Gt}function Mi(e){return e.layer}function Li(e){return e.position==="after"}function Ni(e){return e.color}function Vi(e){return e.color}function Ii(e){return e.color}function Ti(e){return e.color}function Si(e){return e.layer}function Di(e){return e.position==="before"}function zi(e){return e!==0}function Bi(e){return e!==0}function Fi(e){return`${e.id}`}function Pi(e){const t=i.compilerRuntimeExports.c(133),{leftMargin:d,rightMargin:L,topMargin:qt,bottomMargin:Dt,data:yt,width:et,height:xt,barColor:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,colorDomain:B,truncateBy:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,maxValue:st,minValue:Y,highlightedDataPoints:H,onSeriesMouseClick:Q,labelOrder:U,maxBarThickness:F,minBarThickness:$,resetSelectionOnDoubleClick:W,detailsOnClick:T,barAxisTitle:a,valueColor:s,noOfTicks:o,styles:u,classNames:x,dimmedOpacity:h,animate:m,precision:A,customLayers:Z,naLabel:J}=e,ut=d===void 0?20:d,Ft=L===void 0?20:L,Ht=qt===void 0?20:qt,G=Dt===void 0?25:Dt,bt=q.useRef(null);let zt;t[0]!==m.amount||t[1]!==m.once?(zt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=zt):zt=t[2];const r=Ce.useInView(bt,zt),c=a?ut+30:ut;let D;t[3]!==G||t[4]!==Ft||t[5]!==c||t[6]!==Ht?(D={top:Ht,bottom:G,left:c,right:Ft},t[3]=G,t[4]=Ft,t[5]=c,t[6]=Ht,t[7]=D):D=t[7];const p=D,[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),[pt,R]=q.useState(void 0),g=et-p.left-p.right,_=xt-p.top-p.bottom;let tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt;if(t[8]!==m||t[9]!==a||t[10]!==k||t[11]!==z||t[12]!==x?.graphObjectValues||t[13]!==x?.xAxis?.axis||t[14]!==x?.xAxis?.labels||t[15]!==x?.yAxis?.gridLines||t[16]!==x?.yAxis?.labels||t[17]!==x?.yAxis?.title||t[18]!==B||t[19]!==Z||t[20]!==yt||t[21]!==T||t[22]!==h||t[23]!==_||t[24]!==g||t[25]!==xt||t[26]!==H||t[27]!==r||t[28]!==U||t[29]!==ut||t[30]!==p.bottom||t[31]!==p.left||t[32]!==p.right||t[33]!==p.top||t[34]!==F||t[35]!==st||t[36]!==$||t[37]!==Y||t[38]!==w||t[39]!==J||t[40]!==o||t[41]!==Q||t[42]!==dt||t[43]!==A||t[44]!==y||t[45]!==Tt||t[46]!==W||t[47]!==j||t[48]!==Nt||t[49]!==Vt||t[50]!==ct||t[51]!==u?.graphObjectValues||t[52]!==u?.xAxis?.axis||t[53]!==u?.xAxis?.labels||t[54]!==u?.yAxis?.gridLines||t[55]!==u?.yAxis?.labels||t[56]!==u?.yAxis?.title||t[57]!==I||t[58]!==it||t[59]!==s||t[60]!==et){const Gt=Re.linear().domain([Y,st]).range([_,0]).nice();let E;t[75]!==U?(E=(l,ie)=>({...l,id:U?`${l.label}`:`${ie}`}),t[75]=U,t[76]=E):E=t[76];const Ut=yt.map(E),It=U||Ut.map(Zi),Kt=fe.band().domain(It).range([0,$?Math.max(g,$*It.length):F?Math.min(g,F*It.length):g]).paddingInner(z),Lt=Gt.ticks(o);K=Zt.motion.svg,Ct=bt,X=`${et}px`,lt=`${xt}px`,P=`0 0 ${et} ${xt}`,ft="ltr",wt=`translate(${p.left},${p.top})`;const Qt=Gt(Y<0?0:Y),Wt=Gt(Y<0?0:Y),Pt=Y<0?0:Y;let Ot;t[77]!==J||t[78]!==A||t[79]!==y||t[80]!==I||t[81]!==Pt?(Ot=ue.numberFormattingFunction(Pt,J,A,y,I),t[77]=J,t[78]=A,t[79]=y,t[80]=I,t[81]=Pt,t[82]=Ot):Ot=t[82];const Yt=x?.xAxis?.axis,Jt=x?.yAxis?.labels;let V;t[83]!==Yt||t[84]!==Jt?(V={axis:Yt,label:Jt},t[83]=Yt,t[84]=Jt,t[85]=V):V=t[85];const v=u?.xAxis?.axis,O=u?.yAxis?.labels;let n;t[86]!==v||t[87]!==O?(n={axis:v,label:O},t[86]=v,t[87]=O,t[88]=n):n=t[88],M=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Qt,y2:Wt,x1:0-ut,x2:g+p.right,label:Ot,labelPos:{x:0-ut,dx:0,dy:st<0?"1em":-5,y:Gt(Y<0?0:Y)},classNames:V,styles:n}),ht=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Lt.filter(Qi),y:Lt.filter(Ki).map(l=>Gt(l)),x1:0-ut,x2:g+p.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:A}):null;const f=0-ut-15,ee=_/2,N=u?.yAxis?.title,Rt=x?.yAxis?.title;t[89]!==a||t[90]!==f||t[91]!==ee||t[92]!==N||t[93]!==Rt?(kt=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:f,y:ee,style:N,className:Rt,text:a,rotate90:!0}),t[89]=a,t[90]=f,t[91]=ee,t[92]=N,t[93]=Rt,t[94]=kt):kt=t[94],t[95]!==Z?(ot=Z.filter(Ji).map(Wi),t[95]=Z,t[96]=ot):ot=t[96],tt=Me.AnimatePresence,gt=Ut.map((l,ie)=>_t.checkIfNullOrUndefined(Kt(l.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85},whileInView:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85,transition:{duration:m.duration}}},exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:se=>{S(l),R(se.clientY),nt(se.clientX),dt?.(l)},onClick:()=>{(Q||T)&&(je.isEqual(w,l)&&W?(Mt(void 0),Q?.(void 0)):(Mt(l),Q?.(l)))},onMouseMove:se=>{S(l),R(se.clientY),nt(se.clientX)},onMouseLeave:()=>{S(void 0),nt(void 0),R(void 0),dt?.(void 0)},children:[l.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{width:Kt.bandwidth(),initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{height:0,x:Kt(`${l.id}`),y:Gt(0),fill:yt.filter(Ui).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray},whileInView:{height:l.size?Math.abs(Gt(l.size)-Gt(0)):0,y:l.size&&l.size>0?Gt(l.size):Gt(0),x:Kt(`${l.id}`),fill:yt.filter(Yi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray,transition:{duration:m.duration}}},exit:{height:0,y:Gt(0),transition:{duration:m.duration}}}):null,Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${l.label}`.length<it?`${l.label}`:`${`${l.label}`.substring(0,it)}...`,y:(l.size||0)<0?0:Gt(0)+5,x:Kt(`${l.id}`),width:Kt.bandwidth(),height:(l.size||0)<0?Gt(0)-5:p.bottom,style:u?.xAxis?.labels,className:x?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:m,isInView:r}):null,ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...u?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!s&&k.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",x?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(0),opacity:0,fill:s||(yt.filter(Xi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray)},whileInView:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(l.size||0),fill:s||(yt.filter(Gi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:r?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(l.size,J,A,y,I)}):null]},l.label)),jt=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((l,ie)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:l.text,color:l.color,y:Gt(l.value),x1:0-ut,x2:g+p.right,classNames:l.classNames,styles:l.styles,animate:m,isInView:r},ie))}):null,t[8]=m,t[9]=a,t[10]=k,t[11]=z,t[12]=x?.graphObjectValues,t[13]=x?.xAxis?.axis,t[14]=x?.xAxis?.labels,t[15]=x?.yAxis?.gridLines,t[16]=x?.yAxis?.labels,t[17]=x?.yAxis?.title,t[18]=B,t[19]=Z,t[20]=yt,t[21]=T,t[22]=h,t[23]=_,t[24]=g,t[25]=xt,t[26]=H,t[27]=r,t[28]=U,t[29]=ut,t[30]=p.bottom,t[31]=p.left,t[32]=p.right,t[33]=p.top,t[34]=F,t[35]=st,t[36]=$,t[37]=Y,t[38]=w,t[39]=J,t[40]=o,t[41]=Q,t[42]=dt,t[43]=A,t[44]=y,t[45]=Tt,t[46]=W,t[47]=j,t[48]=Nt,t[49]=Vt,t[50]=ct,t[51]=u?.graphObjectValues,t[52]=u?.xAxis?.axis,t[53]=u?.xAxis?.labels,t[54]=u?.yAxis?.gridLines,t[55]=u?.yAxis?.labels,t[56]=u?.yAxis?.title,t[57]=I,t[58]=it,t[59]=s,t[60]=et,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft,t[72]=gt,t[73]=jt,t[74]=wt}else tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71],gt=t[72],jt=t[73],wt=t[74];let at;t[97]!==tt||t[98]!==gt||t[99]!==jt?(at=i.jsxRuntimeExports.jsxs(tt,{children:[gt,jt]}),t[97]=tt,t[98]=gt,t[99]=jt,t[100]=at):at=t[100];let At;t[101]!==Z?(At=Z.filter(Hi).map(qi),t[101]=Z,t[102]=At):At=t[102];let $t;t[103]!==M||t[104]!==ht||t[105]!==kt||t[106]!==ot||t[107]!==at||t[108]!==At||t[109]!==wt?($t=i.jsxRuntimeExports.jsxs("g",{transform:wt,children:[M,ht,kt,ot,at,At]}),t[103]=M,t[104]=ht,t[105]=kt,t[106]=ot,t[107]=at,t[108]=At,t[109]=wt,t[110]=$t):$t=t[110];let Et;t[111]!==K||t[112]!==Ct||t[113]!==X||t[114]!==lt||t[115]!==P||t[116]!==ft||t[117]!==$t?(Et=i.jsxRuntimeExports.jsx(K,{ref:Ct,width:X,height:lt,viewBox:P,direction:ft,children:$t}),t[111]=K,t[112]=Ct,t[113]=X,t[114]=lt,t[115]=P,t[116]=ft,t[117]=$t,t[118]=Et):Et=t[118];let b;t[119]!==x?.tooltip||t[120]!==vt||t[121]!==pt||t[122]!==C||t[123]!==u?.tooltip||t[124]!==mt?(b=C&&mt&&vt&&pt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:C,body:mt,xPos:vt,yPos:pt,backgroundStyle:u?.tooltip,className:x?.tooltip}):null,t[119]=x?.tooltip,t[120]=vt,t[121]=pt,t[122]=C,t[123]=u?.tooltip,t[124]=mt,t[125]=b):b=t[125];let rt;t[126]!==T||t[127]!==w?(rt=T&&w!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:w!==void 0,onClose:()=>{Mt(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof T=="string"?{__html:$e.string2HTML(T,w)}:void 0,children:typeof T=="function"?T(w):null})}):null,t[126]=T,t[127]=w,t[128]=rt):rt=t[128];let St;return t[129]!==Et||t[130]!==b||t[131]!==rt?(St=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Et,b,rt]}),t[129]=Et,t[130]=b,t[131]=rt,t[132]=St):St=t[132],St}function qi(e){return e.layer}function Hi(e){return e.position==="after"}function Gi(e){return e.color}function Xi(e){return e.color}function Yi(e){return e.color}function Ui(e){return e.color}function Wi(e){return e.layer}function Ji(e){return e.position==="before"}function Ki(e){return e!==0}function Qi(e){return e!==0}function Zi(e){return`${e.id}`}function _i(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,suffix:Dt,sources:yt,prefix:et,graphDescription:xt,barPadding:k,showValues:I,showTicks:y,truncateBy:z,height:Nt,width:ct,footNote:Vt,colorDomain:B,colorLegendTitle:it,highlightedDataPoints:mt,padding:dt,backgroundColor:Tt,topMargin:j,bottomMargin:st,leftMargin:Y,rightMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,showColorScale:T,graphID:a,maxValue:s,minValue:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,sortData:m,labelOrder:A,language:Z,showNAColor:J,minHeight:ut,theme:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,styles:S,classNames:w,filterNA:Mt,animate:vt,dimmedOpacity:nt,precision:pt,customLayers:R,timeline:g,naLabel:_,orientation:tt}=e,K=Dt===void 0?"":Dt,M=et===void 0?"":et,ht=k===void 0?.25:k,kt=I===void 0?!0:I,ot=y===void 0?!0:y,Ct=z===void 0?999:z;let X;t[0]!==mt?(X=mt===void 0?[]:mt,t[0]=mt,t[1]=X):X=t[1];const lt=X,P=Tt===void 0?!1:Tt,ft=Q===void 0?!0:Q,gt=T===void 0?!0:T,jt=x===void 0?!1:x,wt=h===void 0?!1:h,at=Z===void 0?"en":Z,At=J===void 0?!0:J,$t=ut===void 0?0:ut,Et=Ft===void 0?"light":Ft,b=r===void 0?!0:r,rt=p===void 0?5:p,St=Mt===void 0?!0:Mt,Gt=vt===void 0?!1:vt,E=nt===void 0?.3:nt,Ut=pt===void 0?2:pt;let It;t[2]!==R?(It=R===void 0?[]:R,t[2]=R,t[3]=It):It=t[3];const Kt=It,Lt=g===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:g,Qt=_===void 0?"NA":_,Wt=tt===void 0?"vertical":tt,Pt=Wt==="horizontal"?Ri:Pi,[Ot,Yt]=q.useState(0),[Jt,V]=q.useState(0),[v,O]=q.useState(Lt.autoplay),n=He.sort(Le.uniqBy(d,"date",!0).map(te=>me.parse(`${te}`,Lt.dateFormat||"yyyy",new Date).getTime()),fs),[f,ee]=q.useState(Lt.autoplay?0:n.length-1),[N,Rt]=q.useState(void 0),l=q.useRef(null),ie=q.useRef(null);let se,xe;t[4]===Symbol.for("react.memo_cache_sentinel")?(se=()=>{const te=new ResizeObserver(de=>{Yt(de[0].target.clientWidth||620),V(de[0].target.clientHeight||480)});return l.current&&te.observe(l.current),()=>te.disconnect()},xe=[],t[4]=se,t[5]=xe):(se=t[4],xe=t[5]),q.useEffect(se,xe),q.useEffect(()=>{const te=setInterval(()=>{ee(de=>de<n.length-1?de+1:0)},(Lt.speed||2)*1e3);return v||clearInterval(te),()=>clearInterval(te)},[n,v,Lt.speed]);const pe=ye.getSliderMarks(n,f,Lt.showOnlyActiveDate,Lt.dateFormat||"yyyy"),re=ve.GraphContainer,ne=w?.graphContainer,le=S?.graphContainer;let Xt;t[6]!==w?.description||t[7]!==w?.title||t[8]!==d||t[9]!==wt||t[10]!==xt||t[11]!==jt||t[12]!==L||t[13]!==S?.description||t[14]!==S?.title||t[15]!==ct?(Xt=L||xt||jt||wt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:S?.title,description:S?.description},classNames:{title:w?.title,description:w?.description},graphTitle:L,graphDescription:xt,width:ct,graphDownload:jt?ie:void 0,dataDownload:wt?d.map(hs).filter(ps).length>0?d.map(ds).filter(ms):d.filter(xs):null}):null,t[6]=w?.description,t[7]=w?.title,t[8]=d,t[9]=wt,t[10]=xt,t[11]=jt,t[12]=L,t[13]=S?.description,t[14]=S?.title,t[15]=ct,t[16]=Xt):Xt=t[16];const Bt=Lt.enabled&&n.length>0&&pe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center pb-4",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{O(!v)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":v?"Click to pause animation":"Click to play animation",children:v?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:n[0],max:n[n.length-1],marks:pe,step:null,defaultValue:n[n.length-1],value:n[f],onChangeComplete:te=>{ee(n.indexOf(te))},onChange:te=>{ee(n.indexOf(te))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,ae=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[gt&&d.filter(us).length!==0?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:ct,colorLegendTitle:it,colors:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:B||Le.uniqBy(d,"color",!0),setSelectedColor:Rt,showNAColor:At,className:w?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:l,children:Ot&&Jt?i.jsxRuntimeExports.jsx(Pt,{data:m?Ne.orderBy(he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te),[te=>te.size===void 0?m==="asc"?(Wt==="horizontal"?1:-1)*(1/0):(Wt==="horizontal"?-1:1)*(1/0):te.size],[m]).filter((te,de)=>G?de<G:!0):he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te).filter((te,de)=>G?de<G:!0),barColor:d.filter(cs).length===0?qt?[qt]:[ce.Colors.primaryColors["blue-600"]]:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:d.filter(rs).length===0?[]:B||Le.uniqBy(d,"color",!0),selectedColor:N,width:Ot,height:Jt,suffix:K,prefix:M,barPadding:ht,showValues:kt,showTicks:ot,leftMargin:Y,rightMargin:H,topMargin:j,bottomMargin:st,truncateBy:Ct,showLabels:ft,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(s)?Math.max(...d.filter(as).map(ls))<0?0:Math.max(...d.filter(os).map(ns)):s,minValue:_t.checkIfNullOrUndefined(o)?Math.min(...d.filter(ss).map(is))>=0?0:Math.min(...d.filter(es).map(ts)):o,highlightedDataPoints:lt,onSeriesMouseClick:u,labelOrder:A,rtl:at==="he"||at==="ar",maxBarThickness:Ht,minBarThickness:bt,resetSelectionOnDoubleClick:b,detailsOnClick:c,barAxisTitle:D,noOfTicks:rt,valueColor:C,classNames:w,styles:S,animate:Gt===!0?{duration:.5,once:!0,amount:.5}:Gt||{duration:0,once:!0,amount:0},dimmedOpacity:E,precision:Ut,customLayers:Kt,naLabel:Qt}):null})]});let ge;t[17]!==w?.footnote||t[18]!==w?.source||t[19]!==Vt||t[20]!==yt||t[21]!==S?.footnote||t[22]!==S?.source||t[23]!==ct?(ge=yt||Vt?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{sources:yt,footNote:Vt,width:ct,styles:{footnote:S?.footnote,source:S?.source},classNames:{footnote:w?.footnote,source:w?.source}}):null,t[17]=w?.footnote,t[18]=w?.source,t[19]=Vt,t[20]=yt,t[21]=S?.footnote,t[22]=S?.source,t[23]=ct,t[24]=ge):ge=t[24];let Ve;return t[25]!==re||t[26]!==zt||t[27]!==P||t[28]!==a||t[29]!==Nt||t[30]!==at||t[31]!==$t||t[32]!==dt||t[33]!==U||t[34]!==ne||t[35]!==le||t[36]!==Xt||t[37]!==Bt||t[38]!==ae||t[39]!==ge||t[40]!==Et||t[41]!==ct?(Ve=i.jsxRuntimeExports.jsxs(re,{className:ne,style:le,id:a,ref:ie,"aria-label":zt,backgroundColor:P,theme:Et,language:at,minHeight:$t,width:ct,height:Nt,relativeHeight:U,padding:dt,children:[Xt,Bt,ae,ge]}),t[25]=re,t[26]=zt,t[27]=P,t[28]=a,t[29]=Nt,t[30]=at,t[31]=$t,t[32]=dt,t[33]=U,t[34]=ne,t[35]=le,t[36]=Xt,t[37]=Bt,t[38]=ae,t[39]=ge,t[40]=Et,t[41]=ct,t[42]=Ve):Ve=t[42],Ve}function ts(e){return e.size}function es(e){return!_t.checkIfNullOrUndefined(e.size)}function is(e){return e.size}function ss(e){return!_t.checkIfNullOrUndefined(e.size)}function ns(e){return e.size}function os(e){return!_t.checkIfNullOrUndefined(e.size)}function ls(e){return e.size}function as(e){return!_t.checkIfNullOrUndefined(e.size)}function rs(e){return e.color}function cs(e){return e.color}function us(e){return e.color}function xs(e){return e!==void 0}function ms(e){return e!==void 0}function ds(e){return e.data}function ps(e){return e!==void 0}function hs(e){return e.data}function fs(e,t){return Ge.ascending(e,t)}function gs(e){const t=i.compilerRuntimeExports.c(122),{data:d,barColors:L,barPadding:qt,showTicks:Dt,topMargin:yt,bottomMargin:et,leftMargin:xt,rightMargin:k,truncateBy:I,width:y,height:z,tooltip:Nt,onSeriesMouseOver:ct,showLabels:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,rtl:Y,labelOrder:H,maxBarThickness:Q,minBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=yt===void 0?25:yt,J=et===void 0?10:et,ut=xt===void 0?100:xt,Ft=k===void 0?40:k,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?Z+25:Z;let r;t[3]!==J||t[4]!==ut||t[5]!==Ft||t[6]!==zt?(r={top:zt,bottom:J,left:ut,right:Ft},t[3]=J,t[4]=ut,t[5]=Ft,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==L||t[11]!==qt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==H||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==Q||t[31]!==Tt||t[32]!==U||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==j||t[37]!==ct||t[38]!==h||t[39]!==it||t[40]!==dt||t[41]!==F||t[42]!==Y||t[43]!==st||t[44]!==Vt||t[45]!==Dt||t[46]!==mt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==B||t[54]!==Z||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==H?(rt=(V,v)=>({...V,id:H?`${V.label}`:`${v}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(Os),E=Re.linear().domain([0,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.max(R,U*Gt.length):Q?Math.min(R,Q*Gt.length):R]).paddingInner(qt),It=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=Dt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:It.filter(Es),x:It.filter($s).map(V=>E(V)),y1:0-Z,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,precision:h}):null;const Kt=pt/2,Lt=0-c.top+15,Qt=s?.xAxis?.title,Wt=o?.xAxis?.title;t[74]!==W||t[75]!==Kt||t[76]!==Lt||t[77]!==Qt||t[78]!==Wt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Kt,y:Lt,style:Qt,className:Wt,text:W}),t[74]=W,t[75]=Kt,t[76]=Lt,t[77]=Qt,t[78]=Wt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(As).map(ws),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(V=>_t.checkIfNullOrUndefined(Ut(V.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:Ut(`${V.id}`)},whileInView:{x:0,y:Ut(`${V.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[V.size.map((v,O)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?L[O]===st?1:.3:1,onMouseEnter:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX),ct?.({...V,sizeIndex:O})},onMouseMove:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),ct?.(void 0)},onClick:()=>{(j||$)&&(je.isEqual(C,{...V,sizeIndex:O})&&F?(S(void 0),j?.(void 0)):(S({...V,sizeIndex:O}),j&&j({...V,sizeIndex:O})))},children:[v?i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:0,style:{fill:L[O]},height:Ut.bandwidth(),exit:{width:0,x:E(0),transition:{duration:u.duration}},variants:{initial:{width:0,x:E(0),fill:L[O]},whileInView:{width:E(v||0),x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n))),fill:L[O],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial"},O):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Ut.bandwidth()/2,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dy:"0.33em",className:i.mo("graph-value text-sm",o?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:E(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(L[O])},whileInView:{x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n)))+E(v||0)/2,opacity:v&&E(v)/ue.numberFormattingFunction(v,A,h,it,B).length>12?1:0,fill:Ie.getTextColorBasedOnBgColor(L[O]),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(v,A,h,it,B)}):null]},`${V.label}-${x[O]||O}`)),Vt?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${V.label}`.length<I?`${V.label}`:`${`${V.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:0+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{className:i.mo("graph-value graph-value-total text-sm",T?"":" fill-primary-gray-700 dark:fill-primary-gray-300",o?.graphObjectValues),style:{...T?{fill:T}:{},textAnchor:"start",...s?.graphObjectValues||{}},y:Ut.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,...T?{fill:T}:{}},whileInView:{x:E(oe.sum(V.size.map(js))),opacity:1,...T?{fill:T}:{},transition:{duration:u.duration}}},exit:{opacity:0,transition:{duration:u.duration}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(V.size.filter(vs)),A,h,it,B)}):null]},V.label));const Pt=o?.yAxis?.axis;let Ot;t[82]!==Pt?(Ot={axis:Pt},t[82]=Pt,t[83]=Ot):Ot=t[83];const Yt=s?.yAxis?.axis;let Jt;t[84]!==Yt?(Jt={axis:Yt},t[84]=Yt,t[85]=Jt):Jt=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(0),x2:E(0),y1:-2.5,y2:R+c.bottom,classNames:Ot,styles:Jt}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((V,v)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:V.text,color:V.color,x:E(V.value),y1:0-c.top,y2:R+c.bottom,textSide:E(V.value)>pt*.75||Y?"left":"right",classNames:V.classNames,styles:V.styles,animate:u,isInView:bt},v))}):null,t[8]=u,t[9]=W,t[10]=L,t[11]=qt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=H,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=Q,t[31]=Tt,t[32]=U,t[33]=C,t[34]=A,t[35]=a,t[36]=j,t[37]=ct,t[38]=h,t[39]=it,t[40]=dt,t[41]=F,t[42]=Y,t[43]=st,t[44]=Vt,t[45]=Dt,t[46]=mt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=B,t[54]=Z,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(bs).map(ys),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==Nt?($t=D&&Nt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:Nt,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=Nt,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function ys(e){return e.layer}function bs(e){return e.position==="after"}function vs(e){return e}function js(e){return e||0}function ws(e){return e.layer}function As(e){return e.position==="before"}function $s(e){return e!==0}function Es(e){return e!==0}function Os(e){return`${e.id}`}function ks(e){const t=i.compilerRuntimeExports.c(129),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,barPadding:I,showLabels:y,showTicks:z,truncateBy:Nt,tooltip:ct,onSeriesMouseOver:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,labelOrder:Y,maxBarThickness:H,minBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==I||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==Y||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==H||t[33]!==Tt||t[34]!==Q||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==j||t[39]!==Vt||t[40]!==x||t[41]!==it||t[42]!==dt||t[43]!==U||t[44]!==st||t[45]!==y||t[46]!==z||t[47]!==mt||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==B||t[55]!==Nt||t[56]!==W||t[57]!==et){const b=Re.linear().domain([0,Tt]).range([pt,0]).nice();let rt;t[72]!==Y?(rt=(f,ee)=>({...f,id:Y?`${f.label}`:`${ee}`}),t[72]=Y,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Y||St.map(Ss),E=fe.band().domain(Gt).range([0,Q?Math.max(nt,Q*Gt.length):H?Math.min(nt,H*Gt.length):nt]).paddingInner(I),Ut=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const It=b(0),Kt=b(0);let Lt;t[74]!==m||t[75]!==x||t[76]!==it||t[77]!==B?(Lt=ue.numberFormattingFunction(0,m,x,it,B),t[74]=m,t[75]=x,t[76]=it,t[77]=B,t[78]=Lt):Lt=t[78];const Qt=s?.xAxis?.axis,Wt=s?.yAxis?.labels;let Pt;t[79]!==Qt||t[80]!==Wt?(Pt={axis:Qt,label:Wt},t[79]=Qt,t[80]=Wt,t[81]=Pt):Pt=t[81];const Ot=a?.xAxis?.axis,Yt=a?.yAxis?.labels;let Jt;t[82]!==Ot||t[83]!==Yt?(Jt={axis:Ot,label:Yt},t[82]=Ot,t[83]=Yt,t[84]=Jt):Jt=t[84],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:It,y2:Kt,x1:0-A,x2:nt+r.right,label:Lt,labelPos:{x:0-A,y:b(0),dx:0,dy:-5},classNames:Pt,styles:Jt}),tt=z?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Ut.filter(Ts),y:Ut.filter(Is).map(f=>b(f)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const V=0-A-15,v=pt/2,O=a?.yAxis?.title,n=s?.yAxis?.title;t[85]!==$||t[86]!==V||t[87]!==v||t[88]!==O||t[89]!==n?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:V,y:v,style:O,className:n,text:$,rotate90:!0}),t[85]=$,t[86]=V,t[87]=v,t[88]=O,t[89]=n,t[90]=K):K=t[90],t[91]!==h?(M=h.filter(Vs).map(Ns),t[91]=h,t[92]=M):M=t[92],R=Me.AnimatePresence,lt=St.map(f=>_t.checkIfNullOrUndefined(E(f.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:E(`${f.id}`),y:0},whileInView:{x:E(`${f.id}`),y:0,transition:{duration:o.duration}}},transition:{duration:o.duration},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[f.size.map((ee,N)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?k[N]===st?1:.3:1,onMouseEnter:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX),Vt?.({...f,sizeIndex:N})},onMouseMove:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),Vt?.(void 0)},onClick:()=>{(j||F)&&(je.isEqual(p,{...f,sizeIndex:N})&&U?(C(void 0),j?.(void 0)):(C({...f,sizeIndex:N}),j&&j({...f,sizeIndex:N})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:0,width:E.bandwidth(),variants:{initial:{height:0,fill:k[N],y:b(0)},whileInView:{height:Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt)))),y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt))),fill:k[N],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{height:0,y:b(0),transition:{duration:o.duration}}}),mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:E.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:"0.33em",variants:{initial:{y:b(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(k[N])},whileInView:{y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))+Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))/2,opacity:ee&&Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))>20?1:0,fill:Ie.getTextColorBasedOnBgColor(k[N]),transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(ee,m,x,it,B)}):null]},`${f.label}-${u[N]||N}`)),y?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${f.label}`.length<Nt?`${f.label}`:`${`${f.label}`.substring(0,Nt)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...a?.graphObjectValues||{}},x:E.bandwidth()/2,dy:-10,className:i.mo("graph-value graph-value-total",W?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",s?.graphObjectValues),variants:{initial:{y:b(0),opacity:0,...W&&{fill:W}},whileInView:{y:b(oe.sum(f.size.map(Ls))),opacity:1,...W&&{fill:W},transition:{duration:o.duration}}},exit:{opacity:0,transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(f.size.filter(Ms)),m,x,it,B)}):null]},f.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((f,ee)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:f.text,color:f.color,y:b(f.value),x1:0-A,x2:nt+r.right,classNames:f.classNames,styles:f.styles,animate:o,isInView:G},ee))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=I,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=Y,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=H,t[33]=Tt,t[34]=Q,t[35]=p,t[36]=m,t[37]=T,t[38]=j,t[39]=Vt,t[40]=x,t[41]=it,t[42]=dt,t[43]=U,t[44]=st,t[45]=y,t[46]=z,t[47]=mt,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=B,t[55]=Nt,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[93]!==R||t[94]!==lt||t[95]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[93]=R,t[94]=lt,t[95]=P,t[96]=gt):gt=t[96];let jt;t[97]!==h?(jt=h.filter(Rs).map(Cs),t[97]=h,t[98]=jt):jt=t[98];let wt;t[99]!==_||t[100]!==tt||t[101]!==K||t[102]!==M||t[103]!==gt||t[104]!==jt||t[105]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[99]=_,t[100]=tt,t[101]=K,t[102]=M,t[103]=gt,t[104]=jt,t[105]=ft,t[106]=wt):wt=t[106];let at;t[107]!==g||t[108]!==ht||t[109]!==kt||t[110]!==ot||t[111]!==Ct||t[112]!==X||t[113]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[107]=g,t[108]=ht,t[109]=kt,t[110]=ot,t[111]=Ct,t[112]=X,t[113]=wt,t[114]=at):at=t[114];let At;t[115]!==s?.tooltip||t[116]!==S||t[117]!==Mt||t[118]!==c||t[119]!==a?.tooltip||t[120]!==ct?(At=c&&ct&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:ct,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[115]=s?.tooltip,t[116]=S,t[117]=Mt,t[118]=c,t[119]=a?.tooltip,t[120]=ct,t[121]=At):At=t[121];let $t;t[122]!==F||t[123]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[122]=F,t[123]=p,t[124]=$t):$t=t[124];let Et;return t[125]!==at||t[126]!==At||t[127]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[125]=at,t[126]=At,t[127]=$t,t[128]=Et):Et=t[128],Et}function Cs(e){return e.layer}function Rs(e){return e.position==="after"}function Ms(e){return e}function Ls(e){return e||0}function Ns(e){return e.layer}function Vs(e){return e.position==="before"}function Is(e){return e!==0}function Ts(e){return e!==0}function Ss(e){return`${e.id}`}function Ds(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,padding:Vt,backgroundColor:B,topMargin:it,bottomMargin:mt,leftMargin:dt,rightMargin:Tt,tooltip:j,onSeriesMouseOver:st,suffix:Y,prefix:H,showLabels:Q,relativeHeight:U,showValues:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,labelOrder:x,minHeight:h,theme:m,maxBarThickness:A,sortParameter:Z,maxNumberOfBars:J,minBarThickness:ut,showColorScale:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,timeline:vt,naLabel:nt,sortData:pt,orientation:R}=e,g=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,_=et===void 0?.25:et,tt=xt===void 0?!0:xt,K=k===void 0?999:k,M=B===void 0?!1:B,ht=Y===void 0?"":Y,kt=H===void 0?"":H,ot=Q===void 0?!0:Q,Ct=F===void 0?!0:F,X=s===void 0?!1:s,lt=o===void 0?!1:o,P=u===void 0?"en":u,ft=h===void 0?0:h,gt=m===void 0?"light":m,jt=Ft===void 0?!0:Ft,wt=G===void 0?!0:G,at=r===void 0?5:r,At=C===void 0?!0:C,$t=S===void 0?!1:S,Et=w===void 0?2:w;let b;t[0]!==Mt?(b=Mt===void 0?[]:Mt,t[0]=Mt,t[1]=b):b=t[1];const rt=b,St=vt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:vt,Gt=nt===void 0?"NA":nt,Ut=(R===void 0?"vertical":R)==="horizontal"?gs:ks,[It,Kt]=q.useState(0),[Lt,Qt]=q.useState(0),[Wt,Pt]=q.useState(St.autoplay),Ot=He.sort(Le.uniqBy(d,"date",!0).map(Bt=>me.parse(`${Bt}`,St.dateFormat||"yyyy",new Date).getTime()),Ks),[Yt,Jt]=q.useState(St.autoplay?0:Ot.length-1),[V,v]=q.useState(void 0),O=q.useRef(null),n=q.useRef(null);let f,ee;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{const Bt=new ResizeObserver(ae=>{Kt(ae[0].target.clientWidth||620),Qt(ae[0].target.clientHeight||480)});return O.current&&Bt.observe(O.current),()=>Bt.disconnect()},ee=[],t[2]=f,t[3]=ee):(f=t[2],ee=t[3]),q.useEffect(f,ee),q.useEffect(()=>{const Bt=setInterval(()=>{Jt(ae=>ae<Ot.length-1?ae+1:0)},(St.speed||2)*1e3);return Wt||clearInterval(Bt),()=>clearInterval(Bt)},[Ot,Wt,St.speed]);const N=ye.getSliderMarks(Ot,Yt,St.showOnlyActiveDate,St.dateFormat||"yyyy"),Rt=ve.GraphContainer,l=p?.graphContainer,ie=D?.graphContainer;let se;t[4]!==p?.description||t[5]!==p?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==D?.description||t[12]!==D?.title||t[13]!==y?(se=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:p?.title,description:p?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?n:void 0,dataDownload:lt?d.map(Js).filter(Ws).length>0?d.map(Us).filter(Ys):d.filter(Xs):null}):null,t[4]=p?.description,t[5]=p?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=D?.description,t[12]=D?.title,t[13]=y,t[14]=se):se=t[14];const xe=St.enabled&&Ot.length>0&&N?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!Wt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Wt?"Click to pause animation":"Click to play animation",children:Wt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Ot[0],max:Ot[Ot.length-1],marks:N,step:null,defaultValue:Ot[Ot.length-1],value:Ot[Yt],onChangeComplete:Bt=>{Jt(Ot.indexOf(Bt))},onChange:Bt=>{Jt(Ot.indexOf(Bt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,pe="grow flex flex-col justify-center gap-3 w-full",re=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:g,colorLegendTitle:ct,setSelectedColor:v,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:O,children:It&&Lt?i.jsxRuntimeExports.jsx(Ut,{data:Z!==void 0?Z==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Gs):Bt),qs,[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Ps):Bt),Bt=>_t.checkIfNullOrUndefined(Bt.size[Z])?-1/0:Bt.size[Z],[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Fs):Bt).filter((Bt,ae)=>J?ae<J:!0),barColors:g,width:It,height:Lt,barPadding:_,showTicks:tt,leftMargin:dt,rightMargin:Tt,topMargin:it,bottomMargin:mt,truncateBy:K,showLabels:ot,tooltip:j,onSeriesMouseOver:st,showValues:Ct,suffix:ht,prefix:kt,refValues:$,maxValue:_t.checkIfNullOrUndefined(T)?Math.max(...d.map(zs)):T,onSeriesMouseClick:a,selectedColor:V,rtl:P==="he"||P==="ar",labelOrder:x,maxBarThickness:A,minBarThickness:ut,resetSelectionOnDoubleClick:wt,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:at,valueColor:c,classNames:p,styles:D,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},colorDomain:Nt,precision:Et,customLayers:rt,naLabel:Gt}):null})]});let ne;t[15]!==re?(ne=i.jsxRuntimeExports.jsx("div",{className:pe,children:re}),t[15]=re,t[16]=ne):ne=t[16];let le;t[17]!==p?.footnote||t[18]!==p?.source||t[19]!==z||t[20]!==Dt||t[21]!==D?.footnote||t[22]!==D?.source||t[23]!==y?(le=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:Dt,footNote:z,width:y}):null,t[17]=p?.footnote,t[18]=p?.source,t[19]=z,t[20]=Dt,t[21]=D?.footnote,t[22]=D?.source,t[23]=y,t[24]=le):le=t[24];let Xt;return t[25]!==Rt||t[26]!==Ht||t[27]!==M||t[28]!==W||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==Vt||t[33]!==U||t[34]!==l||t[35]!==ie||t[36]!==se||t[37]!==xe||t[38]!==ne||t[39]!==le||t[40]!==gt||t[41]!==y?(Xt=i.jsxRuntimeExports.jsxs(Rt,{className:l,style:ie,id:W,ref:n,"aria-label":Ht,backgroundColor:M,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:Vt,children:[se,xe,ne,le]}),t[25]=Rt,t[26]=Ht,t[27]=M,t[28]=W,t[29]=I,t[30]=P,t[31]=ft,t[32]=Vt,t[33]=U,t[34]=l,t[35]=ie,t[36]=se,t[37]=xe,t[38]=ne,t[39]=le,t[40]=gt,t[41]=y,t[42]=Xt):Xt=t[42],Xt}function zs(e){return oe.sum(e.size.filter(Bs))||0}function Bs(e){return!_t.checkIfNullOrUndefined(e)}function Fs(e){return e==null}function Ps(e){return e==null}function qs(e){return oe.sum(e.size.filter(Hs))}function Hs(e){return!_t.checkIfNullOrUndefined(e)}function Gs(e){return e==null}function Xs(e){return e!==void 0}function Ys(e){return e!==void 0}function Us(e){return e.data}function Ws(e){return e!==void 0}function Js(e){return e.data}function Ks(e,t){return Ge.ascending(e,t)}function Qs(e){const t=i.compilerRuntimeExports.c(61),{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,orientation:S,styles:w,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt}=e,K=S===void 0?"vertical":S;let M;return t[0]!==nt||t[1]!==zt||t[2]!==ct||t[3]!==D||t[4]!==Dt||t[5]!==I||t[6]!==Mt||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==g||t[11]!==d||t[12]!==h||t[13]!==c||t[14]!==pt||t[15]!==vt||t[16]!==j||t[17]!==mt||t[18]!==x||t[19]!==T||t[20]!==L||t[21]!==dt||t[22]!==o||t[23]!==J||t[24]!==m||t[25]!==et||t[26]!==Ht||t[27]!==G||t[28]!==a||t[29]!==bt||t[30]!==Ft||t[31]!==s||t[32]!==tt||t[33]!==p||t[34]!==u||t[35]!==F||t[36]!==K||t[37]!==H||t[38]!==R||t[39]!==B||t[40]!==$||t[41]!==Q||t[42]!==r||t[43]!==xt||t[44]!==W||t[45]!==z||t[46]!==ut||t[47]!==yt||t[48]!==Nt||t[49]!==Z||t[50]!==it||t[51]!==w||t[52]!==Vt||t[53]!==A||t[54]!==_||t[55]!==U||t[56]!==k||t[57]!==y||t[58]!==C||t[59]!==Tt?(M=i.jsxRuntimeExports.jsx(_i,{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,styles:w,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt,orientation:K}),t[0]=nt,t[1]=zt,t[2]=ct,t[3]=D,t[4]=Dt,t[5]=I,t[6]=Mt,t[7]=st,t[8]=Y,t[9]=qt,t[10]=g,t[11]=d,t[12]=h,t[13]=c,t[14]=pt,t[15]=vt,t[16]=j,t[17]=mt,t[18]=x,t[19]=T,t[20]=L,t[21]=dt,t[22]=o,t[23]=J,t[24]=m,t[25]=et,t[26]=Ht,t[27]=G,t[28]=a,t[29]=bt,t[30]=Ft,t[31]=s,t[32]=tt,t[33]=p,t[34]=u,t[35]=F,t[36]=K,t[37]=H,t[38]=R,t[39]=B,t[40]=$,t[41]=Q,t[42]=r,t[43]=xt,t[44]=W,t[45]=z,t[46]=ut,t[47]=yt,t[48]=Nt,t[49]=Z,t[50]=it,t[51]=w,t[52]=Vt,t[53]=A,t[54]=_,t[55]=U,t[56]=k,t[57]=y,t[58]=C,t[59]=Tt,t[60]=M):M=t[60],M}function Zs(e){const t=i.compilerRuntimeExports.c(57),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,sortParameter:Z,sortData:J,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,orientation:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}=e,R=c===void 0?"vertical":c;let g;return t[0]!==S||t[1]!==Ft||t[2]!==dt||t[3]!==bt||t[4]!==et||t[5]!==Y||t[6]!==p||t[7]!==Nt||t[8]!==ct||t[9]!==qt||t[10]!==Mt||t[11]!==d||t[12]!==u||t[13]!==G||t[14]!==C||t[15]!==z||t[16]!==yt||t[17]!==o||t[18]!==W||t[19]!==L||t[20]!==I||t[21]!==h||t[22]!==x||t[23]!==Tt||t[24]!==ut||t[25]!==T||t[26]!==m||t[27]!==a||t[28]!==pt||t[29]!==zt||t[30]!==s||t[31]!==F||t[32]!==R||t[33]!==mt||t[34]!==w||t[35]!==B||t[36]!==$||t[37]!==Q||t[38]!==Ht||t[39]!==j||t[40]!==vt||t[41]!==H||t[42]!==xt||t[43]!==it||t[44]!==J||t[45]!==Z||t[46]!==Dt||t[47]!==D||t[48]!==Vt||t[49]!==A||t[50]!==nt||t[51]!==U||t[52]!==st||t[53]!==k||t[54]!==r||t[55]!==y?(g=i.jsxRuntimeExports.jsx(ci,{orientation:R,data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,sortParameter:Z,sortData:J,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,styles:D,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}),t[0]=S,t[1]=Ft,t[2]=dt,t[3]=bt,t[4]=et,t[5]=Y,t[6]=p,t[7]=Nt,t[8]=ct,t[9]=qt,t[10]=Mt,t[11]=d,t[12]=u,t[13]=G,t[14]=C,t[15]=z,t[16]=yt,t[17]=o,t[18]=W,t[19]=L,t[20]=I,t[21]=h,t[22]=x,t[23]=Tt,t[24]=ut,t[25]=T,t[26]=m,t[27]=a,t[28]=pt,t[29]=zt,t[30]=s,t[31]=F,t[32]=R,t[33]=mt,t[34]=w,t[35]=B,t[36]=$,t[37]=Q,t[38]=Ht,t[39]=j,t[40]=vt,t[41]=H,t[42]=xt,t[43]=it,t[44]=J,t[45]=Z,t[46]=Dt,t[47]=D,t[48]=Vt,t[49]=A,t[50]=nt,t[51]=U,t[52]=st,t[53]=k,t[54]=r,t[55]=y,t[56]=g):g=t[56],g}function _s(e){const t=i.compilerRuntimeExports.c(58),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,orientation:D,styles:p,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R}=e,g=D===void 0?"vertical":D;let _;return t[0]!==w||t[1]!==Ht||t[2]!==B||t[3]!==zt||t[4]!==et||t[5]!==z||t[6]!==C||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==vt||t[11]!==d||t[12]!==o||t[13]!==bt||t[14]!==S||t[15]!==j||t[16]!==yt||t[17]!==s||t[18]!==W||t[19]!==L||t[20]!==dt||t[21]!==h||t[22]!==u||t[23]!==k||t[24]!==A||t[25]!==ut||t[26]!==T||t[27]!==Ft||t[28]!==m||t[29]!==R||t[30]!==r||t[31]!==a||t[32]!==U||t[33]!==g||t[34]!==H||t[35]!==Mt||t[36]!==mt||t[37]!==$||t[38]!==F||t[39]!==G||t[40]!==I||t[41]!==nt||t[42]!==ct||t[43]!==xt||t[44]!==Vt||t[45]!==J||t[46]!==Z||t[47]!==Dt||t[48]!==p||t[49]!==it||t[50]!==x||t[51]!==pt||t[52]!==Q||t[53]!==y||t[54]!==Nt||t[55]!==c||t[56]!==Tt?(_=i.jsxRuntimeExports.jsx(Ds,{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,styles:p,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R,orientation:g}),t[0]=w,t[1]=Ht,t[2]=B,t[3]=zt,t[4]=et,t[5]=z,t[6]=C,t[7]=st,t[8]=Y,t[9]=qt,t[10]=vt,t[11]=d,t[12]=o,t[13]=bt,t[14]=S,t[15]=j,t[16]=yt,t[17]=s,t[18]=W,t[19]=L,t[20]=dt,t[21]=h,t[22]=u,t[23]=k,t[24]=A,t[25]=ut,t[26]=T,t[27]=Ft,t[28]=m,t[29]=R,t[30]=r,t[31]=a,t[32]=U,t[33]=g,t[34]=H,t[35]=Mt,t[36]=mt,t[37]=$,t[38]=F,t[39]=G,t[40]=I,t[41]=nt,t[42]=ct,t[43]=xt,t[44]=Vt,t[45]=J,t[46]=Z,t[47]=Dt,t[48]=p,t[49]=it,t[50]=x,t[51]=pt,t[52]=Q,t[53]=y,t[54]=Nt,t[55]=c,t[56]=Tt,t[57]=_):_=t[57],_}exports.GroupedBarGraph=Zs;exports.SimpleBarGraph=Qs;exports.StackedBarGraph=_s;
|
|
2
2
|
//# sourceMappingURL=BarGraph.cjs.map
|
package/dist/BarGraph.js
CHANGED
|
@@ -10,13 +10,13 @@ import { n as ue } from "./numberFormattingFunction-14YCbkN2.js";
|
|
|
10
10
|
import { T as Oe } from "./Tooltip-CwWUegPB.js";
|
|
11
11
|
import { c as _t } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
12
12
|
import { s as Me } from "./string2HTML-DhG75NqA.js";
|
|
13
|
-
import { Y as Pe } from "./YAxesLabels-
|
|
13
|
+
import { Y as Pe } from "./YAxesLabels-a57ZRv-0.js";
|
|
14
14
|
import { A as ke } from "./Axis-CRyfcLjc.js";
|
|
15
15
|
import { A as Ce } from "./AxisTitle-jeI7am8o.js";
|
|
16
16
|
import { X as Fe } from "./XTicksAndGridLines-CObVFSm4.js";
|
|
17
17
|
import { R as He, a as Xe } from "./ReferenceLine-2XCwHXQ4.js";
|
|
18
18
|
import { Y as Ye } from "./YTicksAndGridLines-Blepl7XF.js";
|
|
19
|
-
import { X as Ee } from "./XAxesLabels-
|
|
19
|
+
import { X as Ee } from "./XAxesLabels-Dy8E1SEo.js";
|
|
20
20
|
import { u as Ve } from "./use-in-view-Cxa7y1TH.js";
|
|
21
21
|
import { a as Le } from "./linear-BwnDd9KF.js";
|
|
22
22
|
import { b as ge } from "./band-CyHaVft5.js";
|
package/dist/BeeSwarmChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),f=require("react"),Ue=require("./index-DQA8q5sC.cjs"),Be=require("./index-Cno4Q0YE.cjs"),He=require("./Modal-JW_IExO3.cjs"),Ge=require("./Spinner-DRMBUsX7.cjs"),Pe=require("./numberFormattingFunction-02t-wJta.cjs"),Xe=require("./Tooltip-4dJo4_AF.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ye=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),ve=require("./Colors.cjs"),ze=require("./string2HTML-CPGr_I5E.cjs"),We=require("./Axis-DxRV2yMi.cjs"),Ze=require("./ReferenceLine-BH0qdf4R.cjs"),tt=require("./YTicksAndGridLines-4pxTRlRK.cjs"),it=require("./XTicksAndGridLines-B6CELS7q.cjs"),Je=require("./pow-DgrUorRi.cjs"),Ke=require("./linear-BwPAspcq.cjs"),se=require("./y-QcCbqrzx.cjs"),Ve=require("./uniqBy-O05lp2S5.cjs"),ot=require("./GraphHeader.cjs"),Fe=require("./GraphContainer-d8A46BK2.cjs"),nt=require("./EmptyState-sAEZ_5rU.cjs"),st=require("./ColorLegendWithMouseOver.cjs"),rt=require("./GraphFooter.cjs");function lt(t){const e=i.compilerRuntimeExports.c(27),{data:n,circleColors:j,showTicks:he,width:L,height:$,colorDomain:P,topMargin:V,bottomMargin:_,leftMargin:ee,rightMargin:re,suffix:h,prefix:F,showLabels:te,tooltip:X,onSeriesMouseOver:le,refValues:T,selectedColor:g,startFromZero:q,radius:p,maxRadiusValue:Y,maxValue:z,minValue:W,highlightedDataPoints:ge,onSeriesMouseClick:pe,resetSelectionOnDoubleClick:k,detailsOnClick:M,styles:E,classNames:c,noOfTicks:C,dimmedOpacity:ae,precision:ce,customLayers:me}=t,ue=V===void 0?25:V,U=_===void 0?10:_,ie=ee===void 0?100:ee,oe=re===void 0?40:re,fe=f.useRef(null),[xe,B]=f.useState(void 0),[N,S]=f.useState(void 0),[de,u]=f.useState(null),[a,Z]=f.useState(void 0),[J,K]=f.useState(void 0);let A;e[0]!==U||e[1]!==ie||e[2]!==oe||e[3]!==ue?(A={top:ue,bottom:U,left:ie,right:oe},e[0]=U,e[1]=ie,e[2]=oe,e[3]=ue,e[4]=A):A=e[4];const x=A,d=L-x.left-x.right,ne=$-x.top-x.bottom,I=n.filter(wt).length===0?n:Be.orderBy(n.filter(St),"radius","desc");let Q;e[5]!==n||e[6]!==z||e[7]!==q?(Q=v.checkIfNullOrUndefined(z)?Math.max(...n.filter(Nt).map(Ct))<0&&!q?0:Math.max(...n.filter(kt).map(Ot)):z,e[5]=n,e[6]=z,e[7]=q,e[8]=Q):Q=e[8];const H=Q;let G;e[9]!==n||e[10]!==W||e[11]!==q?(G=v.checkIfNullOrUndefined(W)?Math.min(...n.filter(Rt).map(Et))>=0&&!q?0:Math.min(...n.filter(Mt).map(bt)):W,e[9]=n,e[10]=W,e[11]=q,e[12]=G):G=e[12];const m=G,r=n.filter(yt).length!==n.length?Je.sqrt().domain([0,v.checkIfNullOrUndefined(Y)?Math.max(...n.map(jt).filter(vt)):Y]).range([.25,p]).nice():void 0,l=Ke.linear().domain([m,H]).range([ne,0]).nice(),y=l.ticks(C);f.useEffect(()=>{const s=I.map(gt).filter(ht);se.forceSimulation(s).force("y",se.forceY(o=>l(o.position)).strength(5)).force("x",se.forceX(o=>d/2).strength(1)).force("collide",se.forceCollide(o=>r?r(o.radius||0)+1:p+1)).force("charge",se.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{u(s)}).on("end",()=>{u(s)})},[n,p,ne,d,m,H,I,l,r]);const w=de?i.jsxRuntimeExports.jsx("svg",{width:`${L}px`,height:`${$}px`,viewBox:`0 0 ${L} ${$}`,direction:"ltr",ref:fe,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[he?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(We.Axis,{y1:l(m<0?0:m),y2:l(m<0?0:m),x1:0-x.left,x2:d+x.right,label:Pe.numberFormattingFunction(m<0?0:m,"NA",ce,F,h),labelPos:{x:0-x.left,y:l(m<0?0:m),dx:0,dy:H<0?"1em":-5},classNames:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels},styles:{axis:E?.xAxis?.axis,label:E?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(tt.YTicksAndGridLines,{values:y.filter(ft),y:y.filter(mt).map(s=>l(s)),x1:0-x.left,x2:d+x.right,styles:{gridLines:E?.yAxis?.gridLines,labels:E?.yAxis?.labels},classNames:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},suffix:h,prefix:F,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:ce})]}):null,me.filter(pt).map(dt),de.map(s=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${s.x},${s.y})`,opacity:g?s.color&&j[P.indexOf(s.color)]===g?1:ae:ge.length!==0?ge.indexOf(s.label)!==-1?.85:ae:.85,onMouseEnter:o=>{B(s),K(o.clientY),Z(o.clientX),le?.(s)},onMouseMove:o=>{B(s),K(o.clientY),Z(o.clientX)},onClick:()=>{(pe||M)&&(Ue.isEqual(N,s)&&k?(S(void 0),pe?.(void 0)):(S(s),pe?.(s)))},onMouseLeave:()=>{B(void 0),Z(void 0),K(void 0),le?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:r?r(s.radius||0):p,fill:n.filter(xt).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ve.Colors.gray}),(r?r(s.radius||0):p)>10&&te?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(r?r(s.radius||0):p),x:0-(r?r(s.radius||0):p),width:2*(r?r(s.radius||0):p),height:2*(r?r(s.radius||0):p),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit py-0 px-1.5",children:te?i.jsxRuntimeExports.jsx("p",{className:i.mo("text-center leading-none m-0",c?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((r?r(s.radius||0):p)/4),10),Math.max(Math.round((r?r(s.radius||0):p)*12/`${s.label}`.length),10),20)}px`,hyphens:"auto",color:Ye.getTextColorBasedOnBgColor(n.filter(ut).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ve.Colors.gray),...E?.graphObjectValues||{}},children:s.label}):null})})}):null]},s.label)),T?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:T.map((s,o)=>i.jsxRuntimeExports.jsx(Ze.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-x.left,x2:d+x.right,classNames:s.classNames,styles:s.styles,isInView:!0},o))}):null,me.filter(ct).map(at)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${L}px`,height:`${$}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(Ge.w,{})})});let D;e[13]!==c?.tooltip||e[14]!==a||e[15]!==J||e[16]!==xe||e[17]!==E?.tooltip||e[18]!==X?(D=xe&&X&&a&&J?i.jsxRuntimeExports.jsx(Xe.Tooltip,{data:xe,body:X,xPos:a,yPos:J,backgroundStyle:E?.tooltip,className:c?.tooltip}):null,e[13]=c?.tooltip,e[14]=a,e[15]=J,e[16]=xe,e[17]=E?.tooltip,e[18]=X,e[19]=D):D=e[19];let R;e[20]!==M||e[21]!==N?(R=M&&N!==void 0?i.jsxRuntimeExports.jsx(He.le,{open:N!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof M=="string"?{__html:ze.string2HTML(M,N)}:void 0,children:typeof M=="function"?M(N):null})}):null,e[20]=M,e[21]=N,e[22]=R):R=e[22];let O;return e[23]!==w||e[24]!==D||e[25]!==R?(O=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[w,D,R]}),e[23]=w,e[24]=D,e[25]=R,e[26]=O):O=e[26],O}function at(t){return t.layer}function ct(t){return t.position==="after"}function ut(t){return t.color}function xt(t){return t.color}function dt(t){return t.layer}function pt(t){return t.position==="before"}function mt(t){return t!==0}function ft(t){return t!==0}function ht(t){return t.position}function gt(t){return{...t,...t.data&&{data:{...t.data}}}}function vt(t){return t!=null}function jt(t){return t.radius}function yt(t){return t.radius===void 0||t.radius===null}function bt(t){return t.position}function Mt(t){return!v.checkIfNullOrUndefined(t.position)}function Et(t){return t.position}function Rt(t){return!v.checkIfNullOrUndefined(t.position)}function Ot(t){return t.position}function kt(t){return!v.checkIfNullOrUndefined(t.position)}function Ct(t){return t.position}function Nt(t){return!v.checkIfNullOrUndefined(t.position)}function St(t){return!v.checkIfNullOrUndefined(t.radius)}function wt(t){return!v.checkIfNullOrUndefined(t.radius)}function Dt(t){const e=i.compilerRuntimeExports.c(27),{data:n,circleColors:j,showTicks:he,width:L,height:$,colorDomain:P,topMargin:V,bottomMargin:_,leftMargin:ee,rightMargin:re,showLabels:h,tooltip:F,onSeriesMouseOver:te,refValues:X,selectedColor:le,startFromZero:T,radius:g,maxRadiusValue:q,maxValue:p,minValue:Y,highlightedDataPoints:z,onSeriesMouseClick:W,rtl:ge,resetSelectionOnDoubleClick:pe,detailsOnClick:k,suffix:M,prefix:E,styles:c,classNames:C,noOfTicks:ae,dimmedOpacity:ce,precision:me,customLayers:ue}=t,U=V===void 0?25:V,ie=_===void 0?10:_,oe=ee===void 0?10:ee,fe=re===void 0?10:re,xe=f.useRef(null),[B,N]=f.useState(void 0),[S,de]=f.useState(void 0),[u,a]=f.useState(null),[Z,J]=f.useState(void 0),[K,A]=f.useState(void 0);let x;e[0]!==ie||e[1]!==oe||e[2]!==fe||e[3]!==U?(x={top:U,bottom:ie,left:oe,right:fe},e[0]=ie,e[1]=oe,e[2]=fe,e[3]=U,e[4]=x):x=e[4];const d=x,ne=L-d.left-d.right,I=$-d.top-d.bottom,Q=n.filter(ei).length===0?n:Be.orderBy(n.filter(_t),"radius","desc");let H;e[5]!==n||e[6]!==p||e[7]!==T?(H=v.checkIfNullOrUndefined(p)?Math.max(...n.filter(Qt).map(Kt))<0&&!T?0:Math.max(...n.filter(Jt).map(Zt)):p,e[5]=n,e[6]=p,e[7]=T,e[8]=H):H=e[8];const G=H;let m;e[9]!==n||e[10]!==Y||e[11]!==T?(m=v.checkIfNullOrUndefined(Y)?Math.min(...n.filter(Wt).map(zt))>=0&&!T?0:Math.min(...n.filter(Yt).map(Xt)):Y,e[9]=n,e[10]=Y,e[11]=T,e[12]=m):m=e[12];const r=m,l=n.filter(Pt).length!==n.length?Je.sqrt().domain([0,v.checkIfNullOrUndefined(q)?Math.max(...n.map(Gt).filter(Ht)):q]).range([.25,g]).nice():void 0,y=Ke.linear().domain([r,G]).range([0,ne]).nice(),w=y.ticks(ae);f.useEffect(()=>{const o=Q.map(Bt).filter(Ut);se.forceSimulation(o).force("x",se.forceX(b=>y(b.position)).strength(5)).force("y",se.forceY(b=>I/2).strength(1)).force("collide",se.forceCollide(b=>l?l(b.radius||0)+1:g+1)).force("charge",se.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{a(o)}).on("end",()=>{a(o)})},[n,g,I,ne,r,G,Q,y,l]);const D=u?i.jsxRuntimeExports.jsx("svg",{width:`${L}px`,height:`${$}px`,viewBox:`0 0 ${L} ${$}`,direction:"ltr",ref:xe,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[he?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(We.Axis,{x1:y(r<0?0:r),x2:y(r<0?0:r),y1:0-d.top,y2:I+d.bottom,label:Pe.numberFormattingFunction(r<0?0:r,"NA",me,E,M),labelPos:{x:y(r<0?0:r),y:0-U,dy:"0.75em",dx:3},classNames:{axis:C?.xAxis?.axis,label:C?.yAxis?.labels},styles:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(it.XTicksAndGridLines,{values:w.filter(Ft),x:w.filter(Vt).map(o=>y(o)),y1:0-U,y2:I+d.bottom,styles:{gridLines:c?.xAxis?.gridLines,labels:c?.xAxis?.labels},classNames:{gridLines:C?.xAxis?.gridLines,labels:C?.xAxis?.labels},suffix:M,prefix:E,labelType:"secondary",showGridLines:!0,precision:me})]}):null,ue.filter(It).map(At),u.map(o=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${o.x},${o.y})`,opacity:le?o.color&&j[P.indexOf(o.color)]===le?1:ce:z.length!==0?z.indexOf(o.label)!==-1?.85:ce:.85,onMouseEnter:b=>{N(o),A(b.clientY),J(b.clientX),te?.(o)},onMouseMove:b=>{N(o),A(b.clientY),J(b.clientX)},onClick:()=>{(W||k)&&(Ue.isEqual(S,o)&&pe?(de(void 0),W?.(void 0)):(de(o),W?.(o)))},onMouseLeave:()=>{N(void 0),J(void 0),A(void 0),te?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,fill:n.filter(qt).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ve.Colors.gray,radius:l?l(o.radius||0):g}),(l?l(o.radius||0):g)>10&&h?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(l?l(o.radius||0):g),x:0-(l?l(o.radius||0):g),width:2*(l?l(o.radius||0):g),height:2*(l?l(o.radius||0):g),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5",children:h?i.jsxRuntimeExports.jsx("p",{className:i.mo("text-center leading-none m-0",C?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((l?l(o.radius||0):g)/4),10),Math.max(Math.round((l?l(o.radius||0):g)*12/`${o.label}`.length),10),20)}px`,color:Ye.getTextColorBasedOnBgColor(n.filter(Tt).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ve.Colors.gray),hyphens:"auto",...c?.graphObjectValues||{}},children:o.label}):null})})}):null]},o.label)),X?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:X.map((o,b)=>i.jsxRuntimeExports.jsx(Ze.RefLineX,{text:o.text,color:o.color,x:y(o.value),y1:0-d.top,y2:I+d.bottom,textSide:y(o.value)>ne*.75||ge?"left":"right",classNames:o.classNames,styles:o.styles,isInView:!0},b))}):null,ue.filter($t).map(Lt)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${L}px`,height:`${$}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(Ge.w,{})})});let R;e[13]!==C?.tooltip||e[14]!==Z||e[15]!==K||e[16]!==B||e[17]!==c?.tooltip||e[18]!==F?(R=B&&F&&Z&&K?i.jsxRuntimeExports.jsx(Xe.Tooltip,{data:B,body:F,xPos:Z,yPos:K,backgroundStyle:c?.tooltip,className:C?.tooltip}):null,e[13]=C?.tooltip,e[14]=Z,e[15]=K,e[16]=B,e[17]=c?.tooltip,e[18]=F,e[19]=R):R=e[19];let O;e[20]!==k||e[21]!==S?(O=k&&S!==void 0?i.jsxRuntimeExports.jsx(He.le,{open:S!==void 0,onClose:()=>{de(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof k=="string"?{__html:ze.string2HTML(k,S)}:void 0,children:typeof k=="function"?k(S):null})}):null,e[20]=k,e[21]=S,e[22]=O):O=e[22];let s;return e[23]!==D||e[24]!==R||e[25]!==O?(s=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,R,O]}),e[23]=D,e[24]=R,e[25]=O,e[26]=s):s=e[26],s}function Lt(t){return t.layer}function $t(t){return t.position==="after"}function Tt(t){return t.color}function qt(t){return t.color}function At(t){return t.layer}function It(t){return t.position==="before"}function Vt(t){return t!==0}function Ft(t){return t!==0}function Ut(t){return t.position}function Bt(t){return{...t,...t.data&&{data:{...t.data}}}}function Ht(t){return t!=null}function Gt(t){return t.radius}function Pt(t){return t.radius===void 0||t.radius===null}function Xt(t){return t.position}function Yt(t){return!v.checkIfNullOrUndefined(t.position)}function zt(t){return t.position}function Wt(t){return!v.checkIfNullOrUndefined(t.position)}function Zt(t){return t.position}function Jt(t){return!v.checkIfNullOrUndefined(t.position)}function Kt(t){return t.position}function Qt(t){return!v.checkIfNullOrUndefined(t.position)}function _t(t){return!v.checkIfNullOrUndefined(t.radius)}function ei(t){return!v.checkIfNullOrUndefined(t.radius)}function ti(t){const e=i.compilerRuntimeExports.c(79),{data:n,graphTitle:j,topMargin:he,bottomMargin:L,leftMargin:$,rightMargin:P,colors:V,sources:_,graphDescription:ee,height:re,width:h,footNote:F,colorDomain:te,colorLegendTitle:X,padding:le,relativeHeight:T,tooltip:g,onSeriesMouseOver:q,refValues:p,showColorScale:Y,graphID:z,radius:W,showLabels:ge,showTicks:pe,maxRadiusValue:k,maxValue:M,minValue:E,highlightedDataPoints:c,onSeriesMouseClick:C,ariaLabel:ae,backgroundColor:ce,graphDownload:me,dataDownload:ue,language:U,showNAColor:ie,minHeight:oe,theme:fe,resetSelectionOnDoubleClick:xe,detailsOnClick:B,orientation:N,suffix:S,prefix:de,styles:u,classNames:a,noOfTicks:Z,dimmedOpacity:J,precision:K,customLayers:A}=t,x=W===void 0?5:W,d=ge===void 0?!0:ge,ne=pe===void 0?!0:pe;let I;e[0]!==c?(I=c===void 0?[]:c,e[0]=c,e[1]=I):I=e[1];const Q=I,H=ce===void 0?!1:ce,G=me===void 0?!1:me,m=ue===void 0?!1:ue,r=U===void 0?"en":U,l=ie===void 0?!0:ie,y=oe===void 0?0:oe,w=fe===void 0?"light":fe,D=xe===void 0?!0:xe,R=N===void 0?"vertical":N,O=S===void 0?"":S,s=de===void 0?"":de,o=Z===void 0?5:Z,b=J===void 0?.3:J,Ne=K===void 0?2:K;let Me;e[2]!==A?(Me=A===void 0?[]:A,e[2]=A,e[3]=Me):Me=e[3];const Se=Me,[Ee,Qe]=f.useState(0),[Re,_e]=f.useState(0),[we,et]=f.useState(void 0),De=f.useRef(null),qe=f.useRef(null),Le=R==="horizontal"?Dt:lt;let Oe,ke;e[4]===Symbol.for("react.memo_cache_sentinel")?(Oe=()=>{const Ae=new ResizeObserver(Ie=>{Qe(Ie[0].target.clientWidth||620),_e(Ie[0].target.clientHeight||480)});return De.current&&Ae.observe(De.current),()=>Ae.disconnect()},ke=[],e[4]=Oe,e[5]=ke):(Oe=e[4],ke=e[5]),f.useEffect(Oe,ke);const $e=a?.graphContainer,Te=u?.graphContainer;let je;e[6]!==a?.description||e[7]!==a?.title||e[8]!==n||e[9]!==m||e[10]!==ee||e[11]!==G||e[12]!==j||e[13]!==u?.description||e[14]!==u?.title||e[15]!==h?(je=j||ee||G||m?i.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:a?.title,description:a?.description},graphTitle:j,graphDescription:ee,width:h,graphDownload:G?qe:void 0,dataDownload:m?n.map(ci).filter(ai).length>0?n.map(li).filter(ri):n.filter(si):null}):null,e[6]=a?.description,e[7]=a?.title,e[8]=n,e[9]=m,e[10]=ee,e[11]=G,e[12]=j,e[13]=u?.description,e[14]=u?.title,e[15]=h,e[16]=je):je=e[16];let ye;e[17]!==Le||e[18]!==L||e[19]!==a||e[20]!==te||e[21]!==X||e[22]!==V||e[23]!==Se||e[24]!==n||e[25]!==B||e[26]!==b||e[27]!==Q||e[28]!==$||e[29]!==k||e[30]!==M||e[31]!==E||e[32]!==o||e[33]!==C||e[34]!==q||e[35]!==Ne||e[36]!==s||e[37]!==x||e[38]!==p||e[39]!==D||e[40]!==P||e[41]!==we||e[42]!==Y||e[43]!==d||e[44]!==l||e[45]!==ne||e[46]!==u||e[47]!==O||e[48]!==Re||e[49]!==Ee||e[50]!==w||e[51]!==g||e[52]!==he||e[53]!==h?(ye=n.length===0?i.jsxRuntimeExports.jsx(nt.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Y!==!1&&n.filter(ni).length!==0?i.jsxRuntimeExports.jsx(st.ColorLegendWithMouseOver,{width:h,colorLegendTitle:X,colors:V||ve.Colors[w].categoricalColors.colors,colorDomain:te||Ve.uniqBy(n,"color",!0),setSelectedColor:et,showNAColor:l,className:a?.colorLegend}):null,i.jsxRuntimeExports.jsx(Fe.GraphArea,{ref:De,children:Ee&&Re?i.jsxRuntimeExports.jsx(Le,{data:n,circleColors:n.filter(oi).length===0?V?[V]:[ve.Colors.primaryColors["blue-600"]]:V||ve.Colors[w].categoricalColors.colors,colorDomain:n.filter(ii).length===0?[]:te||Ve.uniqBy(n,"color",!0),width:Ee,selectedColor:we,height:Re,showTicks:ne,leftMargin:$,rightMargin:P,topMargin:he,bottomMargin:L,showLabels:d,tooltip:g,onSeriesMouseOver:q,refValues:p,startFromZero:!1,radius:x,maxRadiusValue:k,maxValue:M,minValue:E,highlightedDataPoints:Q,onSeriesMouseClick:C,resetSelectionOnDoubleClick:D,detailsOnClick:B,styles:u,classNames:a,suffix:O,prefix:s,noOfTicks:o||5,dimmedOpacity:b,precision:Ne,customLayers:Se}):null})]}),e[17]=Le,e[18]=L,e[19]=a,e[20]=te,e[21]=X,e[22]=V,e[23]=Se,e[24]=n,e[25]=B,e[26]=b,e[27]=Q,e[28]=$,e[29]=k,e[30]=M,e[31]=E,e[32]=o,e[33]=C,e[34]=q,e[35]=Ne,e[36]=s,e[37]=x,e[38]=p,e[39]=D,e[40]=P,e[41]=we,e[42]=Y,e[43]=d,e[44]=l,e[45]=ne,e[46]=u,e[47]=O,e[48]=Re,e[49]=Ee,e[50]=w,e[51]=g,e[52]=he,e[53]=h,e[54]=ye):ye=e[54];let be;e[55]!==a?.footnote||e[56]!==a?.source||e[57]!==F||e[58]!==_||e[59]!==u?.footnote||e[60]!==u?.source||e[61]!==h?(be=_||F?i.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:_,footNote:F,width:h}):null,e[55]=a?.footnote,e[56]=a?.source,e[57]=F,e[58]=_,e[59]=u?.footnote,e[60]=u?.source,e[61]=h,e[62]=be):be=e[62];let Ce;return e[63]!==ae||e[64]!==H||e[65]!==z||e[66]!==re||e[67]!==r||e[68]!==y||e[69]!==le||e[70]!==T||e[71]!==$e||e[72]!==Te||e[73]!==je||e[74]!==ye||e[75]!==be||e[76]!==w||e[77]!==h?(Ce=i.jsxRuntimeExports.jsxs(Fe.GraphContainer,{className:$e,style:Te,id:z,ref:qe,"aria-label":ae,backgroundColor:H,theme:w,language:r,minHeight:y,width:h,height:re,relativeHeight:T,padding:le,children:[je,ye,be]}),e[63]=ae,e[64]=H,e[65]=z,e[66]=re,e[67]=r,e[68]=y,e[69]=le,e[70]=T,e[71]=$e,e[72]=Te,e[73]=je,e[74]=ye,e[75]=be,e[76]=w,e[77]=h,e[78]=Ce):Ce=e[78],Ce}function ii(t){return t.color}function oi(t){return t.color}function ni(t){return t.color}function si(t){return t!==void 0}function ri(t){return t!==void 0}function li(t){return t.data}function ai(t){return t!==void 0}function ci(t){return t.data}exports.BeeSwarmChart=ti;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),f=require("react"),Ue=require("./index-DQA8q5sC.cjs"),Be=require("./index-Cno4Q0YE.cjs"),He=require("./Modal-JW_IExO3.cjs"),Ge=require("./Spinner-DRMBUsX7.cjs"),tt=require("./Typography-DX7PlgQU.cjs"),Pe=require("./numberFormattingFunction-02t-wJta.cjs"),Xe=require("./Tooltip-4dJo4_AF.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ye=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),ve=require("./Colors.cjs"),ze=require("./string2HTML-CPGr_I5E.cjs"),We=require("./Axis-DxRV2yMi.cjs"),Ze=require("./ReferenceLine-BH0qdf4R.cjs"),it=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ot=require("./XTicksAndGridLines-B6CELS7q.cjs"),Je=require("./pow-DgrUorRi.cjs"),Ke=require("./linear-BwPAspcq.cjs"),se=require("./y-QcCbqrzx.cjs"),Ve=require("./uniqBy-O05lp2S5.cjs"),nt=require("./GraphHeader.cjs"),Fe=require("./GraphContainer-d8A46BK2.cjs"),st=require("./EmptyState-sAEZ_5rU.cjs"),rt=require("./ColorLegendWithMouseOver.cjs"),lt=require("./GraphFooter.cjs");function at(t){const e=i.compilerRuntimeExports.c(27),{data:n,circleColors:j,showTicks:he,width:L,height:$,colorDomain:P,topMargin:V,bottomMargin:_,leftMargin:ee,rightMargin:re,suffix:h,prefix:F,showLabels:te,tooltip:X,onSeriesMouseOver:le,refValues:T,selectedColor:g,startFromZero:q,radius:d,maxRadiusValue:Y,maxValue:z,minValue:W,highlightedDataPoints:ge,onSeriesMouseClick:de,resetSelectionOnDoubleClick:k,detailsOnClick:M,styles:E,classNames:c,noOfTicks:C,dimmedOpacity:ae,precision:ce,customLayers:me}=t,ue=V===void 0?25:V,U=_===void 0?10:_,ie=ee===void 0?100:ee,oe=re===void 0?40:re,fe=f.useRef(null),[xe,B]=f.useState(void 0),[N,S]=f.useState(void 0),[pe,u]=f.useState(null),[a,Z]=f.useState(void 0),[J,K]=f.useState(void 0);let A;e[0]!==U||e[1]!==ie||e[2]!==oe||e[3]!==ue?(A={top:ue,bottom:U,left:ie,right:oe},e[0]=U,e[1]=ie,e[2]=oe,e[3]=ue,e[4]=A):A=e[4];const x=A,p=L-x.left-x.right,ne=$-x.top-x.bottom,I=n.filter(Dt).length===0?n:Be.orderBy(n.filter(wt),"radius","desc");let Q;e[5]!==n||e[6]!==z||e[7]!==q?(Q=v.checkIfNullOrUndefined(z)?Math.max(...n.filter(St).map(Nt))<0&&!q?0:Math.max(...n.filter(Ct).map(kt)):z,e[5]=n,e[6]=z,e[7]=q,e[8]=Q):Q=e[8];const H=Q;let G;e[9]!==n||e[10]!==W||e[11]!==q?(G=v.checkIfNullOrUndefined(W)?Math.min(...n.filter(Ot).map(Rt))>=0&&!q?0:Math.min(...n.filter(Et).map(Mt)):W,e[9]=n,e[10]=W,e[11]=q,e[12]=G):G=e[12];const m=G,r=n.filter(bt).length!==n.length?Je.sqrt().domain([0,v.checkIfNullOrUndefined(Y)?Math.max(...n.map(yt).filter(jt)):Y]).range([.25,d]).nice():void 0,l=Ke.linear().domain([m,H]).range([ne,0]).nice(),y=l.ticks(C);f.useEffect(()=>{const s=I.map(vt).filter(gt);se.forceSimulation(s).force("y",se.forceY(o=>l(o.position)).strength(5)).force("x",se.forceX(o=>p/2).strength(1)).force("collide",se.forceCollide(o=>r?r(o.radius||0)+1:d+1)).force("charge",se.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{u(s)}).on("end",()=>{u(s)})},[n,d,ne,p,m,H,I,l,r]);const w=pe?i.jsxRuntimeExports.jsx("svg",{width:`${L}px`,height:`${$}px`,viewBox:`0 0 ${L} ${$}`,direction:"ltr",ref:fe,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[he?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(We.Axis,{y1:l(m<0?0:m),y2:l(m<0?0:m),x1:0-x.left,x2:p+x.right,label:Pe.numberFormattingFunction(m<0?0:m,"NA",ce,F,h),labelPos:{x:0-x.left,y:l(m<0?0:m),dx:0,dy:H<0?"1em":-5},classNames:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels},styles:{axis:E?.xAxis?.axis,label:E?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(it.YTicksAndGridLines,{values:y.filter(ht),y:y.filter(ft).map(s=>l(s)),x1:0-x.left,x2:p+x.right,styles:{gridLines:E?.yAxis?.gridLines,labels:E?.yAxis?.labels},classNames:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},suffix:h,prefix:F,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:ce})]}):null,me.filter(mt).map(dt),pe.map(s=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${s.x},${s.y})`,opacity:g?s.color&&j[P.indexOf(s.color)]===g?1:ae:ge.length!==0?ge.indexOf(s.label)!==-1?.85:ae:.85,onMouseEnter:o=>{B(s),K(o.clientY),Z(o.clientX),le?.(s)},onMouseMove:o=>{B(s),K(o.clientY),Z(o.clientX)},onClick:()=>{(de||M)&&(Ue.isEqual(N,s)&&k?(S(void 0),de?.(void 0)):(S(s),de?.(s)))},onMouseLeave:()=>{B(void 0),Z(void 0),K(void 0),le?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:r?r(s.radius||0):d,fill:n.filter(pt).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ve.Colors.gray}),(r?r(s.radius||0):d)>10&&te?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(r?r(s.radius||0):d),x:0-(r?r(s.radius||0):d),width:2*(r?r(s.radius||0):d),height:2*(r?r(s.radius||0):d),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit py-0 px-1.5",children:te?i.jsxRuntimeExports.jsx("p",{className:i.mo("text-center leading-none m-0",c?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((r?r(s.radius||0):d)/4),10),Math.max(Math.round((r?r(s.radius||0):d)*12/`${s.label}`.length),10),20)}px`,hyphens:"auto",color:Ye.getTextColorBasedOnBgColor(n.filter(xt).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ve.Colors.gray),...E?.graphObjectValues||{}},children:s.label}):null})})}):null]},s.label)),T?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:T.map((s,o)=>i.jsxRuntimeExports.jsx(Ze.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-x.left,x2:p+x.right,classNames:s.classNames,styles:s.styles,isInView:!0},o))}):null,me.filter(ut).map(ct)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${L}px`,height:`${$}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(Ge.w,{})})});let D;e[13]!==c?.tooltip||e[14]!==a||e[15]!==J||e[16]!==xe||e[17]!==E?.tooltip||e[18]!==X?(D=xe&&X&&a&&J?i.jsxRuntimeExports.jsx(Xe.Tooltip,{data:xe,body:X,xPos:a,yPos:J,backgroundStyle:E?.tooltip,className:c?.tooltip}):null,e[13]=c?.tooltip,e[14]=a,e[15]=J,e[16]=xe,e[17]=E?.tooltip,e[18]=X,e[19]=D):D=e[19];let R;e[20]!==M||e[21]!==N?(R=M&&N!==void 0?i.jsxRuntimeExports.jsx(He.le,{open:N!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof M=="string"?{__html:ze.string2HTML(M,N)}:void 0,children:typeof M=="function"?M(N):null})}):null,e[20]=M,e[21]=N,e[22]=R):R=e[22];let O;return e[23]!==w||e[24]!==D||e[25]!==R?(O=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[w,D,R]}),e[23]=w,e[24]=D,e[25]=R,e[26]=O):O=e[26],O}function ct(t){return t.layer}function ut(t){return t.position==="after"}function xt(t){return t.color}function pt(t){return t.color}function dt(t){return t.layer}function mt(t){return t.position==="before"}function ft(t){return t!==0}function ht(t){return t!==0}function gt(t){return t.position}function vt(t){return{...t,...t.data&&{data:{...t.data}}}}function jt(t){return t!=null}function yt(t){return t.radius}function bt(t){return t.radius===void 0||t.radius===null}function Mt(t){return t.position}function Et(t){return!v.checkIfNullOrUndefined(t.position)}function Rt(t){return t.position}function Ot(t){return!v.checkIfNullOrUndefined(t.position)}function kt(t){return t.position}function Ct(t){return!v.checkIfNullOrUndefined(t.position)}function Nt(t){return t.position}function St(t){return!v.checkIfNullOrUndefined(t.position)}function wt(t){return!v.checkIfNullOrUndefined(t.radius)}function Dt(t){return!v.checkIfNullOrUndefined(t.radius)}function Lt(t){const e=i.compilerRuntimeExports.c(27),{data:n,circleColors:j,showTicks:he,width:L,height:$,colorDomain:P,topMargin:V,bottomMargin:_,leftMargin:ee,rightMargin:re,showLabels:h,tooltip:F,onSeriesMouseOver:te,refValues:X,selectedColor:le,startFromZero:T,radius:g,maxRadiusValue:q,maxValue:d,minValue:Y,highlightedDataPoints:z,onSeriesMouseClick:W,rtl:ge,resetSelectionOnDoubleClick:de,detailsOnClick:k,suffix:M,prefix:E,styles:c,classNames:C,noOfTicks:ae,dimmedOpacity:ce,precision:me,customLayers:ue}=t,U=V===void 0?25:V,ie=_===void 0?10:_,oe=ee===void 0?10:ee,fe=re===void 0?10:re,xe=f.useRef(null),[B,N]=f.useState(void 0),[S,pe]=f.useState(void 0),[u,a]=f.useState(null),[Z,J]=f.useState(void 0),[K,A]=f.useState(void 0);let x;e[0]!==ie||e[1]!==oe||e[2]!==fe||e[3]!==U?(x={top:U,bottom:ie,left:oe,right:fe},e[0]=ie,e[1]=oe,e[2]=fe,e[3]=U,e[4]=x):x=e[4];const p=x,ne=L-p.left-p.right,I=$-p.top-p.bottom,Q=n.filter(ti).length===0?n:Be.orderBy(n.filter(ei),"radius","desc");let H;e[5]!==n||e[6]!==d||e[7]!==T?(H=v.checkIfNullOrUndefined(d)?Math.max(...n.filter(_t).map(Qt))<0&&!T?0:Math.max(...n.filter(Kt).map(Jt)):d,e[5]=n,e[6]=d,e[7]=T,e[8]=H):H=e[8];const G=H;let m;e[9]!==n||e[10]!==Y||e[11]!==T?(m=v.checkIfNullOrUndefined(Y)?Math.min(...n.filter(Zt).map(Wt))>=0&&!T?0:Math.min(...n.filter(zt).map(Yt)):Y,e[9]=n,e[10]=Y,e[11]=T,e[12]=m):m=e[12];const r=m,l=n.filter(Xt).length!==n.length?Je.sqrt().domain([0,v.checkIfNullOrUndefined(q)?Math.max(...n.map(Pt).filter(Gt)):q]).range([.25,g]).nice():void 0,y=Ke.linear().domain([r,G]).range([0,ne]).nice(),w=y.ticks(ae);f.useEffect(()=>{const o=Q.map(Ht).filter(Bt);se.forceSimulation(o).force("x",se.forceX(b=>y(b.position)).strength(5)).force("y",se.forceY(b=>I/2).strength(1)).force("collide",se.forceCollide(b=>l?l(b.radius||0)+1:g+1)).force("charge",se.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{a(o)}).on("end",()=>{a(o)})},[n,g,I,ne,r,G,Q,y,l]);const D=u?i.jsxRuntimeExports.jsx("svg",{width:`${L}px`,height:`${$}px`,viewBox:`0 0 ${L} ${$}`,direction:"ltr",ref:xe,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${p.left},${p.top})`,children:[he?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(We.Axis,{x1:y(r<0?0:r),x2:y(r<0?0:r),y1:0-p.top,y2:I+p.bottom,label:Pe.numberFormattingFunction(r<0?0:r,"NA",me,E,M),labelPos:{x:y(r<0?0:r),y:0-U,dy:"0.75em",dx:3},classNames:{axis:C?.xAxis?.axis,label:C?.yAxis?.labels},styles:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(ot.XTicksAndGridLines,{values:w.filter(Ut),x:w.filter(Ft).map(o=>y(o)),y1:0-U,y2:I+p.bottom,styles:{gridLines:c?.xAxis?.gridLines,labels:c?.xAxis?.labels},classNames:{gridLines:C?.xAxis?.gridLines,labels:C?.xAxis?.labels},suffix:M,prefix:E,labelType:"secondary",showGridLines:!0,precision:me})]}):null,ue.filter(Vt).map(It),u.map(o=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${o.x},${o.y})`,opacity:le?o.color&&j[P.indexOf(o.color)]===le?1:ce:z.length!==0?z.indexOf(o.label)!==-1?.85:ce:.85,onMouseEnter:b=>{N(o),A(b.clientY),J(b.clientX),te?.(o)},onMouseMove:b=>{N(o),A(b.clientY),J(b.clientX)},onClick:()=>{(W||k)&&(Ue.isEqual(S,o)&&de?(pe(void 0),W?.(void 0)):(pe(o),W?.(o)))},onMouseLeave:()=>{N(void 0),J(void 0),A(void 0),te?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,fill:n.filter(At).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ve.Colors.gray,radius:l?l(o.radius||0):g}),(l?l(o.radius||0):g)>10&&h?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(l?l(o.radius||0):g),x:0-(l?l(o.radius||0):g),width:2*(l?l(o.radius||0):g),height:2*(l?l(o.radius||0):g),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5",children:h?i.jsxRuntimeExports.jsx(tt.j,{className:i.mo("text-center leading-none m-0",C?.graphObjectValues),marginBottom:"none",style:{fontSize:`${Math.min(Math.max(Math.round((l?l(o.radius||0):g)/4),10),Math.max(Math.round((l?l(o.radius||0):g)*12/`${o.label}`.length),10),20)}px`,color:Ye.getTextColorBasedOnBgColor(n.filter(qt).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ve.Colors.gray),hyphens:"auto",...c?.graphObjectValues||{}},children:o.label}):null})})}):null]},o.label)),X?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:X.map((o,b)=>i.jsxRuntimeExports.jsx(Ze.RefLineX,{text:o.text,color:o.color,x:y(o.value),y1:0-p.top,y2:I+p.bottom,textSide:y(o.value)>ne*.75||ge?"left":"right",classNames:o.classNames,styles:o.styles,isInView:!0},b))}):null,ue.filter(Tt).map($t)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${L}px`,height:`${$}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(Ge.w,{})})});let R;e[13]!==C?.tooltip||e[14]!==Z||e[15]!==K||e[16]!==B||e[17]!==c?.tooltip||e[18]!==F?(R=B&&F&&Z&&K?i.jsxRuntimeExports.jsx(Xe.Tooltip,{data:B,body:F,xPos:Z,yPos:K,backgroundStyle:c?.tooltip,className:C?.tooltip}):null,e[13]=C?.tooltip,e[14]=Z,e[15]=K,e[16]=B,e[17]=c?.tooltip,e[18]=F,e[19]=R):R=e[19];let O;e[20]!==k||e[21]!==S?(O=k&&S!==void 0?i.jsxRuntimeExports.jsx(He.le,{open:S!==void 0,onClose:()=>{pe(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof k=="string"?{__html:ze.string2HTML(k,S)}:void 0,children:typeof k=="function"?k(S):null})}):null,e[20]=k,e[21]=S,e[22]=O):O=e[22];let s;return e[23]!==D||e[24]!==R||e[25]!==O?(s=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,R,O]}),e[23]=D,e[24]=R,e[25]=O,e[26]=s):s=e[26],s}function $t(t){return t.layer}function Tt(t){return t.position==="after"}function qt(t){return t.color}function At(t){return t.color}function It(t){return t.layer}function Vt(t){return t.position==="before"}function Ft(t){return t!==0}function Ut(t){return t!==0}function Bt(t){return t.position}function Ht(t){return{...t,...t.data&&{data:{...t.data}}}}function Gt(t){return t!=null}function Pt(t){return t.radius}function Xt(t){return t.radius===void 0||t.radius===null}function Yt(t){return t.position}function zt(t){return!v.checkIfNullOrUndefined(t.position)}function Wt(t){return t.position}function Zt(t){return!v.checkIfNullOrUndefined(t.position)}function Jt(t){return t.position}function Kt(t){return!v.checkIfNullOrUndefined(t.position)}function Qt(t){return t.position}function _t(t){return!v.checkIfNullOrUndefined(t.position)}function ei(t){return!v.checkIfNullOrUndefined(t.radius)}function ti(t){return!v.checkIfNullOrUndefined(t.radius)}function ii(t){const e=i.compilerRuntimeExports.c(79),{data:n,graphTitle:j,topMargin:he,bottomMargin:L,leftMargin:$,rightMargin:P,colors:V,sources:_,graphDescription:ee,height:re,width:h,footNote:F,colorDomain:te,colorLegendTitle:X,padding:le,relativeHeight:T,tooltip:g,onSeriesMouseOver:q,refValues:d,showColorScale:Y,graphID:z,radius:W,showLabels:ge,showTicks:de,maxRadiusValue:k,maxValue:M,minValue:E,highlightedDataPoints:c,onSeriesMouseClick:C,ariaLabel:ae,backgroundColor:ce,graphDownload:me,dataDownload:ue,language:U,showNAColor:ie,minHeight:oe,theme:fe,resetSelectionOnDoubleClick:xe,detailsOnClick:B,orientation:N,suffix:S,prefix:pe,styles:u,classNames:a,noOfTicks:Z,dimmedOpacity:J,precision:K,customLayers:A}=t,x=W===void 0?5:W,p=ge===void 0?!0:ge,ne=de===void 0?!0:de;let I;e[0]!==c?(I=c===void 0?[]:c,e[0]=c,e[1]=I):I=e[1];const Q=I,H=ce===void 0?!1:ce,G=me===void 0?!1:me,m=ue===void 0?!1:ue,r=U===void 0?"en":U,l=ie===void 0?!0:ie,y=oe===void 0?0:oe,w=fe===void 0?"light":fe,D=xe===void 0?!0:xe,R=N===void 0?"vertical":N,O=S===void 0?"":S,s=pe===void 0?"":pe,o=Z===void 0?5:Z,b=J===void 0?.3:J,Ne=K===void 0?2:K;let Me;e[2]!==A?(Me=A===void 0?[]:A,e[2]=A,e[3]=Me):Me=e[3];const Se=Me,[Ee,Qe]=f.useState(0),[Re,_e]=f.useState(0),[we,et]=f.useState(void 0),De=f.useRef(null),qe=f.useRef(null),Le=R==="horizontal"?Lt:at;let Oe,ke;e[4]===Symbol.for("react.memo_cache_sentinel")?(Oe=()=>{const Ae=new ResizeObserver(Ie=>{Qe(Ie[0].target.clientWidth||620),_e(Ie[0].target.clientHeight||480)});return De.current&&Ae.observe(De.current),()=>Ae.disconnect()},ke=[],e[4]=Oe,e[5]=ke):(Oe=e[4],ke=e[5]),f.useEffect(Oe,ke);const $e=a?.graphContainer,Te=u?.graphContainer;let je;e[6]!==a?.description||e[7]!==a?.title||e[8]!==n||e[9]!==m||e[10]!==ee||e[11]!==G||e[12]!==j||e[13]!==u?.description||e[14]!==u?.title||e[15]!==h?(je=j||ee||G||m?i.jsxRuntimeExports.jsx(nt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:a?.title,description:a?.description},graphTitle:j,graphDescription:ee,width:h,graphDownload:G?qe:void 0,dataDownload:m?n.map(ui).filter(ci).length>0?n.map(ai).filter(li):n.filter(ri):null}):null,e[6]=a?.description,e[7]=a?.title,e[8]=n,e[9]=m,e[10]=ee,e[11]=G,e[12]=j,e[13]=u?.description,e[14]=u?.title,e[15]=h,e[16]=je):je=e[16];let ye;e[17]!==Le||e[18]!==L||e[19]!==a||e[20]!==te||e[21]!==X||e[22]!==V||e[23]!==Se||e[24]!==n||e[25]!==B||e[26]!==b||e[27]!==Q||e[28]!==$||e[29]!==k||e[30]!==M||e[31]!==E||e[32]!==o||e[33]!==C||e[34]!==q||e[35]!==Ne||e[36]!==s||e[37]!==x||e[38]!==d||e[39]!==D||e[40]!==P||e[41]!==we||e[42]!==Y||e[43]!==p||e[44]!==l||e[45]!==ne||e[46]!==u||e[47]!==O||e[48]!==Re||e[49]!==Ee||e[50]!==w||e[51]!==g||e[52]!==he||e[53]!==h?(ye=n.length===0?i.jsxRuntimeExports.jsx(st.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Y!==!1&&n.filter(si).length!==0?i.jsxRuntimeExports.jsx(rt.ColorLegendWithMouseOver,{width:h,colorLegendTitle:X,colors:V||ve.Colors[w].categoricalColors.colors,colorDomain:te||Ve.uniqBy(n,"color",!0),setSelectedColor:et,showNAColor:l,className:a?.colorLegend}):null,i.jsxRuntimeExports.jsx(Fe.GraphArea,{ref:De,children:Ee&&Re?i.jsxRuntimeExports.jsx(Le,{data:n,circleColors:n.filter(ni).length===0?V?[V]:[ve.Colors.primaryColors["blue-600"]]:V||ve.Colors[w].categoricalColors.colors,colorDomain:n.filter(oi).length===0?[]:te||Ve.uniqBy(n,"color",!0),width:Ee,selectedColor:we,height:Re,showTicks:ne,leftMargin:$,rightMargin:P,topMargin:he,bottomMargin:L,showLabels:p,tooltip:g,onSeriesMouseOver:q,refValues:d,startFromZero:!1,radius:x,maxRadiusValue:k,maxValue:M,minValue:E,highlightedDataPoints:Q,onSeriesMouseClick:C,resetSelectionOnDoubleClick:D,detailsOnClick:B,styles:u,classNames:a,suffix:O,prefix:s,noOfTicks:o||5,dimmedOpacity:b,precision:Ne,customLayers:Se}):null})]}),e[17]=Le,e[18]=L,e[19]=a,e[20]=te,e[21]=X,e[22]=V,e[23]=Se,e[24]=n,e[25]=B,e[26]=b,e[27]=Q,e[28]=$,e[29]=k,e[30]=M,e[31]=E,e[32]=o,e[33]=C,e[34]=q,e[35]=Ne,e[36]=s,e[37]=x,e[38]=d,e[39]=D,e[40]=P,e[41]=we,e[42]=Y,e[43]=p,e[44]=l,e[45]=ne,e[46]=u,e[47]=O,e[48]=Re,e[49]=Ee,e[50]=w,e[51]=g,e[52]=he,e[53]=h,e[54]=ye):ye=e[54];let be;e[55]!==a?.footnote||e[56]!==a?.source||e[57]!==F||e[58]!==_||e[59]!==u?.footnote||e[60]!==u?.source||e[61]!==h?(be=_||F?i.jsxRuntimeExports.jsx(lt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:_,footNote:F,width:h}):null,e[55]=a?.footnote,e[56]=a?.source,e[57]=F,e[58]=_,e[59]=u?.footnote,e[60]=u?.source,e[61]=h,e[62]=be):be=e[62];let Ce;return e[63]!==ae||e[64]!==H||e[65]!==z||e[66]!==re||e[67]!==r||e[68]!==y||e[69]!==le||e[70]!==T||e[71]!==$e||e[72]!==Te||e[73]!==je||e[74]!==ye||e[75]!==be||e[76]!==w||e[77]!==h?(Ce=i.jsxRuntimeExports.jsxs(Fe.GraphContainer,{className:$e,style:Te,id:z,ref:qe,"aria-label":ae,backgroundColor:H,theme:w,language:r,minHeight:y,width:h,height:re,relativeHeight:T,padding:le,children:[je,ye,be]}),e[63]=ae,e[64]=H,e[65]=z,e[66]=re,e[67]=r,e[68]=y,e[69]=le,e[70]=T,e[71]=$e,e[72]=Te,e[73]=je,e[74]=ye,e[75]=be,e[76]=w,e[77]=h,e[78]=Ce):Ce=e[78],Ce}function oi(t){return t.color}function ni(t){return t.color}function si(t){return t.color}function ri(t){return t!==void 0}function li(t){return t!==void 0}function ai(t){return t.data}function ci(t){return t!==void 0}function ui(t){return t.data}exports.BeeSwarmChart=ii;
|
|
2
2
|
//# sourceMappingURL=BeeSwarmChart.cjs.map
|