@undp/data-viz 2.1.1 → 2.1.3
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.js +2 -2
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +129 -120
- package/dist/BarGraph.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +49 -46
- 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 +11 -0
- package/dist/BulletChart.js +758 -711
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +7 -4
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +52 -49
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +2 -2
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +10 -0
- package/dist/DonutChart.js +230 -264
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +37 -34
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +41 -38
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GraphEl-BLMih7RN.cjs +2 -0
- package/dist/GraphEl-BLMih7RN.cjs.map +1 -0
- package/dist/{GraphEl-DEzobeOM.js → GraphEl-CRrAlbcr.js} +5 -2
- package/dist/GraphEl-CRrAlbcr.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +2 -2
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +62 -59
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +2 -2
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +7 -4
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +2 -2
- package/dist/Types.d.ts +2 -0
- package/dist/{area-BE2wo7fv.js → area-B6r7cv2o.js} +5 -5
- package/dist/{area-BE2wo7fv.js.map → area-B6r7cv2o.js.map} +1 -1
- package/dist/area-C1gxfNGD.cjs +2 -0
- package/dist/{area-D3Qx7k7K.cjs.map → area-C1gxfNGD.cjs.map} +1 -1
- package/dist/array-DMyR1sql.cjs +2 -0
- package/dist/array-DMyR1sql.cjs.map +1 -0
- package/dist/array-USo-Szhp.js +13 -0
- package/dist/array-USo-Szhp.js.map +1 -0
- package/dist/ensureCompleteData-DH5c52Ub.js +122 -0
- package/dist/ensureCompleteData-DH5c52Ub.js.map +1 -0
- package/dist/ensureCompleteData-pZ9QO6kB.cjs +2 -0
- package/dist/ensureCompleteData-pZ9QO6kB.cjs.map +1 -0
- package/dist/getSchema.cjs +1 -1
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.js +15 -15
- package/dist/getSchema.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +2 -2
- package/dist/line-DFlZsxI1.js +144 -0
- package/dist/line-DFlZsxI1.js.map +1 -0
- package/dist/line-DaEMhXmx.cjs +2 -0
- package/dist/line-DaEMhXmx.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
- package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
- package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
- package/package.json +1 -1
- package/dist/GraphEl-B16EYkko.cjs +0 -2
- package/dist/GraphEl-B16EYkko.cjs.map +0 -1
- package/dist/GraphEl-DEzobeOM.js.map +0 -1
- package/dist/area-D3Qx7k7K.cjs +0 -2
- package/dist/array-B7TkkRH0.js +0 -89
- package/dist/array-B7TkkRH0.js.map +0 -1
- package/dist/array-DKbXV8lR.cjs +0 -2
- package/dist/array-DKbXV8lR.cjs.map +0 -1
- package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
- package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
- package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
- package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
- package/dist/line-CPfhohvF.js +0 -68
- package/dist/line-CPfhohvF.js.map +0 -1
- package/dist/line-DHV4JwCR.cjs +0 -2
- package/dist/line-DHV4JwCR.cjs.map +0 -1
- package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
- package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
- package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
package/dist/DumbbellChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),Ee=require("./index-Cno4Q0YE.cjs"),je=require("./parse-hMnG_lRV.cjs"),T=require("react"),Oe=require("./getSliderMarks-BmADcPQt.cjs"),Me=require("./index-DQA8q5sC.cjs"),ke=require("./numberFormattingFunction-02t-wJta.cjs"),Ie=require("./Tooltip-uUdw6wJL.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./AxisTitle-sS5bLLR7.cjs"),Fe=require("./Axis-DxRV2yMi.cjs"),Pe=require("./XAxesLabels-Bt5NZBmX.cjs"),$e=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ne=require("./ReferenceLine-BH0qdf4R.cjs"),We=require("./XTicksAndGridLines-B6CELS7q.cjs"),Ge=require("./YAxesLabels-DesLesUP.cjs"),Ve=require("./DetailsModal-BN0HDFlV.cjs"),De=require("./linear-BwPAspcq.cjs"),Se=require("./band-VYfcZeJ2.cjs"),Te=require("./use-in-view-QcfiW0w3.cjs"),Tt=require("./proxy-BxvUI_9l.cjs"),qe=require("./index-DG2bgAva.cjs"),Ae=require("./ensureCompleteData-I6nYmT8E.cjs"),Re=require("./GraphContainer-d8A46BK2.cjs"),Be=require("./GraphHeader.cjs"),Ce=require("./index-DRXx7m-C.cjs"),Ye=require("./GraphFooter.cjs"),Xe=require("./ColorLegendWithMouseOver.cjs"),He=require("./EmptyState-sAEZ_5rU.cjs"),Ue=require("./Colors.cjs");function ze(e){const t=i.compilerRuntimeExports.c(146),{data:d,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:k,barPadding:Ft,showTicks:Mt,truncateBy:It,width:wt,height:jt,radius:ht,showLabels:At,tooltip:g,onSeriesMouseOver:at,maxValue:Lt,minValue:E,onSeriesMouseClick:ct,showValues:Zt,suffix:ft,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:O,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:ut}=e,b=Jt===void 0?20:Jt,Gt=se===void 0?20:se,Bt=Kt===void 0?20:Kt,Dt=Qt===void 0?25:Qt,te=T.useRef(null);let Yt;t[0]!==p.amount||t[1]!==p.once?(Yt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Yt):Yt=t[2];const H=Te.useInView(te,Yt),U=P?b+30:b;let Xt;t[3]!==Dt||t[4]!==Gt||t[5]!==U||t[6]!==Bt?(Xt={top:Bt,bottom:Dt,left:U,right:Gt},t[3]=Dt,t[4]=Gt,t[5]=U,t[6]=Bt,t[7]=Xt):Xt=t[7];const l=Xt,o=wt-l.left-l.right,rt=jt-l.top-l.bottom,[lt,Ht]=T.useState(void 0),[yt,gt]=T.useState(void 0),[Ut,Et]=T.useState(void 0),[Ot,zt]=T.useState(void 0);let Rt;if(t[8]!==d||t[9]!==y){const f=new Set,h=d.map((v,w)=>{const a=y?`${v.label}`:`${w}`;return f.add(a),{...v,id:a}}),M=y?y.filter(v=>!f.has(v)):[];let mt;t[11]!==d[0]?(mt=v=>({id:v,label:v,x:Array(d[0].x.length).fill(null)}),t[11]=d[0],t[12]=mt):mt=t[12],Rt=[...h,...M.map(mt)],t[8]=d,t[9]=y,t[10]=Rt}else Rt=t[10];const G=Rt;let $;t[13]!==G||t[14]!==y?($=y??G.map(oi),t[13]=G,t[14]=y,t[15]=$):$=t[15];const St=$;let bt,z,J,K,Q,Z,j,R,C,_,tt,et,A,N,V;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==St||t[20]!==Ft||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Pt||t[29]!==X||t[30]!==G||t[31]!==O||t[32]!==ut||t[33]!==k||t[34]!==rt||t[35]!==o||t[36]!==jt||t[37]!==W||t[38]!==H||t[39]!==b||t[40]!==l.bottom||t[41]!==l.left||t[42]!==l.right||t[43]!==l.top||t[44]!==kt||t[45]!==Lt||t[46]!==$t||t[47]!==E||t[48]!==yt||t[49]!==Wt||t[50]!==ct||t[51]!==at||t[52]!==m||t[53]!==q||t[54]!==ht||t[55]!==Vt||t[56]!==_t||t[57]!==F||t[58]!==At||t[59]!==Mt||t[60]!==Zt||t[61]!==s?.dataConnectors||t[62]!==s?.graphObjectValues||t[63]!==s?.xAxis?.axis||t[64]!==s?.xAxis?.labels||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==s?.yAxis?.title||t[68]!==ft||t[69]!==It||t[70]!==Nt||t[71]!==wt){const f=De.linear().domain([E,Lt]).range([rt,0]).nice(),h=Se.band().domain(St).range([0,$t?Math.max(o,$t*G.length):kt?Math.min(o,kt*G.length):o]).paddingInner(Ft),M=f.ticks(Wt);z=Tt.motion.svg,C=`${wt}px`,_=`${jt}px`,tt=`0 0 ${wt} ${jt}`,et="ltr",A=te,t[87]!==L?(N=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=N):N=t[88],K=`translate(${l.left},${l.top})`;const mt=f(E<0?0:E),v=f(E<0?0:E),w=E<0?0:E;let a;t[89]!==m||t[90]!==q||t[91]!==ft||t[92]!==w?(a=ke.numberFormattingFunction(w,"NA",m,q,ft),t[89]=m,t[90]=q,t[91]=ft,t[92]=w,t[93]=a):a=t[93];const pt=n?.xAxis?.axis,ie=n?.yAxis?.labels;let vt;t[94]!==pt||t[95]!==ie?(vt={axis:pt,label:ie},t[94]=pt,t[95]=ie,t[96]=vt):vt=t[96];const ne=s?.xAxis?.axis,Y=s?.yAxis?.labels;let c;t[97]!==ne||t[98]!==Y?(c={axis:ne,label:Y},t[97]=ne,t[98]=Y,t[99]=c):c=t[99],Q=i.jsxRuntimeExports.jsx(Fe.Axis,{y1:mt,y2:v,x1:0-b,x2:o+l.right,label:a,labelPos:{x:0-b,dx:0,dy:Lt<0?"1em":-5,y:f(E<0?0:E)},classNames:vt,styles:c}),Z=Mt?i.jsxRuntimeExports.jsx($e.YTicksAndGridLines,{values:M.filter(si),y:M.filter(ni).map(x=>f(x)),x1:0-b,x2:o+l.right,styles:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ft,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const S=0-b-15,r=rt/2,I=s?.yAxis?.title,ae=n?.yAxis?.title;t[100]!==P||t[101]!==S||t[102]!==r||t[103]!==I||t[104]!==ae?(j=i.jsxRuntimeExports.jsx(Le.AxisTitle,{x:S,y:r,style:I,className:ae,text:P,rotate90:!0}),t[100]=P,t[101]=S,t[102]=r,t[103]=I,t[104]=ae,t[105]=j):j=t[105],t[106]!==X?(R=X.filter(ii).map(ei),t[106]=X,t[107]=R):R=t[107],bt=qe.AnimatePresence,V=G.map(x=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:h(`${x.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(x.label)!==-1?.85:ut:.85},whileInView:{x:h(`${x.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(x.label)!==-1?.85:ut:.85,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[At?i.jsxRuntimeExports.jsx(Pe.XAxesLabels,{value:`${x.label}`.length<It?`${x.label}`:`${`${x.label}`.substring(0,It)}...`,y:rt+5,x:0-h.bandwidth()/2,width:h.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:H}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{x1:0,x2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&x.x.indexOf(Math.min(...x.x.filter(ti)))===0?"url(#arrow)":"",markerStart:L&&x.x.indexOf(Math.min(...x.x.filter(_e)))===x.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:f(Math.min(...x.x.filter(Ze)))+ht,y2:f(Math.max(...x.x.filter(Qe)))-ht,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),x.x.map((ee,ot)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:oe=>{Ht({...x,xIndex:ot}),zt(oe.clientY),Et(oe.clientX),at?.({...x,xIndex:ot})},onClick:()=>{(ct||O)&&(Me.isEqual(yt,{...x,xIndex:ot})&&_t?(gt(void 0),ct?.(void 0)):(gt({...x,xIndex:ot}),ct&&ct({...x,xIndex:ot})))},onMouseMove:oe=>{Ht({...x,xIndex:ot}),zt(oe.clientY),Et(oe.clientX)},onMouseLeave:()=>{Ht(void 0),Et(void 0),zt(void 0),at?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?k[ot]===F?1:.3:1},whileInView:{opacity:F?k[ot]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:qt.checkIfNullOrUndefined(ee)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cx:0,r:ht,style:{fill:k[ot],fillOpacity:.85,stroke:k[ot],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:f(0),opacity:0},whileInView:{cy:f(ee||0),opacity:qt.checkIfNullOrUndefined(ee)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),Zt?i.jsxRuntimeExports.jsx(Tt.motion.text,{x:0,style:{textAnchor:"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(ee)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:f(0),opacity:0,fill:Nt||k[ot]},whileInView:{y:f(ee||0),fill:Nt||k[ot],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:ke.numberFormattingFunction(ee,"NA",m,q,ft)}):null]})},ot))]},x.label)),J=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((x,ee)=>i.jsxRuntimeExports.jsx(Ne.RefLineY,{text:x.text,color:x.color,y:f(x.value),x1:0-b,x2:o+l.right,classNames:x.classNames,styles:x.styles,animate:p,isInView:H},ee))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=St,t[20]=Ft,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Pt,t[29]=X,t[30]=G,t[31]=O,t[32]=ut,t[33]=k,t[34]=rt,t[35]=o,t[36]=jt,t[37]=W,t[38]=H,t[39]=b,t[40]=l.bottom,t[41]=l.left,t[42]=l.right,t[43]=l.top,t[44]=kt,t[45]=Lt,t[46]=$t,t[47]=E,t[48]=yt,t[49]=Wt,t[50]=ct,t[51]=at,t[52]=m,t[53]=q,t[54]=ht,t[55]=Vt,t[56]=_t,t[57]=F,t[58]=At,t[59]=Mt,t[60]=Zt,t[61]=s?.dataConnectors,t[62]=s?.graphObjectValues,t[63]=s?.xAxis?.axis,t[64]=s?.xAxis?.labels,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=s?.yAxis?.title,t[68]=ft,t[69]=It,t[70]=Nt,t[71]=wt,t[72]=bt,t[73]=z,t[74]=J,t[75]=K,t[76]=Q,t[77]=Z,t[78]=j,t[79]=R,t[80]=C,t[81]=_,t[82]=tt,t[83]=et,t[84]=A,t[85]=N,t[86]=V}else bt=t[72],z=t[73],J=t[74],K=t[75],Q=t[76],Z=t[77],j=t[78],R=t[79],C=t[80],_=t[81],tt=t[82],et=t[83],A=t[84],N=t[85],V=t[86];let it;t[108]!==bt||t[109]!==J||t[110]!==V?(it=i.jsxRuntimeExports.jsxs(bt,{children:[V,J]}),t[108]=bt,t[109]=J,t[110]=V,t[111]=it):it=t[111];let nt;t[112]!==X?(nt=X.filter(Ke).map(Je),t[112]=X,t[113]=nt):nt=t[113];let xt;t[114]!==K||t[115]!==Q||t[116]!==Z||t[117]!==j||t[118]!==R||t[119]!==it||t[120]!==nt?(xt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,Z,j,R,it,nt]}),t[114]=K,t[115]=Q,t[116]=Z,t[117]=j,t[118]=R,t[119]=it,t[120]=nt,t[121]=xt):xt=t[121];let D;t[122]!==z||t[123]!==C||t[124]!==_||t[125]!==tt||t[126]!==et||t[127]!==A||t[128]!==N||t[129]!==xt?(D=i.jsxRuntimeExports.jsxs(z,{width:C,height:_,viewBox:tt,direction:et,ref:A,children:[N,xt]}),t[122]=z,t[123]=C,t[124]=_,t[125]=tt,t[126]=et,t[127]=A,t[128]=N,t[129]=xt,t[130]=D):D=t[130];let B;t[131]!==n?.tooltip||t[132]!==Ut||t[133]!==Ot||t[134]!==lt||t[135]!==s?.tooltip||t[136]!==g?(B=lt&&g&&Ut&&Ot?i.jsxRuntimeExports.jsx(Ie.Tooltip,{data:lt,body:g,xPos:Ut,yPos:Ot,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[131]=n?.tooltip,t[132]=Ut,t[133]=Ot,t[134]=lt,t[135]=s?.tooltip,t[136]=g,t[137]=B):B=t[137];let st;t[138]!==n?.modal||t[139]!==O||t[140]!==yt?(st=O&&yt!==void 0?i.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:O,data:yt,setData:gt,className:n?.modal}):null,t[138]=n?.modal,t[139]=O,t[140]=yt,t[141]=st):st=t[141];let dt;return t[142]!==D||t[143]!==B||t[144]!==st?(dt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[142]=D,t[143]=B,t[144]=st,t[145]=dt):dt=t[145],dt}function Je(e){return e.layer}function Ke(e){return e.position==="after"}function Qe(e){return e!==null}function Ze(e){return e!==null}function _e(e){return e!==null}function ti(e){return e!==null}function ei(e){return e.layer}function ii(e){return e.position==="before"}function ni(e){return e!==0}function si(e){return e!==0}function oi(e){return`${e.id}`}function ai(e){const t=i.compilerRuntimeExports.c(139),{data:d,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:k,suffix:Ft,prefix:Mt,barPadding:It,showValues:wt,showTicks:jt,truncateBy:ht,width:At,height:g,radius:at,showLabels:Lt,tooltip:E,onSeriesMouseOver:ct,maxValue:Zt,minValue:ft,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:O,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:ut,dimmedOpacity:b}=e,Gt=Jt===void 0?100:Jt,Bt=se===void 0?40:se,Dt=Kt===void 0?20:Kt,te=Qt===void 0?10:Qt,Yt=T.useRef(null);let H;t[0]!==m.amount||t[1]!==m.once?(H={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=H):H=t[2];const U=Te.useInView(Yt,H),Xt=P?Dt+25:Dt;let l;t[3]!==te||t[4]!==Gt||t[5]!==Bt||t[6]!==Xt?(l={top:Xt,bottom:te,left:Gt,right:Bt},t[3]=te,t[4]=Gt,t[5]=Bt,t[6]=Xt,t[7]=l):l=t[7];const o=l,rt=At-o.left-o.right,lt=g-o.top-o.bottom,[Ht,yt]=T.useState(void 0),[gt,Ut]=T.useState(void 0),[Et,Ot]=T.useState(void 0),[zt,Rt]=T.useState(void 0);let G;if(t[8]!==d||t[9]!==y){const h=new Set,M=d.map((w,a)=>{const pt=y?`${w.label}`:`${a}`;return h.add(pt),{...w,id:pt}}),mt=y?y.filter(w=>!h.has(w)):[];let v;t[11]!==d[0]?(v=w=>({id:w,label:w,x:Array(d[0].x.length).fill(null)}),t[11]=d[0],t[12]=v):v=t[12],G=[...M,...mt.map(v)],t[8]=d,t[9]=y,t[10]=G}else G=t[10];const $=G;let St;t[13]!==$||t[14]!==y?(St=y??$.map(yi),t[13]=$,t[14]=y,t[15]=St):St=t[15];const bt=St;let z,J,K,Q,Z,j,R,C,_,tt,et,A,N,V,it;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==bt||t[20]!==It||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Pt||t[29]!==W||t[30]!==$||t[31]!==O||t[32]!==b||t[33]!==k||t[34]!==lt||t[35]!==rt||t[36]!==g||t[37]!==ut||t[38]!==U||t[39]!==o.bottom||t[40]!==o.left||t[41]!==o.top||t[42]!==kt||t[43]!==Zt||t[44]!==$t||t[45]!==ft||t[46]!==gt||t[47]!==Wt||t[48]!==q||t[49]!==ct||t[50]!==X||t[51]!==Mt||t[52]!==at||t[53]!==Vt||t[54]!==_t||t[55]!==p||t[56]!==F||t[57]!==Lt||t[58]!==jt||t[59]!==wt||t[60]!==s?.dataConnectors||t[61]!==s?.graphObjectValues||t[62]!==s?.xAxis?.gridLines||t[63]!==s?.xAxis?.labels||t[64]!==s?.xAxis?.title||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==Ft||t[68]!==Dt||t[69]!==ht||t[70]!==Nt||t[71]!==At){const h=De.linear().domain([ft,Zt]).range([0,rt]).nice(),M=Se.band().domain(bt).range([0,$t?Math.max(lt,$t*$.length):kt?Math.min(lt,kt*$.length):lt]).paddingInner(It),mt=h.ticks(Wt);J=Tt.motion.svg,_=`${At}px`,tt=`${g}px`,et=`0 0 ${At} ${g}`,A="ltr",N=Yt,t[87]!==L?(V=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=V):V=t[88],Q=`translate(${o.left},${o.top})`,Z=jt?i.jsxRuntimeExports.jsx(We.XTicksAndGridLines,{values:mt.filter(fi),x:mt.filter(hi).map(c=>h(c)),y1:0-Dt,y2:lt+o.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Ft,prefix:Mt,labelType:"secondary",showGridLines:!0,precision:X}):null;const v=rt/2,w=0-o.top+15,a=s?.xAxis?.title,pt=n?.xAxis?.title;t[89]!==P||t[90]!==v||t[91]!==w||t[92]!==a||t[93]!==pt?(j=i.jsxRuntimeExports.jsx(Le.AxisTitle,{x:v,y:w,style:a,className:pt,text:P}),t[89]=P,t[90]=v,t[91]=w,t[92]=a,t[93]=pt,t[94]=j):j=t[94];const ie=s?.yAxis?.gridLines;let vt;t[95]!==ie?(vt={gridLines:ie},t[95]=ie,t[96]=vt):vt=t[96];const ne=n?.yAxis?.gridLines;let Y;t[97]!==ne?(Y={gridLines:ne},t[97]=ne,t[98]=Y):Y=t[98],R=i.jsxRuntimeExports.jsx($e.YTicksAndGridLines,{y:$.map(c=>M(`${c.id}`)+M.bandwidth()/2),x1:0,x2:rt,styles:vt,classNames:Y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(C=W.filter(pi).map(mi),t[99]=W,t[100]=C):C=t[100],z=qe.AnimatePresence,it=$.map(c=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:M(`${c.id}`)+M.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85},whileInView:{x:0,y:M(`${c.id}`)+M.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Lt?i.jsxRuntimeExports.jsx(Ge.YAxesLabels,{value:`${c.label}`.length<ht?`${c.label}`:`${`${c.label}`.substring(0,ht)}...`,y:0-M.bandwidth()/2,x:0-o.left,width:o.left,height:M.bandwidth(),alignment:"right",style:s?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:U}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{y1:0,y2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&c.x.indexOf(Math.min(...c.x.filter(di)))===0?"url(#arrow)":"",markerStart:L&&c.x.indexOf(Math.min(...c.x.filter(xi)))===c.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:h(Math.min(...c.x.filter(ui)))+at,x2:h(Math.max(...c.x.filter(ci)))-at,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),c.x.map((S,r)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:I=>{yt({...c,xIndex:r}),Rt(I.clientY),Ot(I.clientX),ct?.({...c,xIndex:r})},onClick:()=>{(q||O)&&(Me.isEqual(gt,{...c,xIndex:r})&&_t?(Ut(void 0),q?.(void 0)):(Ut({...c,xIndex:r}),q&&q({...c,xIndex:r})))},onMouseMove:I=>{yt({...c,xIndex:r}),Rt(I.clientY),Ot(I.clientX)},onMouseLeave:()=>{yt(void 0),Ot(void 0),Rt(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?k[r]===F?1:.3:1},whileInView:{opacity:F?k[r]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:qt.checkIfNullOrUndefined(S)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cy:0,r:at,style:{fill:k[r],fillOpacity:.85,stroke:k[r],strokeWidth:1,opacity:qt.checkIfNullOrUndefined(S)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:h(0),opacity:0},whileInView:{cx:h(S||0),opacity:qt.checkIfNullOrUndefined(S)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),wt?i.jsxRuntimeExports.jsx(Tt.motion.text,{y:0,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dx:0,dy:0-at-3,className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(S)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:h(0),opacity:0,fill:Nt||k[r]},whileInView:{x:h(S||0),fill:Nt||k[r],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:ke.numberFormattingFunction(S,"NA",X,Mt,Ft)}):null]})},r))]},c.label)),K=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((c,S)=>i.jsxRuntimeExports.jsx(Ne.RefLineX,{text:c.text,color:c.color,x:h(c.value),y1:0-o.top,y2:lt+o.bottom,textSide:h(c.value)>rt*.75||p?"left":"right",classNames:c.classNames,styles:c.styles,animate:m,isInView:U},S))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=bt,t[20]=It,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Pt,t[29]=W,t[30]=$,t[31]=O,t[32]=b,t[33]=k,t[34]=lt,t[35]=rt,t[36]=g,t[37]=ut,t[38]=U,t[39]=o.bottom,t[40]=o.left,t[41]=o.top,t[42]=kt,t[43]=Zt,t[44]=$t,t[45]=ft,t[46]=gt,t[47]=Wt,t[48]=q,t[49]=ct,t[50]=X,t[51]=Mt,t[52]=at,t[53]=Vt,t[54]=_t,t[55]=p,t[56]=F,t[57]=Lt,t[58]=jt,t[59]=wt,t[60]=s?.dataConnectors,t[61]=s?.graphObjectValues,t[62]=s?.xAxis?.gridLines,t[63]=s?.xAxis?.labels,t[64]=s?.xAxis?.title,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=Ft,t[68]=Dt,t[69]=ht,t[70]=Nt,t[71]=At,t[72]=z,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=j,t[78]=R,t[79]=C,t[80]=_,t[81]=tt,t[82]=et,t[83]=A,t[84]=N,t[85]=V,t[86]=it}else z=t[72],J=t[73],K=t[74],Q=t[75],Z=t[76],j=t[77],R=t[78],C=t[79],_=t[80],tt=t[81],et=t[82],A=t[83],N=t[84],V=t[85],it=t[86];let nt;t[101]!==z||t[102]!==K||t[103]!==it?(nt=i.jsxRuntimeExports.jsxs(z,{children:[it,K]}),t[101]=z,t[102]=K,t[103]=it,t[104]=nt):nt=t[104];let xt;t[105]!==W?(xt=W.filter(li).map(ri),t[105]=W,t[106]=xt):xt=t[106];let D;t[107]!==Q||t[108]!==Z||t[109]!==j||t[110]!==R||t[111]!==C||t[112]!==nt||t[113]!==xt?(D=i.jsxRuntimeExports.jsxs("g",{transform:Q,children:[Z,j,R,C,nt,xt]}),t[107]=Q,t[108]=Z,t[109]=j,t[110]=R,t[111]=C,t[112]=nt,t[113]=xt,t[114]=D):D=t[114];let B;t[115]!==J||t[116]!==_||t[117]!==tt||t[118]!==et||t[119]!==A||t[120]!==N||t[121]!==V||t[122]!==D?(B=i.jsxRuntimeExports.jsxs(J,{width:_,height:tt,viewBox:et,direction:A,ref:N,children:[V,D]}),t[115]=J,t[116]=_,t[117]=tt,t[118]=et,t[119]=A,t[120]=N,t[121]=V,t[122]=D,t[123]=B):B=t[123];let st;t[124]!==n?.tooltip||t[125]!==Et||t[126]!==zt||t[127]!==Ht||t[128]!==s?.tooltip||t[129]!==E?(st=Ht&&E&&Et&&zt?i.jsxRuntimeExports.jsx(Ie.Tooltip,{data:Ht,body:E,xPos:Et,yPos:zt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=Et,t[126]=zt,t[127]=Ht,t[128]=s?.tooltip,t[129]=E,t[130]=st):st=t[130];let dt;t[131]!==n?.modal||t[132]!==O||t[133]!==gt?(dt=O&>!==void 0?i.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:O,data:gt,setData:Ut,className:n?.modal}):null,t[131]=n?.modal,t[132]=O,t[133]=gt,t[134]=dt):dt=t[134];let f;return t[135]!==B||t[136]!==st||t[137]!==dt?(f=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[B,st,dt]}),t[135]=B,t[136]=st,t[137]=dt,t[138]=f):f=t[138],f}function ri(e){return e.layer}function li(e){return e.position==="after"}function ci(e){return e!==null}function ui(e){return e!==null}function xi(e){return e!==null}function di(e){return e!==null}function mi(e){return e.layer}function pi(e){return e.position==="before"}function hi(e,t){return t!==0}function fi(e,t){return t!==0}function yi(e){return`${e.id}`}function gi(e){const t=i.compilerRuntimeExports.c(120),{data:d,graphTitle:Jt,colors:se,sources:Kt,graphDescription:Qt,barPadding:k,showTicks:Ft,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:ht,height:At,width:g,footNote:at,colorDomain:Lt,colorLegendTitle:E,padding:ct,backgroundColor:Zt,radius:ft,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Pt,graphID:kt,suffix:$t,prefix:_t,maxValue:O,minValue:P,onSeriesMouseClick:Wt,graphDownload:Nt,dataDownload:s,showValues:n,sortParameter:y,arrowConnector:Vt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:ut,maxNumberOfBars:b,minBarThickness:Gt,ariaLabel:Bt,resetSelectionOnDoubleClick:Dt,detailsOnClick:te,axisTitle:Yt,noOfTicks:H,valueColor:U,orientation:Xt,styles:l,classNames:o,labelOrder:rt,refValues:lt,filterNA:Ht,animate:yt,precision:gt,showColorScale:Ut,customLayers:Et,highlightedDataPoints:Ot,dimmedOpacity:zt,timeline:Rt,sortData:G}=e,$=se===void 0?Ue.Colors.light.categoricalColors.colors:se,St=k===void 0?.25:k,bt=Ft===void 0?!0:Ft,z=ht===void 0?999:ht,J=Zt===void 0?!0:Zt,K=ft===void 0?3:ft,Q=F===void 0?!0:F,Z=$t===void 0?"":$t,j=_t===void 0?"":_t,R=Nt===void 0?!1:Nt,C=s===void 0?!1:s,_=n===void 0?!0:n,tt=Vt===void 0?!1:Vt,et=p===void 0?2:p,A=m===void 0?"en":m,N=X===void 0?0:X,V=W===void 0?"light":W,it=Dt===void 0?!0:Dt,nt=H===void 0?5:H,xt=Xt===void 0?"vertical":Xt,D=Ht===void 0?!0:Ht,B=yt===void 0?!1:yt,st=gt===void 0?2:gt,dt=Ut===void 0?!0:Ut;let f;t[0]!==Et?(f=Et===void 0?[]:Et,t[0]=Et,t[1]=f):f=t[1];const h=f;let M;t[2]!==Ot?(M=Ot===void 0?[]:Ot,t[2]=Ot,t[3]=M):M=t[3];const mt=M,v=zt===void 0?.3:zt;let w;t[4]!==Rt?(w=Rt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Rt,t[4]=Rt,t[5]=w):w=t[5];const a=w,[pt,ie]=T.useState(0),[vt,ne]=T.useState(0),[Y,c]=T.useState(a.autoplay);let S;if(t[6]!==d||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ct=>je.parse(`${Ct}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],S=[...new Set(d.map(u))],S.sort(Si),t[6]=d,t[7]=a.dateFormat,t[8]=S}else S=t[8];const r=S,[I,ae]=T.useState(a.autoplay?0:r.length-1),[x,ee]=T.useState(void 0),ot=T.useRef(null),oe=T.useRef(null);let xe,de;t[11]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>{const u=new ResizeObserver(Ct=>{ie(Ct[0].target.clientWidth||620),ne(Ct[0].target.clientHeight||480)});return ot.current&&u.observe(ot.current),()=>u.disconnect()},de=[],t[11]=xe,t[12]=de):(xe=t[11],de=t[12]),T.useEffect(xe,de);let me,pe;t[13]!==Y||t[14]!==a.speed||t[15]!==r?(me=()=>{const u=setInterval(()=>{ae(Ct=>Ct<r.length-1?Ct+1:0)},(a.speed||2)*1e3);return Y||clearInterval(u),()=>clearInterval(u)},pe=[r,Y,a.speed],t[13]=Y,t[14]=a.speed,t[15]=r,t[16]=me,t[17]=pe):(me=t[16],pe=t[17]),T.useEffect(me,pe);const ge=a.dateFormat||"yyyy";let he;t[18]!==I||t[19]!==ge||t[20]!==a.showOnlyActiveDate||t[21]!==r?(he=Oe.getSliderMarks(r,I,a.showOnlyActiveDate,ge),t[18]=I,t[19]=ge,t[20]=a.showOnlyActiveDate,t[21]=r,t[22]=he):he=t[22];const fe=he,be=xt==="horizontal"?ai:ze,ve=o?.graphContainer,we=l?.graphContainer;let re;t[23]!==o?.description||t[24]!==o?.title||t[25]!==d||t[26]!==C||t[27]!==Qt||t[28]!==R||t[29]!==Jt||t[30]!==l?.description||t[31]!==l?.title||t[32]!==g?(re=Jt||Qt||R||C?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Jt,graphDescription:Qt,width:g,graphDownload:R?oe:void 0,dataDownload:C?d.map(Di).filter(Vi).length>0?d.map(Ni).filter($i):d.filter(Li):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=d,t[26]=C,t[27]=Qt,t[28]=R,t[29]=Jt,t[30]=l?.description,t[31]=l?.title,t[32]=g,t[33]=re):re=t[33];let le;t[34]!==I||t[35]!==fe||t[36]!==Y||t[37]!==a.enabled||t[38]!==r?(le=a.enabled&&r.length>0&&fe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{c(!Y)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Y?"Click to pause animation":"Click to play animation",children:Y?i.jsxRuntimeExports.jsx(Ce.Pause,{}):i.jsxRuntimeExports.jsx(Ce.Play,{})}),i.jsxRuntimeExports.jsx(Oe.Nr,{min:r[0],max:r[r.length-1],marks:fe,step:null,defaultValue:r[r.length-1],value:r[I],onChangeComplete:u=>{ae(r.indexOf(u))},onChange:u=>{ae(r.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=I,t[35]=fe,t[36]=Y,t[37]=a.enabled,t[38]=r,t[39]=le):le=t[39];let ce;t[40]!==be||t[41]!==B||t[42]!==tt||t[43]!==Yt||t[44]!==St||t[45]!==jt||t[46]!==o||t[47]!==Lt||t[48]!==E||t[49]!==$||t[50]!==et||t[51]!==h||t[52]!==d||t[53]!==te||t[54]!==v||t[55]!==D||t[56]!==mt||t[57]!==I||t[58]!==rt||t[59]!==A||t[60]!==Mt||t[61]!==ut||t[62]!==b||t[63]!==O||t[64]!==Gt||t[65]!==P||t[66]!==nt||t[67]!==Wt||t[68]!==Pt||t[69]!==st||t[70]!==j||t[71]!==K||t[72]!==lt||t[73]!==it||t[74]!==It||t[75]!==x||t[76]!==dt||t[77]!==Q||t[78]!==bt||t[79]!==_||t[80]!==G||t[81]!==y||t[82]!==l||t[83]!==Z||t[84]!==vt||t[85]!==pt||t[86]!==a.dateFormat||t[87]!==a.enabled||t[88]!==q||t[89]!==wt||t[90]!==z||t[91]!==r||t[92]!==U||t[93]!==g?(ce=d.length===0?i.jsxRuntimeExports.jsx(He.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[dt?i.jsxRuntimeExports.jsx(Xe.ColorLegendWithMouseOver,{width:g,colorDomain:Lt,colors:$,colorLegendTitle:E,setSelectedColor:ee,showNAColor:!1,className:o?.colorLegend}):null,i.jsxRuntimeExports.jsx(Re.GraphArea,{ref:ot,children:pt&&vt?i.jsxRuntimeExports.jsx(be,{data:y!==void 0?y==="diff"?Ee.orderBy(Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===je.format(new Date(r[I]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ii):u),Mi,[G||"asc"]).filter((u,Ct)=>b?Ct<b:!0):Ee.orderBy(Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===je.format(new Date(r[I]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ci):u),u=>qt.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[G||"asc"]).filter((u,Ct)=>b?Ct<b:!0):Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>D?!u.x.every(Ri):u).filter((u,Ct)=>b?Ct<b:!0),dotColors:$,width:pt,height:vt,radius:K,barPadding:St,showTicks:bt,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:z,showLabels:Q,showValues:_,tooltip:q,suffix:Z,prefix:j,onSeriesMouseOver:Pt,maxValue:qt.checkIfNullOrUndefined(O)?Math.max(...d.map(Ei))<0?0:Math.max(...d.map(Ai)):O,minValue:qt.checkIfNullOrUndefined(P)?Math.min(...d.map(wi))>0?0:Math.min(...d.map(bi)):P,onSeriesMouseClick:Wt,selectedColor:x,arrowConnector:tt,connectorStrokeWidth:et,maxBarThickness:ut,minBarThickness:Gt,resetSelectionOnDoubleClick:it,detailsOnClick:te,axisTitle:Yt,noOfTicks:nt,valueColor:U,styles:l,classNames:o,labelOrder:rt,refValues:lt,animate:B===!0?{duration:.5,once:!0,amount:.5}:B||{duration:0,once:!0,amount:0},precision:st,customLayers:h,highlightedDataPoints:mt,dimmedOpacity:v,rtl:A==="ar"||A==="he"}):null})]}),t[40]=be,t[41]=B,t[42]=tt,t[43]=Yt,t[44]=St,t[45]=jt,t[46]=o,t[47]=Lt,t[48]=E,t[49]=$,t[50]=et,t[51]=h,t[52]=d,t[53]=te,t[54]=v,t[55]=D,t[56]=mt,t[57]=I,t[58]=rt,t[59]=A,t[60]=Mt,t[61]=ut,t[62]=b,t[63]=O,t[64]=Gt,t[65]=P,t[66]=nt,t[67]=Wt,t[68]=Pt,t[69]=st,t[70]=j,t[71]=K,t[72]=lt,t[73]=it,t[74]=It,t[75]=x,t[76]=dt,t[77]=Q,t[78]=bt,t[79]=_,t[80]=G,t[81]=y,t[82]=l,t[83]=Z,t[84]=vt,t[85]=pt,t[86]=a.dateFormat,t[87]=a.enabled,t[88]=q,t[89]=wt,t[90]=z,t[91]=r,t[92]=U,t[93]=g,t[94]=ce):ce=t[94];let ue;t[95]!==o?.footnote||t[96]!==o?.source||t[97]!==at||t[98]!==Kt||t[99]!==l?.footnote||t[100]!==l?.source||t[101]!==g?(ue=Kt||at?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:Kt,footNote:at,width:g}):null,t[95]=o?.footnote,t[96]=o?.source,t[97]=at,t[98]=Kt,t[99]=l?.footnote,t[100]=l?.source,t[101]=g,t[102]=ue):ue=t[102];let ye;return t[103]!==Bt||t[104]!==J||t[105]!==kt||t[106]!==At||t[107]!==A||t[108]!==N||t[109]!==ct||t[110]!==L||t[111]!==ve||t[112]!==we||t[113]!==re||t[114]!==le||t[115]!==ce||t[116]!==ue||t[117]!==V||t[118]!==g?(ye=i.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:ve,style:we,id:kt,ref:oe,"aria-label":Bt,backgroundColor:J,theme:V,language:A,minHeight:N,width:g,height:At,relativeHeight:L,padding:ct,children:[re,le,ce,ue]}),t[103]=Bt,t[104]=J,t[105]=kt,t[106]=At,t[107]=A,t[108]=N,t[109]=ct,t[110]=L,t[111]=ve,t[112]=we,t[113]=re,t[114]=le,t[115]=ce,t[116]=ue,t[117]=V,t[118]=g,t[119]=ye):ye=t[119],ye}function bi(e){return Math.min(...e.x.filter(vi))}function vi(e){return e!==null}function wi(e){return Math.min(...e.x.filter(ji))}function ji(e){return e!==null}function Ai(e){return Math.max(...e.x.filter(ki))}function ki(e){return e!==null}function Ei(e){return Math.max(...e.x.filter(Oi))}function Oi(e){return e!==null}function Ri(e){return e==null}function Ci(e){return e==null}function Mi(e){return qt.checkIfNullOrUndefined(e.x[e.x.length-1])||qt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Ii(e){return e==null}function Li(e){return e!==void 0}function $i(e){return e!==void 0}function Ni(e){return e.data}function Vi(e){return e!==void 0}function Di(e){return e.data}function Si(e,t){return e-t}exports.DumbbellChart=gi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),Ee=require("./index-Cno4Q0YE.cjs"),je=require("./parse-hMnG_lRV.cjs"),T=require("react"),Oe=require("./getSliderMarks-BmADcPQt.cjs"),Me=require("./index-DQA8q5sC.cjs"),ke=require("./numberFormattingFunction-02t-wJta.cjs"),Ie=require("./Tooltip-uUdw6wJL.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./AxisTitle-sS5bLLR7.cjs"),Fe=require("./Axis-DxRV2yMi.cjs"),Pe=require("./XAxesLabels-Bt5NZBmX.cjs"),$e=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ne=require("./ReferenceLine-BH0qdf4R.cjs"),We=require("./XTicksAndGridLines-B6CELS7q.cjs"),Ge=require("./YAxesLabels-DesLesUP.cjs"),Ve=require("./DetailsModal-BN0HDFlV.cjs"),De=require("./linear-BwPAspcq.cjs"),Se=require("./band-VYfcZeJ2.cjs"),Te=require("./use-in-view-QcfiW0w3.cjs"),Tt=require("./proxy-BxvUI_9l.cjs"),qe=require("./index-DG2bgAva.cjs"),Ae=require("./ensureCompleteData-pZ9QO6kB.cjs"),Re=require("./GraphContainer-d8A46BK2.cjs"),Be=require("./GraphHeader.cjs"),Ce=require("./index-DRXx7m-C.cjs"),Ye=require("./GraphFooter.cjs"),Xe=require("./ColorLegendWithMouseOver.cjs"),He=require("./EmptyState-sAEZ_5rU.cjs"),Ue=require("./Colors.cjs");function ze(e){const t=i.compilerRuntimeExports.c(146),{data:d,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:k,barPadding:Ft,showTicks:Mt,truncateBy:It,width:wt,height:jt,radius:ht,showLabels:At,tooltip:g,onSeriesMouseOver:at,maxValue:Lt,minValue:E,onSeriesMouseClick:ct,showValues:Zt,suffix:ft,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:O,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:ut}=e,b=Jt===void 0?20:Jt,Gt=se===void 0?20:se,Bt=Kt===void 0?20:Kt,Dt=Qt===void 0?25:Qt,te=T.useRef(null);let Yt;t[0]!==p.amount||t[1]!==p.once?(Yt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Yt):Yt=t[2];const H=Te.useInView(te,Yt),U=P?b+30:b;let Xt;t[3]!==Dt||t[4]!==Gt||t[5]!==U||t[6]!==Bt?(Xt={top:Bt,bottom:Dt,left:U,right:Gt},t[3]=Dt,t[4]=Gt,t[5]=U,t[6]=Bt,t[7]=Xt):Xt=t[7];const l=Xt,o=wt-l.left-l.right,rt=jt-l.top-l.bottom,[lt,Ht]=T.useState(void 0),[yt,gt]=T.useState(void 0),[Ut,Et]=T.useState(void 0),[Ot,zt]=T.useState(void 0);let Rt;if(t[8]!==d||t[9]!==y){const f=new Set,h=d.map((v,w)=>{const a=y?`${v.label}`:`${w}`;return f.add(a),{...v,id:a}}),M=y?y.filter(v=>!f.has(v)):[];let mt;t[11]!==d[0]?(mt=v=>({id:v,label:v,x:Array(d[0].x.length).fill(null)}),t[11]=d[0],t[12]=mt):mt=t[12],Rt=[...h,...M.map(mt)],t[8]=d,t[9]=y,t[10]=Rt}else Rt=t[10];const G=Rt;let $;t[13]!==G||t[14]!==y?($=y??G.map(oi),t[13]=G,t[14]=y,t[15]=$):$=t[15];const St=$;let bt,z,J,K,Q,Z,j,R,C,_,tt,et,A,N,V;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==St||t[20]!==Ft||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Pt||t[29]!==X||t[30]!==G||t[31]!==O||t[32]!==ut||t[33]!==k||t[34]!==rt||t[35]!==o||t[36]!==jt||t[37]!==W||t[38]!==H||t[39]!==b||t[40]!==l.bottom||t[41]!==l.left||t[42]!==l.right||t[43]!==l.top||t[44]!==kt||t[45]!==Lt||t[46]!==$t||t[47]!==E||t[48]!==yt||t[49]!==Wt||t[50]!==ct||t[51]!==at||t[52]!==m||t[53]!==q||t[54]!==ht||t[55]!==Vt||t[56]!==_t||t[57]!==F||t[58]!==At||t[59]!==Mt||t[60]!==Zt||t[61]!==s?.dataConnectors||t[62]!==s?.graphObjectValues||t[63]!==s?.xAxis?.axis||t[64]!==s?.xAxis?.labels||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==s?.yAxis?.title||t[68]!==ft||t[69]!==It||t[70]!==Nt||t[71]!==wt){const f=De.linear().domain([E,Lt]).range([rt,0]).nice(),h=Se.band().domain(St).range([0,$t?Math.max(o,$t*G.length):kt?Math.min(o,kt*G.length):o]).paddingInner(Ft),M=f.ticks(Wt);z=Tt.motion.svg,C=`${wt}px`,_=`${jt}px`,tt=`0 0 ${wt} ${jt}`,et="ltr",A=te,t[87]!==L?(N=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=N):N=t[88],K=`translate(${l.left},${l.top})`;const mt=f(E<0?0:E),v=f(E<0?0:E),w=E<0?0:E;let a;t[89]!==m||t[90]!==q||t[91]!==ft||t[92]!==w?(a=ke.numberFormattingFunction(w,"NA",m,q,ft),t[89]=m,t[90]=q,t[91]=ft,t[92]=w,t[93]=a):a=t[93];const pt=n?.xAxis?.axis,ie=n?.yAxis?.labels;let vt;t[94]!==pt||t[95]!==ie?(vt={axis:pt,label:ie},t[94]=pt,t[95]=ie,t[96]=vt):vt=t[96];const ne=s?.xAxis?.axis,Y=s?.yAxis?.labels;let c;t[97]!==ne||t[98]!==Y?(c={axis:ne,label:Y},t[97]=ne,t[98]=Y,t[99]=c):c=t[99],Q=i.jsxRuntimeExports.jsx(Fe.Axis,{y1:mt,y2:v,x1:0-b,x2:o+l.right,label:a,labelPos:{x:0-b,dx:0,dy:Lt<0?"1em":-5,y:f(E<0?0:E)},classNames:vt,styles:c}),Z=Mt?i.jsxRuntimeExports.jsx($e.YTicksAndGridLines,{values:M.filter(si),y:M.filter(ni).map(x=>f(x)),x1:0-b,x2:o+l.right,styles:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ft,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const S=0-b-15,r=rt/2,I=s?.yAxis?.title,ae=n?.yAxis?.title;t[100]!==P||t[101]!==S||t[102]!==r||t[103]!==I||t[104]!==ae?(j=i.jsxRuntimeExports.jsx(Le.AxisTitle,{x:S,y:r,style:I,className:ae,text:P,rotate90:!0}),t[100]=P,t[101]=S,t[102]=r,t[103]=I,t[104]=ae,t[105]=j):j=t[105],t[106]!==X?(R=X.filter(ii).map(ei),t[106]=X,t[107]=R):R=t[107],bt=qe.AnimatePresence,V=G.map(x=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:h(`${x.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(x.label)!==-1?.85:ut:.85},whileInView:{x:h(`${x.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(x.label)!==-1?.85:ut:.85,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[At?i.jsxRuntimeExports.jsx(Pe.XAxesLabels,{value:`${x.label}`.length<It?`${x.label}`:`${`${x.label}`.substring(0,It)}...`,y:rt+5,x:0-h.bandwidth()/2,width:h.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:H}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{x1:0,x2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&x.x.indexOf(Math.min(...x.x.filter(ti)))===0?"url(#arrow)":"",markerStart:L&&x.x.indexOf(Math.min(...x.x.filter(_e)))===x.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:f(Math.min(...x.x.filter(Ze)))+ht,y2:f(Math.max(...x.x.filter(Qe)))-ht,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),x.x.map((ee,ot)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:oe=>{Ht({...x,xIndex:ot}),zt(oe.clientY),Et(oe.clientX),at?.({...x,xIndex:ot})},onClick:()=>{(ct||O)&&(Me.isEqual(yt,{...x,xIndex:ot})&&_t?(gt(void 0),ct?.(void 0)):(gt({...x,xIndex:ot}),ct&&ct({...x,xIndex:ot})))},onMouseMove:oe=>{Ht({...x,xIndex:ot}),zt(oe.clientY),Et(oe.clientX)},onMouseLeave:()=>{Ht(void 0),Et(void 0),zt(void 0),at?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?k[ot]===F?1:.3:1},whileInView:{opacity:F?k[ot]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:qt.checkIfNullOrUndefined(ee)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cx:0,r:ht,style:{fill:k[ot],fillOpacity:.85,stroke:k[ot],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:f(0),opacity:0},whileInView:{cy:f(ee||0),opacity:qt.checkIfNullOrUndefined(ee)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),Zt?i.jsxRuntimeExports.jsx(Tt.motion.text,{x:0,style:{textAnchor:"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(ee)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:f(0),opacity:0,fill:Nt||k[ot]},whileInView:{y:f(ee||0),fill:Nt||k[ot],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:ke.numberFormattingFunction(ee,"NA",m,q,ft)}):null]})},ot))]},x.label)),J=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((x,ee)=>i.jsxRuntimeExports.jsx(Ne.RefLineY,{text:x.text,color:x.color,y:f(x.value),x1:0-b,x2:o+l.right,classNames:x.classNames,styles:x.styles,animate:p,isInView:H},ee))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=St,t[20]=Ft,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Pt,t[29]=X,t[30]=G,t[31]=O,t[32]=ut,t[33]=k,t[34]=rt,t[35]=o,t[36]=jt,t[37]=W,t[38]=H,t[39]=b,t[40]=l.bottom,t[41]=l.left,t[42]=l.right,t[43]=l.top,t[44]=kt,t[45]=Lt,t[46]=$t,t[47]=E,t[48]=yt,t[49]=Wt,t[50]=ct,t[51]=at,t[52]=m,t[53]=q,t[54]=ht,t[55]=Vt,t[56]=_t,t[57]=F,t[58]=At,t[59]=Mt,t[60]=Zt,t[61]=s?.dataConnectors,t[62]=s?.graphObjectValues,t[63]=s?.xAxis?.axis,t[64]=s?.xAxis?.labels,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=s?.yAxis?.title,t[68]=ft,t[69]=It,t[70]=Nt,t[71]=wt,t[72]=bt,t[73]=z,t[74]=J,t[75]=K,t[76]=Q,t[77]=Z,t[78]=j,t[79]=R,t[80]=C,t[81]=_,t[82]=tt,t[83]=et,t[84]=A,t[85]=N,t[86]=V}else bt=t[72],z=t[73],J=t[74],K=t[75],Q=t[76],Z=t[77],j=t[78],R=t[79],C=t[80],_=t[81],tt=t[82],et=t[83],A=t[84],N=t[85],V=t[86];let it;t[108]!==bt||t[109]!==J||t[110]!==V?(it=i.jsxRuntimeExports.jsxs(bt,{children:[V,J]}),t[108]=bt,t[109]=J,t[110]=V,t[111]=it):it=t[111];let nt;t[112]!==X?(nt=X.filter(Ke).map(Je),t[112]=X,t[113]=nt):nt=t[113];let xt;t[114]!==K||t[115]!==Q||t[116]!==Z||t[117]!==j||t[118]!==R||t[119]!==it||t[120]!==nt?(xt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,Z,j,R,it,nt]}),t[114]=K,t[115]=Q,t[116]=Z,t[117]=j,t[118]=R,t[119]=it,t[120]=nt,t[121]=xt):xt=t[121];let D;t[122]!==z||t[123]!==C||t[124]!==_||t[125]!==tt||t[126]!==et||t[127]!==A||t[128]!==N||t[129]!==xt?(D=i.jsxRuntimeExports.jsxs(z,{width:C,height:_,viewBox:tt,direction:et,ref:A,children:[N,xt]}),t[122]=z,t[123]=C,t[124]=_,t[125]=tt,t[126]=et,t[127]=A,t[128]=N,t[129]=xt,t[130]=D):D=t[130];let B;t[131]!==n?.tooltip||t[132]!==Ut||t[133]!==Ot||t[134]!==lt||t[135]!==s?.tooltip||t[136]!==g?(B=lt&&g&&Ut&&Ot?i.jsxRuntimeExports.jsx(Ie.Tooltip,{data:lt,body:g,xPos:Ut,yPos:Ot,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[131]=n?.tooltip,t[132]=Ut,t[133]=Ot,t[134]=lt,t[135]=s?.tooltip,t[136]=g,t[137]=B):B=t[137];let st;t[138]!==n?.modal||t[139]!==O||t[140]!==yt?(st=O&&yt!==void 0?i.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:O,data:yt,setData:gt,className:n?.modal}):null,t[138]=n?.modal,t[139]=O,t[140]=yt,t[141]=st):st=t[141];let dt;return t[142]!==D||t[143]!==B||t[144]!==st?(dt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[142]=D,t[143]=B,t[144]=st,t[145]=dt):dt=t[145],dt}function Je(e){return e.layer}function Ke(e){return e.position==="after"}function Qe(e){return e!==null}function Ze(e){return e!==null}function _e(e){return e!==null}function ti(e){return e!==null}function ei(e){return e.layer}function ii(e){return e.position==="before"}function ni(e){return e!==0}function si(e){return e!==0}function oi(e){return`${e.id}`}function ai(e){const t=i.compilerRuntimeExports.c(139),{data:d,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:k,suffix:Ft,prefix:Mt,barPadding:It,showValues:wt,showTicks:jt,truncateBy:ht,width:At,height:g,radius:at,showLabels:Lt,tooltip:E,onSeriesMouseOver:ct,maxValue:Zt,minValue:ft,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:O,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:ut,dimmedOpacity:b}=e,Gt=Jt===void 0?100:Jt,Bt=se===void 0?40:se,Dt=Kt===void 0?20:Kt,te=Qt===void 0?10:Qt,Yt=T.useRef(null);let H;t[0]!==m.amount||t[1]!==m.once?(H={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=H):H=t[2];const U=Te.useInView(Yt,H),Xt=P?Dt+25:Dt;let l;t[3]!==te||t[4]!==Gt||t[5]!==Bt||t[6]!==Xt?(l={top:Xt,bottom:te,left:Gt,right:Bt},t[3]=te,t[4]=Gt,t[5]=Bt,t[6]=Xt,t[7]=l):l=t[7];const o=l,rt=At-o.left-o.right,lt=g-o.top-o.bottom,[Ht,yt]=T.useState(void 0),[gt,Ut]=T.useState(void 0),[Et,Ot]=T.useState(void 0),[zt,Rt]=T.useState(void 0);let G;if(t[8]!==d||t[9]!==y){const h=new Set,M=d.map((w,a)=>{const pt=y?`${w.label}`:`${a}`;return h.add(pt),{...w,id:pt}}),mt=y?y.filter(w=>!h.has(w)):[];let v;t[11]!==d[0]?(v=w=>({id:w,label:w,x:Array(d[0].x.length).fill(null)}),t[11]=d[0],t[12]=v):v=t[12],G=[...M,...mt.map(v)],t[8]=d,t[9]=y,t[10]=G}else G=t[10];const $=G;let St;t[13]!==$||t[14]!==y?(St=y??$.map(yi),t[13]=$,t[14]=y,t[15]=St):St=t[15];const bt=St;let z,J,K,Q,Z,j,R,C,_,tt,et,A,N,V,it;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==bt||t[20]!==It||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Pt||t[29]!==W||t[30]!==$||t[31]!==O||t[32]!==b||t[33]!==k||t[34]!==lt||t[35]!==rt||t[36]!==g||t[37]!==ut||t[38]!==U||t[39]!==o.bottom||t[40]!==o.left||t[41]!==o.top||t[42]!==kt||t[43]!==Zt||t[44]!==$t||t[45]!==ft||t[46]!==gt||t[47]!==Wt||t[48]!==q||t[49]!==ct||t[50]!==X||t[51]!==Mt||t[52]!==at||t[53]!==Vt||t[54]!==_t||t[55]!==p||t[56]!==F||t[57]!==Lt||t[58]!==jt||t[59]!==wt||t[60]!==s?.dataConnectors||t[61]!==s?.graphObjectValues||t[62]!==s?.xAxis?.gridLines||t[63]!==s?.xAxis?.labels||t[64]!==s?.xAxis?.title||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==Ft||t[68]!==Dt||t[69]!==ht||t[70]!==Nt||t[71]!==At){const h=De.linear().domain([ft,Zt]).range([0,rt]).nice(),M=Se.band().domain(bt).range([0,$t?Math.max(lt,$t*$.length):kt?Math.min(lt,kt*$.length):lt]).paddingInner(It),mt=h.ticks(Wt);J=Tt.motion.svg,_=`${At}px`,tt=`${g}px`,et=`0 0 ${At} ${g}`,A="ltr",N=Yt,t[87]!==L?(V=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=V):V=t[88],Q=`translate(${o.left},${o.top})`,Z=jt?i.jsxRuntimeExports.jsx(We.XTicksAndGridLines,{values:mt.filter(fi),x:mt.filter(hi).map(c=>h(c)),y1:0-Dt,y2:lt+o.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Ft,prefix:Mt,labelType:"secondary",showGridLines:!0,precision:X}):null;const v=rt/2,w=0-o.top+15,a=s?.xAxis?.title,pt=n?.xAxis?.title;t[89]!==P||t[90]!==v||t[91]!==w||t[92]!==a||t[93]!==pt?(j=i.jsxRuntimeExports.jsx(Le.AxisTitle,{x:v,y:w,style:a,className:pt,text:P}),t[89]=P,t[90]=v,t[91]=w,t[92]=a,t[93]=pt,t[94]=j):j=t[94];const ie=s?.yAxis?.gridLines;let vt;t[95]!==ie?(vt={gridLines:ie},t[95]=ie,t[96]=vt):vt=t[96];const ne=n?.yAxis?.gridLines;let Y;t[97]!==ne?(Y={gridLines:ne},t[97]=ne,t[98]=Y):Y=t[98],R=i.jsxRuntimeExports.jsx($e.YTicksAndGridLines,{y:$.map(c=>M(`${c.id}`)+M.bandwidth()/2),x1:0,x2:rt,styles:vt,classNames:Y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(C=W.filter(pi).map(mi),t[99]=W,t[100]=C):C=t[100],z=qe.AnimatePresence,it=$.map(c=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:M(`${c.id}`)+M.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85},whileInView:{x:0,y:M(`${c.id}`)+M.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Lt?i.jsxRuntimeExports.jsx(Ge.YAxesLabels,{value:`${c.label}`.length<ht?`${c.label}`:`${`${c.label}`.substring(0,ht)}...`,y:0-M.bandwidth()/2,x:0-o.left,width:o.left,height:M.bandwidth(),alignment:"right",style:s?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:U}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{y1:0,y2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&c.x.indexOf(Math.min(...c.x.filter(di)))===0?"url(#arrow)":"",markerStart:L&&c.x.indexOf(Math.min(...c.x.filter(xi)))===c.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:h(Math.min(...c.x.filter(ui)))+at,x2:h(Math.max(...c.x.filter(ci)))-at,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),c.x.map((S,r)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:I=>{yt({...c,xIndex:r}),Rt(I.clientY),Ot(I.clientX),ct?.({...c,xIndex:r})},onClick:()=>{(q||O)&&(Me.isEqual(gt,{...c,xIndex:r})&&_t?(Ut(void 0),q?.(void 0)):(Ut({...c,xIndex:r}),q&&q({...c,xIndex:r})))},onMouseMove:I=>{yt({...c,xIndex:r}),Rt(I.clientY),Ot(I.clientX)},onMouseLeave:()=>{yt(void 0),Ot(void 0),Rt(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?k[r]===F?1:.3:1},whileInView:{opacity:F?k[r]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:qt.checkIfNullOrUndefined(S)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cy:0,r:at,style:{fill:k[r],fillOpacity:.85,stroke:k[r],strokeWidth:1,opacity:qt.checkIfNullOrUndefined(S)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:h(0),opacity:0},whileInView:{cx:h(S||0),opacity:qt.checkIfNullOrUndefined(S)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),wt?i.jsxRuntimeExports.jsx(Tt.motion.text,{y:0,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dx:0,dy:0-at-3,className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(S)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:h(0),opacity:0,fill:Nt||k[r]},whileInView:{x:h(S||0),fill:Nt||k[r],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:ke.numberFormattingFunction(S,"NA",X,Mt,Ft)}):null]})},r))]},c.label)),K=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((c,S)=>i.jsxRuntimeExports.jsx(Ne.RefLineX,{text:c.text,color:c.color,x:h(c.value),y1:0-o.top,y2:lt+o.bottom,textSide:h(c.value)>rt*.75||p?"left":"right",classNames:c.classNames,styles:c.styles,animate:m,isInView:U},S))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=bt,t[20]=It,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Pt,t[29]=W,t[30]=$,t[31]=O,t[32]=b,t[33]=k,t[34]=lt,t[35]=rt,t[36]=g,t[37]=ut,t[38]=U,t[39]=o.bottom,t[40]=o.left,t[41]=o.top,t[42]=kt,t[43]=Zt,t[44]=$t,t[45]=ft,t[46]=gt,t[47]=Wt,t[48]=q,t[49]=ct,t[50]=X,t[51]=Mt,t[52]=at,t[53]=Vt,t[54]=_t,t[55]=p,t[56]=F,t[57]=Lt,t[58]=jt,t[59]=wt,t[60]=s?.dataConnectors,t[61]=s?.graphObjectValues,t[62]=s?.xAxis?.gridLines,t[63]=s?.xAxis?.labels,t[64]=s?.xAxis?.title,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=Ft,t[68]=Dt,t[69]=ht,t[70]=Nt,t[71]=At,t[72]=z,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=j,t[78]=R,t[79]=C,t[80]=_,t[81]=tt,t[82]=et,t[83]=A,t[84]=N,t[85]=V,t[86]=it}else z=t[72],J=t[73],K=t[74],Q=t[75],Z=t[76],j=t[77],R=t[78],C=t[79],_=t[80],tt=t[81],et=t[82],A=t[83],N=t[84],V=t[85],it=t[86];let nt;t[101]!==z||t[102]!==K||t[103]!==it?(nt=i.jsxRuntimeExports.jsxs(z,{children:[it,K]}),t[101]=z,t[102]=K,t[103]=it,t[104]=nt):nt=t[104];let xt;t[105]!==W?(xt=W.filter(li).map(ri),t[105]=W,t[106]=xt):xt=t[106];let D;t[107]!==Q||t[108]!==Z||t[109]!==j||t[110]!==R||t[111]!==C||t[112]!==nt||t[113]!==xt?(D=i.jsxRuntimeExports.jsxs("g",{transform:Q,children:[Z,j,R,C,nt,xt]}),t[107]=Q,t[108]=Z,t[109]=j,t[110]=R,t[111]=C,t[112]=nt,t[113]=xt,t[114]=D):D=t[114];let B;t[115]!==J||t[116]!==_||t[117]!==tt||t[118]!==et||t[119]!==A||t[120]!==N||t[121]!==V||t[122]!==D?(B=i.jsxRuntimeExports.jsxs(J,{width:_,height:tt,viewBox:et,direction:A,ref:N,children:[V,D]}),t[115]=J,t[116]=_,t[117]=tt,t[118]=et,t[119]=A,t[120]=N,t[121]=V,t[122]=D,t[123]=B):B=t[123];let st;t[124]!==n?.tooltip||t[125]!==Et||t[126]!==zt||t[127]!==Ht||t[128]!==s?.tooltip||t[129]!==E?(st=Ht&&E&&Et&&zt?i.jsxRuntimeExports.jsx(Ie.Tooltip,{data:Ht,body:E,xPos:Et,yPos:zt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=Et,t[126]=zt,t[127]=Ht,t[128]=s?.tooltip,t[129]=E,t[130]=st):st=t[130];let dt;t[131]!==n?.modal||t[132]!==O||t[133]!==gt?(dt=O&>!==void 0?i.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:O,data:gt,setData:Ut,className:n?.modal}):null,t[131]=n?.modal,t[132]=O,t[133]=gt,t[134]=dt):dt=t[134];let f;return t[135]!==B||t[136]!==st||t[137]!==dt?(f=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[B,st,dt]}),t[135]=B,t[136]=st,t[137]=dt,t[138]=f):f=t[138],f}function ri(e){return e.layer}function li(e){return e.position==="after"}function ci(e){return e!==null}function ui(e){return e!==null}function xi(e){return e!==null}function di(e){return e!==null}function mi(e){return e.layer}function pi(e){return e.position==="before"}function hi(e,t){return t!==0}function fi(e,t){return t!==0}function yi(e){return`${e.id}`}function gi(e){const t=i.compilerRuntimeExports.c(120),{data:d,graphTitle:Jt,colors:se,sources:Kt,graphDescription:Qt,barPadding:k,showTicks:Ft,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:ht,height:At,width:g,footNote:at,colorDomain:Lt,colorLegendTitle:E,padding:ct,backgroundColor:Zt,radius:ft,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Pt,graphID:kt,suffix:$t,prefix:_t,maxValue:O,minValue:P,onSeriesMouseClick:Wt,graphDownload:Nt,dataDownload:s,showValues:n,sortParameter:y,arrowConnector:Vt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:ut,maxNumberOfBars:b,minBarThickness:Gt,ariaLabel:Bt,resetSelectionOnDoubleClick:Dt,detailsOnClick:te,axisTitle:Yt,noOfTicks:H,valueColor:U,orientation:Xt,styles:l,classNames:o,labelOrder:rt,refValues:lt,filterNA:Ht,animate:yt,precision:gt,showColorScale:Ut,customLayers:Et,highlightedDataPoints:Ot,dimmedOpacity:zt,timeline:Rt,sortData:G}=e,$=se===void 0?Ue.Colors.light.categoricalColors.colors:se,St=k===void 0?.25:k,bt=Ft===void 0?!0:Ft,z=ht===void 0?999:ht,J=Zt===void 0?!0:Zt,K=ft===void 0?3:ft,Q=F===void 0?!0:F,Z=$t===void 0?"":$t,j=_t===void 0?"":_t,R=Nt===void 0?!1:Nt,C=s===void 0?!1:s,_=n===void 0?!0:n,tt=Vt===void 0?!1:Vt,et=p===void 0?2:p,A=m===void 0?"en":m,N=X===void 0?0:X,V=W===void 0?"light":W,it=Dt===void 0?!0:Dt,nt=H===void 0?5:H,xt=Xt===void 0?"vertical":Xt,D=Ht===void 0?!0:Ht,B=yt===void 0?!1:yt,st=gt===void 0?2:gt,dt=Ut===void 0?!0:Ut;let f;t[0]!==Et?(f=Et===void 0?[]:Et,t[0]=Et,t[1]=f):f=t[1];const h=f;let M;t[2]!==Ot?(M=Ot===void 0?[]:Ot,t[2]=Ot,t[3]=M):M=t[3];const mt=M,v=zt===void 0?.3:zt;let w;t[4]!==Rt?(w=Rt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Rt,t[4]=Rt,t[5]=w):w=t[5];const a=w,[pt,ie]=T.useState(0),[vt,ne]=T.useState(0),[Y,c]=T.useState(a.autoplay);let S;if(t[6]!==d||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ct=>je.parse(`${Ct.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],S=[...new Set(d.filter(Ti).map(u))],S.sort(Si),t[6]=d,t[7]=a.dateFormat,t[8]=S}else S=t[8];const r=S,[I,ae]=T.useState(a.autoplay?0:r.length-1),[x,ee]=T.useState(void 0),ot=T.useRef(null),oe=T.useRef(null);let xe,de;t[11]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>{const u=new ResizeObserver(Ct=>{ie(Ct[0].target.clientWidth||620),ne(Ct[0].target.clientHeight||480)});return ot.current&&u.observe(ot.current),()=>u.disconnect()},de=[],t[11]=xe,t[12]=de):(xe=t[11],de=t[12]),T.useEffect(xe,de);let me,pe;t[13]!==Y||t[14]!==a.speed||t[15]!==r?(me=()=>{const u=setInterval(()=>{ae(Ct=>Ct<r.length-1?Ct+1:0)},(a.speed||2)*1e3);return Y||clearInterval(u),()=>clearInterval(u)},pe=[r,Y,a.speed],t[13]=Y,t[14]=a.speed,t[15]=r,t[16]=me,t[17]=pe):(me=t[16],pe=t[17]),T.useEffect(me,pe);const ge=a.dateFormat||"yyyy";let he;t[18]!==I||t[19]!==ge||t[20]!==a.showOnlyActiveDate||t[21]!==r?(he=Oe.getSliderMarks(r,I,a.showOnlyActiveDate,ge),t[18]=I,t[19]=ge,t[20]=a.showOnlyActiveDate,t[21]=r,t[22]=he):he=t[22];const fe=he,be=xt==="horizontal"?ai:ze,ve=o?.graphContainer,we=l?.graphContainer;let re;t[23]!==o?.description||t[24]!==o?.title||t[25]!==d||t[26]!==C||t[27]!==Qt||t[28]!==R||t[29]!==Jt||t[30]!==l?.description||t[31]!==l?.title||t[32]!==g?(re=Jt||Qt||R||C?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Jt,graphDescription:Qt,width:g,graphDownload:R?oe:void 0,dataDownload:C?d.map(Di).filter(Vi).length>0?d.map(Ni).filter($i):d.filter(Li):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=d,t[26]=C,t[27]=Qt,t[28]=R,t[29]=Jt,t[30]=l?.description,t[31]=l?.title,t[32]=g,t[33]=re):re=t[33];let le;t[34]!==I||t[35]!==fe||t[36]!==Y||t[37]!==a.enabled||t[38]!==r?(le=a.enabled&&r.length>0&&fe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{c(!Y)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Y?"Click to pause animation":"Click to play animation",children:Y?i.jsxRuntimeExports.jsx(Ce.Pause,{}):i.jsxRuntimeExports.jsx(Ce.Play,{})}),i.jsxRuntimeExports.jsx(Oe.Nr,{min:r[0],max:r[r.length-1],marks:fe,step:null,defaultValue:r[r.length-1],value:r[I],onChangeComplete:u=>{ae(r.indexOf(u))},onChange:u=>{ae(r.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=I,t[35]=fe,t[36]=Y,t[37]=a.enabled,t[38]=r,t[39]=le):le=t[39];let ce;t[40]!==be||t[41]!==B||t[42]!==tt||t[43]!==Yt||t[44]!==St||t[45]!==jt||t[46]!==o||t[47]!==Lt||t[48]!==E||t[49]!==$||t[50]!==et||t[51]!==h||t[52]!==d||t[53]!==te||t[54]!==v||t[55]!==D||t[56]!==mt||t[57]!==I||t[58]!==rt||t[59]!==A||t[60]!==Mt||t[61]!==ut||t[62]!==b||t[63]!==O||t[64]!==Gt||t[65]!==P||t[66]!==nt||t[67]!==Wt||t[68]!==Pt||t[69]!==st||t[70]!==j||t[71]!==K||t[72]!==lt||t[73]!==it||t[74]!==It||t[75]!==x||t[76]!==dt||t[77]!==Q||t[78]!==bt||t[79]!==_||t[80]!==G||t[81]!==y||t[82]!==l||t[83]!==Z||t[84]!==vt||t[85]!==pt||t[86]!==a.dateFormat||t[87]!==a.enabled||t[88]!==q||t[89]!==wt||t[90]!==z||t[91]!==r||t[92]!==U||t[93]!==g?(ce=d.length===0?i.jsxRuntimeExports.jsx(He.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[dt?i.jsxRuntimeExports.jsx(Xe.ColorLegendWithMouseOver,{width:g,colorDomain:Lt,colors:$,colorLegendTitle:E,setSelectedColor:ee,showNAColor:!1,className:o?.colorLegend}):null,i.jsxRuntimeExports.jsx(Re.GraphArea,{ref:ot,children:pt&&vt?i.jsxRuntimeExports.jsx(be,{data:y!==void 0?y==="diff"?Ee.orderBy(Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===je.format(new Date(r[I]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ii):u),Mi,[G||"asc"]).filter((u,Ct)=>b?Ct<b:!0):Ee.orderBy(Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===je.format(new Date(r[I]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ci):u),u=>qt.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[G||"asc"]).filter((u,Ct)=>b?Ct<b:!0):Ae.ensureCompleteDataForDumbbellChart(d,a.dateFormat||"yyyy").filter(u=>D?!u.x.every(Ri):u).filter((u,Ct)=>b?Ct<b:!0),dotColors:$,width:pt,height:vt,radius:K,barPadding:St,showTicks:bt,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:z,showLabels:Q,showValues:_,tooltip:q,suffix:Z,prefix:j,onSeriesMouseOver:Pt,maxValue:qt.checkIfNullOrUndefined(O)?Math.max(...d.map(Ei))<0?0:Math.max(...d.map(Ai)):O,minValue:qt.checkIfNullOrUndefined(P)?Math.min(...d.map(wi))>0?0:Math.min(...d.map(bi)):P,onSeriesMouseClick:Wt,selectedColor:x,arrowConnector:tt,connectorStrokeWidth:et,maxBarThickness:ut,minBarThickness:Gt,resetSelectionOnDoubleClick:it,detailsOnClick:te,axisTitle:Yt,noOfTicks:nt,valueColor:U,styles:l,classNames:o,labelOrder:rt,refValues:lt,animate:B===!0?{duration:.5,once:!0,amount:.5}:B||{duration:0,once:!0,amount:0},precision:st,customLayers:h,highlightedDataPoints:mt,dimmedOpacity:v,rtl:A==="ar"||A==="he"}):null})]}),t[40]=be,t[41]=B,t[42]=tt,t[43]=Yt,t[44]=St,t[45]=jt,t[46]=o,t[47]=Lt,t[48]=E,t[49]=$,t[50]=et,t[51]=h,t[52]=d,t[53]=te,t[54]=v,t[55]=D,t[56]=mt,t[57]=I,t[58]=rt,t[59]=A,t[60]=Mt,t[61]=ut,t[62]=b,t[63]=O,t[64]=Gt,t[65]=P,t[66]=nt,t[67]=Wt,t[68]=Pt,t[69]=st,t[70]=j,t[71]=K,t[72]=lt,t[73]=it,t[74]=It,t[75]=x,t[76]=dt,t[77]=Q,t[78]=bt,t[79]=_,t[80]=G,t[81]=y,t[82]=l,t[83]=Z,t[84]=vt,t[85]=pt,t[86]=a.dateFormat,t[87]=a.enabled,t[88]=q,t[89]=wt,t[90]=z,t[91]=r,t[92]=U,t[93]=g,t[94]=ce):ce=t[94];let ue;t[95]!==o?.footnote||t[96]!==o?.source||t[97]!==at||t[98]!==Kt||t[99]!==l?.footnote||t[100]!==l?.source||t[101]!==g?(ue=Kt||at?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:Kt,footNote:at,width:g}):null,t[95]=o?.footnote,t[96]=o?.source,t[97]=at,t[98]=Kt,t[99]=l?.footnote,t[100]=l?.source,t[101]=g,t[102]=ue):ue=t[102];let ye;return t[103]!==Bt||t[104]!==J||t[105]!==kt||t[106]!==At||t[107]!==A||t[108]!==N||t[109]!==ct||t[110]!==L||t[111]!==ve||t[112]!==we||t[113]!==re||t[114]!==le||t[115]!==ce||t[116]!==ue||t[117]!==V||t[118]!==g?(ye=i.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:ve,style:we,id:kt,ref:oe,"aria-label":Bt,backgroundColor:J,theme:V,language:A,minHeight:N,width:g,height:At,relativeHeight:L,padding:ct,children:[re,le,ce,ue]}),t[103]=Bt,t[104]=J,t[105]=kt,t[106]=At,t[107]=A,t[108]=N,t[109]=ct,t[110]=L,t[111]=ve,t[112]=we,t[113]=re,t[114]=le,t[115]=ce,t[116]=ue,t[117]=V,t[118]=g,t[119]=ye):ye=t[119],ye}function bi(e){return Math.min(...e.x.filter(vi))}function vi(e){return e!==null}function wi(e){return Math.min(...e.x.filter(ji))}function ji(e){return e!==null}function Ai(e){return Math.max(...e.x.filter(ki))}function ki(e){return e!==null}function Ei(e){return Math.max(...e.x.filter(Oi))}function Oi(e){return e!==null}function Ri(e){return e==null}function Ci(e){return e==null}function Mi(e){return qt.checkIfNullOrUndefined(e.x[e.x.length-1])||qt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Ii(e){return e==null}function Li(e){return e!==void 0}function $i(e){return e!==void 0}function Ni(e){return e.data}function Vi(e){return e!==void 0}function Di(e){return e.data}function Si(e,t){return e-t}function Ti(e){return e.date}exports.DumbbellChart=gi;
|
|
2
2
|
//# sourceMappingURL=DumbbellChart.cjs.map
|