@undp/data-viz 2.3.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) 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 +2 -2
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.js +15 -15
  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.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +202 -202
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.js +2 -2
  15. package/dist/ButterflyChart.cjs +1 -1
  16. package/dist/ButterflyChart.js +2 -2
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +33 -33
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +2 -2
  23. package/dist/ColorLegend.cjs +1 -1
  24. package/dist/ColorLegend.js +7 -7
  25. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  26. package/dist/ColorLegendWithMouseOver.js +1 -1
  27. package/dist/CopyTextButton.cjs +1 -1
  28. package/dist/CopyTextButton.js +1 -1
  29. package/dist/CsvDownloadButton.cjs +2 -2
  30. package/dist/CsvDownloadButton.js +1 -1
  31. package/dist/DataCards.cjs +1 -1
  32. package/dist/DataCards.js +3 -3
  33. package/dist/DataCards.js.map +1 -1
  34. package/dist/DataTable.cjs +1 -1
  35. package/dist/DataTable.js +2 -2
  36. package/dist/DifferenceLineChart.cjs +1 -1
  37. package/dist/DifferenceLineChart.js +1 -1
  38. package/dist/DonutChart.cjs +1 -1
  39. package/dist/DonutChart.js +20 -20
  40. package/dist/DotDensityMap.cjs +1 -1
  41. package/dist/DotDensityMap.cjs.map +1 -1
  42. package/dist/DotDensityMap.js +46 -46
  43. package/dist/DotDensityMap.js.map +1 -1
  44. package/dist/DualAxisLineChart.cjs +1 -1
  45. package/dist/DualAxisLineChart.js +1 -1
  46. package/dist/DumbbellChart.cjs +1 -1
  47. package/dist/DumbbellChart.js +2 -2
  48. package/dist/{EmptyState-CGeBqbmR.cjs → EmptyState-DX0t62iF.cjs} +2 -2
  49. package/dist/{EmptyState-CGeBqbmR.cjs.map → EmptyState-DX0t62iF.cjs.map} +1 -1
  50. package/dist/{EmptyState-tZBErBKF.js → EmptyState-Pj-emXt5.js} +3 -3
  51. package/dist/{EmptyState-tZBErBKF.js.map → EmptyState-Pj-emXt5.js.map} +1 -1
  52. package/dist/ExcelDownloadButton.cjs +1 -1
  53. package/dist/ExcelDownloadButton.js +7 -7
  54. package/dist/FootNote.cjs +1 -1
  55. package/dist/FootNote.js +1 -1
  56. package/dist/GeoHubCompareMaps.cjs +1 -1
  57. package/dist/GeoHubCompareMaps.js +1 -1
  58. package/dist/GeoHubMap.cjs +1 -1
  59. package/dist/GeoHubMap.js +1 -1
  60. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.js +2 -2
  62. package/dist/GraphDescription.cjs +1 -1
  63. package/dist/GraphDescription.js +1 -1
  64. package/dist/{GraphEl-ic8C5Ksc.cjs → GraphEl-CWjTuiYd.cjs} +2 -2
  65. package/dist/{GraphEl-ic8C5Ksc.cjs.map → GraphEl-CWjTuiYd.cjs.map} +1 -1
  66. package/dist/{GraphEl-L5hNe7wJ.js → GraphEl-DDXkYObU.js} +7 -7
  67. package/dist/{GraphEl-L5hNe7wJ.js.map → GraphEl-DDXkYObU.js.map} +1 -1
  68. package/dist/GraphFooter.cjs +1 -1
  69. package/dist/GraphFooter.js +1 -1
  70. package/dist/GraphTitle.cjs +1 -1
  71. package/dist/GraphTitle.js +1 -1
  72. package/dist/GriddedGraphs.cjs +1 -1
  73. package/dist/GriddedGraphs.js +1 -1
  74. package/dist/HeatMap.cjs +1 -1
  75. package/dist/HeatMap.js +1 -1
  76. package/dist/Histogram.cjs +1 -1
  77. package/dist/Histogram.js +1 -1
  78. package/dist/HybridMap.cjs +1 -1
  79. package/dist/HybridMap.cjs.map +1 -1
  80. package/dist/HybridMap.js +42 -42
  81. package/dist/HybridMap.js.map +1 -1
  82. package/dist/ImageDownloadButton.cjs +1 -1
  83. package/dist/ImageDownloadButton.js +1 -1
  84. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  85. package/dist/LineChartWithConfidenceInterval.js +1 -1
  86. package/dist/LinearColorLegend.cjs +1 -1
  87. package/dist/LinearColorLegend.js +1 -1
  88. package/dist/MultiLineAltChart.cjs +1 -1
  89. package/dist/MultiLineAltChart.js +1 -1
  90. package/dist/MultiLineChart.cjs +1 -1
  91. package/dist/MultiLineChart.js +1 -1
  92. package/dist/ParetoChart.cjs +1 -1
  93. package/dist/ParetoChart.js +1 -1
  94. package/dist/RadarChart.cjs +1 -1
  95. package/dist/RadarChart.js +1 -1
  96. package/dist/SVGDownloadButton.cjs +1 -1
  97. package/dist/SVGDownloadButton.js +8 -8
  98. package/dist/SankeyChart.cjs +1 -1
  99. package/dist/SankeyChart.js +80 -80
  100. package/dist/ScatterPlot.cjs +1 -1
  101. package/dist/ScatterPlot.js +2 -2
  102. package/dist/SimpleLineChart.cjs +1 -1
  103. package/dist/SimpleLineChart.js +1 -1
  104. package/dist/SingleGraphDashboard.cjs +1 -1
  105. package/dist/SingleGraphDashboard.js +1 -1
  106. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  107. package/dist/SingleGraphDashboardGeoHubMaps.js +10 -10
  108. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  109. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  110. package/dist/SlopeChart.cjs +1 -1
  111. package/dist/SlopeChart.js +1 -1
  112. package/dist/{Source-B5AoSlsi.cjs → Source-B3i0Bx2R.cjs} +2 -2
  113. package/dist/{Source-B5AoSlsi.cjs.map → Source-B3i0Bx2R.cjs.map} +1 -1
  114. package/dist/{Source-F8EYCYkV.js → Source-_STIejqs.js} +14 -14
  115. package/dist/{Source-F8EYCYkV.js.map → Source-_STIejqs.js.map} +1 -1
  116. package/dist/Source.cjs +1 -1
  117. package/dist/Source.js +2 -2
  118. package/dist/StatCardFromData.cjs +1 -1
  119. package/dist/StatCardFromData.js +12 -12
  120. package/dist/StripChart.cjs +1 -1
  121. package/dist/StripChart.js +1 -1
  122. package/dist/ThreeDGlobe.cjs +1 -1
  123. package/dist/ThreeDGlobe.js +2 -2
  124. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  125. package/dist/ThresholdColorLegendWithMouseOver.js +10 -10
  126. package/dist/TreeMapGraph.cjs +1 -1
  127. package/dist/TreeMapGraph.js +29 -29
  128. package/dist/Typography-DrJ7IOdw.cjs +2 -0
  129. package/dist/Typography-DrJ7IOdw.cjs.map +1 -0
  130. package/dist/Typography-iR8PEgdt.js +263 -0
  131. package/dist/Typography-iR8PEgdt.js.map +1 -0
  132. package/dist/UnitChart.cjs +1 -1
  133. package/dist/UnitChart.js +25 -25
  134. package/dist/WaterfallChart.cjs +1 -1
  135. package/dist/WaterfallChart.js +1 -1
  136. package/dist/{index-BQYOuXdl.js → index-B-4y_iGB.js} +19 -17
  137. package/dist/index-B-4y_iGB.js.map +1 -0
  138. package/dist/{index-D5ihtaJJ.js → index-BE-lvE4c.js} +3 -3
  139. package/dist/{index-D5ihtaJJ.js.map → index-BE-lvE4c.js.map} +1 -1
  140. package/dist/{index-Dgjq6aZ2.cjs → index-DlrGwLQA.cjs} +2 -2
  141. package/dist/{index-Dgjq6aZ2.cjs.map → index-DlrGwLQA.cjs.map} +1 -1
  142. package/dist/index-sbKVyHS2.cjs +2 -0
  143. package/dist/index-sbKVyHS2.cjs.map +1 -0
  144. package/dist/index.cjs +1 -1
  145. package/dist/index.js +2 -2
  146. package/dist/style.css +1 -1
  147. package/package.json +3 -3
  148. package/dist/Typography-hWfh3H0J.js +0 -142
  149. package/dist/Typography-hWfh3H0J.js.map +0 -1
  150. package/dist/Typography-sa1UE0oF.cjs +0 -2
  151. package/dist/Typography-sa1UE0oF.cjs.map +0 -1
  152. package/dist/index-BQYOuXdl.js.map +0 -1
  153. package/dist/index-C6er0ety.cjs +0 -2
  154. package/dist/index-C6er0ety.cjs.map +0 -1
@@ -14,7 +14,7 @@ import { A as ne } from "./index-CtMBjvtq.js";
14
14
  import { GraphFooter as re } from "./GraphFooter.js";
15
15
  import { GraphHeader as ae } from "./GraphHeader.js";
16
16
  import { ColorLegendWithMouseOver as se } from "./ColorLegendWithMouseOver.js";
17
- import { E as ce } from "./EmptyState-tZBErBKF.js";
17
+ import { E as ce } from "./EmptyState-Pj-emXt5.js";
18
18
  import { u as Kt } from "./uniqBy-BHy4I8PK.js";
19
19
  import { a as fe, G as ue } from "./GraphContainer-CF6ws3pd.js";
20
20
  function me(e) {
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),j=require("./Typography-sa1UE0oF.cjs"),d=require("react"),h=r.j("h-0 w-full",{variants:{size:{xs:"py-px",sm:"py-[2px]",base:"py-1",lg:"py-1.5",xl:"py-2","2xl":"py-3","3xl":"py-4","4xl":"py-5","5xl":"py-6","6xl":"py-8","7xl":"py-10","8xl":"py-12","9xl":"py-20"}},defaultVariants:{size:"base"}}),f=d.forwardRef((p,e)=>{const s=r._.c(11);let a,t,l;s[0]!==p?({className:a,size:l,...t}=p,s[0]=p,s[1]=a,s[2]=t,s[3]=l):(a=s[1],t=s[2],l=s[3]);let n;s[4]!==a||s[5]!==l?(n=r.mo(h({size:l}),a),s[4]=a,s[5]=l,s[6]=n):n=s[6];let i;return s[7]!==t||s[8]!==e||s[9]!==n?(i=r.ae.jsx("div",{...t,className:n,ref:e}),s[7]=t,s[8]=e,s[9]=n,s[10]=i):i=s[10],i});f.displayName="Spacer";function E(p){const e=r.compilerRuntimeExports.c(16),{sources:s,style:a,className:t}=p;let l;e[0]!==a?(l=a===void 0?{}:a,e[0]=a,e[1]=l):l=e[1];const n=l;let i;e[2]!==t?(i=r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),e[2]=t,e[3]=i):i=e[3];let o;if(e[4]!==t||e[5]!==s){let y;e[7]!==t?(y=(u,g)=>r.jsxRuntimeExports.jsx("span",{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),style:{fontFamily:"inherit"},children:u.link?r.jsxRuntimeExports.jsx(j.q,{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),href:u.link,target:"_blank",rel:"noreferrer",children:u.source}):u.source},g),e[7]=t,e[8]=y):y=e[8],o=s.map(y),e[4]=t,e[5]=s,e[6]=o}else o=e[6];let x;e[9]!==n||e[10]!==i||e[11]!==o?(x=r.jsxRuntimeExports.jsxs(j.j,{size:"sm",marginBottom:"none","aria-label":"Data sources",className:i,style:n,children:["Source:"," ",o]}),e[9]=n,e[10]=i,e[11]=o,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxRuntimeExports.jsx(f,{size:"base"}),e[13]=m):m=e[13];let c;return e[14]!==x?(c=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[x,m]}),e[14]=x,e[15]=c):c=e[15],c}exports.Source=E;exports.n=f;
2
- //# sourceMappingURL=Source-B5AoSlsi.cjs.map
1
+ "use strict";const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),j=require("./Typography-DrJ7IOdw.cjs"),d=require("react"),h=r.j("h-0 w-full",{variants:{size:{xs:"py-px",sm:"py-[2px]",base:"py-1",lg:"py-1.5",xl:"py-2","2xl":"py-3","3xl":"py-4","4xl":"py-5","5xl":"py-6","6xl":"py-8","7xl":"py-10","8xl":"py-12","9xl":"py-20"}},defaultVariants:{size:"base"}}),f=d.forwardRef((p,e)=>{const s=r._.c(11);let a,t,l;s[0]!==p?({className:a,size:l,...t}=p,s[0]=p,s[1]=a,s[2]=t,s[3]=l):(a=s[1],t=s[2],l=s[3]);let n;s[4]!==a||s[5]!==l?(n=r.mo(h({size:l}),a),s[4]=a,s[5]=l,s[6]=n):n=s[6];let i;return s[7]!==t||s[8]!==e||s[9]!==n?(i=r.ae.jsx("div",{...t,className:n,ref:e}),s[7]=t,s[8]=e,s[9]=n,s[10]=i):i=s[10],i});f.displayName="Spacer";function E(p){const e=r.compilerRuntimeExports.c(16),{sources:s,style:a,className:t}=p;let l;e[0]!==a?(l=a===void 0?{}:a,e[0]=a,e[1]=l):l=e[1];const n=l;let i;e[2]!==t?(i=r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),e[2]=t,e[3]=i):i=e[3];let o;if(e[4]!==t||e[5]!==s){let y;e[7]!==t?(y=(u,g)=>r.jsxRuntimeExports.jsx("span",{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),style:{fontFamily:"inherit"},children:u.link?r.jsxRuntimeExports.jsx(j.J,{className:r.mo("text-primary-gray-550 dark:text-primary-gray-400",t),href:u.link,target:"_blank",rel:"noreferrer",children:u.source}):u.source},g),e[7]=t,e[8]=y):y=e[8],o=s.map(y),e[4]=t,e[5]=s,e[6]=o}else o=e[6];let x;e[9]!==n||e[10]!==i||e[11]!==o?(x=r.jsxRuntimeExports.jsxs(j._,{size:"sm",marginBottom:"none","aria-label":"Data sources",className:i,style:n,children:["Source:"," ",o]}),e[9]=n,e[10]=i,e[11]=o,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxRuntimeExports.jsx(f,{size:"base"}),e[13]=m):m=e[13];let c;return e[14]!==x?(c=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[x,m]}),e[14]=x,e[15]=c):c=e[15],c}exports.Source=E;exports.n=f;
2
+ //# sourceMappingURL=Source-B3i0Bx2R.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Source-B5AoSlsi.cjs","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Source-B3i0Bx2R.cjs","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
- import { _ as g, m as u, a as h, b, c as N, j as p } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { q as k, j as z } from "./Typography-hWfh3H0J.js";
3
- import _ from "react";
1
+ import { _ as j, m as u, a as h, b as _, c as b, j as p } from "./index-CHPV5EwG-DecW7_qr.js";
2
+ import { J as N, _ as k } from "./Typography-iR8PEgdt.js";
3
+ import z from "react";
4
4
  const S = h("h-0 w-full", {
5
5
  variants: {
6
6
  size: {
@@ -22,8 +22,8 @@ const S = h("h-0 w-full", {
22
22
  defaultVariants: {
23
23
  size: "base"
24
24
  }
25
- }), j = _.forwardRef((n, e) => {
26
- const s = g.c(11);
25
+ }), d = z.forwardRef((n, e) => {
26
+ const s = j.c(11);
27
27
  let t, a, r;
28
28
  s[0] !== n ? ({
29
29
  className: t,
@@ -35,11 +35,11 @@ const S = h("h-0 w-full", {
35
35
  size: r
36
36
  }), t), s[4] = t, s[5] = r, s[6] = i) : i = s[6];
37
37
  let l;
38
- return s[7] !== a || s[8] !== e || s[9] !== i ? (l = /* @__PURE__ */ b.jsx("div", { ...a, className: i, ref: e }), s[7] = a, s[8] = e, s[9] = i, s[10] = l) : l = s[10], l;
38
+ return s[7] !== a || s[8] !== e || s[9] !== i ? (l = /* @__PURE__ */ _.jsx("div", { ...a, className: i, ref: e }), s[7] = a, s[8] = e, s[9] = i, s[10] = l) : l = s[10], l;
39
39
  });
40
- j.displayName = "Spacer";
40
+ d.displayName = "Spacer";
41
41
  function E(n) {
42
- const e = N.c(16), {
42
+ const e = b.c(16), {
43
43
  sources: s,
44
44
  style: t,
45
45
  className: a
@@ -52,19 +52,19 @@ function E(n) {
52
52
  let m;
53
53
  if (e[4] !== a || e[5] !== s) {
54
54
  let x;
55
- e[7] !== a ? (x = (f, d) => /* @__PURE__ */ p.jsx("span", { className: u("text-primary-gray-550 dark:text-primary-gray-400", a), style: {
55
+ e[7] !== a ? (x = (f, g) => /* @__PURE__ */ p.jsx("span", { className: u("text-primary-gray-550 dark:text-primary-gray-400", a), style: {
56
56
  fontFamily: "inherit"
57
- }, children: f.link ? /* @__PURE__ */ p.jsx(k, { className: u("text-primary-gray-550 dark:text-primary-gray-400", a), href: f.link, target: "_blank", rel: "noreferrer", children: f.source }) : f.source }, d), e[7] = a, e[8] = x) : x = e[8], m = s.map(x), e[4] = a, e[5] = s, e[6] = m;
57
+ }, children: f.link ? /* @__PURE__ */ p.jsx(N, { className: u("text-primary-gray-550 dark:text-primary-gray-400", a), href: f.link, target: "_blank", rel: "noreferrer", children: f.source }) : f.source }, g), e[7] = a, e[8] = x) : x = e[8], m = s.map(x), e[4] = a, e[5] = s, e[6] = m;
58
58
  } else
59
59
  m = e[6];
60
60
  let o;
61
- e[9] !== i || e[10] !== l || e[11] !== m ? (o = /* @__PURE__ */ p.jsxs(z, { size: "sm", marginBottom: "none", "aria-label": "Data sources", className: l, style: i, children: [
61
+ e[9] !== i || e[10] !== l || e[11] !== m ? (o = /* @__PURE__ */ p.jsxs(k, { size: "sm", marginBottom: "none", "aria-label": "Data sources", className: l, style: i, children: [
62
62
  "Source:",
63
63
  " ",
64
64
  m
65
65
  ] }), e[9] = i, e[10] = l, e[11] = m, e[12] = o) : o = e[12];
66
66
  let y;
67
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ p.jsx(j, { size: "base" }), e[13] = y) : y = e[13];
67
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ p.jsx(d, { size: "base" }), e[13] = y) : y = e[13];
68
68
  let c;
69
69
  return e[14] !== o ? (c = /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
70
70
  o,
@@ -73,6 +73,6 @@ function E(n) {
73
73
  }
74
74
  export {
75
75
  E as S,
76
- j as n
76
+ d as n
77
77
  };
78
- //# sourceMappingURL=Source-F8EYCYkV.js.map
78
+ //# sourceMappingURL=Source-_STIejqs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Source-F8EYCYkV.js","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":";;;AAKK,MAACA,IAAIC,EAAE,cAAc;AAAA,EACxB,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACb;AAAA,EACA;AAAA,EACE,iBAAiB;AAAA,IACf,MAAM;AAAA,EACV;AACA,CAAC,GAAGC,IAAIC,EAAE,WAAW,CAACC,GAAGC,MAAM;AAC7B,QAAM,IAAIC,EAAE,EAAE,EAAE;AAChB,MAAIC,GAAGC,GAAGC;AACV,IAAE,CAAC,MAAML,KAAK;AAAA,IACZ,WAAWG;AAAA,IACX,MAAME;AAAA,IACN,GAAGD;AAAA,EACP,IAAMJ,GAAG,EAAE,CAAC,IAAIA,GAAG,EAAE,CAAC,IAAIG,GAAG,EAAE,CAAC,IAAIC,GAAG,EAAE,CAAC,IAAIC,MAAMF,IAAI,EAAE,CAAC,GAAGC,IAAI,EAAE,CAAC,GAAGC,IAAI,EAAE,CAAC;AAC7E,MAAIC;AACJ,IAAE,CAAC,MAAMH,KAAK,EAAE,CAAC,MAAME,KAAKC,IAAIC,EAAEX,EAAE;AAAA,IAClC,MAAMS;AAAA,EACV,CAAG,GAAGF,CAAC,GAAG,EAAE,CAAC,IAAIA,GAAG,EAAE,CAAC,IAAIE,GAAG,EAAE,CAAC,IAAIC,KAAKA,IAAI,EAAE,CAAC;AAC/C,MAAIE;AACJ,SAAO,EAAE,CAAC,MAAMJ,KAAK,EAAE,CAAC,MAAMH,KAAK,EAAE,CAAC,MAAMK,KAAKE,IAAoBC,gBAAAA,EAAE,IAAI,OAAO,EAAE,GAAGL,GAAG,WAAWE,GAAG,KAAKL,GAAG,GAAG,EAAE,CAAC,IAAIG,GAAG,EAAE,CAAC,IAAIH,GAAG,EAAE,CAAC,IAAIK,GAAG,EAAE,EAAE,IAAIE,KAAKA,IAAI,EAAE,EAAE,GAAGA;AAC3K,CAAC;AACDV,EAAE,cAAc;AC7BT,SAAAY,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,SAAAA;AAAAA,IAAAC,OAAAC;AAAAA,IAAAC,WAAAA;AAAAA,EAAAA,IAA2CN;AAAM,MAAAO;AAAA,EAAAN,SAAAI,KAAhCE,IAAAF,MAAAG,SAAA,CAAA,IAAAH,GAAUJ,OAAAI,GAAAJ,OAAAM,KAAAA,IAAAN,EAAA,CAAA;AAAV,QAAAG,IAAAG;AAAU,MAAAE;AAAA,EAAAR,SAAAK,KAOVG,IAAAC,EAAG,oDAAoDJ,CAAS,GAACL,OAAAK,GAAAL,OAAAQ,KAAAA,IAAAR,EAAA,CAAA;AAAA,MAAAU;AAAA,MAAAV,EAAA,CAAA,MAAAK,KAAAL,SAAAE,GAAA;AAAA,QAAAS;AAAA,IAAAX,SAAAK,KAI/DM,IAAAA,CAAAC,GAAAvB,MACXwB,gBAAAA,EAAAA,IAAA,QAAA,EAEa,WAAAJ,EAAG,oDAAoDJ,CAAS,GACpE,OAAA;AAAA,MAAAS,YAAc;AAAA,IAAA,GAEpBF,YAACG,OACAF,gBAAAA,EAAAA,IAACG,KACY,WAAAP,EAAG,oDAAoDJ,CAAS,GACrE,MAAAO,EAACG,MACA,QAAA,UACH,KAAA,cAEHH,YAACK,OAAAA,CACJ,IAEAL,EAACK,OAAAA,GAdE5B,CAgBP,GACDW,OAAAK,GAAAL,OAAAW,KAAAA,IAAAX,EAAA,CAAA,GAnBAU,IAAAR,EAAOgB,IAAKP,CAmBZ,GAACX,OAAAK,GAAAL,OAAAE,GAAAF,OAAAU;AAAAA,EAAA;AAAAA,IAAAA,IAAAV,EAAA,CAAA;AAAA,MAAAW;AAAA,EAAAX,EAAA,CAAA,MAAAG,KAAAH,UAAAQ,KAAAR,EAAA,EAAA,MAAAU,KA3BJC,IAAAQ,gBAAAA,EAAAA,KAACC,GAAA,EACM,MAAA,MACQ,cAAA,QACF,cAAA,gBACA,WAAAZ,GACJL,OAAAA,GACR,UAAA;AAAA,IAAA;AAAA,IACS;AAAA,IACPO;AAAAA,EAAAA,GAoBH,GAAIV,OAAAG,GAAAH,QAAAQ,GAAAR,QAAAU,GAAAV,QAAAW,KAAAA,IAAAX,EAAA,EAAA;AAAA,MAAAqB;AAAA,EAAArB,EAAA,EAAA,MAAAsB,uBAAAC,IAAA,2BAAA,KACJF,0BAACG,GAAA,EAAY,MAAA,OAAA,CAAM,GAAGxB,QAAAqB,KAAAA,IAAArB,EAAA,EAAA;AAAA,MAAAyB;AAAA,SAAAzB,UAAAW,KA9BxBc,yCACEd,UAAAA;AAAAA,IAAAA;AAAAA,IA6BAU;AAAAA,EAAAA,GAAsB,GACrBrB,QAAAW,GAAAX,QAAAyB,KAAAA,IAAAzB,EAAA,EAAA,GA/BHyB;AA+BG;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Source-_STIejqs.js","sources":["../node_modules/@undp/design-system-react/dist/Spacer.js","../src/Components/Typography/Source.tsx"],"sourcesContent":["import { j as o } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as m } from \"./compiler-runtime-Cu50tn6L.js\";\nimport x from \"react\";\nimport { c } from \"./index-CHPV5EwG.js\";\nimport { c as y } from \"./utils-D_Pof5Gy.js\";\nconst f = c(\"h-0 w-full\", {\n variants: {\n size: {\n xs: \"py-px\",\n sm: \"py-[2px]\",\n base: \"py-1\",\n lg: \"py-1.5\",\n xl: \"py-2\",\n \"2xl\": \"py-3\",\n \"3xl\": \"py-4\",\n \"4xl\": \"py-5\",\n \"5xl\": \"py-6\",\n \"6xl\": \"py-8\",\n \"7xl\": \"py-10\",\n \"8xl\": \"py-12\",\n \"9xl\": \"py-20\"\n }\n },\n defaultVariants: {\n size: \"base\"\n }\n}), n = x.forwardRef((r, i) => {\n const s = m.c(11);\n let p, e, a;\n s[0] !== r ? ({\n className: p,\n size: a,\n ...e\n } = r, s[0] = r, s[1] = p, s[2] = e, s[3] = a) : (p = s[1], e = s[2], a = s[3]);\n let l;\n s[4] !== p || s[5] !== a ? (l = y(f({\n size: a\n }), p), s[4] = p, s[5] = a, s[6] = l) : l = s[6];\n let t;\n return s[7] !== e || s[8] !== i || s[9] !== l ? (t = /* @__PURE__ */ o.jsx(\"div\", { ...e, className: l, ref: i }), s[7] = e, s[8] = i, s[9] = l, s[10] = t) : t = s[10], t;\n});\nn.displayName = \"Spacer\";\nexport {\n n as Spacer\n};\n//# sourceMappingURL=Spacer.js.map\n","import { A, P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\n\r\nimport { SourcesDataType } from '@/Types';\r\n\r\ninterface SourceProps {\r\n sources: SourcesDataType[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Source(props: SourceProps) {\r\n const { sources, style = {}, className } = props;\r\n return (\r\n <>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n aria-label='Data sources'\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={style}\r\n >\r\n Source:{' '}\r\n {sources.map((d, i) => (\r\n <span\r\n key={i}\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n style={{ fontFamily: 'inherit' }}\r\n >\r\n {d.link ? (\r\n <A\r\n className={cn('text-primary-gray-550 dark:text-primary-gray-400', className)}\r\n href={d.link}\r\n target='_blank'\r\n rel='noreferrer'\r\n >\r\n {d.source}\r\n </A>\r\n ) : (\r\n d.source\r\n )}\r\n </span>\r\n ))}\r\n </P>\r\n <Spacer size='base' />\r\n </>\r\n );\r\n}\r\n"],"names":["f","c","n","x","r","i","m","p","e","a","l","y","t","o","Source","props","$","_c","sources","style","t0","className","t1","undefined","t2","cn","t3","t4","d","jsx","fontFamily","link","A","source","map","jsxs","P","t5","Symbol","for","Spacer","t6"],"mappings":"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","x_google_ignoreList":[0]}
package/dist/Source.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("./Typography-sa1UE0oF.cjs");const e=require("./Source-B5AoSlsi.cjs");exports.Source=e.Source;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-6v2a2njQ.cjs");require("./Typography-DrJ7IOdw.cjs");const e=require("./Source-B3i0Bx2R.cjs");exports.Source=e.Source;
2
2
  //# sourceMappingURL=Source.cjs.map
package/dist/Source.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index-CHPV5EwG-DecW7_qr.js";
2
- import "./Typography-hWfh3H0J.js";
3
- import { S as t } from "./Source-F8EYCYkV.js";
2
+ import "./Typography-iR8PEgdt.js";
3
+ import { S as t } from "./Source-_STIejqs.js";
4
4
  export {
5
5
  t as Source
6
6
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./index-CSNtgibC.cjs"),nt=require("./Typography-sa1UE0oF.cjs"),rt=require("./GraphFooter.cjs"),ot=require("./GraphHeader.cjs"),g=require("./numberFormattingFunction-02t-wJta.cjs");function st(e){const t=o.compilerRuntimeExports.c(50),{year:f,data:r,graphTitle:m,suffix:W,sources:h,prefix:L,graphDescription:p,footNote:y,padding:P,backgroundColor:I,graphID:G,aggregationMethod:V,language:J,countOnly:x,theme:K,ariaLabel:it,textBackground:Q,headingFontSize:U,centerAlign:X,verticalAlign:Y,layout:Z,styles:n,classNames:i,precision:tt}=e,s=W===void 0?"":W,a=L===void 0?"":L,d=I===void 0?!1:I,l=V===void 0?"count":V,c=J===void 0?"en":J,et=K===void 0?"light":K,k=Q===void 0?!1:Q,S=U===void 0?"4.375rem":U,_=X===void 0?!1:X,w=Y===void 0?"center":Y,$=Z===void 0?"primary":Z,u=tt===void 0?2:tt,M=`${et||"light"} w-full`,T=c==="he"||c==="ar"?"rtl":void 0,q=`${et||"light"} flex flex-col w-full box-border h-full ${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${c||"en"}`,H=i?.graphContainer;let v;t[0]!==q||t[1]!==H?(v=o.mo(q,H),t[0]=q,t[1]=H,t[2]=v):v=t[2];let j;t[3]!==n?.graphContainer?(j=n?.graphContainer||{},t[3]=n?.graphContainer,t[4]=j):j=t[4];let b;t[5]!==d?(b=d&&d!==!0?{backgroundColor:d}:{},t[5]=d,t[6]=b):b=t[6];const z=d?P||"1rem":P||0;let F;t[7]!==j||t[8]!==b||t[9]!==z?(F={...j,...b,padding:z},t[7]=j,t[8]=b,t[9]=z,t[10]=F):F=t[10];const B=it||`${m?`The graph shows ${m}. `:""}This is a statistic card.${p?` ${p}`:""}`,D=`flex flex-col w-full grow ${$!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let N;t[11]!==l||t[12]!==_||t[13]!==i?.description||t[14]!==i?.footnote||t[15]!==i?.source||t[16]!==i?.title||t[17]!==x||t[18]!==r||t[19]!==y||t[20]!==p||t[21]!==m||t[22]!==S||t[23]!==c||t[24]!==$||t[25]!==u||t[26]!==a||t[27]!==h||t[28]!==n?.description||t[29]!==n?.footnote||t[30]!==n?.source||t[31]!==n?.title||t[32]!==s||t[33]!==k||t[34]!==w||t[35]!==f?(N=$!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(nt.$,{marginBottom:"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${k?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(jt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(vt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(yt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ht).filter(ft)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(gt).filter(dt)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]})}),h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(nt.$,{marginBottom:$==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${k?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(xt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(pt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(mt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ct).filter(ut)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(lt).filter(at)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]}),m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}),t[11]=l,t[12]=_,t[13]=i?.description,t[14]=i?.footnote,t[15]=i?.source,t[16]=i?.title,t[17]=x,t[18]=r,t[19]=y,t[20]=p,t[21]=m,t[22]=S,t[23]=c,t[24]=$,t[25]=u,t[26]=a,t[27]=h,t[28]=n?.description,t[29]=n?.footnote,t[30]=n?.source,t[31]=n?.title,t[32]=s,t[33]=k,t[34]=w,t[35]=f,t[36]=N):N=t[36];let E;t[37]!==D||t[38]!==N?(E=o.jsxRuntimeExports.jsx("div",{className:D,children:N}),t[37]=D,t[38]=N,t[39]=E):E=t[39];let R;t[40]!==G||t[41]!==T||t[42]!==v||t[43]!==F||t[44]!==B||t[45]!==E?(R=o.jsxRuntimeExports.jsx("div",{id:G,dir:T,className:v,style:F,"aria-label":B,children:E}),t[40]=G,t[41]=T,t[42]=v,t[43]=F,t[44]=B,t[45]=E,t[46]=R):R=t[46];let A;return t[47]!==M||t[48]!==R?(A=o.jsxRuntimeExports.jsx("div",{className:M,children:R}),t[47]=M,t[48]=R,t[49]=A):A=t[49],A}function at(e){return e!==void 0}function lt(e){return e.value}function ut(e){return e!==void 0}function ct(e){return e.value}function mt(e){return e.value}function pt(e){return e.value}function xt(e){return typeof e.value=="string"}function dt(e){return e!==void 0}function gt(e){return e.value}function ft(e){return e!==void 0}function ht(e){return e.value}function yt(e){return e.value}function vt(e){return e.value}function jt(e){return typeof e.value=="string"}exports.StatCardFromData=st;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("./index-CSNtgibC.cjs"),nt=require("./Typography-DrJ7IOdw.cjs"),rt=require("./GraphFooter.cjs"),ot=require("./GraphHeader.cjs"),g=require("./numberFormattingFunction-02t-wJta.cjs");function st(e){const t=o.compilerRuntimeExports.c(50),{year:f,data:r,graphTitle:m,suffix:W,sources:h,prefix:L,graphDescription:p,footNote:y,padding:P,backgroundColor:I,graphID:G,aggregationMethod:V,language:J,countOnly:x,theme:K,ariaLabel:it,textBackground:Q,headingFontSize:U,centerAlign:X,verticalAlign:Y,layout:Z,styles:n,classNames:i,precision:tt}=e,s=W===void 0?"":W,a=L===void 0?"":L,d=I===void 0?!1:I,l=V===void 0?"count":V,c=J===void 0?"en":J,et=K===void 0?"light":K,$=Q===void 0?!1:Q,S=U===void 0?"4.375rem":U,_=X===void 0?!1:X,w=Y===void 0?"center":Y,k=Z===void 0?"primary":Z,u=tt===void 0?2:tt,M=`${et||"light"} w-full`,T=c==="he"||c==="ar"?"rtl":void 0,q=`${et||"light"} flex flex-col w-full box-border h-full ${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${c||"en"}`,H=i?.graphContainer;let v;t[0]!==q||t[1]!==H?(v=o.mo(q,H),t[0]=q,t[1]=H,t[2]=v):v=t[2];let j;t[3]!==n?.graphContainer?(j=n?.graphContainer||{},t[3]=n?.graphContainer,t[4]=j):j=t[4];let b;t[5]!==d?(b=d&&d!==!0?{backgroundColor:d}:{},t[5]=d,t[6]=b):b=t[6];const z=d?P||"1rem":P||0;let F;t[7]!==j||t[8]!==b||t[9]!==z?(F={...j,...b,padding:z},t[7]=j,t[8]=b,t[9]=z,t[10]=F):F=t[10];const B=it||`${m?`The graph shows ${m}. `:""}This is a statistic card.${p?` ${p}`:""}`,D=`flex flex-col w-full grow ${k!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let N;t[11]!==l||t[12]!==_||t[13]!==i?.description||t[14]!==i?.footnote||t[15]!==i?.source||t[16]!==i?.title||t[17]!==x||t[18]!==r||t[19]!==y||t[20]!==p||t[21]!==m||t[22]!==S||t[23]!==c||t[24]!==k||t[25]!==u||t[26]!==a||t[27]!==h||t[28]!==n?.description||t[29]!==n?.footnote||t[30]!==n?.source||t[31]!==n?.title||t[32]!==s||t[33]!==$||t[34]!==w||t[35]!==f?(N=k!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(jt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(vt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(yt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ht).filter(ft)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(gt).filter(dt)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]})}),h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(nt.R,{marginBottom:k==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${_?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${$?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:S,letterSpacing:"0.05rem"},children:[r.filter(xt).length>0||l==="count"?x&&x?.length!==0?r.filter(O=>x.indexOf(O.value)!==-1).length:r.length:l==="sum"?g.numberFormattingFunction(C.sum(r.map(pt)),"NA",u,a,s):l==="average"?g.numberFormattingFunction(parseFloat((C.sum(r.map(mt))/r.length).toFixed(2)),"NA",u,a,s):l==="max"?g.numberFormattingFunction(Math.max(...r.map(ct).filter(ut)),"NA",u,a,s):g.numberFormattingFunction(Math.min(...r.map(lt).filter(at)),"NA",u,a,s)," ",f?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",f,")"]}):null]}),m||p?o.jsxRuntimeExports.jsx(ot.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:m,graphDescription:p}):null,h||y?o.jsxRuntimeExports.jsx(rt.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:h,footNote:y}):null]}),t[11]=l,t[12]=_,t[13]=i?.description,t[14]=i?.footnote,t[15]=i?.source,t[16]=i?.title,t[17]=x,t[18]=r,t[19]=y,t[20]=p,t[21]=m,t[22]=S,t[23]=c,t[24]=k,t[25]=u,t[26]=a,t[27]=h,t[28]=n?.description,t[29]=n?.footnote,t[30]=n?.source,t[31]=n?.title,t[32]=s,t[33]=$,t[34]=w,t[35]=f,t[36]=N):N=t[36];let R;t[37]!==D||t[38]!==N?(R=o.jsxRuntimeExports.jsx("div",{className:D,children:N}),t[37]=D,t[38]=N,t[39]=R):R=t[39];let E;t[40]!==G||t[41]!==T||t[42]!==v||t[43]!==F||t[44]!==B||t[45]!==R?(E=o.jsxRuntimeExports.jsx("div",{id:G,dir:T,className:v,style:F,"aria-label":B,children:R}),t[40]=G,t[41]=T,t[42]=v,t[43]=F,t[44]=B,t[45]=R,t[46]=E):E=t[46];let A;return t[47]!==M||t[48]!==E?(A=o.jsxRuntimeExports.jsx("div",{className:M,children:E}),t[47]=M,t[48]=E,t[49]=A):A=t[49],A}function at(e){return e!==void 0}function lt(e){return e.value}function ut(e){return e!==void 0}function ct(e){return e.value}function mt(e){return e.value}function pt(e){return e.value}function xt(e){return typeof e.value=="string"}function dt(e){return e!==void 0}function gt(e){return e.value}function ft(e){return e!==void 0}function ht(e){return e.value}function yt(e){return e.value}function vt(e){return e.value}function jt(e){return typeof e.value=="string"}exports.StatCardFromData=st;
2
2
  //# sourceMappingURL=StatCardFromData.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { c as at, m as st, j as i } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import { s as T } from "./index-CeVNqhMO.js";
3
- import { $ as nt } from "./Typography-hWfh3H0J.js";
3
+ import { R as nt } from "./Typography-iR8PEgdt.js";
4
4
  import { GraphFooter as rt } from "./GraphFooter.js";
5
5
  import { GraphHeader as ot } from "./GraphHeader.js";
6
6
  import { n as g } from "./numberFormattingFunction-14YCbkN2.js";
@@ -9,7 +9,7 @@ function Ft(e) {
9
9
  year: x,
10
10
  data: r,
11
11
  graphTitle: u,
12
- suffix: R,
12
+ suffix: G,
13
13
  sources: h,
14
14
  prefix: I,
15
15
  graphDescription: f,
@@ -30,7 +30,7 @@ function Ft(e) {
30
30
  styles: n,
31
31
  classNames: o,
32
32
  precision: tt
33
- } = e, a = R === void 0 ? "" : R, s = I === void 0 ? "" : I, d = J === void 0 ? !1 : J, l = K === void 0 ? "count" : K, m = P === void 0 ? "en" : P, et = Q === void 0 ? "light" : Q, A = U === void 0 ? !1 : U, F = V === void 0 ? "4.375rem" : V, S = X === void 0 ? !1 : X, C = Y === void 0 ? "center" : Y, w = Z === void 0 ? "primary" : Z, c = tt === void 0 ? 2 : tt, B = `${et || "light"} w-full`, W = m === "he" || m === "ar" ? "rtl" : void 0, D = `${et || "light"} flex flex-col w-full box-border h-full ${d ? d === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650" : "" : "bg-transparent"} ${m || "en"}`, H = o?.graphContainer;
33
+ } = e, a = G === void 0 ? "" : G, s = I === void 0 ? "" : I, d = J === void 0 ? !1 : J, l = K === void 0 ? "count" : K, m = P === void 0 ? "en" : P, et = Q === void 0 ? "light" : Q, A = U === void 0 ? !1 : U, F = V === void 0 ? "4.375rem" : V, S = X === void 0 ? !1 : X, C = Y === void 0 ? "center" : Y, w = Z === void 0 ? "primary" : Z, c = tt === void 0 ? 2 : tt, B = `${et || "light"} w-full`, W = m === "he" || m === "ar" ? "rtl" : void 0, D = `${et || "light"} flex flex-col w-full box-border h-full ${d ? d === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650" : "" : "bg-transparent"} ${m || "en"}`, H = o?.graphContainer;
34
34
  let v;
35
35
  t[0] !== D || t[1] !== H ? (v = st(D, H), t[0] = D, t[1] = H, t[2] = v) : v = t[2];
36
36
  let j;
@@ -46,9 +46,9 @@ function Ft(e) {
46
46
  ...N,
47
47
  padding: L
48
48
  }, t[7] = j, t[8] = N, t[9] = L, t[10] = b) : b = t[10];
49
- const O = it || `${u ? `The graph shows ${u}. ` : ""}This is a statistic card.${f ? ` ${f}` : ""}`, E = `flex flex-col w-full grow ${w !== "secondary" ? "gap-12 justify-between" : "gap-4 justify-center"}`;
50
- let $;
51
- t[11] !== l || t[12] !== S || t[13] !== o?.description || t[14] !== o?.footnote || t[15] !== o?.source || t[16] !== o?.title || t[17] !== p || t[18] !== r || t[19] !== y || t[20] !== f || t[21] !== u || t[22] !== F || t[23] !== m || t[24] !== w || t[25] !== c || t[26] !== s || t[27] !== h || t[28] !== n?.description || t[29] !== n?.footnote || t[30] !== n?.source || t[31] !== n?.title || t[32] !== a || t[33] !== A || t[34] !== C || t[35] !== x ? ($ = w !== "secondary" ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
49
+ const O = it || `${u ? `The graph shows ${u}. ` : ""}This is a statistic card.${f ? ` ${f}` : ""}`, R = `flex flex-col w-full grow ${w !== "secondary" ? "gap-12 justify-between" : "gap-4 justify-center"}`;
50
+ let k;
51
+ t[11] !== l || t[12] !== S || t[13] !== o?.description || t[14] !== o?.footnote || t[15] !== o?.source || t[16] !== o?.title || t[17] !== p || t[18] !== r || t[19] !== y || t[20] !== f || t[21] !== u || t[22] !== F || t[23] !== m || t[24] !== w || t[25] !== c || t[26] !== s || t[27] !== h || t[28] !== n?.description || t[29] !== n?.footnote || t[30] !== n?.source || t[31] !== n?.title || t[32] !== a || t[33] !== A || t[34] !== C || t[35] !== x ? (k = w !== "secondary" ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
52
52
  u || f ? /* @__PURE__ */ i.jsx(ot, { styles: {
53
53
  title: n?.title,
54
54
  description: n?.description
@@ -60,7 +60,7 @@ function Ft(e) {
60
60
  fontSize: F,
61
61
  letterSpacing: "0.05rem"
62
62
  }, children: [
63
- r.filter(Nt).length > 0 || l === "count" ? p && p?.length !== 0 ? r.filter((G) => p.indexOf(G.value) !== -1).length : r.length : l === "sum" ? g(T(r.map(jt)), "NA", c, s, a) : l === "average" ? g(parseFloat((T(r.map(vt)) / r.length).toFixed(2)), "NA", c, s, a) : l === "max" ? g(Math.max(...r.map(yt).filter(ht)), "NA", c, s, a) : g(Math.min(...r.map(xt).filter(gt)), "NA", c, s, a),
63
+ r.filter(Nt).length > 0 || l === "count" ? p && p?.length !== 0 ? r.filter((E) => p.indexOf(E.value) !== -1).length : r.length : l === "sum" ? g(T(r.map(jt)), "NA", c, s, a) : l === "average" ? g(parseFloat((T(r.map(vt)) / r.length).toFixed(2)), "NA", c, s, a) : l === "max" ? g(Math.max(...r.map(yt).filter(ht)), "NA", c, s, a) : g(Math.min(...r.map(xt).filter(gt)), "NA", c, s, a),
64
64
  " ",
65
65
  x ? /* @__PURE__ */ i.jsxs("span", { className: "text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400", style: {
66
66
  marginLeft: "-8px",
@@ -85,7 +85,7 @@ function Ft(e) {
85
85
  fontSize: F,
86
86
  letterSpacing: "0.05rem"
87
87
  }, children: [
88
- r.filter(dt).length > 0 || l === "count" ? p && p?.length !== 0 ? r.filter((G) => p.indexOf(G.value) !== -1).length : r.length : l === "sum" ? g(T(r.map(pt)), "NA", c, s, a) : l === "average" ? g(parseFloat((T(r.map(ft)) / r.length).toFixed(2)), "NA", c, s, a) : l === "max" ? g(Math.max(...r.map(ut).filter(mt)), "NA", c, s, a) : g(Math.min(...r.map(ct).filter(lt)), "NA", c, s, a),
88
+ r.filter(dt).length > 0 || l === "count" ? p && p?.length !== 0 ? r.filter((E) => p.indexOf(E.value) !== -1).length : r.length : l === "sum" ? g(T(r.map(pt)), "NA", c, s, a) : l === "average" ? g(parseFloat((T(r.map(ft)) / r.length).toFixed(2)), "NA", c, s, a) : l === "max" ? g(Math.max(...r.map(ut).filter(mt)), "NA", c, s, a) : g(Math.min(...r.map(ct).filter(lt)), "NA", c, s, a),
89
89
  " ",
90
90
  x ? /* @__PURE__ */ i.jsxs("span", { className: "text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400", style: {
91
91
  marginLeft: "-8px",
@@ -112,11 +112,11 @@ function Ft(e) {
112
112
  footnote: o?.footnote,
113
113
  source: o?.source
114
114
  }, sources: h, footNote: y }) : null
115
- ] }), t[11] = l, t[12] = S, t[13] = o?.description, t[14] = o?.footnote, t[15] = o?.source, t[16] = o?.title, t[17] = p, t[18] = r, t[19] = y, t[20] = f, t[21] = u, t[22] = F, t[23] = m, t[24] = w, t[25] = c, t[26] = s, t[27] = h, t[28] = n?.description, t[29] = n?.footnote, t[30] = n?.source, t[31] = n?.title, t[32] = a, t[33] = A, t[34] = C, t[35] = x, t[36] = $) : $ = t[36];
116
- let k;
117
- t[37] !== E || t[38] !== $ ? (k = /* @__PURE__ */ i.jsx("div", { className: E, children: $ }), t[37] = E, t[38] = $, t[39] = k) : k = t[39];
115
+ ] }), t[11] = l, t[12] = S, t[13] = o?.description, t[14] = o?.footnote, t[15] = o?.source, t[16] = o?.title, t[17] = p, t[18] = r, t[19] = y, t[20] = f, t[21] = u, t[22] = F, t[23] = m, t[24] = w, t[25] = c, t[26] = s, t[27] = h, t[28] = n?.description, t[29] = n?.footnote, t[30] = n?.source, t[31] = n?.title, t[32] = a, t[33] = A, t[34] = C, t[35] = x, t[36] = k) : k = t[36];
116
+ let $;
117
+ t[37] !== R || t[38] !== k ? ($ = /* @__PURE__ */ i.jsx("div", { className: R, children: k }), t[37] = R, t[38] = k, t[39] = $) : $ = t[39];
118
118
  let _;
119
- t[40] !== z || t[41] !== W || t[42] !== v || t[43] !== b || t[44] !== O || t[45] !== k ? (_ = /* @__PURE__ */ i.jsx("div", { id: z, dir: W, className: v, style: b, "aria-label": O, children: k }), t[40] = z, t[41] = W, t[42] = v, t[43] = b, t[44] = O, t[45] = k, t[46] = _) : _ = t[46];
119
+ t[40] !== z || t[41] !== W || t[42] !== v || t[43] !== b || t[44] !== O || t[45] !== $ ? (_ = /* @__PURE__ */ i.jsx("div", { id: z, dir: W, className: v, style: b, "aria-label": O, children: $ }), t[40] = z, t[41] = W, t[42] = v, t[43] = b, t[44] = O, t[45] = $, t[46] = _) : _ = t[46];
120
120
  let M;
121
121
  return t[47] !== B || t[48] !== _ ? (M = /* @__PURE__ */ i.jsx("div", { className: B, children: _ }), t[47] = B, t[48] = _, t[49] = M) : M = t[49], M;
122
122
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),X=require("react"),Kt=require("./index-DQA8q5sC.cjs"),Qt=require("./index-Cno4Q0YE.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),mt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ht=require("./numberFormattingFunction-02t-wJta.cjs"),u=require("./Colors.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),wt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),oe=require("./index-CoobIWNj.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs"),ne=require("./EmptyState-CGeBqbmR.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),le=require("./GraphFooter.cjs"),se=require("./GraphHeader.cjs");function ie(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(D,v)=>v*i)}function ae(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,noOfTicks:st,prefix:et,suffix:at,stripType:O,highlightColor:h,dotOpacity:dt,resetSelectionOnDoubleClick:B,detailsOnClick:b,styles:f,classNames:C,valueColor:x,animate:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?20:E,xt=gt===void 0?20:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==g.amount||t[1]!==g.once?(ut={once:g.once,amount:g.amount},t[0]=g.amount,t[1]=g.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==g.duration||t[9]!==C?.graphObjectValues||t[10]!==C?.yAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==b||t[16]!==J||t[17]!==dt||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==h||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==st||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==et||t[34]!==d||t[35]!==B||t[36]!==tt||t[37]!==O||t[38]!==f?.graphObjectValues||t[39]!==f?.yAxis?.labels||t[40]!==at||t[41]!==x||t[42]!==D){const Dt=i.map(Se);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(Ne).map(De))<0?0:Math.max(...i.filter(Ie).map(ke)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Re).map(Ve))>=0?0:Math.min(...i.filter(Ee).map(Me)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([Q,0]).nice(),It=ie(st,Q);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(we).map(Ce),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:K/2,y:Et(0)},whileInView:{x:K/2,y:Et(o.position),opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:dt,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||b)&&(Kt.isEqual(M,o)&&B?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[O==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(je).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(Oe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{textAnchor:"start",...f?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",C?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,et,at)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+d+5,style:{textAnchor:"start",...f?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",C?.yAxis?.labels),children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,et,at)},c)),t[8]=g.duration,t[9]=C?.graphObjectValues,t[10]=C?.yAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=b,t[16]=J,t[17]=dt,t[18]=Q,t[19]=K,t[20]=v,t[21]=h,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=st,t[30]=Y,t[31]=_,t[32]=ct,t[33]=et,t[34]=d,t[35]=B,t[36]=tt,t[37]=O,t[38]=f?.graphObjectValues,t[39]=f?.yAxis?.labels,t[40]=at,t[41]=x,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(ue).map(ce),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==C?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==f?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:f?.tooltip,className:C?.tooltip}):null,t[83]=C?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=f?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==C?.modal||t[91]!==b||t[92]!==M?(I=b&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:b,data:M,setData:jt,className:C?.modal}):null,t[90]=C?.modal,t[91]=b,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function ce(e){return e.layer}function ue(e){return e.position==="after"}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function de(e){return e.color}function xe(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ye(e){return e.color}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function Ce(e){return e.layer}function we(e){return e.position==="before"}function Me(e){return e.position}function Ee(e){return!mt.checkIfNullOrUndefined(e.position)}function Ve(e){return e.position}function Re(e){return!mt.checkIfNullOrUndefined(e.position)}function ke(e){return e.position}function Ie(e){return!mt.checkIfNullOrUndefined(e.position)}function De(e){return e.position}function Ne(e){return!mt.checkIfNullOrUndefined(e.position)}function Se(e,t){return{...e,id:`${t}`}}function $e(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,prefix:st,suffix:et,stripType:at,highlightColor:O,dotOpacity:h,resetSelectionOnDoubleClick:dt,detailsOnClick:B,styles:b,classNames:f,valueColor:C,animate:x,noOfTicks:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?5:E,xt=gt===void 0?5:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==x.amount||t[1]!==x.once?(ut={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==x.duration||t[9]!==f?.graphObjectValues||t[10]!==f?.xAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==B||t[16]!==J||t[17]!==h||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==O||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==g||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==st||t[34]!==d||t[35]!==dt||t[36]!==tt||t[37]!==at||t[38]!==b?.graphObjectValues||t[39]!==b?.xAxis?.labels||t[40]!==et||t[41]!==C||t[42]!==D){const Dt=i.map(ro);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(no).map(io))<0?0:Math.max(...i.filter(oo).map(eo)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(to).map(_e))>=0?0:Math.min(...i.filter(Ze).map(Qe)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([0,K]).nice(),It=ie(g,K);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(Ke).map(Je),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:Et(0),y:Q/2},whileInView:{x:Et(o.position),y:Q/2,opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:h,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||B)&&(Kt.isEqual(M,o)&&dt?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[at==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(ze).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{textAnchor:"middle",...b?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",f?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,st,et)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+d,style:{textAnchor:c===0?"start":c===It.length-1?"end":"middle",...b?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",f?.xAxis?.labels),dy:"1em",children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,st,et)},c)),t[8]=x.duration,t[9]=f?.graphObjectValues,t[10]=f?.xAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=B,t[16]=J,t[17]=h,t[18]=Q,t[19]=K,t[20]=v,t[21]=O,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=g,t[30]=Y,t[31]=_,t[32]=ct,t[33]=st,t[34]=d,t[35]=dt,t[36]=tt,t[37]=at,t[38]=b?.graphObjectValues,t[39]=b?.xAxis?.labels,t[40]=et,t[41]=C,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(qe).map(Ae),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==f?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==b?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:b?.tooltip,className:f?.tooltip}):null,t[83]=f?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=b?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==f?.modal||t[91]!==B||t[92]!==M?(I=B&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:B,data:M,setData:jt,className:f?.modal}):null,t[90]=f?.modal,t[91]=B,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function Ae(e){return e.layer}function qe(e){return e.position==="after"}function Te(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Le(e){return e.color}function Ue(e){return e.color}function He(e){return e.color}function Ge(e){return e.color}function We(e){return e.color}function Xe(e){return e.color}function Ye(e){return e.color}function Be(e){return e.color}function ze(e){return e.color}function Je(e){return e.layer}function Ke(e){return e.position==="before"}function Qe(e){return e.position}function Ze(e){return!mt.checkIfNullOrUndefined(e.position)}function _e(e){return e.position}function to(e){return!mt.checkIfNullOrUndefined(e.position)}function eo(e){return e.position}function oo(e){return!mt.checkIfNullOrUndefined(e.position)}function io(e){return e.position}function no(e){return!mt.checkIfNullOrUndefined(e.position)}function ro(e,t){return{...e,id:`${t}`}}function lo(e){const t=l.compilerRuntimeExports.c(92),{data:i,graphTitle:D,colors:v,sources:n,graphDescription:s,height:d,width:E,footNote:gt,colorDomain:rt,colorLegendTitle:Mt,radius:lt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,relativeHeight:et,onSeriesMouseOver:at,showColorScale:O,highlightedDataPoints:h,graphID:dt,minValue:B,maxValue:b,onSeriesMouseClick:f,noOfTicks:C,graphDownload:x,dataDownload:g,prefix:J,suffix:ct,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Vt,theme:ut,ariaLabel:$,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:M,orientation:jt,styles:p,classNames:a,animate:ft,dimmedOpacity:Ct,precision:pt,customLayers:m}=e,K=lt===void 0?5:lt,Q=r===void 0?!1:r,A=O===void 0?!0:O;let V;t[0]!==h?(V=h===void 0?[]:h,t[0]=h,t[1]=V):V=t[1];const q=V,T=C===void 0?2:C,R=x===void 0?!1:x,k=g===void 0?!1:g,F=J===void 0?"":J,P=ct===void 0?"":ct,L=w===void 0?"dot":w,U=yt===void 0?"en":yt,j=vt===void 0?.3:vt,H=Ot===void 0?!0:Ot,G=Vt===void 0?0:Vt,y=ut===void 0?"light":ut,W=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,I=ft===void 0?!1:ft,it=Ct===void 0?.3:Ct,Dt=pt===void 0?2:pt;let Z;t[2]!==m?(Z=m===void 0?[]:m,t[2]=m,t[3]=Z):Z=t[3];const Nt=Z,nt=z==="horizontal"?$e:ae,[Rt,ht]=X.useState(0),[kt,Et]=X.useState(0),[It,o]=X.useState(void 0),c=X.useRef(null),Xt=X.useRef(null);let Pt,Lt;t[4]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{const Yt=new ResizeObserver(Bt=>{ht(Bt[0].target.clientWidth||620),Et(Bt[0].target.clientHeight||480)});return c.current&&Yt.observe(c.current),()=>Yt.disconnect()},Lt=[],t[4]=Pt,t[5]=Lt):(Pt=t[4],Lt=t[5]),X.useEffect(Pt,Lt);const Gt=a?.graphContainer,Wt=p?.graphContainer;let St;t[6]!==a?.description||t[7]!==a?.title||t[8]!==i||t[9]!==k||t[10]!==s||t[11]!==R||t[12]!==D||t[13]!==p?.description||t[14]!==p?.title||t[15]!==E?(St=D||s||R||k?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:a?.title,description:a?.description},graphTitle:D,graphDescription:s,width:E,graphDownload:R?Xt:void 0,dataDownload:k?i.map(xo).filter(mo).length>0?i.map(po).filter(fo):i.filter(uo):null}):null,t[6]=a?.description,t[7]=a?.title,t[8]=i,t[9]=k,t[10]=s,t[11]=R,t[12]=D,t[13]=p?.description,t[14]=p?.title,t[15]=E,t[16]=St):St=t[16];let $t;t[17]!==a?.colorLegend||t[18]!==rt||t[19]!==Mt||t[20]!==v||t[21]!==i||t[22]!==A||t[23]!==H||t[24]!==y||t[25]!==E?($t=A!==!1&&i.filter(co).length!==0&&i.length>0?l.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:E,colorLegendTitle:Mt,colors:v||u.Colors[y].categoricalColors.colors,colorDomain:rt||zt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:H,className:a?.colorLegend}):null,t[17]=a?.colorLegend,t[18]=rt,t[19]=Mt,t[20]=v,t[21]=i,t[22]=A,t[23]=H,t[24]=y,t[25]=E,t[26]=$t):$t=t[26];let At;t[27]!==i.length?(At=i.length===0&&l.jsxRuntimeExports.jsx(ne.EmptyState,{}),t[27]=i.length,t[28]=At):At=t[28];let qt;t[29]!==nt||t[30]!==I||t[31]!==Y||t[32]!==a||t[33]!==rt||t[34]!==v||t[35]!==Nt||t[36]!==i||t[37]!==M||t[38]!==it||t[39]!==j||t[40]!==xt||t[41]!==q||t[42]!==tt||t[43]!==b||t[44]!==B||t[45]!==T||t[46]!==f||t[47]!==at||t[48]!==Dt||t[49]!==F||t[50]!==K||t[51]!==W||t[52]!==N||t[53]!==It||t[54]!==L||t[55]!==p||t[56]!==P||t[57]!==kt||t[58]!==Rt||t[59]!==y||t[60]!==st||t[61]!==S||t[62]!==ot?(qt=Rt&&kt&&i.length>0?l.jsxRuntimeExports.jsx(nt,{data:i,width:Rt,height:kt,colorDomain:i.filter(ao).length===0?[]:rt||zt.uniqBy(i,"color",!0),colors:i.filter(so).length===0?v?[v]:[u.Colors.primaryColors["blue-600"]]:v||u.Colors[y].categoricalColors.colors,selectedColor:It,radius:K,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,onSeriesMouseOver:at,highlightedDataPoints:q,minValue:B,maxValue:b,onSeriesMouseClick:f,prefix:F,suffix:P,stripType:L,highlightColor:xt,dotOpacity:j,resetSelectionOnDoubleClick:W,detailsOnClick:M,styles:p,classNames:a,valueColor:ot,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},noOfTicks:T,dimmedOpacity:it,precision:Dt,customLayers:Nt}):null,t[29]=nt,t[30]=I,t[31]=Y,t[32]=a,t[33]=rt,t[34]=v,t[35]=Nt,t[36]=i,t[37]=M,t[38]=it,t[39]=j,t[40]=xt,t[41]=q,t[42]=tt,t[43]=b,t[44]=B,t[45]=T,t[46]=f,t[47]=at,t[48]=Dt,t[49]=F,t[50]=K,t[51]=W,t[52]=N,t[53]=It,t[54]=L,t[55]=p,t[56]=P,t[57]=kt,t[58]=Rt,t[59]=y,t[60]=st,t[61]=S,t[62]=ot,t[63]=qt):qt=t[63];let Tt;t[64]!==At||t[65]!==qt?(Tt=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:c,children:[At,qt]}),t[64]=At,t[65]=qt,t[66]=Tt):Tt=t[66];let Ft;t[67]!==a?.footnote||t[68]!==a?.source||t[69]!==gt||t[70]!==n||t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==E?(Ft=n||gt?l.jsxRuntimeExports.jsx(le.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:n,footNote:gt,width:E}):null,t[67]=a?.footnote,t[68]=a?.source,t[69]=gt,t[70]=n,t[71]=p?.footnote,t[72]=p?.source,t[73]=E,t[74]=Ft):Ft=t[74];let Ut;return t[75]!==$||t[76]!==Q||t[77]!==dt||t[78]!==d||t[79]!==U||t[80]!==G||t[81]!==_||t[82]!==et||t[83]!==Gt||t[84]!==Wt||t[85]!==St||t[86]!==$t||t[87]!==Tt||t[88]!==Ft||t[89]!==y||t[90]!==E?(Ut=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:Gt,style:Wt,id:dt,ref:Xt,"aria-label":$,backgroundColor:Q,theme:y,language:U,minHeight:G,width:E,height:d,relativeHeight:et,padding:_,children:[St,$t,Tt,Ft]}),t[75]=$,t[76]=Q,t[77]=dt,t[78]=d,t[79]=U,t[80]=G,t[81]=_,t[82]=et,t[83]=Gt,t[84]=Wt,t[85]=St,t[86]=$t,t[87]=Tt,t[88]=Ft,t[89]=y,t[90]=E,t[91]=Ut):Ut=t[91],Ut}function so(e){return e.color}function ao(e){return e.color}function co(e){return e.color}function uo(e){return e!==void 0}function fo(e){return e!==void 0}function po(e){return e.data}function mo(e){return e!==void 0}function xo(e){return e.data}exports.StripChart=lo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),X=require("react"),Kt=require("./index-DQA8q5sC.cjs"),Qt=require("./index-Cno4Q0YE.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),mt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ht=require("./numberFormattingFunction-02t-wJta.cjs"),u=require("./Colors.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),wt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),oe=require("./index-CoobIWNj.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs"),ne=require("./EmptyState-DX0t62iF.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),le=require("./GraphFooter.cjs"),se=require("./GraphHeader.cjs");function ie(e,t){if(e<2)return[];const i=t/(e-1);return Array.from({length:e},(D,v)=>v*i)}function ae(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,noOfTicks:st,prefix:et,suffix:at,stripType:O,highlightColor:h,dotOpacity:dt,resetSelectionOnDoubleClick:B,detailsOnClick:b,styles:f,classNames:C,valueColor:x,animate:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?20:E,xt=gt===void 0?20:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==g.amount||t[1]!==g.once?(ut={once:g.once,amount:g.amount},t[0]=g.amount,t[1]=g.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==g.duration||t[9]!==C?.graphObjectValues||t[10]!==C?.yAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==b||t[16]!==J||t[17]!==dt||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==h||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==st||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==et||t[34]!==d||t[35]!==B||t[36]!==tt||t[37]!==O||t[38]!==f?.graphObjectValues||t[39]!==f?.yAxis?.labels||t[40]!==at||t[41]!==x||t[42]!==D){const Dt=i.map(Se);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(Ne).map(De))<0?0:Math.max(...i.filter(Ie).map(ke)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(Re).map(Ve))>=0?0:Math.min(...i.filter(Ee).map(Me)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([Q,0]).nice(),It=ie(st,Q);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(we).map(Ce),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:K/2,y:Et(0)},whileInView:{x:K/2,y:Et(o.position),opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:dt,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||b)&&(Kt.isEqual(M,o)&&B?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[O==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(je).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(Oe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ve).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{y:-1,height:2,variants:{initial:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{x:0-d,width:d*2,fill:h&&r?r.indexOf(o.label)!==-1?h:i.filter(he).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{y:0,dy:"0.33em",variants:{initial:{opacity:0,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(de).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(me).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,x:0+d+3,fill:x||(h&&r?r.indexOf(o.label)!==-1?h:i.filter(pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:g.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{textAnchor:"start",...f?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",C?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,et,at)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{y:o,x:K/2+d+5,style:{textAnchor:"start",...f?.yAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",C?.yAxis?.labels),children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,et,at)},c)),t[8]=g.duration,t[9]=C?.graphObjectValues,t[10]=C?.yAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=b,t[16]=J,t[17]=dt,t[18]=Q,t[19]=K,t[20]=v,t[21]=h,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=st,t[30]=Y,t[31]=_,t[32]=ct,t[33]=et,t[34]=d,t[35]=B,t[36]=tt,t[37]=O,t[38]=f?.graphObjectValues,t[39]=f?.yAxis?.labels,t[40]=at,t[41]=x,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(ue).map(ce),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==C?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==f?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:f?.tooltip,className:C?.tooltip}):null,t[83]=C?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=f?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==C?.modal||t[91]!==b||t[92]!==M?(I=b&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:b,data:M,setData:jt,className:C?.modal}):null,t[90]=C?.modal,t[91]=b,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function ce(e){return e.layer}function ue(e){return e.position==="after"}function fe(e){return e.color}function pe(e){return e.color}function me(e){return e.color}function de(e){return e.color}function xe(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ye(e){return e.color}function ve(e){return e.color}function Oe(e){return e.color}function be(e){return e.color}function je(e){return e.color}function Ce(e){return e.layer}function we(e){return e.position==="before"}function Me(e){return e.position}function Ee(e){return!mt.checkIfNullOrUndefined(e.position)}function Ve(e){return e.position}function Re(e){return!mt.checkIfNullOrUndefined(e.position)}function ke(e){return e.position}function Ie(e){return!mt.checkIfNullOrUndefined(e.position)}function De(e){return e.position}function Ne(e){return!mt.checkIfNullOrUndefined(e.position)}function Se(e,t){return{...e,id:`${t}`}}function $e(e){const t=l.compilerRuntimeExports.c(98),{data:i,width:D,height:v,colors:n,colorDomain:s,radius:d,leftMargin:E,rightMargin:gt,topMargin:rt,bottomMargin:Mt,tooltip:lt,onSeriesMouseOver:_,highlightedDataPoints:r,selectedColor:tt,minValue:N,maxValue:S,onSeriesMouseClick:Y,prefix:st,suffix:et,stripType:at,highlightColor:O,dotOpacity:h,resetSelectionOnDoubleClick:dt,detailsOnClick:B,styles:b,classNames:f,valueColor:C,animate:x,noOfTicks:g,dimmedOpacity:J,precision:ct,customLayers:w}=e,yt=E===void 0?5:E,xt=gt===void 0?5:gt,vt=rt===void 0?10:rt,Ot=Mt===void 0?10:Mt,Vt=X.useRef(null);let ut;t[0]!==x.amount||t[1]!==x.once?(ut={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=ut):ut=t[2];const $=ee.useInView(Vt,ut),[ot,bt]=X.useState(void 0),[M,jt]=X.useState(void 0),[p,a]=X.useState(void 0),[ft,Ct]=X.useState(void 0);let pt;t[3]!==Ot||t[4]!==yt||t[5]!==xt||t[6]!==vt?(pt={top:vt,bottom:Ot,left:yt,right:xt},t[3]=Ot,t[4]=yt,t[5]=xt,t[6]=vt,t[7]=pt):pt=t[7];const m=pt,K=D-m.left-m.right,Q=v-m.top-m.bottom;let A,V,q,T,R,k,F,P,L,U,j;if(t[8]!==x.duration||t[9]!==f?.graphObjectValues||t[10]!==f?.xAxis?.labels||t[11]!==s||t[12]!==n||t[13]!==w||t[14]!==i||t[15]!==B||t[16]!==J||t[17]!==h||t[18]!==Q||t[19]!==K||t[20]!==v||t[21]!==O||t[22]!==r||t[23]!==$||t[24]!==m.left||t[25]!==m.top||t[26]!==S||t[27]!==N||t[28]!==M||t[29]!==g||t[30]!==Y||t[31]!==_||t[32]!==ct||t[33]!==st||t[34]!==d||t[35]!==dt||t[36]!==tt||t[37]!==at||t[38]!==b?.graphObjectValues||t[39]!==b?.xAxis?.labels||t[40]!==et||t[41]!==C||t[42]!==D){const Dt=i.map(ro);let Z;t[54]!==r?(Z=o=>{const c=(r||[]).indexOf(o.label);return c===-1?1/0:c},t[54]=r,t[55]=Z):Z=t[55];const Nt=Qt.orderBy(Dt,[Z],["desc"]);let nt;t[56]!==i||t[57]!==S?(nt=mt.checkIfNullOrUndefined(S)?Math.max(...i.filter(no).map(io))<0?0:Math.max(...i.filter(oo).map(eo)):S,t[56]=i,t[57]=S,t[58]=nt):nt=t[58];const Rt=nt;let ht;t[59]!==i||t[60]!==N?(ht=mt.checkIfNullOrUndefined(N)?Math.min(...i.filter(to).map(_e))>=0?0:Math.min(...i.filter(Ze).map(Qe)):N,t[59]=i,t[60]=N,t[61]=ht):ht=t[61];const kt=ht,Et=te.linear().domain([kt,Rt]).range([0,K]).nice(),It=ie(g,K);V=wt.motion.svg,q=`${D}px`,T=`${v}px`,R=`0 0 ${D} ${v}`,k="ltr",F=Vt,U=`translate(${m.left},${m.top})`,t[62]!==w?(j=w.filter(Ke).map(Je),t[62]=w,t[63]=j):j=t[63],A=oe.AnimatePresence,P=Nt.map(o=>l.jsxRuntimeExports.jsxs(wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:Et(0),y:Q/2},whileInView:{x:Et(o.position),y:Q/2,opacity:tt?o.color&&n[s.indexOf(o.color)]===tt?.95:J:r.length!==0?r.indexOf(o.label)!==-1?.95:J:h,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},onMouseEnter:c=>{bt(o),Ct(c.clientY),a(c.clientX),_?.(o)},onClick:()=>{(Y||B)&&(Kt.isEqual(M,o)&&dt?(jt(void 0),Y?.(void 0)):(jt(o),Y?.(o)))},onMouseMove:c=>{bt(o),Ct(c.clientY),a(c.clientX)},onMouseLeave:()=>{bt(void 0),a(void 0),Ct(void 0),_?.(void 0)},children:[at==="dot"?l.jsxRuntimeExports.jsx(wt.motion.circle,{cy:0,cx:0,variants:{initial:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(ze).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Be).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(Ye).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Xe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},r:d}):l.jsxRuntimeExports.jsx(wt.motion.rect,{x:-1,width:2,variants:{initial:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(We).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ge).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray},whileInView:{y:0-d,height:d*2,fill:O&&r?r.indexOf(o.label)!==-1?O:i.filter(He).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Ue).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray,transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}}}),r.length!==0&&r.indexOf(o.label)!==-1?l.jsxRuntimeExports.jsx(wt.motion.text,{x:0,variants:{initial:{opacity:0,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Le).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Pe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray)},whileInView:{opacity:1,y:0-d-5,fill:C||(O&&r?r.indexOf(o.label)!==-1?O:i.filter(Fe).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray:i.filter(Te).length===0?n[0]:o.color?n[s.indexOf(o.color)]:u.Colors.gray),transition:{duration:x.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:x.duration}},style:{textAnchor:"middle",...b?.graphObjectValues||{}},className:l.mo("graph-value text-sm font-bold",f?.graphObjectValues),children:Ht.numberFormattingFunction(o.position,"NA",ct,st,et)}):null]},o.label)),L=It.map((o,c)=>l.jsxRuntimeExports.jsx("text",{x:o,y:Q/2+d,style:{textAnchor:c===0?"start":c===It.length-1?"end":"middle",...b?.xAxis?.labels||{}},className:l.mo("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",f?.xAxis?.labels),dy:"1em",children:Ht.numberFormattingFunction(Et.invert(o),"NA",ct,st,et)},c)),t[8]=x.duration,t[9]=f?.graphObjectValues,t[10]=f?.xAxis?.labels,t[11]=s,t[12]=n,t[13]=w,t[14]=i,t[15]=B,t[16]=J,t[17]=h,t[18]=Q,t[19]=K,t[20]=v,t[21]=O,t[22]=r,t[23]=$,t[24]=m.left,t[25]=m.top,t[26]=S,t[27]=N,t[28]=M,t[29]=g,t[30]=Y,t[31]=_,t[32]=ct,t[33]=st,t[34]=d,t[35]=dt,t[36]=tt,t[37]=at,t[38]=b?.graphObjectValues,t[39]=b?.xAxis?.labels,t[40]=et,t[41]=C,t[42]=D,t[43]=A,t[44]=V,t[45]=q,t[46]=T,t[47]=R,t[48]=k,t[49]=F,t[50]=P,t[51]=L,t[52]=U,t[53]=j}else A=t[43],V=t[44],q=t[45],T=t[46],R=t[47],k=t[48],F=t[49],P=t[50],L=t[51],U=t[52],j=t[53];let H;t[64]!==A||t[65]!==P||t[66]!==L?(H=l.jsxRuntimeExports.jsxs(A,{children:[P,L]}),t[64]=A,t[65]=P,t[66]=L,t[67]=H):H=t[67];let G;t[68]!==w?(G=w.filter(qe).map(Ae),t[68]=w,t[69]=G):G=t[69];let y;t[70]!==H||t[71]!==G||t[72]!==U||t[73]!==j?(y=l.jsxRuntimeExports.jsxs("g",{transform:U,children:[j,H,G]}),t[70]=H,t[71]=G,t[72]=U,t[73]=j,t[74]=y):y=t[74];let W;t[75]!==V||t[76]!==q||t[77]!==T||t[78]!==R||t[79]!==k||t[80]!==F||t[81]!==y?(W=l.jsxRuntimeExports.jsx(V,{width:q,height:T,viewBox:R,direction:k,ref:F,children:y}),t[75]=V,t[76]=q,t[77]=T,t[78]=R,t[79]=k,t[80]=F,t[81]=y,t[82]=W):W=t[82];let z;t[83]!==f?.tooltip||t[84]!==p||t[85]!==ft||t[86]!==ot||t[87]!==b?.tooltip||t[88]!==lt?(z=ot&&lt&&p&&ft?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:ot,body:lt,xPos:p,yPos:ft,backgroundStyle:b?.tooltip,className:f?.tooltip}):null,t[83]=f?.tooltip,t[84]=p,t[85]=ft,t[86]=ot,t[87]=b?.tooltip,t[88]=lt,t[89]=z):z=t[89];let I;t[90]!==f?.modal||t[91]!==B||t[92]!==M?(I=B&&M!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:B,data:M,setData:jt,className:f?.modal}):null,t[90]=f?.modal,t[91]=B,t[92]=M,t[93]=I):I=t[93];let it;return t[94]!==W||t[95]!==z||t[96]!==I?(it=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[W,z,I]}),t[94]=W,t[95]=z,t[96]=I,t[97]=it):it=t[97],it}function Ae(e){return e.layer}function qe(e){return e.position==="after"}function Te(e){return e.color}function Fe(e){return e.color}function Pe(e){return e.color}function Le(e){return e.color}function Ue(e){return e.color}function He(e){return e.color}function Ge(e){return e.color}function We(e){return e.color}function Xe(e){return e.color}function Ye(e){return e.color}function Be(e){return e.color}function ze(e){return e.color}function Je(e){return e.layer}function Ke(e){return e.position==="before"}function Qe(e){return e.position}function Ze(e){return!mt.checkIfNullOrUndefined(e.position)}function _e(e){return e.position}function to(e){return!mt.checkIfNullOrUndefined(e.position)}function eo(e){return e.position}function oo(e){return!mt.checkIfNullOrUndefined(e.position)}function io(e){return e.position}function no(e){return!mt.checkIfNullOrUndefined(e.position)}function ro(e,t){return{...e,id:`${t}`}}function lo(e){const t=l.compilerRuntimeExports.c(92),{data:i,graphTitle:D,colors:v,sources:n,graphDescription:s,height:d,width:E,footNote:gt,colorDomain:rt,colorLegendTitle:Mt,radius:lt,padding:_,backgroundColor:r,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,relativeHeight:et,onSeriesMouseOver:at,showColorScale:O,highlightedDataPoints:h,graphID:dt,minValue:B,maxValue:b,onSeriesMouseClick:f,noOfTicks:C,graphDownload:x,dataDownload:g,prefix:J,suffix:ct,stripType:w,language:yt,highlightColor:xt,dotOpacity:vt,showNAColor:Ot,minHeight:Vt,theme:ut,ariaLabel:$,valueColor:ot,resetSelectionOnDoubleClick:bt,detailsOnClick:M,orientation:jt,styles:p,classNames:a,animate:ft,dimmedOpacity:Ct,precision:pt,customLayers:m}=e,K=lt===void 0?5:lt,Q=r===void 0?!1:r,A=O===void 0?!0:O;let V;t[0]!==h?(V=h===void 0?[]:h,t[0]=h,t[1]=V):V=t[1];const q=V,T=C===void 0?2:C,R=x===void 0?!1:x,k=g===void 0?!1:g,F=J===void 0?"":J,P=ct===void 0?"":ct,L=w===void 0?"dot":w,U=yt===void 0?"en":yt,j=vt===void 0?.3:vt,H=Ot===void 0?!0:Ot,G=Vt===void 0?0:Vt,y=ut===void 0?"light":ut,W=bt===void 0?!0:bt,z=jt===void 0?"vertical":jt,I=ft===void 0?!1:ft,it=Ct===void 0?.3:Ct,Dt=pt===void 0?2:pt;let Z;t[2]!==m?(Z=m===void 0?[]:m,t[2]=m,t[3]=Z):Z=t[3];const Nt=Z,nt=z==="horizontal"?$e:ae,[Rt,ht]=X.useState(0),[kt,Et]=X.useState(0),[It,o]=X.useState(void 0),c=X.useRef(null),Xt=X.useRef(null);let Pt,Lt;t[4]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{const Yt=new ResizeObserver(Bt=>{ht(Bt[0].target.clientWidth||620),Et(Bt[0].target.clientHeight||480)});return c.current&&Yt.observe(c.current),()=>Yt.disconnect()},Lt=[],t[4]=Pt,t[5]=Lt):(Pt=t[4],Lt=t[5]),X.useEffect(Pt,Lt);const Gt=a?.graphContainer,Wt=p?.graphContainer;let St;t[6]!==a?.description||t[7]!==a?.title||t[8]!==i||t[9]!==k||t[10]!==s||t[11]!==R||t[12]!==D||t[13]!==p?.description||t[14]!==p?.title||t[15]!==E?(St=D||s||R||k?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:a?.title,description:a?.description},graphTitle:D,graphDescription:s,width:E,graphDownload:R?Xt:void 0,dataDownload:k?i.map(xo).filter(mo).length>0?i.map(po).filter(fo):i.filter(uo):null}):null,t[6]=a?.description,t[7]=a?.title,t[8]=i,t[9]=k,t[10]=s,t[11]=R,t[12]=D,t[13]=p?.description,t[14]=p?.title,t[15]=E,t[16]=St):St=t[16];let $t;t[17]!==a?.colorLegend||t[18]!==rt||t[19]!==Mt||t[20]!==v||t[21]!==i||t[22]!==A||t[23]!==H||t[24]!==y||t[25]!==E?($t=A!==!1&&i.filter(co).length!==0&&i.length>0?l.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:E,colorLegendTitle:Mt,colors:v||u.Colors[y].categoricalColors.colors,colorDomain:rt||zt.uniqBy(i,"color",!0),setSelectedColor:o,showNAColor:H,className:a?.colorLegend}):null,t[17]=a?.colorLegend,t[18]=rt,t[19]=Mt,t[20]=v,t[21]=i,t[22]=A,t[23]=H,t[24]=y,t[25]=E,t[26]=$t):$t=t[26];let At;t[27]!==i.length?(At=i.length===0&&l.jsxRuntimeExports.jsx(ne.EmptyState,{}),t[27]=i.length,t[28]=At):At=t[28];let qt;t[29]!==nt||t[30]!==I||t[31]!==Y||t[32]!==a||t[33]!==rt||t[34]!==v||t[35]!==Nt||t[36]!==i||t[37]!==M||t[38]!==it||t[39]!==j||t[40]!==xt||t[41]!==q||t[42]!==tt||t[43]!==b||t[44]!==B||t[45]!==T||t[46]!==f||t[47]!==at||t[48]!==Dt||t[49]!==F||t[50]!==K||t[51]!==W||t[52]!==N||t[53]!==It||t[54]!==L||t[55]!==p||t[56]!==P||t[57]!==kt||t[58]!==Rt||t[59]!==y||t[60]!==st||t[61]!==S||t[62]!==ot?(qt=Rt&&kt&&i.length>0?l.jsxRuntimeExports.jsx(nt,{data:i,width:Rt,height:kt,colorDomain:i.filter(ao).length===0?[]:rt||zt.uniqBy(i,"color",!0),colors:i.filter(so).length===0?v?[v]:[u.Colors.primaryColors["blue-600"]]:v||u.Colors[y].categoricalColors.colors,selectedColor:It,radius:K,leftMargin:tt,rightMargin:N,topMargin:S,bottomMargin:Y,tooltip:st,onSeriesMouseOver:at,highlightedDataPoints:q,minValue:B,maxValue:b,onSeriesMouseClick:f,prefix:F,suffix:P,stripType:L,highlightColor:xt,dotOpacity:j,resetSelectionOnDoubleClick:W,detailsOnClick:M,styles:p,classNames:a,valueColor:ot,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},noOfTicks:T,dimmedOpacity:it,precision:Dt,customLayers:Nt}):null,t[29]=nt,t[30]=I,t[31]=Y,t[32]=a,t[33]=rt,t[34]=v,t[35]=Nt,t[36]=i,t[37]=M,t[38]=it,t[39]=j,t[40]=xt,t[41]=q,t[42]=tt,t[43]=b,t[44]=B,t[45]=T,t[46]=f,t[47]=at,t[48]=Dt,t[49]=F,t[50]=K,t[51]=W,t[52]=N,t[53]=It,t[54]=L,t[55]=p,t[56]=P,t[57]=kt,t[58]=Rt,t[59]=y,t[60]=st,t[61]=S,t[62]=ot,t[63]=qt):qt=t[63];let Tt;t[64]!==At||t[65]!==qt?(Tt=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:c,children:[At,qt]}),t[64]=At,t[65]=qt,t[66]=Tt):Tt=t[66];let Ft;t[67]!==a?.footnote||t[68]!==a?.source||t[69]!==gt||t[70]!==n||t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==E?(Ft=n||gt?l.jsxRuntimeExports.jsx(le.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:n,footNote:gt,width:E}):null,t[67]=a?.footnote,t[68]=a?.source,t[69]=gt,t[70]=n,t[71]=p?.footnote,t[72]=p?.source,t[73]=E,t[74]=Ft):Ft=t[74];let Ut;return t[75]!==$||t[76]!==Q||t[77]!==dt||t[78]!==d||t[79]!==U||t[80]!==G||t[81]!==_||t[82]!==et||t[83]!==Gt||t[84]!==Wt||t[85]!==St||t[86]!==$t||t[87]!==Tt||t[88]!==Ft||t[89]!==y||t[90]!==E?(Ut=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:Gt,style:Wt,id:dt,ref:Xt,"aria-label":$,backgroundColor:Q,theme:y,language:U,minHeight:G,width:E,height:d,relativeHeight:et,padding:_,children:[St,$t,Tt,Ft]}),t[75]=$,t[76]=Q,t[77]=dt,t[78]=d,t[79]=U,t[80]=G,t[81]=_,t[82]=et,t[83]=Gt,t[84]=Wt,t[85]=St,t[86]=$t,t[87]=Tt,t[88]=Ft,t[89]=y,t[90]=E,t[91]=Ut):Ut=t[91],Ut}function so(e){return e.color}function ao(e){return e.color}function co(e){return e.color}function uo(e){return e!==void 0}function fo(e){return e!==void 0}function po(e){return e.data}function mo(e){return e!==void 0}function xo(e){return e.data}exports.StripChart=lo;
2
2
  //# sourceMappingURL=StripChart.cjs.map
@@ -13,7 +13,7 @@ import { u as oe } from "./use-in-view-Dl5L8LtP.js";
13
13
  import { A as ne } from "./index-CtMBjvtq.js";
14
14
  import { u as Qt } from "./uniqBy-BHy4I8PK.js";
15
15
  import { a as ae, G as se } from "./GraphContainer-CF6ws3pd.js";
16
- import { E as ce } from "./EmptyState-tZBErBKF.js";
16
+ import { E as ce } from "./EmptyState-Pj-emXt5.js";
17
17
  import { ColorLegendWithMouseOver as ue } from "./ColorLegendWithMouseOver.js";
18
18
  import { GraphFooter as fe } from "./GraphFooter.js";
19
19
  import { GraphHeader as pe } from "./GraphHeader.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),h=require("react"),nt=require("./Spinner-jTMOLuw_.cjs"),lt=require("react-globe.gl"),ct=require("./index-DQA8q5sC.cjs"),dt=require("three"),Ke=require("./Typography-sa1UE0oF.cjs"),ut=require("./_commonjsHelpers-BH3jXuIh.cjs"),pt=require("./Tooltip-BLa2EfMs.cjs"),ht=require("./numberFormattingFunction-02t-wJta.cjs"),mt=require("./index-C6er0ety.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-DHttOA80.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),Qe=require("./GraphContainer-B1EDxJ0S.cjs");function Rt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const U=Rt(dt);var Ye,et;function St(){if(et)return Ye;et=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),q=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:q}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},R=function(o,l){var v=o.r,a=o.g,j=o.b,q=o.a,P=w(l)?l:q;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return R(j,l)};return Ye=f,Ye}var Et=St();const tt=ut.getDefaultExportFromCjs(Et);function Dt(t){let e;switch(t.type){case"ambient":e=new U.AmbientLight(t.color,t.intensity);break;case"directional":e=new U.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new U.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new U.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:R,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:q,tooltip:P,styles:fe,classNames:_,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:$,onSeriesMouseClick:V,onSeriesMouseOver:ve,resetSelectionOnDoubleClick:ye,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:W,centerLat:Z,atmosphereAltitude:ie,globeCurvatureResolution:J,fogSettings:L,lights:z,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:X,dimmedOpacity:A}=t,[B,be]=h.useState(!1),u=h.useRef(void 0),[H,N]=h.useState(void 0),[we,ne]=h.useState(X===void 0?!(e<680):!X),[le,ce]=h.useState({x:0,y:0}),[S,de]=h.useState(void 0),Y=R?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(S||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[S,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{ce({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:Z,lng:W,altitude:M},1e3)},[M,W,Z]);const E=o||new U.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof U.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),z.map(p=>Dt(p)).forEach((p,D)=>{z[D].type!=="ambient"&&z[D].position==="camera"?(s.add(p),z[D].type!=="point"&&s.add(p.target)):r.add(p)}),L&&(r.fog=new U.Fog(L.color,L.near,L.far))},[z,L]),k=()=>{be(!0),G()};return h.useEffect(()=>{B&&G()},[B,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(lt,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===S?.id||r?.properties?.[a]===H?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(D=>D.id===d)?.x,p=b!=null?Y(b):oe;return tt(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(D=>D.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?Y(d):oe;return tt(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===S?.id?se:j,onGlobeClick:()=>{N(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;(V||$)&&(ct.isEqual(H,s)&&ye&&s?(N(void 0),V?.(void 0)):(N(s),V?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ve?.(s)},atmosphereColor:q,atmosphereAltitude:ie,globeCurvatureResolution:J,globeMaterial:E,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:Z,lng:W});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),k()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:we?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.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:()=>{ne(!1)},children:i.jsxRuntimeExports.jsx(mt.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:R?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke.j,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,R?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke.j,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:ht.numberFormattingFunction(r,"NA")})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{ne(!0)},children:i.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S&&P?i.jsxRuntimeExports.jsx(pt.Tooltip,{data:S,body:P,xPos:le.x,yPos:le.y,backgroundStyle:fe?.tooltip,className:_?.tooltip}):null,$&&H!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:$,data:H,setData:N,className:_?.modal}):null]})}function kt(t){const e=i.compilerRuntimeExports.c(97),{data:n,mapData:x,graphTitle:w,colors:R,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:q,padding:P,mapNoDataColor:fe,backgroundColor:_,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:$,dataDownload:V,language:ve,minHeight:ye,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:W,enableZoom:Z,globeMaterial:ie,centerPoint:J,atmosphereColor:L,showColorScale:z,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,highlightedIds:B,highlightedAltitude:be,dimmedOpacity:u,scale:H,globeOffset:N,polygonAltitude:we,globeCurvatureResolution:ne,atmosphereAltitude:le,fogSettings:ce,lights:S,selectedId:de,collapseColorScaleByDefault:Y}=t,E=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===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.":v,k=q===void 0?"threshold":q,r=fe===void 0?te.Colors.light.graphNoData:fe,s=_===void 0?!1:_,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=$===void 0?"ISO3":$,p=V===void 0?!1:V,D=ve===void 0?"en":ve,O=ye===void 0?0:ye,F=T===void 0?"light":T,ue=W===void 0?!0:W,Le=Z===void 0?!0:Z;let je;e[0]!==J?(je=J===void 0?[0,0]:J,e[0]=J,e[1]=je):je=e[1];const Ce=je,ze=L===void 0?"#999":L,Ae=z===void 0?!0:z,Ge=ae===void 0?!0:ae;let Re;e[2]!==B?(Re=B===void 0?[]:B,e[2]=B,e[3]=Re):Re=e[3];const Fe=Re,Be=be===void 0?.1:be,He=u===void 0?.3:u,Ie=H===void 0?1:H;let Se;e[4]!==N?(Se=N===void 0?[0,0]:N,e[4]=N,e[5]=Se):Se=e[5];const Ue=Se,_e=we===void 0?.01:we,$e=ne===void 0?4:ne,Ve=le===void 0?.15:le;let Ee;e[6]!==S?(Ee=S===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:S,e[6]=S,e[7]=Ee):Ee=e[7];const We=Ee,[De,ot]=h.useState(void 0),[I,rt]=h.useState(0),[pe,st]=h.useState(0),Ze=h.useRef(null),it=h.useRef(null);let Ne,ke;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const ge=new ResizeObserver(xe=>{rt(xe[0].target.clientWidth||620),st(xe[0].target.clientHeight||480)});return Ze.current&&ge.observe(Ze.current),()=>ge.disconnect()},ke=[],e[8]=Ne,e[9]=ke):(Ne=e[8],ke=e[9]),h.useEffect(Ne,ke);let Oe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Oe=ge=>{ot(ge)},e[10]=Oe):Oe=e[10];const he=h.useEffectEvent(Oe);let qe;e[11]!==E||e[12]!==he?(qe=()=>{typeof E=="string"?wt.fetchAndParseJSON(E).then(xe=>{if(E==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const at=xe.features.map(zt);he(at)}else he(xe.features)}):he(E.features)},e[11]=E,e[12]=he,e[13]=qe):qe=e[13];let Pe;e[14]!==E?(Pe=[E],e[14]=E,e[15]=Pe):Pe=e[15],h.useEffect(qe,Pe);let Te;e[16]!==a||e[17]!==R?.length||e[18]!==n||e[19]!==k?(Te=a||(k==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(Lt),R?.length||4)),e[16]=a,e[17]=R?.length,e[18]=n,e[19]=k,e[20]=Te):Te=e[20];const me=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[21]!==g?.description||e[22]!==g?.title||e[23]!==n||e[24]!==p||e[25]!==c||e[26]!==w||e[27]!==m?.description||e[28]!==m?.title||e[29]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(qt):n.filter(Ot):null}):null,e[21]=g?.description,e[22]=g?.title,e[23]=n,e[24]=p,e[25]=c,e[26]=w,e[27]=m?.description,e[28]=m?.title,e[29]=l,e[30]=K):K=e[30];let Q;e[31]!==Ve||e[32]!==ze||e[33]!==ue||e[34]!==Ce||e[35]!==g||e[36]!==Y||e[37]!==j||e[38]!==R||e[39]!==n||e[40]!==y||e[41]!==He||e[42]!==me||e[43]!==Le||e[44]!==ce||e[45]!==$e||e[46]!==ie||e[47]!==Ue||e[48]!==o||e[49]!==Be||e[50]!==Fe||e[51]!==We||e[52]!==d||e[53]!==r||e[54]!==b||e[55]!==De||e[56]!==O||e[57]!==A||e[58]!==X||e[59]!==_e||e[60]!==C||e[61]!==Ge||e[62]!==Ie||e[63]!==k||e[64]!==de||e[65]!==Ae||e[66]!==m||e[67]!==pe||e[68]!==I||e[69]!==F||e[70]!==re||e[71]!==l?(Q=i.jsxRuntimeExports.jsx(Qe.GraphArea,{ref:Ze,children:I&&pe&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:Ue,polygonData:De,colorDomain:me,width:I,height:pe,colors:R||(k==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${me.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${me.length+1}`]),mapNoDataColor:r,categorical:k==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:ue===!0?1.5:ue===!1?0:ue,enableZoom:Le,globeMaterial:ie,atmosphereColor:ze,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:Fe,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,scale:Ie,polygonAltitude:_e,centerLat:Ce[0],centerLng:Ce[1],atmosphereAltitude:Ve,globeCurvatureResolution:$e,fogSettings:ce,lights:We,highlightedAltitude:Be,selectedId:de,collapseColorScaleByDefault:Y,dimmedOpacity:He}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,o||(C?O?(l||I)*C>O?(l||I)*C:O:(l||I)*C:pe))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(nt.w,{"aria-label":"Loading graph"})})}),e[31]=Ve,e[32]=ze,e[33]=ue,e[34]=Ce,e[35]=g,e[36]=Y,e[37]=j,e[38]=R,e[39]=n,e[40]=y,e[41]=He,e[42]=me,e[43]=Le,e[44]=ce,e[45]=$e,e[46]=ie,e[47]=Ue,e[48]=o,e[49]=Be,e[50]=Fe,e[51]=We,e[52]=d,e[53]=r,e[54]=b,e[55]=De,e[56]=O,e[57]=A,e[58]=X,e[59]=_e,e[60]=C,e[61]=Ge,e[62]=Ie,e[63]=k,e[64]=de,e[65]=Ae,e[66]=m,e[67]=pe,e[68]=I,e[69]=F,e[70]=re,e[71]=l,e[72]=Q):Q=e[72];let ee;e[73]!==g?.footnote||e[74]!==g?.source||e[75]!==G||e[76]!==f||e[77]!==m?.footnote||e[78]!==m?.source||e[79]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[73]=g?.footnote,e[74]=g?.source,e[75]=G,e[76]=f,e[77]=m?.footnote,e[78]=m?.source,e[79]=l,e[80]=ee):ee=e[80];let Me;return e[81]!==M||e[82]!==s||e[83]!==se||e[84]!==o||e[85]!==D||e[86]!==O||e[87]!==P||e[88]!==C||e[89]!==Je||e[90]!==Xe||e[91]!==K||e[92]!==Q||e[93]!==ee||e[94]!==F||e[95]!==l?(Me=i.jsxRuntimeExports.jsxs(Qe.GraphContainer,{className:Je,style:Xe,id:se,ref:it,"aria-label":M,backgroundColor:s,theme:F,language:D,minHeight:O,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[81]=M,e[82]=s,e[83]=se,e[84]=o,e[85]=D,e[86]=O,e[87]=P,e[88]=C,e[89]=Je,e[90]=Xe,e[91]=K,e[92]=Q,e[93]=ee,e[94]=F,e[95]=l,e[96]=Me):Me=e[96],Me}function Ot(t){return t!==void 0}function qt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function Lt(t){return t.x}function zt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=kt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),h=require("react"),nt=require("./Spinner-jTMOLuw_.cjs"),lt=require("react-globe.gl"),ct=require("./index-DQA8q5sC.cjs"),dt=require("three"),Ke=require("./Typography-DrJ7IOdw.cjs"),ut=require("./_commonjsHelpers-BH3jXuIh.cjs"),pt=require("./Tooltip-BLa2EfMs.cjs"),ht=require("./numberFormattingFunction-02t-wJta.cjs"),mt=require("./index-sbKVyHS2.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-DHttOA80.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),Qe=require("./GraphContainer-B1EDxJ0S.cjs");function Rt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const _=Rt(dt);var Ye,et;function St(){if(et)return Ye;et=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),q=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:q}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},R=function(o,l){var v=o.r,a=o.g,j=o.b,q=o.a,P=w(l)?l:q;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return R(j,l)};return Ye=f,Ye}var Et=St();const tt=ut.getDefaultExportFromCjs(Et);function Dt(t){let e;switch(t.type){case"ambient":e=new _.AmbientLight(t.color,t.intensity);break;case"directional":e=new _.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new _.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new _.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:R,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:q,tooltip:P,styles:fe,classNames:U,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:$,onSeriesMouseClick:V,onSeriesMouseOver:ve,resetSelectionOnDoubleClick:ye,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:W,centerLat:Z,atmosphereAltitude:ie,globeCurvatureResolution:J,fogSettings:L,lights:z,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:X,dimmedOpacity:A}=t,[B,be]=h.useState(!1),u=h.useRef(void 0),[H,N]=h.useState(void 0),[we,ne]=h.useState(X===void 0?!(e<680):!X),[le,ce]=h.useState({x:0,y:0}),[S,de]=h.useState(void 0),Y=R?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(S||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[S,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{ce({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:Z,lng:W,altitude:M},1e3)},[M,W,Z]);const E=o||new _.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof _.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),z.map(p=>Dt(p)).forEach((p,D)=>{z[D].type!=="ambient"&&z[D].position==="camera"?(s.add(p),z[D].type!=="point"&&s.add(p.target)):r.add(p)}),L&&(r.fog=new _.Fog(L.color,L.near,L.far))},[z,L]),k=()=>{be(!0),G()};return h.useEffect(()=>{B&&G()},[B,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(lt,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===S?.id||r?.properties?.[a]===H?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(D=>D.id===d)?.x,p=b!=null?Y(b):oe;return tt(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(D=>D.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?Y(d):oe;return tt(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===S?.id?se:j,onGlobeClick:()=>{N(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;(V||$)&&(ct.isEqual(H,s)&&ye&&s?(N(void 0),V?.(void 0)):(N(s),V?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ve?.(s)},atmosphereColor:q,atmosphereAltitude:ie,globeCurvatureResolution:J,globeMaterial:E,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:Z,lng:W});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),k()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",U?.colorLegend),children:we?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.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:()=>{ne(!1)},children:i.jsxRuntimeExports.jsx(mt.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:R?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,R?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:ht.numberFormattingFunction(r,"NA")})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{ne(!0)},children:i.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S&&P?i.jsxRuntimeExports.jsx(pt.Tooltip,{data:S,body:P,xPos:le.x,yPos:le.y,backgroundStyle:fe?.tooltip,className:U?.tooltip}):null,$&&H!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:$,data:H,setData:N,className:U?.modal}):null]})}function kt(t){const e=i.compilerRuntimeExports.c(97),{data:n,mapData:x,graphTitle:w,colors:R,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:q,padding:P,mapNoDataColor:fe,backgroundColor:U,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:$,dataDownload:V,language:ve,minHeight:ye,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:W,enableZoom:Z,globeMaterial:ie,centerPoint:J,atmosphereColor:L,showColorScale:z,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,highlightedIds:B,highlightedAltitude:be,dimmedOpacity:u,scale:H,globeOffset:N,polygonAltitude:we,globeCurvatureResolution:ne,atmosphereAltitude:le,fogSettings:ce,lights:S,selectedId:de,collapseColorScaleByDefault:Y}=t,E=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===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.":v,k=q===void 0?"threshold":q,r=fe===void 0?te.Colors.light.graphNoData:fe,s=U===void 0?!1:U,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=$===void 0?"ISO3":$,p=V===void 0?!1:V,D=ve===void 0?"en":ve,O=ye===void 0?0:ye,F=T===void 0?"light":T,ue=W===void 0?!0:W,Le=Z===void 0?!0:Z;let je;e[0]!==J?(je=J===void 0?[0,0]:J,e[0]=J,e[1]=je):je=e[1];const Ce=je,ze=L===void 0?"#999":L,Ae=z===void 0?!0:z,Ge=ae===void 0?!0:ae;let Re;e[2]!==B?(Re=B===void 0?[]:B,e[2]=B,e[3]=Re):Re=e[3];const Fe=Re,Be=be===void 0?.1:be,He=u===void 0?.3:u,Ie=H===void 0?1:H;let Se;e[4]!==N?(Se=N===void 0?[0,0]:N,e[4]=N,e[5]=Se):Se=e[5];const _e=Se,Ue=we===void 0?.01:we,$e=ne===void 0?4:ne,Ve=le===void 0?.15:le;let Ee;e[6]!==S?(Ee=S===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:S,e[6]=S,e[7]=Ee):Ee=e[7];const We=Ee,[De,ot]=h.useState(void 0),[I,rt]=h.useState(0),[pe,st]=h.useState(0),Ze=h.useRef(null),it=h.useRef(null);let Ne,ke;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const ge=new ResizeObserver(xe=>{rt(xe[0].target.clientWidth||620),st(xe[0].target.clientHeight||480)});return Ze.current&&ge.observe(Ze.current),()=>ge.disconnect()},ke=[],e[8]=Ne,e[9]=ke):(Ne=e[8],ke=e[9]),h.useEffect(Ne,ke);let Oe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Oe=ge=>{ot(ge)},e[10]=Oe):Oe=e[10];const he=h.useEffectEvent(Oe);let qe;e[11]!==E||e[12]!==he?(qe=()=>{typeof E=="string"?wt.fetchAndParseJSON(E).then(xe=>{if(E==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const at=xe.features.map(zt);he(at)}else he(xe.features)}):he(E.features)},e[11]=E,e[12]=he,e[13]=qe):qe=e[13];let Pe;e[14]!==E?(Pe=[E],e[14]=E,e[15]=Pe):Pe=e[15],h.useEffect(qe,Pe);let Te;e[16]!==a||e[17]!==R?.length||e[18]!==n||e[19]!==k?(Te=a||(k==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(Lt),R?.length||4)),e[16]=a,e[17]=R?.length,e[18]=n,e[19]=k,e[20]=Te):Te=e[20];const me=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[21]!==g?.description||e[22]!==g?.title||e[23]!==n||e[24]!==p||e[25]!==c||e[26]!==w||e[27]!==m?.description||e[28]!==m?.title||e[29]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(qt):n.filter(Ot):null}):null,e[21]=g?.description,e[22]=g?.title,e[23]=n,e[24]=p,e[25]=c,e[26]=w,e[27]=m?.description,e[28]=m?.title,e[29]=l,e[30]=K):K=e[30];let Q;e[31]!==Ve||e[32]!==ze||e[33]!==ue||e[34]!==Ce||e[35]!==g||e[36]!==Y||e[37]!==j||e[38]!==R||e[39]!==n||e[40]!==y||e[41]!==He||e[42]!==me||e[43]!==Le||e[44]!==ce||e[45]!==$e||e[46]!==ie||e[47]!==_e||e[48]!==o||e[49]!==Be||e[50]!==Fe||e[51]!==We||e[52]!==d||e[53]!==r||e[54]!==b||e[55]!==De||e[56]!==O||e[57]!==A||e[58]!==X||e[59]!==Ue||e[60]!==C||e[61]!==Ge||e[62]!==Ie||e[63]!==k||e[64]!==de||e[65]!==Ae||e[66]!==m||e[67]!==pe||e[68]!==I||e[69]!==F||e[70]!==re||e[71]!==l?(Q=i.jsxRuntimeExports.jsx(Qe.GraphArea,{ref:Ze,children:I&&pe&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:_e,polygonData:De,colorDomain:me,width:I,height:pe,colors:R||(k==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${me.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${me.length+1}`]),mapNoDataColor:r,categorical:k==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:ue===!0?1.5:ue===!1?0:ue,enableZoom:Le,globeMaterial:ie,atmosphereColor:ze,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:Fe,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,scale:Ie,polygonAltitude:Ue,centerLat:Ce[0],centerLng:Ce[1],atmosphereAltitude:Ve,globeCurvatureResolution:$e,fogSettings:ce,lights:We,highlightedAltitude:Be,selectedId:de,collapseColorScaleByDefault:Y,dimmedOpacity:He}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,o||(C?O?(l||I)*C>O?(l||I)*C:O:(l||I)*C:pe))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(nt.w,{"aria-label":"Loading graph"})})}),e[31]=Ve,e[32]=ze,e[33]=ue,e[34]=Ce,e[35]=g,e[36]=Y,e[37]=j,e[38]=R,e[39]=n,e[40]=y,e[41]=He,e[42]=me,e[43]=Le,e[44]=ce,e[45]=$e,e[46]=ie,e[47]=_e,e[48]=o,e[49]=Be,e[50]=Fe,e[51]=We,e[52]=d,e[53]=r,e[54]=b,e[55]=De,e[56]=O,e[57]=A,e[58]=X,e[59]=Ue,e[60]=C,e[61]=Ge,e[62]=Ie,e[63]=k,e[64]=de,e[65]=Ae,e[66]=m,e[67]=pe,e[68]=I,e[69]=F,e[70]=re,e[71]=l,e[72]=Q):Q=e[72];let ee;e[73]!==g?.footnote||e[74]!==g?.source||e[75]!==G||e[76]!==f||e[77]!==m?.footnote||e[78]!==m?.source||e[79]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[73]=g?.footnote,e[74]=g?.source,e[75]=G,e[76]=f,e[77]=m?.footnote,e[78]=m?.source,e[79]=l,e[80]=ee):ee=e[80];let Me;return e[81]!==M||e[82]!==s||e[83]!==se||e[84]!==o||e[85]!==D||e[86]!==O||e[87]!==P||e[88]!==C||e[89]!==Je||e[90]!==Xe||e[91]!==K||e[92]!==Q||e[93]!==ee||e[94]!==F||e[95]!==l?(Me=i.jsxRuntimeExports.jsxs(Qe.GraphContainer,{className:Je,style:Xe,id:se,ref:it,"aria-label":M,backgroundColor:s,theme:F,language:D,minHeight:O,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[81]=M,e[82]=s,e[83]=se,e[84]=o,e[85]=D,e[86]=O,e[87]=P,e[88]=C,e[89]=Je,e[90]=Xe,e[91]=K,e[92]=Q,e[93]=ee,e[94]=F,e[95]=l,e[96]=Me):Me=e[96],Me}function Ot(t){return t!==void 0}function qt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function Lt(t){return t.x}function zt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=kt;
2
2
  //# sourceMappingURL=ThreeDGlobe.cjs.map
@@ -4,11 +4,11 @@ import { w as ht } from "./Spinner--r2RrJV8.js";
4
4
  import mt from "react-globe.gl";
5
5
  import { i as ut } from "./index-Bwrro8-q.js";
6
6
  import * as $ from "three";
7
- import { j as et } from "./Typography-hWfh3H0J.js";
7
+ import { _ as et } from "./Typography-iR8PEgdt.js";
8
8
  import { g as gt } from "./_commonjsHelpers-ByX85dGu.js";
9
9
  import { T as ft } from "./Tooltip-BRnAz2Gv.js";
10
10
  import { n as vt } from "./numberFormattingFunction-14YCbkN2.js";
11
- import { X as yt } from "./index-BQYOuXdl.js";
11
+ import { X as yt } from "./index-B-4y_iGB.js";
12
12
  import { g as bt } from "./getCentroidCoordinates-s0OOUjLF.js";
13
13
  import { D as xt } from "./DetailsModal-BMCTgVsk.js";
14
14
  import { o as wt } from "./ordinal-CHaxGJ_l.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),T=require("react"),$=require("./Typography-sa1UE0oF.cjs"),q=require("./numberFormattingFunction-02t-wJta.cjs");function F(A){const e=o.compilerRuntimeExports.c(52),{colorLegendTitle:k,colorDomain:r,colors:t,setSelectedColor:s,width:W,naColor:i,className:w,showNAColor:C}=A,[l,x]=T.useState(void 0),n=i?320:360;let c;e[0]!==w?(c=o.mo("flex flex-wrap gap-0 justify-center leading-0",w),e[0]=w,e[1]=c):c=e[1];const D=W?`${W}px`:"none";let m;e[2]!==D?(m={maxWidth:D},e[2]=D,e[3]=m):m=e[3];let h;e[4]!==k?(h=k&&k!==""?o.jsxRuntimeExports.jsx($.j,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:k}):null,e[4]=k,e[5]=h):h=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E={maxWidth:"360px"},e[6]=E):E=e[6];let d;if(e[7]!==r||e[8]!==t||e[9]!==l||e[10]!==n||e[11]!==s){let R;e[13]!==t||e[14]!==l||e[15]!==n||e[16]!==s?(R=(S,a)=>o.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{x(t[a]),s(t[a])},onMouseLeave:()=>{x(void 0),s(void 0)},className:"cursor-pointer",children:[o.jsxRuntimeExports.jsx("rect",{x:a*n/t.length+1,y:1,width:n/t.length-2,height:8,className:`stroke-1 ${l===t[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[a],...l!==t[a]?{stroke:t[a]}:{}}}),o.jsxRuntimeExports.jsx("text",{x:(a+1)*n/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"middle"},children:q.numberFormattingFunction(S,"NA",2,"","")})]},a),e[13]=t,e[14]=l,e[15]=n,e[16]=s,e[17]=R):R=e[17],d=r.map(R),e[7]=r,e[8]=t,e[9]=l,e[10]=n,e[11]=s,e[12]=d}else d=e[12];let g;e[18]!==r.length||e[19]!==t||e[20]!==s?(g=()=>{x(t[r.length]),s(t[r.length])},e[18]=r.length,e[19]=t,e[20]=s,e[21]=g):g=e[21];let u;e[22]!==s?(u=()=>{x(void 0),s(void 0)},e[22]=s,e[23]=u):u=e[23];const M=r.length*n/t.length+1,b=n/t.length-2,L=`cursor-pointer stroke-1 ${l===t[r.length]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,O=t[r.length];let y;e[24]!==r.length||e[25]!==t||e[26]!==l?(y=l!==t[r.length]?{stroke:t[r.length]}:{},e[24]=r.length,e[25]=t,e[26]=l,e[27]=y):y=e[27];let p;e[28]!==O||e[29]!==y?(p={fill:O,...y},e[28]=O,e[29]=y,e[30]=p):p=e[30];let f;e[31]!==L||e[32]!==p||e[33]!==g||e[34]!==u||e[35]!==M||e[36]!==b?(f=o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("rect",{onMouseOver:g,onMouseLeave:u,x:M,y:1,width:b,height:8,className:L,style:p})}),e[31]=L,e[32]=p,e[33]=g,e[34]=u,e[35]=M,e[36]=b,e[37]=f):f=e[37];let j;e[38]!==l||e[39]!==i||e[40]!==s||e[41]!==C?(j=C?o.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{x(i||"#D4D6D8"),s(i||"#D4D6D8")},onMouseLeave:()=>{x(void 0),s(void 0)},className:"cursor-pointer",children:[o.jsxRuntimeExports.jsx("rect",{x:335,y:1,width:24,height:8,className:`stroke-1 ${l===i?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:i||"#D4D6D8",...l!==i?{stroke:i}:{},strokeWidth:1}}),o.jsxRuntimeExports.jsx("text",{x:337.5,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},children:"NA"})]}):null,e[38]=l,e[39]=i,e[40]=s,e[41]=C,e[42]=j):j=e[42];let v;e[43]!==f||e[44]!==j||e[45]!==d?(v=o.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 360 30",style:E,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{children:[d,f,j]})}),e[43]=f,e[44]=j,e[45]=d,e[46]=v):v=e[46];let N;return e[47]!==c||e[48]!==v||e[49]!==m||e[50]!==h?(N=o.jsxRuntimeExports.jsxs("div",{className:c,style:m,"aria-label":"Color legend",children:[h,v]}),e[47]=c,e[48]=v,e[49]=m,e[50]=h,e[51]=N):N=e[51],N}exports.ThresholdColorLegendWithMouseOver=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),T=require("react"),$=require("./Typography-DrJ7IOdw.cjs"),q=require("./numberFormattingFunction-02t-wJta.cjs");function F(A){const e=o.compilerRuntimeExports.c(52),{colorLegendTitle:k,colorDomain:r,colors:t,setSelectedColor:s,width:W,naColor:i,className:w,showNAColor:C}=A,[l,x]=T.useState(void 0),n=i?320:360;let c;e[0]!==w?(c=o.mo("flex flex-wrap gap-0 justify-center leading-0",w),e[0]=w,e[1]=c):c=e[1];const D=W?`${W}px`:"none";let m;e[2]!==D?(m={maxWidth:D},e[2]=D,e[3]=m):m=e[3];let h;e[4]!==k?(h=k&&k!==""?o.jsxRuntimeExports.jsx($._,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:k}):null,e[4]=k,e[5]=h):h=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E={maxWidth:"360px"},e[6]=E):E=e[6];let d;if(e[7]!==r||e[8]!==t||e[9]!==l||e[10]!==n||e[11]!==s){let R;e[13]!==t||e[14]!==l||e[15]!==n||e[16]!==s?(R=(S,a)=>o.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{x(t[a]),s(t[a])},onMouseLeave:()=>{x(void 0),s(void 0)},className:"cursor-pointer",children:[o.jsxRuntimeExports.jsx("rect",{x:a*n/t.length+1,y:1,width:n/t.length-2,height:8,className:`stroke-1 ${l===t[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[a],...l!==t[a]?{stroke:t[a]}:{}}}),o.jsxRuntimeExports.jsx("text",{x:(a+1)*n/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"middle"},children:q.numberFormattingFunction(S,"NA",2,"","")})]},a),e[13]=t,e[14]=l,e[15]=n,e[16]=s,e[17]=R):R=e[17],d=r.map(R),e[7]=r,e[8]=t,e[9]=l,e[10]=n,e[11]=s,e[12]=d}else d=e[12];let g;e[18]!==r.length||e[19]!==t||e[20]!==s?(g=()=>{x(t[r.length]),s(t[r.length])},e[18]=r.length,e[19]=t,e[20]=s,e[21]=g):g=e[21];let u;e[22]!==s?(u=()=>{x(void 0),s(void 0)},e[22]=s,e[23]=u):u=e[23];const M=r.length*n/t.length+1,b=n/t.length-2,L=`cursor-pointer stroke-1 ${l===t[r.length]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,O=t[r.length];let y;e[24]!==r.length||e[25]!==t||e[26]!==l?(y=l!==t[r.length]?{stroke:t[r.length]}:{},e[24]=r.length,e[25]=t,e[26]=l,e[27]=y):y=e[27];let p;e[28]!==O||e[29]!==y?(p={fill:O,...y},e[28]=O,e[29]=y,e[30]=p):p=e[30];let f;e[31]!==L||e[32]!==p||e[33]!==g||e[34]!==u||e[35]!==M||e[36]!==b?(f=o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("rect",{onMouseOver:g,onMouseLeave:u,x:M,y:1,width:b,height:8,className:L,style:p})}),e[31]=L,e[32]=p,e[33]=g,e[34]=u,e[35]=M,e[36]=b,e[37]=f):f=e[37];let j;e[38]!==l||e[39]!==i||e[40]!==s||e[41]!==C?(j=C?o.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{x(i||"#D4D6D8"),s(i||"#D4D6D8")},onMouseLeave:()=>{x(void 0),s(void 0)},className:"cursor-pointer",children:[o.jsxRuntimeExports.jsx("rect",{x:335,y:1,width:24,height:8,className:`stroke-1 ${l===i?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:i||"#D4D6D8",...l!==i?{stroke:i}:{},strokeWidth:1}}),o.jsxRuntimeExports.jsx("text",{x:337.5,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},children:"NA"})]}):null,e[38]=l,e[39]=i,e[40]=s,e[41]=C,e[42]=j):j=e[42];let v;e[43]!==f||e[44]!==j||e[45]!==d?(v=o.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 360 30",style:E,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{children:[d,f,j]})}),e[43]=f,e[44]=j,e[45]=d,e[46]=v):v=e[46];let N;return e[47]!==c||e[48]!==v||e[49]!==m||e[50]!==h?(N=o.jsxRuntimeExports.jsxs("div",{className:c,style:m,"aria-label":"Color legend",children:[h,v]}),e[47]=c,e[48]=v,e[49]=m,e[50]=h,e[51]=N):N=e[51],N}exports.ThresholdColorLegendWithMouseOver=F;
2
2
  //# sourceMappingURL=ThresholdColorLegendWithMouseOver.cjs.map