@undp/data-viz 2.0.8 → 2.1.0
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.d.ts +2 -0
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1188 -1213
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +126 -131
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +404 -413
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +179 -184
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +268 -273
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +2 -2
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +198 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +364 -373
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +3 -0
- package/dist/GriddedGraphs.js +158 -146
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +3 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +111 -116
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +202 -207
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +3 -0
- package/dist/MultiGraphDashboard.js +90 -85
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +187 -192
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +3 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +76 -72
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +2 -0
- package/dist/SankeyChart.js +172 -177
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +222 -227
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +3 -0
- package/dist/SingleGraphDashboard.js +131 -128
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +3 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +3 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +145 -141
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +3 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +3 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/getUniqValue-DsqSii6M.js +11 -0
- package/dist/getUniqValue-DsqSii6M.js.map +1 -0
- package/dist/getUniqValue-NX8DgwND.cjs +2 -0
- package/dist/getUniqValue-NX8DgwND.cjs.map +1 -0
- package/dist/index-BBV4tAeA.js +330 -0
- package/dist/index-BBV4tAeA.js.map +1 -0
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/getUniqValue-BKHCm3zE.js +0 -11
- package/dist/getUniqValue-BKHCm3zE.js.map +0 -1
- package/dist/getUniqValue-RViz8tTw.cjs +0 -2
- package/dist/getUniqValue-RViz8tTw.cjs.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
package/dist/AreaChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),O=require("react"),A=require("./parse-hMnG_lRV.cjs"),ye=require("./index-CSNtgibC.cjs"),Ae=require("./index-Cno4Q0YE.cjs"),we=require("./numberFormattingFunction-02t-wJta.cjs"),Ee=require("./Tooltip-4dJo4_AF.cjs"),le=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),he=require("./customArea-CMF5g-C3.cjs"),be=require("./AxisTitle-sS5bLLR7.cjs"),Oe=require("./Axis-DxRV2yMi.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),qe=require("./ReferenceLine-BH0qdf4R.cjs"),Le=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ke=require("./index-B_sAFsEV.cjs"),$e=require("./time-CZd5YLSP.cjs"),Te=require("./linear-BwPAspcq.cjs"),De=require("./area-D3Qx7k7K.cjs"),Ne=require("./line-DHV4JwCR.cjs"),ce=require("./step-BZ3C8QFW.cjs"),Me=require("./select-Bnfk0lJx.cjs"),Fe=require("./init-DU0ybBc_.cjs"),Ge=require("./pointer-Dkq5NV1q.cjs"),He=require("./use-in-view-QcfiW0w3.cjs"),ue=require("./proxy-BxvUI_9l.cjs"),Ve=require("./index-DG2bgAva.cjs"),Pe=require("./GraphFooter.cjs"),Ye=require("./GraphHeader.cjs"),Ie=require("./ColorLegend.cjs"),Xe=require("./Colors.cjs"),We=require("./EmptyState-sAEZ_5rU.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs");function Ue(r){const t=o.compilerRuntimeExports.c(133),{data:h,width:P,height:wt,colors:Et,dateFormat:n,noOfXTicks:Vt,rightMargin:v,leftMargin:y,topMargin:bt,bottomMargin:Ot,yAxisTitle:Y,tooltip:I,onSeriesMouseOver:it,highlightAreaSettings:nt,refValues:rt,minValue:Pt,maxValue:at,rtl:T,annotations:X,customHighlightAreaSettings:lt,noOfYTicks:Yt,prefix:D,suffix:S,curveType:W,styles:f,classNames:p,precision:U,customLayers:N,animate:c}=r,It=O.useRef(null);let ct;t[0]!==c.amount||t[1]!==c.once?(ct={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=ct):ct=t[2];const m=He.useInView(It,ct),St=W==="linear"?Ne.curveLinear:W==="step"?ce.curveStep:W==="stepAfter"?ce.stepAfter:W==="stepBefore"?ce.stepBefore:ce.monotoneX,[R,qt]=O.useState(void 0),[B,Xt]=O.useState(void 0),[ut,Wt]=O.useState(void 0),Lt=Y?y+30:y;let u;t[3]!==Ot||t[4]!==v||t[5]!==Lt||t[6]!==bt?(u={top:bt,bottom:Ot,left:Lt,right:v},t[3]=Ot,t[4]=v,t[5]=Lt,t[6]=bt,t[7]=u):u=t[7];const i=u,xt=O.useRef(null);let M;t[8]!==n?(M=s=>({...s,date:A.parse(`${s.date}`,n,new Date)}),t[8]=n,t[9]=M):M=t[9];const g=Ae.orderBy(h.map(M),["date"],["asc"]);let F;if(t[10]!==n||t[11]!==nt){let s;t[13]!==n?(s=e=>({...e,coordinates:[e.coordinates[0]===null?null:A.parse(`${e.coordinates[0]}`,n,new Date),e.coordinates[1]===null?null:A.parse(`${e.coordinates[1]}`,n,new Date)]}),t[13]=n,t[14]=s):s=t[14],F=nt.map(s),t[10]=n,t[11]=nt,t[12]=F}else F=t[12];const mt=F;let z;if(t[15]!==lt||t[16]!==n){let s;t[18]!==n?(s=e=>({...e,coordinates:e.coordinates.map((C,V)=>V%2===0?A.parse(`${C}`,n,new Date):C)}),t[18]=n,t[19]=s):s=t[19],z=lt.map(s),t[15]=lt,t[16]=n,t[17]=z}else z=t[17];const Ut=z,Bt=g[0].y.map((s,e)=>g.map(C=>({date:C.date,y0:e===0?0:ye.sum(C.y.filter((V,Kt)=>Kt<e)),y1:ye.sum(C.y.filter((V,Kt)=>Kt<=e))}))),x=P-i.left-i.right,d=wt-i.top-i.bottom,zt=g[0].date,kt=g[g.length-1].date,j=le.checkIfNullOrUndefined(Pt)?0:Pt;let G;t[20]!==h||t[21]!==at?(G=le.checkIfNullOrUndefined(at)?Math.max(...h.map(es)):at,t[20]=h,t[21]=at,t[22]=G):G=t[22];const $t=G,a=$e.time().domain([zt,kt]).range([0,x]),l=Te.linear().domain([j,$t]).range([d,0]).nice(),ft=De.area().x(s=>a(s.date)).y0(s=>l(s.y0)).y1(s=>l(s.y1)).curve(St),q=l.ticks(Yt),Tt=a.ticks(Vt);O.useEffect(()=>{const s=C=>{const V=g[Fe.bisectCenter(g.map(ts),a.invert(Ge.pointer(C)[0]),0)];qt(V||g[g.length-1]),it?.(V||g[g.length-1]),Wt(C.clientY),Xt(C.clientX)},e=()=>{qt(void 0),Xt(void 0),Wt(void 0),it?.(void 0)};Me.select(xt.current).on("mousemove",s).on("mouseout",e),it?.(void 0)},[a,g,it]);let H;t[23]!==c||t[24]!==d||t[25]!==x||t[26]!==mt||t[27]!==m||t[28]!==a?(H=o.jsxRuntimeExports.jsx(ke.HighlightArea,{areaSettings:mt,width:x,height:d,scale:a,animate:c,isInView:m}),t[23]=c,t[24]=d,t[25]=x,t[26]=mt,t[27]=m,t[28]=a,t[29]=H):H=t[29];const pt=f?.yAxis?.gridLines,J=f?.yAxis?.labels;let K;t[30]!==pt||t[31]!==J?(K={gridLines:pt,labels:J},t[30]=pt,t[31]=J,t[32]=K):K=t[32];const dt=p?.yAxis?.gridLines,gt=p?.yAxis?.labels;let Q;t[33]!==dt||t[34]!==gt?(Q={gridLines:dt,labels:gt},t[33]=dt,t[34]=gt,t[35]=Q):Q=t[35];const ht=l(j<0?0:j),yt=l(j<0?0:j),vt=0-y,Z=x+i.right,jt=j<0?0:j;let w;t[36]!==U||t[37]!==D||t[38]!==S||t[39]!==jt?(w=we.numberFormattingFunction(jt,"NA",U,D,S),t[36]=U,t[37]=D,t[38]=S,t[39]=jt,t[40]=w):w=t[40];const _=0-y,Jt=$t<0?"1em":-5,tt=l(j<0?0:j);let et;t[41]!==_||t[42]!==Jt||t[43]!==tt?(et={x:_,dx:0,dy:Jt,y:tt},t[41]=_,t[42]=Jt,t[43]=tt,t[44]=et):et=t[44];const Rt=p?.xAxis?.axis,Dt=p?.yAxis?.labels;let E;t[45]!==Rt||t[46]!==Dt?(E={axis:Rt,label:Dt},t[45]=Rt,t[46]=Dt,t[47]=E):E=t[47];const st=f?.xAxis?.axis,Ct=f?.yAxis?.labels;let L;t[48]!==st||t[49]!==Ct?(L={axis:st,label:Ct},t[48]=st,t[49]=Ct,t[50]=L):L=t[50];let b;t[51]!==ht||t[52]!==yt||t[53]!==vt||t[54]!==Z||t[55]!==w||t[56]!==et||t[57]!==E||t[58]!==L?(b=o.jsxRuntimeExports.jsx(Oe.Axis,{y1:ht,y2:yt,x1:vt,x2:Z,label:w,labelPos:et,classNames:E,styles:L}),t[51]=ht,t[52]=yt,t[53]=vt,t[54]=Z,t[55]=w,t[56]=et,t[57]=E,t[58]=L,t[59]=b):b=t[59];const k=0-y-15,$=d/2,ot=f?.yAxis?.title,Nt=p?.yAxis?.title;let At;t[60]!==k||t[61]!==$||t[62]!==ot||t[63]!==Nt||t[64]!==Y?(At=o.jsxRuntimeExports.jsx(be.AxisTitle,{x:k,y:$,style:ot,className:Nt,text:Y,rotate90:!0}),t[60]=k,t[61]=$,t[62]=ot,t[63]=Nt,t[64]=Y,t[65]=At):At=t[65];let Qt;t[66]!==n?(Qt=s=>A.format(s,n),t[66]=n,t[67]=Qt):Qt=t[67];const je=Tt.map(Qt),Re=Tt.map(s=>a(s)),xe=f?.xAxis?.gridLines,me=f?.xAxis?.labels;let Zt;t[68]!==xe||t[69]!==me?(Zt={gridLines:xe,labels:me},t[68]=xe,t[69]=me,t[70]=Zt):Zt=t[70];const fe=p?.xAxis?.gridLines;let Mt;t[71]!==fe?(Mt=o.mo("opacity-0",fe),t[71]=fe,t[72]=Mt):Mt=t[72];const pe=p?.xAxis?.labels;let Ft;t[73]!==pe?(Ft=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",pe),t[73]=pe,t[74]=Ft):Ft=t[74];let _t;t[75]!==Mt||t[76]!==Ft?(_t={gridLines:Mt,labels:Ft},t[75]=Mt,t[76]=Ft,t[77]=_t):_t=t[77];let te;t[78]!==N?(te=N.filter(Qe).map(Ke),t[78]=N,t[79]=te):te=t[79];const de=ue.motion,ge=Bt.map((s,e)=>o.jsxRuntimeExports.jsx(ue.motion.path,{d:ft(s),exit:{opacity:0,transition:{duration:c.duration}},variants:{initial:{d:ft(s.map(Je)),opacity:0},whileInView:{d:ft(s),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:m?"whileInView":"initial",style:{fill:Et[e],opacity:.8}},e));let Gt;t[80]!==p?.mouseOverLine||t[81]!==d||t[82]!==R||t[83]!==f?.mouseOverLine||t[84]!==a?(Gt=R?o.jsxRuntimeExports.jsx("line",{y1:0,y2:d,x1:a(R.date),x2:a(R.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",p?.mouseOverLine),style:f?.mouseOverLine}):null,t[80]=p?.mouseOverLine,t[81]=d,t[82]=R,t[83]=f?.mouseOverLine,t[84]=a,t[85]=Gt):Gt=t[85];let ee;t[86]!==de.g||t[87]!==ge||t[88]!==Gt?(ee=o.jsxRuntimeExports.jsxs(de.g,{children:[ge,Gt]}),t[86]=de.g,t[87]=ge,t[88]=Gt,t[89]=ee):ee=t[89];let se;t[90]!==c||t[91]!==x||t[92]!==m||t[93]!==y||t[94]!==i.right||t[95]!==rt||t[96]!==l?(se=rt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:rt.map((s,e)=>o.jsxRuntimeExports.jsx(qe.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-y,x2:x+i.right,classNames:s.classNames,styles:s.styles,animate:c,isInView:m},e))}):null,t[90]=c,t[91]=x,t[92]=m,t[93]=y,t[94]=i.right,t[95]=rt,t[96]=l,t[97]=se):se=t[97];let Ht;if(t[98]!==c||t[99]!==X||t[100]!==n||t[101]!==x||t[102]!==m||t[103]!==i.right||t[104]!==T||t[105]!==a||t[106]!==l){let s;t[108]!==c||t[109]!==n||t[110]!==x||t[111]!==m||t[112]!==i.right||t[113]!==T||t[114]!==a||t[115]!==l?(s=(e,C)=>{const V=he.getLineEndPoint({x:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},le.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Kt=e.showConnector?{y1:V.y,x1:V.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),cx:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date)):0,cy:e.yCoordinate?l(e.yCoordinate):0,circleRadius:le.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Ce={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:T?0:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:T?e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0):x+i.right-(e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(he.Annotation,{color:e.color,connectorsSettings:Kt,labelSettings:Ce,text:e.text,classNames:e.classNames,styles:e.styles,animate:c,isInView:m},C)},t[108]=c,t[109]=n,t[110]=x,t[111]=m,t[112]=i.right,t[113]=T,t[114]=a,t[115]=l,t[116]=s):s=t[116],Ht=X.map(s),t[98]=c,t[99]=X,t[100]=n,t[101]=x,t[102]=m,t[103]=i.right,t[104]=T,t[105]=a,t[106]=l,t[107]=Ht}else Ht=t[107];let oe;t[117]!==Ht?(oe=o.jsxRuntimeExports.jsx("g",{children:Ht}),t[117]=Ht,t[118]=oe):oe=t[118];let ie;t[119]!==N?(ie=N.filter(ze).map(Be),t[119]=N,t[120]=ie):ie=t[120];let ne;t[121]===Symbol.for("react.memo_cache_sentinel")?(ne={fill:"none",pointerEvents:"all"},t[121]=ne):ne=t[121];let re;t[122]!==xt||t[123]!==d||t[124]!==x?(re=o.jsxRuntimeExports.jsx("rect",{ref:xt,style:ne,width:x,height:d}),t[122]=xt,t[123]=d,t[124]=x,t[125]=re):re=t[125];let ae;return t[126]!==p?.tooltip||t[127]!==B||t[128]!==ut||t[129]!==R||t[130]!==f?.tooltip||t[131]!==I?(ae=R&&I&&B&&ut?o.jsxRuntimeExports.jsx(Ee.Tooltip,{data:R,body:I,xPos:B,yPos:ut,backgroundStyle:f?.tooltip,className:p?.tooltip}):null,t[126]=p?.tooltip,t[127]=B,t[128]=ut,t[129]=R,t[130]=f?.tooltip,t[131]=I,t[132]=ae):ae=t[132],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ue.motion.svg,{width:`${P}px`,height:`${wt}px`,viewBox:`0 0 ${P} ${wt}`,direction:"ltr",ref:It,children:o.jsxRuntimeExports.jsx(Ve.AnimatePresence,{children:o.jsxRuntimeExports.jsxs(ue.motion.g,{transform:`translate(${i.left},${i.top})`,children:[H,o.jsxRuntimeExports.jsx(he.CustomArea,{animate:c,areaSettings:Ut,scaleX:a,scaleY:l,isInView:m}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(Le.YTicksAndGridLines,{values:q.filter(_e),y:q.filter(Ze).map(s=>l(s)),x1:0-y,x2:x+i.right,styles:K,classNames:Q,suffix:S,prefix:D,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:U}),b,At]}),o.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:je,x:Re,y1:0,y2:d,styles:Zt,classNames:_t,suffix:S,prefix:D,labelType:"primary",showGridLines:!0,precision:U}),te,ee,se,oe,ie,re]})})}),ae]})}function Be(r){return r.layer}function ze(r){return r.position==="after"}function Je(r){return{...r,y0:0,y1:0}}function Ke(r){return r.layer}function Qe(r){return r.position==="before"}function Ze(r){return r!==0}function _e(r){return r!==0}function ts(r){return r.date}function es(r){return ye.sum(r.y)||0}function ss(r){const t=o.compilerRuntimeExports.c(80),{data:h,graphTitle:P,colors:wt,sources:Et,graphDescription:n,height:Vt,width:v,footNote:y,noOfXTicks:bt,dateFormat:Ot,colorDomain:Y,padding:I,backgroundColor:it,colorLegendTitle:nt,leftMargin:rt,rightMargin:Pt,topMargin:at,bottomMargin:T,highlightAreaSettings:X,tooltip:lt,relativeHeight:Yt,onSeriesMouseOver:D,refValues:S,graphID:W,minValue:f,maxValue:p,graphDownload:U,dataDownload:N,showColorScale:c,language:It,minHeight:ct,annotations:m,customHighlightAreaSettings:St,theme:R,ariaLabel:qt,yAxisTitle:B,noOfYTicks:Xt,prefix:ut,suffix:Wt,curveType:Lt,styles:u,classNames:i,precision:xt,customLayers:M,animate:g}=r,F=wt===void 0?Xe.Colors.light.categoricalColors.colors:wt,mt=bt===void 0?10:bt,z=Ot===void 0?"yyyy":Ot,Ut=it===void 0?!1:it,Bt=rt===void 0?50:rt,x=Pt===void 0?20:Pt,d=at===void 0?20:at,zt=T===void 0?25:T;let kt;t[0]!==X?(kt=X===void 0?[]:X,t[0]=X,t[1]=kt):kt=t[1];const j=kt;let G;t[2]!==S?(G=S===void 0?[]:S,t[2]=S,t[3]=G):G=t[3];const $t=G,a=U===void 0?!1:U,l=N===void 0?!1:N,ft=c===void 0?!0:c,q=It===void 0?"en":It,Tt=ct===void 0?0:ct;let H;t[4]!==m?(H=m===void 0?[]:m,t[4]=m,t[5]=H):H=t[5];const pt=H;let J;t[6]!==St?(J=St===void 0?[]:St,t[6]=St,t[7]=J):J=t[7];const K=J,dt=R===void 0?"light":R,gt=Xt===void 0?5:Xt,Q=ut===void 0?"":ut,ht=Wt===void 0?"":Wt,yt=Lt===void 0?"curve":Lt,vt=xt===void 0?2:xt;let Z;t[8]!==M?(Z=M===void 0?[]:M,t[8]=M,t[9]=Z):Z=t[9];const jt=Z,w=g===void 0?!1:g,[_,Jt]=O.useState(0),[tt,et]=O.useState(0),Rt=O.useRef(null),Dt=O.useRef(null);let E,st;t[10]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{const Nt=new ResizeObserver(At=>{Jt(At[0].target.clientWidth||620),et(At[0].target.clientHeight||480)});return Rt.current&&Nt.observe(Rt.current),()=>Nt.disconnect()},st=[],t[10]=E,t[11]=st):(E=t[10],st=t[11]),O.useEffect(E,st);const Ct=i?.graphContainer,L=u?.graphContainer;let b;t[12]!==i?.description||t[13]!==i?.title||t[14]!==h||t[15]!==l||t[16]!==n||t[17]!==a||t[18]!==P||t[19]!==u?.description||t[20]!==u?.title||t[21]!==v?(b=P||n||a||l?o.jsxRuntimeExports.jsx(Ye.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:i?.title,description:i?.description},graphTitle:P,graphDescription:n,width:v,graphDownload:a?Dt:void 0,dataDownload:l?h.map(as).filter(rs).length>0?h.map(ns).filter(is):h.filter(os):null}):null,t[12]=i?.description,t[13]=i?.title,t[14]=h,t[15]=l,t[16]=n,t[17]=a,t[18]=P,t[19]=u?.description,t[20]=u?.title,t[21]=v,t[22]=b):b=t[22];let k;t[23]!==w||t[24]!==pt||t[25]!==zt||t[26]!==i||t[27]!==Y||t[28]!==nt||t[29]!==F||t[30]!==yt||t[31]!==K||t[32]!==jt||t[33]!==h||t[34]!==z||t[35]!==j||t[36]!==q||t[37]!==Bt||t[38]!==p||t[39]!==f||t[40]!==mt||t[41]!==gt||t[42]!==D||t[43]!==vt||t[44]!==Q||t[45]!==$t||t[46]!==x||t[47]!==ft||t[48]!==u||t[49]!==ht||t[50]!==tt||t[51]!==_||t[52]!==lt||t[53]!==d||t[54]!==B?(k=h.length===0?o.jsxRuntimeExports.jsx(We.EmptyState,{}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[ft!==!1?o.jsxRuntimeExports.jsx(Ie.ColorLegend,{colorDomain:Y,colors:F,colorLegendTitle:nt,showNAColor:!1,className:i?.colorLegend}):null,o.jsxRuntimeExports.jsx(ve.GraphArea,{ref:Rt,children:_&&tt?o.jsxRuntimeExports.jsx(Ue,{data:h,colors:F,width:_,height:tt,dateFormat:z,noOfXTicks:mt,leftMargin:Bt,rightMargin:x,topMargin:d,bottomMargin:zt,tooltip:lt,onSeriesMouseOver:D,highlightAreaSettings:j,refValues:$t,minValue:f,maxValue:p,rtl:q==="he"||q==="ar",annotations:pt,customHighlightAreaSettings:K,yAxisTitle:B,noOfYTicks:gt,prefix:Q,suffix:ht,curveType:yt,styles:u,classNames:i,precision:vt,customLayers:jt,animate:w===!0?{duration:.5,once:!0,amount:.5}:w||{duration:0,once:!0,amount:0}}):null})]}),t[23]=w,t[24]=pt,t[25]=zt,t[26]=i,t[27]=Y,t[28]=nt,t[29]=F,t[30]=yt,t[31]=K,t[32]=jt,t[33]=h,t[34]=z,t[35]=j,t[36]=q,t[37]=Bt,t[38]=p,t[39]=f,t[40]=mt,t[41]=gt,t[42]=D,t[43]=vt,t[44]=Q,t[45]=$t,t[46]=x,t[47]=ft,t[48]=u,t[49]=ht,t[50]=tt,t[51]=_,t[52]=lt,t[53]=d,t[54]=B,t[55]=k):k=t[55];let $;t[56]!==i?.footnote||t[57]!==i?.source||t[58]!==y||t[59]!==Et||t[60]!==u?.footnote||t[61]!==u?.source||t[62]!==v?($=Et||y?o.jsxRuntimeExports.jsx(Pe.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:Et,footNote:y,width:v}):null,t[56]=i?.footnote,t[57]=i?.source,t[58]=y,t[59]=Et,t[60]=u?.footnote,t[61]=u?.source,t[62]=v,t[63]=$):$=t[63];let ot;return t[64]!==qt||t[65]!==Ut||t[66]!==W||t[67]!==Vt||t[68]!==q||t[69]!==Tt||t[70]!==I||t[71]!==Yt||t[72]!==Ct||t[73]!==L||t[74]!==b||t[75]!==k||t[76]!==$||t[77]!==dt||t[78]!==v?(ot=o.jsxRuntimeExports.jsxs(ve.GraphContainer,{className:Ct,style:L,id:W,ref:Dt,"aria-label":qt,backgroundColor:Ut,theme:dt,language:q,minHeight:Tt,width:v,height:Vt,relativeHeight:Yt,padding:I,children:[b,k,$]}),t[64]=qt,t[65]=Ut,t[66]=W,t[67]=Vt,t[68]=q,t[69]=Tt,t[70]=I,t[71]=Yt,t[72]=Ct,t[73]=L,t[74]=b,t[75]=k,t[76]=$,t[77]=dt,t[78]=v,t[79]=ot):ot=t[79],ot}function os(r){return r!==void 0}function is(r){return r!==void 0}function ns(r){return r.data}function rs(r){return r!==void 0}function as(r){return r.data}exports.AreaChart=ss;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),O=require("react"),A=require("./parse-hMnG_lRV.cjs"),ye=require("./index-CSNtgibC.cjs"),Ae=require("./index-Cno4Q0YE.cjs"),we=require("./numberFormattingFunction-02t-wJta.cjs"),Ee=require("./Tooltip-uUdw6wJL.cjs"),le=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),he=require("./customArea-CMF5g-C3.cjs"),be=require("./AxisTitle-sS5bLLR7.cjs"),Oe=require("./Axis-DxRV2yMi.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),qe=require("./ReferenceLine-BH0qdf4R.cjs"),Le=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ke=require("./index-B_sAFsEV.cjs"),$e=require("./time-CZd5YLSP.cjs"),Te=require("./linear-BwPAspcq.cjs"),De=require("./area-D3Qx7k7K.cjs"),Ne=require("./line-DHV4JwCR.cjs"),ce=require("./step-BZ3C8QFW.cjs"),Me=require("./select-Bnfk0lJx.cjs"),Fe=require("./init-DU0ybBc_.cjs"),Ge=require("./pointer-Dkq5NV1q.cjs"),He=require("./use-in-view-QcfiW0w3.cjs"),ue=require("./proxy-BxvUI_9l.cjs"),Ve=require("./index-DG2bgAva.cjs"),Pe=require("./GraphFooter.cjs"),Ye=require("./GraphHeader.cjs"),Ie=require("./ColorLegend.cjs"),Xe=require("./Colors.cjs"),We=require("./EmptyState-sAEZ_5rU.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs");function Ue(r){const t=o.compilerRuntimeExports.c(133),{data:h,width:P,height:wt,colors:Et,dateFormat:n,noOfXTicks:Vt,rightMargin:v,leftMargin:y,topMargin:bt,bottomMargin:Ot,yAxisTitle:Y,tooltip:I,onSeriesMouseOver:it,highlightAreaSettings:nt,refValues:rt,minValue:Pt,maxValue:at,rtl:T,annotations:X,customHighlightAreaSettings:lt,noOfYTicks:Yt,prefix:D,suffix:S,curveType:W,styles:f,classNames:p,precision:U,customLayers:N,animate:c}=r,It=O.useRef(null);let ct;t[0]!==c.amount||t[1]!==c.once?(ct={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=ct):ct=t[2];const m=He.useInView(It,ct),St=W==="linear"?Ne.curveLinear:W==="step"?ce.curveStep:W==="stepAfter"?ce.stepAfter:W==="stepBefore"?ce.stepBefore:ce.monotoneX,[R,qt]=O.useState(void 0),[B,Xt]=O.useState(void 0),[ut,Wt]=O.useState(void 0),Lt=Y?y+30:y;let u;t[3]!==Ot||t[4]!==v||t[5]!==Lt||t[6]!==bt?(u={top:bt,bottom:Ot,left:Lt,right:v},t[3]=Ot,t[4]=v,t[5]=Lt,t[6]=bt,t[7]=u):u=t[7];const i=u,xt=O.useRef(null);let M;t[8]!==n?(M=s=>({...s,date:A.parse(`${s.date}`,n,new Date)}),t[8]=n,t[9]=M):M=t[9];const g=Ae.orderBy(h.map(M),["date"],["asc"]);let F;if(t[10]!==n||t[11]!==nt){let s;t[13]!==n?(s=e=>({...e,coordinates:[e.coordinates[0]===null?null:A.parse(`${e.coordinates[0]}`,n,new Date),e.coordinates[1]===null?null:A.parse(`${e.coordinates[1]}`,n,new Date)]}),t[13]=n,t[14]=s):s=t[14],F=nt.map(s),t[10]=n,t[11]=nt,t[12]=F}else F=t[12];const mt=F;let z;if(t[15]!==lt||t[16]!==n){let s;t[18]!==n?(s=e=>({...e,coordinates:e.coordinates.map((C,V)=>V%2===0?A.parse(`${C}`,n,new Date):C)}),t[18]=n,t[19]=s):s=t[19],z=lt.map(s),t[15]=lt,t[16]=n,t[17]=z}else z=t[17];const Ut=z,Bt=g[0].y.map((s,e)=>g.map(C=>({date:C.date,y0:e===0?0:ye.sum(C.y.filter((V,Kt)=>Kt<e)),y1:ye.sum(C.y.filter((V,Kt)=>Kt<=e))}))),x=P-i.left-i.right,d=wt-i.top-i.bottom,zt=g[0].date,kt=g[g.length-1].date,j=le.checkIfNullOrUndefined(Pt)?0:Pt;let G;t[20]!==h||t[21]!==at?(G=le.checkIfNullOrUndefined(at)?Math.max(...h.map(es)):at,t[20]=h,t[21]=at,t[22]=G):G=t[22];const $t=G,a=$e.time().domain([zt,kt]).range([0,x]),l=Te.linear().domain([j,$t]).range([d,0]).nice(),ft=De.area().x(s=>a(s.date)).y0(s=>l(s.y0)).y1(s=>l(s.y1)).curve(St),q=l.ticks(Yt),Tt=a.ticks(Vt);O.useEffect(()=>{const s=C=>{const V=g[Fe.bisectCenter(g.map(ts),a.invert(Ge.pointer(C)[0]),0)];qt(V||g[g.length-1]),it?.(V||g[g.length-1]),Wt(C.clientY),Xt(C.clientX)},e=()=>{qt(void 0),Xt(void 0),Wt(void 0),it?.(void 0)};Me.select(xt.current).on("mousemove",s).on("mouseout",e),it?.(void 0)},[a,g,it]);let H;t[23]!==c||t[24]!==d||t[25]!==x||t[26]!==mt||t[27]!==m||t[28]!==a?(H=o.jsxRuntimeExports.jsx(ke.HighlightArea,{areaSettings:mt,width:x,height:d,scale:a,animate:c,isInView:m}),t[23]=c,t[24]=d,t[25]=x,t[26]=mt,t[27]=m,t[28]=a,t[29]=H):H=t[29];const pt=f?.yAxis?.gridLines,J=f?.yAxis?.labels;let K;t[30]!==pt||t[31]!==J?(K={gridLines:pt,labels:J},t[30]=pt,t[31]=J,t[32]=K):K=t[32];const dt=p?.yAxis?.gridLines,gt=p?.yAxis?.labels;let Q;t[33]!==dt||t[34]!==gt?(Q={gridLines:dt,labels:gt},t[33]=dt,t[34]=gt,t[35]=Q):Q=t[35];const ht=l(j<0?0:j),yt=l(j<0?0:j),vt=0-y,Z=x+i.right,jt=j<0?0:j;let w;t[36]!==U||t[37]!==D||t[38]!==S||t[39]!==jt?(w=we.numberFormattingFunction(jt,"NA",U,D,S),t[36]=U,t[37]=D,t[38]=S,t[39]=jt,t[40]=w):w=t[40];const _=0-y,Jt=$t<0?"1em":-5,tt=l(j<0?0:j);let et;t[41]!==_||t[42]!==Jt||t[43]!==tt?(et={x:_,dx:0,dy:Jt,y:tt},t[41]=_,t[42]=Jt,t[43]=tt,t[44]=et):et=t[44];const Rt=p?.xAxis?.axis,Dt=p?.yAxis?.labels;let E;t[45]!==Rt||t[46]!==Dt?(E={axis:Rt,label:Dt},t[45]=Rt,t[46]=Dt,t[47]=E):E=t[47];const st=f?.xAxis?.axis,Ct=f?.yAxis?.labels;let L;t[48]!==st||t[49]!==Ct?(L={axis:st,label:Ct},t[48]=st,t[49]=Ct,t[50]=L):L=t[50];let b;t[51]!==ht||t[52]!==yt||t[53]!==vt||t[54]!==Z||t[55]!==w||t[56]!==et||t[57]!==E||t[58]!==L?(b=o.jsxRuntimeExports.jsx(Oe.Axis,{y1:ht,y2:yt,x1:vt,x2:Z,label:w,labelPos:et,classNames:E,styles:L}),t[51]=ht,t[52]=yt,t[53]=vt,t[54]=Z,t[55]=w,t[56]=et,t[57]=E,t[58]=L,t[59]=b):b=t[59];const k=0-y-15,$=d/2,ot=f?.yAxis?.title,Nt=p?.yAxis?.title;let At;t[60]!==k||t[61]!==$||t[62]!==ot||t[63]!==Nt||t[64]!==Y?(At=o.jsxRuntimeExports.jsx(be.AxisTitle,{x:k,y:$,style:ot,className:Nt,text:Y,rotate90:!0}),t[60]=k,t[61]=$,t[62]=ot,t[63]=Nt,t[64]=Y,t[65]=At):At=t[65];let Qt;t[66]!==n?(Qt=s=>A.format(s,n),t[66]=n,t[67]=Qt):Qt=t[67];const je=Tt.map(Qt),Re=Tt.map(s=>a(s)),xe=f?.xAxis?.gridLines,me=f?.xAxis?.labels;let Zt;t[68]!==xe||t[69]!==me?(Zt={gridLines:xe,labels:me},t[68]=xe,t[69]=me,t[70]=Zt):Zt=t[70];const fe=p?.xAxis?.gridLines;let Mt;t[71]!==fe?(Mt=o.mo("opacity-0",fe),t[71]=fe,t[72]=Mt):Mt=t[72];const pe=p?.xAxis?.labels;let Ft;t[73]!==pe?(Ft=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",pe),t[73]=pe,t[74]=Ft):Ft=t[74];let _t;t[75]!==Mt||t[76]!==Ft?(_t={gridLines:Mt,labels:Ft},t[75]=Mt,t[76]=Ft,t[77]=_t):_t=t[77];let te;t[78]!==N?(te=N.filter(Qe).map(Ke),t[78]=N,t[79]=te):te=t[79];const de=ue.motion,ge=Bt.map((s,e)=>o.jsxRuntimeExports.jsx(ue.motion.path,{d:ft(s),exit:{opacity:0,transition:{duration:c.duration}},variants:{initial:{d:ft(s.map(Je)),opacity:0},whileInView:{d:ft(s),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:m?"whileInView":"initial",style:{fill:Et[e],opacity:.8}},e));let Gt;t[80]!==p?.mouseOverLine||t[81]!==d||t[82]!==R||t[83]!==f?.mouseOverLine||t[84]!==a?(Gt=R?o.jsxRuntimeExports.jsx("line",{y1:0,y2:d,x1:a(R.date),x2:a(R.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",p?.mouseOverLine),style:f?.mouseOverLine}):null,t[80]=p?.mouseOverLine,t[81]=d,t[82]=R,t[83]=f?.mouseOverLine,t[84]=a,t[85]=Gt):Gt=t[85];let ee;t[86]!==de.g||t[87]!==ge||t[88]!==Gt?(ee=o.jsxRuntimeExports.jsxs(de.g,{children:[ge,Gt]}),t[86]=de.g,t[87]=ge,t[88]=Gt,t[89]=ee):ee=t[89];let se;t[90]!==c||t[91]!==x||t[92]!==m||t[93]!==y||t[94]!==i.right||t[95]!==rt||t[96]!==l?(se=rt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:rt.map((s,e)=>o.jsxRuntimeExports.jsx(qe.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-y,x2:x+i.right,classNames:s.classNames,styles:s.styles,animate:c,isInView:m},e))}):null,t[90]=c,t[91]=x,t[92]=m,t[93]=y,t[94]=i.right,t[95]=rt,t[96]=l,t[97]=se):se=t[97];let Ht;if(t[98]!==c||t[99]!==X||t[100]!==n||t[101]!==x||t[102]!==m||t[103]!==i.right||t[104]!==T||t[105]!==a||t[106]!==l){let s;t[108]!==c||t[109]!==n||t[110]!==x||t[111]!==m||t[112]!==i.right||t[113]!==T||t[114]!==a||t[115]!==l?(s=(e,C)=>{const V=he.getLineEndPoint({x:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},le.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Kt=e.showConnector?{y1:V.y,x1:V.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),cx:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date)):0,cy:e.yCoordinate?l(e.yCoordinate):0,circleRadius:le.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Ce={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:T?0:e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:T?e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0):x+i.right-(e.xCoordinate?a(A.parse(`${e.xCoordinate}`,n,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(he.Annotation,{color:e.color,connectorsSettings:Kt,labelSettings:Ce,text:e.text,classNames:e.classNames,styles:e.styles,animate:c,isInView:m},C)},t[108]=c,t[109]=n,t[110]=x,t[111]=m,t[112]=i.right,t[113]=T,t[114]=a,t[115]=l,t[116]=s):s=t[116],Ht=X.map(s),t[98]=c,t[99]=X,t[100]=n,t[101]=x,t[102]=m,t[103]=i.right,t[104]=T,t[105]=a,t[106]=l,t[107]=Ht}else Ht=t[107];let oe;t[117]!==Ht?(oe=o.jsxRuntimeExports.jsx("g",{children:Ht}),t[117]=Ht,t[118]=oe):oe=t[118];let ie;t[119]!==N?(ie=N.filter(ze).map(Be),t[119]=N,t[120]=ie):ie=t[120];let ne;t[121]===Symbol.for("react.memo_cache_sentinel")?(ne={fill:"none",pointerEvents:"all"},t[121]=ne):ne=t[121];let re;t[122]!==xt||t[123]!==d||t[124]!==x?(re=o.jsxRuntimeExports.jsx("rect",{ref:xt,style:ne,width:x,height:d}),t[122]=xt,t[123]=d,t[124]=x,t[125]=re):re=t[125];let ae;return t[126]!==p?.tooltip||t[127]!==B||t[128]!==ut||t[129]!==R||t[130]!==f?.tooltip||t[131]!==I?(ae=R&&I&&B&&ut?o.jsxRuntimeExports.jsx(Ee.Tooltip,{data:R,body:I,xPos:B,yPos:ut,backgroundStyle:f?.tooltip,className:p?.tooltip}):null,t[126]=p?.tooltip,t[127]=B,t[128]=ut,t[129]=R,t[130]=f?.tooltip,t[131]=I,t[132]=ae):ae=t[132],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ue.motion.svg,{width:`${P}px`,height:`${wt}px`,viewBox:`0 0 ${P} ${wt}`,direction:"ltr",ref:It,children:o.jsxRuntimeExports.jsx(Ve.AnimatePresence,{children:o.jsxRuntimeExports.jsxs(ue.motion.g,{transform:`translate(${i.left},${i.top})`,children:[H,o.jsxRuntimeExports.jsx(he.CustomArea,{animate:c,areaSettings:Ut,scaleX:a,scaleY:l,isInView:m}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(Le.YTicksAndGridLines,{values:q.filter(_e),y:q.filter(Ze).map(s=>l(s)),x1:0-y,x2:x+i.right,styles:K,classNames:Q,suffix:S,prefix:D,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:U}),b,At]}),o.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:je,x:Re,y1:0,y2:d,styles:Zt,classNames:_t,suffix:S,prefix:D,labelType:"primary",showGridLines:!0,precision:U}),te,ee,se,oe,ie,re]})})}),ae]})}function Be(r){return r.layer}function ze(r){return r.position==="after"}function Je(r){return{...r,y0:0,y1:0}}function Ke(r){return r.layer}function Qe(r){return r.position==="before"}function Ze(r){return r!==0}function _e(r){return r!==0}function ts(r){return r.date}function es(r){return ye.sum(r.y)||0}function ss(r){const t=o.compilerRuntimeExports.c(80),{data:h,graphTitle:P,colors:wt,sources:Et,graphDescription:n,height:Vt,width:v,footNote:y,noOfXTicks:bt,dateFormat:Ot,colorDomain:Y,padding:I,backgroundColor:it,colorLegendTitle:nt,leftMargin:rt,rightMargin:Pt,topMargin:at,bottomMargin:T,highlightAreaSettings:X,tooltip:lt,relativeHeight:Yt,onSeriesMouseOver:D,refValues:S,graphID:W,minValue:f,maxValue:p,graphDownload:U,dataDownload:N,showColorScale:c,language:It,minHeight:ct,annotations:m,customHighlightAreaSettings:St,theme:R,ariaLabel:qt,yAxisTitle:B,noOfYTicks:Xt,prefix:ut,suffix:Wt,curveType:Lt,styles:u,classNames:i,precision:xt,customLayers:M,animate:g}=r,F=wt===void 0?Xe.Colors.light.categoricalColors.colors:wt,mt=bt===void 0?10:bt,z=Ot===void 0?"yyyy":Ot,Ut=it===void 0?!1:it,Bt=rt===void 0?50:rt,x=Pt===void 0?20:Pt,d=at===void 0?20:at,zt=T===void 0?25:T;let kt;t[0]!==X?(kt=X===void 0?[]:X,t[0]=X,t[1]=kt):kt=t[1];const j=kt;let G;t[2]!==S?(G=S===void 0?[]:S,t[2]=S,t[3]=G):G=t[3];const $t=G,a=U===void 0?!1:U,l=N===void 0?!1:N,ft=c===void 0?!0:c,q=It===void 0?"en":It,Tt=ct===void 0?0:ct;let H;t[4]!==m?(H=m===void 0?[]:m,t[4]=m,t[5]=H):H=t[5];const pt=H;let J;t[6]!==St?(J=St===void 0?[]:St,t[6]=St,t[7]=J):J=t[7];const K=J,dt=R===void 0?"light":R,gt=Xt===void 0?5:Xt,Q=ut===void 0?"":ut,ht=Wt===void 0?"":Wt,yt=Lt===void 0?"curve":Lt,vt=xt===void 0?2:xt;let Z;t[8]!==M?(Z=M===void 0?[]:M,t[8]=M,t[9]=Z):Z=t[9];const jt=Z,w=g===void 0?!1:g,[_,Jt]=O.useState(0),[tt,et]=O.useState(0),Rt=O.useRef(null),Dt=O.useRef(null);let E,st;t[10]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{const Nt=new ResizeObserver(At=>{Jt(At[0].target.clientWidth||620),et(At[0].target.clientHeight||480)});return Rt.current&&Nt.observe(Rt.current),()=>Nt.disconnect()},st=[],t[10]=E,t[11]=st):(E=t[10],st=t[11]),O.useEffect(E,st);const Ct=i?.graphContainer,L=u?.graphContainer;let b;t[12]!==i?.description||t[13]!==i?.title||t[14]!==h||t[15]!==l||t[16]!==n||t[17]!==a||t[18]!==P||t[19]!==u?.description||t[20]!==u?.title||t[21]!==v?(b=P||n||a||l?o.jsxRuntimeExports.jsx(Ye.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:i?.title,description:i?.description},graphTitle:P,graphDescription:n,width:v,graphDownload:a?Dt:void 0,dataDownload:l?h.map(as).filter(rs).length>0?h.map(ns).filter(is):h.filter(os):null}):null,t[12]=i?.description,t[13]=i?.title,t[14]=h,t[15]=l,t[16]=n,t[17]=a,t[18]=P,t[19]=u?.description,t[20]=u?.title,t[21]=v,t[22]=b):b=t[22];let k;t[23]!==w||t[24]!==pt||t[25]!==zt||t[26]!==i||t[27]!==Y||t[28]!==nt||t[29]!==F||t[30]!==yt||t[31]!==K||t[32]!==jt||t[33]!==h||t[34]!==z||t[35]!==j||t[36]!==q||t[37]!==Bt||t[38]!==p||t[39]!==f||t[40]!==mt||t[41]!==gt||t[42]!==D||t[43]!==vt||t[44]!==Q||t[45]!==$t||t[46]!==x||t[47]!==ft||t[48]!==u||t[49]!==ht||t[50]!==tt||t[51]!==_||t[52]!==lt||t[53]!==d||t[54]!==B?(k=h.length===0?o.jsxRuntimeExports.jsx(We.EmptyState,{}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[ft!==!1?o.jsxRuntimeExports.jsx(Ie.ColorLegend,{colorDomain:Y,colors:F,colorLegendTitle:nt,showNAColor:!1,className:i?.colorLegend}):null,o.jsxRuntimeExports.jsx(ve.GraphArea,{ref:Rt,children:_&&tt?o.jsxRuntimeExports.jsx(Ue,{data:h,colors:F,width:_,height:tt,dateFormat:z,noOfXTicks:mt,leftMargin:Bt,rightMargin:x,topMargin:d,bottomMargin:zt,tooltip:lt,onSeriesMouseOver:D,highlightAreaSettings:j,refValues:$t,minValue:f,maxValue:p,rtl:q==="he"||q==="ar",annotations:pt,customHighlightAreaSettings:K,yAxisTitle:B,noOfYTicks:gt,prefix:Q,suffix:ht,curveType:yt,styles:u,classNames:i,precision:vt,customLayers:jt,animate:w===!0?{duration:.5,once:!0,amount:.5}:w||{duration:0,once:!0,amount:0}}):null})]}),t[23]=w,t[24]=pt,t[25]=zt,t[26]=i,t[27]=Y,t[28]=nt,t[29]=F,t[30]=yt,t[31]=K,t[32]=jt,t[33]=h,t[34]=z,t[35]=j,t[36]=q,t[37]=Bt,t[38]=p,t[39]=f,t[40]=mt,t[41]=gt,t[42]=D,t[43]=vt,t[44]=Q,t[45]=$t,t[46]=x,t[47]=ft,t[48]=u,t[49]=ht,t[50]=tt,t[51]=_,t[52]=lt,t[53]=d,t[54]=B,t[55]=k):k=t[55];let $;t[56]!==i?.footnote||t[57]!==i?.source||t[58]!==y||t[59]!==Et||t[60]!==u?.footnote||t[61]!==u?.source||t[62]!==v?($=Et||y?o.jsxRuntimeExports.jsx(Pe.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:Et,footNote:y,width:v}):null,t[56]=i?.footnote,t[57]=i?.source,t[58]=y,t[59]=Et,t[60]=u?.footnote,t[61]=u?.source,t[62]=v,t[63]=$):$=t[63];let ot;return t[64]!==qt||t[65]!==Ut||t[66]!==W||t[67]!==Vt||t[68]!==q||t[69]!==Tt||t[70]!==I||t[71]!==Yt||t[72]!==Ct||t[73]!==L||t[74]!==b||t[75]!==k||t[76]!==$||t[77]!==dt||t[78]!==v?(ot=o.jsxRuntimeExports.jsxs(ve.GraphContainer,{className:Ct,style:L,id:W,ref:Dt,"aria-label":qt,backgroundColor:Ut,theme:dt,language:q,minHeight:Tt,width:v,height:Vt,relativeHeight:Yt,padding:I,children:[b,k,$]}),t[64]=qt,t[65]=Ut,t[66]=W,t[67]=Vt,t[68]=q,t[69]=Tt,t[70]=I,t[71]=Yt,t[72]=Ct,t[73]=L,t[74]=b,t[75]=k,t[76]=$,t[77]=dt,t[78]=v,t[79]=ot):ot=t[79],ot}function os(r){return r!==void 0}function is(r){return r!==void 0}function ns(r){return r.data}function rs(r){return r!==void 0}function as(r){return r.data}exports.AreaChart=ss;
|
|
2
2
|
//# sourceMappingURL=AreaChart.cjs.map
|
package/dist/AreaChart.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare interface ClassNameObject {
|
|
|
66
66
|
regLine?: string;
|
|
67
67
|
dataCards?: string;
|
|
68
68
|
colorLegend?: string;
|
|
69
|
+
modal?: string;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
@@ -220,6 +221,7 @@ declare interface StyleObject {
|
|
|
220
221
|
mouseOverLine?: React.CSSProperties;
|
|
221
222
|
regLine?: React.CSSProperties;
|
|
222
223
|
dataCards?: React.CSSProperties;
|
|
224
|
+
modal?: React.CSSProperties;
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
export { }
|
package/dist/AreaChart.js
CHANGED
|
@@ -4,7 +4,7 @@ import { p as L, f as Oe } from "./parse-DlCRUFh_.js";
|
|
|
4
4
|
import { s as ye } from "./index-CeVNqhMO.js";
|
|
5
5
|
import { o as je } from "./index-BZQYSqar.js";
|
|
6
6
|
import { n as Le } from "./numberFormattingFunction-14YCbkN2.js";
|
|
7
|
-
import { T as Se } from "./Tooltip-
|
|
7
|
+
import { T as Se } from "./Tooltip-Dj5eVppQ.js";
|
|
8
8
|
import { c as le } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
9
|
import { C as De, g as $e, A as ke } from "./customArea-BUhPiPT6.js";
|
|
10
10
|
import { A as Te } from "./AxisTitle-jeI7am8o.js";
|
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-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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),B=require("react"),ye=require("./getSliderMarks-BmADcPQt.cjs"),me=require("./parse-hMnG_lRV.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),oe=require("./index-CSNtgibC.cjs"),we=require("./index-DQA8q5sC.cjs"),ue=require("./numberFormattingFunction-02t-wJta.cjs"),je=require("./Tooltip-uUdw6wJL.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./YAxesLabels-DesLesUP.cjs"),Ae=require("./Axis-DxRV2yMi.cjs"),$e=require("./AxisTitle-sS5bLLR7.cjs"),Ie=require("./XTicksAndGridLines-B6CELS7q.cjs"),Oe=require("./ReferenceLine-BH0qdf4R.cjs"),Se=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Te=require("./XAxesLabels-Bt5NZBmX.cjs"),ke=require("./DetailsModal-BN0HDFlV.cjs"),Ee=require("./use-in-view-QcfiW0w3.cjs"),Ce=require("./linear-BwPAspcq.cjs"),fe=require("./band-VYfcZeJ2.cjs"),Re=require("./index-DG2bgAva.cjs"),Zt=require("./proxy-BxvUI_9l.cjs"),ze=require("./GraphHeader.cjs"),Be=require("./GraphFooter.cjs"),Fe=require("./ColorLegendWithMouseOver.cjs"),ce=require("./Colors.cjs"),Pe=require("./EmptyState-sAEZ_5rU.cjs"),be=require("./index-DRXx7m-C.cjs"),he=require("./ensureCompleteData-I6nYmT8E.cjs"),Me=require("./uniqBy-O05lp2S5.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs"),qe=require("./sort-O96oMZLb.cjs"),Ge=require("./init-DU0ybBc_.cjs"),De=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs");function He(e){const t=i.compilerRuntimeExports.c(123),{data:d,leftMargin:R,rightMargin:qt,topMargin:Tt,bottomMargin:yt,barColors:tt,barPadding:ut,showTicks:k,truncateBy:V,width:y,height:I,suffix:Vt,prefix:rt,showValues:Dt,showLabels:S,tooltip:et,onSeriesMouseOver:xt,refValues:mt,maxValue:It,minValue:w,onSeriesMouseClick:it,selectedColor:X,rtl:F,labelOrder:K,maxBarThickness:Y,resetSelectionOnDoubleClick:dt,detailsOnClick:T,barAxisTitle:U,valueColor:P,noOfTicks:u,styles:s,classNames:o,animate:x,colorDomain:r,precision:p,customLayers:m,naLabel:j}=e,Q=R===void 0?100:R,W=qt===void 0?40:qt,ct=Tt===void 0?25:Tt,Ft=yt===void 0?10:yt,Gt=B.useRef(null);let q;t[0]!==x.amount||t[1]!==x.once?(q={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=q):q=t[2];const bt=Ee.useInView(Gt,q),zt=U?ct+25:ct;let l;t[3]!==Ft||t[4]!==Q||t[5]!==W||t[6]!==zt?(l={top:zt,bottom:Ft,left:Q,right:W},t[3]=Ft,t[4]=Q,t[5]=W,t[6]=zt,t[7]=l):l=t[7];const c=l,[L,h]=B.useState(void 0),[G,D]=B.useState(void 0),[A,Mt]=B.useState(void 0),[vt,st]=B.useState(void 0),pt=y-c.left-c.right,E=I-c.top-c.bottom;let g,Z,_,J,C,ht,Et,nt,Ct,H,ot,z,ft,gt;if(t[8]!==x||t[9]!==U||t[10]!==tt||t[11]!==ut||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]!==r||t[19]!==m||t[20]!==d||t[21]!==T||t[22]!==E||t[23]!==pt||t[24]!==I||t[25]!==bt||t[26]!==K||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==Y||t[31]!==It||t[32]!==w||t[33]!==G||t[34]!==j||t[35]!==u||t[36]!==it||t[37]!==xt||t[38]!==p||t[39]!==rt||t[40]!==mt||t[41]!==dt||t[42]!==F||t[43]!==X||t[44]!==S||t[45]!==k||t[46]!==Dt||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]!==Vt||t[54]!==ct||t[55]!==V||t[56]!==P||t[57]!==y){let lt;t[72]!==K?(lt=(v,O)=>({...v,id:K?`${v.label}`:`${O}`}),t[72]=K,t[73]=lt):lt=t[73];const St=d.map(lt),Ht=K||St.map(Ze),$=Ce.linear().domain([w,It]).range([0,pt]).nice(),Ut=fe.band().domain(Ht).range([0,Y?Math.min(E,Y*Ht.length):E]).paddingInner(ut),Lt=fe.band().domain(d[0].size.map(Qe)).range([0,Ut.bandwidth()]).paddingInner(.1),Kt=$.ticks(u);Z=Zt.motion.svg,Et=Gt,nt=`${y}px`,Ct=`${I}px`,H=`0 0 ${y} ${I}`,ot="ltr",_=`translate(${c.left},${c.top})`,J=k?i.jsxRuntimeExports.jsx(Ie.XTicksAndGridLines,{values:Kt.filter(Ke),x:Kt.filter(Je).map(v=>$(v)),y1:0-ct,y2:E+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:Vt,prefix:rt,labelType:"secondary",showGridLines:!0,precision:p}):null;const Nt=pt/2,Qt=0-c.top+15,Wt=s?.xAxis?.title,Pt=o?.xAxis?.title;t[74]!==U||t[75]!==Nt||t[76]!==Qt||t[77]!==Wt||t[78]!==Pt?(C=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:Nt,y:Qt,style:Wt,className:Pt,text:U}),t[74]=U,t[75]=Nt,t[76]=Qt,t[77]=Wt,t[78]=Pt,t[79]=C):C=t[79],t[80]!==m?(ht=m.filter(We).map(Ue),t[80]=m,t[81]=ht):ht=t[81],g=Re.AnimatePresence,z=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:x.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},children:[v.size.map((O,n)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:X?tt[n]===X?1:.3:.85,onMouseEnter:f=>{h({...v,sizeIndex:n}),st(f.clientY),Mt(f.clientX),xt?.({...v,sizeIndex:n})},onMouseMove:f=>{h({...v,sizeIndex:n}),st(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{h(void 0),Mt(void 0),st(void 0),xt?.(void 0)},onClick:()=>{(it||T)&&(we.isEqual(G,{...v,sizeIndex:n})&&dt?(D(void 0),it?.(void 0)):(D({...v,sizeIndex:n}),it&&it({...v,sizeIndex:n})))},children:[_t.checkIfNullOrUndefined(O)?null:i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:Lt(`${n}`),variants:{initial:{width:0,x:$(0),fill:tt[n]},whileInView:{width:_t.checkIfNullOrUndefined(O)?0:O>=0?$(O)-$(0):$(0)-$(O),x:O>=0?$(0):$(O),fill:tt[n],transition:{duration:x.duration}}},exit:{width:0,x:$(0),transition:{duration:x.duration}},height:Lt.bandwidth(),initial:"initial",animate:bt?"whileInView":"initial"}),Dt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Lt(`${n}`)+Lt.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:$(0),opacity:0,fill:P||tt[n]},whileInView:{x:$(O||0),opacity:1,fill:P||tt[n],transition:{duration:x.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},children:ue.numberFormattingFunction(O,j,p,rt,Vt)}):null]},`${v.label}-${r[n]||n}`)),S?i.jsxRuntimeExports.jsx(Le.YAxesLabels,{value:`${v.label}`.length<V?`${v.label}`:`${`${v.label}`.substring(0,V)}...`,y:0,x:0-c.left,width:$(w<0?0:w)+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:x,isInView:bt}):null]},v.label));const kt=o?.yAxis?.axis;let Yt;t[82]!==kt?(Yt={axis:kt},t[82]=kt,t[83]=Yt):Yt=t[83];const Jt=s?.yAxis?.axis;let N;t[84]!==Jt?(N={axis:Jt},t[84]=Jt,t[85]=N):N=t[85],ft=i.jsxRuntimeExports.jsx(Ae.Axis,{x1:$(w<0?0:w),x2:$(w<0?0:w),y1:-2.5,y2:E+c.bottom,classNames:Yt,styles:N}),gt=mt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:mt.map((v,O)=>i.jsxRuntimeExports.jsx(Oe.RefLineX,{text:v.text,color:v.color,x:$(v.value),y1:0-c.top,y2:E+c.bottom,textSide:$(v.value)>pt*.75||F?"left":"right",classNames:v.classNames,styles:v.styles,animate:x,isInView:bt},O))}):null,t[8]=x,t[9]=U,t[10]=tt,t[11]=ut,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]=r,t[19]=m,t[20]=d,t[21]=T,t[22]=E,t[23]=pt,t[24]=I,t[25]=bt,t[26]=K,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=Y,t[31]=It,t[32]=w,t[33]=G,t[34]=j,t[35]=u,t[36]=it,t[37]=xt,t[38]=p,t[39]=rt,t[40]=mt,t[41]=dt,t[42]=F,t[43]=X,t[44]=S,t[45]=k,t[46]=Dt,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]=Vt,t[54]=ct,t[55]=V,t[56]=P,t[57]=y,t[58]=g,t[59]=Z,t[60]=_,t[61]=J,t[62]=C,t[63]=ht,t[64]=Et,t[65]=nt,t[66]=Ct,t[67]=H,t[68]=ot,t[69]=z,t[70]=ft,t[71]=gt}else g=t[58],Z=t[59],_=t[60],J=t[61],C=t[62],ht=t[63],Et=t[64],nt=t[65],Ct=t[66],H=t[67],ot=t[68],z=t[69],ft=t[70],gt=t[71];let wt;t[86]!==g||t[87]!==z||t[88]!==ft||t[89]!==gt?(wt=i.jsxRuntimeExports.jsxs(g,{children:[z,ft,gt]}),t[86]=g,t[87]=z,t[88]=ft,t[89]=gt,t[90]=wt):wt=t[90];let jt;t[91]!==m?(jt=m.filter(Ye).map(Xe),t[91]=m,t[92]=jt):jt=t[92];let at;t[93]!==_||t[94]!==J||t[95]!==C||t[96]!==ht||t[97]!==wt||t[98]!==jt?(at=i.jsxRuntimeExports.jsxs("g",{transform:_,children:[J,C,ht,wt,jt]}),t[93]=_,t[94]=J,t[95]=C,t[96]=ht,t[97]=wt,t[98]=jt,t[99]=at):at=t[99];let At;t[100]!==Z||t[101]!==Et||t[102]!==nt||t[103]!==Ct||t[104]!==H||t[105]!==ot||t[106]!==at?(At=i.jsxRuntimeExports.jsx(Z,{ref:Et,width:nt,height:Ct,viewBox:H,direction:ot,children:at}),t[100]=Z,t[101]=Et,t[102]=nt,t[103]=Ct,t[104]=H,t[105]=ot,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==A||t[110]!==vt||t[111]!==L||t[112]!==s?.tooltip||t[113]!==et?($t=L&&et&&A&&vt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:L,body:et,xPos:A,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=A,t[110]=vt,t[111]=L,t[112]=s?.tooltip,t[113]=et,t[114]=$t):$t=t[114];let Ot;t[115]!==o?.modal||t[116]!==T||t[117]!==G?(Ot=T&&G!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:T,data:G,setData:D,className:o?.modal}):null,t[115]=o?.modal,t[116]=T,t[117]=G,t[118]=Ot):Ot=t[118];let b;return t[119]!==At||t[120]!==$t||t[121]!==Ot?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Ot]}),t[119]=At,t[120]=$t,t[121]=Ot,t[122]=b):b=t[122],b}function Xe(e){return e.layer}function Ye(e){return e.position==="after"}function Ue(e){return e.layer}function We(e){return e.position==="before"}function Je(e){return e!==0}function Ke(e){return e!==0}function Qe(e,t){return`${t}`}function Ze(e){return`${e.id}`}function _e(e){const t=i.compilerRuntimeExports.c(131),{data:d,leftMargin:R,rightMargin:qt,topMargin:Tt,bottomMargin:yt,width:tt,height:ut,barColors:k,suffix:V,prefix:y,barPadding:I,showLabels:Vt,showValues:rt,showTicks:Dt,truncateBy:S,tooltip:et,onSeriesMouseOver:xt,refValues:mt,maxValue:It,minValue:w,onSeriesMouseClick:it,selectedColor:X,labelOrder:F,maxBarThickness:K,resetSelectionOnDoubleClick:Y,detailsOnClick:dt,barAxisTitle:T,valueColor:U,noOfTicks:P,styles:u,classNames:s,animate:o,colorDomain:x,precision:r,customLayers:p,naLabel:m}=e,j=R===void 0?20:R,Q=qt===void 0?20:qt,W=Tt===void 0?20:Tt,ct=yt===void 0?25:yt,Ft=B.useRef(null);let Gt;t[0]!==o.amount||t[1]!==o.once?(Gt={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Gt):Gt=t[2];const q=Ee.useInView(Ft,Gt),bt=T?j+30:j;let zt;t[3]!==ct||t[4]!==Q||t[5]!==bt||t[6]!==W?(zt={top:W,bottom:ct,left:bt,right:Q},t[3]=ct,t[4]=Q,t[5]=bt,t[6]=W,t[7]=zt):zt=t[7];const l=zt,[c,L]=B.useState(void 0),[h,G]=B.useState(void 0),[D,A]=B.useState(void 0),[Mt,vt]=B.useState(void 0),st=tt-l.left-l.right,pt=ut-l.top-l.bottom;let E,g,Z,_,J,C,ht,Et,nt,Ct,H,ot,z,ft;if(t[8]!==o||t[9]!==T||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]!==x||t[19]!==p||t[20]!==d||t[21]!==dt||t[22]!==pt||t[23]!==st||t[24]!==ut||t[25]!==q||t[26]!==F||t[27]!==j||t[28]!==l.bottom||t[29]!==l.left||t[30]!==l.right||t[31]!==l.top||t[32]!==K||t[33]!==It||t[34]!==w||t[35]!==h||t[36]!==m||t[37]!==P||t[38]!==it||t[39]!==xt||t[40]!==r||t[41]!==y||t[42]!==mt||t[43]!==Y||t[44]!==X||t[45]!==Vt||t[46]!==Dt||t[47]!==rt||t[48]!==u?.graphObjectValues||t[49]!==u?.xAxis?.axis||t[50]!==u?.xAxis?.labels||t[51]!==u?.yAxis?.gridLines||t[52]!==u?.yAxis?.labels||t[53]!==u?.yAxis?.title||t[54]!==V||t[55]!==S||t[56]!==U||t[57]!==tt){const b=Ce.linear().domain([w,It]).range([pt,0]).nice();let lt;t[72]!==F?(lt=(M,Rt)=>({...M,id:F?`${M.label}`:`${Rt}`}),t[72]=F,t[73]=lt):lt=t[73];const St=d.map(lt),Ht=F||St.map(li),$=fe.band().domain(Ht).range([0,K?Math.min(st,K*Ht.length):st]).paddingInner(I),Ut=fe.band().domain(d[0].size.map(ai)).range([0,$.bandwidth()]).paddingInner(.1),Lt=b.ticks(P);g=Zt.motion.svg,ht=`${tt}px`,Et=`${ut}px`,nt=`0 0 ${tt} ${ut}`,Ct="ltr",H=Ft,ft=`translate(${l.left},${l.top})`;const Kt=b(w<0?0:w),Nt=b(w<0?0:w),Qt=w<0?0:w;let Wt;t[74]!==m||t[75]!==r||t[76]!==y||t[77]!==V||t[78]!==Qt?(Wt=ue.numberFormattingFunction(Qt,m,r,y,V),t[74]=m,t[75]=r,t[76]=y,t[77]=V,t[78]=Qt,t[79]=Wt):Wt=t[79];const Pt=s?.xAxis?.axis,kt=s?.yAxis?.labels;let Yt;t[80]!==Pt||t[81]!==kt?(Yt={axis:Pt,label:kt},t[80]=Pt,t[81]=kt,t[82]=Yt):Yt=t[82];const Jt=u?.xAxis?.axis,N=u?.yAxis?.labels;let v;t[83]!==Jt||t[84]!==N?(v={axis:Jt,label:N},t[83]=Jt,t[84]=N,t[85]=v):v=t[85],Z=i.jsxRuntimeExports.jsx(Ae.Axis,{y1:Kt,y2:Nt,x1:0-j,x2:st+l.right,label:Wt,labelPos:{x:0-j,dx:0,dy:It<0?"1em":-5,y:b(w<0?0:w)},classNames:Yt,styles:v}),_=Dt?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:Lt.filter(oi),y:Lt.filter(ni).map(M=>b(M)),x1:0-j,x2:st+l.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:V,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:r}):null;const O=0-j-15,n=pt/2,f=u?.yAxis?.title,ee=s?.yAxis?.title;t[86]!==T||t[87]!==O||t[88]!==n||t[89]!==f||t[90]!==ee?(J=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:O,y:n,style:f,className:ee,text:T,rotate90:!0}),t[86]=T,t[87]=O,t[88]=n,t[89]=f,t[90]=ee,t[91]=J):J=t[91],t[92]!==p?(C=p.filter(si).map(ii),t[92]=p,t[93]=C):C=t[93],E=Re.AnimatePresence,ot=St.map(M=>_t.checkIfNullOrUndefined($(M.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:$(`${M.id}`),y:0},whileInView:{x:$(`${M.id}`),y:0,transition:{duration:o.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[M.size.map((Rt,a)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:X?k[a]===X?1:.3:.85,onMouseEnter:ie=>{L({...M,sizeIndex:a}),vt(ie.clientY),A(ie.clientX),xt?.({...M,sizeIndex:a})},onMouseMove:ie=>{L({...M,sizeIndex:a}),vt(ie.clientY),A(ie.clientX)},onMouseLeave:()=>{L(void 0),A(void 0),vt(void 0),xt?.(void 0)},onClick:()=>{(it||dt)&&(we.isEqual(h,{...M,sizeIndex:a})&&Y?(G(void 0),it?.(void 0)):(G({...M,sizeIndex:a}),it&&it({...M,sizeIndex:a})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:Ut(`${a}`),width:Ut.bandwidth(),variants:{initial:{height:0,y:b(0),fill:k[a]},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[a],transition:{duration:o.duration}}},exit:{height:0,y:b(0),transition:{duration:o.duration}},initial:"initial",animate:q?"whileInView":"initial"}),rt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:Ut(`${a}`)+Ut.bandwidth()/2,style:{textAnchor:"middle",...u?.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:U||k[a]},whileInView:{y:b(Rt||0),opacity:1,fill:U||k[a],transition:{duration:o.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(Rt,m,r,y,V)}):null]},`${M.label}-${x[a]||a}`)),Vt?i.jsxRuntimeExports.jsx(Te.XAxesLabels,{value:`${M.label}`.length<S?`${M.label}`:`${`${M.label}`.substring(0,S)}...`,y:b(0)+5,x:0,width:$.bandwidth(),height:l.bottom,style:u?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:q}):null]},M.label)),z=mt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:mt.map((M,Rt)=>i.jsxRuntimeExports.jsx(Oe.RefLineY,{text:M.text,color:M.color,y:b(M.value),x1:0-j,x2:st+l.right,classNames:M.classNames,styles:M.styles,animate:o,isInView:q},Rt))}):null,t[8]=o,t[9]=T,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]=x,t[19]=p,t[20]=d,t[21]=dt,t[22]=pt,t[23]=st,t[24]=ut,t[25]=q,t[26]=F,t[27]=j,t[28]=l.bottom,t[29]=l.left,t[30]=l.right,t[31]=l.top,t[32]=K,t[33]=It,t[34]=w,t[35]=h,t[36]=m,t[37]=P,t[38]=it,t[39]=xt,t[40]=r,t[41]=y,t[42]=mt,t[43]=Y,t[44]=X,t[45]=Vt,t[46]=Dt,t[47]=rt,t[48]=u?.graphObjectValues,t[49]=u?.xAxis?.axis,t[50]=u?.xAxis?.labels,t[51]=u?.yAxis?.gridLines,t[52]=u?.yAxis?.labels,t[53]=u?.yAxis?.title,t[54]=V,t[55]=S,t[56]=U,t[57]=tt,t[58]=E,t[59]=g,t[60]=Z,t[61]=_,t[62]=J,t[63]=C,t[64]=ht,t[65]=Et,t[66]=nt,t[67]=Ct,t[68]=H,t[69]=ot,t[70]=z,t[71]=ft}else E=t[58],g=t[59],Z=t[60],_=t[61],J=t[62],C=t[63],ht=t[64],Et=t[65],nt=t[66],Ct=t[67],H=t[68],ot=t[69],z=t[70],ft=t[71];let gt;t[94]!==E||t[95]!==ot||t[96]!==z?(gt=i.jsxRuntimeExports.jsxs(E,{children:[ot,z]}),t[94]=E,t[95]=ot,t[96]=z,t[97]=gt):gt=t[97];let wt;t[98]!==p?(wt=p.filter(ei).map(ti),t[98]=p,t[99]=wt):wt=t[99];let jt;t[100]!==Z||t[101]!==_||t[102]!==J||t[103]!==C||t[104]!==gt||t[105]!==wt||t[106]!==ft?(jt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[Z,_,J,C,gt,wt]}),t[100]=Z,t[101]=_,t[102]=J,t[103]=C,t[104]=gt,t[105]=wt,t[106]=ft,t[107]=jt):jt=t[107];let at;t[108]!==g||t[109]!==ht||t[110]!==Et||t[111]!==nt||t[112]!==Ct||t[113]!==H||t[114]!==jt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:Et,viewBox:nt,direction:Ct,ref:H,children:jt}),t[108]=g,t[109]=ht,t[110]=Et,t[111]=nt,t[112]=Ct,t[113]=H,t[114]=jt,t[115]=at):at=t[115];let At;t[116]!==s?.tooltip||t[117]!==D||t[118]!==Mt||t[119]!==c||t[120]!==u?.tooltip||t[121]!==et?(At=c&&et&&D&&Mt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:c,body:et,xPos:D,yPos:Mt,backgroundStyle:u?.tooltip,className:s?.tooltip}):null,t[116]=s?.tooltip,t[117]=D,t[118]=Mt,t[119]=c,t[120]=u?.tooltip,t[121]=et,t[122]=At):At=t[122];let $t;t[123]!==s?.modal||t[124]!==dt||t[125]!==h?($t=dt&&h!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:dt,data:h,setData:G,className:s?.modal}):null,t[123]=s?.modal,t[124]=dt,t[125]=h,t[126]=$t):$t=t[126];let Ot;return t[127]!==at||t[128]!==At||t[129]!==$t?(Ot=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[127]=at,t[128]=At,t[129]=$t,t[130]=Ot):Ot=t[130],Ot}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e.layer}function si(e){return e.position==="before"}function ni(e){return e!==0}function oi(e){return e!==0}function ai(e,t){return`${t}`}function li(e){return`${e.id}`}function ri(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,truncateBy:k,height:V,width:y,footNote:I,colorDomain:Vt,colorLegendTitle:rt,suffix:Dt,prefix:S,showValues:et,showColorScale:xt,padding:mt,backgroundColor:It,leftMargin:w,rightMargin:it,topMargin:X,bottomMargin:F,showLabels:K,relativeHeight:Y,tooltip:dt,onSeriesMouseOver:T,refValues:U,graphID:P,maxValue:u,minValue:s,onSeriesMouseClick:o,graphDownload:x,dataDownload:r,language:p,labelOrder:m,minHeight:j,theme:Q,maxBarThickness:W,ariaLabel:ct,resetSelectionOnDoubleClick:Ft,detailsOnClick:Gt,barAxisTitle:q,noOfTicks:bt,valueColor:zt,styles:l,classNames:c,filterNA:L,animate:h,precision:G,customLayers:D,timeline:A,naLabel:Mt,sortParameter:vt,sortData:st,orientation:pt}=e,E=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,g=tt===void 0?.25:tt,Z=ut===void 0?!0:ut,_=k===void 0?999:k,J=Dt===void 0?"":Dt,C=S===void 0?"":S,ht=et===void 0?!0:et,Et=xt===void 0?!0:xt,nt=It===void 0?!1:It,Ct=K===void 0?!0:K,H=x===void 0?!1:x,ot=r===void 0?!1:r,z=p===void 0?"en":p,ft=j===void 0?0:j,gt=Q===void 0?"light":Q,wt=Ft===void 0?!0:Ft,jt=bt===void 0?5:bt,at=L===void 0?!0:L,At=h===void 0?!1:h,$t=G===void 0?2:G;let Ot;t[0]!==D?(Ot=D===void 0?[]:D,t[0]=D,t[1]=Ot):Ot=t[1];const b=Ot,lt=A===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:A,St=Mt===void 0?"NA":Mt,$=(pt===void 0?"vertical":pt)==="horizontal"?He:_e,[Ut,Lt]=B.useState(0),[Kt,Nt]=B.useState(0),[Qt,Wt]=B.useState(lt.autoplay),Pt=qe.sort(Me.uniqBy(d,"date",!0).map(Xt=>me.parse(`${Xt}`,lt.dateFormat||"yyyy",new Date).getTime()),Ei),[kt,Yt]=B.useState(lt.autoplay?0:Pt.length-1),[Jt,N]=B.useState(void 0),v=B.useRef(null),O=B.useRef(null);let n,f;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{const Xt=new ResizeObserver(Bt=>{Lt(Bt[0].target.clientWidth||620),Nt(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]),B.useEffect(n,f),B.useEffect(()=>{const Xt=setInterval(()=>{Yt(Bt=>Bt<Pt.length-1?Bt+1:0)},(lt.speed||2)*1e3);return Qt||clearInterval(Xt),()=>clearInterval(Xt)},[Pt,Qt,lt.speed]);const ee=ye.getSliderMarks(Pt,kt,lt.showOnlyActiveDate,lt.dateFormat||"yyyy"),M=ve.GraphContainer,Rt=c?.graphContainer,a=l?.graphContainer;let ie;t[4]!==c?.description||t[5]!==c?.title||t[6]!==d||t[7]!==ot||t[8]!==yt||t[9]!==H||t[10]!==R||t[11]!==l?.description||t[12]!==l?.title||t[13]!==y?(ie=R||yt||H||ot?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:c?.title,description:c?.description},graphTitle:R,graphDescription:yt,width:y,graphDownload:H?O:void 0,dataDownload:ot?d.map(ki).filter(Oi).length>0?d.map($i).filter(Ai):d.filter(ji):null}):null,t[4]=c?.description,t[5]=c?.title,t[6]=d,t[7]=ot,t[8]=yt,t[9]=H,t[10]=R,t[11]=l?.description,t[12]=l?.title,t[13]=y,t[14]=ie):ie=t[14];const se=lt.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[kt],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(Pe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Et?i.jsxRuntimeExports.jsx(Fe.ColorLegendWithMouseOver,{width:y,colorDomain:Vt,colors:E,colorLegendTitle:rt,setSelectedColor:N,showNAColor:!1,className:c?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:v,children:Ut&&Kt?i.jsxRuntimeExports.jsx($,{data:vt!==void 0?vt==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,lt.dateFormat||"yyyy").filter(Xt=>lt.enabled?Xt.date===me.format(new Date(Pt[kt]),lt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(wi):Xt),bi,[st||"asc"]):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,lt.dateFormat||"yyyy").filter(Xt=>lt.enabled?Xt.date===me.format(new Date(Pt[kt]),lt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(yi):Xt),Xt=>_t.checkIfNullOrUndefined(Xt.size[vt])?-1/0:Xt.size[vt],[st||"asc"]):he.ensureCompleteDataForStackedBarChart(d,lt.dateFormat||"yyyy").filter(Xt=>at?!Xt.size.every(gi):Xt),barColors:E,width:Ut,height:Kt,suffix:J,prefix:C,showValues:ht,barPadding:g,showTicks:Z,leftMargin:w,rightMargin:it,topMargin:X,bottomMargin:F,truncateBy:_,showLabels:Ct,tooltip:dt,onSeriesMouseOver:T,refValues:U,maxValue:_t.checkIfNullOrUndefined(u)?Math.max(...d.map(hi))<0?0:Math.max(...d.map(di)):u,minValue:_t.checkIfNullOrUndefined(s)?Math.min(...d.map(xi))>=0?0:Math.min(...d.map(ci)):s,onSeriesMouseClick:o,selectedColor:Jt,labelOrder:m,rtl:z==="he"||z==="ar",maxBarThickness:W,resetSelectionOnDoubleClick:wt,detailsOnClick:Gt,barAxisTitle:q,noOfTicks:jt,valueColor:zt,styles:l,classNames:c,colorDomain:Vt,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]!==I||t[20]!==Tt||t[21]!==l?.footnote||t[22]!==l?.source||t[23]!==y?(ne=Tt||I?i.jsxRuntimeExports.jsx(Be.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:Tt,footNote:I,width:y}):null,t[17]=c?.footnote,t[18]=c?.source,t[19]=I,t[20]=Tt,t[21]=l?.footnote,t[22]=l?.source,t[23]=y,t[24]=ne):ne=t[24];let ae;return t[25]!==M||t[26]!==ct||t[27]!==nt||t[28]!==P||t[29]!==V||t[30]!==z||t[31]!==ft||t[32]!==mt||t[33]!==Y||t[34]!==Rt||t[35]!==a||t[36]!==ie||t[37]!==se||t[38]!==re||t[39]!==ne||t[40]!==gt||t[41]!==y?(ae=i.jsxRuntimeExports.jsxs(M,{className:Rt,style:a,id:P,ref:O,"aria-label":ct,backgroundColor:nt,theme:gt,language:z,minHeight:ft,width:y,height:V,relativeHeight:Y,padding:mt,children:[ie,se,re,ne]}),t[25]=M,t[26]=ct,t[27]=nt,t[28]=P,t[29]=V,t[30]=z,t[31]=ft,t[32]=mt,t[33]=Y,t[34]=Rt,t[35]=a,t[36]=ie,t[37]=se,t[38]=re,t[39]=ne,t[40]=gt,t[41]=y,t[42]=ae):ae=t[42],ae}function ci(e){return Math.min(...e.size.filter(ui))}function ui(e){return!_t.checkIfNullOrUndefined(e)}function xi(e){return Math.min(...e.size.filter(mi))}function mi(e){return!_t.checkIfNullOrUndefined(e)}function di(e){return Math.max(...e.size.filter(pi))}function pi(e){return!_t.checkIfNullOrUndefined(e)}function hi(e){return Math.max(...e.size.filter(fi))}function fi(e){return!_t.checkIfNullOrUndefined(e)}function gi(e){return e==null}function yi(e){return e==null}function bi(e){return oe.sum(e.size.filter(vi))}function vi(e){return!_t.checkIfNullOrUndefined(e)}function wi(e){return e==null}function ji(e){return e!==void 0}function Ai(e){return e!==void 0}function $i(e){return e.data}function Oi(e){return e!==void 0}function ki(e){return e.data}function Ei(e,t){return Ge.ascending(e,t)}function Ci(e){const t=i.compilerRuntimeExports.c(126),{data:d,barColor:R,suffix:qt,prefix:Tt,barPadding:yt,showValues:tt,showTicks:ut,truncateBy:k,width:V,height:y,colorDomain:I,topMargin:Vt,bottomMargin:rt,leftMargin:Dt,rightMargin:S,showLabels:et,tooltip:xt,onSeriesMouseOver:mt,refValues:It,selectedColor:w,highlightedDataPoints:it,maxValue:X,minValue:F,onSeriesMouseClick:K,labelOrder:Y,rtl:dt,maxBarThickness:T,minBarThickness:U,resetSelectionOnDoubleClick:P,detailsOnClick:u,barAxisTitle:s,valueColor:o,noOfTicks:x,styles:r,classNames:p,animate:m,dimmedOpacity:j,precision:Q,customLayers:W,naLabel:ct}=e,Ft=Vt===void 0?25:Vt,Gt=rt===void 0?10:rt,q=Dt===void 0?100:Dt,bt=S===void 0?40:S,zt=B.useRef(null);let l;t[0]!==m.amount||t[1]!==m.once?(l={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=l):l=t[2];const c=Ee.useInView(zt,l),[L,h]=B.useState(void 0),[G,D]=B.useState(void 0),[A,Mt]=B.useState(void 0),[vt,st]=B.useState(void 0),pt=s?Ft+25:Ft;let E;t[3]!==Gt||t[4]!==q||t[5]!==bt||t[6]!==pt?(E={top:pt,bottom:Gt,left:q,right:bt},t[3]=Gt,t[4]=q,t[5]=bt,t[6]=pt,t[7]=E):E=t[7];const g=E,Z=V-g.left-g.right,_=y-g.top-g.bottom;let J,C,ht,Et,nt,Ct,H,ot,z,ft,gt,wt,jt,at;if(t[8]!==m||t[9]!==s||t[10]!==R||t[11]!==yt||t[12]!==p?.graphObjectValues||t[13]!==p?.xAxis?.gridLines||t[14]!==p?.xAxis?.labels||t[15]!==p?.xAxis?.title||t[16]!==p?.yAxis?.axis||t[17]!==p?.yAxis?.labels||t[18]!==I||t[19]!==W||t[20]!==d||t[21]!==u||t[22]!==j||t[23]!==_||t[24]!==Z||t[25]!==y||t[26]!==it||t[27]!==c||t[28]!==Y||t[29]!==g.bottom||t[30]!==g.left||t[31]!==g.top||t[32]!==T||t[33]!==X||t[34]!==U||t[35]!==F||t[36]!==G||t[37]!==ct||t[38]!==x||t[39]!==K||t[40]!==mt||t[41]!==Q||t[42]!==Tt||t[43]!==It||t[44]!==P||t[45]!==dt||t[46]!==w||t[47]!==et||t[48]!==ut||t[49]!==tt||t[50]!==r?.graphObjectValues||t[51]!==r?.xAxis?.gridLines||t[52]!==r?.xAxis?.labels||t[53]!==r?.xAxis?.title||t[54]!==r?.yAxis?.axis||t[55]!==r?.yAxis?.labels||t[56]!==qt||t[57]!==Ft||t[58]!==k||t[59]!==o||t[60]!==V){let $;t[75]!==Y?($=(n,f)=>({...n,id:Y?`${n.label}`:`${f}`}),t[75]=Y,t[76]=$):$=t[76];const Ut=d.map($),Lt=Ce.linear().domain([F,X]).range([0,Z]).nice(),Kt=Y||Ut.map(Bi),Nt=fe.band().domain(Kt).range([0,U?Math.max(_,U*Kt.length):T?Math.min(_,T*Kt.length):_]).paddingInner(yt),Qt=Lt.ticks(x);C=Zt.motion.svg,H=zt,ot=`${V}px`,z=`${y}px`,ft=`0 0 ${V} ${y}`,gt="ltr",ht=`translate(${g.left},${g.top})`,Et=ut?i.jsxRuntimeExports.jsx(Ie.XTicksAndGridLines,{values:Qt.filter(zi),x:Qt.filter(Ti).map(n=>Lt(n)),y1:0-Ft,y2:_+g.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:p?.xAxis?.gridLines,labels:p?.xAxis?.labels},suffix:qt,prefix:Tt,labelType:"secondary",showGridLines:!0,precision:Q}):null;const Wt=Z/2,Pt=0-g.top+15,kt=r?.xAxis?.title,Yt=p?.xAxis?.title;t[77]!==s||t[78]!==Wt||t[79]!==Pt||t[80]!==kt||t[81]!==Yt?(nt=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:Wt,y:Pt,style:kt,className:Yt,text:s}),t[77]=s,t[78]=Wt,t[79]=Pt,t[80]=kt,t[81]=Yt,t[82]=nt):nt=t[82],t[83]!==W?(Ct=W.filter(Si).map(Ii),t[83]=W,t[84]=Ct):Ct=t[84],J=Re.AnimatePresence,wt=Ut.map(n=>_t.checkIfNullOrUndefined(Nt(n.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:w?n.color&&R[I.indexOf(n.color)]===w?1:j:it.length!==0?it.indexOf(n.label)!==-1?.85:j:.85},whileInView:{opacity:w?n.color&&R[I.indexOf(n.color)]===w?1:j:it.length!==0?it.indexOf(n.label)!==-1?.85:j:.85,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:f=>{h(n),st(f.clientY),Mt(f.clientX),mt?.(n)},onClick:()=>{(K||u)&&(we.isEqual(G,n)&&P?(D(void 0),K?.(void 0)):(D(n),K?.(n)))},onMouseMove:f=>{h(n),st(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{h(void 0),Mt(void 0),st(void 0),mt?.(void 0)},children:[n.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{variants:{initial:{width:0,x:Lt(0),y:Nt(`${n.id}`),fill:d.filter(Li).length===0?R[0]:n.color?R[I.indexOf(n.color)]:ce.Colors.gray},whileInView:{width:n.size>=0?Lt(n.size)-Lt(0):Lt(0)-Lt(n.size),x:n.size>=0?Lt(0):Lt(n.size),y:Nt(`${n.id}`),fill:d.filter(Di).length===0?R[0]:n.color?R[I.indexOf(n.color)]:ce.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{width:0,x:Lt(0),transition:{duration:m.duration}},height:Nt.bandwidth()}):null,et?i.jsxRuntimeExports.jsx(Le.YAxesLabels,{value:`${n.label}`.length<k?`${n.label}`:`${`${n.label}`.substring(0,k)}...`,y:Nt(n.id)||0,x:(n.size||0)<0?Lt(0):0-g.left,width:(n.size||0)<0?V-Lt(0):Lt(0)+g.left,height:Nt.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:r?.yAxis?.labels,className:p?.yAxis?.labels,animate:m,isInView:c}):null,tt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:n.size&&n.size<0?"end":"start",...r?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!o&&R.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",p?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",variants:{initial:{x:Lt(0),y:Nt(`${n.id}`)+Nt.bandwidth()/2,opacity:0,fill:o||(d.filter(Vi).length===0?R[0]:n.color?R[I.indexOf(n.color)]:ce.Colors.gray)},whileInView:{x:n.size?Lt(n.size):Lt(0),opacity:1,y:Nt(`${n.id}`)+Nt.bandwidth()/2,fill:o||(d.filter(Ni).length===0?R[0]:n.color?R[I.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,ct,Q,Tt,qt)}):null]},n.label));const Jt=p?.yAxis?.axis;let N;t[85]!==Jt?(N={axis:Jt},t[85]=Jt,t[86]=N):N=t[86];const v=r?.yAxis?.axis;let O;t[87]!==v?(O={axis:v},t[87]=v,t[88]=O):O=t[88],jt=i.jsxRuntimeExports.jsx(Ae.Axis,{x1:Lt(F<0?0:F),x2:Lt(F<0?0:F),y1:-2.5,y2:_+g.bottom,classNames:N,styles:O}),at=It?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:It.map((n,f)=>i.jsxRuntimeExports.jsx(Oe.RefLineX,{text:n.text,color:n.color,x:Lt(n.value),y1:0-g.top,y2:_+g.bottom,textSide:Lt(n.value)>Z*.75||dt?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:c},f))}):null,t[8]=m,t[9]=s,t[10]=R,t[11]=yt,t[12]=p?.graphObjectValues,t[13]=p?.xAxis?.gridLines,t[14]=p?.xAxis?.labels,t[15]=p?.xAxis?.title,t[16]=p?.yAxis?.axis,t[17]=p?.yAxis?.labels,t[18]=I,t[19]=W,t[20]=d,t[21]=u,t[22]=j,t[23]=_,t[24]=Z,t[25]=y,t[26]=it,t[27]=c,t[28]=Y,t[29]=g.bottom,t[30]=g.left,t[31]=g.top,t[32]=T,t[33]=X,t[34]=U,t[35]=F,t[36]=G,t[37]=ct,t[38]=x,t[39]=K,t[40]=mt,t[41]=Q,t[42]=Tt,t[43]=It,t[44]=P,t[45]=dt,t[46]=w,t[47]=et,t[48]=ut,t[49]=tt,t[50]=r?.graphObjectValues,t[51]=r?.xAxis?.gridLines,t[52]=r?.xAxis?.labels,t[53]=r?.xAxis?.title,t[54]=r?.yAxis?.axis,t[55]=r?.yAxis?.labels,t[56]=qt,t[57]=Ft,t[58]=k,t[59]=o,t[60]=V,t[61]=J,t[62]=C,t[63]=ht,t[64]=Et,t[65]=nt,t[66]=Ct,t[67]=H,t[68]=ot,t[69]=z,t[70]=ft,t[71]=gt,t[72]=wt,t[73]=jt,t[74]=at}else J=t[61],C=t[62],ht=t[63],Et=t[64],nt=t[65],Ct=t[66],H=t[67],ot=t[68],z=t[69],ft=t[70],gt=t[71],wt=t[72],jt=t[73],at=t[74];let At;t[89]!==J||t[90]!==wt||t[91]!==jt||t[92]!==at?(At=i.jsxRuntimeExports.jsxs(J,{children:[wt,jt,at]}),t[89]=J,t[90]=wt,t[91]=jt,t[92]=at,t[93]=At):At=t[93];let $t;t[94]!==W?($t=W.filter(Mi).map(Ri),t[94]=W,t[95]=$t):$t=t[95];let Ot;t[96]!==ht||t[97]!==Et||t[98]!==nt||t[99]!==Ct||t[100]!==At||t[101]!==$t?(Ot=i.jsxRuntimeExports.jsxs("g",{transform:ht,children:[Et,nt,Ct,At,$t]}),t[96]=ht,t[97]=Et,t[98]=nt,t[99]=Ct,t[100]=At,t[101]=$t,t[102]=Ot):Ot=t[102];let b;t[103]!==C||t[104]!==H||t[105]!==ot||t[106]!==z||t[107]!==ft||t[108]!==gt||t[109]!==Ot?(b=i.jsxRuntimeExports.jsx(C,{ref:H,width:ot,height:z,viewBox:ft,direction:gt,children:Ot}),t[103]=C,t[104]=H,t[105]=ot,t[106]=z,t[107]=ft,t[108]=gt,t[109]=Ot,t[110]=b):b=t[110];let lt;t[111]!==p?.tooltip||t[112]!==A||t[113]!==vt||t[114]!==L||t[115]!==r?.tooltip||t[116]!==xt?(lt=L&&xt&&A&&vt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:L,body:xt,xPos:A,yPos:vt,backgroundStyle:r?.tooltip,className:p?.tooltip}):null,t[111]=p?.tooltip,t[112]=A,t[113]=vt,t[114]=L,t[115]=r?.tooltip,t[116]=xt,t[117]=lt):lt=t[117];let St;t[118]!==p?.modal||t[119]!==u||t[120]!==G?(St=u&&G!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:u,data:G,setData:D,className:p?.modal}):null,t[118]=p?.modal,t[119]=u,t[120]=G,t[121]=St):St=t[121];let Ht;return t[122]!==b||t[123]!==lt||t[124]!==St?(Ht=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[b,lt,St]}),t[122]=b,t[123]=lt,t[124]=St,t[125]=Ht):Ht=t[125],Ht}function Ri(e){return e.layer}function Mi(e){return e.position==="after"}function Ni(e){return e.color}function Vi(e){return e.color}function Di(e){return e.color}function Li(e){return e.color}function Ii(e){return e.layer}function Si(e){return e.position==="before"}function Ti(e){return e!==0}function zi(e){return e!==0}function Bi(e){return`${e.id}`}function Fi(e){const t=i.compilerRuntimeExports.c(134),{leftMargin:d,rightMargin:R,topMargin:qt,bottomMargin:Tt,data:yt,width:tt,height:ut,barColor:k,suffix:V,prefix:y,barPadding:I,showLabels:Vt,showValues:rt,showTicks:Dt,colorDomain:S,truncateBy:et,tooltip:xt,onSeriesMouseOver:mt,refValues:It,selectedColor:w,maxValue:it,minValue:X,highlightedDataPoints:F,onSeriesMouseClick:K,labelOrder:Y,maxBarThickness:dt,minBarThickness:T,resetSelectionOnDoubleClick:U,detailsOnClick:P,barAxisTitle:u,valueColor:s,noOfTicks:o,styles:x,classNames:r,dimmedOpacity:p,animate:m,precision:j,customLayers:Q,naLabel:W}=e,ct=d===void 0?20:d,Ft=R===void 0?20:R,Gt=qt===void 0?20:qt,q=Tt===void 0?25:Tt,bt=B.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 l=Ee.useInView(bt,zt),c=u?ct+30:ct;let L;t[3]!==q||t[4]!==Ft||t[5]!==c||t[6]!==Gt?(L={top:Gt,bottom:q,left:c,right:Ft},t[3]=q,t[4]=Ft,t[5]=c,t[6]=Gt,t[7]=L):L=t[7];const h=L,[G,D]=B.useState(void 0),[A,Mt]=B.useState(void 0),[vt,st]=B.useState(void 0),[pt,E]=B.useState(void 0),g=tt-h.left-h.right,Z=ut-h.top-h.bottom;let _,J,C,ht,Et,nt,Ct,H,ot,z,ft,gt,wt,jt;if(t[8]!==m||t[9]!==u||t[10]!==k||t[11]!==I||t[12]!==r?.graphObjectValues||t[13]!==r?.xAxis?.axis||t[14]!==r?.xAxis?.labels||t[15]!==r?.yAxis?.gridLines||t[16]!==r?.yAxis?.labels||t[17]!==r?.yAxis?.title||t[18]!==S||t[19]!==Q||t[20]!==yt||t[21]!==P||t[22]!==p||t[23]!==Z||t[24]!==g||t[25]!==ut||t[26]!==F||t[27]!==l||t[28]!==Y||t[29]!==ct||t[30]!==h.bottom||t[31]!==h.left||t[32]!==h.right||t[33]!==h.top||t[34]!==dt||t[35]!==it||t[36]!==T||t[37]!==X||t[38]!==A||t[39]!==W||t[40]!==o||t[41]!==K||t[42]!==mt||t[43]!==j||t[44]!==y||t[45]!==It||t[46]!==U||t[47]!==w||t[48]!==Vt||t[49]!==Dt||t[50]!==rt||t[51]!==x?.graphObjectValues||t[52]!==x?.xAxis?.axis||t[53]!==x?.xAxis?.labels||t[54]!==x?.yAxis?.gridLines||t[55]!==x?.yAxis?.labels||t[56]!==x?.yAxis?.title||t[57]!==V||t[58]!==et||t[59]!==s||t[60]!==tt){const Ht=Ce.linear().domain([X,it]).range([Z,0]).nice();let $;t[75]!==Y?($=(a,ie)=>({...a,id:Y?`${a.label}`:`${ie}`}),t[75]=Y,t[76]=$):$=t[76];const Ut=yt.map($),Lt=Y||Ut.map(Qi),Kt=fe.band().domain(Lt).range([0,T?Math.max(g,T*Lt.length):dt?Math.min(g,dt*Lt.length):g]).paddingInner(I),Nt=Ht.ticks(o);J=Zt.motion.svg,Ct=bt,H=`${tt}px`,ot=`${ut}px`,z=`0 0 ${tt} ${ut}`,ft="ltr",jt=`translate(${h.left},${h.top})`;const Qt=Ht(X<0?0:X),Wt=Ht(X<0?0:X),Pt=X<0?0:X;let kt;t[77]!==W||t[78]!==j||t[79]!==y||t[80]!==V||t[81]!==Pt?(kt=ue.numberFormattingFunction(Pt,W,j,y,V),t[77]=W,t[78]=j,t[79]=y,t[80]=V,t[81]=Pt,t[82]=kt):kt=t[82];const Yt=r?.xAxis?.axis,Jt=r?.yAxis?.labels;let N;t[83]!==Yt||t[84]!==Jt?(N={axis:Yt,label:Jt},t[83]=Yt,t[84]=Jt,t[85]=N):N=t[85];const v=x?.xAxis?.axis,O=x?.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],C=i.jsxRuntimeExports.jsx(Ae.Axis,{y1:Qt,y2:Wt,x1:0-ct,x2:g+h.right,label:kt,labelPos:{x:0-ct,dx:0,dy:it<0?"1em":-5,y:Ht(X<0?0:X)},classNames:N,styles:n}),ht=Dt?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:Nt.filter(Ki),y:Nt.filter(Ji).map(a=>Ht(a)),x1:0-ct,x2:g+h.right,styles:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},classNames:{gridLines:r?.yAxis?.gridLines,labels:r?.yAxis?.labels},suffix:V,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:j}):null;const f=0-ct-15,ee=Z/2,M=x?.yAxis?.title,Rt=r?.yAxis?.title;t[89]!==u||t[90]!==f||t[91]!==ee||t[92]!==M||t[93]!==Rt?(Et=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:f,y:ee,style:M,className:Rt,text:u,rotate90:!0}),t[89]=u,t[90]=f,t[91]=ee,t[92]=M,t[93]=Rt,t[94]=Et):Et=t[94],t[95]!==Q?(nt=Q.filter(Wi).map(Ui),t[95]=Q,t[96]=nt):nt=t[96],_=Re.AnimatePresence,gt=Ut.map((a,ie)=>_t.checkIfNullOrUndefined(Kt(a.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:l?"whileInView":"initial",variants:{initial:{opacity:w?a.color&&k[S.indexOf(a.color)]===w?1:p:F.length!==0?F.indexOf(a.label)!==-1?.85:p:.85},whileInView:{opacity:w?a.color&&k[S.indexOf(a.color)]===w?1:p:F.length!==0?F.indexOf(a.label)!==-1?.85:p:.85,transition:{duration:m.duration}}},exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:se=>{D(a),E(se.clientY),st(se.clientX),mt?.(a)},onClick:()=>{(K||P)&&(we.isEqual(A,a)&&U?(Mt(void 0),K?.(void 0)):(Mt(a),K?.(a)))},onMouseMove:se=>{D(a),E(se.clientY),st(se.clientX)},onMouseLeave:()=>{D(void 0),st(void 0),E(void 0),mt?.(void 0)},children:[a.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{width:Kt.bandwidth(),initial:"initial",animate:l?"whileInView":"initial",variants:{initial:{height:0,x:Kt(`${a.id}`),y:Ht(0),fill:yt.filter(Yi).length===0?k[0]:a.color?k[S.indexOf(a.color)]:ce.Colors.gray},whileInView:{height:a.size?Math.abs(Ht(a.size)-Ht(0)):0,y:a.size&&a.size>0?Ht(a.size):Ht(0),x:Kt(`${a.id}`),fill:yt.filter(Xi).length===0?k[0]:a.color?k[S.indexOf(a.color)]:ce.Colors.gray,transition:{duration:m.duration}}},exit:{height:0,y:Ht(0),transition:{duration:m.duration}}}):null,Vt?i.jsxRuntimeExports.jsx(Te.XAxesLabels,{value:`${a.label}`.length<et?`${a.label}`:`${`${a.label}`.substring(0,et)}...`,y:(a.size||0)<0?0:Ht(0)+5,x:Kt(`${a.id}`),width:Kt.bandwidth(),height:(a.size||0)<0?Ht(0)-5:h.bottom,style:x?.xAxis?.labels,className:r?.xAxis?.labels,alignment:(a.size||0)<0?"bottom":"top",animate:m,isInView:l}):null,rt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...x?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!s&&k.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",r?.graphObjectValues),dy:a.size?a.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:Kt(`${a.id}`)+Kt.bandwidth()/2,y:Ht(0),opacity:0,fill:s||(yt.filter(Hi).length===0?k[0]:a.color?k[S.indexOf(a.color)]:ce.Colors.gray)},whileInView:{x:Kt(`${a.id}`)+Kt.bandwidth()/2,y:Ht(a.size||0),fill:s||(yt.filter(Gi).length===0?k[0]:a.color?k[S.indexOf(a.color)]:ce.Colors.gray),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:l?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(a.size,W,j,y,V)}):null]},a.label)),wt=It?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:It.map((a,ie)=>i.jsxRuntimeExports.jsx(Oe.RefLineY,{text:a.text,color:a.color,y:Ht(a.value),x1:0-ct,x2:g+h.right,classNames:a.classNames,styles:a.styles,animate:m,isInView:l},ie))}):null,t[8]=m,t[9]=u,t[10]=k,t[11]=I,t[12]=r?.graphObjectValues,t[13]=r?.xAxis?.axis,t[14]=r?.xAxis?.labels,t[15]=r?.yAxis?.gridLines,t[16]=r?.yAxis?.labels,t[17]=r?.yAxis?.title,t[18]=S,t[19]=Q,t[20]=yt,t[21]=P,t[22]=p,t[23]=Z,t[24]=g,t[25]=ut,t[26]=F,t[27]=l,t[28]=Y,t[29]=ct,t[30]=h.bottom,t[31]=h.left,t[32]=h.right,t[33]=h.top,t[34]=dt,t[35]=it,t[36]=T,t[37]=X,t[38]=A,t[39]=W,t[40]=o,t[41]=K,t[42]=mt,t[43]=j,t[44]=y,t[45]=It,t[46]=U,t[47]=w,t[48]=Vt,t[49]=Dt,t[50]=rt,t[51]=x?.graphObjectValues,t[52]=x?.xAxis?.axis,t[53]=x?.xAxis?.labels,t[54]=x?.yAxis?.gridLines,t[55]=x?.yAxis?.labels,t[56]=x?.yAxis?.title,t[57]=V,t[58]=et,t[59]=s,t[60]=tt,t[61]=_,t[62]=J,t[63]=C,t[64]=ht,t[65]=Et,t[66]=nt,t[67]=Ct,t[68]=H,t[69]=ot,t[70]=z,t[71]=ft,t[72]=gt,t[73]=wt,t[74]=jt}else _=t[61],J=t[62],C=t[63],ht=t[64],Et=t[65],nt=t[66],Ct=t[67],H=t[68],ot=t[69],z=t[70],ft=t[71],gt=t[72],wt=t[73],jt=t[74];let at;t[97]!==_||t[98]!==gt||t[99]!==wt?(at=i.jsxRuntimeExports.jsxs(_,{children:[gt,wt]}),t[97]=_,t[98]=gt,t[99]=wt,t[100]=at):at=t[100];let At;t[101]!==Q?(At=Q.filter(qi).map(Pi),t[101]=Q,t[102]=At):At=t[102];let $t;t[103]!==C||t[104]!==ht||t[105]!==Et||t[106]!==nt||t[107]!==at||t[108]!==At||t[109]!==jt?($t=i.jsxRuntimeExports.jsxs("g",{transform:jt,children:[C,ht,Et,nt,at,At]}),t[103]=C,t[104]=ht,t[105]=Et,t[106]=nt,t[107]=at,t[108]=At,t[109]=jt,t[110]=$t):$t=t[110];let Ot;t[111]!==J||t[112]!==Ct||t[113]!==H||t[114]!==ot||t[115]!==z||t[116]!==ft||t[117]!==$t?(Ot=i.jsxRuntimeExports.jsx(J,{ref:Ct,width:H,height:ot,viewBox:z,direction:ft,children:$t}),t[111]=J,t[112]=Ct,t[113]=H,t[114]=ot,t[115]=z,t[116]=ft,t[117]=$t,t[118]=Ot):Ot=t[118];let b;t[119]!==r?.tooltip||t[120]!==vt||t[121]!==pt||t[122]!==G||t[123]!==x?.tooltip||t[124]!==xt?(b=G&&xt&&vt&&pt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:G,body:xt,xPos:vt,yPos:pt,backgroundStyle:x?.tooltip,className:r?.tooltip}):null,t[119]=r?.tooltip,t[120]=vt,t[121]=pt,t[122]=G,t[123]=x?.tooltip,t[124]=xt,t[125]=b):b=t[125];let lt;t[126]!==r?.modal||t[127]!==P||t[128]!==A?(lt=P&&A!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:P,data:A,setData:Mt,className:r?.modal}):null,t[126]=r?.modal,t[127]=P,t[128]=A,t[129]=lt):lt=t[129];let St;return t[130]!==Ot||t[131]!==b||t[132]!==lt?(St=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Ot,b,lt]}),t[130]=Ot,t[131]=b,t[132]=lt,t[133]=St):St=t[133],St}function Pi(e){return e.layer}function qi(e){return e.position==="after"}function Gi(e){return e.color}function Hi(e){return e.color}function Xi(e){return e.color}function Yi(e){return e.color}function Ui(e){return e.layer}function Wi(e){return e.position==="before"}function Ji(e){return e!==0}function Ki(e){return e!==0}function Qi(e){return`${e.id}`}function Zi(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:R,colors:qt,suffix:Tt,sources:yt,prefix:tt,graphDescription:ut,barPadding:k,showValues:V,showTicks:y,truncateBy:I,height:Vt,width:rt,footNote:Dt,colorDomain:S,colorLegendTitle:et,highlightedDataPoints:xt,padding:mt,backgroundColor:It,topMargin:w,bottomMargin:it,leftMargin:X,rightMargin:F,showLabels:K,relativeHeight:Y,tooltip:dt,onSeriesMouseOver:T,refValues:U,showColorScale:P,graphID:u,maxValue:s,minValue:o,onSeriesMouseClick:x,graphDownload:r,dataDownload:p,sortData:m,labelOrder:j,language:Q,showNAColor:W,minHeight:ct,theme:Ft,maxBarThickness:Gt,maxNumberOfBars:q,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:l,detailsOnClick:c,barAxisTitle:L,noOfTicks:h,valueColor:G,styles:D,classNames:A,filterNA:Mt,animate:vt,dimmedOpacity:st,precision:pt,customLayers:E,timeline:g,naLabel:Z,orientation:_}=e,J=Tt===void 0?"":Tt,C=tt===void 0?"":tt,ht=k===void 0?.25:k,Et=V===void 0?!0:V,nt=y===void 0?!0:y,Ct=I===void 0?999:I;let H;t[0]!==xt?(H=xt===void 0?[]:xt,t[0]=xt,t[1]=H):H=t[1];const ot=H,z=It===void 0?!1:It,ft=K===void 0?!0:K,gt=P===void 0?!0:P,wt=r===void 0?!1:r,jt=p===void 0?!1:p,at=Q===void 0?"en":Q,At=W===void 0?!0:W,$t=ct===void 0?0:ct,Ot=Ft===void 0?"light":Ft,b=l===void 0?!0:l,lt=h===void 0?5:h,St=Mt===void 0?!0:Mt,Ht=vt===void 0?!1:vt,$=st===void 0?.3:st,Ut=pt===void 0?2:pt;let Lt;t[2]!==E?(Lt=E===void 0?[]:E,t[2]=E,t[3]=Lt):Lt=t[3];const Kt=Lt,Nt=g===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:g,Qt=Z===void 0?"NA":Z,Wt=_===void 0?"vertical":_,Pt=Wt==="horizontal"?Ci:Fi,[kt,Yt]=B.useState(0),[Jt,N]=B.useState(0),[v,O]=B.useState(Nt.autoplay),n=qe.sort(Me.uniqBy(d,"date",!0).map(te=>me.parse(`${te}`,Nt.dateFormat||"yyyy",new Date).getTime()),hs),[f,ee]=B.useState(Nt.autoplay?0:n.length-1),[M,Rt]=B.useState(void 0),a=B.useRef(null),ie=B.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),N(de[0].target.clientHeight||480)});return a.current&&te.observe(a.current),()=>te.disconnect()},xe=[],t[4]=se,t[5]=xe):(se=t[4],xe=t[5]),B.useEffect(se,xe),B.useEffect(()=>{const te=setInterval(()=>{ee(de=>de<n.length-1?de+1:0)},(Nt.speed||2)*1e3);return v||clearInterval(te),()=>clearInterval(te)},[n,v,Nt.speed]);const pe=ye.getSliderMarks(n,f,Nt.showOnlyActiveDate,Nt.dateFormat||"yyyy"),re=ve.GraphContainer,ne=A?.graphContainer,ae=D?.graphContainer;let Xt;t[6]!==A?.description||t[7]!==A?.title||t[8]!==d||t[9]!==jt||t[10]!==ut||t[11]!==wt||t[12]!==R||t[13]!==D?.description||t[14]!==D?.title||t[15]!==rt?(Xt=R||ut||wt||jt?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:A?.title,description:A?.description},graphTitle:R,graphDescription:ut,width:rt,graphDownload:wt?ie:void 0,dataDownload:jt?d.map(ps).filter(ds).length>0?d.map(ms).filter(xs):d.filter(us):null}):null,t[6]=A?.description,t[7]=A?.title,t[8]=d,t[9]=jt,t[10]=ut,t[11]=wt,t[12]=R,t[13]=D?.description,t[14]=D?.title,t[15]=rt,t[16]=Xt):Xt=t[16];const Bt=Nt.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,le=d.length===0?i.jsxRuntimeExports.jsx(Pe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[gt&&d.filter(cs).length!==0?i.jsxRuntimeExports.jsx(Fe.ColorLegendWithMouseOver,{width:rt,colorLegendTitle:et,colors:qt||ce.Colors[Ot].categoricalColors.colors,colorDomain:S||Me.uniqBy(d,"color",!0),setSelectedColor:Rt,showNAColor:At,className:A?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:a,children:kt&&Jt?i.jsxRuntimeExports.jsx(Pt,{data:m?Ne.orderBy(he.ensureCompleteDataForBarChart(d,Nt.dateFormat||"yyyy").filter(te=>Nt.enabled?te.date===me.format(new Date(n[f]),Nt.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)=>q?de<q:!0):he.ensureCompleteDataForBarChart(d,Nt.dateFormat||"yyyy").filter(te=>Nt.enabled?te.date===me.format(new Date(n[f]),Nt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te).filter((te,de)=>q?de<q:!0),barColor:d.filter(rs).length===0?qt?[qt]:[ce.Colors.primaryColors["blue-600"]]:qt||ce.Colors[Ot].categoricalColors.colors,colorDomain:d.filter(ls).length===0?[]:S||Me.uniqBy(d,"color",!0),selectedColor:M,width:kt,height:Jt,suffix:J,prefix:C,barPadding:ht,showValues:Et,showTicks:nt,leftMargin:X,rightMargin:F,topMargin:w,bottomMargin:it,truncateBy:Ct,showLabels:ft,tooltip:dt,onSeriesMouseOver:T,refValues:U,maxValue:_t.checkIfNullOrUndefined(s)?Math.max(...d.filter(as).map(os))<0?0:Math.max(...d.filter(ns).map(ss)):s,minValue:_t.checkIfNullOrUndefined(o)?Math.min(...d.filter(is).map(es))>=0?0:Math.min(...d.filter(ts).map(_i)):o,highlightedDataPoints:ot,onSeriesMouseClick:x,labelOrder:j,rtl:at==="he"||at==="ar",maxBarThickness:Gt,minBarThickness:bt,resetSelectionOnDoubleClick:b,detailsOnClick:c,barAxisTitle:L,noOfTicks:lt,valueColor:G,classNames:A,styles:D,animate:Ht===!0?{duration:.5,once:!0,amount:.5}:Ht||{duration:0,once:!0,amount:0},dimmedOpacity:$,precision:Ut,customLayers:Kt,naLabel:Qt}):null})]});let ge;t[17]!==A?.footnote||t[18]!==A?.source||t[19]!==Dt||t[20]!==yt||t[21]!==D?.footnote||t[22]!==D?.source||t[23]!==rt?(ge=yt||Dt?i.jsxRuntimeExports.jsx(Be.GraphFooter,{sources:yt,footNote:Dt,width:rt,styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:A?.footnote,source:A?.source}}):null,t[17]=A?.footnote,t[18]=A?.source,t[19]=Dt,t[20]=yt,t[21]=D?.footnote,t[22]=D?.source,t[23]=rt,t[24]=ge):ge=t[24];let Ve;return t[25]!==re||t[26]!==zt||t[27]!==z||t[28]!==u||t[29]!==Vt||t[30]!==at||t[31]!==$t||t[32]!==mt||t[33]!==Y||t[34]!==ne||t[35]!==ae||t[36]!==Xt||t[37]!==Bt||t[38]!==le||t[39]!==ge||t[40]!==Ot||t[41]!==rt?(Ve=i.jsxRuntimeExports.jsxs(re,{className:ne,style:ae,id:u,ref:ie,"aria-label":zt,backgroundColor:z,theme:Ot,language:at,minHeight:$t,width:rt,height:Vt,relativeHeight:Y,padding:mt,children:[Xt,Bt,le,ge]}),t[25]=re,t[26]=zt,t[27]=z,t[28]=u,t[29]=Vt,t[30]=at,t[31]=$t,t[32]=mt,t[33]=Y,t[34]=ne,t[35]=ae,t[36]=Xt,t[37]=Bt,t[38]=le,t[39]=ge,t[40]=Ot,t[41]=rt,t[42]=Ve):Ve=t[42],Ve}function _i(e){return e.size}function ts(e){return!_t.checkIfNullOrUndefined(e.size)}function es(e){return e.size}function is(e){return!_t.checkIfNullOrUndefined(e.size)}function ss(e){return e.size}function ns(e){return!_t.checkIfNullOrUndefined(e.size)}function os(e){return e.size}function as(e){return!_t.checkIfNullOrUndefined(e.size)}function ls(e){return e.color}function rs(e){return e.color}function cs(e){return e.color}function us(e){return e!==void 0}function xs(e){return e!==void 0}function ms(e){return e.data}function ds(e){return e!==void 0}function ps(e){return e.data}function hs(e,t){return Ge.ascending(e,t)}function fs(e){const t=i.compilerRuntimeExports.c(123),{data:d,barColors:R,barPadding:qt,showTicks:Tt,topMargin:yt,bottomMargin:tt,leftMargin:ut,rightMargin:k,truncateBy:V,width:y,height:I,tooltip:Vt,onSeriesMouseOver:rt,showLabels:Dt,suffix:S,prefix:et,showValues:xt,refValues:mt,maxValue:It,onSeriesMouseClick:w,selectedColor:it,rtl:X,labelOrder:F,maxBarThickness:K,minBarThickness:Y,resetSelectionOnDoubleClick:dt,detailsOnClick:T,barAxisTitle:U,valueColor:P,noOfTicks:u,styles:s,classNames:o,animate:x,colorDomain:r,precision:p,customLayers:m,naLabel:j}=e,Q=yt===void 0?25:yt,W=tt===void 0?10:tt,ct=ut===void 0?100:ut,Ft=k===void 0?40:k,Gt=B.useRef(null);let q;t[0]!==x.amount||t[1]!==x.once?(q={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=q):q=t[2];const bt=Ee.useInView(Gt,q),zt=U?Q+25:Q;let l;t[3]!==W||t[4]!==ct||t[5]!==Ft||t[6]!==zt?(l={top:zt,bottom:W,left:ct,right:Ft},t[3]=W,t[4]=ct,t[5]=Ft,t[6]=zt,t[7]=l):l=t[7];const c=l,[L,h]=B.useState(void 0),[G,D]=B.useState(void 0),[A,Mt]=B.useState(void 0),[vt,st]=B.useState(void 0),pt=y-c.left-c.right,E=I-c.top-c.bottom;let g,Z,_,J,C,ht,Et,nt,Ct,H,ot,z,ft,gt;if(t[8]!==x||t[9]!==U||t[10]!==R||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]!==r||t[19]!==m||t[20]!==d||t[21]!==T||t[22]!==E||t[23]!==pt||t[24]!==I||t[25]!==bt||t[26]!==F||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==K||t[31]!==It||t[32]!==Y||t[33]!==G||t[34]!==j||t[35]!==u||t[36]!==w||t[37]!==rt||t[38]!==p||t[39]!==et||t[40]!==mt||t[41]!==dt||t[42]!==X||t[43]!==it||t[44]!==Dt||t[45]!==Tt||t[46]!==xt||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]!==S||t[54]!==Q||t[55]!==V||t[56]!==P||t[57]!==y){let lt;t[72]!==F?(lt=(N,v)=>({...N,id:F?`${N.label}`:`${v}`}),t[72]=F,t[73]=lt):lt=t[73];const St=d.map(lt),Ht=F||St.map(Os),$=Ce.linear().domain([0,It]).range([0,pt]).nice(),Ut=fe.band().domain(Ht).range([0,Y?Math.max(E,Y*Ht.length):K?Math.min(E,K*Ht.length):E]).paddingInner(qt),Lt=$.ticks(u);Z=Zt.motion.svg,Et=Gt,nt=`${y}px`,Ct=`${I}px`,H=`0 0 ${y} ${I}`,ot="ltr",_=`translate(${c.left},${c.top})`,J=Tt?i.jsxRuntimeExports.jsx(Ie.XTicksAndGridLines,{values:Lt.filter($s),x:Lt.filter(As).map(N=>$(N)),y1:0-Q,y2:E+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:S,prefix:et,labelType:"secondary",showGridLines:!0,precision:p}):null;const Kt=pt/2,Nt=0-c.top+15,Qt=s?.xAxis?.title,Wt=o?.xAxis?.title;t[74]!==U||t[75]!==Kt||t[76]!==Nt||t[77]!==Qt||t[78]!==Wt?(C=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:Kt,y:Nt,style:Qt,className:Wt,text:U}),t[74]=U,t[75]=Kt,t[76]=Nt,t[77]=Qt,t[78]=Wt,t[79]=C):C=t[79],t[80]!==m?(ht=m.filter(js).map(ws),t[80]=m,t[81]=ht):ht=t[81],g=Re.AnimatePresence,z=St.map(N=>_t.checkIfNullOrUndefined(Ut(N.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:Ut(`${N.id}`)},whileInView:{x:0,y:Ut(`${N.id}`),transition:{duration:x.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},children:[N.size.map((v,O)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:it?R[O]===it?1:.3:1,onMouseEnter:n=>{h({...N,sizeIndex:O}),st(n.clientY),Mt(n.clientX),rt?.({...N,sizeIndex:O})},onMouseMove:n=>{h({...N,sizeIndex:O}),st(n.clientY),Mt(n.clientX)},onMouseLeave:()=>{h(void 0),Mt(void 0),st(void 0),rt?.(void 0)},onClick:()=>{(w||T)&&(we.isEqual(G,{...N,sizeIndex:O})&&dt?(D(void 0),w?.(void 0)):(D({...N,sizeIndex:O}),w&&w({...N,sizeIndex:O})))},children:[v?i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:0,style:{fill:R[O]},height:Ut.bandwidth(),exit:{width:0,x:$(0),transition:{duration:x.duration}},variants:{initial:{width:0,x:$(0),fill:R[O]},whileInView:{width:$(v||0),x:$(O===0?0:oe.sum(N.size.filter((n,f)=>f<O&&n))),fill:R[O],transition:{duration:x.duration}}},initial:"initial",animate:bt?"whileInView":"initial"},O):null,xt?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:x.duration}},variants:{initial:{x:$(0),opacity:0,fill:De.getTextColorBasedOnBgColor(R[O])},whileInView:{x:$(O===0?0:oe.sum(N.size.filter((n,f)=>f<O&&n)))+$(v||0)/2,opacity:v&&$(v)/ue.numberFormattingFunction(v,j,p,et,S).length>12?1:0,fill:De.getTextColorBasedOnBgColor(R[O]),transition:{duration:x.duration}}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(v,j,p,et,S)}):null]},`${N.label}-${r[O]||O}`)),Dt?i.jsxRuntimeExports.jsx(Le.YAxesLabels,{value:`${N.label}`.length<V?`${N.label}`:`${`${N.label}`.substring(0,V)}...`,y:0,x:0-c.left,width:0+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:x,isInView:bt}):null,xt?i.jsxRuntimeExports.jsx(Zt.motion.text,{className:i.mo("graph-value graph-value-total text-sm",P?"":" fill-primary-gray-700 dark:fill-primary-gray-300",o?.graphObjectValues),style:{...P?{fill:P}:{},textAnchor:"start",...s?.graphObjectValues||{}},y:Ut.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:$(0),opacity:0,...P?{fill:P}:{}},whileInView:{x:$(oe.sum(N.size.map(vs))),opacity:1,...P?{fill:P}:{},transition:{duration:x.duration}}},exit:{opacity:0,transition:{duration:x.duration}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(N.size.filter(bs)),j,p,et,S)}):null]},N.label));const Pt=o?.yAxis?.axis;let kt;t[82]!==Pt?(kt={axis:Pt},t[82]=Pt,t[83]=kt):kt=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(Ae.Axis,{x1:$(0),x2:$(0),y1:-2.5,y2:E+c.bottom,classNames:kt,styles:Jt}),gt=mt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:mt.map((N,v)=>i.jsxRuntimeExports.jsx(Oe.RefLineX,{text:N.text,color:N.color,x:$(N.value),y1:0-c.top,y2:E+c.bottom,textSide:$(N.value)>pt*.75||X?"left":"right",classNames:N.classNames,styles:N.styles,animate:x,isInView:bt},v))}):null,t[8]=x,t[9]=U,t[10]=R,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]=r,t[19]=m,t[20]=d,t[21]=T,t[22]=E,t[23]=pt,t[24]=I,t[25]=bt,t[26]=F,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=K,t[31]=It,t[32]=Y,t[33]=G,t[34]=j,t[35]=u,t[36]=w,t[37]=rt,t[38]=p,t[39]=et,t[40]=mt,t[41]=dt,t[42]=X,t[43]=it,t[44]=Dt,t[45]=Tt,t[46]=xt,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]=S,t[54]=Q,t[55]=V,t[56]=P,t[57]=y,t[58]=g,t[59]=Z,t[60]=_,t[61]=J,t[62]=C,t[63]=ht,t[64]=Et,t[65]=nt,t[66]=Ct,t[67]=H,t[68]=ot,t[69]=z,t[70]=ft,t[71]=gt}else g=t[58],Z=t[59],_=t[60],J=t[61],C=t[62],ht=t[63],Et=t[64],nt=t[65],Ct=t[66],H=t[67],ot=t[68],z=t[69],ft=t[70],gt=t[71];let wt;t[86]!==g||t[87]!==z||t[88]!==ft||t[89]!==gt?(wt=i.jsxRuntimeExports.jsxs(g,{children:[z,ft,gt]}),t[86]=g,t[87]=z,t[88]=ft,t[89]=gt,t[90]=wt):wt=t[90];let jt;t[91]!==m?(jt=m.filter(ys).map(gs),t[91]=m,t[92]=jt):jt=t[92];let at;t[93]!==_||t[94]!==J||t[95]!==C||t[96]!==ht||t[97]!==wt||t[98]!==jt?(at=i.jsxRuntimeExports.jsxs("g",{transform:_,children:[J,C,ht,wt,jt]}),t[93]=_,t[94]=J,t[95]=C,t[96]=ht,t[97]=wt,t[98]=jt,t[99]=at):at=t[99];let At;t[100]!==Z||t[101]!==Et||t[102]!==nt||t[103]!==Ct||t[104]!==H||t[105]!==ot||t[106]!==at?(At=i.jsxRuntimeExports.jsx(Z,{ref:Et,width:nt,height:Ct,viewBox:H,direction:ot,children:at}),t[100]=Z,t[101]=Et,t[102]=nt,t[103]=Ct,t[104]=H,t[105]=ot,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==A||t[110]!==vt||t[111]!==L||t[112]!==s?.tooltip||t[113]!==Vt?($t=L&&Vt&&A&&vt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:L,body:Vt,xPos:A,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=A,t[110]=vt,t[111]=L,t[112]=s?.tooltip,t[113]=Vt,t[114]=$t):$t=t[114];let Ot;t[115]!==o?.modal||t[116]!==T||t[117]!==G?(Ot=T&&G!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:T,data:G,setData:D,className:o?.modal}):null,t[115]=o?.modal,t[116]=T,t[117]=G,t[118]=Ot):Ot=t[118];let b;return t[119]!==At||t[120]!==$t||t[121]!==Ot?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Ot]}),t[119]=At,t[120]=$t,t[121]=Ot,t[122]=b):b=t[122],b}function gs(e){return e.layer}function ys(e){return e.position==="after"}function bs(e){return e}function vs(e){return e||0}function ws(e){return e.layer}function js(e){return e.position==="before"}function As(e){return e!==0}function $s(e){return e!==0}function Os(e){return`${e.id}`}function ks(e){const t=i.compilerRuntimeExports.c(130),{data:d,leftMargin:R,rightMargin:qt,topMargin:Tt,bottomMargin:yt,width:tt,height:ut,barColors:k,barPadding:V,showLabels:y,showTicks:I,truncateBy:Vt,tooltip:rt,onSeriesMouseOver:Dt,suffix:S,prefix:et,showValues:xt,refValues:mt,maxValue:It,onSeriesMouseClick:w,selectedColor:it,labelOrder:X,maxBarThickness:F,minBarThickness:K,resetSelectionOnDoubleClick:Y,detailsOnClick:dt,barAxisTitle:T,valueColor:U,noOfTicks:P,styles:u,classNames:s,animate:o,colorDomain:x,precision:r,customLayers:p,naLabel:m}=e,j=R===void 0?20:R,Q=qt===void 0?20:qt,W=Tt===void 0?20:Tt,ct=yt===void 0?25:yt,Ft=B.useRef(null);let Gt;t[0]!==o.amount||t[1]!==o.once?(Gt={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Gt):Gt=t[2];const q=Ee.useInView(Ft,Gt),bt=T?j+30:j;let zt;t[3]!==ct||t[4]!==Q||t[5]!==bt||t[6]!==W?(zt={top:W,bottom:ct,left:bt,right:Q},t[3]=ct,t[4]=Q,t[5]=bt,t[6]=W,t[7]=zt):zt=t[7];const l=zt,[c,L]=B.useState(void 0),[h,G]=B.useState(void 0),[D,A]=B.useState(void 0),[Mt,vt]=B.useState(void 0),st=tt-l.left-l.right,pt=ut-l.top-l.bottom;let E,g,Z,_,J,C,ht,Et,nt,Ct,H,ot,z,ft;if(t[8]!==o||t[9]!==T||t[10]!==k||t[11]!==V||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]!==x||t[19]!==p||t[20]!==d||t[21]!==dt||t[22]!==pt||t[23]!==st||t[24]!==ut||t[25]!==q||t[26]!==X||t[27]!==j||t[28]!==l.bottom||t[29]!==l.left||t[30]!==l.right||t[31]!==l.top||t[32]!==F||t[33]!==It||t[34]!==K||t[35]!==h||t[36]!==m||t[37]!==P||t[38]!==w||t[39]!==Dt||t[40]!==r||t[41]!==et||t[42]!==mt||t[43]!==Y||t[44]!==it||t[45]!==y||t[46]!==I||t[47]!==xt||t[48]!==u?.graphObjectValues||t[49]!==u?.xAxis?.axis||t[50]!==u?.xAxis?.labels||t[51]!==u?.yAxis?.gridLines||t[52]!==u?.yAxis?.labels||t[53]!==u?.yAxis?.title||t[54]!==S||t[55]!==Vt||t[56]!==U||t[57]!==tt){const b=Ce.linear().domain([0,It]).range([pt,0]).nice();let lt;t[72]!==X?(lt=(f,ee)=>({...f,id:X?`${f.label}`:`${ee}`}),t[72]=X,t[73]=lt):lt=t[73];const St=d.map(lt),Ht=X||St.map(Is),$=fe.band().domain(Ht).range([0,K?Math.max(st,K*Ht.length):F?Math.min(st,F*Ht.length):st]).paddingInner(V),Ut=b.ticks(P);g=Zt.motion.svg,ht=`${tt}px`,Et=`${ut}px`,nt=`0 0 ${tt} ${ut}`,Ct="ltr",H=Ft,ft=`translate(${l.left},${l.top})`;const Lt=b(0),Kt=b(0);let Nt;t[74]!==m||t[75]!==r||t[76]!==et||t[77]!==S?(Nt=ue.numberFormattingFunction(0,m,r,et,S),t[74]=m,t[75]=r,t[76]=et,t[77]=S,t[78]=Nt):Nt=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 kt=u?.xAxis?.axis,Yt=u?.yAxis?.labels;let Jt;t[82]!==kt||t[83]!==Yt?(Jt={axis:kt,label:Yt},t[82]=kt,t[83]=Yt,t[84]=Jt):Jt=t[84],Z=i.jsxRuntimeExports.jsx(Ae.Axis,{y1:Lt,y2:Kt,x1:0-j,x2:st+l.right,label:Nt,labelPos:{x:0-j,y:b(0),dx:0,dy:-5},classNames:Pt,styles:Jt}),_=I?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:Ut.filter(Ls),y:Ut.filter(Ds).map(f=>b(f)),x1:0-j,x2:st+l.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:S,prefix:et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:r}):null;const N=0-j-15,v=pt/2,O=u?.yAxis?.title,n=s?.yAxis?.title;t[85]!==T||t[86]!==N||t[87]!==v||t[88]!==O||t[89]!==n?(J=i.jsxRuntimeExports.jsx($e.AxisTitle,{x:N,y:v,style:O,className:n,text:T,rotate90:!0}),t[85]=T,t[86]=N,t[87]=v,t[88]=O,t[89]=n,t[90]=J):J=t[90],t[91]!==p?(C=p.filter(Vs).map(Ns),t[91]=p,t[92]=C):C=t[92],E=Re.AnimatePresence,ot=St.map(f=>_t.checkIfNullOrUndefined($(f.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:$(`${f.id}`),y:0},whileInView:{x:$(`${f.id}`),y:0,transition:{duration:o.duration}}},transition:{duration:o.duration},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[f.size.map((ee,M)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:it?k[M]===it?1:.3:1,onMouseEnter:Rt=>{L({...f,sizeIndex:M}),vt(Rt.clientY),A(Rt.clientX),Dt?.({...f,sizeIndex:M})},onMouseMove:Rt=>{L({...f,sizeIndex:M}),vt(Rt.clientY),A(Rt.clientX)},onMouseLeave:()=>{L(void 0),A(void 0),vt(void 0),Dt?.(void 0)},onClick:()=>{(w||dt)&&(we.isEqual(h,{...f,sizeIndex:M})&&Y?(G(void 0),w?.(void 0)):(G({...f,sizeIndex:M}),w&&w({...f,sizeIndex:M})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:0,width:$.bandwidth(),variants:{initial:{height:0,fill:k[M],y:b(0)},whileInView:{height:Math.abs(b(oe.sum(f.size.filter((Rt,a)=>a<=M&&Rt)))-b(oe.sum(f.size.filter((Rt,a)=>a<M&&Rt)))),y:b(oe.sum(f.size.filter((Rt,a)=>a<=M&&Rt))),fill:k[M],transition:{duration:o.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{height:0,y:b(0),transition:{duration:o.duration}}}),xt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:$.bandwidth()/2,style:{textAnchor:"middle",...u?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:"0.33em",variants:{initial:{y:b(0),opacity:0,fill:De.getTextColorBasedOnBgColor(k[M])},whileInView:{y:b(oe.sum(f.size.filter((Rt,a)=>a<=M&&Rt)))+Math.abs(b(oe.sum(f.size.filter((Rt,a)=>a<=M&&Rt)))-b(oe.sum(f.size.filter((Rt,a)=>a<M&&Rt))))/2,opacity:ee&&Math.abs(b(oe.sum(f.size.filter((Rt,a)=>a<=M&&Rt)))-b(oe.sum(f.size.filter((Rt,a)=>a<M&&Rt))))>20?1:0,fill:De.getTextColorBasedOnBgColor(k[M]),transition:{duration:o.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(ee,m,r,et,S)}):null]},`${f.label}-${x[M]||M}`)),y?i.jsxRuntimeExports.jsx(Te.XAxesLabels,{value:`${f.label}`.length<Vt?`${f.label}`:`${`${f.label}`.substring(0,Vt)}...`,y:b(0)+5,x:0,width:$.bandwidth(),height:l.bottom,style:u?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:q}):null,xt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...u?.graphObjectValues||{}},x:$.bandwidth()/2,dy:-10,className:i.mo("graph-value graph-value-total",U?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",s?.graphObjectValues),variants:{initial:{y:b(0),opacity:0,...U&&{fill:U}},whileInView:{y:b(oe.sum(f.size.map(Ms))),opacity:1,...U&&{fill:U},transition:{duration:o.duration}}},exit:{opacity:0,transition:{duration:o.duration}},initial:"initial",animate:q?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(f.size.filter(Rs)),m,r,et,S)}):null]},f.label)),z=mt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:mt.map((f,ee)=>i.jsxRuntimeExports.jsx(Oe.RefLineY,{text:f.text,color:f.color,y:b(f.value),x1:0-j,x2:st+l.right,classNames:f.classNames,styles:f.styles,animate:o,isInView:q},ee))}):null,t[8]=o,t[9]=T,t[10]=k,t[11]=V,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]=x,t[19]=p,t[20]=d,t[21]=dt,t[22]=pt,t[23]=st,t[24]=ut,t[25]=q,t[26]=X,t[27]=j,t[28]=l.bottom,t[29]=l.left,t[30]=l.right,t[31]=l.top,t[32]=F,t[33]=It,t[34]=K,t[35]=h,t[36]=m,t[37]=P,t[38]=w,t[39]=Dt,t[40]=r,t[41]=et,t[42]=mt,t[43]=Y,t[44]=it,t[45]=y,t[46]=I,t[47]=xt,t[48]=u?.graphObjectValues,t[49]=u?.xAxis?.axis,t[50]=u?.xAxis?.labels,t[51]=u?.yAxis?.gridLines,t[52]=u?.yAxis?.labels,t[53]=u?.yAxis?.title,t[54]=S,t[55]=Vt,t[56]=U,t[57]=tt,t[58]=E,t[59]=g,t[60]=Z,t[61]=_,t[62]=J,t[63]=C,t[64]=ht,t[65]=Et,t[66]=nt,t[67]=Ct,t[68]=H,t[69]=ot,t[70]=z,t[71]=ft}else E=t[58],g=t[59],Z=t[60],_=t[61],J=t[62],C=t[63],ht=t[64],Et=t[65],nt=t[66],Ct=t[67],H=t[68],ot=t[69],z=t[70],ft=t[71];let gt;t[93]!==E||t[94]!==ot||t[95]!==z?(gt=i.jsxRuntimeExports.jsxs(E,{children:[ot,z]}),t[93]=E,t[94]=ot,t[95]=z,t[96]=gt):gt=t[96];let wt;t[97]!==p?(wt=p.filter(Cs).map(Es),t[97]=p,t[98]=wt):wt=t[98];let jt;t[99]!==Z||t[100]!==_||t[101]!==J||t[102]!==C||t[103]!==gt||t[104]!==wt||t[105]!==ft?(jt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[Z,_,J,C,gt,wt]}),t[99]=Z,t[100]=_,t[101]=J,t[102]=C,t[103]=gt,t[104]=wt,t[105]=ft,t[106]=jt):jt=t[106];let at;t[107]!==g||t[108]!==ht||t[109]!==Et||t[110]!==nt||t[111]!==Ct||t[112]!==H||t[113]!==jt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:Et,viewBox:nt,direction:Ct,ref:H,children:jt}),t[107]=g,t[108]=ht,t[109]=Et,t[110]=nt,t[111]=Ct,t[112]=H,t[113]=jt,t[114]=at):at=t[114];let At;t[115]!==s?.tooltip||t[116]!==D||t[117]!==Mt||t[118]!==c||t[119]!==u?.tooltip||t[120]!==rt?(At=c&&rt&&D&&Mt?i.jsxRuntimeExports.jsx(je.Tooltip,{data:c,body:rt,xPos:D,yPos:Mt,backgroundStyle:u?.tooltip,className:s?.tooltip}):null,t[115]=s?.tooltip,t[116]=D,t[117]=Mt,t[118]=c,t[119]=u?.tooltip,t[120]=rt,t[121]=At):At=t[121];let $t;t[122]!==s?.modal||t[123]!==dt||t[124]!==h?($t=dt&&h!==void 0?i.jsxRuntimeExports.jsx(ke.DetailsModal,{body:dt,data:h,setData:G,className:s?.modal}):null,t[122]=s?.modal,t[123]=dt,t[124]=h,t[125]=$t):$t=t[125];let Ot;return t[126]!==at||t[127]!==At||t[128]!==$t?(Ot=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[126]=at,t[127]=At,t[128]=$t,t[129]=Ot):Ot=t[129],Ot}function Es(e){return e.layer}function Cs(e){return e.position==="after"}function Rs(e){return e}function Ms(e){return e||0}function Ns(e){return e.layer}function Vs(e){return e.position==="before"}function Ds(e){return e!==0}function Ls(e){return e!==0}function Is(e){return`${e.id}`}function Ss(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,truncateBy:k,height:V,width:y,footNote:I,colorDomain:Vt,colorLegendTitle:rt,padding:Dt,backgroundColor:S,topMargin:et,bottomMargin:xt,leftMargin:mt,rightMargin:It,tooltip:w,onSeriesMouseOver:it,suffix:X,prefix:F,showLabels:K,relativeHeight:Y,showValues:dt,refValues:T,graphID:U,maxValue:P,onSeriesMouseClick:u,graphDownload:s,dataDownload:o,language:x,labelOrder:r,minHeight:p,theme:m,maxBarThickness:j,sortParameter:Q,maxNumberOfBars:W,minBarThickness:ct,showColorScale:Ft,ariaLabel:Gt,resetSelectionOnDoubleClick:q,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:l,valueColor:c,styles:L,classNames:h,filterNA:G,animate:D,precision:A,customLayers:Mt,timeline:vt,naLabel:st,sortData:pt,orientation:E}=e,g=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,Z=tt===void 0?.25:tt,_=ut===void 0?!0:ut,J=k===void 0?999:k,C=S===void 0?!1:S,ht=X===void 0?"":X,Et=F===void 0?"":F,nt=K===void 0?!0:K,Ct=dt===void 0?!0:dt,H=s===void 0?!1:s,ot=o===void 0?!1:o,z=x===void 0?"en":x,ft=p===void 0?0:p,gt=m===void 0?"light":m,wt=Ft===void 0?!0:Ft,jt=q===void 0?!0:q,at=l===void 0?5:l,At=G===void 0?!0:G,$t=D===void 0?!1:D,Ot=A===void 0?2:A;let b;t[0]!==Mt?(b=Mt===void 0?[]:Mt,t[0]=Mt,t[1]=b):b=t[1];const lt=b,St=vt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:vt,Ht=st===void 0?"NA":st,Ut=(E===void 0?"vertical":E)==="horizontal"?fs:ks,[Lt,Kt]=B.useState(0),[Nt,Qt]=B.useState(0),[Wt,Pt]=B.useState(St.autoplay),kt=qe.sort(Me.uniqBy(d,"date",!0).map(Bt=>me.parse(`${Bt}`,St.dateFormat||"yyyy",new Date).getTime()),Js),[Yt,Jt]=B.useState(St.autoplay?0:kt.length-1),[N,v]=B.useState(void 0),O=B.useRef(null),n=B.useRef(null);let f,ee;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{const Bt=new ResizeObserver(le=>{Kt(le[0].target.clientWidth||620),Qt(le[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]),B.useEffect(f,ee),B.useEffect(()=>{const Bt=setInterval(()=>{Jt(le=>le<kt.length-1?le+1:0)},(St.speed||2)*1e3);return Wt||clearInterval(Bt),()=>clearInterval(Bt)},[kt,Wt,St.speed]);const M=ye.getSliderMarks(kt,Yt,St.showOnlyActiveDate,St.dateFormat||"yyyy"),Rt=ve.GraphContainer,a=h?.graphContainer,ie=L?.graphContainer;let se;t[4]!==h?.description||t[5]!==h?.title||t[6]!==d||t[7]!==ot||t[8]!==yt||t[9]!==H||t[10]!==R||t[11]!==L?.description||t[12]!==L?.title||t[13]!==y?(se=R||yt||H||ot?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:L?.title,description:L?.description},classNames:{title:h?.title,description:h?.description},graphTitle:R,graphDescription:yt,width:y,graphDownload:H?n:void 0,dataDownload:ot?d.map(Ws).filter(Us).length>0?d.map(Ys).filter(Xs):d.filter(Hs):null}):null,t[4]=h?.description,t[5]=h?.title,t[6]=d,t[7]=ot,t[8]=yt,t[9]=H,t[10]=R,t[11]=L?.description,t[12]=L?.title,t[13]=y,t[14]=se):se=t[14];const xe=St.enabled&&kt.length>0&&M?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:kt[0],max:kt[kt.length-1],marks:M,step:null,defaultValue:kt[kt.length-1],value:kt[Yt],onChangeComplete:Bt=>{Jt(kt.indexOf(Bt))},onChange:Bt=>{Jt(kt.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(Pe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[wt?i.jsxRuntimeExports.jsx(Fe.ColorLegendWithMouseOver,{width:y,colorDomain:Vt,colors:g,colorLegendTitle:rt,setSelectedColor:v,showNAColor:!1,className:h?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:O,children:Lt&&Nt?i.jsxRuntimeExports.jsx(Ut,{data:Q!==void 0?Q==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Gs):Bt),Ps,[pt||"asc"]).filter((Bt,le)=>W?le<W:!0):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Fs):Bt),Bt=>_t.checkIfNullOrUndefined(Bt.size[Q])?-1/0:Bt.size[Q],[pt||"asc"]).filter((Bt,le)=>W?le<W:!0):he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Bs):Bt).filter((Bt,le)=>W?le<W:!0),barColors:g,width:Lt,height:Nt,barPadding:Z,showTicks:_,leftMargin:mt,rightMargin:It,topMargin:et,bottomMargin:xt,truncateBy:J,showLabels:nt,tooltip:w,onSeriesMouseOver:it,showValues:Ct,suffix:ht,prefix:Et,refValues:T,maxValue:_t.checkIfNullOrUndefined(P)?Math.max(...d.map(Ts)):P,onSeriesMouseClick:u,selectedColor:N,rtl:z==="he"||z==="ar",labelOrder:r,maxBarThickness:j,minBarThickness:ct,resetSelectionOnDoubleClick:jt,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:at,valueColor:c,classNames:h,styles:L,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},colorDomain:Vt,precision:Ot,customLayers:lt,naLabel:Ht}):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 ae;t[17]!==h?.footnote||t[18]!==h?.source||t[19]!==I||t[20]!==Tt||t[21]!==L?.footnote||t[22]!==L?.source||t[23]!==y?(ae=Tt||I?i.jsxRuntimeExports.jsx(Be.GraphFooter,{styles:{footnote:L?.footnote,source:L?.source},classNames:{footnote:h?.footnote,source:h?.source},sources:Tt,footNote:I,width:y}):null,t[17]=h?.footnote,t[18]=h?.source,t[19]=I,t[20]=Tt,t[21]=L?.footnote,t[22]=L?.source,t[23]=y,t[24]=ae):ae=t[24];let Xt;return t[25]!==Rt||t[26]!==Gt||t[27]!==C||t[28]!==U||t[29]!==V||t[30]!==z||t[31]!==ft||t[32]!==Dt||t[33]!==Y||t[34]!==a||t[35]!==ie||t[36]!==se||t[37]!==xe||t[38]!==ne||t[39]!==ae||t[40]!==gt||t[41]!==y?(Xt=i.jsxRuntimeExports.jsxs(Rt,{className:a,style:ie,id:U,ref:n,"aria-label":Gt,backgroundColor:C,theme:gt,language:z,minHeight:ft,width:y,height:V,relativeHeight:Y,padding:Dt,children:[se,xe,ne,ae]}),t[25]=Rt,t[26]=Gt,t[27]=C,t[28]=U,t[29]=V,t[30]=z,t[31]=ft,t[32]=Dt,t[33]=Y,t[34]=a,t[35]=ie,t[36]=se,t[37]=xe,t[38]=ne,t[39]=ae,t[40]=gt,t[41]=y,t[42]=Xt):Xt=t[42],Xt}function Ts(e){return oe.sum(e.size.filter(zs))||0}function zs(e){return!_t.checkIfNullOrUndefined(e)}function Bs(e){return e==null}function Fs(e){return e==null}function Ps(e){return oe.sum(e.size.filter(qs))}function qs(e){return!_t.checkIfNullOrUndefined(e)}function Gs(e){return e==null}function Hs(e){return e!==void 0}function Xs(e){return e!==void 0}function Ys(e){return e.data}function Us(e){return e!==void 0}function Ws(e){return e.data}function Js(e,t){return Ge.ascending(e,t)}function Ks(e){const t=i.compilerRuntimeExports.c(61),{data:d,graphTitle:R,colors:qt,barPadding:Tt,showTicks:yt,leftMargin:tt,rightMargin:ut,topMargin:k,bottomMargin:V,truncateBy:y,showLabels:I,showValues:Vt,backgroundColor:rt,suffix:Dt,prefix:S,sources:et,graphDescription:xt,height:mt,width:It,footNote:w,colorDomain:it,colorLegendTitle:X,padding:F,relativeHeight:K,tooltip:Y,onSeriesMouseOver:dt,refValues:T,showColorScale:U,graphID:P,maxValue:u,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:x,graphDownload:r,dataDownload:p,language:m,theme:j,sortData:Q,labelOrder:W,showNAColor:ct,minHeight:Ft,maxBarThickness:Gt,maxNumberOfBars:q,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:l,detailsOnClick:c,barAxisTitle:L,noOfTicks:h,valueColor:G,orientation:D,styles:A,classNames:Mt,filterNA:vt,animate:st,dimmedOpacity:pt,precision:E,customLayers:g,timeline:Z,naLabel:_}=e,J=D===void 0?"vertical":D;let C;return t[0]!==st||t[1]!==zt||t[2]!==rt||t[3]!==L||t[4]!==Tt||t[5]!==V||t[6]!==Mt||t[7]!==it||t[8]!==X||t[9]!==qt||t[10]!==g||t[11]!==d||t[12]!==p||t[13]!==c||t[14]!==pt||t[15]!==vt||t[16]!==w||t[17]!==xt||t[18]!==r||t[19]!==P||t[20]!==R||t[21]!==mt||t[22]!==o||t[23]!==W||t[24]!==m||t[25]!==tt||t[26]!==Gt||t[27]!==q||t[28]!==u||t[29]!==bt||t[30]!==Ft||t[31]!==s||t[32]!==_||t[33]!==h||t[34]!==x||t[35]!==dt||t[36]!==J||t[37]!==F||t[38]!==E||t[39]!==S||t[40]!==T||t[41]!==K||t[42]!==l||t[43]!==ut||t[44]!==U||t[45]!==I||t[46]!==ct||t[47]!==yt||t[48]!==Vt||t[49]!==Q||t[50]!==et||t[51]!==A||t[52]!==Dt||t[53]!==j||t[54]!==Z||t[55]!==Y||t[56]!==k||t[57]!==y||t[58]!==G||t[59]!==It?(C=i.jsxRuntimeExports.jsx(Zi,{data:d,graphTitle:R,colors:qt,barPadding:Tt,showTicks:yt,leftMargin:tt,rightMargin:ut,topMargin:k,bottomMargin:V,truncateBy:y,showLabels:I,showValues:Vt,backgroundColor:rt,suffix:Dt,prefix:S,sources:et,graphDescription:xt,height:mt,width:It,footNote:w,colorDomain:it,colorLegendTitle:X,padding:F,relativeHeight:K,tooltip:Y,onSeriesMouseOver:dt,refValues:T,showColorScale:U,graphID:P,maxValue:u,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:x,graphDownload:r,dataDownload:p,language:m,theme:j,sortData:Q,labelOrder:W,showNAColor:ct,minHeight:Ft,maxBarThickness:Gt,maxNumberOfBars:q,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:l,styles:A,detailsOnClick:c,barAxisTitle:L,noOfTicks:h,valueColor:G,classNames:Mt,filterNA:vt,animate:st,dimmedOpacity:pt,precision:E,customLayers:g,timeline:Z,naLabel:_,orientation:J}),t[0]=st,t[1]=zt,t[2]=rt,t[3]=L,t[4]=Tt,t[5]=V,t[6]=Mt,t[7]=it,t[8]=X,t[9]=qt,t[10]=g,t[11]=d,t[12]=p,t[13]=c,t[14]=pt,t[15]=vt,t[16]=w,t[17]=xt,t[18]=r,t[19]=P,t[20]=R,t[21]=mt,t[22]=o,t[23]=W,t[24]=m,t[25]=tt,t[26]=Gt,t[27]=q,t[28]=u,t[29]=bt,t[30]=Ft,t[31]=s,t[32]=_,t[33]=h,t[34]=x,t[35]=dt,t[36]=J,t[37]=F,t[38]=E,t[39]=S,t[40]=T,t[41]=K,t[42]=l,t[43]=ut,t[44]=U,t[45]=I,t[46]=ct,t[47]=yt,t[48]=Vt,t[49]=Q,t[50]=et,t[51]=A,t[52]=Dt,t[53]=j,t[54]=Z,t[55]=Y,t[56]=k,t[57]=y,t[58]=G,t[59]=It,t[60]=C):C=t[60],C}function Qs(e){const t=i.compilerRuntimeExports.c(57),{data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,truncateBy:k,height:V,width:y,footNote:I,colorDomain:Vt,colorLegendTitle:rt,suffix:Dt,prefix:S,showValues:et,padding:xt,backgroundColor:mt,leftMargin:It,rightMargin:w,topMargin:it,bottomMargin:X,showLabels:F,relativeHeight:K,tooltip:Y,onSeriesMouseOver:dt,refValues:T,graphID:U,maxValue:P,minValue:u,onSeriesMouseClick:s,graphDownload:o,dataDownload:x,language:r,labelOrder:p,minHeight:m,theme:j,sortParameter:Q,sortData:W,maxBarThickness:ct,ariaLabel:Ft,resetSelectionOnDoubleClick:Gt,detailsOnClick:q,barAxisTitle:bt,noOfTicks:zt,valueColor:l,orientation:c,styles:L,classNames:h,filterNA:G,animate:D,precision:A,customLayers:Mt,showColorScale:vt,timeline:st,naLabel:pt}=e,E=c===void 0?"vertical":c;let g;return t[0]!==D||t[1]!==Ft||t[2]!==mt||t[3]!==bt||t[4]!==tt||t[5]!==X||t[6]!==h||t[7]!==Vt||t[8]!==rt||t[9]!==qt||t[10]!==Mt||t[11]!==d||t[12]!==x||t[13]!==q||t[14]!==G||t[15]!==I||t[16]!==yt||t[17]!==o||t[18]!==U||t[19]!==R||t[20]!==V||t[21]!==p||t[22]!==r||t[23]!==It||t[24]!==ct||t[25]!==P||t[26]!==m||t[27]!==u||t[28]!==pt||t[29]!==zt||t[30]!==s||t[31]!==dt||t[32]!==E||t[33]!==xt||t[34]!==A||t[35]!==S||t[36]!==T||t[37]!==K||t[38]!==Gt||t[39]!==w||t[40]!==vt||t[41]!==F||t[42]!==ut||t[43]!==et||t[44]!==W||t[45]!==Q||t[46]!==Tt||t[47]!==L||t[48]!==Dt||t[49]!==j||t[50]!==st||t[51]!==Y||t[52]!==it||t[53]!==k||t[54]!==l||t[55]!==y?(g=i.jsxRuntimeExports.jsx(ri,{orientation:E,data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,truncateBy:k,height:V,width:y,footNote:I,colorDomain:Vt,colorLegendTitle:rt,suffix:Dt,prefix:S,showValues:et,padding:xt,backgroundColor:mt,leftMargin:It,rightMargin:w,sortParameter:Q,sortData:W,topMargin:it,bottomMargin:X,showLabels:F,relativeHeight:K,tooltip:Y,onSeriesMouseOver:dt,refValues:T,graphID:U,maxValue:P,minValue:u,onSeriesMouseClick:s,graphDownload:o,dataDownload:x,language:r,labelOrder:p,minHeight:m,theme:j,maxBarThickness:ct,ariaLabel:Ft,resetSelectionOnDoubleClick:Gt,styles:L,detailsOnClick:q,barAxisTitle:bt,noOfTicks:zt,valueColor:l,classNames:h,filterNA:G,animate:D,precision:A,customLayers:Mt,showColorScale:vt,timeline:st,naLabel:pt}),t[0]=D,t[1]=Ft,t[2]=mt,t[3]=bt,t[4]=tt,t[5]=X,t[6]=h,t[7]=Vt,t[8]=rt,t[9]=qt,t[10]=Mt,t[11]=d,t[12]=x,t[13]=q,t[14]=G,t[15]=I,t[16]=yt,t[17]=o,t[18]=U,t[19]=R,t[20]=V,t[21]=p,t[22]=r,t[23]=It,t[24]=ct,t[25]=P,t[26]=m,t[27]=u,t[28]=pt,t[29]=zt,t[30]=s,t[31]=dt,t[32]=E,t[33]=xt,t[34]=A,t[35]=S,t[36]=T,t[37]=K,t[38]=Gt,t[39]=w,t[40]=vt,t[41]=F,t[42]=ut,t[43]=et,t[44]=W,t[45]=Q,t[46]=Tt,t[47]=L,t[48]=Dt,t[49]=j,t[50]=st,t[51]=Y,t[52]=it,t[53]=k,t[54]=l,t[55]=y,t[56]=g):g=t[56],g}function Zs(e){const t=i.compilerRuntimeExports.c(58),{data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,leftMargin:k,rightMargin:V,topMargin:y,bottomMargin:I,truncateBy:Vt,showLabels:rt,showValues:Dt,backgroundColor:S,suffix:et,prefix:xt,height:mt,width:It,footNote:w,colorDomain:it,colorLegendTitle:X,padding:F,tooltip:K,onSeriesMouseOver:Y,relativeHeight:dt,refValues:T,graphID:U,maxValue:P,onSeriesMouseClick:u,graphDownload:s,dataDownload:o,language:x,theme:r,labelOrder:p,minHeight:m,maxBarThickness:j,sortParameter:Q,sortData:W,maxNumberOfBars:ct,minBarThickness:Ft,ariaLabel:Gt,resetSelectionOnDoubleClick:q,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:l,valueColor:c,orientation:L,styles:h,classNames:G,filterNA:D,animate:A,precision:Mt,customLayers:vt,showColorScale:st,timeline:pt,naLabel:E}=e,g=L===void 0?"vertical":L;let Z;return t[0]!==A||t[1]!==Gt||t[2]!==S||t[3]!==zt||t[4]!==tt||t[5]!==I||t[6]!==G||t[7]!==it||t[8]!==X||t[9]!==qt||t[10]!==vt||t[11]!==d||t[12]!==o||t[13]!==bt||t[14]!==D||t[15]!==w||t[16]!==yt||t[17]!==s||t[18]!==U||t[19]!==R||t[20]!==mt||t[21]!==p||t[22]!==x||t[23]!==k||t[24]!==j||t[25]!==ct||t[26]!==P||t[27]!==Ft||t[28]!==m||t[29]!==E||t[30]!==l||t[31]!==u||t[32]!==Y||t[33]!==g||t[34]!==F||t[35]!==Mt||t[36]!==xt||t[37]!==T||t[38]!==dt||t[39]!==q||t[40]!==V||t[41]!==st||t[42]!==rt||t[43]!==ut||t[44]!==Dt||t[45]!==W||t[46]!==Q||t[47]!==Tt||t[48]!==h||t[49]!==et||t[50]!==r||t[51]!==pt||t[52]!==K||t[53]!==y||t[54]!==Vt||t[55]!==c||t[56]!==It?(Z=i.jsxRuntimeExports.jsx(Ss,{data:d,graphTitle:R,colors:qt,sources:Tt,graphDescription:yt,barPadding:tt,showTicks:ut,leftMargin:k,rightMargin:V,topMargin:y,bottomMargin:I,truncateBy:Vt,showLabels:rt,showValues:Dt,backgroundColor:S,suffix:et,prefix:xt,height:mt,width:It,footNote:w,colorDomain:it,colorLegendTitle:X,padding:F,tooltip:K,onSeriesMouseOver:Y,relativeHeight:dt,refValues:T,graphID:U,maxValue:P,onSeriesMouseClick:u,graphDownload:s,dataDownload:o,language:x,theme:r,labelOrder:p,minHeight:m,maxBarThickness:j,sortParameter:Q,sortData:W,maxNumberOfBars:ct,minBarThickness:Ft,ariaLabel:Gt,resetSelectionOnDoubleClick:q,styles:h,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:l,valueColor:c,classNames:G,filterNA:D,animate:A,precision:Mt,customLayers:vt,showColorScale:st,timeline:pt,naLabel:E,orientation:g}),t[0]=A,t[1]=Gt,t[2]=S,t[3]=zt,t[4]=tt,t[5]=I,t[6]=G,t[7]=it,t[8]=X,t[9]=qt,t[10]=vt,t[11]=d,t[12]=o,t[13]=bt,t[14]=D,t[15]=w,t[16]=yt,t[17]=s,t[18]=U,t[19]=R,t[20]=mt,t[21]=p,t[22]=x,t[23]=k,t[24]=j,t[25]=ct,t[26]=P,t[27]=Ft,t[28]=m,t[29]=E,t[30]=l,t[31]=u,t[32]=Y,t[33]=g,t[34]=F,t[35]=Mt,t[36]=xt,t[37]=T,t[38]=dt,t[39]=q,t[40]=V,t[41]=st,t[42]=rt,t[43]=ut,t[44]=Dt,t[45]=W,t[46]=Q,t[47]=Tt,t[48]=h,t[49]=et,t[50]=r,t[51]=pt,t[52]=K,t[53]=y,t[54]=Vt,t[55]=c,t[56]=It,t[57]=Z):Z=t[57],Z}exports.GroupedBarGraph=Qs;exports.SimpleBarGraph=Ks;exports.StackedBarGraph=Zs;
|
|
2
2
|
//# sourceMappingURL=BarGraph.cjs.map
|