@undp/data-viz 2.3.3 → 2.3.5

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.
Files changed (146) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.js +1 -1
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.js +1 -1
  7. package/dist/BeeSwarmChart.cjs +1 -1
  8. package/dist/BeeSwarmChart.js +2 -2
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.js +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.js +1 -1
  13. package/dist/ButterflyChart.cjs +1 -1
  14. package/dist/ButterflyChart.js +1 -1
  15. package/dist/ChoroplethMap.cjs +1 -1
  16. package/dist/ChoroplethMap.js +1 -1
  17. package/dist/CirclePackingGraph.cjs +1 -1
  18. package/dist/CirclePackingGraph.d.ts +2 -0
  19. package/dist/CirclePackingGraph.js +2 -2
  20. package/dist/ColorLegend.cjs +1 -1
  21. package/dist/ColorLegend.js +1 -1
  22. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  23. package/dist/ColorLegendWithMouseOver.js +1 -1
  24. package/dist/DataCards.cjs +1 -1
  25. package/dist/DataCards.js +2 -2
  26. package/dist/DataTable.cjs +1 -1
  27. package/dist/DataTable.js +1 -1
  28. package/dist/DifferenceLineChart.cjs +1 -1
  29. package/dist/DifferenceLineChart.js +1 -1
  30. package/dist/DonutChart.cjs +1 -1
  31. package/dist/DonutChart.js +3 -3
  32. package/dist/DotDensityMap.cjs +1 -1
  33. package/dist/DotDensityMap.js +1 -1
  34. package/dist/DualAxisLineChart.cjs +1 -1
  35. package/dist/DualAxisLineChart.js +1 -1
  36. package/dist/DumbbellChart.cjs +1 -1
  37. package/dist/DumbbellChart.js +1 -1
  38. package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
  39. package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
  40. package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
  41. package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
  42. package/dist/FootNote.cjs +1 -1
  43. package/dist/FootNote.js +1 -1
  44. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  45. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  46. package/dist/GraphDescription.cjs +1 -1
  47. package/dist/GraphDescription.js +1 -1
  48. package/dist/{GraphEl-DDXkYObU.js → GraphEl-Bw-9MUym.js} +8 -7
  49. package/dist/GraphEl-Bw-9MUym.js.map +1 -0
  50. package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-DjElfY07.cjs} +2 -2
  51. package/dist/GraphEl-DjElfY07.cjs.map +1 -0
  52. package/dist/GraphFooter.cjs +1 -1
  53. package/dist/GraphFooter.js +1 -1
  54. package/dist/GraphTitle.cjs +1 -1
  55. package/dist/GraphTitle.js +1 -1
  56. package/dist/GriddedGraphs.cjs +1 -1
  57. package/dist/GriddedGraphs.d.ts +1 -0
  58. package/dist/GriddedGraphs.js +1 -1
  59. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  60. package/dist/HeatMap.cjs +1 -1
  61. package/dist/HeatMap.js +1 -1
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.js +1 -1
  64. package/dist/HybridMap.cjs +1 -1
  65. package/dist/HybridMap.js +2 -2
  66. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  67. package/dist/LineChartWithConfidenceInterval.js +1 -1
  68. package/dist/LinearColorLegend.cjs +1 -1
  69. package/dist/LinearColorLegend.js +1 -1
  70. package/dist/MultiGraphDashboard.d.ts +1 -0
  71. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  72. package/dist/MultiLineAltChart.cjs +1 -1
  73. package/dist/MultiLineAltChart.js +1 -1
  74. package/dist/MultiLineChart.cjs +1 -1
  75. package/dist/MultiLineChart.js +1 -1
  76. package/dist/ParetoChart.cjs +1 -1
  77. package/dist/ParetoChart.js +1 -1
  78. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  79. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  80. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  81. package/dist/RadarChart.cjs +1 -1
  82. package/dist/RadarChart.js +1 -1
  83. package/dist/SankeyChart.cjs +1 -1
  84. package/dist/SankeyChart.js +2 -2
  85. package/dist/ScatterPlot.cjs +1 -1
  86. package/dist/ScatterPlot.js +1 -1
  87. package/dist/ScrollStory.d.ts +1 -0
  88. package/dist/SimpleLineChart.cjs +1 -1
  89. package/dist/SimpleLineChart.js +1 -1
  90. package/dist/SingleGraphDashboard.cjs +1 -1
  91. package/dist/SingleGraphDashboard.d.ts +1 -0
  92. package/dist/SingleGraphDashboard.js +1 -1
  93. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  94. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  95. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  96. package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
  97. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  98. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  99. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  100. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  101. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  102. package/dist/SlopeChart.cjs +1 -1
  103. package/dist/SlopeChart.js +1 -1
  104. package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
  105. package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
  106. package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
  107. package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
  108. package/dist/Source.cjs +1 -1
  109. package/dist/Source.js +2 -2
  110. package/dist/StatCardFromData.cjs +1 -1
  111. package/dist/StatCardFromData.js +1 -1
  112. package/dist/StripChart.cjs +1 -1
  113. package/dist/StripChart.js +1 -1
  114. package/dist/ThreeDGlobe.cjs +1 -1
  115. package/dist/ThreeDGlobe.js +1 -1
  116. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  117. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  118. package/dist/TreeMapGraph.cjs +1 -1
  119. package/dist/TreeMapGraph.js +2 -2
  120. package/dist/Types.d.ts +1 -0
  121. package/dist/Typography-Cc_iHQB-.cjs +2 -0
  122. package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
  123. package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
  124. package/dist/Typography-CdMGooqp.js.map +1 -0
  125. package/dist/UnitChart.cjs +1 -1
  126. package/dist/UnitChart.js +1 -1
  127. package/dist/WaterfallChart.cjs +1 -1
  128. package/dist/WaterfallChart.js +1 -1
  129. package/dist/index-BzNfurbO.js +378 -0
  130. package/dist/index-BzNfurbO.js.map +1 -0
  131. package/dist/index-CXobQn-E.cjs +2 -0
  132. package/dist/index-CXobQn-E.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +3 -0
  135. package/dist/index.js +2 -2
  136. package/dist/style.css +1 -1
  137. package/package.json +3 -3
  138. package/dist/GraphEl-CWjTuiYd.cjs.map +0 -1
  139. package/dist/GraphEl-DDXkYObU.js.map +0 -1
  140. package/dist/Typography-DrJ7IOdw.cjs +0 -2
  141. package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
  142. package/dist/Typography-iR8PEgdt.js.map +0 -1
  143. package/dist/index-BE-lvE4c.js +0 -337
  144. package/dist/index-BE-lvE4c.js.map +0 -1
  145. package/dist/index-DlrGwLQA.cjs +0 -2
  146. package/dist/index-DlrGwLQA.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),yt=require("./getSliderMarks-CIuSoedo.cjs"),Ct=require("./Spinner-jTMOLuw_.cjs"),vt=require("./parse-xYI9yrvL.cjs"),Dt=require("./index-DQA8q5sC.cjs"),F=require("./index-DLFt97gy.cjs"),jt=require("./Typography-DrJ7IOdw.cjs"),St=require("./index-C5K--w8d.cjs"),Nt=require("./numberFormattingFunction-02t-wJta.cjs"),Mt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),gt=require("./index-sbKVyHS2.cjs"),qt=require("./DetailsModal-DHttOA80.cjs"),It=require("./ordinal-CrsysVE-.cjs"),Pt=require("./threshold-DNsSUf8Q.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Qe=require("./proxy-C4-uo6nS.cjs"),zt=require("./use-in-view-C3o_ntMv.cjs"),At=require("./index-CoobIWNj.cjs"),Bt=require("./GraphFooter.cjs"),Ft=require("./GraphHeader.cjs"),et=require("./Colors.cjs"),_t=require("./fetchAndParseData-QTF6tjij.cjs"),Lt=require("./getUniqValue-NX8DgwND.cjs"),Tt=require("./getJenks-BzJvhy_H.cjs"),bt=require("./GraphContainer-B1EDxJ0S.cjs");function Wt(d){const{data:e,colorDomain:r,colors:n,mapData:_,colorLegendTitle:E,categorical:L,height:f,width:h,scale:x,centerPoint:T,tooltip:Z,mapBorderWidth:Q,mapBorderColor:xe,mapNoDataColor:ge,onSeriesMouseOver:ee,showColorScale:fe,zoomScaleExtend:Oe,zoomTranslateExtend:qe,highlightedIds:b,onSeriesMouseClick:te,mapProperty:g,resetSelectionOnDoubleClick:ye,detailsOnClick:H,styles:Ie,classNames:oe,mapProjection:D,zoomInteraction:S,animate:k,dimmedOpacity:N,customLayers:re,collapseColorScaleByDefault:ve,zoomAndCenterByHighlightedIds:je,projectionRotate:W,rewindCoordinatesInMapData:be}=d,y=c.useMemo(()=>be?F.index_default(_,{reverse:!0}):_,[_,be]),[w,M]=c.useState(void 0),V=c.useRef(null),[Pe,ae]=c.useState(ve===void 0?!(h<680):!ve),[u,p]=c.useState(void 0),[U,ne]=c.useState(void 0),[Ee,se]=c.useState(void 0),[X,$]=c.useState(void 0),O=c.useRef(null),Y=zt.useInView(O,{once:k.once,amount:k.amount}),ke=c.useRef(null),ze=L?It.ordinal().domain(r).range(n):Pt.threshold().domain(r).range(n);c.useEffect(()=>{const o=xt.select(ke.current),a=xt.select(O.current),j=i=>{if(S==="noZoom")return!1;if(S==="button")return!i.type.includes("wheel");const le=i.type==="wheel",ce=i.type.startsWith("touch"),Se=i.type==="mousedown"||i.type==="mousemove";return ce?!0:le?S==="scroll"?!0:i.ctrlKey:Se&&!i.button&&!i.ctrlKey},C=F.zoom().scaleExtent(Oe).translateExtent(qe||[[-20,-20],[h+20,f+20]]).filter(j).on("zoom",({transform:i})=>{o.attr("transform",i)});a.call(C),V.current=C},[f,h,S]);const v=F.index_default$1({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),R=St.index_default({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),q=(v[2]-v[0])*1.15,we=(v[3]-v[1])*1.15,Re=h*190/960*360/q,Ce=f*190/678*180/we,I=x*Math.min(Re,Ce),De=D==="mercator"?F.geoMercator().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="equalEarth"?F.geoEqualEarth().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="naturalEarth"?F.geoNaturalEarth1().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="orthographic"?F.geoOrthographic().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):F.geoAlbersUsa().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I),G=F.geoPath().projection(De),ie=o=>{if(!O.current||!V.current)return;xt.select(O.current).call(V.current.scaleBy,o==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(Qe.motion.svg,{width:`${h}px`,height:`${f}px`,viewBox:`0 0 ${h} ${f}`,ref:O,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:ke,children:[re.filter(o=>o.position==="before").map(o=>o.layer),y.features.map((o,a)=>{if(!o.properties?.[g])return null;const j=G(o);return j?t.jsxRuntimeExports.jsx(Qe.motion.g,{opacity:w?N:b.length!==0?b.indexOf(o.properties[g])!==-1?1:N:1,children:t.jsxRuntimeExports.jsx("path",{d:j,style:{stroke:xe,strokeWidth:Q,fill:ge}})},a):null}),t.jsxRuntimeExports.jsx(At.AnimatePresence,{children:e.map(o=>{const a=y.features.findIndex(i=>o.id===i.properties[g]);if(a===-1)return null;const j=G(y.features[a]);if(!j)return null;const C=Ot.checkIfNullOrUndefined(o.x)?ge:ze(o.x);return t.jsxRuntimeExports.jsx(Qe.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:w?w===C?1:N:b.length!==0?b.indexOf(o.id)!==-1?1:N:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},onMouseEnter:i=>{ne(o),$(i.clientY),se(i.clientX),ee?.(o)},onMouseMove:i=>{ne(o),$(i.clientY),se(i.clientX)},onMouseLeave:()=>{ne(void 0),se(void 0),$(void 0),ee?.(void 0)},onClick:()=>{(te||H)&&(Dt.isEqual(u,o)&&ye?(p(void 0),te?.(void 0)):(p(o),te?.(o)))},children:t.jsxRuntimeExports.jsx(Qe.motion.path,{d:j,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},style:{stroke:xe,strokeWidth:Q}},`${o.id}`)},o.id)})}),U?y.features.filter(o=>o.properties[g]===U.id).map((o,a)=>t.jsxRuntimeExports.jsx("path",{d:G(o)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},a)):null,re.filter(o=>o.position==="after").map(o=>o.layer)]})}),fe===!1?null:t.jsxRuntimeExports.jsx("div",{className:t.mo("absolute left-4 bottom-4 map-color-legend",oe?.colorLegend),children:Pe?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ae(!1)},children:t.jsxRuntimeExports.jsx(gt.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:L?void 0:"340px"},children:[E&&E!==""?t.jsxRuntimeExports.jsx(jt._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:E}):null,L?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:r.map((o,a)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{M(n[a%n.length])},onMouseLeave:()=>{M(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[a%n.length]}}),t.jsxRuntimeExports.jsx(jt._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},a))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[r.map((o,a)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{M(n[a])},onMouseLeave:()=>{M(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:a*320/n.length+1,y:1,width:320/n.length-2,height:8,className:w===n[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[a],...w===n[a]?{}:{stroke:n[a]}}}),t.jsxRuntimeExports.jsx("text",{x:(a+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Nt.numberFormattingFunction(o,"NA")})]},a)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{M(n[r.length])},onMouseLeave:()=>{M(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${w===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...w===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{ae(!0)},children:t.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&u!==void 0?t.jsxRuntimeExports.jsx(qt.DetailsModal,{body:H,data:u,setData:p,className:oe?.modal}):null,U&&Z&&Ee&&X?t.jsxRuntimeExports.jsx(Mt.Tooltip,{data:U,body:Z,xPos:Ee,yPos:X,backgroundStyle:Ie?.tooltip,className:oe?.tooltip}):null]})}function $t(d){const e=t.compilerRuntimeExports.c(126),{data:r,mapData:n,graphTitle:_,colors:E,sources:L,graphDescription:f,height:h,width:x,footNote:T,colorDomain:Z,colorLegendTitle:Q,scaleType:xe,scale:ge,centerPoint:ee,padding:fe,mapBorderWidth:Oe,mapNoDataColor:qe,backgroundColor:b,mapBorderColor:te,relativeHeight:g,tooltip:ye,onSeriesMouseOver:H,isWorldMap:Ie,showColorScale:oe,zoomScaleExtend:D,zoomTranslateExtend:S,graphID:k,highlightedIds:N,onSeriesMouseClick:re,mapProperty:ve,graphDownload:je,dataDownload:W,showAntarctica:be,language:y,minHeight:w,theme:M,ariaLabel:V,resetSelectionOnDoubleClick:Pe,detailsOnClick:ae,styles:u,classNames:p,mapProjection:U,zoomInteraction:ne,animate:Ee,dimmedOpacity:se,customLayers:X,timeline:$,collapseColorScaleByDefault:O,projectionRotate:Y,zoomAndCenterByHighlightedIds:ke,rewindCoordinatesInMapData:ze}=d,v=n===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":n,R=T===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":T,q=xe===void 0?"threshold":xe,we=ge===void 0?.95:ge,Re=Oe===void 0?.5:Oe,Ce=qe===void 0?et.Colors.light.graphNoData:qe,I=b===void 0?!1:b,De=te===void 0?et.Colors.light.grays["gray-500"]:te,G=Ie===void 0?!0:Ie,ie=oe===void 0?!0:oe;let o;e[0]!==D?(o=D===void 0?[.8,6]:D,e[0]=D,e[1]=o):o=e[1];const a=o;let j;e[2]!==N?(j=N===void 0?[]:N,e[2]=N,e[3]=j):j=e[3];const C=j,i=ve===void 0?"ISO3":ve,le=je===void 0?!1:je,ce=W===void 0?!1:W,Se=be===void 0?!1:be,tt=y===void 0?"en":y,P=w===void 0?0:w,J=M===void 0?"light":M,ot=Pe===void 0?!0:Pe,rt=U===void 0?"naturalEarth":U,at=ne===void 0?"button":ne,Ae=Ee===void 0?!1:Ee,nt=se===void 0?.3:se;let Be;e[4]!==X?(Be=X===void 0?[]:X,e[4]=X,e[5]=Be):Be=e[5];const st=Be;let Fe;e[6]!==$?(Fe=$===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:$,e[6]=$,e[7]=Fe):Fe=e[7];const s=Fe;let _e;e[8]!==Y?(_e=Y===void 0?[0,0]:Y,e[8]=Y,e[9]=_e):_e=e[9];const it=_e,lt=ke===void 0?!1:ke,ct=ze===void 0?!0:ze,[K,Et]=c.useState(0),[Ne,kt]=c.useState(0),[z,wt]=c.useState(s.autoplay);let Me;if(e[10]!==r||e[11]!==s.dateFormat){let m;e[13]!==s.dateFormat?(m=B=>vt.parse(`${B.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[13]=s.dateFormat,e[14]=m):m=e[14],Me=[...new Set(r.filter(Zt).map(m))],Me.sort(Kt),e[10]=r,e[11]=s.dateFormat,e[12]=Me}else Me=e[12];const l=Me,[A,dt]=c.useState(s.autoplay?0:l.length-1),[de,Rt]=c.useState(void 0),ut=c.useRef(null),ft=c.useRef(null);let Le,Te;e[15]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const m=new ResizeObserver(B=>{Et(B[0].target.clientWidth||620),kt(B[0].target.clientHeight||480)});return ut.current&&m.observe(ut.current),()=>m.disconnect()},Te=[],e[15]=Le,e[16]=Te):(Le=e[15],Te=e[16]),c.useEffect(Le,Te);let We;e[17]===Symbol.for("react.memo_cache_sentinel")?(We=m=>{Rt(m)},e[17]=We):We=e[17];const $e=c.useEffectEvent(We);let Ge;e[18]!==v||e[19]!==$e?(Ge=()=>{typeof v=="string"?_t.fetchAndParseJSON(v).then(B=>{$e(B)}):$e(v)},e[18]=v,e[19]=$e,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],c.useEffect(Ge,He);let Ve;e[23]!==Z||e[24]!==E?.length||e[25]!==r||e[26]!==q?(Ve=Z||(q==="categorical"?Lt.getUniqValue(r,"x"):Tt.getJenks(r.map(Jt),E?.length||4)),e[23]=Z,e[24]=E?.length,e[25]=r,e[26]=q,e[27]=Ve):Ve=e[27];const Ue=Ve;let Xe,Ye;e[28]!==z||e[29]!==s.speed||e[30]!==l?(Xe=()=>{const m=setInterval(()=>{dt(B=>B<l.length-1?B+1:0)},(s.speed||2)*1e3);return z||clearInterval(m),()=>clearInterval(m)},Ye=[l,z,s.speed],e[28]=z,e[29]=s.speed,e[30]=l,e[31]=Xe,e[32]=Ye):(Xe=e[31],Ye=e[32]),c.useEffect(Xe,Ye);const pt=s.dateFormat||"yyyy";let Je;e[33]!==A||e[34]!==pt||e[35]!==s.showOnlyActiveDate||e[36]!==l?(Je=yt.getSliderMarks(l,A,s.showOnlyActiveDate,pt),e[33]=A,e[34]=pt,e[35]=s.showOnlyActiveDate,e[36]=l,e[37]=Je):Je=e[37];const Ke=Je,mt=p?.graphContainer,ht=u?.graphContainer;let ue;e[38]!==p?.description||e[39]!==p?.title||e[40]!==r||e[41]!==ce||e[42]!==f||e[43]!==le||e[44]!==_||e[45]!==u?.description||e[46]!==u?.title||e[47]!==x?(ue=_||f||le||ce?t.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:p?.title,description:p?.description},graphTitle:_,graphDescription:f,width:x,graphDownload:le?ft:void 0,dataDownload:ce?r.map(Yt).filter(Xt).length>0?r.map(Ut).filter(Vt):r.filter(Ht):null}):null,e[38]=p?.description,e[39]=p?.title,e[40]=r,e[41]=ce,e[42]=f,e[43]=le,e[44]=_,e[45]=u?.description,e[46]=u?.title,e[47]=x,e[48]=ue):ue=e[48];let pe;e[49]!==A||e[50]!==Ke||e[51]!==z||e[52]!==s.enabled||e[53]!==l?(pe=s.enabled&&l.length>0&&Ke?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{wt(!z)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":z?"Click to pause animation":"Click to play animation",children:z?t.jsxRuntimeExports.jsx(gt.Pause,{}):t.jsxRuntimeExports.jsx(gt.Play,{})}),t.jsxRuntimeExports.jsx(yt.Nr,{min:l[0],max:l[l.length-1],marks:Ke,step:null,defaultValue:l[l.length-1],value:l[A],onChangeComplete:m=>{dt(l.indexOf(m))},onChange:m=>{dt(l.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[49]=A,e[50]=Ke,e[51]=z,e[52]=s.enabled,e[53]=l,e[54]=pe):pe=e[54];let me;e[55]!==Ae||e[56]!==ee||e[57]!==p||e[58]!==O||e[59]!==Q||e[60]!==E||e[61]!==st||e[62]!==r||e[63]!==ae||e[64]!==nt||e[65]!==Ue||e[66]!==h||e[67]!==C||e[68]!==A||e[69]!==G||e[70]!==De||e[71]!==Re||e[72]!==Ce||e[73]!==rt||e[74]!==i||e[75]!==de||e[76]!==P||e[77]!==re||e[78]!==H||e[79]!==it||e[80]!==g||e[81]!==ot||e[82]!==ct||e[83]!==we||e[84]!==q||e[85]!==Se||e[86]!==ie||e[87]!==u||e[88]!==Ne||e[89]!==K||e[90]!==J||e[91]!==s.dateFormat||e[92]!==s.enabled||e[93]!==ye||e[94]!==l||e[95]!==x||e[96]!==lt||e[97]!==at||e[98]!==a||e[99]!==S?(me=t.jsxRuntimeExports.jsx(bt.GraphArea,{ref:ut,children:K&&Ne&&de?t.jsxRuntimeExports.jsx(Wt,{data:r.filter(m=>s.enabled?m.date===vt.format(new Date(l[A]),s.dateFormat||"yyyy"):m),mapData:Se?de:{...de,features:de.features.filter(Gt)},colorDomain:Ue,width:K,height:Ne,scale:we,centerPoint:ee,colors:E||(q==="categorical"?et.Colors[J].categoricalColors.colors:et.Colors[J].sequentialColors[`neutralColorsx0${Ue.length+1}`]),colorLegendTitle:Q,mapBorderWidth:Re,mapNoDataColor:Ce,categorical:q==="categorical",mapBorderColor:De,tooltip:ye,onSeriesMouseOver:H,isWorldMap:G,showColorScale:ie,zoomScaleExtend:a,zoomTranslateExtend:S,onSeriesMouseClick:re,mapProperty:i,highlightedIds:C,resetSelectionOnDoubleClick:ot,styles:u,classNames:p,detailsOnClick:ae,mapProjection:rt||(G?"naturalEarth":"mercator"),zoomInteraction:at,dimmedOpacity:nt,animate:Ae===!0?{duration:.5,once:!0,amount:.5}:Ae||{duration:0,once:!0,amount:0},customLayers:st,zoomAndCenterByHighlightedIds:lt,collapseColorScaleByDefault:O,projectionRotate:it,rewindCoordinatesInMapData:ct}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(P,h||(g?P?(x||K)*g>P?(x||K)*g:P:(x||K)*g:Ne))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(Ct.w,{"aria-label":"Loading graph"})})}),e[55]=Ae,e[56]=ee,e[57]=p,e[58]=O,e[59]=Q,e[60]=E,e[61]=st,e[62]=r,e[63]=ae,e[64]=nt,e[65]=Ue,e[66]=h,e[67]=C,e[68]=A,e[69]=G,e[70]=De,e[71]=Re,e[72]=Ce,e[73]=rt,e[74]=i,e[75]=de,e[76]=P,e[77]=re,e[78]=H,e[79]=it,e[80]=g,e[81]=ot,e[82]=ct,e[83]=we,e[84]=q,e[85]=Se,e[86]=ie,e[87]=u,e[88]=Ne,e[89]=K,e[90]=J,e[91]=s.dateFormat,e[92]=s.enabled,e[93]=ye,e[94]=l,e[95]=x,e[96]=lt,e[97]=at,e[98]=a,e[99]=S,e[100]=me):me=e[100];let he;e[101]!==p?.footnote||e[102]!==p?.source||e[103]!==R||e[104]!==L||e[105]!==u?.footnote||e[106]!==u?.source||e[107]!==x?(he=L||R?t.jsxRuntimeExports.jsx(Bt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:L,footNote:R,width:x}):null,e[101]=p?.footnote,e[102]=p?.source,e[103]=R,e[104]=L,e[105]=u?.footnote,e[106]=u?.source,e[107]=x,e[108]=he):he=e[108];let Ze;return e[109]!==V||e[110]!==I||e[111]!==k||e[112]!==h||e[113]!==tt||e[114]!==P||e[115]!==fe||e[116]!==g||e[117]!==mt||e[118]!==ht||e[119]!==ue||e[120]!==pe||e[121]!==me||e[122]!==he||e[123]!==J||e[124]!==x?(Ze=t.jsxRuntimeExports.jsxs(bt.GraphContainer,{className:mt,style:ht,id:k,ref:ft,"aria-label":V,backgroundColor:I,theme:J,language:tt,minHeight:P,width:x,height:h,relativeHeight:g,padding:fe,children:[ue,pe,me,he]}),e[109]=V,e[110]=I,e[111]=k,e[112]=h,e[113]=tt,e[114]=P,e[115]=fe,e[116]=g,e[117]=mt,e[118]=ht,e[119]=ue,e[120]=pe,e[121]=me,e[122]=he,e[123]=J,e[124]=x,e[125]=Ze):Ze=e[125],Ze}function Gt(d){return d.properties.NAME!=="Antarctica"}function Ht(d){return d!==void 0}function Vt(d){return d!==void 0}function Ut(d){return d.data}function Xt(d){return d!==void 0}function Yt(d){return d.data}function Jt(d){return d.x}function Kt(d,e){return d-e}function Zt(d){return d.date}exports.ChoroplethMap=$t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),yt=require("./getSliderMarks-CIuSoedo.cjs"),Ct=require("./Spinner-jTMOLuw_.cjs"),vt=require("./parse-xYI9yrvL.cjs"),Dt=require("./index-DQA8q5sC.cjs"),F=require("./index-DLFt97gy.cjs"),jt=require("./Typography-Cc_iHQB-.cjs"),St=require("./index-C5K--w8d.cjs"),Nt=require("./numberFormattingFunction-02t-wJta.cjs"),Mt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),gt=require("./index-sbKVyHS2.cjs"),qt=require("./DetailsModal-DHttOA80.cjs"),It=require("./ordinal-CrsysVE-.cjs"),Pt=require("./threshold-DNsSUf8Q.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Qe=require("./proxy-C4-uo6nS.cjs"),zt=require("./use-in-view-C3o_ntMv.cjs"),At=require("./index-CoobIWNj.cjs"),Bt=require("./GraphFooter.cjs"),Ft=require("./GraphHeader.cjs"),et=require("./Colors.cjs"),_t=require("./fetchAndParseData-QTF6tjij.cjs"),Lt=require("./getUniqValue-NX8DgwND.cjs"),Tt=require("./getJenks-BzJvhy_H.cjs"),bt=require("./GraphContainer-B1EDxJ0S.cjs");function Wt(d){const{data:e,colorDomain:r,colors:n,mapData:_,colorLegendTitle:E,categorical:L,height:f,width:h,scale:x,centerPoint:T,tooltip:Z,mapBorderWidth:Q,mapBorderColor:xe,mapNoDataColor:ge,onSeriesMouseOver:ee,showColorScale:fe,zoomScaleExtend:Oe,zoomTranslateExtend:qe,highlightedIds:b,onSeriesMouseClick:te,mapProperty:g,resetSelectionOnDoubleClick:ye,detailsOnClick:H,styles:Ie,classNames:oe,mapProjection:D,zoomInteraction:S,animate:k,dimmedOpacity:N,customLayers:re,collapseColorScaleByDefault:ve,zoomAndCenterByHighlightedIds:je,projectionRotate:W,rewindCoordinatesInMapData:be}=d,y=c.useMemo(()=>be?F.index_default(_,{reverse:!0}):_,[_,be]),[w,M]=c.useState(void 0),V=c.useRef(null),[Pe,ae]=c.useState(ve===void 0?!(h<680):!ve),[u,p]=c.useState(void 0),[U,ne]=c.useState(void 0),[Ee,se]=c.useState(void 0),[X,$]=c.useState(void 0),O=c.useRef(null),Y=zt.useInView(O,{once:k.once,amount:k.amount}),ke=c.useRef(null),ze=L?It.ordinal().domain(r).range(n):Pt.threshold().domain(r).range(n);c.useEffect(()=>{const o=xt.select(ke.current),a=xt.select(O.current),j=i=>{if(S==="noZoom")return!1;if(S==="button")return!i.type.includes("wheel");const le=i.type==="wheel",ce=i.type.startsWith("touch"),Se=i.type==="mousedown"||i.type==="mousemove";return ce?!0:le?S==="scroll"?!0:i.ctrlKey:Se&&!i.button&&!i.ctrlKey},C=F.zoom().scaleExtent(Oe).translateExtent(qe||[[-20,-20],[h+20,f+20]]).filter(j).on("zoom",({transform:i})=>{o.attr("transform",i)});a.call(C),V.current=C},[f,h,S]);const v=F.index_default$1({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),R=St.index_default({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),q=(v[2]-v[0])*1.15,we=(v[3]-v[1])*1.15,Re=h*190/960*360/q,Ce=f*190/678*180/we,I=x*Math.min(Re,Ce),De=D==="mercator"?F.geoMercator().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="equalEarth"?F.geoEqualEarth().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="naturalEarth"?F.geoNaturalEarth1().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="orthographic"?F.geoOrthographic().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I):F.geoAlbersUsa().rotate(W).center(T||R.geometry.coordinates).translate([h/2,f/2]).scale(I),G=F.geoPath().projection(De),ie=o=>{if(!O.current||!V.current)return;xt.select(O.current).call(V.current.scaleBy,o==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(Qe.motion.svg,{width:`${h}px`,height:`${f}px`,viewBox:`0 0 ${h} ${f}`,ref:O,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:ke,children:[re.filter(o=>o.position==="before").map(o=>o.layer),y.features.map((o,a)=>{if(!o.properties?.[g])return null;const j=G(o);return j?t.jsxRuntimeExports.jsx(Qe.motion.g,{opacity:w?N:b.length!==0?b.indexOf(o.properties[g])!==-1?1:N:1,children:t.jsxRuntimeExports.jsx("path",{d:j,style:{stroke:xe,strokeWidth:Q,fill:ge}})},a):null}),t.jsxRuntimeExports.jsx(At.AnimatePresence,{children:e.map(o=>{const a=y.features.findIndex(i=>o.id===i.properties[g]);if(a===-1)return null;const j=G(y.features[a]);if(!j)return null;const C=Ot.checkIfNullOrUndefined(o.x)?ge:ze(o.x);return t.jsxRuntimeExports.jsx(Qe.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:w?w===C?1:N:b.length!==0?b.indexOf(o.id)!==-1?1:N:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},onMouseEnter:i=>{ne(o),$(i.clientY),se(i.clientX),ee?.(o)},onMouseMove:i=>{ne(o),$(i.clientY),se(i.clientX)},onMouseLeave:()=>{ne(void 0),se(void 0),$(void 0),ee?.(void 0)},onClick:()=>{(te||H)&&(Dt.isEqual(u,o)&&ye?(p(void 0),te?.(void 0)):(p(o),te?.(o)))},children:t.jsxRuntimeExports.jsx(Qe.motion.path,{d:j,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},style:{stroke:xe,strokeWidth:Q}},`${o.id}`)},o.id)})}),U?y.features.filter(o=>o.properties[g]===U.id).map((o,a)=>t.jsxRuntimeExports.jsx("path",{d:G(o)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},a)):null,re.filter(o=>o.position==="after").map(o=>o.layer)]})}),fe===!1?null:t.jsxRuntimeExports.jsx("div",{className:t.mo("absolute left-4 bottom-4 map-color-legend",oe?.colorLegend),children:Pe?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ae(!1)},children:t.jsxRuntimeExports.jsx(gt.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:L?void 0:"340px"},children:[E&&E!==""?t.jsxRuntimeExports.jsx(jt._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:E}):null,L?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:r.map((o,a)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{M(n[a%n.length])},onMouseLeave:()=>{M(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[a%n.length]}}),t.jsxRuntimeExports.jsx(jt._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},a))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[r.map((o,a)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{M(n[a])},onMouseLeave:()=>{M(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:a*320/n.length+1,y:1,width:320/n.length-2,height:8,className:w===n[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[a],...w===n[a]?{}:{stroke:n[a]}}}),t.jsxRuntimeExports.jsx("text",{x:(a+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Nt.numberFormattingFunction(o,"NA")})]},a)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{M(n[r.length])},onMouseLeave:()=>{M(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${w===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...w===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{ae(!0)},children:t.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&u!==void 0?t.jsxRuntimeExports.jsx(qt.DetailsModal,{body:H,data:u,setData:p,className:oe?.modal}):null,U&&Z&&Ee&&X?t.jsxRuntimeExports.jsx(Mt.Tooltip,{data:U,body:Z,xPos:Ee,yPos:X,backgroundStyle:Ie?.tooltip,className:oe?.tooltip}):null]})}function $t(d){const e=t.compilerRuntimeExports.c(126),{data:r,mapData:n,graphTitle:_,colors:E,sources:L,graphDescription:f,height:h,width:x,footNote:T,colorDomain:Z,colorLegendTitle:Q,scaleType:xe,scale:ge,centerPoint:ee,padding:fe,mapBorderWidth:Oe,mapNoDataColor:qe,backgroundColor:b,mapBorderColor:te,relativeHeight:g,tooltip:ye,onSeriesMouseOver:H,isWorldMap:Ie,showColorScale:oe,zoomScaleExtend:D,zoomTranslateExtend:S,graphID:k,highlightedIds:N,onSeriesMouseClick:re,mapProperty:ve,graphDownload:je,dataDownload:W,showAntarctica:be,language:y,minHeight:w,theme:M,ariaLabel:V,resetSelectionOnDoubleClick:Pe,detailsOnClick:ae,styles:u,classNames:p,mapProjection:U,zoomInteraction:ne,animate:Ee,dimmedOpacity:se,customLayers:X,timeline:$,collapseColorScaleByDefault:O,projectionRotate:Y,zoomAndCenterByHighlightedIds:ke,rewindCoordinatesInMapData:ze}=d,v=n===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":n,R=T===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":T,q=xe===void 0?"threshold":xe,we=ge===void 0?.95:ge,Re=Oe===void 0?.5:Oe,Ce=qe===void 0?et.Colors.light.graphNoData:qe,I=b===void 0?!1:b,De=te===void 0?et.Colors.light.grays["gray-500"]:te,G=Ie===void 0?!0:Ie,ie=oe===void 0?!0:oe;let o;e[0]!==D?(o=D===void 0?[.8,6]:D,e[0]=D,e[1]=o):o=e[1];const a=o;let j;e[2]!==N?(j=N===void 0?[]:N,e[2]=N,e[3]=j):j=e[3];const C=j,i=ve===void 0?"ISO3":ve,le=je===void 0?!1:je,ce=W===void 0?!1:W,Se=be===void 0?!1:be,tt=y===void 0?"en":y,P=w===void 0?0:w,J=M===void 0?"light":M,ot=Pe===void 0?!0:Pe,rt=U===void 0?"naturalEarth":U,at=ne===void 0?"button":ne,Ae=Ee===void 0?!1:Ee,nt=se===void 0?.3:se;let Be;e[4]!==X?(Be=X===void 0?[]:X,e[4]=X,e[5]=Be):Be=e[5];const st=Be;let Fe;e[6]!==$?(Fe=$===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:$,e[6]=$,e[7]=Fe):Fe=e[7];const s=Fe;let _e;e[8]!==Y?(_e=Y===void 0?[0,0]:Y,e[8]=Y,e[9]=_e):_e=e[9];const it=_e,lt=ke===void 0?!1:ke,ct=ze===void 0?!0:ze,[K,Et]=c.useState(0),[Ne,kt]=c.useState(0),[z,wt]=c.useState(s.autoplay);let Me;if(e[10]!==r||e[11]!==s.dateFormat){let m;e[13]!==s.dateFormat?(m=B=>vt.parse(`${B.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[13]=s.dateFormat,e[14]=m):m=e[14],Me=[...new Set(r.filter(Zt).map(m))],Me.sort(Kt),e[10]=r,e[11]=s.dateFormat,e[12]=Me}else Me=e[12];const l=Me,[A,dt]=c.useState(s.autoplay?0:l.length-1),[de,Rt]=c.useState(void 0),ut=c.useRef(null),ft=c.useRef(null);let Le,Te;e[15]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const m=new ResizeObserver(B=>{Et(B[0].target.clientWidth||620),kt(B[0].target.clientHeight||480)});return ut.current&&m.observe(ut.current),()=>m.disconnect()},Te=[],e[15]=Le,e[16]=Te):(Le=e[15],Te=e[16]),c.useEffect(Le,Te);let We;e[17]===Symbol.for("react.memo_cache_sentinel")?(We=m=>{Rt(m)},e[17]=We):We=e[17];const $e=c.useEffectEvent(We);let Ge;e[18]!==v||e[19]!==$e?(Ge=()=>{typeof v=="string"?_t.fetchAndParseJSON(v).then(B=>{$e(B)}):$e(v)},e[18]=v,e[19]=$e,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],c.useEffect(Ge,He);let Ve;e[23]!==Z||e[24]!==E?.length||e[25]!==r||e[26]!==q?(Ve=Z||(q==="categorical"?Lt.getUniqValue(r,"x"):Tt.getJenks(r.map(Jt),E?.length||4)),e[23]=Z,e[24]=E?.length,e[25]=r,e[26]=q,e[27]=Ve):Ve=e[27];const Ue=Ve;let Xe,Ye;e[28]!==z||e[29]!==s.speed||e[30]!==l?(Xe=()=>{const m=setInterval(()=>{dt(B=>B<l.length-1?B+1:0)},(s.speed||2)*1e3);return z||clearInterval(m),()=>clearInterval(m)},Ye=[l,z,s.speed],e[28]=z,e[29]=s.speed,e[30]=l,e[31]=Xe,e[32]=Ye):(Xe=e[31],Ye=e[32]),c.useEffect(Xe,Ye);const pt=s.dateFormat||"yyyy";let Je;e[33]!==A||e[34]!==pt||e[35]!==s.showOnlyActiveDate||e[36]!==l?(Je=yt.getSliderMarks(l,A,s.showOnlyActiveDate,pt),e[33]=A,e[34]=pt,e[35]=s.showOnlyActiveDate,e[36]=l,e[37]=Je):Je=e[37];const Ke=Je,mt=p?.graphContainer,ht=u?.graphContainer;let ue;e[38]!==p?.description||e[39]!==p?.title||e[40]!==r||e[41]!==ce||e[42]!==f||e[43]!==le||e[44]!==_||e[45]!==u?.description||e[46]!==u?.title||e[47]!==x?(ue=_||f||le||ce?t.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:p?.title,description:p?.description},graphTitle:_,graphDescription:f,width:x,graphDownload:le?ft:void 0,dataDownload:ce?r.map(Yt).filter(Xt).length>0?r.map(Ut).filter(Vt):r.filter(Ht):null}):null,e[38]=p?.description,e[39]=p?.title,e[40]=r,e[41]=ce,e[42]=f,e[43]=le,e[44]=_,e[45]=u?.description,e[46]=u?.title,e[47]=x,e[48]=ue):ue=e[48];let pe;e[49]!==A||e[50]!==Ke||e[51]!==z||e[52]!==s.enabled||e[53]!==l?(pe=s.enabled&&l.length>0&&Ke?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{wt(!z)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":z?"Click to pause animation":"Click to play animation",children:z?t.jsxRuntimeExports.jsx(gt.Pause,{}):t.jsxRuntimeExports.jsx(gt.Play,{})}),t.jsxRuntimeExports.jsx(yt.Nr,{min:l[0],max:l[l.length-1],marks:Ke,step:null,defaultValue:l[l.length-1],value:l[A],onChangeComplete:m=>{dt(l.indexOf(m))},onChange:m=>{dt(l.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[49]=A,e[50]=Ke,e[51]=z,e[52]=s.enabled,e[53]=l,e[54]=pe):pe=e[54];let me;e[55]!==Ae||e[56]!==ee||e[57]!==p||e[58]!==O||e[59]!==Q||e[60]!==E||e[61]!==st||e[62]!==r||e[63]!==ae||e[64]!==nt||e[65]!==Ue||e[66]!==h||e[67]!==C||e[68]!==A||e[69]!==G||e[70]!==De||e[71]!==Re||e[72]!==Ce||e[73]!==rt||e[74]!==i||e[75]!==de||e[76]!==P||e[77]!==re||e[78]!==H||e[79]!==it||e[80]!==g||e[81]!==ot||e[82]!==ct||e[83]!==we||e[84]!==q||e[85]!==Se||e[86]!==ie||e[87]!==u||e[88]!==Ne||e[89]!==K||e[90]!==J||e[91]!==s.dateFormat||e[92]!==s.enabled||e[93]!==ye||e[94]!==l||e[95]!==x||e[96]!==lt||e[97]!==at||e[98]!==a||e[99]!==S?(me=t.jsxRuntimeExports.jsx(bt.GraphArea,{ref:ut,children:K&&Ne&&de?t.jsxRuntimeExports.jsx(Wt,{data:r.filter(m=>s.enabled?m.date===vt.format(new Date(l[A]),s.dateFormat||"yyyy"):m),mapData:Se?de:{...de,features:de.features.filter(Gt)},colorDomain:Ue,width:K,height:Ne,scale:we,centerPoint:ee,colors:E||(q==="categorical"?et.Colors[J].categoricalColors.colors:et.Colors[J].sequentialColors[`neutralColorsx0${Ue.length+1}`]),colorLegendTitle:Q,mapBorderWidth:Re,mapNoDataColor:Ce,categorical:q==="categorical",mapBorderColor:De,tooltip:ye,onSeriesMouseOver:H,isWorldMap:G,showColorScale:ie,zoomScaleExtend:a,zoomTranslateExtend:S,onSeriesMouseClick:re,mapProperty:i,highlightedIds:C,resetSelectionOnDoubleClick:ot,styles:u,classNames:p,detailsOnClick:ae,mapProjection:rt||(G?"naturalEarth":"mercator"),zoomInteraction:at,dimmedOpacity:nt,animate:Ae===!0?{duration:.5,once:!0,amount:.5}:Ae||{duration:0,once:!0,amount:0},customLayers:st,zoomAndCenterByHighlightedIds:lt,collapseColorScaleByDefault:O,projectionRotate:it,rewindCoordinatesInMapData:ct}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(P,h||(g?P?(x||K)*g>P?(x||K)*g:P:(x||K)*g:Ne))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(Ct.w,{"aria-label":"Loading graph"})})}),e[55]=Ae,e[56]=ee,e[57]=p,e[58]=O,e[59]=Q,e[60]=E,e[61]=st,e[62]=r,e[63]=ae,e[64]=nt,e[65]=Ue,e[66]=h,e[67]=C,e[68]=A,e[69]=G,e[70]=De,e[71]=Re,e[72]=Ce,e[73]=rt,e[74]=i,e[75]=de,e[76]=P,e[77]=re,e[78]=H,e[79]=it,e[80]=g,e[81]=ot,e[82]=ct,e[83]=we,e[84]=q,e[85]=Se,e[86]=ie,e[87]=u,e[88]=Ne,e[89]=K,e[90]=J,e[91]=s.dateFormat,e[92]=s.enabled,e[93]=ye,e[94]=l,e[95]=x,e[96]=lt,e[97]=at,e[98]=a,e[99]=S,e[100]=me):me=e[100];let he;e[101]!==p?.footnote||e[102]!==p?.source||e[103]!==R||e[104]!==L||e[105]!==u?.footnote||e[106]!==u?.source||e[107]!==x?(he=L||R?t.jsxRuntimeExports.jsx(Bt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:L,footNote:R,width:x}):null,e[101]=p?.footnote,e[102]=p?.source,e[103]=R,e[104]=L,e[105]=u?.footnote,e[106]=u?.source,e[107]=x,e[108]=he):he=e[108];let Ze;return e[109]!==V||e[110]!==I||e[111]!==k||e[112]!==h||e[113]!==tt||e[114]!==P||e[115]!==fe||e[116]!==g||e[117]!==mt||e[118]!==ht||e[119]!==ue||e[120]!==pe||e[121]!==me||e[122]!==he||e[123]!==J||e[124]!==x?(Ze=t.jsxRuntimeExports.jsxs(bt.GraphContainer,{className:mt,style:ht,id:k,ref:ft,"aria-label":V,backgroundColor:I,theme:J,language:tt,minHeight:P,width:x,height:h,relativeHeight:g,padding:fe,children:[ue,pe,me,he]}),e[109]=V,e[110]=I,e[111]=k,e[112]=h,e[113]=tt,e[114]=P,e[115]=fe,e[116]=g,e[117]=mt,e[118]=ht,e[119]=ue,e[120]=pe,e[121]=me,e[122]=he,e[123]=J,e[124]=x,e[125]=Ze):Ze=e[125],Ze}function Gt(d){return d.properties.NAME!=="Antarctica"}function Ht(d){return d!==void 0}function Vt(d){return d!==void 0}function Ut(d){return d.data}function Xt(d){return d!==void 0}function Yt(d){return d.data}function Jt(d){return d.x}function Kt(d,e){return d-e}function Zt(d){return d.date}exports.ChoroplethMap=$t;
2
2
  //# sourceMappingURL=ChoroplethMap.cjs.map
@@ -5,7 +5,7 @@ import { w as Mt } from "./Spinner--r2RrJV8.js";
5
5
  import { f as It, p as Et } from "./parse-Dv4of-PN.js";
6
6
  import { i as zt } from "./index-Bwrro8-q.js";
7
7
  import { i as Pt, z as At, a as Bt, g as Lt, b as _t, c as Ft, d as Wt, e as Tt, f as $t } from "./index-Dp_SfsUA.js";
8
- import { _ as xt } from "./Typography-iR8PEgdt.js";
8
+ import { _ as xt } from "./Typography-CdMGooqp.js";
9
9
  import { i as Ht } from "./index-DCsFBfJ_.js";
10
10
  import { n as Gt } from "./numberFormattingFunction-14YCbkN2.js";
11
11
  import { T as Vt } from "./Tooltip-BRnAz2Gv.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("react");const e=require("./index-DlrGwLQA.cjs");require("./GraphFooter.cjs");require("./GraphHeader.cjs");require("./ColorLegendWithMouseOver.cjs");require("./Colors.cjs");require("./EmptyState-DX0t62iF.cjs");require("./uniqBy-O05lp2S5.cjs");require("./GraphContainer-B1EDxJ0S.cjs");exports.CirclePackingGraph=e.CirclePackingGraph;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("react");const e=require("./index-CXobQn-E.cjs");require("./GraphFooter.cjs");require("./GraphHeader.cjs");require("./ColorLegendWithMouseOver.cjs");require("./Colors.cjs");require("./EmptyState-N1eHt3vq.cjs");require("./uniqBy-O05lp2S5.cjs");require("./GraphContainer-B1EDxJ0S.cjs");exports.CirclePackingGraph=e.CirclePackingGraph;
2
2
  //# sourceMappingURL=CirclePackingGraph.cjs.map
@@ -86,6 +86,8 @@ declare interface Props {
86
86
  suffix?: string;
87
87
  /** Maximum value mapped to the radius chart */
88
88
  maxRadiusValue?: number;
89
+ /** If true, the graph will be rendered in a circle layout */
90
+ circularBoundary?: boolean;
89
91
  /** Maximum radius of the circle */
90
92
  radius?: number;
91
93
  /** Toggle visibility of labels */
@@ -1,11 +1,11 @@
1
1
  import "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import "react";
3
- import { C as g } from "./index-BE-lvE4c.js";
3
+ import { C as g } from "./index-BzNfurbO.js";
4
4
  import "./GraphFooter.js";
5
5
  import "./GraphHeader.js";
6
6
  import "./ColorLegendWithMouseOver.js";
7
7
  import "./Colors.js";
8
- import "./EmptyState-Pj-emXt5.js";
8
+ import "./EmptyState-dScPFkLy.js";
9
9
  import "./uniqBy-BHy4I8PK.js";
10
10
  import "./GraphContainer-CF6ws3pd.js";
11
11
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("./Typography-DrJ7IOdw.cjs"),B=require("./Colors.cjs");function T(w){const e=s.compilerRuntimeExports.c(29),{colorLegendTitle:a,colorDomain:g,colors:t,showNAColor:h,width:v,isCenter:d,className:E,labelsToBeHidden:u}=w;let j;e[0]!==u?(j=u===void 0?[]:u,e[0]=u,e[1]=j):j=e[1];const m=j,R=d&&"justify-center";let l;e[2]!==E||e[3]!==R?(l=s.mo("flex leading-0 pb-3",R,E),e[2]=E,e[3]=R,e[4]=l):l=e[4];const C=v?`${v}px`:"none";let o;e[5]!==C?(o={maxWidth:C},e[5]=C,e[6]=o):o=e[6];let n;e[7]!==a||e[8]!==d?(n=a&&a!==""?s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"2xs",className:d?"text-center":"",children:a}):null,e[7]=a,e[8]=d,e[9]=n):n=e[9];let i;if(e[10]!==g||e[11]!==t||e[12]!==m){let f;e[14]!==t||e[15]!==m?(f=(N,y)=>m.includes(N)?null:s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:t[y%t.length]}}),N===""?null:s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:N})]},y),e[14]=t,e[15]=m,e[16]=f):f=e[16],i=g.map(f),e[10]=g,e[11]=t,e[12]=m,e[13]=i}else i=e[13];let r;e[17]!==h?(r=h?s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:B.Colors.gray}}),s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[17]=h,e[18]=r):r=e[18];let x;e[19]!==i||e[20]!==r?(x=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap mb-0 gap-3.5",children:[i,r]}),e[19]=i,e[20]=r,e[21]=x):x=e[21];let c;e[22]!==n||e[23]!==x?(c=s.jsxRuntimeExports.jsxs("div",{children:[n,x]}),e[22]=n,e[23]=x,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==l||e[27]!==o?(p=s.jsxRuntimeExports.jsx("div",{className:l,style:o,"aria-label":"Color legend",children:c}),e[25]=c,e[26]=l,e[27]=o,e[28]=p):p=e[28],p}exports.ColorLegend=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("./Typography-Cc_iHQB-.cjs"),B=require("./Colors.cjs");function T(w){const e=s.compilerRuntimeExports.c(29),{colorLegendTitle:a,colorDomain:g,colors:t,showNAColor:h,width:v,isCenter:d,className:E,labelsToBeHidden:u}=w;let j;e[0]!==u?(j=u===void 0?[]:u,e[0]=u,e[1]=j):j=e[1];const m=j,R=d&&"justify-center";let l;e[2]!==E||e[3]!==R?(l=s.mo("flex leading-0 pb-3",R,E),e[2]=E,e[3]=R,e[4]=l):l=e[4];const C=v?`${v}px`:"none";let o;e[5]!==C?(o={maxWidth:C},e[5]=C,e[6]=o):o=e[6];let n;e[7]!==a||e[8]!==d?(n=a&&a!==""?s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"2xs",className:d?"text-center":"",children:a}):null,e[7]=a,e[8]=d,e[9]=n):n=e[9];let i;if(e[10]!==g||e[11]!==t||e[12]!==m){let f;e[14]!==t||e[15]!==m?(f=(N,y)=>m.includes(N)?null:s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:t[y%t.length]}}),N===""?null:s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:N})]},y),e[14]=t,e[15]=m,e[16]=f):f=e[16],i=g.map(f),e[10]=g,e[11]=t,e[12]=m,e[13]=i}else i=e[13];let r;e[17]!==h?(r=h?s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:B.Colors.gray}}),s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[17]=h,e[18]=r):r=e[18];let x;e[19]!==i||e[20]!==r?(x=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap mb-0 gap-3.5",children:[i,r]}),e[19]=i,e[20]=r,e[21]=x):x=e[21];let c;e[22]!==n||e[23]!==x?(c=s.jsxRuntimeExports.jsxs("div",{children:[n,x]}),e[22]=n,e[23]=x,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==l||e[27]!==o?(p=s.jsxRuntimeExports.jsx("div",{className:l,style:o,"aria-label":"Color legend",children:c}),e[25]=c,e[26]=l,e[27]=o,e[28]=p):p=e[28],p}exports.ColorLegend=T;
2
2
  //# sourceMappingURL=ColorLegend.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { c as T, m as k, j as l } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { _ as w } from "./Typography-iR8PEgdt.js";
2
+ import { _ as w } from "./Typography-CdMGooqp.js";
3
3
  import { Colors as A } from "./Colors.js";
4
4
  function R(z) {
5
5
  const e = T.c(29), {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./Typography-DrJ7IOdw.cjs"),N=require("./Colors.cjs");function M(b){const e=s.compilerRuntimeExports.c(28),{colorLegendTitle:m,colorDomain:j,colors:o,setSelectedColor:t,showNAColor:g,width:R,isCenter:u,className:f}=b,h=u&&"justify-center";let l;e[0]!==f||e[1]!==h?(l=s.mo("flex leading-0 pb-3",h,f),e[0]=f,e[1]=h,e[2]=l):l=e[2];const v=R?`${R}px`:"none";let r;e[3]!==v?(r={maxWidth:v},e[3]=v,e[4]=r):r=e[4];let n;e[5]!==m||e[6]!==u?(n=m&&m!==""?s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"2xs",className:u?"text-center":"",children:m}):null,e[5]=m,e[6]=u,e[7]=n):n=e[7];let i;if(e[8]!==j||e[9]!==o||e[10]!==t){let p;e[12]!==o||e[13]!==t?(p=(y,E)=>s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 cursor-pointer",onMouseEnter:()=>{t(o[E%o.length])},onMouseLeave:()=>{t(void 0)},children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o[E%o.length]}}),y===""?null:s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:y})]},E),e[12]=o,e[13]=t,e[14]=p):p=e[14],i=j.map(p),e[8]=j,e[9]=o,e[10]=t,e[11]=i}else i=e[11];let x;e[15]!==t||e[16]!==g?(x=g?s.jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>{t(N.Colors.gray)},onMouseLeave:()=>{t(void 0)},className:"flex items-center gap-1 cursor-pointer",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:N.Colors.gray}}),s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[15]=t,e[16]=g,e[17]=x):x=e[17];let c;e[18]!==i||e[19]!==x?(c=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-3.5 mb-0",children:[i,x]}),e[18]=i,e[19]=x,e[20]=c):c=e[20];let a;e[21]!==n||e[22]!==c?(a=s.jsxRuntimeExports.jsxs("div",{children:[n,c]}),e[21]=n,e[22]=c,e[23]=a):a=e[23];let d;return e[24]!==l||e[25]!==r||e[26]!==a?(d=s.jsxRuntimeExports.jsx("div",{className:l,style:r,"aria-label":"Color legend",children:a}),e[24]=l,e[25]=r,e[26]=a,e[27]=d):d=e[27],d}exports.ColorLegendWithMouseOver=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./Typography-Cc_iHQB-.cjs"),N=require("./Colors.cjs");function M(b){const e=s.compilerRuntimeExports.c(28),{colorLegendTitle:m,colorDomain:j,colors:o,setSelectedColor:t,showNAColor:g,width:R,isCenter:u,className:f}=b,h=u&&"justify-center";let l;e[0]!==f||e[1]!==h?(l=s.mo("flex leading-0 pb-3",h,f),e[0]=f,e[1]=h,e[2]=l):l=e[2];const v=R?`${R}px`:"none";let r;e[3]!==v?(r={maxWidth:v},e[3]=v,e[4]=r):r=e[4];let n;e[5]!==m||e[6]!==u?(n=m&&m!==""?s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"2xs",className:u?"text-center":"",children:m}):null,e[5]=m,e[6]=u,e[7]=n):n=e[7];let i;if(e[8]!==j||e[9]!==o||e[10]!==t){let p;e[12]!==o||e[13]!==t?(p=(y,E)=>s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 cursor-pointer",onMouseEnter:()=>{t(o[E%o.length])},onMouseLeave:()=>{t(void 0)},children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o[E%o.length]}}),y===""?null:s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:y})]},E),e[12]=o,e[13]=t,e[14]=p):p=e[14],i=j.map(p),e[8]=j,e[9]=o,e[10]=t,e[11]=i}else i=e[11];let x;e[15]!==t||e[16]!==g?(x=g?s.jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>{t(N.Colors.gray)},onMouseLeave:()=>{t(void 0)},className:"flex items-center gap-1 cursor-pointer",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:N.Colors.gray}}),s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[15]=t,e[16]=g,e[17]=x):x=e[17];let c;e[18]!==i||e[19]!==x?(c=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-3.5 mb-0",children:[i,x]}),e[18]=i,e[19]=x,e[20]=c):c=e[20];let a;e[21]!==n||e[22]!==c?(a=s.jsxRuntimeExports.jsxs("div",{children:[n,c]}),e[21]=n,e[22]=c,e[23]=a):a=e[23];let d;return e[24]!==l||e[25]!==r||e[26]!==a?(d=s.jsxRuntimeExports.jsx("div",{className:l,style:r,"aria-label":"Color legend",children:a}),e[24]=l,e[25]=r,e[26]=a,e[27]=d):d=e[27],d}exports.ColorLegendWithMouseOver=M;
2
2
  //# sourceMappingURL=ColorLegendWithMouseOver.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { c as E, m as L, j as l } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { _ as C } from "./Typography-iR8PEgdt.js";
2
+ import { _ as C } from "./Typography-CdMGooqp.js";
3
3
  import { Colors as w } from "./Colors.js";
4
4
  function A(M) {
5
5
  const e = E.c(28), {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),He=require("./index-CyZ1lmi_.cjs"),je=require("./index-BS2TADPj.cjs"),ce=require("./DropdownSelect-NNpOs7DX.cjs"),Ce=require("./Typography-DrJ7IOdw.cjs"),me=require("./x-BBpi7a_7-DXYIEFwN.cjs"),_e=require("./index-sbKVyHS2.cjs"),Ae=require("./index-Cno4Q0YE.cjs"),ue=require("./Source-B3i0Bx2R.cjs"),Ke=require("./Modal-CaYa_TLE.cjs"),Ue=require("./CsvDownloadButton.cjs"),Ee=require("./string2HTML-xx9MzTtY.cjs"),We=require("./GraphFooter.cjs"),Qe=require("./GraphHeader.cjs"),Je=require("./getUniqValue-NX8DgwND.cjs"),Ve=require("./transformDataForSelect-YmStusCI.cjs"),Xe=require("./GraphContainer-B1EDxJ0S.cjs");const Ye=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ze=me.k("chevron-left",Ye);const et=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tt=me.k("chevron-right",et);const at=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],rt=me.k("ellipsis",at);function $e(i){const e=r._.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("mx-auto flex w-full justify-center",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=r.ae.jsx("nav",{...a,role:"navigation","aria-label":"pagination",className:l}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}$e.displayName="PaginationUnit";const qe=R.forwardRef((i,e)=>{const t=r._.c(9);let a,l;t[0]!==i?({className:a,...l}=i,t[0]=i,t[1]=a,t[2]=l):(a=t[1],l=t[2]);let s;t[3]!==a?(s=r.mo("flex flex-row items-center gap-1 list-none",a),t[3]=a,t[4]=s):s=t[4];let n;return t[5]!==l||t[6]!==e||t[7]!==s?(n=r.ae.jsx("ul",{...l,ref:e,className:s}),t[5]=l,t[6]=e,t[7]=s,t[8]=n):n=t[8],n});qe.displayName="PaginationContent";const de=R.forwardRef((i,e)=>{const t=r._.c(9);let a,l;t[0]!==i?({className:a,...l}=i,t[0]=i,t[1]=a,t[2]=l):(a=t[1],l=t[2]);let s;t[3]!==a?(s=r.mo("mr-2 last:mr-0",a),t[3]=a,t[4]=s):s=t[4];let n;return t[5]!==l||t[6]!==e||t[7]!==s?(n=r.ae.jsx("li",{...l,ref:e,className:s}),t[5]=l,t[6]=e,t[7]=s,t[8]=n):n=t[8],n});de.displayName="PaginationItem";function pe(i){const e=r._.c(10);let t,a,l;e[0]!==i?({className:a,children:t,...l}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);let s;e[4]!==a?(s=r.mo("p-4 text-base text-primary-black dark:text-primary-gray-100 dark:hover:bg-primary-gray-600",a),e[4]=a,e[5]=s):s=e[5];let n;return e[6]!==t||e[7]!==l||e[8]!==s?(n=r.ae.jsx("button",{...l,type:"button",className:s,children:t}),e[6]=t,e[7]=l,e[8]=s,e[9]=n):n=e[9],n}pe.displayName="PaginationLink";function ze(i){const e=r._.c(9);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",t),e[3]=t,e[4]=l):l=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(Ze,{className:"h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100"}),e[5]=s):s=e[5];let n;return e[6]!==a||e[7]!==l?(n=r.ae.jsx(pe,{...a,"aria-label":"Go to previous page",className:l,children:s}),e[6]=a,e[7]=l,e[8]=n):n=e[8],n}ze.displayName="PaginationPrevious";function Me(i){const e=r._.c(9);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",t),e[3]=t,e[4]=l):l=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(tt,{className:"h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100"}),e[5]=s):s=e[5];let n;return e[6]!==a||e[7]!==l?(n=r.ae.jsx(pe,{...a,"aria-label":"Go to next page",className:l,children:s}),e[6]=a,e[7]=l,e[8]=n):n=e[8],n}Me.displayName="PaginationNext";function Ie(i){const e=r._.c(10);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("flex h-9 w-9 items-center justify-center",t),e[3]=t,e[4]=l):l=e[4];let s,n;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(rt,{className:"h-4 w-4 text-primary-gray-700 dark:text-primary-gray-100"}),n=r.ae.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=s,e[6]=n):(s=e[5],n=e[6]);let o;return e[7]!==a||e[8]!==l?(o=r.ae.jsxs("span",{...a,"aria-hidden":!0,className:l,children:[s,n]}),e[7]=a,e[8]=l,e[9]=o):o=e[9],o}Ie.displayName="PaginationEllipsis";const Re=(i,e)=>{const t=[];return e<=7?Array.from({length:e},(a,l)=>l+1):(t.push(1),i<=3?t.push(2,3,4,"ellipsis"):i>=e-2?t.push("ellipsis",e-3,e-2,e-1):t.push("ellipsis",i-1,i,i+1,"ellipsis"),t.push(e),t)};function st(i){const e=r._.c(49),{defaultPage:t,total:a,pageSize:l,onChange:s,className:n,classNames:o}=i,y=t===void 0?1:t,d=Math.ceil(a/l),[c,D]=R.useState(y);let w;e[0]!==y||e[1]!==d?(w=Re(y,d),e[0]=y,e[1]=d,e[2]=w):w=e[2];const[b,V]=R.useState(w);let j,_;e[3]!==c||e[4]!==d?(j=()=>{V(Re(c,d))},_=[c,d],e[3]=c,e[4]=d,e[5]=j,e[6]=_):(j=e[5],_=e[6]),R.useEffect(j,_);const u=o?.control;let g;e[7]!==n||e[8]!==u?(g=r.mo("select-none",n,u),e[7]=n,e[8]=u,e[9]=g):g=e[9];let C;e[10]!==c||e[11]!==s?(C=()=>{c>1&&(s(c-1),D(c-1))},e[10]=c,e[11]=s,e[12]=C):C=e[12];const $=o?.navigation,N=c<=1&&"cursor-not-allowed pointer-events-none opacity-35";let v;e[13]!==$||e[14]!==N?(v=r.mo("cursor-pointer",$,N),e[13]=$,e[14]=N,e[15]=v):v=e[15];let k;e[16]!==C||e[17]!==v?(k=r.ae.jsx(de,{children:r.ae.jsx(ze,{onClick:C,className:v})}),e[16]=C,e[17]=v,e[18]=k):k=e[18];let f;if(e[19]!==o?.active||e[20]!==o?.ellipsis||e[21]!==o?.list||e[22]!==c||e[23]!==s||e[24]!==b){let I;e[26]!==o?.active||e[27]!==o?.ellipsis||e[28]!==o?.list||e[29]!==c||e[30]!==s?(I=(q,P)=>r.ae.jsx(de,{children:q==="ellipsis"?r.ae.jsx(Ie,{className:o?.ellipsis}):r.ae.jsx(pe,{onClick:()=>{D(q),s(q)},className:r.mo("cursor-pointer w-[32px] h-[32px] flex items-center justify-center rounded-full hover:bg-primary-gray-300",o?.list,q===c&&["bg-primary-blue-600 hover:bg-primary-blue-700 dark:bg-primary-blue-500 dark:hover:bg-primary-blue-400 hover:text-primary-white text-primary-white",o?.active]),children:q})},P),e[26]=o?.active,e[27]=o?.ellipsis,e[28]=o?.list,e[29]=c,e[30]=s,e[31]=I):I=e[31],f=b.map(I),e[19]=o?.active,e[20]=o?.ellipsis,e[21]=o?.list,e[22]=c,e[23]=s,e[24]=b,e[25]=f}else f=e[25];let S;e[32]!==c||e[33]!==s||e[34]!==d?(S=()=>{c<d&&(s(c+1),D(c+1))},e[32]=c,e[33]=s,e[34]=d,e[35]=S):S=e[35];const p=o?.navigation,x=c>=d&&"cursor-not-allowed pointer-events-none opacity-35";let h;e[36]!==p||e[37]!==x?(h=r.mo("cursor-pointer",p,x),e[36]=p,e[37]=x,e[38]=h):h=e[38];let E;e[39]!==S||e[40]!==h?(E=r.ae.jsx(de,{children:r.ae.jsx(Me,{onClick:S,className:h})}),e[39]=S,e[40]=h,e[41]=E):E=e[41];let z;e[42]!==k||e[43]!==f||e[44]!==E?(z=r.ae.jsxs(qe,{children:[k,f,E]}),e[42]=k,e[43]=f,e[44]=E,e[45]=z):z=e[45];let M;return e[46]!==z||e[47]!==g?(M=r.ae.jsx($e,{className:g,children:z}),e[46]=z,e[47]=g,e[48]=M):M=e[48],M}const lt=r.j("w-full h-auto bg-primary-white dark:bg-primary-gray-650 text-primary-black dark:text-primary-white text-base transition-colors file:border-0 file:bg-transparent file:font-medium file:text-primary-gray-700 dark:file:text-primary-white focus-visible:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-primary-gray-550 dark:placeholder:text-primary-gray-400",{variants:{variant:{light:"border border-primary-gray-400 dark:border-primary-gray-500",normal:"border-2 border-primary-black dark:border-primary-gray-300"},inputSize:{sm:"px-2.5 py-1",base:"p-2.5"}},defaultVariants:{inputSize:"base",variant:"normal"}}),Pe=R.forwardRef((i,e)=>{const t=r._.c(13);let a,l,s,n;t[0]!==i?({className:a,inputSize:l,variant:n,...s}=i,t[0]=i,t[1]=a,t[2]=l,t[3]=s,t[4]=n):(a=t[1],l=t[2],s=t[3],n=t[4]);let o;t[5]!==a||t[6]!==l||t[7]!==n?(o=r.mo(lt({inputSize:l,variant:n}),a),t[5]=a,t[6]=l,t[7]=n,t[8]=o):o=t[8];let y;return t[9]!==s||t[10]!==e||t[11]!==o?(y=r.ae.jsx("input",{...s,ref:e,className:o}),t[9]=s,t[10]=e,t[11]=o,t[12]=y):y=t[12],y});Pe.displayName="Input";const it=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],De=me.k("search",it),Be=R.forwardRef((i,e)=>{const t=r._.c(51);let a,l,s,n,o,y,d,c,D,w,b,V;t[0]!==i?({className:n,inputClassName:o,buttonClassName:l,onSearch:c,searchOnlyOnClick:b,buttonVariant:s,buttonChildren:a,showSearchButton:V,inputVariant:d,inputSize:y,placeholder:D,...w}=i,t[0]=i,t[1]=a,t[2]=l,t[3]=s,t[4]=n,t[5]=o,t[6]=y,t[7]=d,t[8]=c,t[9]=D,t[10]=w,t[11]=b,t[12]=V):(a=t[1],l=t[2],s=t[3],n=t[4],o=t[5],y=t[6],d=t[7],c=t[8],D=t[9],w=t[10],b=t[11],V=t[12]);const[j,_]=R.useState(void 0),[u,g]=R.useState(!1);let C;t[13]!==n?(C=r.mo("flex gap-0",n),t[13]=n,t[14]=C):C=t[14];let $;t[15]!==c||t[16]!==b?($=E=>{_(E.target.value),b||c?.(E.target.value)},t[15]=c,t[16]=b,t[17]=$):$=t[17];let N;t[18]!==c||t[19]!==j?(N=E=>{E.key==="Enter"&&c?.(j)},t[18]=c,t[19]=j,t[20]=N):N=t[20];let v,k;t[21]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!0),k=()=>g(!1),t[21]=v,t[22]=k):(v=t[21],k=t[22]);let f;t[23]!==o||t[24]!==y||t[25]!==d||t[26]!==w||t[27]!==$||t[28]!==N?(f=r.ae.jsx(Pe,{...w,variant:d,type:"text",className:o,onChange:$,inputSize:y,onKeyDown:N,onFocus:v,onBlur:k}),t[23]=o,t[24]=y,t[25]=d,t[26]=w,t[27]=$,t[28]=N,t[29]=f):f=t[29];let S;t[30]!==a||t[31]!==u||t[32]!==D||t[33]!==j?(S=!u&&(j===""||!j)&&r.ae.jsxs("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:[a?null:r.ae.jsx(De,{className:"h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2"}),r.ae.jsx("span",{className:"text-primary-gray-500 dark:text-primary-gray-400",children:D||"Search..."})]}),t[30]=a,t[31]=u,t[32]=D,t[33]=j,t[34]=S):S=t[34];let p;t[35]!==f||t[36]!==S?(p=r.ae.jsxs("div",{className:"relative w-full",children:[f,S]}),t[35]=f,t[36]=S,t[37]=p):p=t[37];let x;t[38]!==a||t[39]!==l||t[40]!==s||t[41]!==y||t[42]!==c||t[43]!==j||t[44]!==V?(x=V===!1?null:r.ae.jsx(_e.u,{variant:s||"icon",className:l,padding:y,onClick:()=>{c?.(j)},children:a||r.ae.jsx(De,{className:"stroke-2"})}),t[38]=a,t[39]=l,t[40]=s,t[41]=y,t[42]=c,t[43]=j,t[44]=V,t[45]=x):x=t[45];let h;return t[46]!==e||t[47]!==C||t[48]!==p||t[49]!==x?(h=r.ae.jsxs("div",{className:C,ref:e,children:[p,x]}),t[46]=e,t[47]=C,t[48]=p,t[49]=x,t[50]=h):h=t[50],h});Be.displayName="Search";const nt=i=>i?Object.entries(i).map(([t,a])=>Array.isArray(a)?{" ":t,value:`"${a.join("; ")}"`}:{" ":t,value:`"${a}"`}):{};function ot(i){const e=r.compilerRuntimeExports.c(34),{width:t,height:a,data:l,onSeriesMouseClick:s,cardTemplate:n,cardBackgroundColor:o,cardMinWidth:y,detailsOnClick:d,noOfItemsInAPage:c,styles:D,classNames:w,page:b,allowDataDownloadOnDetail:V}=i,j=y===void 0?320:y,[_,u]=R.useState(void 0),g=t?`${t}px`:"100%",C=a?`${a}px`:"auto",$=`repeat(auto-fill, minmax(${j}px, 1fr))`;let N;e[0]!==g||e[1]!==C||e[2]!==$?(N={width:g,height:C,gridTemplateColumns:$},e[0]=g,e[1]=C,e[2]=$,e[3]=N):N=e[3];let v;if(e[4]!==o||e[5]!==n||e[6]!==w?.dataCards||e[7]!==l||e[8]!==d||e[9]!==c||e[10]!==s||e[11]!==b||e[12]!==D?.dataCards){let p;e[14]!==c||e[15]!==b?(p=(h,E)=>c?E<b*c&&E>=(b-1)*c:!0,e[14]=c,e[15]=b,e[16]=p):p=e[16];let x;e[17]!==o||e[18]!==n||e[19]!==w?.dataCards||e[20]!==d||e[21]!==s||e[22]!==D?.dataCards?(x=(h,E)=>r.jsxRuntimeExports.jsx("div",{style:{...D?.dataCards||{},...o&&{backgroundColor:o}},className:`w-full flex flex-col ${s||d?"cursor-pointer":"cursor-auto"}${o?"":"bg-primary-gray-200 dark:bg-primary-gray-600"} ${w?.dataCards||""}`,onClick:()=>{s?.(h),u(h)},dangerouslySetInnerHTML:typeof n=="string"?{__html:Ee.string2HTML(n,h)}:void 0,children:typeof n=="function"?n(h):null},E),e[17]=o,e[18]=n,e[19]=w?.dataCards,e[20]=d,e[21]=s,e[22]=D?.dataCards,e[23]=x):x=e[23],v=l.filter(p).map(x),e[4]=o,e[5]=n,e[6]=w?.dataCards,e[7]=l,e[8]=d,e[9]=c,e[10]=s,e[11]=b,e[12]=D?.dataCards,e[13]=v}else v=e[13];let k;e[24]!==N||e[25]!==v?(k=r.jsxRuntimeExports.jsx("div",{className:"undp-scrollbar w-full my-0 mx-auto grid gap-4 undp-viz-data-cards-container",style:N,children:v}),e[24]=N,e[25]=v,e[26]=k):k=e[26];let f;e[27]!==V||e[28]!==d||e[29]!==_?(f=d&&_!==void 0?r.jsxRuntimeExports.jsxs(Ke.le,{open:_!==void 0,onClose:()=>{u(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof d=="string"?{__html:Ee.string2HTML(d,_)}:void 0,children:typeof d=="function"?d(_):null}),V?r.jsxRuntimeExports.jsx("div",{className:"flex",children:r.jsxRuntimeExports.jsx(Ue.CsvDownloadButton,{csvData:nt(_),headers:[{label:" ",key:" "},{label:"value",key:"value"}],buttonContent:r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4",children:[typeof V=="string"?V:null,r.jsxRuntimeExports.jsx(_e.FileDown,{})]})})}):null]}):null,e[27]=V,e[28]=d,e[29]=_,e[30]=f):f=e[30];let S;return e[31]!==k||e[32]!==f?(S=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[k,f]}),e[31]=k,e[32]=f,e[33]=S):S=e[33],S}const ct=(i,e,t)=>e.length===0?i:i.filter(a=>e.some(l=>a[l]?.toLowerCase().includes(t.toLowerCase())));function ut(i){const e=r.compilerRuntimeExports.c(84),{width:t,height:a,graphTitle:l,sources:s,graphDescription:n,footNote:o,graphID:y,data:d,onSeriesMouseClick:c,language:D,theme:w,ariaLabel:b,cardTemplate:V,cardBackgroundColor:j,cardFilters:_,cardSortingOptions:u,cardSearchColumns:g,cardMinWidth:C,backgroundColor:$,padding:N,detailsOnClick:v,allowDataDownloadOnDetail:k,noOfItemsInAPage:f,uiMode:S,styles:p,classNames:x}=i,h=D===void 0?"en":D,E=w===void 0?"light":w,z=C===void 0?320:C,M=$===void 0?!1:$,I=k===void 0?!1:k,q=S===void 0?"normal":S,[P,Oe]=R.useState(d),[xe,Ne]=R.useState(1),Fe=R.useRef(null),[O,Te]=R.useState("");let Q;e[0]!==d?(Q=m=>({filter:m.column,label:m.label||`Filter by ${m.column}`,singleSelect:!0,clearable:!0,defaultValue:Ve.transformDefaultValue(m.defaultValue),availableValues:Je.getUniqValue(d,m.column).filter(W=>!m.excludeValues?.includes(`${W}`)).map(pt),width:m.width}),e[0]=d,e[1]=Q):Q=e[1];const ke=(_||[]).map(Q);let F;e[2]!==_?(F=_||[],e[2]=_,e[3]=F):F=e[3];let J;e[4]!==F?(J=F.map(mt),e[4]=F,e[5]=J):J=e[5];const[T,Ge]=R.useState(J),[B,Se]=R.useState(u?!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]:void 0),we={ignoreCase:!0,ignoreAccents:!0,trim:!0};let X;e[6]!==u?(X=()=>{Se(u?!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]:void 0)},e[6]=u,e[7]=X):X=e[7];const fe=R.useEffectEvent(X);let Y;e[8]!==fe?(Y=()=>{fe()},e[8]=fe,e[9]=Y):Y=e[9];let Z;e[10]!==u?(Z=[u],e[10]=u,e[11]=Z):Z=e[11],R.useEffect(Y,Z);let ee;e[12]===Symbol.for("react.memo_cache_sentinel")?(ee=m=>{Oe(m),Ne(1)},e[12]=ee):ee=e[12];const te=R.useEffectEvent(ee);let ae;e[13]!==te||e[14]!==g||e[15]!==d||e[16]!==O||e[17]!==T||e[18]!==B?(ae=()=>{const m=ct(d,g||[],O).filter(W=>T.every(U=>U.value&&je.flattenDeep([U.value]).length>0?He.intersection(je.flattenDeep([W[U.filter]]),je.flattenDeep([U.value]).map(dt)).length>0:!0));te(B?Ae.orderBy(m,[B.value],[B.type]):m)},e[13]=te,e[14]=g,e[15]=d,e[16]=O,e[17]=T,e[18]=B,e[19]=ae):ae=e[19];let re;e[20]!==g||e[21]!==d||e[22]!==O||e[23]!==T||e[24]!==B?(re=[d,g,O,T,B],e[20]=g,e[21]=d,e[22]=O,e[23]=T,e[24]=B,e[25]=re):re=e[25],R.useEffect(ae,re);const ye=Xe.GraphContainer,he=x?.graphContainer,ge=p?.graphContainer;let G;e[26]!==x?.description||e[27]!==x?.title||e[28]!==n||e[29]!==l||e[30]!==p?.description||e[31]!==p?.title||e[32]!==t?(G=l||n?r.jsxRuntimeExports.jsx(Qe.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:x?.title,description:x?.description},graphTitle:l,graphDescription:n,width:t}):null,e[26]=x?.description,e[27]=x?.title,e[28]=n,e[29]=l,e[30]=p?.description,e[31]=p?.title,e[32]=t,e[33]=G):G=e[33];const ve=u||ke.length>0?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-x-4 gap-y-0 flex-wrap items-start w-full pb-3",children:[u?r.jsxRuntimeExports.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:u.width||"calc(25% - 0.75rem)"},children:[r.jsxRuntimeExports.jsx(Ce._,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:"Sort by"}),r.jsxRuntimeExports.jsx(ce.ja,{options:u.options,isRtl:h==="he"||h==="ar",isSearchable:!0,filterOption:ce.Du(we),onChange:m=>{Se(m||void 0)},variant:q,size:"sm",defaultValue:!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]})]}):null,ke?.map((m,W)=>r.jsxRuntimeExports.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:m.width||"calc(25% - 0.75rem)"},children:[r.jsxRuntimeExports.jsx(Ce._,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:m.label}),r.jsxRuntimeExports.jsx(ce.ja,{options:m.availableValues,isClearable:m.clearable===void 0?!0:m.clearable,isRtl:h==="he"||h==="ar",isSearchable:!0,variant:q,size:"sm",controlShouldRenderValue:!0,filterOption:ce.Du(we),onChange:U=>{Ge(Le=>Le.map(be=>be.filter===m.filter?{...be,value:U}:be))},defaultValue:m.defaultValue})]},W))]}):null;let se;e[34]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[34]=se):se=e[34];let L;e[35]!==g||e[36]!==q?(L=(g||[]).length>0?r.jsxRuntimeExports.jsx("div",{style:{paddingTop:"1px"},children:r.jsxRuntimeExports.jsx(Be,{placeholder:"Search...",onSearch:m=>{Te(m||"")},buttonVariant:"icon",inputVariant:q,showSearchButton:!1,inputSize:"sm"})}):null,e[35]=g,e[36]=q,e[37]=L):L=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[38]=le):le=e[38];let H;e[39]!==I||e[40]!==j||e[41]!==P||e[42]!==z||e[43]!==V||e[44]!==x||e[45]!==v||e[46]!==a||e[47]!==f||e[48]!==c||e[49]!==xe||e[50]!==p||e[51]!==t?(H=r.jsxRuntimeExports.jsx(ot,{data:P,width:t,height:a,cardTemplate:V,cardMinWidth:z,page:xe,cardBackgroundColor:j,styles:p,classNames:x,noOfItemsInAPage:f,detailsOnClick:v,onSeriesMouseClick:c,allowDataDownloadOnDetail:I}),e[39]=I,e[40]=j,e[41]=P,e[42]=z,e[43]=V,e[44]=x,e[45]=v,e[46]=a,e[47]=f,e[48]=c,e[49]=xe,e[50]=p,e[51]=t,e[52]=H):H=e[52];let ie;e[53]===Symbol.for("react.memo_cache_sentinel")?(ie=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[53]=ie):ie=e[53];let A;e[54]!==P||e[55]!==f?(A=f?r.jsxRuntimeExports.jsx(st,{total:P.length,defaultPage:0,pageSize:f,onChange:Ne}):null,e[54]=P,e[55]=f,e[56]=A):A=e[56];let ne;e[57]===Symbol.for("react.memo_cache_sentinel")?(ne=r.jsxRuntimeExports.jsx(ue.n,{size:"2xl"}),e[57]=ne):ne=e[57];let K;e[58]!==x?.footnote||e[59]!==x?.source||e[60]!==o||e[61]!==s||e[62]!==p?.footnote||e[63]!==p?.source||e[64]!==t?(K=s||o?r.jsxRuntimeExports.jsx(We.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:s,footNote:o,width:t}):null,e[58]=x?.footnote,e[59]=x?.source,e[60]=o,e[61]=s,e[62]=p?.footnote,e[63]=p?.source,e[64]=t,e[65]=K):K=e[65];let oe;return e[66]!==ye||e[67]!==b||e[68]!==M||e[69]!==y||e[70]!==a||e[71]!==h||e[72]!==N||e[73]!==he||e[74]!==ge||e[75]!==G||e[76]!==ve||e[77]!==L||e[78]!==H||e[79]!==A||e[80]!==K||e[81]!==E||e[82]!==t?(oe=r.jsxRuntimeExports.jsxs(ye,{className:he,style:ge,id:y,ref:Fe,"aria-label":b,backgroundColor:M,theme:E,language:h,width:t,height:a,padding:N,children:[G,ve,se,L,le,H,ie,A,ne,K]}),e[66]=ye,e[67]=b,e[68]=M,e[69]=y,e[70]=a,e[71]=h,e[72]=N,e[73]=he,e[74]=ge,e[75]=G,e[76]=ve,e[77]=L,e[78]=H,e[79]=A,e[80]=K,e[81]=E,e[82]=t,e[83]=oe):oe=e[83],oe}function dt(i){return i.value}function mt(i){return{filter:i.column,value:Ve.transformDefaultValue(i.defaultValue)}}function pt(i){return{value:i,label:i}}exports.DataCards=ut;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),He=require("./index-CyZ1lmi_.cjs"),je=require("./index-BS2TADPj.cjs"),ce=require("./DropdownSelect-NNpOs7DX.cjs"),Ce=require("./Typography-Cc_iHQB-.cjs"),me=require("./x-BBpi7a_7-DXYIEFwN.cjs"),_e=require("./index-sbKVyHS2.cjs"),Ae=require("./index-Cno4Q0YE.cjs"),ue=require("./Source-24M277ZQ.cjs"),Ke=require("./Modal-CaYa_TLE.cjs"),Ue=require("./CsvDownloadButton.cjs"),Ee=require("./string2HTML-xx9MzTtY.cjs"),We=require("./GraphFooter.cjs"),Qe=require("./GraphHeader.cjs"),Je=require("./getUniqValue-NX8DgwND.cjs"),Ve=require("./transformDataForSelect-YmStusCI.cjs"),Xe=require("./GraphContainer-B1EDxJ0S.cjs");const Ye=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ze=me.k("chevron-left",Ye);const et=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tt=me.k("chevron-right",et);const at=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],rt=me.k("ellipsis",at);function $e(i){const e=r._.c(8);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("mx-auto flex w-full justify-center",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=r.ae.jsx("nav",{...a,role:"navigation","aria-label":"pagination",className:l}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}$e.displayName="PaginationUnit";const qe=R.forwardRef((i,e)=>{const t=r._.c(9);let a,l;t[0]!==i?({className:a,...l}=i,t[0]=i,t[1]=a,t[2]=l):(a=t[1],l=t[2]);let s;t[3]!==a?(s=r.mo("flex flex-row items-center gap-1 list-none",a),t[3]=a,t[4]=s):s=t[4];let n;return t[5]!==l||t[6]!==e||t[7]!==s?(n=r.ae.jsx("ul",{...l,ref:e,className:s}),t[5]=l,t[6]=e,t[7]=s,t[8]=n):n=t[8],n});qe.displayName="PaginationContent";const de=R.forwardRef((i,e)=>{const t=r._.c(9);let a,l;t[0]!==i?({className:a,...l}=i,t[0]=i,t[1]=a,t[2]=l):(a=t[1],l=t[2]);let s;t[3]!==a?(s=r.mo("mr-2 last:mr-0",a),t[3]=a,t[4]=s):s=t[4];let n;return t[5]!==l||t[6]!==e||t[7]!==s?(n=r.ae.jsx("li",{...l,ref:e,className:s}),t[5]=l,t[6]=e,t[7]=s,t[8]=n):n=t[8],n});de.displayName="PaginationItem";function pe(i){const e=r._.c(10);let t,a,l;e[0]!==i?({className:a,children:t,...l}=i,e[0]=i,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);let s;e[4]!==a?(s=r.mo("p-4 text-base text-primary-black dark:text-primary-gray-100 dark:hover:bg-primary-gray-600",a),e[4]=a,e[5]=s):s=e[5];let n;return e[6]!==t||e[7]!==l||e[8]!==s?(n=r.ae.jsx("button",{...l,type:"button",className:s,children:t}),e[6]=t,e[7]=l,e[8]=s,e[9]=n):n=e[9],n}pe.displayName="PaginationLink";function ze(i){const e=r._.c(9);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",t),e[3]=t,e[4]=l):l=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(Ze,{className:"h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100"}),e[5]=s):s=e[5];let n;return e[6]!==a||e[7]!==l?(n=r.ae.jsx(pe,{...a,"aria-label":"Go to previous page",className:l,children:s}),e[6]=a,e[7]=l,e[8]=n):n=e[8],n}ze.displayName="PaginationPrevious";function Me(i){const e=r._.c(9);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",t),e[3]=t,e[4]=l):l=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(tt,{className:"h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100"}),e[5]=s):s=e[5];let n;return e[6]!==a||e[7]!==l?(n=r.ae.jsx(pe,{...a,"aria-label":"Go to next page",className:l,children:s}),e[6]=a,e[7]=l,e[8]=n):n=e[8],n}Me.displayName="PaginationNext";function Ie(i){const e=r._.c(10);let t,a;e[0]!==i?({className:t,...a}=i,e[0]=i,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=r.mo("flex h-9 w-9 items-center justify-center",t),e[3]=t,e[4]=l):l=e[4];let s,n;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=r.ae.jsx(rt,{className:"h-4 w-4 text-primary-gray-700 dark:text-primary-gray-100"}),n=r.ae.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=s,e[6]=n):(s=e[5],n=e[6]);let o;return e[7]!==a||e[8]!==l?(o=r.ae.jsxs("span",{...a,"aria-hidden":!0,className:l,children:[s,n]}),e[7]=a,e[8]=l,e[9]=o):o=e[9],o}Ie.displayName="PaginationEllipsis";const Re=(i,e)=>{const t=[];return e<=7?Array.from({length:e},(a,l)=>l+1):(t.push(1),i<=3?t.push(2,3,4,"ellipsis"):i>=e-2?t.push("ellipsis",e-3,e-2,e-1):t.push("ellipsis",i-1,i,i+1,"ellipsis"),t.push(e),t)};function st(i){const e=r._.c(49),{defaultPage:t,total:a,pageSize:l,onChange:s,className:n,classNames:o}=i,y=t===void 0?1:t,d=Math.ceil(a/l),[c,D]=R.useState(y);let w;e[0]!==y||e[1]!==d?(w=Re(y,d),e[0]=y,e[1]=d,e[2]=w):w=e[2];const[b,V]=R.useState(w);let j,_;e[3]!==c||e[4]!==d?(j=()=>{V(Re(c,d))},_=[c,d],e[3]=c,e[4]=d,e[5]=j,e[6]=_):(j=e[5],_=e[6]),R.useEffect(j,_);const u=o?.control;let g;e[7]!==n||e[8]!==u?(g=r.mo("select-none",n,u),e[7]=n,e[8]=u,e[9]=g):g=e[9];let C;e[10]!==c||e[11]!==s?(C=()=>{c>1&&(s(c-1),D(c-1))},e[10]=c,e[11]=s,e[12]=C):C=e[12];const $=o?.navigation,N=c<=1&&"cursor-not-allowed pointer-events-none opacity-35";let v;e[13]!==$||e[14]!==N?(v=r.mo("cursor-pointer",$,N),e[13]=$,e[14]=N,e[15]=v):v=e[15];let k;e[16]!==C||e[17]!==v?(k=r.ae.jsx(de,{children:r.ae.jsx(ze,{onClick:C,className:v})}),e[16]=C,e[17]=v,e[18]=k):k=e[18];let f;if(e[19]!==o?.active||e[20]!==o?.ellipsis||e[21]!==o?.list||e[22]!==c||e[23]!==s||e[24]!==b){let I;e[26]!==o?.active||e[27]!==o?.ellipsis||e[28]!==o?.list||e[29]!==c||e[30]!==s?(I=(q,P)=>r.ae.jsx(de,{children:q==="ellipsis"?r.ae.jsx(Ie,{className:o?.ellipsis}):r.ae.jsx(pe,{onClick:()=>{D(q),s(q)},className:r.mo("cursor-pointer w-[32px] h-[32px] flex items-center justify-center rounded-full hover:bg-primary-gray-300",o?.list,q===c&&["bg-primary-blue-600 hover:bg-primary-blue-700 dark:bg-primary-blue-500 dark:hover:bg-primary-blue-400 hover:text-primary-white text-primary-white",o?.active]),children:q})},P),e[26]=o?.active,e[27]=o?.ellipsis,e[28]=o?.list,e[29]=c,e[30]=s,e[31]=I):I=e[31],f=b.map(I),e[19]=o?.active,e[20]=o?.ellipsis,e[21]=o?.list,e[22]=c,e[23]=s,e[24]=b,e[25]=f}else f=e[25];let S;e[32]!==c||e[33]!==s||e[34]!==d?(S=()=>{c<d&&(s(c+1),D(c+1))},e[32]=c,e[33]=s,e[34]=d,e[35]=S):S=e[35];const p=o?.navigation,x=c>=d&&"cursor-not-allowed pointer-events-none opacity-35";let h;e[36]!==p||e[37]!==x?(h=r.mo("cursor-pointer",p,x),e[36]=p,e[37]=x,e[38]=h):h=e[38];let E;e[39]!==S||e[40]!==h?(E=r.ae.jsx(de,{children:r.ae.jsx(Me,{onClick:S,className:h})}),e[39]=S,e[40]=h,e[41]=E):E=e[41];let z;e[42]!==k||e[43]!==f||e[44]!==E?(z=r.ae.jsxs(qe,{children:[k,f,E]}),e[42]=k,e[43]=f,e[44]=E,e[45]=z):z=e[45];let M;return e[46]!==z||e[47]!==g?(M=r.ae.jsx($e,{className:g,children:z}),e[46]=z,e[47]=g,e[48]=M):M=e[48],M}const lt=r.j("w-full h-auto bg-primary-white dark:bg-primary-gray-650 text-primary-black dark:text-primary-white text-base transition-colors file:border-0 file:bg-transparent file:font-medium file:text-primary-gray-700 dark:file:text-primary-white focus-visible:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-primary-gray-550 dark:placeholder:text-primary-gray-400",{variants:{variant:{light:"border border-primary-gray-400 dark:border-primary-gray-500",normal:"border-2 border-primary-black dark:border-primary-gray-300"},inputSize:{sm:"px-2.5 py-1",base:"p-2.5"}},defaultVariants:{inputSize:"base",variant:"normal"}}),Pe=R.forwardRef((i,e)=>{const t=r._.c(13);let a,l,s,n;t[0]!==i?({className:a,inputSize:l,variant:n,...s}=i,t[0]=i,t[1]=a,t[2]=l,t[3]=s,t[4]=n):(a=t[1],l=t[2],s=t[3],n=t[4]);let o;t[5]!==a||t[6]!==l||t[7]!==n?(o=r.mo(lt({inputSize:l,variant:n}),a),t[5]=a,t[6]=l,t[7]=n,t[8]=o):o=t[8];let y;return t[9]!==s||t[10]!==e||t[11]!==o?(y=r.ae.jsx("input",{...s,ref:e,className:o}),t[9]=s,t[10]=e,t[11]=o,t[12]=y):y=t[12],y});Pe.displayName="Input";const it=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],De=me.k("search",it),Be=R.forwardRef((i,e)=>{const t=r._.c(51);let a,l,s,n,o,y,d,c,D,w,b,V;t[0]!==i?({className:n,inputClassName:o,buttonClassName:l,onSearch:c,searchOnlyOnClick:b,buttonVariant:s,buttonChildren:a,showSearchButton:V,inputVariant:d,inputSize:y,placeholder:D,...w}=i,t[0]=i,t[1]=a,t[2]=l,t[3]=s,t[4]=n,t[5]=o,t[6]=y,t[7]=d,t[8]=c,t[9]=D,t[10]=w,t[11]=b,t[12]=V):(a=t[1],l=t[2],s=t[3],n=t[4],o=t[5],y=t[6],d=t[7],c=t[8],D=t[9],w=t[10],b=t[11],V=t[12]);const[j,_]=R.useState(void 0),[u,g]=R.useState(!1);let C;t[13]!==n?(C=r.mo("flex gap-0",n),t[13]=n,t[14]=C):C=t[14];let $;t[15]!==c||t[16]!==b?($=E=>{_(E.target.value),b||c?.(E.target.value)},t[15]=c,t[16]=b,t[17]=$):$=t[17];let N;t[18]!==c||t[19]!==j?(N=E=>{E.key==="Enter"&&c?.(j)},t[18]=c,t[19]=j,t[20]=N):N=t[20];let v,k;t[21]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!0),k=()=>g(!1),t[21]=v,t[22]=k):(v=t[21],k=t[22]);let f;t[23]!==o||t[24]!==y||t[25]!==d||t[26]!==w||t[27]!==$||t[28]!==N?(f=r.ae.jsx(Pe,{...w,variant:d,type:"text",className:o,onChange:$,inputSize:y,onKeyDown:N,onFocus:v,onBlur:k}),t[23]=o,t[24]=y,t[25]=d,t[26]=w,t[27]=$,t[28]=N,t[29]=f):f=t[29];let S;t[30]!==a||t[31]!==u||t[32]!==D||t[33]!==j?(S=!u&&(j===""||!j)&&r.ae.jsxs("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:[a?null:r.ae.jsx(De,{className:"h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2"}),r.ae.jsx("span",{className:"text-primary-gray-500 dark:text-primary-gray-400",children:D||"Search..."})]}),t[30]=a,t[31]=u,t[32]=D,t[33]=j,t[34]=S):S=t[34];let p;t[35]!==f||t[36]!==S?(p=r.ae.jsxs("div",{className:"relative w-full",children:[f,S]}),t[35]=f,t[36]=S,t[37]=p):p=t[37];let x;t[38]!==a||t[39]!==l||t[40]!==s||t[41]!==y||t[42]!==c||t[43]!==j||t[44]!==V?(x=V===!1?null:r.ae.jsx(_e.u,{variant:s||"icon",className:l,padding:y,onClick:()=>{c?.(j)},children:a||r.ae.jsx(De,{className:"stroke-2"})}),t[38]=a,t[39]=l,t[40]=s,t[41]=y,t[42]=c,t[43]=j,t[44]=V,t[45]=x):x=t[45];let h;return t[46]!==e||t[47]!==C||t[48]!==p||t[49]!==x?(h=r.ae.jsxs("div",{className:C,ref:e,children:[p,x]}),t[46]=e,t[47]=C,t[48]=p,t[49]=x,t[50]=h):h=t[50],h});Be.displayName="Search";const nt=i=>i?Object.entries(i).map(([t,a])=>Array.isArray(a)?{" ":t,value:`"${a.join("; ")}"`}:{" ":t,value:`"${a}"`}):{};function ot(i){const e=r.compilerRuntimeExports.c(34),{width:t,height:a,data:l,onSeriesMouseClick:s,cardTemplate:n,cardBackgroundColor:o,cardMinWidth:y,detailsOnClick:d,noOfItemsInAPage:c,styles:D,classNames:w,page:b,allowDataDownloadOnDetail:V}=i,j=y===void 0?320:y,[_,u]=R.useState(void 0),g=t?`${t}px`:"100%",C=a?`${a}px`:"auto",$=`repeat(auto-fill, minmax(${j}px, 1fr))`;let N;e[0]!==g||e[1]!==C||e[2]!==$?(N={width:g,height:C,gridTemplateColumns:$},e[0]=g,e[1]=C,e[2]=$,e[3]=N):N=e[3];let v;if(e[4]!==o||e[5]!==n||e[6]!==w?.dataCards||e[7]!==l||e[8]!==d||e[9]!==c||e[10]!==s||e[11]!==b||e[12]!==D?.dataCards){let p;e[14]!==c||e[15]!==b?(p=(h,E)=>c?E<b*c&&E>=(b-1)*c:!0,e[14]=c,e[15]=b,e[16]=p):p=e[16];let x;e[17]!==o||e[18]!==n||e[19]!==w?.dataCards||e[20]!==d||e[21]!==s||e[22]!==D?.dataCards?(x=(h,E)=>r.jsxRuntimeExports.jsx("div",{style:{...D?.dataCards||{},...o&&{backgroundColor:o}},className:`w-full flex flex-col ${s||d?"cursor-pointer":"cursor-auto"}${o?"":"bg-primary-gray-200 dark:bg-primary-gray-600"} ${w?.dataCards||""}`,onClick:()=>{s?.(h),u(h)},dangerouslySetInnerHTML:typeof n=="string"?{__html:Ee.string2HTML(n,h)}:void 0,children:typeof n=="function"?n(h):null},E),e[17]=o,e[18]=n,e[19]=w?.dataCards,e[20]=d,e[21]=s,e[22]=D?.dataCards,e[23]=x):x=e[23],v=l.filter(p).map(x),e[4]=o,e[5]=n,e[6]=w?.dataCards,e[7]=l,e[8]=d,e[9]=c,e[10]=s,e[11]=b,e[12]=D?.dataCards,e[13]=v}else v=e[13];let k;e[24]!==N||e[25]!==v?(k=r.jsxRuntimeExports.jsx("div",{className:"undp-scrollbar w-full my-0 mx-auto grid gap-4 undp-viz-data-cards-container",style:N,children:v}),e[24]=N,e[25]=v,e[26]=k):k=e[26];let f;e[27]!==V||e[28]!==d||e[29]!==_?(f=d&&_!==void 0?r.jsxRuntimeExports.jsxs(Ke.le,{open:_!==void 0,onClose:()=>{u(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof d=="string"?{__html:Ee.string2HTML(d,_)}:void 0,children:typeof d=="function"?d(_):null}),V?r.jsxRuntimeExports.jsx("div",{className:"flex",children:r.jsxRuntimeExports.jsx(Ue.CsvDownloadButton,{csvData:nt(_),headers:[{label:" ",key:" "},{label:"value",key:"value"}],buttonContent:r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4",children:[typeof V=="string"?V:null,r.jsxRuntimeExports.jsx(_e.FileDown,{})]})})}):null]}):null,e[27]=V,e[28]=d,e[29]=_,e[30]=f):f=e[30];let S;return e[31]!==k||e[32]!==f?(S=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[k,f]}),e[31]=k,e[32]=f,e[33]=S):S=e[33],S}const ct=(i,e,t)=>e.length===0?i:i.filter(a=>e.some(l=>a[l]?.toLowerCase().includes(t.toLowerCase())));function ut(i){const e=r.compilerRuntimeExports.c(84),{width:t,height:a,graphTitle:l,sources:s,graphDescription:n,footNote:o,graphID:y,data:d,onSeriesMouseClick:c,language:D,theme:w,ariaLabel:b,cardTemplate:V,cardBackgroundColor:j,cardFilters:_,cardSortingOptions:u,cardSearchColumns:g,cardMinWidth:C,backgroundColor:$,padding:N,detailsOnClick:v,allowDataDownloadOnDetail:k,noOfItemsInAPage:f,uiMode:S,styles:p,classNames:x}=i,h=D===void 0?"en":D,E=w===void 0?"light":w,z=C===void 0?320:C,M=$===void 0?!1:$,I=k===void 0?!1:k,q=S===void 0?"normal":S,[P,Oe]=R.useState(d),[xe,Ne]=R.useState(1),Fe=R.useRef(null),[O,Te]=R.useState("");let Q;e[0]!==d?(Q=m=>({filter:m.column,label:m.label||`Filter by ${m.column}`,singleSelect:!0,clearable:!0,defaultValue:Ve.transformDefaultValue(m.defaultValue),availableValues:Je.getUniqValue(d,m.column).filter(W=>!m.excludeValues?.includes(`${W}`)).map(pt),width:m.width}),e[0]=d,e[1]=Q):Q=e[1];const ke=(_||[]).map(Q);let F;e[2]!==_?(F=_||[],e[2]=_,e[3]=F):F=e[3];let J;e[4]!==F?(J=F.map(mt),e[4]=F,e[5]=J):J=e[5];const[T,Ge]=R.useState(J),[B,Se]=R.useState(u?!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]:void 0),we={ignoreCase:!0,ignoreAccents:!0,trim:!0};let X;e[6]!==u?(X=()=>{Se(u?!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]:void 0)},e[6]=u,e[7]=X):X=e[7];const fe=R.useEffectEvent(X);let Y;e[8]!==fe?(Y=()=>{fe()},e[8]=fe,e[9]=Y):Y=e[9];let Z;e[10]!==u?(Z=[u],e[10]=u,e[11]=Z):Z=e[11],R.useEffect(Y,Z);let ee;e[12]===Symbol.for("react.memo_cache_sentinel")?(ee=m=>{Oe(m),Ne(1)},e[12]=ee):ee=e[12];const te=R.useEffectEvent(ee);let ae;e[13]!==te||e[14]!==g||e[15]!==d||e[16]!==O||e[17]!==T||e[18]!==B?(ae=()=>{const m=ct(d,g||[],O).filter(W=>T.every(U=>U.value&&je.flattenDeep([U.value]).length>0?He.intersection(je.flattenDeep([W[U.filter]]),je.flattenDeep([U.value]).map(dt)).length>0:!0));te(B?Ae.orderBy(m,[B.value],[B.type]):m)},e[13]=te,e[14]=g,e[15]=d,e[16]=O,e[17]=T,e[18]=B,e[19]=ae):ae=e[19];let re;e[20]!==g||e[21]!==d||e[22]!==O||e[23]!==T||e[24]!==B?(re=[d,g,O,T,B],e[20]=g,e[21]=d,e[22]=O,e[23]=T,e[24]=B,e[25]=re):re=e[25],R.useEffect(ae,re);const ye=Xe.GraphContainer,he=x?.graphContainer,ge=p?.graphContainer;let G;e[26]!==x?.description||e[27]!==x?.title||e[28]!==n||e[29]!==l||e[30]!==p?.description||e[31]!==p?.title||e[32]!==t?(G=l||n?r.jsxRuntimeExports.jsx(Qe.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:x?.title,description:x?.description},graphTitle:l,graphDescription:n,width:t}):null,e[26]=x?.description,e[27]=x?.title,e[28]=n,e[29]=l,e[30]=p?.description,e[31]=p?.title,e[32]=t,e[33]=G):G=e[33];const ve=u||ke.length>0?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-x-4 gap-y-0 flex-wrap items-start w-full pb-3",children:[u?r.jsxRuntimeExports.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:u.width||"calc(25% - 0.75rem)"},children:[r.jsxRuntimeExports.jsx(Ce._,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:"Sort by"}),r.jsxRuntimeExports.jsx(ce.ja,{options:u.options,isRtl:h==="he"||h==="ar",isSearchable:!0,filterOption:ce.Du(we),onChange:m=>{Se(m||void 0)},variant:q,size:"sm",defaultValue:!u.defaultValue||u.options.findIndex(m=>m.label===u.defaultValue)===-1?u.options[0]:u.options[u.options.findIndex(m=>m.label===u.defaultValue)]})]}):null,ke?.map((m,W)=>r.jsxRuntimeExports.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:m.width||"calc(25% - 0.75rem)"},children:[r.jsxRuntimeExports.jsx(Ce._,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:m.label}),r.jsxRuntimeExports.jsx(ce.ja,{options:m.availableValues,isClearable:m.clearable===void 0?!0:m.clearable,isRtl:h==="he"||h==="ar",isSearchable:!0,variant:q,size:"sm",controlShouldRenderValue:!0,filterOption:ce.Du(we),onChange:U=>{Ge(Le=>Le.map(be=>be.filter===m.filter?{...be,value:U}:be))},defaultValue:m.defaultValue})]},W))]}):null;let se;e[34]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[34]=se):se=e[34];let L;e[35]!==g||e[36]!==q?(L=(g||[]).length>0?r.jsxRuntimeExports.jsx("div",{style:{paddingTop:"1px"},children:r.jsxRuntimeExports.jsx(Be,{placeholder:"Search...",onSearch:m=>{Te(m||"")},buttonVariant:"icon",inputVariant:q,showSearchButton:!1,inputSize:"sm"})}):null,e[35]=g,e[36]=q,e[37]=L):L=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[38]=le):le=e[38];let H;e[39]!==I||e[40]!==j||e[41]!==P||e[42]!==z||e[43]!==V||e[44]!==x||e[45]!==v||e[46]!==a||e[47]!==f||e[48]!==c||e[49]!==xe||e[50]!==p||e[51]!==t?(H=r.jsxRuntimeExports.jsx(ot,{data:P,width:t,height:a,cardTemplate:V,cardMinWidth:z,page:xe,cardBackgroundColor:j,styles:p,classNames:x,noOfItemsInAPage:f,detailsOnClick:v,onSeriesMouseClick:c,allowDataDownloadOnDetail:I}),e[39]=I,e[40]=j,e[41]=P,e[42]=z,e[43]=V,e[44]=x,e[45]=v,e[46]=a,e[47]=f,e[48]=c,e[49]=xe,e[50]=p,e[51]=t,e[52]=H):H=e[52];let ie;e[53]===Symbol.for("react.memo_cache_sentinel")?(ie=r.jsxRuntimeExports.jsx(ue.n,{size:"xl"}),e[53]=ie):ie=e[53];let A;e[54]!==P||e[55]!==f?(A=f?r.jsxRuntimeExports.jsx(st,{total:P.length,defaultPage:0,pageSize:f,onChange:Ne}):null,e[54]=P,e[55]=f,e[56]=A):A=e[56];let ne;e[57]===Symbol.for("react.memo_cache_sentinel")?(ne=r.jsxRuntimeExports.jsx(ue.n,{size:"2xl"}),e[57]=ne):ne=e[57];let K;e[58]!==x?.footnote||e[59]!==x?.source||e[60]!==o||e[61]!==s||e[62]!==p?.footnote||e[63]!==p?.source||e[64]!==t?(K=s||o?r.jsxRuntimeExports.jsx(We.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:s,footNote:o,width:t}):null,e[58]=x?.footnote,e[59]=x?.source,e[60]=o,e[61]=s,e[62]=p?.footnote,e[63]=p?.source,e[64]=t,e[65]=K):K=e[65];let oe;return e[66]!==ye||e[67]!==b||e[68]!==M||e[69]!==y||e[70]!==a||e[71]!==h||e[72]!==N||e[73]!==he||e[74]!==ge||e[75]!==G||e[76]!==ve||e[77]!==L||e[78]!==H||e[79]!==A||e[80]!==K||e[81]!==E||e[82]!==t?(oe=r.jsxRuntimeExports.jsxs(ye,{className:he,style:ge,id:y,ref:Fe,"aria-label":b,backgroundColor:M,theme:E,language:h,width:t,height:a,padding:N,children:[G,ve,se,L,le,H,ie,A,ne,K]}),e[66]=ye,e[67]=b,e[68]=M,e[69]=y,e[70]=a,e[71]=h,e[72]=N,e[73]=he,e[74]=ge,e[75]=G,e[76]=ve,e[77]=L,e[78]=H,e[79]=A,e[80]=K,e[81]=E,e[82]=t,e[83]=oe):oe=e[83],oe}function dt(i){return i.value}function mt(i){return{filter:i.column,value:Ve.transformDefaultValue(i.defaultValue)}}function pt(i){return{value:i,label:i}}exports.DataCards=ut;
2
2
  //# sourceMappingURL=DataCards.cjs.map
package/dist/DataCards.js CHANGED
@@ -3,11 +3,11 @@ import X, { useState as G, useEffect as Ce, useRef as Ye, useEffectEvent as $e }
3
3
  import { i as Ze } from "./index-BuwmuDFJ.js";
4
4
  import { f as we } from "./index-EArKRVKg.js";
5
5
  import { j as ze, D as Ie } from "./DropdownSelect-D8rFbygC.js";
6
- import { _ as Pe } from "./Typography-iR8PEgdt.js";
6
+ import { _ as Pe } from "./Typography-CdMGooqp.js";
7
7
  import { k as ye } from "./x-BBpi7a_7-BsvWCzYM.js";
8
8
  import { u as et, d as tt } from "./index-B-4y_iGB.js";
9
9
  import { o as at } from "./index-BZQYSqar.js";
10
- import { n as pe } from "./Source-_STIejqs.js";
10
+ import { n as pe } from "./Source-Cu9OHOBj.js";
11
11
  import { l as rt } from "./Modal-Ch9wvKxF.js";
12
12
  import { CsvDownloadButton as lt } from "./CsvDownloadButton.js";
13
13
  import { s as Me } from "./string2HTML-DUYZT1L9.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),jt=require("./index-DQA8q5sC.cjs"),g=require("react"),Rt=require("./index-CyZ1lmi_.cjs"),$=require("./Typography-DrJ7IOdw.cjs"),vt=require("./index-Cno4Q0YE.cjs"),V=require("./numberFormattingFunction-02t-wJta.cjs"),wt=require("./GraphFooter.cjs"),kt=require("./GraphHeader.cjs"),D=require("./index-sbKVyHS2.cjs"),at=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Nt=require("./GraphContainer-B1EDxJ0S.cjs"),bt=c=>c.map(h=>h||1).reduce((h,j)=>h+j,0);function St(c){const t=r.compilerRuntimeExports.c(77),{width:m,height:h,graphTitle:j,sources:B,graphDescription:F,footNote:q,graphID:X,data:d,columnData:n,onSeriesMouseClick:b,language:ct,theme:lt,ariaLabel:Y,backgroundColor:pt,padding:J,resetSelectionOnDoubleClick:ut,styles:l,classNames:p,minWidth:T,naLabel:mt,precision:dt}=c,K=ct===void 0?"en":ct,Q=lt===void 0?"light":lt,U=pt===void 0?!1:pt,Z=ut===void 0?!0:ut,C=mt===void 0?"NA":mt,I=dt===void 0?2:dt,Ct=g.useRef(null),[x,xt]=g.useState(void 0),[z,ft]=g.useState(void 0),[f,gt]=g.useState("asc"),[y,ht]=g.useState(void 0);let W;t[0]===Symbol.for("react.memo_cache_sentinel")?(W={},t[0]=W):W=t[0];const[_,It]=g.useState(W);let G;t[1]!==n?(G=n.filter(Bt).map(Dt),t[1]=n,t[2]=G):G=t[2];const[a,yt]=g.useState(G),[tt,Et]=g.useState(d);let P;t[3]===Symbol.for("react.memo_cache_sentinel")?(P=o=>{Et(o)},t[3]=P):P=t[3];const A=g.useEffectEvent(P);let H;t[4]!==n||t[5]!==x||t[6]!==d||t[7]!==a||t[8]!==A||t[9]!==f?(H=()=>{const o=[];d.forEach(u=>{let e=!0;a.forEach(i=>{if(typeof u[i.id]!="object"&&typeof u[i.id]!="function"&&typeof u[i.id]!="symbol")if(n[n.findIndex(s=>s.columnId===i.id)].separator){const s=u[i.id].split(n[n.findIndex(st=>st.columnId===i.id)].separator);Rt.intersection(s,i.option).length===0&&(e=!1)}else i.option.indexOf(u[i.id])===-1&&(e=!1)}),e&&o.push(u)}),A(x&&d?vt.orderBy(o,[x],[f]):o)},t[4]=n,t[5]=x,t[6]=d,t[7]=a,t[8]=A,t[9]=f,t[10]=H):H=t[10];let L;t[11]!==n||t[12]!==x||t[13]!==d||t[14]!==a||t[15]!==f?(L=[x,f,d,a,n],t[11]=n,t[12]=x,t[13]=d,t[14]=a,t[15]=f,t[16]=L):L=t[16],g.useEffect(H,L);const et=p?.graphContainer,ot=l?.graphContainer;let E;t[17]!==p?.description||t[18]!==p?.title||t[19]!==F||t[20]!==j||t[21]!==l?.description||t[22]!==l?.title||t[23]!==m?(E=j||F?r.jsxRuntimeExports.jsx(kt.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:p?.title,description:p?.description},graphTitle:j,graphDescription:F,width:m}):null,t[17]=p?.description,t[18]=p?.title,t[19]=F,t[20]=j,t[21]=l?.description,t[22]=l?.title,t[23]=m,t[24]=E):E=t[24];const rt=m?`${m}px`:"100%",it=h?`${h}px`:"auto";let R;t[25]!==rt||t[26]!==it?(R={width:rt,height:it},t[25]=rt,t[26]=it,t[27]=R):R=t[27];let v;t[28]!==T?(v=T?{minWidth:T}:void 0,t[28]=T,t[29]=v):v=t[29];let w;t[30]!==n||t[31]!==x||t[32]!==d||t[33]!==a||t[34]!==z||t[35]!==C||t[36]!==b||t[37]!==y||t[38]!==I||t[39]!==Z||t[40]!==f||t[41]!==tt?(w=d?r.jsxRuntimeExports.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[r.jsxRuntimeExports.jsx("thead",{className:"text-left bg-primary-gray-300 dark:bg-primary-gray-550",children:r.jsxRuntimeExports.jsx("tr",{children:n?.map((o,u)=>r.jsxRuntimeExports.jsx("th",{className:"text-primary-gray-700 dark:text-primary-gray-100 text-sm",style:{width:`calc(${100*(o.columnWidth||1)/bt(n.map($t))}%`},children:r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 justify-between items-center p-4",children:[r.jsxRuntimeExports.jsx($._,{size:"sm",marginBottom:"none",className:`w-fit grow text-${o.align||"left"} font-bold`,children:o.columnTitle||o.columnId}),o.sortable?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer p-0 m-0 border-0",onClick:()=>{x===o.columnId?(f==="asc"&&gt("desc"),f==="desc"&&xt(void 0)):(xt(o.columnId),gt("asc"))},children:x===o.columnId?f==="asc"?r.jsxRuntimeExports.jsx(D.SortingIconAscending,{}):r.jsxRuntimeExports.jsx(D.SortingIconDescending,{}):r.jsxRuntimeExports.jsx(D.SortingIcon,{})}):null,o.filterOptions&&o.filterOptions.length?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer m-0 p-0 border-0",onClick:e=>{if(y===o.columnId)ht(void 0);else if(e.currentTarget){ht(o.columnId);const i=e.currentTarget.getBoundingClientRect();It({top:i.bottom+window.scrollY,left:i.left+window.scrollX-160<0?i.left+window.scrollX:i.left+window.scrollX-160,width:"10rem"})}},children:a[a.findIndex(e=>e.id===o.columnId)].option.length===o.filterOptions?.length?r.jsxRuntimeExports.jsx(D.FilterIcon,{}):r.jsxRuntimeExports.jsx(D.FilterIconApplied,{})}):null]})},u))})}),r.jsxRuntimeExports.jsx("tbody",{children:tt?.map((o,u)=>r.jsxRuntimeExports.jsx("tr",{className:`cursor-${b?"pointer":"auto"} border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${jt.isEqual(z,o)?"bg-primary-gray-200 dark:bg-primary-gray-600":"bg-transparent"}`,style:o.rowStyle,onClick:()=>{b&&(jt.isEqual(z,o)&&Z?(ft(void 0),b(void 0)):(ft(o),b(o)))},children:n.map((e,i)=>r.jsxRuntimeExports.jsx("td",{className:`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${e.align||"left"}`,style:{width:`calc(${100*(o.columnWidth||1)/bt(n.map(Ot))}%`},children:r.jsxRuntimeExports.jsx("div",{className:`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${e.align==="right"?"justify-end":e.align==="center"?"justify-center":"justify-start"}`,children:typeof o[e.columnId]=="number"?r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color)}:{}},children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)}):typeof o[e.columnId]=="string"?e.separator?r.jsxRuntimeExports.jsx("div",{className:"text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2",children:o[e.columnId].split(e.separator).map((s,st)=>r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(nt=>nt.value===(e.chipColumnId?o[e.chipColumnId]:s))].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(nt=>nt.value===(e.chipColumnId?o[e.chipColumnId]:s))].color)}:{}},children:V.numberFormattingFunction(s,C,I,e.prefix,e.suffix)},st))}):r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color)}:{}},children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)}):r.jsxRuntimeExports.jsx("div",{children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)})})},i))},u))})]}):null,t[30]=n,t[31]=x,t[32]=d,t[33]=a,t[34]=z,t[35]=C,t[36]=b,t[37]=y,t[38]=I,t[39]=Z,t[40]=f,t[41]=tt,t[42]=w):w=t[42];let k;t[43]!==v||t[44]!==w?(k=r.jsxRuntimeExports.jsx("div",{style:v,children:w}),t[43]=v,t[44]=w,t[45]=k):k=t[45];let N;t[46]!==R||t[47]!==k?(N=r.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center",children:r.jsxRuntimeExports.jsx("div",{className:"undp-scrollbar",style:R,children:k})}),t[46]=R,t[47]=k,t[48]=N):N=t[48];let S;t[49]!==p?.footnote||t[50]!==p?.source||t[51]!==q||t[52]!==B||t[53]!==l?.footnote||t[54]!==l?.source||t[55]!==m?(S=B||q?r.jsxRuntimeExports.jsx(wt.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:B,footNote:q,width:m}):null,t[49]=p?.footnote,t[50]=p?.source,t[51]=q,t[52]=B,t[53]=l?.footnote,t[54]=l?.source,t[55]=m,t[56]=S):S=t[56];let O;t[57]!==n||t[58]!==a||t[59]!==_||t[60]!==y?(O=y&&r.jsxRuntimeExports.jsx("div",{style:_,className:"absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550",children:r.jsxRuntimeExports.jsxs("div",{className:"max-w-60",children:[r.jsxRuntimeExports.jsx($._,{size:"sm",marginBottom:"2xs",className:"font-bold",children:"Filter data by"}),r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:n[n.findIndex(o=>o.columnId===y)].filterOptions?.map((o,u)=>r.jsxRuntimeExports.jsx("div",{children:r.jsxRuntimeExports.jsxs("label",{className:"undp-viz-label",children:[r.jsxRuntimeExports.jsx("input",{type:"checkbox",className:"undp-viz-checkbox",checked:a[a.findIndex(e=>e.id===y)].option.indexOf(o)!==-1,onChange:()=>{const e=a.findIndex(s=>s.id===y),i=[...a[e].option];if(i.indexOf(o)!==-1){i.splice(i.indexOf(o),1);const s=[...a];s[e].option=i,yt(s)}else{i.push(o);const s=[...a];s[e].option=i,yt(s)}}}),o]},u)},u))})]})}),t[57]=n,t[58]=a,t[59]=_,t[60]=y,t[61]=O):O=t[61];let M;return t[62]!==Y||t[63]!==U||t[64]!==X||t[65]!==h||t[66]!==K||t[67]!==J||t[68]!==et||t[69]!==ot||t[70]!==E||t[71]!==N||t[72]!==S||t[73]!==O||t[74]!==Q||t[75]!==m?(M=r.jsxRuntimeExports.jsxs(Nt.GraphContainer,{className:et,style:ot,id:X,ref:Ct,"aria-label":Y,backgroundColor:U,theme:Q,language:K,width:m,height:h,padding:J,children:[E,N,S,O]}),t[62]=Y,t[63]=U,t[64]=X,t[65]=h,t[66]=K,t[67]=J,t[68]=et,t[69]=ot,t[70]=E,t[71]=N,t[72]=S,t[73]=O,t[74]=Q,t[75]=m,t[76]=M):M=t[76],M}function Ot(c){return c.columnWidth||1}function $t(c){return c.columnWidth||1}function Dt(c){return{id:c.columnId,option:c.filterOptions}}function Bt(c){return c.filterOptions&&c.filterOptions.length>0}exports.DataTable=St;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),jt=require("./index-DQA8q5sC.cjs"),g=require("react"),Rt=require("./index-CyZ1lmi_.cjs"),$=require("./Typography-Cc_iHQB-.cjs"),vt=require("./index-Cno4Q0YE.cjs"),V=require("./numberFormattingFunction-02t-wJta.cjs"),wt=require("./GraphFooter.cjs"),kt=require("./GraphHeader.cjs"),D=require("./index-sbKVyHS2.cjs"),at=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Nt=require("./GraphContainer-B1EDxJ0S.cjs"),bt=c=>c.map(h=>h||1).reduce((h,j)=>h+j,0);function St(c){const t=r.compilerRuntimeExports.c(77),{width:m,height:h,graphTitle:j,sources:B,graphDescription:F,footNote:q,graphID:X,data:d,columnData:n,onSeriesMouseClick:b,language:ct,theme:lt,ariaLabel:Y,backgroundColor:pt,padding:J,resetSelectionOnDoubleClick:ut,styles:l,classNames:p,minWidth:T,naLabel:mt,precision:dt}=c,K=ct===void 0?"en":ct,Q=lt===void 0?"light":lt,U=pt===void 0?!1:pt,Z=ut===void 0?!0:ut,C=mt===void 0?"NA":mt,I=dt===void 0?2:dt,Ct=g.useRef(null),[x,xt]=g.useState(void 0),[z,ft]=g.useState(void 0),[f,gt]=g.useState("asc"),[y,ht]=g.useState(void 0);let W;t[0]===Symbol.for("react.memo_cache_sentinel")?(W={},t[0]=W):W=t[0];const[_,It]=g.useState(W);let G;t[1]!==n?(G=n.filter(Bt).map(Dt),t[1]=n,t[2]=G):G=t[2];const[a,yt]=g.useState(G),[tt,Et]=g.useState(d);let P;t[3]===Symbol.for("react.memo_cache_sentinel")?(P=o=>{Et(o)},t[3]=P):P=t[3];const A=g.useEffectEvent(P);let H;t[4]!==n||t[5]!==x||t[6]!==d||t[7]!==a||t[8]!==A||t[9]!==f?(H=()=>{const o=[];d.forEach(u=>{let e=!0;a.forEach(i=>{if(typeof u[i.id]!="object"&&typeof u[i.id]!="function"&&typeof u[i.id]!="symbol")if(n[n.findIndex(s=>s.columnId===i.id)].separator){const s=u[i.id].split(n[n.findIndex(st=>st.columnId===i.id)].separator);Rt.intersection(s,i.option).length===0&&(e=!1)}else i.option.indexOf(u[i.id])===-1&&(e=!1)}),e&&o.push(u)}),A(x&&d?vt.orderBy(o,[x],[f]):o)},t[4]=n,t[5]=x,t[6]=d,t[7]=a,t[8]=A,t[9]=f,t[10]=H):H=t[10];let L;t[11]!==n||t[12]!==x||t[13]!==d||t[14]!==a||t[15]!==f?(L=[x,f,d,a,n],t[11]=n,t[12]=x,t[13]=d,t[14]=a,t[15]=f,t[16]=L):L=t[16],g.useEffect(H,L);const et=p?.graphContainer,ot=l?.graphContainer;let E;t[17]!==p?.description||t[18]!==p?.title||t[19]!==F||t[20]!==j||t[21]!==l?.description||t[22]!==l?.title||t[23]!==m?(E=j||F?r.jsxRuntimeExports.jsx(kt.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:p?.title,description:p?.description},graphTitle:j,graphDescription:F,width:m}):null,t[17]=p?.description,t[18]=p?.title,t[19]=F,t[20]=j,t[21]=l?.description,t[22]=l?.title,t[23]=m,t[24]=E):E=t[24];const rt=m?`${m}px`:"100%",it=h?`${h}px`:"auto";let R;t[25]!==rt||t[26]!==it?(R={width:rt,height:it},t[25]=rt,t[26]=it,t[27]=R):R=t[27];let v;t[28]!==T?(v=T?{minWidth:T}:void 0,t[28]=T,t[29]=v):v=t[29];let w;t[30]!==n||t[31]!==x||t[32]!==d||t[33]!==a||t[34]!==z||t[35]!==C||t[36]!==b||t[37]!==y||t[38]!==I||t[39]!==Z||t[40]!==f||t[41]!==tt?(w=d?r.jsxRuntimeExports.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[r.jsxRuntimeExports.jsx("thead",{className:"text-left bg-primary-gray-300 dark:bg-primary-gray-550",children:r.jsxRuntimeExports.jsx("tr",{children:n?.map((o,u)=>r.jsxRuntimeExports.jsx("th",{className:"text-primary-gray-700 dark:text-primary-gray-100 text-sm",style:{width:`calc(${100*(o.columnWidth||1)/bt(n.map($t))}%`},children:r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 justify-between items-center p-4",children:[r.jsxRuntimeExports.jsx($._,{size:"sm",marginBottom:"none",className:`w-fit grow text-${o.align||"left"} font-bold`,children:o.columnTitle||o.columnId}),o.sortable?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer p-0 m-0 border-0",onClick:()=>{x===o.columnId?(f==="asc"&&gt("desc"),f==="desc"&&xt(void 0)):(xt(o.columnId),gt("asc"))},children:x===o.columnId?f==="asc"?r.jsxRuntimeExports.jsx(D.SortingIconAscending,{}):r.jsxRuntimeExports.jsx(D.SortingIconDescending,{}):r.jsxRuntimeExports.jsx(D.SortingIcon,{})}):null,o.filterOptions&&o.filterOptions.length?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer m-0 p-0 border-0",onClick:e=>{if(y===o.columnId)ht(void 0);else if(e.currentTarget){ht(o.columnId);const i=e.currentTarget.getBoundingClientRect();It({top:i.bottom+window.scrollY,left:i.left+window.scrollX-160<0?i.left+window.scrollX:i.left+window.scrollX-160,width:"10rem"})}},children:a[a.findIndex(e=>e.id===o.columnId)].option.length===o.filterOptions?.length?r.jsxRuntimeExports.jsx(D.FilterIcon,{}):r.jsxRuntimeExports.jsx(D.FilterIconApplied,{})}):null]})},u))})}),r.jsxRuntimeExports.jsx("tbody",{children:tt?.map((o,u)=>r.jsxRuntimeExports.jsx("tr",{className:`cursor-${b?"pointer":"auto"} border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${jt.isEqual(z,o)?"bg-primary-gray-200 dark:bg-primary-gray-600":"bg-transparent"}`,style:o.rowStyle,onClick:()=>{b&&(jt.isEqual(z,o)&&Z?(ft(void 0),b(void 0)):(ft(o),b(o)))},children:n.map((e,i)=>r.jsxRuntimeExports.jsx("td",{className:`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${e.align||"left"}`,style:{width:`calc(${100*(o.columnWidth||1)/bt(n.map(Ot))}%`},children:r.jsxRuntimeExports.jsx("div",{className:`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${e.align==="right"?"justify-end":e.align==="center"?"justify-center":"justify-start"}`,children:typeof o[e.columnId]=="number"?r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color)}:{}},children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)}):typeof o[e.columnId]=="string"?e.separator?r.jsxRuntimeExports.jsx("div",{className:"text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2",children:o[e.columnId].split(e.separator).map((s,st)=>r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(nt=>nt.value===(e.chipColumnId?o[e.chipColumnId]:s))].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(nt=>nt.value===(e.chipColumnId?o[e.chipColumnId]:s))].color)}:{}},children:V.numberFormattingFunction(s,C,I,e.prefix,e.suffix)},st))}):r.jsxRuntimeExports.jsx($._,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${e.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${e.align||"left"} ${e.chip?e.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...e.chip&&e.chipColors?{backgroundColor:e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color,color:at.getTextColorBasedOnBgColor(e.chipColors[e.chipColors.findIndex(s=>s.value===o[e.chipColumnId||e.columnId])].color)}:{}},children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)}):r.jsxRuntimeExports.jsx("div",{children:V.numberFormattingFunction(o[e.columnId],C,I,e.prefix,e.suffix)})})},i))},u))})]}):null,t[30]=n,t[31]=x,t[32]=d,t[33]=a,t[34]=z,t[35]=C,t[36]=b,t[37]=y,t[38]=I,t[39]=Z,t[40]=f,t[41]=tt,t[42]=w):w=t[42];let k;t[43]!==v||t[44]!==w?(k=r.jsxRuntimeExports.jsx("div",{style:v,children:w}),t[43]=v,t[44]=w,t[45]=k):k=t[45];let N;t[46]!==R||t[47]!==k?(N=r.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center",children:r.jsxRuntimeExports.jsx("div",{className:"undp-scrollbar",style:R,children:k})}),t[46]=R,t[47]=k,t[48]=N):N=t[48];let S;t[49]!==p?.footnote||t[50]!==p?.source||t[51]!==q||t[52]!==B||t[53]!==l?.footnote||t[54]!==l?.source||t[55]!==m?(S=B||q?r.jsxRuntimeExports.jsx(wt.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:B,footNote:q,width:m}):null,t[49]=p?.footnote,t[50]=p?.source,t[51]=q,t[52]=B,t[53]=l?.footnote,t[54]=l?.source,t[55]=m,t[56]=S):S=t[56];let O;t[57]!==n||t[58]!==a||t[59]!==_||t[60]!==y?(O=y&&r.jsxRuntimeExports.jsx("div",{style:_,className:"absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550",children:r.jsxRuntimeExports.jsxs("div",{className:"max-w-60",children:[r.jsxRuntimeExports.jsx($._,{size:"sm",marginBottom:"2xs",className:"font-bold",children:"Filter data by"}),r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:n[n.findIndex(o=>o.columnId===y)].filterOptions?.map((o,u)=>r.jsxRuntimeExports.jsx("div",{children:r.jsxRuntimeExports.jsxs("label",{className:"undp-viz-label",children:[r.jsxRuntimeExports.jsx("input",{type:"checkbox",className:"undp-viz-checkbox",checked:a[a.findIndex(e=>e.id===y)].option.indexOf(o)!==-1,onChange:()=>{const e=a.findIndex(s=>s.id===y),i=[...a[e].option];if(i.indexOf(o)!==-1){i.splice(i.indexOf(o),1);const s=[...a];s[e].option=i,yt(s)}else{i.push(o);const s=[...a];s[e].option=i,yt(s)}}}),o]},u)},u))})]})}),t[57]=n,t[58]=a,t[59]=_,t[60]=y,t[61]=O):O=t[61];let M;return t[62]!==Y||t[63]!==U||t[64]!==X||t[65]!==h||t[66]!==K||t[67]!==J||t[68]!==et||t[69]!==ot||t[70]!==E||t[71]!==N||t[72]!==S||t[73]!==O||t[74]!==Q||t[75]!==m?(M=r.jsxRuntimeExports.jsxs(Nt.GraphContainer,{className:et,style:ot,id:X,ref:Ct,"aria-label":Y,backgroundColor:U,theme:Q,language:K,width:m,height:h,padding:J,children:[E,N,S,O]}),t[62]=Y,t[63]=U,t[64]=X,t[65]=h,t[66]=K,t[67]=J,t[68]=et,t[69]=ot,t[70]=E,t[71]=N,t[72]=S,t[73]=O,t[74]=Q,t[75]=m,t[76]=M):M=t[76],M}function Ot(c){return c.columnWidth||1}function $t(c){return c.columnWidth||1}function Dt(c){return{id:c.columnId,option:c.filterOptions}}function Bt(c){return c.filterOptions&&c.filterOptions.length>0}exports.DataTable=St;
2
2
  //# sourceMappingURL=DataTable.cjs.map
package/dist/DataTable.js CHANGED
@@ -2,7 +2,7 @@ import { c as vt, j as i } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import { i as yt } from "./index-Bwrro8-q.js";
3
3
  import { useRef as kt, useState as y, useEffectEvent as wt, useEffect as Nt } from "react";
4
4
  import { i as $t } from "./index-BuwmuDFJ.js";
5
- import { _ as B } from "./Typography-iR8PEgdt.js";
5
+ import { _ as B } from "./Typography-CdMGooqp.js";
6
6
  import { o as Ot } from "./index-BZQYSqar.js";
7
7
  import { n as V } from "./numberFormattingFunction-14YCbkN2.js";
8
8
  import { GraphFooter as Dt } from "./GraphFooter.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Jt_tmhxS.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-DX0t62iF.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,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(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Jt_tmhxS.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-N1eHt3vq.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,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(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
2
2
  //# sourceMappingURL=DifferenceLineChart.cjs.map
@@ -27,7 +27,7 @@ import { GraphHeader as Pi } from "./GraphHeader.js";
27
27
  import { ColorLegend as Hi } from "./ColorLegend.js";
28
28
  import { Colors as Xe } from "./Colors.js";
29
29
  import { g as Gi } from "./generateRandomString-za3IQGfQ.js";
30
- import { E as Ri } from "./EmptyState-Pj-emXt5.js";
30
+ import { E as Ri } from "./EmptyState-dScPFkLy.js";
31
31
  import { a as Fi, G as Wi } from "./GraphContainer-CF6ws3pd.js";
32
32
  import { g as Yi } from "./getNoOfTicks-CpmRjcRF.js";
33
33
  function Xi(r) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),ot=require("./Typography-DrJ7IOdw.cjs"),mt=require("./index-Cno4Q0YE.cjs"),xt=require("./Source-B3i0Bx2R.cjs"),pt=require("./index-DQA8q5sC.cjs"),dt=require("./Tooltip-BLa2EfMs.cjs"),W=require("./Colors.cjs"),ct=require("./numberFormattingFunction-02t-wJta.cjs"),gt=require("./DetailsModal-DHttOA80.cjs"),F=require("./array-DMyR1sql.cjs"),rt=require("./proxy-C4-uo6nS.cjs"),ht=require("./use-in-view-C3o_ntMv.cjs"),ft=require("./index-CoobIWNj.cjs"),yt=require("./GraphFooter.cjs"),jt=require("./GraphHeader.cjs"),bt=require("./EmptyState-DX0t62iF.cjs"),it=require("./GraphContainer-B1EDxJ0S.cjs"),vt=Math.PI,st=2*vt;function Et(c,t){return t<c?-1:t>c?1:t>=c?0:NaN}function Ct(c){return c}function Mt(){var c=Ct,t=Et,n=null,a=F.constant(0),r=F.constant(st),p=F.constant(0);function s(e){var l,f=(e=F.array(e)).length,d,S,m=0,g=new Array(f),b=new Array(f),y=+a.apply(this,arguments),q=Math.min(st,Math.max(-st,r.apply(this,arguments)-y)),x,P=Math.min(Math.abs(q)/f,p.apply(this,arguments)),G=P*(q<0?-1:1),h;for(l=0;l<f;++l)(h=b[g[l]=l]=+c(e[l],l,e))>0&&(m+=h);for(t!=null?g.sort(function(R,A){return t(b[R],b[A])}):n!=null&&g.sort(function(R,A){return n(e[R],e[A])}),l=0,S=m?(q-f*G)/m:0;l<f;++l,y=x)d=g[l],h=b[d],x=y+(h>0?h*S:0)+G,b[d]={data:e[d],index:l,value:h,startAngle:y,endAngle:x,padAngle:P};return b}return s.value=function(e){return arguments.length?(c=typeof e=="function"?e:F.constant(+e),s):c},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(a=typeof e=="function"?e:F.constant(+e),s):a},s.endAngle=function(e){return arguments.length?(r=typeof e=="function"?e:F.constant(+e),s):r},s.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:F.constant(+e),s):p},s}const at=(c,t,n,a)=>({x:c+n*Math.cos(a),y:t+n*Math.sin(a)});function lt(c,t,n,a,r){const p=at(c,t,n,a),s=at(c,t,n,Math.abs(r-a)===2*Math.PI?.999999*r:r),e=r-a<=Math.PI?"0":"1";return["M",p.x,p.y,"A",n,n,0,e,1,s.x,s.y].join(" ")}function Rt(c){const t=o.compilerRuntimeExports.c(59),{mainText:n,data:a,radius:r,colors:p,subNote:s,strokeWidth:e,tooltip:l,onSeriesMouseOver:f,onSeriesMouseClick:d,colorDomain:S,resetSelectionOnDoubleClick:m,detailsOnClick:g,styles:b,classNames:y,precision:q,animate:x,trackColor:P}=c,G=M.useRef(null);let h;t[0]!==x.amount||t[1]!==x.once?(h={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=h):h=t[2];const R=ht.useInView(G,h),A=Mt().sort(null).startAngle(0).value(Dt),[j,X]=M.useState(void 0),[v,E]=M.useState(void 0),[V,Y]=M.useState(void 0),[I,J]=M.useState(void 0),K=rt.motion,Q=`${r*2}px`,U=`${r*2}px`,D=`0 0 ${r*2} ${r*2}`,z="ltr",et="mx-auto",T=rt.motion,Z=`translate(${r} ${r})`;let O;t[3]!==a||t[4]!==n||t[5]!==q||t[6]!==r||t[7]!==e||t[8]!==s?(O=n||s?o.jsxRuntimeExports.jsx("foreignObject",{y:0-(r-e),x:0-(r-e),width:2*(r-e),height:2*(r-e),children:o.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4",children:[n?M.isValidElement(n)?n:o.jsxRuntimeExports.jsx(ot.E,{marginBottom:"none",className:"donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center",children:typeof n=="string"?n:a.findIndex(u=>u.label===n.label)!==-1?ct.numberFormattingFunction(a[a.findIndex(u=>u.label===n.label)].size,"NA",q,n.prefix,n.suffix):"NA"}):null,s?o.jsxRuntimeExports.jsx(ot._,{marginBottom:"none",size:"base",leading:"none",className:"donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold",children:s}):typeof n=="string"||!n||M.isValidElement(n)?null:o.jsxRuntimeExports.jsx(ot._,{size:"base",marginBottom:"none",leading:"none",className:"donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold",children:n.label})]})}):null,t[3]=a,t[4]=n,t[5]=q,t[6]=r,t[7]=e,t[8]=s,t[9]=O):O=t[9];const _=r-e/2;let N;t[10]!==e||t[11]!==_||t[12]!==P?(N=o.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:_,fill:"none",stroke:P,strokeWidth:e}),t[10]=e,t[11]=_,t[12]=P,t[13]=N):N=t[13];const $=ft.AnimatePresence;let k;t[14]!==x.duration||t[15]!==S||t[16]!==p||t[17]!==g||t[18]!==R||t[19]!==v||t[20]!==j||t[21]!==d||t[22]!==f||t[23]!==r||t[24]!==m||t[25]!==E||t[26]!==e?(k=(u,ut)=>o.jsxRuntimeExports.jsx(rt.motion.path,{variants:{initial:{pathLength:0,d:lt(0,0,r-e/2,u.startAngle-Math.PI/2,u.endAngle-Math.PI/2),opacity:j?j.label===u.data.label?1:.3:1},whileInView:{pathLength:1,d:lt(0,0,r-e/2,u.startAngle-Math.PI/2,u.endAngle-Math.PI/2),opacity:j?j.label===u.data.label?1:.3:1,transition:{duration:x.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{stroke:S.indexOf(u.data.label)!==-1?p[S.indexOf(u.data.label)%p.length]:W.Colors.gray,strokeWidth:e,fill:"none"},onMouseEnter:tt=>{X(u.data),J(tt.clientY),Y(tt.clientX),f?.(u)},onClick:()=>{(d||g)&&(pt.isEqual(v,u.data)&&m?(E(void 0),d?.(void 0)):(E(u.data),d&&d(u.data)))},onMouseMove:tt=>{X(u.data),J(tt.clientY),Y(tt.clientX)},onMouseLeave:()=>{X(void 0),Y(void 0),J(void 0),f?.(void 0)}},ut),t[14]=x.duration,t[15]=S,t[16]=p,t[17]=g,t[18]=R,t[19]=v,t[20]=j,t[21]=d,t[22]=f,t[23]=r,t[24]=m,t[25]=E,t[26]=e,t[27]=k):k=t[27];const i=A(a).map(k);let C;t[28]!==$||t[29]!==i?(C=o.jsxRuntimeExports.jsx($,{children:i}),t[28]=$,t[29]=i,t[30]=C):C=t[30];let w;t[31]!==N||t[32]!==C||t[33]!==T.g||t[34]!==Z||t[35]!==O?(w=o.jsxRuntimeExports.jsxs(T.g,{transform:Z,children:[O,N,C]}),t[31]=N,t[32]=C,t[33]=T.g,t[34]=Z,t[35]=O,t[36]=w):w=t[36];let B;t[37]!==K.svg||t[38]!==w||t[39]!==Q||t[40]!==U||t[41]!==D?(B=o.jsxRuntimeExports.jsx(K.svg,{ref:G,width:Q,height:U,viewBox:D,direction:z,className:et,children:w}),t[37]=K.svg,t[38]=w,t[39]=Q,t[40]=U,t[41]=D,t[42]=B):B=t[42];let H;t[43]!==y?.tooltip||t[44]!==V||t[45]!==I||t[46]!==j||t[47]!==b?.tooltip||t[48]!==l?(H=j&&l&&V&&I?o.jsxRuntimeExports.jsx(dt.Tooltip,{data:j,body:l,xPos:V,yPos:I,backgroundStyle:b?.tooltip,className:y?.tooltip}):null,t[43]=y?.tooltip,t[44]=V,t[45]=I,t[46]=j,t[47]=b?.tooltip,t[48]=l,t[49]=H):H=t[49];let L;t[50]!==y?.modal||t[51]!==g||t[52]!==v||t[53]!==E?(L=g&&v!==void 0?o.jsxRuntimeExports.jsx(gt.DetailsModal,{body:g,data:v,setData:E,className:y?.modal}):null,t[50]=y?.modal,t[51]=g,t[52]=v,t[53]=E,t[54]=L):L=t[54];let nt;return t[55]!==B||t[56]!==H||t[57]!==L?(nt=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[B,H,L]}),t[55]=B,t[56]=H,t[57]=L,t[58]=nt):nt=t[58],nt}function Dt(c){return c.size}function Nt(c){const{mainText:t,graphTitle:n,colors:a=W.Colors.light.categoricalColors.colors,suffix:r="",sources:p,prefix:s="",strokeWidth:e=50,graphDescription:l,subNote:f,footNote:d,radius:S,data:m,showColorScale:g=!0,padding:b,backgroundColor:y=!1,tooltip:q,onSeriesMouseOver:x,graphID:P,onSeriesMouseClick:G,graphDownload:h=!1,dataDownload:R=!1,colorDomain:A,sortData:j,language:X="en",theme:v="light",width:E,height:V,minHeight:Y=0,relativeHeight:I,ariaLabel:J,resetSelectionOnDoubleClick:K=!0,colorScaleMaxWidth:Q,detailsOnClick:U,styles:D,classNames:z,precision:et=2,animate:T=!1,trackColor:Z=W.Colors.light.grays["gray-200"]}=c,[O,_]=M.useState(0),N=M.useRef(null),$=M.useRef(null);M.useEffect(()=>{const i=new ResizeObserver(C=>{_((Math.min(C[0].target.clientWidth||620,C[0].target.clientHeight||480)||420)/2)});return N.current&&i.observe(N.current),()=>i.disconnect()},[]);const k=j?mt.orderBy(m,["size"],[j]):m;return o.jsxRuntimeExports.jsxs(it.GraphContainer,{className:z?.graphContainer,style:D?.graphContainer,id:P,ref:$,"aria-label":J,backgroundColor:y,theme:v,language:X,minHeight:Y,width:E,height:V,relativeHeight:I,padding:b,children:[n||l||h||R?o.jsxRuntimeExports.jsx(jt.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:z?.title,description:z?.description},graphTitle:n,graphDescription:l,width:E,graphDownload:h?$:void 0,dataDownload:R?m.map(i=>i.data).filter(i=>i!==void 0).length>0?m.map(i=>i.data).filter(i=>i!==void 0):m.filter(i=>i!==void 0):null}):null,g&&m.length>0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:o.mo("leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap",z?.colorLegend),style:{maxWidth:Q},"aria-label":"Color legend",children:k.map((i,C)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center pb-3",children:[o.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:(A||k.map(w=>w.label)).indexOf(i.label)!==-1?(a||W.Colors[v].categoricalColors.colors)[(A||k.map(w=>w.label)).indexOf(i.label)%(a||W.Colors[v].categoricalColors.colors).length]:W.Colors.gray}}),o.jsxRuntimeExports.jsxs(ot._,{marginBottom:"none",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:[i.label,":"," ",o.jsxRuntimeExports.jsx("span",{className:"font-bold",style:{fontSize:"inherit"},children:ct.numberFormattingFunction(i.size,"NA",et,s,r)})]})]},C))}),o.jsxRuntimeExports.jsx(xt.n,{size:"lg"})]}):null,o.jsxRuntimeExports.jsxs(it.GraphArea,{ref:N,children:[m.length===0&&o.jsxRuntimeExports.jsx(bt.EmptyState,{}),O&&m.length>0?o.jsxRuntimeExports.jsx(Rt,{mainText:t,data:k,colors:a,radius:S||O,subNote:f,strokeWidth:e,tooltip:q,colorDomain:A||k.map(i=>i.label),onSeriesMouseOver:x,onSeriesMouseClick:G,resetSelectionOnDoubleClick:K,styles:D,detailsOnClick:U,precision:et,animate:T===!0?{duration:.5,once:!0,amount:.5}:T||{duration:0,once:!0,amount:0},trackColor:Z}):null]}),p||d?o.jsxRuntimeExports.jsx(yt.GraphFooter,{styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:z?.footnote,source:z?.source},sources:p,footNote:d,width:E}):null]})}exports.DonutChart=Nt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),ot=require("./Typography-Cc_iHQB-.cjs"),mt=require("./index-Cno4Q0YE.cjs"),xt=require("./Source-24M277ZQ.cjs"),pt=require("./index-DQA8q5sC.cjs"),dt=require("./Tooltip-BLa2EfMs.cjs"),W=require("./Colors.cjs"),ct=require("./numberFormattingFunction-02t-wJta.cjs"),gt=require("./DetailsModal-DHttOA80.cjs"),F=require("./array-DMyR1sql.cjs"),rt=require("./proxy-C4-uo6nS.cjs"),ht=require("./use-in-view-C3o_ntMv.cjs"),ft=require("./index-CoobIWNj.cjs"),yt=require("./GraphFooter.cjs"),jt=require("./GraphHeader.cjs"),bt=require("./EmptyState-N1eHt3vq.cjs"),it=require("./GraphContainer-B1EDxJ0S.cjs"),vt=Math.PI,st=2*vt;function Et(c,t){return t<c?-1:t>c?1:t>=c?0:NaN}function Ct(c){return c}function Mt(){var c=Ct,t=Et,n=null,a=F.constant(0),r=F.constant(st),p=F.constant(0);function s(e){var l,f=(e=F.array(e)).length,d,S,m=0,g=new Array(f),b=new Array(f),y=+a.apply(this,arguments),q=Math.min(st,Math.max(-st,r.apply(this,arguments)-y)),x,P=Math.min(Math.abs(q)/f,p.apply(this,arguments)),G=P*(q<0?-1:1),h;for(l=0;l<f;++l)(h=b[g[l]=l]=+c(e[l],l,e))>0&&(m+=h);for(t!=null?g.sort(function(R,A){return t(b[R],b[A])}):n!=null&&g.sort(function(R,A){return n(e[R],e[A])}),l=0,S=m?(q-f*G)/m:0;l<f;++l,y=x)d=g[l],h=b[d],x=y+(h>0?h*S:0)+G,b[d]={data:e[d],index:l,value:h,startAngle:y,endAngle:x,padAngle:P};return b}return s.value=function(e){return arguments.length?(c=typeof e=="function"?e:F.constant(+e),s):c},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(a=typeof e=="function"?e:F.constant(+e),s):a},s.endAngle=function(e){return arguments.length?(r=typeof e=="function"?e:F.constant(+e),s):r},s.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:F.constant(+e),s):p},s}const at=(c,t,n,a)=>({x:c+n*Math.cos(a),y:t+n*Math.sin(a)});function lt(c,t,n,a,r){const p=at(c,t,n,a),s=at(c,t,n,Math.abs(r-a)===2*Math.PI?.999999*r:r),e=r-a<=Math.PI?"0":"1";return["M",p.x,p.y,"A",n,n,0,e,1,s.x,s.y].join(" ")}function Rt(c){const t=o.compilerRuntimeExports.c(59),{mainText:n,data:a,radius:r,colors:p,subNote:s,strokeWidth:e,tooltip:l,onSeriesMouseOver:f,onSeriesMouseClick:d,colorDomain:S,resetSelectionOnDoubleClick:m,detailsOnClick:g,styles:b,classNames:y,precision:q,animate:x,trackColor:P}=c,G=M.useRef(null);let h;t[0]!==x.amount||t[1]!==x.once?(h={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=h):h=t[2];const R=ht.useInView(G,h),A=Mt().sort(null).startAngle(0).value(Dt),[j,X]=M.useState(void 0),[v,E]=M.useState(void 0),[V,Y]=M.useState(void 0),[I,J]=M.useState(void 0),K=rt.motion,Q=`${r*2}px`,U=`${r*2}px`,D=`0 0 ${r*2} ${r*2}`,z="ltr",et="mx-auto",T=rt.motion,Z=`translate(${r} ${r})`;let O;t[3]!==a||t[4]!==n||t[5]!==q||t[6]!==r||t[7]!==e||t[8]!==s?(O=n||s?o.jsxRuntimeExports.jsx("foreignObject",{y:0-(r-e),x:0-(r-e),width:2*(r-e),height:2*(r-e),children:o.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4",children:[n?M.isValidElement(n)?n:o.jsxRuntimeExports.jsx(ot.E,{marginBottom:"none",className:"donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center",children:typeof n=="string"?n:a.findIndex(u=>u.label===n.label)!==-1?ct.numberFormattingFunction(a[a.findIndex(u=>u.label===n.label)].size,"NA",q,n.prefix,n.suffix):"NA"}):null,s?o.jsxRuntimeExports.jsx(ot._,{marginBottom:"none",size:"base",leading:"none",className:"donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold",children:s}):typeof n=="string"||!n||M.isValidElement(n)?null:o.jsxRuntimeExports.jsx(ot._,{size:"base",marginBottom:"none",leading:"none",className:"donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold",children:n.label})]})}):null,t[3]=a,t[4]=n,t[5]=q,t[6]=r,t[7]=e,t[8]=s,t[9]=O):O=t[9];const _=r-e/2;let N;t[10]!==e||t[11]!==_||t[12]!==P?(N=o.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:_,fill:"none",stroke:P,strokeWidth:e}),t[10]=e,t[11]=_,t[12]=P,t[13]=N):N=t[13];const $=ft.AnimatePresence;let k;t[14]!==x.duration||t[15]!==S||t[16]!==p||t[17]!==g||t[18]!==R||t[19]!==v||t[20]!==j||t[21]!==d||t[22]!==f||t[23]!==r||t[24]!==m||t[25]!==E||t[26]!==e?(k=(u,ut)=>o.jsxRuntimeExports.jsx(rt.motion.path,{variants:{initial:{pathLength:0,d:lt(0,0,r-e/2,u.startAngle-Math.PI/2,u.endAngle-Math.PI/2),opacity:j?j.label===u.data.label?1:.3:1},whileInView:{pathLength:1,d:lt(0,0,r-e/2,u.startAngle-Math.PI/2,u.endAngle-Math.PI/2),opacity:j?j.label===u.data.label?1:.3:1,transition:{duration:x.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{stroke:S.indexOf(u.data.label)!==-1?p[S.indexOf(u.data.label)%p.length]:W.Colors.gray,strokeWidth:e,fill:"none"},onMouseEnter:tt=>{X(u.data),J(tt.clientY),Y(tt.clientX),f?.(u)},onClick:()=>{(d||g)&&(pt.isEqual(v,u.data)&&m?(E(void 0),d?.(void 0)):(E(u.data),d&&d(u.data)))},onMouseMove:tt=>{X(u.data),J(tt.clientY),Y(tt.clientX)},onMouseLeave:()=>{X(void 0),Y(void 0),J(void 0),f?.(void 0)}},ut),t[14]=x.duration,t[15]=S,t[16]=p,t[17]=g,t[18]=R,t[19]=v,t[20]=j,t[21]=d,t[22]=f,t[23]=r,t[24]=m,t[25]=E,t[26]=e,t[27]=k):k=t[27];const i=A(a).map(k);let C;t[28]!==$||t[29]!==i?(C=o.jsxRuntimeExports.jsx($,{children:i}),t[28]=$,t[29]=i,t[30]=C):C=t[30];let w;t[31]!==N||t[32]!==C||t[33]!==T.g||t[34]!==Z||t[35]!==O?(w=o.jsxRuntimeExports.jsxs(T.g,{transform:Z,children:[O,N,C]}),t[31]=N,t[32]=C,t[33]=T.g,t[34]=Z,t[35]=O,t[36]=w):w=t[36];let B;t[37]!==K.svg||t[38]!==w||t[39]!==Q||t[40]!==U||t[41]!==D?(B=o.jsxRuntimeExports.jsx(K.svg,{ref:G,width:Q,height:U,viewBox:D,direction:z,className:et,children:w}),t[37]=K.svg,t[38]=w,t[39]=Q,t[40]=U,t[41]=D,t[42]=B):B=t[42];let H;t[43]!==y?.tooltip||t[44]!==V||t[45]!==I||t[46]!==j||t[47]!==b?.tooltip||t[48]!==l?(H=j&&l&&V&&I?o.jsxRuntimeExports.jsx(dt.Tooltip,{data:j,body:l,xPos:V,yPos:I,backgroundStyle:b?.tooltip,className:y?.tooltip}):null,t[43]=y?.tooltip,t[44]=V,t[45]=I,t[46]=j,t[47]=b?.tooltip,t[48]=l,t[49]=H):H=t[49];let L;t[50]!==y?.modal||t[51]!==g||t[52]!==v||t[53]!==E?(L=g&&v!==void 0?o.jsxRuntimeExports.jsx(gt.DetailsModal,{body:g,data:v,setData:E,className:y?.modal}):null,t[50]=y?.modal,t[51]=g,t[52]=v,t[53]=E,t[54]=L):L=t[54];let nt;return t[55]!==B||t[56]!==H||t[57]!==L?(nt=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[B,H,L]}),t[55]=B,t[56]=H,t[57]=L,t[58]=nt):nt=t[58],nt}function Dt(c){return c.size}function Nt(c){const{mainText:t,graphTitle:n,colors:a=W.Colors.light.categoricalColors.colors,suffix:r="",sources:p,prefix:s="",strokeWidth:e=50,graphDescription:l,subNote:f,footNote:d,radius:S,data:m,showColorScale:g=!0,padding:b,backgroundColor:y=!1,tooltip:q,onSeriesMouseOver:x,graphID:P,onSeriesMouseClick:G,graphDownload:h=!1,dataDownload:R=!1,colorDomain:A,sortData:j,language:X="en",theme:v="light",width:E,height:V,minHeight:Y=0,relativeHeight:I,ariaLabel:J,resetSelectionOnDoubleClick:K=!0,colorScaleMaxWidth:Q,detailsOnClick:U,styles:D,classNames:z,precision:et=2,animate:T=!1,trackColor:Z=W.Colors.light.grays["gray-200"]}=c,[O,_]=M.useState(0),N=M.useRef(null),$=M.useRef(null);M.useEffect(()=>{const i=new ResizeObserver(C=>{_((Math.min(C[0].target.clientWidth||620,C[0].target.clientHeight||480)||420)/2)});return N.current&&i.observe(N.current),()=>i.disconnect()},[]);const k=j?mt.orderBy(m,["size"],[j]):m;return o.jsxRuntimeExports.jsxs(it.GraphContainer,{className:z?.graphContainer,style:D?.graphContainer,id:P,ref:$,"aria-label":J,backgroundColor:y,theme:v,language:X,minHeight:Y,width:E,height:V,relativeHeight:I,padding:b,children:[n||l||h||R?o.jsxRuntimeExports.jsx(jt.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:z?.title,description:z?.description},graphTitle:n,graphDescription:l,width:E,graphDownload:h?$:void 0,dataDownload:R?m.map(i=>i.data).filter(i=>i!==void 0).length>0?m.map(i=>i.data).filter(i=>i!==void 0):m.filter(i=>i!==void 0):null}):null,g&&m.length>0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:o.mo("leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap",z?.colorLegend),style:{maxWidth:Q},"aria-label":"Color legend",children:k.map((i,C)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center pb-3",children:[o.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:(A||k.map(w=>w.label)).indexOf(i.label)!==-1?(a||W.Colors[v].categoricalColors.colors)[(A||k.map(w=>w.label)).indexOf(i.label)%(a||W.Colors[v].categoricalColors.colors).length]:W.Colors.gray}}),o.jsxRuntimeExports.jsxs(ot._,{marginBottom:"none",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:[i.label,":"," ",o.jsxRuntimeExports.jsx("span",{className:"font-bold",style:{fontSize:"inherit"},children:ct.numberFormattingFunction(i.size,"NA",et,s,r)})]})]},C))}),o.jsxRuntimeExports.jsx(xt.n,{size:"lg"})]}):null,o.jsxRuntimeExports.jsxs(it.GraphArea,{ref:N,children:[m.length===0&&o.jsxRuntimeExports.jsx(bt.EmptyState,{}),O&&m.length>0?o.jsxRuntimeExports.jsx(Rt,{mainText:t,data:k,colors:a,radius:S||O,subNote:f,strokeWidth:e,tooltip:q,colorDomain:A||k.map(i=>i.label),onSeriesMouseOver:x,onSeriesMouseClick:G,resetSelectionOnDoubleClick:K,styles:D,detailsOnClick:U,precision:et,animate:T===!0?{duration:.5,once:!0,amount:.5}:T||{duration:0,once:!0,amount:0},trackColor:Z}):null]}),p||d?o.jsxRuntimeExports.jsx(yt.GraphFooter,{styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:z?.footnote,source:z?.source},sources:p,footNote:d,width:E}):null]})}exports.DonutChart=Nt;
2
2
  //# sourceMappingURL=DonutChart.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { c as dt, j as a, m as pt } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import { useRef as rt, useState as tt, isValidElement as lt, useEffect as ft } from "react";
3
- import { E as gt, _ as it } from "./Typography-iR8PEgdt.js";
3
+ import { E as gt, _ as it } from "./Typography-CdMGooqp.js";
4
4
  import { o as ht } from "./index-BZQYSqar.js";
5
- import { n as xt } from "./Source-_STIejqs.js";
5
+ import { n as xt } from "./Source-Cu9OHOBj.js";
6
6
  import { i as yt } from "./index-Bwrro8-q.js";
7
7
  import { T as vt } from "./Tooltip-BRnAz2Gv.js";
8
8
  import { Colors as X } from "./Colors.js";
@@ -14,7 +14,7 @@ import { u as Mt } from "./use-in-view-Dl5L8LtP.js";
14
14
  import { A as Nt } from "./index-CtMBjvtq.js";
15
15
  import { GraphFooter as Ct } from "./GraphFooter.js";
16
16
  import { GraphHeader as Dt } from "./GraphHeader.js";
17
- import { E as kt } from "./EmptyState-Pj-emXt5.js";
17
+ import { E as kt } from "./EmptyState-dScPFkLy.js";
18
18
  import { G as wt, a as At } from "./GraphContainer-CF6ws3pd.js";
19
19
  const Ot = Math.PI, at = 2 * Ot;
20
20
  function St(c, t) {