@undp/data-viz 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) 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.js +2 -2
  19. package/dist/ColorLegend.cjs +1 -1
  20. package/dist/ColorLegend.js +1 -1
  21. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  22. package/dist/ColorLegendWithMouseOver.js +1 -1
  23. package/dist/DataCards.cjs +1 -1
  24. package/dist/DataCards.js +2 -2
  25. package/dist/DataTable.cjs +1 -1
  26. package/dist/DataTable.js +1 -1
  27. package/dist/DifferenceLineChart.cjs +1 -1
  28. package/dist/DifferenceLineChart.js +1 -1
  29. package/dist/DonutChart.cjs +1 -1
  30. package/dist/DonutChart.js +3 -3
  31. package/dist/DotDensityMap.cjs +1 -1
  32. package/dist/DotDensityMap.js +1 -1
  33. package/dist/DualAxisLineChart.cjs +1 -1
  34. package/dist/DualAxisLineChart.js +1 -1
  35. package/dist/DumbbellChart.cjs +1 -1
  36. package/dist/DumbbellChart.js +1 -1
  37. package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
  38. package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
  39. package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
  40. package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
  41. package/dist/FootNote.cjs +1 -1
  42. package/dist/FootNote.js +1 -1
  43. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  44. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  45. package/dist/GraphDescription.cjs +1 -1
  46. package/dist/GraphDescription.js +1 -1
  47. package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-B-XEJeRt.cjs} +2 -2
  48. package/dist/{GraphEl-CWjTuiYd.cjs.map → GraphEl-B-XEJeRt.cjs.map} +1 -1
  49. package/dist/{GraphEl-DDXkYObU.js → GraphEl-C2xExzzY.js} +3 -3
  50. package/dist/{GraphEl-DDXkYObU.js.map → GraphEl-C2xExzzY.js.map} +1 -1
  51. package/dist/GraphFooter.cjs +1 -1
  52. package/dist/GraphFooter.js +1 -1
  53. package/dist/GraphTitle.cjs +1 -1
  54. package/dist/GraphTitle.js +1 -1
  55. package/dist/GriddedGraphs.cjs +1 -1
  56. package/dist/GriddedGraphs.js +1 -1
  57. package/dist/HeatMap.cjs +1 -1
  58. package/dist/HeatMap.js +1 -1
  59. package/dist/Histogram.cjs +1 -1
  60. package/dist/Histogram.js +1 -1
  61. package/dist/HybridMap.cjs +1 -1
  62. package/dist/HybridMap.js +2 -2
  63. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  64. package/dist/LineChartWithConfidenceInterval.js +1 -1
  65. package/dist/LinearColorLegend.cjs +1 -1
  66. package/dist/LinearColorLegend.js +1 -1
  67. package/dist/MultiLineAltChart.cjs +1 -1
  68. package/dist/MultiLineAltChart.js +1 -1
  69. package/dist/MultiLineChart.cjs +1 -1
  70. package/dist/MultiLineChart.js +1 -1
  71. package/dist/ParetoChart.cjs +1 -1
  72. package/dist/ParetoChart.js +1 -1
  73. package/dist/RadarChart.cjs +1 -1
  74. package/dist/RadarChart.js +1 -1
  75. package/dist/SankeyChart.cjs +1 -1
  76. package/dist/SankeyChart.js +2 -2
  77. package/dist/ScatterPlot.cjs +1 -1
  78. package/dist/ScatterPlot.js +1 -1
  79. package/dist/SimpleLineChart.cjs +1 -1
  80. package/dist/SimpleLineChart.js +1 -1
  81. package/dist/SingleGraphDashboard.cjs +1 -1
  82. package/dist/SingleGraphDashboard.js +1 -1
  83. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  84. package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
  85. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  86. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  87. package/dist/SlopeChart.cjs +1 -1
  88. package/dist/SlopeChart.js +1 -1
  89. package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
  90. package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
  91. package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
  92. package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
  93. package/dist/Source.cjs +1 -1
  94. package/dist/Source.js +2 -2
  95. package/dist/StatCardFromData.cjs +1 -1
  96. package/dist/StatCardFromData.js +1 -1
  97. package/dist/StripChart.cjs +1 -1
  98. package/dist/StripChart.js +1 -1
  99. package/dist/ThreeDGlobe.cjs +1 -1
  100. package/dist/ThreeDGlobe.js +1 -1
  101. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  102. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  103. package/dist/TreeMapGraph.cjs +1 -1
  104. package/dist/TreeMapGraph.js +2 -2
  105. package/dist/Typography-Cc_iHQB-.cjs +2 -0
  106. package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
  107. package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
  108. package/dist/Typography-CdMGooqp.js.map +1 -0
  109. package/dist/UnitChart.cjs +1 -1
  110. package/dist/UnitChart.js +1 -1
  111. package/dist/WaterfallChart.cjs +1 -1
  112. package/dist/WaterfallChart.js +1 -1
  113. package/dist/{index-BE-lvE4c.js → index-CH8RndC2.js} +3 -3
  114. package/dist/{index-BE-lvE4c.js.map → index-CH8RndC2.js.map} +1 -1
  115. package/dist/{index-DlrGwLQA.cjs → index-DNmkwfX8.cjs} +2 -2
  116. package/dist/{index-DlrGwLQA.cjs.map → index-DNmkwfX8.cjs.map} +1 -1
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.js +2 -2
  119. package/dist/style.css +1 -1
  120. package/package.json +2 -3
  121. package/dist/Typography-DrJ7IOdw.cjs +0 -2
  122. package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
  123. package/dist/Typography-iR8PEgdt.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),l=require("react"),ht=require("./parse-xYI9yrvL.cjs"),ft=require("./getSliderMarks-CIuSoedo.cjs"),Et=require("./Spinner-jTMOLuw_.cjs"),wt=require("./index-DQA8q5sC.cjs"),q=require("./index-DLFt97gy.cjs"),Ct=require("./Typography-DrJ7IOdw.cjs"),Dt=require("./index-C5K--w8d.cjs"),Rt=require("./Tooltip-BLa2EfMs.cjs"),j=require("./Colors.cjs"),pt=require("./index-sbKVyHS2.cjs"),St=require("./DetailsModal-DHttOA80.cjs"),kt=require("./pow-BnyPO-NX.cjs"),mt=require("./select-Bnfk0lJx.cjs"),Je=require("./proxy-C4-uo6nS.cjs"),Nt=require("./use-in-view-C3o_ntMv.cjs"),Ot=require("./index-CoobIWNj.cjs"),Mt=require("./GraphFooter.cjs"),qt=require("./GraphHeader.cjs"),Pt=require("./fetchAndParseData-QTF6tjij.cjs"),$t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),It=require("./uniqBy-O05lp2S5.cjs"),gt=require("./GraphContainer-B1EDxJ0S.cjs");function zt(a){const{data:e,colors:r,mapData:X,colorLegendTitle:P,colorDomain:f,radius:D,height:x,width:m,scale:p,centerPoint:$,tooltip:Y,showLabels:de,mapBorderWidth:qe,mapBorderColor:Pe,mapNoDataColor:me,onSeriesMouseOver:K,showColorScale:$e,zoomScaleExtend:Ie,zoomTranslateExtend:ze,highlightedDataPoints:pe,onSeriesMouseClick:Z,resetSelectionOnDoubleClick:xe,detailsOnClick:y,styles:J,classNames:_,mapProjection:L,zoomInteraction:E,animate:b,dimmedOpacity:Q,customLayers:V,maxRadiusValue:he,collapseColorScaleByDefault:fe,projectionRotate:I,rewindCoordinatesInMapData:ge}=a,ee=l.useMemo(()=>ge?q.index_default(X,{reverse:!0}):X,[X,ge]),[ye,ve]=l.useState(void 0),[be,je]=l.useState(fe===void 0?!(m<680):!fe),B=l.useRef(null),[c,u]=l.useState(void 0),[Ee,te]=l.useState(void 0),[we,oe]=l.useState(void 0),[A,z]=l.useState(void 0),w=l.useRef(null),F=Nt.useInView(w,{once:b.once,amount:b.amount}),T=l.useRef(null),R=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?kt.sqrt().domain([0,he]).range([.25,D]).nice():void 0;l.useEffect(()=>{const t=mt.select(T.current),h=mt.select(w.current),n=g=>{if(E==="noZoom")return!1;if(E==="button")return!g.type.includes("wheel");const re=g.type==="wheel",ae=g.type.startsWith("touch"),Ne=g.type==="mousedown"||g.type==="mousemove";return ae?!0:re?E==="scroll"?!0:g.ctrlKey:Ne&&!g.button&&!g.ctrlKey},H=q.zoom().scaleExtent(Ie).translateExtent(ze||[[-20,-20],[m+20,x+20]]).filter(n).on("zoom",({transform:g})=>{t.attr("transform",g)});h.call(H),B.current=H},[x,m,E]);const v=q.index_default$1(ee),C=Dt.index_default(ee),Ce=(v[2]-v[0])*1.15,De=(v[3]-v[1])*1.15,Re=m*190/960*360/Ce,Se=x*190/678*180/De,S=p*Math.min(Re,Se),W=L==="mercator"?q.geoMercator().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="equalEarth"?q.geoEqualEarth().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="naturalEarth"?q.geoNaturalEarth1().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="orthographic"?q.geoOrthographic().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):q.geoAlbersUsa().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S),ke=q.geoPath().projection(W),G=t=>{if(!w.current||!B.current)return;mt.select(w.current).call(B.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Je.motion.svg,{width:`${m}px`,height:`${x}px`,viewBox:`0 0 ${m} ${x}`,ref:w,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:T,children:[V.filter(t=>t.position==="before").map(t=>t.layer),ee.features.map((t,h)=>{const n=ke(t);return n?o.jsxRuntimeExports.jsx("path",{d:n,style:{stroke:Pe,strokeWidth:qe,fill:me}},h):null}),o.jsxRuntimeExports.jsx(Ot.AnimatePresence,{children:e.map(t=>{const h=e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray;return o.jsxRuntimeExports.jsxs(Je.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:ye?ye===h?1:Q:pe.length!==0?pe.indexOf(t.label||"")!==-1?1:Q:1,transition:{duration:b.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:n=>{te(t),z(n.clientY),oe(n.clientX),K?.(t)},onMouseMove:n=>{te(t),z(n.clientY),oe(n.clientX)},onMouseLeave:()=>{te(void 0),oe(void 0),z(void 0),K?.(void 0)},onClick:()=>{(Z||y)&&(wt.isEqual(c,t)&&xe?(u(void 0),Z?.(void 0)):(u(t),Z?.(t)))},transform:`translate(${W([t.long,t.lat])[0]},${W([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Je.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray},whileInView:{r:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,transition:{duration:b.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{r:0,transition:{duration:b.duration}},style:{fillOpacity:.8}}),de&&t.label?o.jsxRuntimeExports.jsx(Je.motion.text,{variants:{initial:{opacity:0,x:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray},whileInView:{opacity:1,x:R?R(t.radius||0):D,transition:{duration:b.duration},fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},y:0,className:o.mo("graph-value text-sm",_?.graphObjectValues),style:{textAnchor:"start",...J?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),V.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:be?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.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:()=>{je(!1)},children:o.jsxRuntimeExports.jsx(pt.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{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:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((t,h)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{ve(r[h%r.length])},onMouseLeave:()=>{ve(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[h%r.length]}}),o.jsxRuntimeExports.jsx(Ct._,{size:"sm",marginBottom:"none",leading:"none",children:t})]},h))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{je(!0)},children:o.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"})})}),E==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>G("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:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>G("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:"–"})]})]}),y&&c!==void 0?o.jsxRuntimeExports.jsx(St.DetailsModal,{body:y,data:c,setData:u,className:_?.modal}):null,Ee&&Y&&we&&A?o.jsxRuntimeExports.jsx(Rt.Tooltip,{data:Ee,body:Y,xPos:we,yPos:A,backgroundStyle:J?.tooltip,className:_?.tooltip}):null]})}function _t(a){const e=o.compilerRuntimeExports.c(121),{data:r,mapData:X,graphTitle:P,colors:f,sources:D,graphDescription:x,height:m,width:p,footNote:$,colorLegendTitle:Y,colorDomain:de,radius:qe,scale:Pe,centerPoint:me,padding:K,mapBorderWidth:$e,mapNoDataColor:Ie,backgroundColor:ze,showLabels:pe,mapBorderColor:Z,tooltip:xe,relativeHeight:y,onSeriesMouseOver:J,isWorldMap:_,showColorScale:L,zoomScaleExtend:E,zoomTranslateExtend:b,graphID:Q,highlightedDataPoints:V,onSeriesMouseClick:he,graphDownload:fe,dataDownload:I,showAntarctica:ge,language:ee,minHeight:ye,theme:ve,ariaLabel:be,resetSelectionOnDoubleClick:je,detailsOnClick:B,styles:c,classNames:u,mapProjection:Ee,zoomInteraction:te,animate:we,dimmedOpacity:oe,customLayers:A,maxRadiusValue:z,timeline:w,collapseColorScaleByDefault:F,projectionRotate:T,rewindCoordinatesInMapData:R}=a,v=X===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":X,C=$===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.":$,Ce=qe===void 0?5:qe,De=Pe===void 0?.95:Pe,Re=$e===void 0?.5:$e,Se=Ie===void 0?j.Colors.light.graphNoData:Ie,S=ze===void 0?!1:ze,W=pe===void 0?!1:pe,ke=Z===void 0?j.Colors.light.grays["gray-500"]:Z,G=_===void 0?!0:_,t=L===void 0?!0:L;let h;e[0]!==E?(h=E===void 0?[.8,6]:E,e[0]=E,e[1]=h):h=e[1];const n=h;let H;e[2]!==V?(H=V===void 0?[]:V,e[2]=V,e[3]=H):H=e[3];const g=H,re=fe===void 0?!1:fe,ae=I===void 0?!1:I,Ne=ge===void 0?!1:ge,Qe=ee===void 0?"en":ee,k=ye===void 0?0:ye,ne=ve===void 0?"light":ve,et=je===void 0?!0:je,tt=Ee===void 0?"naturalEarth":Ee,ot=te===void 0?"button":te,_e=we===void 0?!1:we,rt=oe===void 0?.3:oe;let Le;e[4]!==A?(Le=A===void 0?[]:A,e[4]=A,e[5]=Le):Le=e[5];const at=Le;let Ve;e[6]!==w?(Ve=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,e[6]=w,e[7]=Ve):Ve=e[7];const i=Ve;let Be;e[8]!==T?(Be=T===void 0?[0,0]:T,e[8]=T,e[9]=Be):Be=e[9];const nt=Be,it=R===void 0?!0:R,[U,yt]=l.useState(0),[Oe,vt]=l.useState(0),[N,bt]=l.useState(i.autoplay);let Me;if(e[10]!==r||e[11]!==i.dateFormat){let d;e[13]!==i.dateFormat?(d=M=>ht.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[13]=i.dateFormat,e[14]=d):d=e[14],Me=[...new Set(r.filter(Yt).map(d))],Me.sort(Xt),e[10]=r,e[11]=i.dateFormat,e[12]=Me}else Me=e[12];const s=Me,[O,st]=l.useState(i.autoplay?0:s.length-1),[ie,jt]=l.useState(void 0),lt=l.useRef(null),xt=l.useRef(null);let Ae,Fe;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{const d=new ResizeObserver(M=>{yt(M[0].target.clientWidth||620),vt(M[0].target.clientHeight||480)});return lt.current&&d.observe(lt.current),()=>d.disconnect()},Fe=[],e[15]=Ae,e[16]=Fe):(Ae=e[15],Fe=e[16]),l.useEffect(Ae,Fe);let Te;e[17]===Symbol.for("react.memo_cache_sentinel")?(Te=d=>{jt(d)},e[17]=Te):Te=e[17];const We=l.useEffectEvent(Te);let Ge;e[18]!==v||e[19]!==We?(Ge=()=>{typeof v=="string"?Pt.fetchAndParseJSON(v).then(M=>{We(M)}):We(v)},e[18]=v,e[19]=We,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],l.useEffect(Ge,He);let Ue,Xe;e[23]!==N||e[24]!==i.speed||e[25]!==s?(Ue=()=>{const d=setInterval(()=>{st(M=>M<s.length-1?M+1:0)},(i.speed||2)*1e3);return N||clearInterval(d),()=>clearInterval(d)},Xe=[s,N,i.speed],e[23]=N,e[24]=i.speed,e[25]=s,e[26]=Ue,e[27]=Xe):(Ue=e[26],Xe=e[27]),l.useEffect(Ue,Xe);const ct=i.dateFormat||"yyyy";let Ye;e[28]!==O||e[29]!==ct||e[30]!==i.showOnlyActiveDate||e[31]!==s?(Ye=ft.getSliderMarks(s,O,i.showOnlyActiveDate,ct),e[28]=O,e[29]=ct,e[30]=i.showOnlyActiveDate,e[31]=s,e[32]=Ye):Ye=e[32];const Ke=Ye,ut=u?.graphContainer,dt=c?.graphContainer;let se;e[33]!==u?.description||e[34]!==u?.title||e[35]!==r||e[36]!==ae||e[37]!==x||e[38]!==re||e[39]!==P||e[40]!==c?.description||e[41]!==c?.title||e[42]!==p?(se=P||x||re||ae?o.jsxRuntimeExports.jsx(qt.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:u?.title,description:u?.description},graphTitle:P,graphDescription:x,width:p,graphDownload:re?xt:void 0,dataDownload:ae?r.map(Ut).filter(Ht).length>0?r.map(Gt).filter(Wt):r.filter(Tt):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=r,e[36]=ae,e[37]=x,e[38]=re,e[39]=P,e[40]=c?.description,e[41]=c?.title,e[42]=p,e[43]=se):se=e[43];let le;e[44]!==O||e[45]!==Ke||e[46]!==N||e[47]!==i.enabled||e[48]!==s?(le=i.enabled&&s.length>0&&Ke?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{bt(!N)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":N?"Click to pause animation":"Click to play animation",children:N?o.jsxRuntimeExports.jsx(pt.Pause,{}):o.jsxRuntimeExports.jsx(pt.Play,{})}),o.jsxRuntimeExports.jsx(ft.Nr,{min:s[0],max:s[s.length-1],marks:Ke,step:null,defaultValue:s[s.length-1],value:s[O],onChangeComplete:d=>{st(s.indexOf(d))},onChange:d=>{st(s.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=O,e[45]=Ke,e[46]=N,e[47]=i.enabled,e[48]=s,e[49]=le):le=e[49];let ce;e[50]!==_e||e[51]!==me||e[52]!==u||e[53]!==F||e[54]!==de||e[55]!==Y||e[56]!==f||e[57]!==at||e[58]!==r||e[59]!==B||e[60]!==rt||e[61]!==m||e[62]!==g||e[63]!==O||e[64]!==G||e[65]!==ke||e[66]!==Re||e[67]!==Se||e[68]!==tt||e[69]!==ie||e[70]!==z||e[71]!==k||e[72]!==he||e[73]!==J||e[74]!==nt||e[75]!==Ce||e[76]!==y||e[77]!==et||e[78]!==it||e[79]!==De||e[80]!==Ne||e[81]!==t||e[82]!==W||e[83]!==c||e[84]!==Oe||e[85]!==U||e[86]!==ne||e[87]!==i.dateFormat||e[88]!==i.enabled||e[89]!==xe||e[90]!==s||e[91]!==p||e[92]!==ot||e[93]!==n||e[94]!==b?(ce=o.jsxRuntimeExports.jsx(gt.GraphArea,{ref:lt,children:U&&Oe&&ie?o.jsxRuntimeExports.jsx(zt,{data:r.filter(d=>i.enabled?d.date===ht.format(new Date(s[O]),i.dateFormat||"yyyy"):d),mapData:Ne?ie:{...ie,features:ie.features.filter(Ft)},colorDomain:r.filter(At).length===0?[]:de||It.uniqBy(r,"color",!0),width:U,height:Oe,scale:De,centerPoint:me,colors:r.filter(Bt).length===0?f?[f]:[j.Colors.primaryColors["blue-600"]]:f||j.Colors[ne].categoricalColors.colors,colorLegendTitle:Y,radius:Ce,mapBorderWidth:Re,mapNoDataColor:Se,mapBorderColor:ke,tooltip:xe,onSeriesMouseOver:J,showLabels:W,isWorldMap:G,showColorScale:t,zoomScaleExtend:n,zoomTranslateExtend:b,onSeriesMouseClick:he,highlightedDataPoints:g,resetSelectionOnDoubleClick:et,styles:c,classNames:u,zoomInteraction:ot,detailsOnClick:B,mapProjection:tt||(G?"naturalEarth":"mercator"),animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:rt,customLayers:at,maxRadiusValue:$t.checkIfNullOrUndefined(z)?Math.max(...r.map(Vt).filter(Lt)):z,collapseColorScaleByDefault:F,projectionRotate:nt,rewindCoordinatesInMapData:it}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(k,m||(y?k?(p||U)*y>k?(p||U)*y:k:(p||U)*y:Oe))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Et.w,{"aria-label":"Loading graph"})})}),e[50]=_e,e[51]=me,e[52]=u,e[53]=F,e[54]=de,e[55]=Y,e[56]=f,e[57]=at,e[58]=r,e[59]=B,e[60]=rt,e[61]=m,e[62]=g,e[63]=O,e[64]=G,e[65]=ke,e[66]=Re,e[67]=Se,e[68]=tt,e[69]=ie,e[70]=z,e[71]=k,e[72]=he,e[73]=J,e[74]=nt,e[75]=Ce,e[76]=y,e[77]=et,e[78]=it,e[79]=De,e[80]=Ne,e[81]=t,e[82]=W,e[83]=c,e[84]=Oe,e[85]=U,e[86]=ne,e[87]=i.dateFormat,e[88]=i.enabled,e[89]=xe,e[90]=s,e[91]=p,e[92]=ot,e[93]=n,e[94]=b,e[95]=ce):ce=e[95];let ue;e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==C||e[99]!==D||e[100]!==c?.footnote||e[101]!==c?.source||e[102]!==p?(ue=D||C?o.jsxRuntimeExports.jsx(Mt.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:D,footNote:C,width:p}):null,e[96]=u?.footnote,e[97]=u?.source,e[98]=C,e[99]=D,e[100]=c?.footnote,e[101]=c?.source,e[102]=p,e[103]=ue):ue=e[103];let Ze;return e[104]!==be||e[105]!==S||e[106]!==Q||e[107]!==m||e[108]!==Qe||e[109]!==k||e[110]!==K||e[111]!==y||e[112]!==ut||e[113]!==dt||e[114]!==se||e[115]!==le||e[116]!==ce||e[117]!==ue||e[118]!==ne||e[119]!==p?(Ze=o.jsxRuntimeExports.jsxs(gt.GraphContainer,{className:ut,style:dt,id:Q,ref:xt,"aria-label":be,backgroundColor:S,theme:ne,language:Qe,minHeight:k,width:p,height:m,relativeHeight:y,padding:K,children:[se,le,ce,ue]}),e[104]=be,e[105]=S,e[106]=Q,e[107]=m,e[108]=Qe,e[109]=k,e[110]=K,e[111]=y,e[112]=ut,e[113]=dt,e[114]=se,e[115]=le,e[116]=ce,e[117]=ue,e[118]=ne,e[119]=p,e[120]=Ze):Ze=e[120],Ze}function Lt(a){return a!=null}function Vt(a){return a.radius}function Bt(a){return a.color}function At(a){return a.color}function Ft(a){return a.properties.NAME!=="Antarctica"}function Tt(a){return a!==void 0}function Wt(a){return a!==void 0}function Gt(a){return a.data}function Ht(a){return a!==void 0}function Ut(a){return a.data}function Xt(a,e){return a-e}function Yt(a){return a.date}exports.DotDensityMap=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),l=require("react"),ht=require("./parse-xYI9yrvL.cjs"),ft=require("./getSliderMarks-CIuSoedo.cjs"),Et=require("./Spinner-jTMOLuw_.cjs"),wt=require("./index-DQA8q5sC.cjs"),q=require("./index-DLFt97gy.cjs"),Ct=require("./Typography-Cc_iHQB-.cjs"),Dt=require("./index-C5K--w8d.cjs"),Rt=require("./Tooltip-BLa2EfMs.cjs"),j=require("./Colors.cjs"),pt=require("./index-sbKVyHS2.cjs"),St=require("./DetailsModal-DHttOA80.cjs"),kt=require("./pow-BnyPO-NX.cjs"),mt=require("./select-Bnfk0lJx.cjs"),Je=require("./proxy-C4-uo6nS.cjs"),Nt=require("./use-in-view-C3o_ntMv.cjs"),Ot=require("./index-CoobIWNj.cjs"),Mt=require("./GraphFooter.cjs"),qt=require("./GraphHeader.cjs"),Pt=require("./fetchAndParseData-QTF6tjij.cjs"),$t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),It=require("./uniqBy-O05lp2S5.cjs"),gt=require("./GraphContainer-B1EDxJ0S.cjs");function zt(a){const{data:e,colors:r,mapData:X,colorLegendTitle:P,colorDomain:f,radius:D,height:x,width:m,scale:p,centerPoint:$,tooltip:Y,showLabels:de,mapBorderWidth:qe,mapBorderColor:Pe,mapNoDataColor:me,onSeriesMouseOver:K,showColorScale:$e,zoomScaleExtend:Ie,zoomTranslateExtend:ze,highlightedDataPoints:pe,onSeriesMouseClick:Z,resetSelectionOnDoubleClick:xe,detailsOnClick:y,styles:J,classNames:_,mapProjection:L,zoomInteraction:E,animate:b,dimmedOpacity:Q,customLayers:V,maxRadiusValue:he,collapseColorScaleByDefault:fe,projectionRotate:I,rewindCoordinatesInMapData:ge}=a,ee=l.useMemo(()=>ge?q.index_default(X,{reverse:!0}):X,[X,ge]),[ye,ve]=l.useState(void 0),[be,je]=l.useState(fe===void 0?!(m<680):!fe),B=l.useRef(null),[c,u]=l.useState(void 0),[Ee,te]=l.useState(void 0),[we,oe]=l.useState(void 0),[A,z]=l.useState(void 0),w=l.useRef(null),F=Nt.useInView(w,{once:b.once,amount:b.amount}),T=l.useRef(null),R=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?kt.sqrt().domain([0,he]).range([.25,D]).nice():void 0;l.useEffect(()=>{const t=mt.select(T.current),h=mt.select(w.current),n=g=>{if(E==="noZoom")return!1;if(E==="button")return!g.type.includes("wheel");const re=g.type==="wheel",ae=g.type.startsWith("touch"),Ne=g.type==="mousedown"||g.type==="mousemove";return ae?!0:re?E==="scroll"?!0:g.ctrlKey:Ne&&!g.button&&!g.ctrlKey},H=q.zoom().scaleExtent(Ie).translateExtent(ze||[[-20,-20],[m+20,x+20]]).filter(n).on("zoom",({transform:g})=>{t.attr("transform",g)});h.call(H),B.current=H},[x,m,E]);const v=q.index_default$1(ee),C=Dt.index_default(ee),Ce=(v[2]-v[0])*1.15,De=(v[3]-v[1])*1.15,Re=m*190/960*360/Ce,Se=x*190/678*180/De,S=p*Math.min(Re,Se),W=L==="mercator"?q.geoMercator().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="equalEarth"?q.geoEqualEarth().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="naturalEarth"?q.geoNaturalEarth1().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):L==="orthographic"?q.geoOrthographic().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):q.geoAlbersUsa().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S),ke=q.geoPath().projection(W),G=t=>{if(!w.current||!B.current)return;mt.select(w.current).call(B.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Je.motion.svg,{width:`${m}px`,height:`${x}px`,viewBox:`0 0 ${m} ${x}`,ref:w,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:T,children:[V.filter(t=>t.position==="before").map(t=>t.layer),ee.features.map((t,h)=>{const n=ke(t);return n?o.jsxRuntimeExports.jsx("path",{d:n,style:{stroke:Pe,strokeWidth:qe,fill:me}},h):null}),o.jsxRuntimeExports.jsx(Ot.AnimatePresence,{children:e.map(t=>{const h=e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray;return o.jsxRuntimeExports.jsxs(Je.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:ye?ye===h?1:Q:pe.length!==0?pe.indexOf(t.label||"")!==-1?1:Q:1,transition:{duration:b.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:n=>{te(t),z(n.clientY),oe(n.clientX),K?.(t)},onMouseMove:n=>{te(t),z(n.clientY),oe(n.clientX)},onMouseLeave:()=>{te(void 0),oe(void 0),z(void 0),K?.(void 0)},onClick:()=>{(Z||y)&&(wt.isEqual(c,t)&&xe?(u(void 0),Z?.(void 0)):(u(t),Z?.(t)))},transform:`translate(${W([t.long,t.lat])[0]},${W([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Je.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray},whileInView:{r:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray,transition:{duration:b.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{r:0,transition:{duration:b.duration}},style:{fillOpacity:.8}}),de&&t.label?o.jsxRuntimeExports.jsx(Je.motion.text,{variants:{initial:{opacity:0,x:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray},whileInView:{opacity:1,x:R?R(t.radius||0):D,transition:{duration:b.duration},fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:j.Colors.gray}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},y:0,className:o.mo("graph-value text-sm",_?.graphObjectValues),style:{textAnchor:"start",...J?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),V.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:be?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.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:()=>{je(!1)},children:o.jsxRuntimeExports.jsx(pt.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{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:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((t,h)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{ve(r[h%r.length])},onMouseLeave:()=>{ve(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[h%r.length]}}),o.jsxRuntimeExports.jsx(Ct._,{size:"sm",marginBottom:"none",leading:"none",children:t})]},h))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{je(!0)},children:o.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"})})}),E==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>G("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:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>G("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:"–"})]})]}),y&&c!==void 0?o.jsxRuntimeExports.jsx(St.DetailsModal,{body:y,data:c,setData:u,className:_?.modal}):null,Ee&&Y&&we&&A?o.jsxRuntimeExports.jsx(Rt.Tooltip,{data:Ee,body:Y,xPos:we,yPos:A,backgroundStyle:J?.tooltip,className:_?.tooltip}):null]})}function _t(a){const e=o.compilerRuntimeExports.c(121),{data:r,mapData:X,graphTitle:P,colors:f,sources:D,graphDescription:x,height:m,width:p,footNote:$,colorLegendTitle:Y,colorDomain:de,radius:qe,scale:Pe,centerPoint:me,padding:K,mapBorderWidth:$e,mapNoDataColor:Ie,backgroundColor:ze,showLabels:pe,mapBorderColor:Z,tooltip:xe,relativeHeight:y,onSeriesMouseOver:J,isWorldMap:_,showColorScale:L,zoomScaleExtend:E,zoomTranslateExtend:b,graphID:Q,highlightedDataPoints:V,onSeriesMouseClick:he,graphDownload:fe,dataDownload:I,showAntarctica:ge,language:ee,minHeight:ye,theme:ve,ariaLabel:be,resetSelectionOnDoubleClick:je,detailsOnClick:B,styles:c,classNames:u,mapProjection:Ee,zoomInteraction:te,animate:we,dimmedOpacity:oe,customLayers:A,maxRadiusValue:z,timeline:w,collapseColorScaleByDefault:F,projectionRotate:T,rewindCoordinatesInMapData:R}=a,v=X===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":X,C=$===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.":$,Ce=qe===void 0?5:qe,De=Pe===void 0?.95:Pe,Re=$e===void 0?.5:$e,Se=Ie===void 0?j.Colors.light.graphNoData:Ie,S=ze===void 0?!1:ze,W=pe===void 0?!1:pe,ke=Z===void 0?j.Colors.light.grays["gray-500"]:Z,G=_===void 0?!0:_,t=L===void 0?!0:L;let h;e[0]!==E?(h=E===void 0?[.8,6]:E,e[0]=E,e[1]=h):h=e[1];const n=h;let H;e[2]!==V?(H=V===void 0?[]:V,e[2]=V,e[3]=H):H=e[3];const g=H,re=fe===void 0?!1:fe,ae=I===void 0?!1:I,Ne=ge===void 0?!1:ge,Qe=ee===void 0?"en":ee,k=ye===void 0?0:ye,ne=ve===void 0?"light":ve,et=je===void 0?!0:je,tt=Ee===void 0?"naturalEarth":Ee,ot=te===void 0?"button":te,_e=we===void 0?!1:we,rt=oe===void 0?.3:oe;let Le;e[4]!==A?(Le=A===void 0?[]:A,e[4]=A,e[5]=Le):Le=e[5];const at=Le;let Ve;e[6]!==w?(Ve=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,e[6]=w,e[7]=Ve):Ve=e[7];const i=Ve;let Be;e[8]!==T?(Be=T===void 0?[0,0]:T,e[8]=T,e[9]=Be):Be=e[9];const nt=Be,it=R===void 0?!0:R,[U,yt]=l.useState(0),[Oe,vt]=l.useState(0),[N,bt]=l.useState(i.autoplay);let Me;if(e[10]!==r||e[11]!==i.dateFormat){let d;e[13]!==i.dateFormat?(d=M=>ht.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[13]=i.dateFormat,e[14]=d):d=e[14],Me=[...new Set(r.filter(Yt).map(d))],Me.sort(Xt),e[10]=r,e[11]=i.dateFormat,e[12]=Me}else Me=e[12];const s=Me,[O,st]=l.useState(i.autoplay?0:s.length-1),[ie,jt]=l.useState(void 0),lt=l.useRef(null),xt=l.useRef(null);let Ae,Fe;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{const d=new ResizeObserver(M=>{yt(M[0].target.clientWidth||620),vt(M[0].target.clientHeight||480)});return lt.current&&d.observe(lt.current),()=>d.disconnect()},Fe=[],e[15]=Ae,e[16]=Fe):(Ae=e[15],Fe=e[16]),l.useEffect(Ae,Fe);let Te;e[17]===Symbol.for("react.memo_cache_sentinel")?(Te=d=>{jt(d)},e[17]=Te):Te=e[17];const We=l.useEffectEvent(Te);let Ge;e[18]!==v||e[19]!==We?(Ge=()=>{typeof v=="string"?Pt.fetchAndParseJSON(v).then(M=>{We(M)}):We(v)},e[18]=v,e[19]=We,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],l.useEffect(Ge,He);let Ue,Xe;e[23]!==N||e[24]!==i.speed||e[25]!==s?(Ue=()=>{const d=setInterval(()=>{st(M=>M<s.length-1?M+1:0)},(i.speed||2)*1e3);return N||clearInterval(d),()=>clearInterval(d)},Xe=[s,N,i.speed],e[23]=N,e[24]=i.speed,e[25]=s,e[26]=Ue,e[27]=Xe):(Ue=e[26],Xe=e[27]),l.useEffect(Ue,Xe);const ct=i.dateFormat||"yyyy";let Ye;e[28]!==O||e[29]!==ct||e[30]!==i.showOnlyActiveDate||e[31]!==s?(Ye=ft.getSliderMarks(s,O,i.showOnlyActiveDate,ct),e[28]=O,e[29]=ct,e[30]=i.showOnlyActiveDate,e[31]=s,e[32]=Ye):Ye=e[32];const Ke=Ye,ut=u?.graphContainer,dt=c?.graphContainer;let se;e[33]!==u?.description||e[34]!==u?.title||e[35]!==r||e[36]!==ae||e[37]!==x||e[38]!==re||e[39]!==P||e[40]!==c?.description||e[41]!==c?.title||e[42]!==p?(se=P||x||re||ae?o.jsxRuntimeExports.jsx(qt.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:u?.title,description:u?.description},graphTitle:P,graphDescription:x,width:p,graphDownload:re?xt:void 0,dataDownload:ae?r.map(Ut).filter(Ht).length>0?r.map(Gt).filter(Wt):r.filter(Tt):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=r,e[36]=ae,e[37]=x,e[38]=re,e[39]=P,e[40]=c?.description,e[41]=c?.title,e[42]=p,e[43]=se):se=e[43];let le;e[44]!==O||e[45]!==Ke||e[46]!==N||e[47]!==i.enabled||e[48]!==s?(le=i.enabled&&s.length>0&&Ke?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{bt(!N)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":N?"Click to pause animation":"Click to play animation",children:N?o.jsxRuntimeExports.jsx(pt.Pause,{}):o.jsxRuntimeExports.jsx(pt.Play,{})}),o.jsxRuntimeExports.jsx(ft.Nr,{min:s[0],max:s[s.length-1],marks:Ke,step:null,defaultValue:s[s.length-1],value:s[O],onChangeComplete:d=>{st(s.indexOf(d))},onChange:d=>{st(s.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=O,e[45]=Ke,e[46]=N,e[47]=i.enabled,e[48]=s,e[49]=le):le=e[49];let ce;e[50]!==_e||e[51]!==me||e[52]!==u||e[53]!==F||e[54]!==de||e[55]!==Y||e[56]!==f||e[57]!==at||e[58]!==r||e[59]!==B||e[60]!==rt||e[61]!==m||e[62]!==g||e[63]!==O||e[64]!==G||e[65]!==ke||e[66]!==Re||e[67]!==Se||e[68]!==tt||e[69]!==ie||e[70]!==z||e[71]!==k||e[72]!==he||e[73]!==J||e[74]!==nt||e[75]!==Ce||e[76]!==y||e[77]!==et||e[78]!==it||e[79]!==De||e[80]!==Ne||e[81]!==t||e[82]!==W||e[83]!==c||e[84]!==Oe||e[85]!==U||e[86]!==ne||e[87]!==i.dateFormat||e[88]!==i.enabled||e[89]!==xe||e[90]!==s||e[91]!==p||e[92]!==ot||e[93]!==n||e[94]!==b?(ce=o.jsxRuntimeExports.jsx(gt.GraphArea,{ref:lt,children:U&&Oe&&ie?o.jsxRuntimeExports.jsx(zt,{data:r.filter(d=>i.enabled?d.date===ht.format(new Date(s[O]),i.dateFormat||"yyyy"):d),mapData:Ne?ie:{...ie,features:ie.features.filter(Ft)},colorDomain:r.filter(At).length===0?[]:de||It.uniqBy(r,"color",!0),width:U,height:Oe,scale:De,centerPoint:me,colors:r.filter(Bt).length===0?f?[f]:[j.Colors.primaryColors["blue-600"]]:f||j.Colors[ne].categoricalColors.colors,colorLegendTitle:Y,radius:Ce,mapBorderWidth:Re,mapNoDataColor:Se,mapBorderColor:ke,tooltip:xe,onSeriesMouseOver:J,showLabels:W,isWorldMap:G,showColorScale:t,zoomScaleExtend:n,zoomTranslateExtend:b,onSeriesMouseClick:he,highlightedDataPoints:g,resetSelectionOnDoubleClick:et,styles:c,classNames:u,zoomInteraction:ot,detailsOnClick:B,mapProjection:tt||(G?"naturalEarth":"mercator"),animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:rt,customLayers:at,maxRadiusValue:$t.checkIfNullOrUndefined(z)?Math.max(...r.map(Vt).filter(Lt)):z,collapseColorScaleByDefault:F,projectionRotate:nt,rewindCoordinatesInMapData:it}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(k,m||(y?k?(p||U)*y>k?(p||U)*y:k:(p||U)*y:Oe))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Et.w,{"aria-label":"Loading graph"})})}),e[50]=_e,e[51]=me,e[52]=u,e[53]=F,e[54]=de,e[55]=Y,e[56]=f,e[57]=at,e[58]=r,e[59]=B,e[60]=rt,e[61]=m,e[62]=g,e[63]=O,e[64]=G,e[65]=ke,e[66]=Re,e[67]=Se,e[68]=tt,e[69]=ie,e[70]=z,e[71]=k,e[72]=he,e[73]=J,e[74]=nt,e[75]=Ce,e[76]=y,e[77]=et,e[78]=it,e[79]=De,e[80]=Ne,e[81]=t,e[82]=W,e[83]=c,e[84]=Oe,e[85]=U,e[86]=ne,e[87]=i.dateFormat,e[88]=i.enabled,e[89]=xe,e[90]=s,e[91]=p,e[92]=ot,e[93]=n,e[94]=b,e[95]=ce):ce=e[95];let ue;e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==C||e[99]!==D||e[100]!==c?.footnote||e[101]!==c?.source||e[102]!==p?(ue=D||C?o.jsxRuntimeExports.jsx(Mt.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:D,footNote:C,width:p}):null,e[96]=u?.footnote,e[97]=u?.source,e[98]=C,e[99]=D,e[100]=c?.footnote,e[101]=c?.source,e[102]=p,e[103]=ue):ue=e[103];let Ze;return e[104]!==be||e[105]!==S||e[106]!==Q||e[107]!==m||e[108]!==Qe||e[109]!==k||e[110]!==K||e[111]!==y||e[112]!==ut||e[113]!==dt||e[114]!==se||e[115]!==le||e[116]!==ce||e[117]!==ue||e[118]!==ne||e[119]!==p?(Ze=o.jsxRuntimeExports.jsxs(gt.GraphContainer,{className:ut,style:dt,id:Q,ref:xt,"aria-label":be,backgroundColor:S,theme:ne,language:Qe,minHeight:k,width:p,height:m,relativeHeight:y,padding:K,children:[se,le,ce,ue]}),e[104]=be,e[105]=S,e[106]=Q,e[107]=m,e[108]=Qe,e[109]=k,e[110]=K,e[111]=y,e[112]=ut,e[113]=dt,e[114]=se,e[115]=le,e[116]=ce,e[117]=ue,e[118]=ne,e[119]=p,e[120]=Ze):Ze=e[120],Ze}function Lt(a){return a!=null}function Vt(a){return a.radius}function Bt(a){return a.color}function At(a){return a.color}function Ft(a){return a.properties.NAME!=="Antarctica"}function Tt(a){return a!==void 0}function Wt(a){return a!==void 0}function Gt(a){return a.data}function Ht(a){return a!==void 0}function Ut(a){return a.data}function Xt(a,e){return a-e}function Yt(a){return a.date}exports.DotDensityMap=_t;
2
2
  //# sourceMappingURL=DotDensityMap.cjs.map
@@ -5,7 +5,7 @@ import { g as ke, N as Ne } from "./getSliderMarks-Cvg8zHBU.js";
5
5
  import { w as Oe } from "./Spinner--r2RrJV8.js";
6
6
  import { i as Se } from "./index-Bwrro8-q.js";
7
7
  import { i as Me, z as Ee, a as Pe, g as Ie, b as $e, c as ze, d as _e, e as Le, f as Ve } from "./index-Dp_SfsUA.js";
8
- import { _ as Ae } from "./Typography-iR8PEgdt.js";
8
+ import { _ as Ae } from "./Typography-CdMGooqp.js";
9
9
  import { i as Be } from "./index-DCsFBfJ_.js";
10
10
  import { T as Fe } from "./Tooltip-BRnAz2Gv.js";
11
11
  import { Colors as b } from "./Colors.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),be=require("./index-Cno4Q0YE.cjs"),xe=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-BLa2EfMs.cjs"),q=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-CekrPykD.cjs"),ge=require("./Axis-Jt_tmhxS.cjs"),Ae=require("./AxisTitle-DV4n0RxE.cjs"),Oe=require("./index-D69M6klB.cjs"),Le=require("./time-CkcKbhwe.cjs"),we=require("./linear-CgUCbw9F.cjs"),ve=require("./line-DaEMhXmx.cjs"),me=require("./step-BZ3C8QFW.cjs"),Ie=require("./select-Bnfk0lJx.cjs"),mt=require("./proxy-C4-uo6nS.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-C3o_ntMv.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ee=require("./Colors.cjs"),Ve=require("./EmptyState-DX0t62iF.cjs"),Re=require("./GraphContainer-B1EDxJ0S.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:K,height:Q,lineColors:o,labels:j,sameAxes:A,dateFormat:f,showValues:Rt,noOfXTicks:Kt,rightMargin:Qt,leftMargin:Pt,topMargin:Z,bottomMargin:bt,tooltip:ft,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:G,showDots:M,noOfYTicks:pt,lineSuffixes:H,linePrefixes:_,minDate:dt,maxDate:Ot,curveType:tt,styles:a,classNames:c,precision:et,customLayers:U,showAxisLabels:W}=e,Gt=b.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const d=qe.useInView(Gt,ht),[y,Ht]=b.useState(!1);let yt,it;t[3]!==s.duration||t[4]!==y||t[5]!==d?(yt=()=>{if(d&&!y){const i=setTimeout(()=>{Ht(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},it=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=yt,t[7]=it):(yt=t[6],it=t[7]),b.useEffect(yt,it);const Ut=tt==="linear"?ve.curveLinear:tt==="step"?me.curveStep:tt==="stepAfter"?me.stepAfter:tt==="stepBefore"?me.stepBefore:me.monotoneX,[N,Lt]=b.useState(void 0),[gt,p]=b.useState(void 0),[u,Wt]=b.useState(void 0),nt=Pt+50,It=Qt+65;let st;t[8]!==bt||t[9]!==nt||t[10]!==It||t[11]!==Z?(st={top:Z,bottom:bt,left:nt,right:It},t[8]=bt,t[9]=nt,t[10]=It,t[11]=Z,t[12]=st):st=t[12];const h=st,X=b.useRef(null);let O;t[13]!==f?(O=i=>({...i,date:Ft.parse(`${i.date}`,f,new Date)}),t[13]=f,t[14]=O):O=t[14];const r=be.orderBy(v.map(O),["date"],["asc"]);let ot;if(t[15]!==f||t[16]!==kt){let i;t[18]!==f?(i=R=>({...R,coordinates:[R.coordinates[0]===null?null:Ft.parse(`${R.coordinates[0]}`,f,new Date),R.coordinates[1]===null?null:Ft.parse(`${R.coordinates[1]}`,f,new Date)]}),t[18]=f,t[19]=i):i=t[19],ot=kt.map(i),t[15]=f,t[16]=kt,t[17]=ot}else ot=t[17];const vt=ot,x=K-h.left-h.right,l=Q-h.top-h.bottom,Xt=dt?Ft.parse(`${dt}`,f,new Date):r[0].date,St=Ot?Ft.parse(`${Ot}`,f,new Date):r[r.length-1].date,jt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(pi))>0?0:Math.min(...r.map(fi).filter(mi)):0,rt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,lt=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=jt<rt?jt:rt,B=lt>Y?lt:Y,m=Le.time().domain([Xt,St]).range([0,x]),k=we.linear().domain([A?Dt:jt,A?B>0?B:0:lt>0?lt:0]).range([l,0]).nice(),g=we.linear().domain([A?Dt:rt,A?B>0?B:0:Y>0?Y:0]).range([l,0]).nice(),qt=ve.line().defined(Qe).x(i=>m(i.date)).y(i=>k(i.y1)).curve(Ut),At=ve.line().defined(Ke).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Ut),Yt=k.ticks(pt),Bt=g.ticks(pt),Mt=m.ticks(Kt);b.useEffect(()=>{const i=ye=>{const je=r[Se.bisectCenter(r.map(Je),m.invert(De.pointer(ye)[0]),0)];Lt(je||r[r.length-1]),Nt?.(je||r[r.length-1]),Wt(ye.clientY),p(ye.clientX)},R=()=>{Lt(void 0),p(void 0),Wt(void 0),Nt?.(void 0)};Ie.select(X.current).on("mousemove",i).on("mouseout",R)},[m,r,Nt]);let at;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==vt||t[24]!==d||t[25]!==m?(at=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:vt,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=vt,t[24]=d,t[25]=m,t[26]=at):at=t[26];const wt=c?.xAxis?.axis;let T;t[27]!==wt?(T={axis:wt},t[27]=wt,t[28]=T):T=t[28];let L;t[29]!==a?.xAxis?.axis?(L=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=L):L=t[30];let C;t[31]!==o[0]||t[32]!==L?(C={axis:{stroke:o[0],...L}},t[31]=o[0],t[32]=L,t[33]=C):C=t[33];let ct;t[34]!==l||t[35]!==T||t[36]!==C?(ct=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:T,styles:C}),t[34]=l,t[35]=T,t[36]=C,t[37]=ct):ct=t[37];let V;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==W||t[44]!==a?.yAxis?.title?(V=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=W,t[44]=a?.yAxis?.title,t[45]=V):V=t[45];const zt=x+15,ut=x+15,Jt=c?.xAxis?.axis;let $;t[46]!==Jt?($={axis:Jt},t[46]=Jt,t[47]=$):$=t[47];let z;t[48]!==a?.xAxis?.axis?(z=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=z):z=t[49];let I;t[50]!==o[1]||t[51]!==z?(I={axis:{stroke:o[1],...z}},t[50]=o[1],t[51]=z,t[52]=I):I=t[52];let J;t[53]!==l||t[54]!==zt||t[55]!==ut||t[56]!==$||t[57]!==I?(J=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:zt,x2:ut,classNames:$,styles:I}),t[53]=l,t[54]=zt,t[55]=ut,t[56]=$,t[57]=I,t[58]=J):J=t[58];let xt;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==W||t[66]!==a?.yAxis?.title?(xt=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=W,t[66]=a?.yAxis?.title,t[67]=xt):xt=t[67];const Et=x+15,F=c?.xAxis?.axis;let w;t[68]!==F?(w={axis:F},t[68]=F,t[69]=w):w=t[69];const P=a?.xAxis?.axis;let E;t[70]!==P?(E={axis:P},t[70]=P,t[71]=E):E=t[71];let S;t[72]!==l||t[73]!==Et||t[74]!==w||t[75]!==E?(S=n.jsxRuntimeExports.jsx(ge.Axis,{y1:l,y2:l,x1:-15,x2:Et,classNames:w,styles:E}),t[72]=l,t[73]=Et,t[74]=w,t[75]=E,t[76]=S):S=t[76];let D;t[77]!==f?(D=i=>Ft.format(i,f),t[77]=f,t[78]=D):D=t[78];const Tt=Mt.map(D),Zt=Mt.map(i=>m(i)),Ct=a?.xAxis?.gridLines,fe=a?.xAxis?.labels;let _t;t[79]!==Ct||t[80]!==fe?(_t={gridLines:Ct,labels:fe},t[79]=Ct,t[80]=fe,t[81]=_t):_t=t[81];const pe=c?.xAxis?.gridLines;let Vt;t[82]!==pe?(Vt=n.mo("opacity-0",pe),t[82]=pe,t[83]=Vt):Vt=t[83];const de=c?.xAxis?.labels;let $t;t[84]!==de?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",de),t[84]=de,t[85]=$t):$t=t[85];let te;t[86]!==Vt||t[87]!==$t?(te={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=te):te=t[88];let ee;t[89]!==U?(ee=U.filter(ze).map(Be),t[89]=U,t[90]=ee):ee=t[90];let ie;t[91]!==o[0]||t[92]!==G?(ie={stroke:o[0],strokeWidth:G,fill:"none"},t[91]=o[0],t[92]=G,t[93]=ie):ie=t[93];let ne;t[94]!==s.duration?(ne={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=ne):ne=t[95];let se;t[96]!==o[1]||t[97]!==G?(se={stroke:o[1],strokeWidth:G,fill:"none"},t[96]=o[1],t[97]=G,t[98]=se):se=t[98];let oe;t[99]!==s.duration?(oe={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=oe):oe=t[100];const he=r.map((i,R)=>n.jsxRuntimeExports.jsxs(mt.motion.g,{children:[q.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:k(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:k(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y1,"NA",et,_[0],H[0])}):null]}),q.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y2,"NA",et,_[1],H[1])}):null]})]},R));let re;t[101]!==he?(re=n.jsxRuntimeExports.jsx("g",{children:he}),t[101]=he,t[102]=re):re=t[102];let le;t[103]!==U?(le=U.filter(Ge).map(Pe),t[103]=U,t[104]=le):le=t[104];let ae;t[105]===Symbol.for("react.memo_cache_sentinel")?(ae={fill:"none",pointerEvents:"all"},t[105]=ae):ae=t[105];let ce;t[106]!==X||t[107]!==l||t[108]!==x?(ce=n.jsxRuntimeExports.jsx("rect",{ref:X,style:ae,width:x,height:l}),t[106]=X,t[107]=l,t[108]=x,t[109]=ce):ce=t[109];let ue;return t[110]!==c?.tooltip||t[111]!==gt||t[112]!==u||t[113]!==N||t[114]!==a?.tooltip||t[115]!==ft?(ue=N&&ft&&gt&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:N,body:ft,xPos:gt,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=gt,t[112]=u,t[113]=N,t[114]=a?.tooltip,t[115]=ft,t[116]=ue):ue=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(mt.motion.svg,{width:`${K}px`,height:`${Q}px`,viewBox:`0 0 ${K} ${Q}`,direction:"ltr",ref:Gt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[at,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:k(i),y2:k(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:k(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:xe.numberFormattingFunction(i,"NA",et,_[0],H[0])})]},R)),ct,V]}),n.jsxRuntimeExports.jsxs("g",{children:[Bt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:xe.numberFormattingFunction(i,"NA",et,_[1],H[1])})]},R)),J,xt]}),n.jsxRuntimeExports.jsxs("g",{children:[S,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Tt,x:Zt,y1:0,y2:l,styles:_t,classNames:te,labelType:"primary",showGridLines:!0,precision:et})]}),ee,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(mt.motion.path,{style:ie,exit:ne,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(mt.motion.path,{d:At(r.filter(We))||"",style:se,exit:oe,variants:{initial:{pathLength:0,d:At(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:At(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),N?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(N.date),x2:m(N.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),re,le,ce]})}),ue]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!q.checkIfNullOrUndefined(e.y2)}function Ue(e){return!q.checkIfNullOrUndefined(e.y2)}function We(e){return!q.checkIfNullOrUndefined(e.y2)}function Xe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ye(e){return!q.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!q.checkIfNullOrUndefined(e.y2)}function Qe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function fi(e){return e.y1}function pi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(90),{data:v,graphTitle:K,sources:Q,graphDescription:o,height:j,width:A,footNote:f,noOfXTicks:Rt,dateFormat:Kt,showValues:Qt,padding:Pt,lineColors:Z,sameAxes:bt,backgroundColor:ft,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:G,labels:M,lineSuffixes:pt,linePrefixes:H,tooltip:_,highlightAreaSettings:dt,relativeHeight:Ot,onSeriesMouseOver:tt,graphID:a,graphDownload:c,dataDownload:et,animate:U,strokeWidth:W,showDots:Gt,language:ht,showColorScale:d,minHeight:y,colorLegendTitle:Ht,theme:yt,ariaLabel:it,noOfYTicks:Ut,maxDate:N,minDate:Lt,curveType:gt,styles:p,classNames:u,precision:Wt,customLayers:nt,showAxisLabels:It}=e,st=Kt===void 0?"yyyy":Kt,h=Qt===void 0?!1:Qt;let X;t[0]!==Z?(X=Z===void 0?[Ee.Colors.light.categoricalColors.colors[0],Ee.Colors.light.categoricalColors.colors[1]]:Z,t[0]=Z,t[1]=X):X=t[1];const O=X,r=bt===void 0?!1:bt,ot=ft===void 0?!1:ft,vt=kt===void 0?80:kt,x=Nt===void 0?80:Nt,l=s===void 0?20:s,Xt=G===void 0?25:G;let St;t[2]!==pt?(St=pt===void 0?["",""]:pt,t[2]=pt,t[3]=St):St=t[3];const jt=St;let rt;t[4]!==H?(rt=H===void 0?["",""]:H,t[4]=H,t[5]=rt):rt=t[5];const lt=rt;let Y;t[6]!==dt?(Y=dt===void 0?[]:dt,t[6]=dt,t[7]=Y):Y=t[7];const Dt=Y,B=c===void 0?!1:c,m=et===void 0?!1:et,k=U===void 0?!1:U,g=W===void 0?2:W,qt=Gt===void 0?!0:Gt,At=ht===void 0?"en":ht,Yt=d===void 0?!0:d,Bt=y===void 0?0:y,Mt=yt===void 0?"light":yt,at=Ut===void 0?5:Ut,wt=gt===void 0?"curve":gt,T=Wt===void 0?2:Wt;let L;t[8]!==nt?(L=nt===void 0?[]:nt,t[8]=nt,t[9]=L):L=t[9];const C=L,ct=It===void 0?!0:It,[V,zt]=b.useState(0),[ut,Jt]=b.useState(0),$=b.useRef(null),z=b.useRef(null);let I,J;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{const Zt=new ResizeObserver(Ct=>{zt(Ct[0].target.clientWidth||620),Jt(Ct[0].target.clientHeight||480)});return $.current&&Zt.observe($.current),()=>Zt.disconnect()},J=[],t[10]=I,t[11]=J):(I=t[10],J=t[11]),b.useEffect(I,J);const xt=u?.graphContainer,Et=p?.graphContainer;let F;t[12]!==u?.description||t[13]!==u?.title||t[14]!==v||t[15]!==m||t[16]!==o||t[17]!==B||t[18]!==K||t[19]!==p?.description||t[20]!==p?.title||t[21]!==A?(F=K||o||B||m?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:o,width:A,graphDownload:B?z:void 0,dataDownload:m?v.map(Ei).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[12]=u?.description,t[13]=u?.title,t[14]=v,t[15]=m,t[16]=o,t[17]=B,t[18]=K,t[19]=p?.description,t[20]=p?.title,t[21]=A,t[22]=F):F=t[22];let w;t[23]!==u?.colorLegend||t[24]!==Ht||t[25]!==M||t[26]!==O||t[27]!==Yt?(w=Yt&&M.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:M,colorLegendTitle:Ht,colors:O,showNAColor:!1,className:u?.colorLegend}):null,t[23]=u?.colorLegend,t[24]=Ht,t[25]=M,t[26]=O,t[27]=Yt,t[28]=w):w=t[28];let P;t[29]!==v.length?(P=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[29]=v.length,t[30]=P):P=t[30];let E;t[31]!==k||t[32]!==Xt||t[33]!==u||t[34]!==wt||t[35]!==C||t[36]!==v||t[37]!==st||t[38]!==Dt||t[39]!==M||t[40]!==vt||t[41]!==O||t[42]!==lt||t[43]!==jt||t[44]!==N||t[45]!==Lt||t[46]!==Rt||t[47]!==at||t[48]!==tt||t[49]!==T||t[50]!==x||t[51]!==r||t[52]!==ct||t[53]!==qt||t[54]!==h||t[55]!==g||t[56]!==p||t[57]!==ut||t[58]!==V||t[59]!==_||t[60]!==l?(E=V&&ut&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:O,width:V,height:ut,dateFormat:st,showValues:h,noOfXTicks:Rt??$e.getNoOfTicks(V),leftMargin:vt,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:M,highlightAreaSettings:Dt,tooltip:_,onSeriesMouseOver:tt,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:at,lineSuffixes:jt,linePrefixes:lt,minDate:Lt,maxDate:N,curveType:wt,styles:p,classNames:u,precision:T,customLayers:C,showAxisLabels:ct}):null,t[31]=k,t[32]=Xt,t[33]=u,t[34]=wt,t[35]=C,t[36]=v,t[37]=st,t[38]=Dt,t[39]=M,t[40]=vt,t[41]=O,t[42]=lt,t[43]=jt,t[44]=N,t[45]=Lt,t[46]=Rt,t[47]=at,t[48]=tt,t[49]=T,t[50]=x,t[51]=r,t[52]=ct,t[53]=qt,t[54]=h,t[55]=g,t[56]=p,t[57]=ut,t[58]=V,t[59]=_,t[60]=l,t[61]=E):E=t[61];let S;t[62]!==P||t[63]!==E?(S=n.jsxRuntimeExports.jsxs(Re.GraphArea,{ref:$,children:[P,E]}),t[62]=P,t[63]=E,t[64]=S):S=t[64];let D;t[65]!==u?.footnote||t[66]!==u?.source||t[67]!==f||t[68]!==Q||t[69]!==p?.footnote||t[70]!==p?.source||t[71]!==A?(D=Q||f?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:Q,footNote:f,width:A}):null,t[65]=u?.footnote,t[66]=u?.source,t[67]=f,t[68]=Q,t[69]=p?.footnote,t[70]=p?.source,t[71]=A,t[72]=D):D=t[72];let Tt;return t[73]!==it||t[74]!==ot||t[75]!==a||t[76]!==j||t[77]!==At||t[78]!==Bt||t[79]!==Pt||t[80]!==Ot||t[81]!==xt||t[82]!==Et||t[83]!==F||t[84]!==w||t[85]!==S||t[86]!==D||t[87]!==Mt||t[88]!==A?(Tt=n.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:xt,style:Et,id:a,ref:z,"aria-label":it,backgroundColor:ot,theme:Mt,language:At,minHeight:Bt,width:A,height:j,relativeHeight:Ot,padding:Pt,children:[F,w,S,D]}),t[73]=it,t[74]=ot,t[75]=a,t[76]=j,t[77]=At,t[78]=Bt,t[79]=Pt,t[80]=Ot,t[81]=xt,t[82]=Et,t[83]=F,t[84]=w,t[85]=S,t[86]=D,t[87]=Mt,t[88]=A,t[89]=Tt):Tt=t[89],Tt}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),be=require("./index-Cno4Q0YE.cjs"),xe=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-BLa2EfMs.cjs"),q=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-CekrPykD.cjs"),ge=require("./Axis-Jt_tmhxS.cjs"),Ae=require("./AxisTitle-DV4n0RxE.cjs"),Oe=require("./index-D69M6klB.cjs"),Le=require("./time-CkcKbhwe.cjs"),we=require("./linear-CgUCbw9F.cjs"),ve=require("./line-DaEMhXmx.cjs"),me=require("./step-BZ3C8QFW.cjs"),Ie=require("./select-Bnfk0lJx.cjs"),mt=require("./proxy-C4-uo6nS.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-C3o_ntMv.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ee=require("./Colors.cjs"),Ve=require("./EmptyState-N1eHt3vq.cjs"),Re=require("./GraphContainer-B1EDxJ0S.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:K,height:Q,lineColors:o,labels:j,sameAxes:A,dateFormat:f,showValues:Rt,noOfXTicks:Kt,rightMargin:Qt,leftMargin:Pt,topMargin:Z,bottomMargin:bt,tooltip:ft,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:G,showDots:M,noOfYTicks:pt,lineSuffixes:H,linePrefixes:_,minDate:dt,maxDate:Ot,curveType:tt,styles:a,classNames:c,precision:et,customLayers:U,showAxisLabels:W}=e,Gt=b.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const d=qe.useInView(Gt,ht),[y,Ht]=b.useState(!1);let yt,it;t[3]!==s.duration||t[4]!==y||t[5]!==d?(yt=()=>{if(d&&!y){const i=setTimeout(()=>{Ht(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},it=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=yt,t[7]=it):(yt=t[6],it=t[7]),b.useEffect(yt,it);const Ut=tt==="linear"?ve.curveLinear:tt==="step"?me.curveStep:tt==="stepAfter"?me.stepAfter:tt==="stepBefore"?me.stepBefore:me.monotoneX,[N,Lt]=b.useState(void 0),[gt,p]=b.useState(void 0),[u,Wt]=b.useState(void 0),nt=Pt+50,It=Qt+65;let st;t[8]!==bt||t[9]!==nt||t[10]!==It||t[11]!==Z?(st={top:Z,bottom:bt,left:nt,right:It},t[8]=bt,t[9]=nt,t[10]=It,t[11]=Z,t[12]=st):st=t[12];const h=st,X=b.useRef(null);let O;t[13]!==f?(O=i=>({...i,date:Ft.parse(`${i.date}`,f,new Date)}),t[13]=f,t[14]=O):O=t[14];const r=be.orderBy(v.map(O),["date"],["asc"]);let ot;if(t[15]!==f||t[16]!==kt){let i;t[18]!==f?(i=R=>({...R,coordinates:[R.coordinates[0]===null?null:Ft.parse(`${R.coordinates[0]}`,f,new Date),R.coordinates[1]===null?null:Ft.parse(`${R.coordinates[1]}`,f,new Date)]}),t[18]=f,t[19]=i):i=t[19],ot=kt.map(i),t[15]=f,t[16]=kt,t[17]=ot}else ot=t[17];const vt=ot,x=K-h.left-h.right,l=Q-h.top-h.bottom,Xt=dt?Ft.parse(`${dt}`,f,new Date):r[0].date,St=Ot?Ft.parse(`${Ot}`,f,new Date):r[r.length-1].date,jt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(pi))>0?0:Math.min(...r.map(fi).filter(mi)):0,rt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,lt=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=jt<rt?jt:rt,B=lt>Y?lt:Y,m=Le.time().domain([Xt,St]).range([0,x]),k=we.linear().domain([A?Dt:jt,A?B>0?B:0:lt>0?lt:0]).range([l,0]).nice(),g=we.linear().domain([A?Dt:rt,A?B>0?B:0:Y>0?Y:0]).range([l,0]).nice(),qt=ve.line().defined(Qe).x(i=>m(i.date)).y(i=>k(i.y1)).curve(Ut),At=ve.line().defined(Ke).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Ut),Yt=k.ticks(pt),Bt=g.ticks(pt),Mt=m.ticks(Kt);b.useEffect(()=>{const i=ye=>{const je=r[Se.bisectCenter(r.map(Je),m.invert(De.pointer(ye)[0]),0)];Lt(je||r[r.length-1]),Nt?.(je||r[r.length-1]),Wt(ye.clientY),p(ye.clientX)},R=()=>{Lt(void 0),p(void 0),Wt(void 0),Nt?.(void 0)};Ie.select(X.current).on("mousemove",i).on("mouseout",R)},[m,r,Nt]);let at;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==vt||t[24]!==d||t[25]!==m?(at=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:vt,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=vt,t[24]=d,t[25]=m,t[26]=at):at=t[26];const wt=c?.xAxis?.axis;let T;t[27]!==wt?(T={axis:wt},t[27]=wt,t[28]=T):T=t[28];let L;t[29]!==a?.xAxis?.axis?(L=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=L):L=t[30];let C;t[31]!==o[0]||t[32]!==L?(C={axis:{stroke:o[0],...L}},t[31]=o[0],t[32]=L,t[33]=C):C=t[33];let ct;t[34]!==l||t[35]!==T||t[36]!==C?(ct=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:T,styles:C}),t[34]=l,t[35]=T,t[36]=C,t[37]=ct):ct=t[37];let V;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==W||t[44]!==a?.yAxis?.title?(V=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=W,t[44]=a?.yAxis?.title,t[45]=V):V=t[45];const zt=x+15,ut=x+15,Jt=c?.xAxis?.axis;let $;t[46]!==Jt?($={axis:Jt},t[46]=Jt,t[47]=$):$=t[47];let z;t[48]!==a?.xAxis?.axis?(z=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=z):z=t[49];let I;t[50]!==o[1]||t[51]!==z?(I={axis:{stroke:o[1],...z}},t[50]=o[1],t[51]=z,t[52]=I):I=t[52];let J;t[53]!==l||t[54]!==zt||t[55]!==ut||t[56]!==$||t[57]!==I?(J=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:zt,x2:ut,classNames:$,styles:I}),t[53]=l,t[54]=zt,t[55]=ut,t[56]=$,t[57]=I,t[58]=J):J=t[58];let xt;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==W||t[66]!==a?.yAxis?.title?(xt=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=W,t[66]=a?.yAxis?.title,t[67]=xt):xt=t[67];const Et=x+15,F=c?.xAxis?.axis;let w;t[68]!==F?(w={axis:F},t[68]=F,t[69]=w):w=t[69];const P=a?.xAxis?.axis;let E;t[70]!==P?(E={axis:P},t[70]=P,t[71]=E):E=t[71];let S;t[72]!==l||t[73]!==Et||t[74]!==w||t[75]!==E?(S=n.jsxRuntimeExports.jsx(ge.Axis,{y1:l,y2:l,x1:-15,x2:Et,classNames:w,styles:E}),t[72]=l,t[73]=Et,t[74]=w,t[75]=E,t[76]=S):S=t[76];let D;t[77]!==f?(D=i=>Ft.format(i,f),t[77]=f,t[78]=D):D=t[78];const Tt=Mt.map(D),Zt=Mt.map(i=>m(i)),Ct=a?.xAxis?.gridLines,fe=a?.xAxis?.labels;let _t;t[79]!==Ct||t[80]!==fe?(_t={gridLines:Ct,labels:fe},t[79]=Ct,t[80]=fe,t[81]=_t):_t=t[81];const pe=c?.xAxis?.gridLines;let Vt;t[82]!==pe?(Vt=n.mo("opacity-0",pe),t[82]=pe,t[83]=Vt):Vt=t[83];const de=c?.xAxis?.labels;let $t;t[84]!==de?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",de),t[84]=de,t[85]=$t):$t=t[85];let te;t[86]!==Vt||t[87]!==$t?(te={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=te):te=t[88];let ee;t[89]!==U?(ee=U.filter(ze).map(Be),t[89]=U,t[90]=ee):ee=t[90];let ie;t[91]!==o[0]||t[92]!==G?(ie={stroke:o[0],strokeWidth:G,fill:"none"},t[91]=o[0],t[92]=G,t[93]=ie):ie=t[93];let ne;t[94]!==s.duration?(ne={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=ne):ne=t[95];let se;t[96]!==o[1]||t[97]!==G?(se={stroke:o[1],strokeWidth:G,fill:"none"},t[96]=o[1],t[97]=G,t[98]=se):se=t[98];let oe;t[99]!==s.duration?(oe={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=oe):oe=t[100];const he=r.map((i,R)=>n.jsxRuntimeExports.jsxs(mt.motion.g,{children:[q.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:k(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:k(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y1,"NA",et,_[0],H[0])}):null]}),q.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y2,"NA",et,_[1],H[1])}):null]})]},R));let re;t[101]!==he?(re=n.jsxRuntimeExports.jsx("g",{children:he}),t[101]=he,t[102]=re):re=t[102];let le;t[103]!==U?(le=U.filter(Ge).map(Pe),t[103]=U,t[104]=le):le=t[104];let ae;t[105]===Symbol.for("react.memo_cache_sentinel")?(ae={fill:"none",pointerEvents:"all"},t[105]=ae):ae=t[105];let ce;t[106]!==X||t[107]!==l||t[108]!==x?(ce=n.jsxRuntimeExports.jsx("rect",{ref:X,style:ae,width:x,height:l}),t[106]=X,t[107]=l,t[108]=x,t[109]=ce):ce=t[109];let ue;return t[110]!==c?.tooltip||t[111]!==gt||t[112]!==u||t[113]!==N||t[114]!==a?.tooltip||t[115]!==ft?(ue=N&&ft&&gt&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:N,body:ft,xPos:gt,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=gt,t[112]=u,t[113]=N,t[114]=a?.tooltip,t[115]=ft,t[116]=ue):ue=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(mt.motion.svg,{width:`${K}px`,height:`${Q}px`,viewBox:`0 0 ${K} ${Q}`,direction:"ltr",ref:Gt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[at,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:k(i),y2:k(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:k(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:xe.numberFormattingFunction(i,"NA",et,_[0],H[0])})]},R)),ct,V]}),n.jsxRuntimeExports.jsxs("g",{children:[Bt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:xe.numberFormattingFunction(i,"NA",et,_[1],H[1])})]},R)),J,xt]}),n.jsxRuntimeExports.jsxs("g",{children:[S,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Tt,x:Zt,y1:0,y2:l,styles:_t,classNames:te,labelType:"primary",showGridLines:!0,precision:et})]}),ee,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(mt.motion.path,{style:ie,exit:ne,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(mt.motion.path,{d:At(r.filter(We))||"",style:se,exit:oe,variants:{initial:{pathLength:0,d:At(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:At(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),N?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(N.date),x2:m(N.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),re,le,ce]})}),ue]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!q.checkIfNullOrUndefined(e.y2)}function Ue(e){return!q.checkIfNullOrUndefined(e.y2)}function We(e){return!q.checkIfNullOrUndefined(e.y2)}function Xe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ye(e){return!q.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!q.checkIfNullOrUndefined(e.y2)}function Qe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function fi(e){return e.y1}function pi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(90),{data:v,graphTitle:K,sources:Q,graphDescription:o,height:j,width:A,footNote:f,noOfXTicks:Rt,dateFormat:Kt,showValues:Qt,padding:Pt,lineColors:Z,sameAxes:bt,backgroundColor:ft,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:G,labels:M,lineSuffixes:pt,linePrefixes:H,tooltip:_,highlightAreaSettings:dt,relativeHeight:Ot,onSeriesMouseOver:tt,graphID:a,graphDownload:c,dataDownload:et,animate:U,strokeWidth:W,showDots:Gt,language:ht,showColorScale:d,minHeight:y,colorLegendTitle:Ht,theme:yt,ariaLabel:it,noOfYTicks:Ut,maxDate:N,minDate:Lt,curveType:gt,styles:p,classNames:u,precision:Wt,customLayers:nt,showAxisLabels:It}=e,st=Kt===void 0?"yyyy":Kt,h=Qt===void 0?!1:Qt;let X;t[0]!==Z?(X=Z===void 0?[Ee.Colors.light.categoricalColors.colors[0],Ee.Colors.light.categoricalColors.colors[1]]:Z,t[0]=Z,t[1]=X):X=t[1];const O=X,r=bt===void 0?!1:bt,ot=ft===void 0?!1:ft,vt=kt===void 0?80:kt,x=Nt===void 0?80:Nt,l=s===void 0?20:s,Xt=G===void 0?25:G;let St;t[2]!==pt?(St=pt===void 0?["",""]:pt,t[2]=pt,t[3]=St):St=t[3];const jt=St;let rt;t[4]!==H?(rt=H===void 0?["",""]:H,t[4]=H,t[5]=rt):rt=t[5];const lt=rt;let Y;t[6]!==dt?(Y=dt===void 0?[]:dt,t[6]=dt,t[7]=Y):Y=t[7];const Dt=Y,B=c===void 0?!1:c,m=et===void 0?!1:et,k=U===void 0?!1:U,g=W===void 0?2:W,qt=Gt===void 0?!0:Gt,At=ht===void 0?"en":ht,Yt=d===void 0?!0:d,Bt=y===void 0?0:y,Mt=yt===void 0?"light":yt,at=Ut===void 0?5:Ut,wt=gt===void 0?"curve":gt,T=Wt===void 0?2:Wt;let L;t[8]!==nt?(L=nt===void 0?[]:nt,t[8]=nt,t[9]=L):L=t[9];const C=L,ct=It===void 0?!0:It,[V,zt]=b.useState(0),[ut,Jt]=b.useState(0),$=b.useRef(null),z=b.useRef(null);let I,J;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{const Zt=new ResizeObserver(Ct=>{zt(Ct[0].target.clientWidth||620),Jt(Ct[0].target.clientHeight||480)});return $.current&&Zt.observe($.current),()=>Zt.disconnect()},J=[],t[10]=I,t[11]=J):(I=t[10],J=t[11]),b.useEffect(I,J);const xt=u?.graphContainer,Et=p?.graphContainer;let F;t[12]!==u?.description||t[13]!==u?.title||t[14]!==v||t[15]!==m||t[16]!==o||t[17]!==B||t[18]!==K||t[19]!==p?.description||t[20]!==p?.title||t[21]!==A?(F=K||o||B||m?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:o,width:A,graphDownload:B?z:void 0,dataDownload:m?v.map(Ei).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[12]=u?.description,t[13]=u?.title,t[14]=v,t[15]=m,t[16]=o,t[17]=B,t[18]=K,t[19]=p?.description,t[20]=p?.title,t[21]=A,t[22]=F):F=t[22];let w;t[23]!==u?.colorLegend||t[24]!==Ht||t[25]!==M||t[26]!==O||t[27]!==Yt?(w=Yt&&M.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:M,colorLegendTitle:Ht,colors:O,showNAColor:!1,className:u?.colorLegend}):null,t[23]=u?.colorLegend,t[24]=Ht,t[25]=M,t[26]=O,t[27]=Yt,t[28]=w):w=t[28];let P;t[29]!==v.length?(P=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[29]=v.length,t[30]=P):P=t[30];let E;t[31]!==k||t[32]!==Xt||t[33]!==u||t[34]!==wt||t[35]!==C||t[36]!==v||t[37]!==st||t[38]!==Dt||t[39]!==M||t[40]!==vt||t[41]!==O||t[42]!==lt||t[43]!==jt||t[44]!==N||t[45]!==Lt||t[46]!==Rt||t[47]!==at||t[48]!==tt||t[49]!==T||t[50]!==x||t[51]!==r||t[52]!==ct||t[53]!==qt||t[54]!==h||t[55]!==g||t[56]!==p||t[57]!==ut||t[58]!==V||t[59]!==_||t[60]!==l?(E=V&&ut&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:O,width:V,height:ut,dateFormat:st,showValues:h,noOfXTicks:Rt??$e.getNoOfTicks(V),leftMargin:vt,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:M,highlightAreaSettings:Dt,tooltip:_,onSeriesMouseOver:tt,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:at,lineSuffixes:jt,linePrefixes:lt,minDate:Lt,maxDate:N,curveType:wt,styles:p,classNames:u,precision:T,customLayers:C,showAxisLabels:ct}):null,t[31]=k,t[32]=Xt,t[33]=u,t[34]=wt,t[35]=C,t[36]=v,t[37]=st,t[38]=Dt,t[39]=M,t[40]=vt,t[41]=O,t[42]=lt,t[43]=jt,t[44]=N,t[45]=Lt,t[46]=Rt,t[47]=at,t[48]=tt,t[49]=T,t[50]=x,t[51]=r,t[52]=ct,t[53]=qt,t[54]=h,t[55]=g,t[56]=p,t[57]=ut,t[58]=V,t[59]=_,t[60]=l,t[61]=E):E=t[61];let S;t[62]!==P||t[63]!==E?(S=n.jsxRuntimeExports.jsxs(Re.GraphArea,{ref:$,children:[P,E]}),t[62]=P,t[63]=E,t[64]=S):S=t[64];let D;t[65]!==u?.footnote||t[66]!==u?.source||t[67]!==f||t[68]!==Q||t[69]!==p?.footnote||t[70]!==p?.source||t[71]!==A?(D=Q||f?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:Q,footNote:f,width:A}):null,t[65]=u?.footnote,t[66]=u?.source,t[67]=f,t[68]=Q,t[69]=p?.footnote,t[70]=p?.source,t[71]=A,t[72]=D):D=t[72];let Tt;return t[73]!==it||t[74]!==ot||t[75]!==a||t[76]!==j||t[77]!==At||t[78]!==Bt||t[79]!==Pt||t[80]!==Ot||t[81]!==xt||t[82]!==Et||t[83]!==F||t[84]!==w||t[85]!==S||t[86]!==D||t[87]!==Mt||t[88]!==A?(Tt=n.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:xt,style:Et,id:a,ref:z,"aria-label":it,backgroundColor:ot,theme:Mt,language:At,minHeight:Bt,width:A,height:j,relativeHeight:Ot,padding:Pt,children:[F,w,S,D]}),t[73]=it,t[74]=ot,t[75]=a,t[76]=j,t[77]=At,t[78]=Bt,t[79]=Pt,t[80]=Ot,t[81]=xt,t[82]=Et,t[83]=F,t[84]=w,t[85]=S,t[86]=D,t[87]=Mt,t[88]=A,t[89]=Tt):Tt=t[89],Tt}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
2
2
  //# sourceMappingURL=DualAxisLineChart.cjs.map
@@ -22,7 +22,7 @@ import { GraphFooter as Ge } from "./GraphFooter.js";
22
22
  import { GraphHeader as Ye } from "./GraphHeader.js";
23
23
  import { ColorLegend as Re } from "./ColorLegend.js";
24
24
  import { Colors as Le } from "./Colors.js";
25
- import { E as Be } from "./EmptyState-Pj-emXt5.js";
25
+ import { E as Be } from "./EmptyState-dScPFkLy.js";
26
26
  import { a as ze, G as Ue } from "./GraphContainer-CF6ws3pd.js";
27
27
  import { g as qe } from "./getNoOfTicks-CpmRjcRF.js";
28
28
  function Je(e) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-sbKVyHS2.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-DX0t62iF.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-sbKVyHS2.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-N1eHt3vq.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
2
2
  //# sourceMappingURL=DumbbellChart.cjs.map
@@ -26,7 +26,7 @@ import { GraphHeader as ei } from "./GraphHeader.js";
26
26
  import { P as ii, e as ni } from "./index-B-4y_iGB.js";
27
27
  import { GraphFooter as ai } from "./GraphFooter.js";
28
28
  import { ColorLegendWithMouseOver as oi } from "./ColorLegendWithMouseOver.js";
29
- import { E as si } from "./EmptyState-Pj-emXt5.js";
29
+ import { E as si } from "./EmptyState-dScPFkLy.js";
30
30
  import { Colors as li } from "./Colors.js";
31
31
  function ri(e) {
32
32
  const t = Ie.c(148), {
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("./Typography-DrJ7IOdw.cjs"),i=require("./index-sbKVyHS2.cjs");function n(){const r=t.compilerRuntimeExports.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full",children:[t.jsxRuntimeExports.jsx(i.Alert,{}),t.jsxRuntimeExports.jsx(s._,{marginBottom:"none",leading:"none",size:"lg",className:"text-primary-gray-550 dark:text-primary-gray-550",children:"No data available"})]}),r[0]=e):e=r[0],e}exports.EmptyState=n;
2
- //# sourceMappingURL=EmptyState-DX0t62iF.cjs.map
1
+ "use strict";const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("./Typography-Cc_iHQB-.cjs"),i=require("./index-sbKVyHS2.cjs");function n(){const r=t.compilerRuntimeExports.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full",children:[t.jsxRuntimeExports.jsx(i.Alert,{}),t.jsxRuntimeExports.jsx(s._,{marginBottom:"none",leading:"none",size:"lg",className:"text-primary-gray-550 dark:text-primary-gray-550",children:"No data available"})]}),r[0]=e):e=r[0],e}exports.EmptyState=n;
2
+ //# sourceMappingURL=EmptyState-N1eHt3vq.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-DX0t62iF.cjs","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":"uIAIO,SAAAA,GAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,CAAA,EAAA,IAAAC,EAAA,OAAAF,EAAA,CAAA,IAAAG,OAAAC,IAAA,2BAAA,GAEHF,EAAAG,EAAAA,kBAAAA,KAAA,MAAA,CAAe,UAAA,yEACb,SAAA,CAAAC,EAAAA,kBAAAA,IAACC,EAAAA,MAAA,EAAK,EACND,EAAAA,kBAAAA,IAACE,EAAAA,EAAA,CACc,aAAA,OACL,QAAA,OACH,KAAA,KACK,UAAA,mDACX,SAAA,mBAAA,CAED,CAAA,EACF,EAAMR,KAAAE,GAAAA,EAAAF,EAAA,CAAA,EAVNE,CAUM"}
1
+ {"version":3,"file":"EmptyState-N1eHt3vq.cjs","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":"uIAIO,SAAAA,GAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,CAAA,EAAA,IAAAC,EAAA,OAAAF,EAAA,CAAA,IAAAG,OAAAC,IAAA,2BAAA,GAEHF,EAAAG,EAAAA,kBAAAA,KAAA,MAAA,CAAe,UAAA,yEACb,SAAA,CAAAC,EAAAA,kBAAAA,IAACC,EAAAA,MAAA,EAAK,EACND,EAAAA,kBAAAA,IAACE,EAAAA,EAAA,CACc,aAAA,OACL,QAAA,OACH,KAAA,KACK,UAAA,mDACX,SAAA,mBAAA,CAED,CAAA,EACF,EAAMR,KAAAE,GAAAA,EAAAF,EAAA,CAAA,EAVNE,CAUM"}
@@ -1,5 +1,5 @@
1
1
  import { c as a, j as r } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { _ as o } from "./Typography-iR8PEgdt.js";
2
+ import { _ as o } from "./Typography-CdMGooqp.js";
3
3
  import { A as l } from "./index-B-4y_iGB.js";
4
4
  function n() {
5
5
  const t = a.c(1);
@@ -12,4 +12,4 @@ function n() {
12
12
  export {
13
13
  n as E
14
14
  };
15
- //# sourceMappingURL=EmptyState-Pj-emXt5.js.map
15
+ //# sourceMappingURL=EmptyState-dScPFkLy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-Pj-emXt5.js","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":";;;AAIO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAG,uBAAAC,IAAA,2BAAA,KAEHF,IAAAG,gBAAAA,EAAAA,KAAA,OAAA,EAAe,WAAA,0EACb,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,GAAA,EAAK;AAAA,IACND,gBAAAA,EAAAA,IAACE,GAAA,EACc,cAAA,QACL,SAAA,QACH,MAAA,MACK,WAAA,oDACX,UAAA,oBAAA,CAED;AAAA,EAAA,GACF,GAAMR,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAVNE;AAUM;"}
1
+ {"version":3,"file":"EmptyState-dScPFkLy.js","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":";;;AAIO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAG,uBAAAC,IAAA,2BAAA,KAEHF,IAAAG,gBAAAA,EAAAA,KAAA,OAAA,EAAe,WAAA,0EACb,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,GAAA,EAAK;AAAA,IACND,gBAAAA,EAAAA,IAACE,GAAA,EACc,cAAA,QACL,SAAA,QACH,MAAA,MACK,WAAA,oDACX,UAAA,oBAAA,CAED;AAAA,EAAA,GACF,GAAMR,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAVNE;AAUM;"}
package/dist/FootNote.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),m=require("./Typography-DrJ7IOdw.cjs"),u=require("react");function p(c){const e=a.compilerRuntimeExports.c(12),{text:r,style:n,className:o}=c;let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const i=s;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[2]!==o?(t=a.mo("text-primary-gray-550 dark:text-primary-gray-40",o),e[2]=o,e[3]=t):t=e[3];let l;return e[4]!==i||e[5]!==t||e[6]!==r?(l=a.jsxRuntimeExports.jsx(m._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph footnote",style:i,children:r}),e[4]=i,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}if(u.isValidElement(r)){let t;return e[8]!==o||e[9]!==i||e[10]!==r?(t=a.jsxRuntimeExports.jsx("div",{className:o,style:i,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=t):t=e[11],t}return console.error("FootNote: Invalid text type. Expected string or React element."),null}exports.FootNote=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),m=require("./Typography-Cc_iHQB-.cjs"),u=require("react");function p(c){const e=a.compilerRuntimeExports.c(12),{text:r,style:n,className:o}=c;let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const i=s;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[2]!==o?(t=a.mo("text-primary-gray-550 dark:text-primary-gray-40",o),e[2]=o,e[3]=t):t=e[3];let l;return e[4]!==i||e[5]!==t||e[6]!==r?(l=a.jsxRuntimeExports.jsx(m._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph footnote",style:i,children:r}),e[4]=i,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}if(u.isValidElement(r)){let t;return e[8]!==o||e[9]!==i||e[10]!==r?(t=a.jsxRuntimeExports.jsx("div",{className:o,style:i,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=t):t=e[11],t}return console.error("FootNote: Invalid text type. Expected string or React element."),null}exports.FootNote=p;
2
2
  //# sourceMappingURL=FootNote.cjs.map
package/dist/FootNote.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c, m as f, j as a } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { _ as p } from "./Typography-iR8PEgdt.js";
2
+ import { _ as p } from "./Typography-CdMGooqp.js";
3
3
  import x from "react";
4
4
  function g(m) {
5
5
  const t = c.c(12), {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),me=require("./index-BS2TADPj.cjs"),le=require("./DropdownSelect-NNpOs7DX.cjs"),de=require("./Source-B3i0Bx2R.cjs"),U=require("maplibre-gl"),pe=require("pmtiles");;/* empty css */const ne=require("./fetchAndParseData-QTF6tjij.cjs"),se=require("./filterData-T5DQBE9b.cjs"),fe=require("./string2HTML-xx9MzTtY.cjs"),ge=require("./index-sbKVyHS2.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),xe=require("./select-Bnfk0lJx.cjs"),he=require("./GraphHeader.cjs"),ye=require("./GraphFooter.cjs");function be(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const m=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,m.get?m:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const je=be(pe);function ve(a){const e=s.compilerRuntimeExports.c(25),{mapStyle:n,center:m,zoomLevel:y,selectedLayer:r,layerIdList:d,excludeLayers:c,mapLegend:f}=a,[p,A]=u.useState(0),[R,T]=u.useState(0),[E,O]=u.useState(!0),[b,W]=u.useState(void 0),_=u.useRef(null),t=u.useRef(null),g=u.useRef(null);let v,L;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const i=new ResizeObserver(h=>{A(h[0].target.clientWidth||620),T(h[0].target.clientHeight||480)});return _.current&&i.observe(_.current),()=>i.disconnect()},L=[],e[0]=v,e[1]=L):(v=e[0],L=e[1]),u.useEffect(v,L);let o,l;e[2]!==m||e[3]!==c||e[4]!==d||e[5]!==n||e[6]!==r||e[7]!==p||e[8]!==y?(o=()=>{t.current&&p&&!g.current&&ne.fetchAndParseJSON(n).then(i=>{W(i),xe.select(t.current).selectAll("div").remove();const C=new je.Protocol;U.addProtocol("pmtiles",C.tile);const w={container:t.current,style:{...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(q=>r.indexOf(q)===-1)]}])},attributionControl:!0};m&&(w.center=m),y&&(w.zoom=y),g.current=new U.Map(w),g.current.addControl(new U.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),g.current.addControl(new U.ScaleControl,"bottom-left")})},l=[p,m,y,d,n,c,r],e[2]=m,e[3]=c,e[4]=d,e[5]=n,e[6]=r,e[7]=p,e[8]=y,e[9]=o,e[10]=l):(o=e[9],l=e[10]),u.useEffect(o,l);let j,S;e[11]!==c||e[12]!==d||e[13]!==n||e[14]!==b||e[15]!==r?(j=()=>{if(g.current)if(b){const i={...b,layers:se.filterData(b.layers,[{column:"id",excludeValues:[...c,...d.filter(h=>r.indexOf(h)===-1)]}])};g.current.setStyle(i)}else ne.fetchAndParseJSON(n).then(i=>{const h={...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(C=>r.indexOf(C)===-1)]}])};g.current.setStyle(h)})},S=[c,d,n,b,r],e[11]=c,e[12]=d,e[13]=n,e[14]=b,e[15]=r,e[16]=j,e[17]=S):(j=e[16],S=e[17]),u.useEffect(j,S);let x;e[18]!==f||e[19]!==E||e[20]!==R||e[21]!==p?(x=p&&R?s.jsxRuntimeExports.jsxs("div",{style:{width:p,height:R},children:[s.jsxRuntimeExports.jsx("div",{ref:t,className:"map maplibre-show-control w-full h-full"}),f?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:E?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{O(!1)},children:s.jsxRuntimeExports.jsx(ge.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof f=="string"?{__html:fe.string2HTML(f)}:void 0,children:u.isValidElement(f)?f:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{O(!0)},children:s.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"})})}):null]}):null,e[18]=f,e[19]=E,e[20]=R,e[21]=p,e[22]=x):x=e[22];let D;return e[23]!==x?(D=s.jsxRuntimeExports.jsx(ie.GraphArea,{ref:_,children:x}),e[23]=x,e[24]=D):D=e[24],D}function Se(a){const e=s.compilerRuntimeExports.c(69),{mapStyle:n,graphTitle:m,height:y,width:r,relativeHeight:d,sources:c,graphDescription:f,footNote:p,padding:A,backgroundColor:R,center:T,zoomLevel:E,graphID:O,language:b,minHeight:W,theme:_,layerSelection:t,excludeLayers:g,ariaLabel:v,uiMode:L,styles:o,classNames:l,mapLegend:j}=a,S=R===void 0?!1:R,x=b===void 0?"en":b,D=W===void 0?0:W,i=_===void 0?"light":_;let h;e[0]!==g?(h=g===void 0?[]:g,e[0]=g,e[1]=h):h=e[1];const C=h,w=L===void 0?"normal":L;let q;e[2]!==j?(q=j===void 0?[]:j,e[2]=j,e[3]=q):q=e[3];const Y=q,[N,oe]=u.useState(t[0].layerID),ae=u.useRef(null);let F;e[4]!==t[0].layerID?(F=()=>{oe(t[0].layerID)},e[4]=t[0].layerID,e[5]=F):F=e[5];let $;e[6]!==t?($=[t],e[6]=t,e[7]=$):$=e[7],u.useEffect(F,$);let J;e[8]===Symbol.for("react.memo_cache_sentinel")?(J={ignoreCase:!0,ignoreAccents:!0,trim:!0},e[8]=J):J=e[8];const ce=J,ee=l?.graphContainer,te=o?.graphContainer;let H;e[9]!==l?.description||e[10]!==l?.title||e[11]!==f||e[12]!==m||e[13]!==o?.description||e[14]!==o?.title||e[15]!==r?(H=m||f?s.jsxRuntimeExports.jsx(he.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:l?.title,description:l?.description},graphTitle:m,graphDescription:f,width:r}):null,e[9]=l?.description,e[10]=l?.title,e[11]=f,e[12]=m,e[13]=o?.description,e[14]=o?.title,e[15]=r,e[16]=H):H=e[16];let I;e[17]!==t?(I=t.map(Re),e[17]=t,e[18]=I):I=e[18];const re=x==="he"||x==="ar";let X;e[19]===Symbol.for("react.memo_cache_sentinel")?(X=le.Du(ce),e[19]=X):X=e[19];let M;e[20]!==t[0].layerID||e[21]!==t[0].name?(M={label:t[0].name,value:t[0].layerID},e[20]=t[0].layerID,e[21]=t[0].name,e[22]=M):M=e[22];let Z;e[23]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{Q&&oe(Q.value)},e[23]=Z):Z=e[23];let k;e[24]!==I||e[25]!==re||e[26]!==M||e[27]!==w?(k=s.jsxRuntimeExports.jsx(le.ja,{options:I,size:"sm",isClearable:!1,variant:w,isRtl:re,isSearchable:!0,filterOption:X,defaultValue:M,controlShouldRenderValue:!0,onChange:Z}),e[24]=I,e[25]=re,e[26]=M,e[27]=w,e[28]=k):k=e[28];let B;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxRuntimeExports.jsx(de.n,{size:"lg"}),e[29]=B):B=e[29];let G;e[30]!==t?(G=me.flattenDeep(t.map(De)),e[30]=t,e[31]=G):G=e[31];let P;e[32]!==t||e[33]!==Y||e[34]!==N?(P=Y.find(Q=>Q.mapStyleName===t.find(ue=>ue.layerID===N)?.name)?.legend,e[32]=t,e[33]=Y,e[34]=N,e[35]=P):P=e[35];let z;e[36]!==T||e[37]!==C||e[38]!==n||e[39]!==N||e[40]!==G||e[41]!==P||e[42]!==E?(z=s.jsxRuntimeExports.jsx(ve,{mapStyle:n,center:T,zoomLevel:E,selectedLayer:N,layerIdList:G,excludeLayers:C,mapLegend:P}),e[36]=T,e[37]=C,e[38]=n,e[39]=N,e[40]=G,e[41]=P,e[42]=E,e[43]=z):z=e[43];let V;e[44]!==l?.footnote||e[45]!==l?.source||e[46]!==p||e[47]!==c||e[48]!==o?.footnote||e[49]!==o?.source||e[50]!==r?(V=c||p?s.jsxRuntimeExports.jsx(ye.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:c,footNote:p,width:r}):null,e[44]=l?.footnote,e[45]=l?.source,e[46]=p,e[47]=c,e[48]=o?.footnote,e[49]=o?.source,e[50]=r,e[51]=V):V=e[51];let K;return e[52]!==v||e[53]!==S||e[54]!==O||e[55]!==y||e[56]!==x||e[57]!==D||e[58]!==A||e[59]!==d||e[60]!==ee||e[61]!==te||e[62]!==H||e[63]!==k||e[64]!==z||e[65]!==V||e[66]!==i||e[67]!==r?(K=s.jsxRuntimeExports.jsxs(ie.GraphContainer,{className:ee,style:te,id:O,ref:ae,"aria-label":v,backgroundColor:S,theme:i,language:x,minHeight:D,width:r,height:y,relativeHeight:d,padding:A,children:[H,k,B,z,V]}),e[52]=v,e[53]=S,e[54]=O,e[55]=y,e[56]=x,e[57]=D,e[58]=A,e[59]=d,e[60]=ee,e[61]=te,e[62]=H,e[63]=k,e[64]=z,e[65]=V,e[66]=i,e[67]=r,e[68]=K):K=e[68],K}function De(a){return a.layerID}function Re(a){return{label:a.name,value:a.layerID}}exports.GeoHubMapWithLayerSelection=Se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),me=require("./index-BS2TADPj.cjs"),le=require("./DropdownSelect-NNpOs7DX.cjs"),de=require("./Source-24M277ZQ.cjs"),U=require("maplibre-gl"),pe=require("pmtiles");;/* empty css */const ne=require("./fetchAndParseData-QTF6tjij.cjs"),se=require("./filterData-T5DQBE9b.cjs"),fe=require("./string2HTML-xx9MzTtY.cjs"),ge=require("./index-sbKVyHS2.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),xe=require("./select-Bnfk0lJx.cjs"),he=require("./GraphHeader.cjs"),ye=require("./GraphFooter.cjs");function be(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const m=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,m.get?m:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const je=be(pe);function ve(a){const e=s.compilerRuntimeExports.c(25),{mapStyle:n,center:m,zoomLevel:y,selectedLayer:r,layerIdList:d,excludeLayers:c,mapLegend:f}=a,[p,A]=u.useState(0),[R,T]=u.useState(0),[E,O]=u.useState(!0),[b,W]=u.useState(void 0),_=u.useRef(null),t=u.useRef(null),g=u.useRef(null);let v,L;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const i=new ResizeObserver(h=>{A(h[0].target.clientWidth||620),T(h[0].target.clientHeight||480)});return _.current&&i.observe(_.current),()=>i.disconnect()},L=[],e[0]=v,e[1]=L):(v=e[0],L=e[1]),u.useEffect(v,L);let o,l;e[2]!==m||e[3]!==c||e[4]!==d||e[5]!==n||e[6]!==r||e[7]!==p||e[8]!==y?(o=()=>{t.current&&p&&!g.current&&ne.fetchAndParseJSON(n).then(i=>{W(i),xe.select(t.current).selectAll("div").remove();const C=new je.Protocol;U.addProtocol("pmtiles",C.tile);const w={container:t.current,style:{...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(q=>r.indexOf(q)===-1)]}])},attributionControl:!0};m&&(w.center=m),y&&(w.zoom=y),g.current=new U.Map(w),g.current.addControl(new U.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),g.current.addControl(new U.ScaleControl,"bottom-left")})},l=[p,m,y,d,n,c,r],e[2]=m,e[3]=c,e[4]=d,e[5]=n,e[6]=r,e[7]=p,e[8]=y,e[9]=o,e[10]=l):(o=e[9],l=e[10]),u.useEffect(o,l);let j,S;e[11]!==c||e[12]!==d||e[13]!==n||e[14]!==b||e[15]!==r?(j=()=>{if(g.current)if(b){const i={...b,layers:se.filterData(b.layers,[{column:"id",excludeValues:[...c,...d.filter(h=>r.indexOf(h)===-1)]}])};g.current.setStyle(i)}else ne.fetchAndParseJSON(n).then(i=>{const h={...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(C=>r.indexOf(C)===-1)]}])};g.current.setStyle(h)})},S=[c,d,n,b,r],e[11]=c,e[12]=d,e[13]=n,e[14]=b,e[15]=r,e[16]=j,e[17]=S):(j=e[16],S=e[17]),u.useEffect(j,S);let x;e[18]!==f||e[19]!==E||e[20]!==R||e[21]!==p?(x=p&&R?s.jsxRuntimeExports.jsxs("div",{style:{width:p,height:R},children:[s.jsxRuntimeExports.jsx("div",{ref:t,className:"map maplibre-show-control w-full h-full"}),f?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:E?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{O(!1)},children:s.jsxRuntimeExports.jsx(ge.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof f=="string"?{__html:fe.string2HTML(f)}:void 0,children:u.isValidElement(f)?f:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{O(!0)},children:s.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"})})}):null]}):null,e[18]=f,e[19]=E,e[20]=R,e[21]=p,e[22]=x):x=e[22];let D;return e[23]!==x?(D=s.jsxRuntimeExports.jsx(ie.GraphArea,{ref:_,children:x}),e[23]=x,e[24]=D):D=e[24],D}function Se(a){const e=s.compilerRuntimeExports.c(69),{mapStyle:n,graphTitle:m,height:y,width:r,relativeHeight:d,sources:c,graphDescription:f,footNote:p,padding:A,backgroundColor:R,center:T,zoomLevel:E,graphID:O,language:b,minHeight:W,theme:_,layerSelection:t,excludeLayers:g,ariaLabel:v,uiMode:L,styles:o,classNames:l,mapLegend:j}=a,S=R===void 0?!1:R,x=b===void 0?"en":b,D=W===void 0?0:W,i=_===void 0?"light":_;let h;e[0]!==g?(h=g===void 0?[]:g,e[0]=g,e[1]=h):h=e[1];const C=h,w=L===void 0?"normal":L;let q;e[2]!==j?(q=j===void 0?[]:j,e[2]=j,e[3]=q):q=e[3];const Y=q,[N,oe]=u.useState(t[0].layerID),ae=u.useRef(null);let F;e[4]!==t[0].layerID?(F=()=>{oe(t[0].layerID)},e[4]=t[0].layerID,e[5]=F):F=e[5];let $;e[6]!==t?($=[t],e[6]=t,e[7]=$):$=e[7],u.useEffect(F,$);let J;e[8]===Symbol.for("react.memo_cache_sentinel")?(J={ignoreCase:!0,ignoreAccents:!0,trim:!0},e[8]=J):J=e[8];const ce=J,ee=l?.graphContainer,te=o?.graphContainer;let H;e[9]!==l?.description||e[10]!==l?.title||e[11]!==f||e[12]!==m||e[13]!==o?.description||e[14]!==o?.title||e[15]!==r?(H=m||f?s.jsxRuntimeExports.jsx(he.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:l?.title,description:l?.description},graphTitle:m,graphDescription:f,width:r}):null,e[9]=l?.description,e[10]=l?.title,e[11]=f,e[12]=m,e[13]=o?.description,e[14]=o?.title,e[15]=r,e[16]=H):H=e[16];let I;e[17]!==t?(I=t.map(Re),e[17]=t,e[18]=I):I=e[18];const re=x==="he"||x==="ar";let X;e[19]===Symbol.for("react.memo_cache_sentinel")?(X=le.Du(ce),e[19]=X):X=e[19];let M;e[20]!==t[0].layerID||e[21]!==t[0].name?(M={label:t[0].name,value:t[0].layerID},e[20]=t[0].layerID,e[21]=t[0].name,e[22]=M):M=e[22];let Z;e[23]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{Q&&oe(Q.value)},e[23]=Z):Z=e[23];let k;e[24]!==I||e[25]!==re||e[26]!==M||e[27]!==w?(k=s.jsxRuntimeExports.jsx(le.ja,{options:I,size:"sm",isClearable:!1,variant:w,isRtl:re,isSearchable:!0,filterOption:X,defaultValue:M,controlShouldRenderValue:!0,onChange:Z}),e[24]=I,e[25]=re,e[26]=M,e[27]=w,e[28]=k):k=e[28];let B;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxRuntimeExports.jsx(de.n,{size:"lg"}),e[29]=B):B=e[29];let G;e[30]!==t?(G=me.flattenDeep(t.map(De)),e[30]=t,e[31]=G):G=e[31];let P;e[32]!==t||e[33]!==Y||e[34]!==N?(P=Y.find(Q=>Q.mapStyleName===t.find(ue=>ue.layerID===N)?.name)?.legend,e[32]=t,e[33]=Y,e[34]=N,e[35]=P):P=e[35];let z;e[36]!==T||e[37]!==C||e[38]!==n||e[39]!==N||e[40]!==G||e[41]!==P||e[42]!==E?(z=s.jsxRuntimeExports.jsx(ve,{mapStyle:n,center:T,zoomLevel:E,selectedLayer:N,layerIdList:G,excludeLayers:C,mapLegend:P}),e[36]=T,e[37]=C,e[38]=n,e[39]=N,e[40]=G,e[41]=P,e[42]=E,e[43]=z):z=e[43];let V;e[44]!==l?.footnote||e[45]!==l?.source||e[46]!==p||e[47]!==c||e[48]!==o?.footnote||e[49]!==o?.source||e[50]!==r?(V=c||p?s.jsxRuntimeExports.jsx(ye.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:c,footNote:p,width:r}):null,e[44]=l?.footnote,e[45]=l?.source,e[46]=p,e[47]=c,e[48]=o?.footnote,e[49]=o?.source,e[50]=r,e[51]=V):V=e[51];let K;return e[52]!==v||e[53]!==S||e[54]!==O||e[55]!==y||e[56]!==x||e[57]!==D||e[58]!==A||e[59]!==d||e[60]!==ee||e[61]!==te||e[62]!==H||e[63]!==k||e[64]!==z||e[65]!==V||e[66]!==i||e[67]!==r?(K=s.jsxRuntimeExports.jsxs(ie.GraphContainer,{className:ee,style:te,id:O,ref:ae,"aria-label":v,backgroundColor:S,theme:i,language:x,minHeight:D,width:r,height:y,relativeHeight:d,padding:A,children:[H,k,B,z,V]}),e[52]=v,e[53]=S,e[54]=O,e[55]=y,e[56]=x,e[57]=D,e[58]=A,e[59]=d,e[60]=ee,e[61]=te,e[62]=H,e[63]=k,e[64]=z,e[65]=V,e[66]=i,e[67]=r,e[68]=K):K=e[68],K}function De(a){return a.layerID}function Re(a){return{label:a.name,value:a.layerID}}exports.GeoHubMapWithLayerSelection=Se;
2
2
  //# sourceMappingURL=GeoHubMapWithLayerSelection.cjs.map
@@ -2,7 +2,7 @@ import { c as ne, j as s } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import de, { useState as T, useRef as Y, useEffect as ee } from "react";
3
3
  import { f as ue } from "./index-EArKRVKg.js";
4
4
  import { D as pe, j as ge } from "./DropdownSelect-D8rFbygC.js";
5
- import { n as he } from "./Source-_STIejqs.js";
5
+ import { n as he } from "./Source-Cu9OHOBj.js";
6
6
  import U from "maplibre-gl";
7
7
  import * as ye from "pmtiles";
8
8
  /* empty css */
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("./Typography-DrJ7IOdw.cjs"),c=require("react");function p(l){const e=o.compilerRuntimeExports.c(10),{text:r,style:i,className:n}=l;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[0]!==n?(t=o.mo("text-primary-gray-550 dark:text-primary-gray-400",n),e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t||e[4]!==r?(s=o.jsxRuntimeExports.jsx(a._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph description",style:i,children:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=s):s=e[5],s}if(c.isValidElement(r)){let t;return e[6]!==n||e[7]!==i||e[8]!==r?(t=o.jsxRuntimeExports.jsx("div",{className:n,style:i,children:r}),e[6]=n,e[7]=i,e[8]=r,e[9]=t):t=e[9],t}return console.error("GraphDescription: Invalid text type. Expected string or React element."),null}exports.GraphDescription=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("./Typography-Cc_iHQB-.cjs"),c=require("react");function p(l){const e=o.compilerRuntimeExports.c(10),{text:r,style:i,className:n}=l;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[0]!==n?(t=o.mo("text-primary-gray-550 dark:text-primary-gray-400",n),e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t||e[4]!==r?(s=o.jsxRuntimeExports.jsx(a._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph description",style:i,children:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=s):s=e[5],s}if(c.isValidElement(r)){let t;return e[6]!==n||e[7]!==i||e[8]!==r?(t=o.jsxRuntimeExports.jsx("div",{className:n,style:i,children:r}),e[6]=n,e[7]=i,e[8]=r,e[9]=t):t=e[9],t}return console.error("GraphDescription: Invalid text type. Expected string or React element."),null}exports.GraphDescription=p;
2
2
  //# sourceMappingURL=GraphDescription.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { c as a, m, j as l } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { _ as p } from "./Typography-iR8PEgdt.js";
2
+ import { _ as p } from "./Typography-CdMGooqp.js";
3
3
  import c from "react";
4
4
  function d(o) {
5
5
  const e = a.c(10), {