@undp/data-viz 2.4.1 → 2.5.1

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 (271) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.d.ts +11 -9
  4. package/dist/AreaChart.js +320 -322
  5. package/dist/AreaChart.js.map +1 -1
  6. package/dist/BarGraph.cjs +1 -1
  7. package/dist/BarGraph.cjs.map +1 -1
  8. package/dist/BarGraph.d.ts +15 -25
  9. package/dist/BarGraph.js +1694 -1694
  10. package/dist/BarGraph.js.map +1 -1
  11. package/dist/BasicStatCard.cjs +1 -1
  12. package/dist/BasicStatCard.cjs.map +1 -1
  13. package/dist/BasicStatCard.d.ts +13 -9
  14. package/dist/BasicStatCard.js +79 -81
  15. package/dist/BasicStatCard.js.map +1 -1
  16. package/dist/BeeSwarmChart.cjs +1 -1
  17. package/dist/BeeSwarmChart.cjs.map +1 -1
  18. package/dist/BeeSwarmChart.d.ts +11 -9
  19. package/dist/BeeSwarmChart.js +335 -336
  20. package/dist/BeeSwarmChart.js.map +1 -1
  21. package/dist/BiVariateChoroplethMap.cjs +1 -1
  22. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  23. package/dist/BiVariateChoroplethMap.d.ts +13 -3
  24. package/dist/BiVariateChoroplethMap.js +309 -304
  25. package/dist/BiVariateChoroplethMap.js.map +1 -1
  26. package/dist/BulletChart.cjs +1 -1
  27. package/dist/BulletChart.cjs.map +1 -1
  28. package/dist/BulletChart.d.ts +11 -5
  29. package/dist/BulletChart.js +560 -559
  30. package/dist/BulletChart.js.map +1 -1
  31. package/dist/ButterflyChart.cjs +1 -1
  32. package/dist/ButterflyChart.cjs.map +1 -1
  33. package/dist/ButterflyChart.d.ts +11 -9
  34. package/dist/ButterflyChart.js +348 -350
  35. package/dist/ButterflyChart.js.map +1 -1
  36. package/dist/ChoroplethMap.cjs +1 -1
  37. package/dist/ChoroplethMap.cjs.map +1 -1
  38. package/dist/ChoroplethMap.d.ts +11 -3
  39. package/dist/ChoroplethMap.js +314 -311
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.d.ts +11 -9
  43. package/dist/CirclePackingGraph.js +1 -1
  44. package/dist/DataCards.cjs +1 -1
  45. package/dist/DataCards.d.ts +1 -1
  46. package/dist/DataCards.js +1 -1
  47. package/dist/DataTable.cjs +1 -1
  48. package/dist/DataTable.cjs.map +1 -1
  49. package/dist/DataTable.d.ts +4 -5
  50. package/dist/DataTable.js +114 -116
  51. package/dist/DataTable.js.map +1 -1
  52. package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
  53. package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
  54. package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
  55. package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
  56. package/dist/DifferenceLineChart.cjs +1 -1
  57. package/dist/DifferenceLineChart.cjs.map +1 -1
  58. package/dist/DifferenceLineChart.d.ts +11 -9
  59. package/dist/DifferenceLineChart.js +502 -504
  60. package/dist/DifferenceLineChart.js.map +1 -1
  61. package/dist/DonutChart.cjs +1 -1
  62. package/dist/DonutChart.cjs.map +1 -1
  63. package/dist/DonutChart.d.ts +14 -9
  64. package/dist/DonutChart.js +174 -179
  65. package/dist/DonutChart.js.map +1 -1
  66. package/dist/DotDensityMap.cjs +1 -1
  67. package/dist/DotDensityMap.cjs.map +1 -1
  68. package/dist/DotDensityMap.d.ts +1 -1
  69. package/dist/DotDensityMap.js +270 -267
  70. package/dist/DotDensityMap.js.map +1 -1
  71. package/dist/DualAxisLineChart.cjs +1 -1
  72. package/dist/DualAxisLineChart.cjs.map +1 -1
  73. package/dist/DualAxisLineChart.d.ts +13 -9
  74. package/dist/DualAxisLineChart.js +341 -351
  75. package/dist/DualAxisLineChart.js.map +1 -1
  76. package/dist/DumbbellChart.cjs +1 -1
  77. package/dist/DumbbellChart.cjs.map +1 -1
  78. package/dist/DumbbellChart.d.ts +11 -9
  79. package/dist/DumbbellChart.js +592 -593
  80. package/dist/DumbbellChart.js.map +1 -1
  81. package/dist/GeoHubCompareMaps.cjs +1 -1
  82. package/dist/GeoHubCompareMaps.d.ts +1 -1
  83. package/dist/GeoHubCompareMaps.js +1 -1
  84. package/dist/GeoHubMap.cjs +1 -1
  85. package/dist/GeoHubMap.d.ts +1 -1
  86. package/dist/GeoHubMap.js +1 -1
  87. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  88. package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
  89. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  90. package/dist/GraphEl-BgkDbq50.cjs +2 -0
  91. package/dist/GraphEl-BgkDbq50.cjs.map +1 -0
  92. package/dist/GraphEl-Ch0uAeZw.js +1830 -0
  93. package/dist/GraphEl-Ch0uAeZw.js.map +1 -0
  94. package/dist/GriddedGraphs.cjs +1 -1
  95. package/dist/GriddedGraphs.d.ts +29 -16
  96. package/dist/GriddedGraphs.js +1 -1
  97. package/dist/GriddedGraphsFromConfig.d.ts +29 -16
  98. package/dist/HeatMap.cjs +1 -1
  99. package/dist/HeatMap.cjs.map +1 -1
  100. package/dist/HeatMap.d.ts +11 -9
  101. package/dist/HeatMap.js +203 -205
  102. package/dist/HeatMap.js.map +1 -1
  103. package/dist/Histogram.cjs +1 -1
  104. package/dist/Histogram.cjs.map +1 -1
  105. package/dist/Histogram.d.ts +11 -5
  106. package/dist/Histogram.js +88 -89
  107. package/dist/Histogram.js.map +1 -1
  108. package/dist/HybridMap.cjs +1 -1
  109. package/dist/HybridMap.cjs.map +1 -1
  110. package/dist/HybridMap.d.ts +11 -3
  111. package/dist/HybridMap.js +339 -336
  112. package/dist/HybridMap.js.map +1 -1
  113. package/dist/ImageDownloadButton.cjs +1 -1
  114. package/dist/ImageDownloadButton.js +1 -1
  115. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  116. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  117. package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
  118. package/dist/LineChartWithConfidenceInterval.js +393 -395
  119. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  120. package/dist/LinearColorLegend.cjs +1 -1
  121. package/dist/LinearColorLegend.js +1 -1
  122. package/dist/MultiGraphDashboard.d.ts +29 -16
  123. package/dist/MultiGraphDashboardFromConfig.d.ts +29 -16
  124. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
  125. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
  126. package/dist/MultiLineAltChart.cjs +1 -1
  127. package/dist/MultiLineAltChart.cjs.map +1 -1
  128. package/dist/MultiLineAltChart.d.ts +11 -9
  129. package/dist/MultiLineAltChart.js +411 -413
  130. package/dist/MultiLineAltChart.js.map +1 -1
  131. package/dist/MultiLineChart.cjs +1 -1
  132. package/dist/MultiLineChart.cjs.map +1 -1
  133. package/dist/MultiLineChart.d.ts +11 -9
  134. package/dist/MultiLineChart.js +438 -440
  135. package/dist/MultiLineChart.js.map +1 -1
  136. package/dist/ParetoChart.cjs +1 -1
  137. package/dist/ParetoChart.cjs.map +1 -1
  138. package/dist/ParetoChart.d.ts +13 -13
  139. package/dist/ParetoChart.js +347 -355
  140. package/dist/ParetoChart.js.map +1 -1
  141. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +29 -16
  142. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +29 -16
  143. package/dist/PerformanceIntensiveScrollStory.d.ts +29 -16
  144. package/dist/RadarChart.cjs +1 -1
  145. package/dist/RadarChart.cjs.map +1 -1
  146. package/dist/RadarChart.d.ts +11 -5
  147. package/dist/RadarChart.js +213 -213
  148. package/dist/RadarChart.js.map +1 -1
  149. package/dist/SankeyChart.cjs +1 -1
  150. package/dist/SankeyChart.cjs.map +1 -1
  151. package/dist/SankeyChart.d.ts +11 -9
  152. package/dist/SankeyChart.js +448 -450
  153. package/dist/SankeyChart.js.map +1 -1
  154. package/dist/ScatterPlot.cjs +1 -1
  155. package/dist/ScatterPlot.cjs.map +1 -1
  156. package/dist/ScatterPlot.d.ts +15 -13
  157. package/dist/ScatterPlot.js +477 -483
  158. package/dist/ScatterPlot.js.map +1 -1
  159. package/dist/ScrollStory.d.ts +29 -16
  160. package/dist/SimpleLineChart.cjs +1 -1
  161. package/dist/SimpleLineChart.cjs.map +1 -1
  162. package/dist/SimpleLineChart.d.ts +11 -9
  163. package/dist/SimpleLineChart.js +362 -364
  164. package/dist/SimpleLineChart.js.map +1 -1
  165. package/dist/SingleGraphDashboard.cjs +1 -1
  166. package/dist/SingleGraphDashboard.d.ts +29 -16
  167. package/dist/SingleGraphDashboard.js +1 -1
  168. package/dist/SingleGraphDashboardFromConfig.d.ts +29 -16
  169. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +29 -16
  170. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +29 -16
  171. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  172. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  173. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +29 -16
  174. package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
  175. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  176. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +29 -16
  177. package/dist/SlopeChart.cjs +1 -1
  178. package/dist/SlopeChart.d.ts +1 -1
  179. package/dist/SlopeChart.js +2 -2
  180. package/dist/SparkLine.cjs +1 -1
  181. package/dist/SparkLine.d.ts +1 -1
  182. package/dist/SparkLine.js +1 -1
  183. package/dist/StatCardFromData.cjs +1 -1
  184. package/dist/StatCardFromData.cjs.map +1 -1
  185. package/dist/StatCardFromData.d.ts +11 -9
  186. package/dist/StatCardFromData.js +113 -116
  187. package/dist/StatCardFromData.js.map +1 -1
  188. package/dist/StripChart.cjs +1 -1
  189. package/dist/StripChart.cjs.map +1 -1
  190. package/dist/StripChart.d.ts +11 -9
  191. package/dist/StripChart.js +434 -435
  192. package/dist/StripChart.js.map +1 -1
  193. package/dist/ThreeDGlobe.cjs +1 -1
  194. package/dist/ThreeDGlobe.cjs.map +1 -1
  195. package/dist/ThreeDGlobe.d.ts +11 -3
  196. package/dist/ThreeDGlobe.js +143 -143
  197. package/dist/ThreeDGlobe.js.map +1 -1
  198. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  199. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  200. package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
  201. package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
  202. package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
  203. package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
  204. package/dist/TreeMapGraph.cjs +1 -1
  205. package/dist/TreeMapGraph.cjs.map +1 -1
  206. package/dist/TreeMapGraph.d.ts +11 -9
  207. package/dist/TreeMapGraph.js +369 -371
  208. package/dist/TreeMapGraph.js.map +1 -1
  209. package/dist/Types.d.ts +29 -16
  210. package/dist/UnitChart.cjs +1 -1
  211. package/dist/UnitChart.cjs.map +1 -1
  212. package/dist/UnitChart.d.ts +11 -5
  213. package/dist/UnitChart.js +118 -119
  214. package/dist/UnitChart.js.map +1 -1
  215. package/dist/WaterfallChart.cjs +1 -1
  216. package/dist/WaterfallChart.cjs.map +1 -1
  217. package/dist/WaterfallChart.d.ts +11 -9
  218. package/dist/WaterfallChart.js +306 -308
  219. package/dist/WaterfallChart.js.map +1 -1
  220. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
  221. package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
  222. package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
  223. package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
  224. package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
  225. package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
  226. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
  227. package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
  228. package/dist/{imageDownload-Diofs_vY.js → imageDownload-BYsNEtMS.js} +11 -11
  229. package/dist/{imageDownload-Diofs_vY.js.map → imageDownload-BYsNEtMS.js.map} +1 -1
  230. package/dist/{imageDownload-61q6jyJW.cjs → imageDownload-CkMwA7Cw.cjs} +4 -4
  231. package/dist/{imageDownload-61q6jyJW.cjs.map → imageDownload-CkMwA7Cw.cjs.map} +1 -1
  232. package/dist/index-BPyj_6hG.js +375 -0
  233. package/dist/index-BPyj_6hG.js.map +1 -0
  234. package/dist/index-DuLvdHo2.cjs +2 -0
  235. package/dist/index-DuLvdHo2.cjs.map +1 -0
  236. package/dist/index.cjs +1 -1
  237. package/dist/index.d.ts +108 -245
  238. package/dist/index.js +3 -3
  239. package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
  240. package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
  241. package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
  242. package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
  243. package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
  244. package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
  245. package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
  246. package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
  247. package/dist/style.css +1 -1
  248. package/dist/utils.cjs +1 -1
  249. package/dist/utils.d.ts +1 -1
  250. package/dist/utils.js +2 -2
  251. package/package.json +2 -2
  252. package/dist/GraphEl-B73N4RIA.js +0 -1906
  253. package/dist/GraphEl-B73N4RIA.js.map +0 -1
  254. package/dist/GraphEl-Lt1og0C-.cjs +0 -2
  255. package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
  256. package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
  257. package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
  258. package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
  259. package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
  260. package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
  261. package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
  262. package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
  263. package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
  264. package/dist/index-B0Awa_de.js +0 -377
  265. package/dist/index-B0Awa_de.js.map +0 -1
  266. package/dist/index-CP8cmNzt.cjs +0 -2
  267. package/dist/index-CP8cmNzt.cjs.map +0 -1
  268. package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
  269. package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
  270. package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
  271. package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
package/dist/Histogram.js CHANGED
@@ -1,50 +1,50 @@
1
- import { c as ce, j as V } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { w as fe } from "./Spinner-B2IIKg9r.js";
3
- import { e as oe, C as he } from "./index-B0Awa_de.js";
4
- import { TreeMapGraph as ue } from "./TreeMapGraph.js";
5
- import { DonutChart as me } from "./DonutChart.js";
6
- import { SimpleBarGraph as pe } from "./BarGraph.js";
7
- import { Colors as J } from "./Colors.js";
8
- import { b as ge } from "./init-BhZylTFx.js";
9
- import { b as ne, d as xe } from "./linear-DNXM5Pdl.js";
10
- function de(i, e) {
1
+ import { c as le, j as R } from "./index-CHPV5EwG-BzibaIRc.js";
2
+ import { w as se } from "./Spinner-B2IIKg9r.js";
3
+ import { e as re, C as ce } from "./index-BPyj_6hG.js";
4
+ import { TreeMapGraph as fe } from "./TreeMapGraph.js";
5
+ import { DonutChart as he } from "./DonutChart.js";
6
+ import { SimpleBarGraph as ue } from "./BarGraph.js";
7
+ import { Colors as q } from "./Colors.js";
8
+ import { b as me } from "./init-BhZylTFx.js";
9
+ import { b as ie, d as pe } from "./linear-DNXM5Pdl.js";
10
+ function ge(i, e) {
11
11
  let b = 0;
12
12
  for (let l of i)
13
13
  l != null && (l = +l) >= l && ++b;
14
14
  return b;
15
15
  }
16
- function Me(i) {
16
+ function xe(i) {
17
17
  return i;
18
18
  }
19
- var ye = Array.prototype, ve = ye.slice;
20
- function ie(i) {
19
+ var de = Array.prototype, ye = de.slice;
20
+ function oe(i) {
21
21
  return () => i;
22
22
  }
23
- function be(i, e, b) {
23
+ function Me(i, e, b) {
24
24
  let l;
25
25
  for (; ; ) {
26
- const t = ne(i, e, b);
26
+ const t = ie(i, e, b);
27
27
  if (t === l || t === 0 || !isFinite(t))
28
28
  return [i, e];
29
29
  t > 0 ? (i = Math.floor(i / t) * t, e = Math.ceil(e / t) * t) : t < 0 && (i = Math.ceil(i * t) / t, e = Math.floor(e * t) / t), l = t;
30
30
  }
31
31
  }
32
- function we(i) {
33
- return Math.max(1, Math.ceil(Math.log(de(i)) / Math.LN2) + 1);
32
+ function ve(i) {
33
+ return Math.max(1, Math.ceil(Math.log(ge(i)) / Math.LN2) + 1);
34
34
  }
35
- function Ce() {
36
- var i = Me, e = oe, b = we;
35
+ function be() {
36
+ var i = xe, e = re, b = ve;
37
37
  function l(t) {
38
38
  Array.isArray(t) || (t = Array.from(t));
39
- var r, O = t.length, s, z, m = new Array(O);
40
- for (r = 0; r < O; ++r)
39
+ var r, z = t.length, s, N, m = new Array(z);
40
+ for (r = 0; r < z; ++r)
41
41
  m[r] = i(t[r], r, t);
42
42
  var w = e(m), n = w[0], o = w[1], a = b(m, n, o);
43
43
  if (!Array.isArray(a)) {
44
- const d = o, M = +a;
45
- if (e === oe && ([n, o] = be(n, o, M)), a = xe(n, o, M), a[0] <= n && (z = ne(n, o, M)), a[a.length - 1] >= o)
46
- if (d >= o && e === oe) {
47
- const c = ne(n, o, M);
44
+ const d = o, y = +a;
45
+ if (e === re && ([n, o] = Me(n, o, y)), a = pe(n, o, y), a[0] <= n && (N = ie(n, o, y)), a[a.length - 1] >= o)
46
+ if (d >= o && e === re) {
47
+ const c = ie(n, o, y);
48
48
  isFinite(c) && (c > 0 ? o = (Math.floor(o / c) + 1) * c : c < 0 && (o = (Math.ceil(o * -c) + 1) / -c));
49
49
  } else
50
50
  a.pop();
@@ -52,42 +52,42 @@ function Ce() {
52
52
  for (var x = a.length, f = 0, h = x; a[f] <= n; ) ++f;
53
53
  for (; a[h - 1] > o; ) --h;
54
54
  (f || h < x) && (a = a.slice(f, h), x = h - f);
55
- var g = new Array(x + 1), y;
55
+ var g = new Array(x + 1), M;
56
56
  for (r = 0; r <= x; ++r)
57
- y = g[r] = [], y.x0 = r > 0 ? a[r - 1] : n, y.x1 = r < x ? a[r] : o;
58
- if (isFinite(z)) {
59
- if (z > 0)
60
- for (r = 0; r < O; ++r)
61
- (s = m[r]) != null && n <= s && s <= o && g[Math.min(x, Math.floor((s - n) / z))].push(t[r]);
62
- else if (z < 0) {
63
- for (r = 0; r < O; ++r)
57
+ M = g[r] = [], M.x0 = r > 0 ? a[r - 1] : n, M.x1 = r < x ? a[r] : o;
58
+ if (isFinite(N)) {
59
+ if (N > 0)
60
+ for (r = 0; r < z; ++r)
61
+ (s = m[r]) != null && n <= s && s <= o && g[Math.min(x, Math.floor((s - n) / N))].push(t[r]);
62
+ else if (N < 0) {
63
+ for (r = 0; r < z; ++r)
64
64
  if ((s = m[r]) != null && n <= s && s <= o) {
65
- const d = Math.floor((n - s) * z);
65
+ const d = Math.floor((n - s) * N);
66
66
  g[Math.min(x, d + (a[d] <= s))].push(t[r]);
67
67
  }
68
68
  }
69
69
  } else
70
- for (r = 0; r < O; ++r)
71
- (s = m[r]) != null && n <= s && s <= o && g[ge(a, s, 0, x)].push(t[r]);
70
+ for (r = 0; r < z; ++r)
71
+ (s = m[r]) != null && n <= s && s <= o && g[me(a, s, 0, x)].push(t[r]);
72
72
  return g;
73
73
  }
74
74
  return l.value = function(t) {
75
- return arguments.length ? (i = typeof t == "function" ? t : ie(t), l) : i;
75
+ return arguments.length ? (i = typeof t == "function" ? t : oe(t), l) : i;
76
76
  }, l.domain = function(t) {
77
- return arguments.length ? (e = typeof t == "function" ? t : ie([t[0], t[1]]), l) : e;
77
+ return arguments.length ? (e = typeof t == "function" ? t : oe([t[0], t[1]]), l) : e;
78
78
  }, l.thresholds = function(t) {
79
- return arguments.length ? (b = typeof t == "function" ? t : ie(Array.isArray(t) ? ve.call(t) : t), l) : b;
79
+ return arguments.length ? (b = typeof t == "function" ? t : oe(Array.isArray(t) ? ye.call(t) : t), l) : b;
80
80
  }, l;
81
81
  }
82
- function Ne(i) {
83
- const e = ce.c(143), {
82
+ function Fe(i) {
83
+ const e = le.c(139), {
84
84
  data: b,
85
85
  graphTitle: l,
86
86
  sources: t,
87
87
  graphDescription: r,
88
- barPadding: O,
88
+ barPadding: z,
89
89
  showValues: s,
90
- showTicks: z,
90
+ showTicks: N,
91
91
  leftMargin: m,
92
92
  rightMargin: w,
93
93
  height: n,
@@ -97,71 +97,70 @@ function Ne(i) {
97
97
  padding: f,
98
98
  backgroundColor: h,
99
99
  topMargin: g,
100
- bottomMargin: y,
100
+ bottomMargin: M,
101
101
  showLabels: d,
102
- relativeHeight: M,
102
+ relativeHeight: y,
103
103
  tooltip: c,
104
104
  onSeriesMouseOver: C,
105
- refValues: K,
105
+ refValues: J,
106
106
  graphID: A,
107
- maxValue: Q,
107
+ maxValue: K,
108
108
  onSeriesMouseClick: j,
109
109
  graphDownload: k,
110
110
  dataDownload: S,
111
- numberOfBins: U,
112
- truncateBy: X,
113
- graphType: Y,
114
- barGraphLayout: Z,
115
- donutStrokeWidth: _,
116
- sortData: E,
117
- language: $,
118
- minHeight: P,
119
- theme: ae,
120
- maxBarThickness: ee,
121
- ariaLabel: D,
111
+ numberOfBins: Q,
112
+ truncateBy: U,
113
+ graphType: X,
114
+ barGraphLayout: Y,
115
+ donutStrokeWidth: Z,
116
+ sortData: V,
117
+ language: D,
118
+ minHeight: H,
119
+ theme: ne,
120
+ maxBarThickness: _,
121
+ ariaLabel: $,
122
122
  detailsOnClick: L,
123
123
  styles: T,
124
124
  classNames: B,
125
- precision: F,
126
- hideAxisLine: le,
127
- locale: se
128
- } = i, v = ae === void 0 ? "light" : ae, te = le === void 0 ? !1 : le, G = se === void 0 ? "en" : se;
129
- let I;
130
- e[0] !== b || e[1] !== U ? (I = Ce().thresholds(U || 10).value(je)(b).map(Ae), e[0] = b, e[1] = U, e[2] = I) : I = e[2];
131
- const N = I;
132
- if (N.length === 0) {
125
+ hideAxisLine: ae,
126
+ numberDisplayOptions: F
127
+ } = i, v = ne === void 0 ? "light" : ne, ee = ae === void 0 ? !1 : ae;
128
+ let E;
129
+ e[0] !== b || e[1] !== Q ? (E = be().thresholds(Q || 10).value(Ce)(b).map(we), e[0] = b, e[1] = Q, e[2] = E) : E = e[2];
130
+ const G = E;
131
+ if (G.length === 0) {
133
132
  const p = `${o}px`, u = `${n}px`;
134
- let H;
135
- e[3] !== p || e[4] !== u ? (H = {
133
+ let O;
134
+ e[3] !== p || e[4] !== u ? (O = {
136
135
  width: p,
137
136
  height: u,
138
137
  margin: "auto"
139
- }, e[3] = p, e[4] = u, e[5] = H) : H = e[5];
140
- let R;
141
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ V.jsx("div", { className: "flex m-auto items-center justify-center p-0 leading-none text-base h-40", children: /* @__PURE__ */ V.jsx(fe, {}) }), e[6] = R) : R = e[6];
142
- let q;
143
- return e[7] !== H ? (q = /* @__PURE__ */ V.jsx("div", { style: H, children: R }), e[7] = H, e[8] = q) : q = e[8], q;
138
+ }, e[3] = p, e[4] = u, e[5] = O) : O = e[5];
139
+ let P;
140
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ R.jsx("div", { className: "flex m-auto items-center justify-center p-0 leading-none text-base h-40", children: /* @__PURE__ */ R.jsx(se, {}) }), e[6] = P) : P = e[6];
141
+ let W;
142
+ return e[7] !== O ? (W = /* @__PURE__ */ R.jsx("div", { style: O, children: P }), e[7] = O, e[8] = W) : W = e[8], W;
144
143
  }
145
- if (Y === "circlePacking") {
146
- const p = x || J.graphMainColor;
144
+ if (X === "circlePacking") {
145
+ const p = x || q.graphMainColor;
147
146
  let u;
148
- return e[9] !== D || e[10] !== h || e[11] !== y || e[12] !== B || e[13] !== S || e[14] !== N || e[15] !== L || e[16] !== a || e[17] !== r || e[18] !== k || e[19] !== A || e[20] !== l || e[21] !== n || e[22] !== $ || e[23] !== m || e[24] !== G || e[25] !== P || e[26] !== j || e[27] !== C || e[28] !== f || e[29] !== F || e[30] !== M || e[31] !== w || e[32] !== d || e[33] !== s || e[34] !== t || e[35] !== T || e[36] !== p || e[37] !== v || e[38] !== c || e[39] !== g || e[40] !== o ? (u = /* @__PURE__ */ V.jsx(he, { colors: p, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: y, relativeHeight: M, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: N, language: $, minHeight: P, theme: v, ariaLabel: D, detailsOnClick: L, styles: T, classNames: B, precision: F, locale: G }), e[9] = D, e[10] = h, e[11] = y, e[12] = B, e[13] = S, e[14] = N, e[15] = L, e[16] = a, e[17] = r, e[18] = k, e[19] = A, e[20] = l, e[21] = n, e[22] = $, e[23] = m, e[24] = G, e[25] = P, e[26] = j, e[27] = C, e[28] = f, e[29] = F, e[30] = M, e[31] = w, e[32] = d, e[33] = s, e[34] = t, e[35] = T, e[36] = p, e[37] = v, e[38] = c, e[39] = g, e[40] = o, e[41] = u) : u = e[41], u;
147
+ return e[9] !== $ || e[10] !== h || e[11] !== M || e[12] !== B || e[13] !== S || e[14] !== G || e[15] !== L || e[16] !== a || e[17] !== r || e[18] !== k || e[19] !== A || e[20] !== l || e[21] !== n || e[22] !== D || e[23] !== m || e[24] !== H || e[25] !== F || e[26] !== j || e[27] !== C || e[28] !== f || e[29] !== y || e[30] !== w || e[31] !== d || e[32] !== s || e[33] !== t || e[34] !== T || e[35] !== p || e[36] !== v || e[37] !== c || e[38] !== g || e[39] !== o ? (u = /* @__PURE__ */ R.jsx(ce, { colors: p, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: M, relativeHeight: y, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: G, language: D, minHeight: H, theme: v, ariaLabel: $, detailsOnClick: L, styles: T, classNames: B, numberDisplayOptions: F }), e[9] = $, e[10] = h, e[11] = M, e[12] = B, e[13] = S, e[14] = G, e[15] = L, e[16] = a, e[17] = r, e[18] = k, e[19] = A, e[20] = l, e[21] = n, e[22] = D, e[23] = m, e[24] = H, e[25] = F, e[26] = j, e[27] = C, e[28] = f, e[29] = y, e[30] = w, e[31] = d, e[32] = s, e[33] = t, e[34] = T, e[35] = p, e[36] = v, e[37] = c, e[38] = g, e[39] = o, e[40] = u) : u = e[40], u;
149
148
  }
150
- if (Y === "treeMap") {
151
- const p = x || J.graphMainColor;
149
+ if (X === "treeMap") {
150
+ const p = x || q.graphMainColor;
152
151
  let u;
153
- return e[42] !== D || e[43] !== h || e[44] !== y || e[45] !== B || e[46] !== S || e[47] !== N || e[48] !== L || e[49] !== a || e[50] !== r || e[51] !== k || e[52] !== A || e[53] !== l || e[54] !== n || e[55] !== $ || e[56] !== m || e[57] !== G || e[58] !== P || e[59] !== j || e[60] !== C || e[61] !== f || e[62] !== F || e[63] !== M || e[64] !== w || e[65] !== d || e[66] !== s || e[67] !== t || e[68] !== T || e[69] !== p || e[70] !== v || e[71] !== c || e[72] !== g || e[73] !== o ? (u = /* @__PURE__ */ V.jsx(ue, { colors: p, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: y, relativeHeight: M, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: N, language: $, minHeight: P, theme: v, ariaLabel: D, detailsOnClick: L, styles: T, classNames: B, precision: F, locale: G }), e[42] = D, e[43] = h, e[44] = y, e[45] = B, e[46] = S, e[47] = N, e[48] = L, e[49] = a, e[50] = r, e[51] = k, e[52] = A, e[53] = l, e[54] = n, e[55] = $, e[56] = m, e[57] = G, e[58] = P, e[59] = j, e[60] = C, e[61] = f, e[62] = F, e[63] = M, e[64] = w, e[65] = d, e[66] = s, e[67] = t, e[68] = T, e[69] = p, e[70] = v, e[71] = c, e[72] = g, e[73] = o, e[74] = u) : u = e[74], u;
152
+ return e[41] !== $ || e[42] !== h || e[43] !== M || e[44] !== B || e[45] !== S || e[46] !== G || e[47] !== L || e[48] !== a || e[49] !== r || e[50] !== k || e[51] !== A || e[52] !== l || e[53] !== n || e[54] !== D || e[55] !== m || e[56] !== H || e[57] !== F || e[58] !== j || e[59] !== C || e[60] !== f || e[61] !== y || e[62] !== w || e[63] !== d || e[64] !== s || e[65] !== t || e[66] !== T || e[67] !== p || e[68] !== v || e[69] !== c || e[70] !== g || e[71] !== o ? (u = /* @__PURE__ */ R.jsx(fe, { colors: p, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: M, relativeHeight: y, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: G, language: D, minHeight: H, theme: v, ariaLabel: $, detailsOnClick: L, styles: T, classNames: B, numberDisplayOptions: F }), e[41] = $, e[42] = h, e[43] = M, e[44] = B, e[45] = S, e[46] = G, e[47] = L, e[48] = a, e[49] = r, e[50] = k, e[51] = A, e[52] = l, e[53] = n, e[54] = D, e[55] = m, e[56] = H, e[57] = F, e[58] = j, e[59] = C, e[60] = f, e[61] = y, e[62] = w, e[63] = d, e[64] = s, e[65] = t, e[66] = T, e[67] = p, e[68] = v, e[69] = c, e[70] = g, e[71] = o, e[72] = u) : u = e[72], u;
154
153
  }
155
- if (Y === "donutChart") {
156
- const p = x || J[v].categoricalColors.colors, u = o && n ? o < n ? o : n : o || n || void 0, H = N;
157
- let R;
158
- return e[75] !== D || e[76] !== h || e[77] !== B || e[78] !== S || e[79] !== L || e[80] !== _ || e[81] !== a || e[82] !== r || e[83] !== k || e[84] !== A || e[85] !== l || e[86] !== $ || e[87] !== G || e[88] !== j || e[89] !== C || e[90] !== f || e[91] !== F || e[92] !== E || e[93] !== t || e[94] !== T || e[95] !== p || e[96] !== u || e[97] !== H || e[98] !== v || e[99] !== c ? (R = /* @__PURE__ */ V.jsx(me, { colors: p, graphTitle: l, graphDescription: r, footNote: a, radius: u, sources: t, backgroundColor: h, padding: f, tooltip: c, onSeriesMouseOver: C, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: H, strokeWidth: _, showColorScale: !0, sortData: E, language: $, theme: v, ariaLabel: D, detailsOnClick: L, styles: T, classNames: B, precision: F, locale: G }), e[75] = D, e[76] = h, e[77] = B, e[78] = S, e[79] = L, e[80] = _, e[81] = a, e[82] = r, e[83] = k, e[84] = A, e[85] = l, e[86] = $, e[87] = G, e[88] = j, e[89] = C, e[90] = f, e[91] = F, e[92] = E, e[93] = t, e[94] = T, e[95] = p, e[96] = u, e[97] = H, e[98] = v, e[99] = c, e[100] = R) : R = e[100], R;
154
+ if (X === "donutChart") {
155
+ const p = x || q[v].categoricalColors.colors, u = o && n ? o < n ? o : n : o || n || void 0, O = G;
156
+ let P;
157
+ return e[73] !== $ || e[74] !== h || e[75] !== B || e[76] !== S || e[77] !== L || e[78] !== Z || e[79] !== a || e[80] !== r || e[81] !== k || e[82] !== A || e[83] !== l || e[84] !== D || e[85] !== F || e[86] !== j || e[87] !== C || e[88] !== f || e[89] !== V || e[90] !== t || e[91] !== T || e[92] !== p || e[93] !== u || e[94] !== O || e[95] !== v || e[96] !== c ? (P = /* @__PURE__ */ R.jsx(he, { colors: p, graphTitle: l, graphDescription: r, footNote: a, radius: u, sources: t, backgroundColor: h, padding: f, tooltip: c, onSeriesMouseOver: C, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: O, strokeWidth: Z, showColorScale: !0, sortData: V, language: D, theme: v, ariaLabel: $, detailsOnClick: L, styles: T, classNames: B, numberDisplayOptions: F }), e[73] = $, e[74] = h, e[75] = B, e[76] = S, e[77] = L, e[78] = Z, e[79] = a, e[80] = r, e[81] = k, e[82] = A, e[83] = l, e[84] = D, e[85] = F, e[86] = j, e[87] = C, e[88] = f, e[89] = V, e[90] = t, e[91] = T, e[92] = p, e[93] = u, e[94] = O, e[95] = v, e[96] = c, e[97] = P) : P = e[97], P;
159
158
  }
160
- const re = x || J.graphMainColor;
161
- let W;
162
- return e[101] !== D || e[102] !== h || e[103] !== Z || e[104] !== O || e[105] !== y || e[106] !== B || e[107] !== S || e[108] !== N || e[109] !== L || e[110] !== a || e[111] !== r || e[112] !== k || e[113] !== A || e[114] !== l || e[115] !== n || e[116] !== te || e[117] !== $ || e[118] !== m || e[119] !== G || e[120] !== ee || e[121] !== Q || e[122] !== P || e[123] !== j || e[124] !== C || e[125] !== f || e[126] !== F || e[127] !== K || e[128] !== M || e[129] !== w || e[130] !== d || e[131] !== z || e[132] !== s || e[133] !== E || e[134] !== t || e[135] !== T || e[136] !== re || e[137] !== v || e[138] !== c || e[139] !== g || e[140] !== X || e[141] !== o ? (W = /* @__PURE__ */ V.jsx(pe, { colors: re, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: y, relativeHeight: M, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: N, barPadding: O, refValues: K, truncateBy: X, maxValue: Q, showTicks: z, sortData: E, language: $, minHeight: P, theme: v, maxBarThickness: ee, ariaLabel: D, orientation: Z, detailsOnClick: L, styles: T, classNames: B, precision: F, hideAxisLine: te, locale: G }), e[101] = D, e[102] = h, e[103] = Z, e[104] = O, e[105] = y, e[106] = B, e[107] = S, e[108] = N, e[109] = L, e[110] = a, e[111] = r, e[112] = k, e[113] = A, e[114] = l, e[115] = n, e[116] = te, e[117] = $, e[118] = m, e[119] = G, e[120] = ee, e[121] = Q, e[122] = P, e[123] = j, e[124] = C, e[125] = f, e[126] = F, e[127] = K, e[128] = M, e[129] = w, e[130] = d, e[131] = z, e[132] = s, e[133] = E, e[134] = t, e[135] = T, e[136] = re, e[137] = v, e[138] = c, e[139] = g, e[140] = X, e[141] = o, e[142] = W) : W = e[142], W;
159
+ const te = x || q.graphMainColor;
160
+ let I;
161
+ return e[98] !== $ || e[99] !== h || e[100] !== Y || e[101] !== z || e[102] !== M || e[103] !== B || e[104] !== S || e[105] !== G || e[106] !== L || e[107] !== a || e[108] !== r || e[109] !== k || e[110] !== A || e[111] !== l || e[112] !== n || e[113] !== ee || e[114] !== D || e[115] !== m || e[116] !== _ || e[117] !== K || e[118] !== H || e[119] !== F || e[120] !== j || e[121] !== C || e[122] !== f || e[123] !== J || e[124] !== y || e[125] !== w || e[126] !== d || e[127] !== N || e[128] !== s || e[129] !== V || e[130] !== t || e[131] !== T || e[132] !== te || e[133] !== v || e[134] !== c || e[135] !== g || e[136] !== U || e[137] !== o ? (I = /* @__PURE__ */ R.jsx(ue, { colors: te, graphTitle: l, graphDescription: r, footNote: a, width: o, height: n, sources: t, leftMargin: m, rightMargin: w, backgroundColor: h, padding: f, topMargin: g, bottomMargin: M, relativeHeight: y, showLabels: d, tooltip: c, onSeriesMouseOver: C, showColorScale: !1, showValues: s, graphID: A, onSeriesMouseClick: j, graphDownload: k, dataDownload: S, data: G, barPadding: z, refValues: J, truncateBy: U, maxValue: K, showTicks: N, sortData: V, language: D, minHeight: H, theme: v, maxBarThickness: _, ariaLabel: $, orientation: Y, detailsOnClick: L, styles: T, classNames: B, hideAxisLine: ee, numberDisplayOptions: F }), e[98] = $, e[99] = h, e[100] = Y, e[101] = z, e[102] = M, e[103] = B, e[104] = S, e[105] = G, e[106] = L, e[107] = a, e[108] = r, e[109] = k, e[110] = A, e[111] = l, e[112] = n, e[113] = ee, e[114] = D, e[115] = m, e[116] = _, e[117] = K, e[118] = H, e[119] = F, e[120] = j, e[121] = C, e[122] = f, e[123] = J, e[124] = y, e[125] = w, e[126] = d, e[127] = N, e[128] = s, e[129] = V, e[130] = t, e[131] = T, e[132] = te, e[133] = v, e[134] = c, e[135] = g, e[136] = U, e[137] = o, e[138] = I) : I = e[138], I;
163
162
  }
164
- function Ae(i) {
163
+ function we(i) {
165
164
  return {
166
165
  label: `${i.x0}-${i.x1}`,
167
166
  size: i.length,
@@ -171,10 +170,10 @@ function Ae(i) {
171
170
  }
172
171
  };
173
172
  }
174
- function je(i) {
173
+ function Ce(i) {
175
174
  return i.value;
176
175
  }
177
176
  export {
178
- Ne as Histogram
177
+ Fe as Histogram
179
178
  };
180
179
  //# sourceMappingURL=Histogram.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Histogram.js","sources":["../node_modules/d3-array/src/count.js","../node_modules/d3-array/src/identity.js","../node_modules/d3-array/src/array.js","../node_modules/d3-array/src/constant.js","../node_modules/d3-array/src/nice.js","../node_modules/d3-array/src/threshold/sturges.js","../node_modules/d3-array/src/bin.js","../src/Components/Graphs/Histogram/index.tsx"],"sourcesContent":["export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","export default function identity(x) {\n return x;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function constant(x) {\n return () => x;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n step,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the domain is aligned with the first tick (which it will by\n // default), then we can use quantization rather than bisection to bin\n // values, which is substantially faster.\n if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n // Be careful not to mutate an array owned by the user!\n var m = tz.length, a = 0, b = m;\n while (tz[a] <= x0) ++a;\n while (tz[b - 1] > x1) --b;\n if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n if (isFinite(step)) {\n if (step > 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n }\n }\n } else if (step < 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n const j = Math.floor((x0 - x) * step);\n bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n }\n }\n }\n } else {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n };\n\n return histogram;\n}\n","import { bin } from 'd3-array';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { CirclePackingGraph } from '../CirclePackingGraph';\r\nimport { TreeMapGraph } from '../TreeMapGraph';\r\nimport { DonutChart } from '../DonutChart';\r\nimport { SimpleBarGraph } from '../BarGraph';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport {\r\n ReferenceDataType,\r\n HistogramDataType,\r\n DonutChartDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: HistogramDataType[];\r\n\r\n /** Type of the graph for histogram */\r\n graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for visualization */\r\n colors?: string[] | string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Padding between bars */\r\n barPadding?: number;\r\n /** Maximum thickness of bars */\r\n maxBarThickness?: number;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Truncate labels by specified length */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n\r\n // Graph Parameters\r\n /** Number of bins for the histogram */\r\n numberOfBins?: number;\r\n /** Orientation of the bar graph. Only applicable if graphType is barGraph. */\r\n barGraphLayout?: 'vertical' | 'horizontal';\r\n /** Stroke width of the arcs and circle of the donut. Only applicable if graphType is donutChart. */\r\n donutStrokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of axis ticks */\r\n showTicks?: boolean;\r\n /** Toggle visibility of axis line for the main axis. Only applicable if `graphType` is `barGraph`. */\r\n hideAxisLine?: boolean;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function Histogram(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n barPadding,\r\n showValues,\r\n showTicks,\r\n leftMargin,\r\n rightMargin,\r\n height,\r\n width,\r\n footNote,\r\n colors,\r\n padding,\r\n backgroundColor,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n graphID,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload,\r\n dataDownload,\r\n numberOfBins,\r\n truncateBy,\r\n graphType,\r\n barGraphLayout,\r\n donutStrokeWidth,\r\n sortData,\r\n language,\r\n minHeight,\r\n theme = 'light',\r\n maxBarThickness,\r\n ariaLabel,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision,\r\n hideAxisLine = false,\r\n locale = 'en',\r\n } = props;\r\n\r\n const bins = bin()\r\n .thresholds(numberOfBins || 10)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .value((d: any) => d.value)(data as any);\r\n const dataFormatted = bins.map(d => ({\r\n label: `${d.x0}-${d.x1}`,\r\n size: d.length,\r\n data: {\r\n options: `${d.x0}-${d.x1}`,\r\n frequency: d.length,\r\n },\r\n }));\r\n if (dataFormatted.length === 0)\r\n return (\r\n <div style={{ width: `${width}px`, height: `${height}px`, margin: 'auto' }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n );\r\n if (graphType === 'circlePacking')\r\n return (\r\n <CirclePackingGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n locale={locale}\r\n />\r\n );\r\n if (graphType === 'treeMap')\r\n return (\r\n <TreeMapGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n locale={locale}\r\n />\r\n );\r\n if (graphType === 'donutChart')\r\n return (\r\n <DonutChart\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n radius={width && height ? (width < height ? width : height) : width || height || undefined}\r\n sources={sources}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted as DonutChartDataType[]}\r\n strokeWidth={donutStrokeWidth}\r\n showColorScale\r\n sortData={sortData}\r\n language={language}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n locale={locale}\r\n />\r\n );\r\n return (\r\n <SimpleBarGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n barPadding={barPadding}\r\n refValues={refValues}\r\n truncateBy={truncateBy}\r\n maxValue={maxValue}\r\n showTicks={showTicks}\r\n sortData={sortData}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n maxBarThickness={maxBarThickness}\r\n ariaLabel={ariaLabel}\r\n orientation={barGraphLayout}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n hideAxisLine={hideAxisLine}\r\n locale={locale}\r\n />\r\n );\r\n}\r\n"],"names":["count","values","valueof","value","identity","x","array","slice","constant","nice","start","stop","prestep","step","tickIncrement","thresholdSturges","bin","domain","extent","threshold","sturges","histogram","data","i","n","xz","x0","x1","tz","max","tn","ticks","m","a","b","bins","j","bisect","_","Histogram","props","$","_c","graphTitle","sources","graphDescription","barPadding","showValues","showTicks","leftMargin","rightMargin","height","width","footNote","colors","padding","backgroundColor","topMargin","bottomMargin","showLabels","relativeHeight","tooltip","onSeriesMouseOver","refValues","graphID","maxValue","onSeriesMouseClick","graphDownload","dataDownload","numberOfBins","truncateBy","graphType","barGraphLayout","donutStrokeWidth","sortData","language","minHeight","theme","t0","maxBarThickness","ariaLabel","detailsOnClick","styles","classNames","precision","hideAxisLine","t1","locale","t2","undefined","t3","thresholds","_temp","map","_temp2","dataFormatted","length","t4","t5","t6","margin","t7","Symbol","for","jsx","Spinner","t8","Colors","graphMainColor","CirclePackingGraph","TreeMapGraph","categoricalColors","DonutChart","SimpleBarGraph","d_0","label","d","size","options","frequency"],"mappings":";;;;;;;;;AAAe,SAASA,GAAMC,GAAQC,GAAS;AAC7C,MAAIF,IAAQ;AAEV,WAASG,KAASF;AAChB,IAAIE,KAAS,SAASA,IAAQ,CAACA,MAAUA,KACvC,EAAEH;AAWR,SAAOA;AACT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GAAAvB,SAAAE,GAAAF,SAAAU,GAAAV,SAAA4C,IAAA5C,SAAAkC,GAAAlC,SAAAQ,GAAAR,SAAA8C,GAAA9C,SAAAsC,IAAAtC,SAAAwB,GAAAxB,SAAAmC,GAAAnC,SAAAyB,GAAAzB,SAAAqB,GAAArB,SAAAc,GAAAd,SAAA2C,GAAA3C,SAAAsB,GAAAtB,SAAAmB,GAAAnB,SAAAS,GAAAT,SAAAkB,GAAAlB,SAAAO,GAAAP,SAAAM,GAAAN,SAAAiC,GAAAjC,SAAAG,GAAAH,SAAAyC,GAAAzC,SAAAwD,IAAAxD,SAAAoC,GAAApC,SAAAoB,GAAApB,SAAAgB,GAAAhB,SAAA6B,GAAA7B,SAAAW,GAAAX,SAAAyD,KAAAA,IAAAzD,EAAA,GAAA,GA3CFyD;AA2CE;AA3NC,SAAAJ,GAAAoB,GAAA;AAAA,SAoDgC;AAAA,IAAAC,OAC5B,GAAGC,EAAC1F,EAAG,IAAI0F,EAACzF,EAAG;AAAA,IAAE0F,MAClBD,EAACpB;AAAAA,IAAO1E,MACR;AAAA,MAAAgG,SACK,GAAGF,EAAC1F,EAAG,IAAI0F,EAACzF,EAAG;AAAA,MAAE4F,WACfH,EAACpB;AAAAA,IAAAA;AAAAA,EACd;AACD;AA3DI,SAAAJ,GAAAwB,GAAA;AAAA,SAmDgBA,EAACjH;AAAM;","x_google_ignoreList":[0,1,2,3,4,5,6]}
1
+ {"version":3,"file":"Histogram.js","sources":["../node_modules/d3-array/src/count.js","../node_modules/d3-array/src/identity.js","../node_modules/d3-array/src/array.js","../node_modules/d3-array/src/constant.js","../node_modules/d3-array/src/nice.js","../node_modules/d3-array/src/threshold/sturges.js","../node_modules/d3-array/src/bin.js","../src/Components/Graphs/Histogram/index.tsx"],"sourcesContent":["export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","export default function identity(x) {\n return x;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function constant(x) {\n return () => x;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n step,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the domain is aligned with the first tick (which it will by\n // default), then we can use quantization rather than bisection to bin\n // values, which is substantially faster.\n if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n // Be careful not to mutate an array owned by the user!\n var m = tz.length, a = 0, b = m;\n while (tz[a] <= x0) ++a;\n while (tz[b - 1] > x1) --b;\n if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n if (isFinite(step)) {\n if (step > 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n }\n }\n } else if (step < 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n const j = Math.floor((x0 - x) * step);\n bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n }\n }\n }\n } else {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n };\n\n return histogram;\n}\n","import { bin } from 'd3-array';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { CirclePackingGraph } from '../CirclePackingGraph';\r\nimport { TreeMapGraph } from '../TreeMapGraph';\r\nimport { DonutChart } from '../DonutChart';\r\nimport { SimpleBarGraph } from '../BarGraph';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport {\r\n ReferenceDataType,\r\n HistogramDataType,\r\n DonutChartDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: HistogramDataType[];\r\n\r\n /** Type of the graph for histogram */\r\n graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for visualization */\r\n colors?: string[] | string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Padding between bars */\r\n barPadding?: number;\r\n /** Maximum thickness of bars */\r\n maxBarThickness?: number;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Truncate labels by specified length */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n\r\n // Graph Parameters\r\n /** Number of bins for the histogram */\r\n numberOfBins?: number;\r\n /** Orientation of the bar graph. Only applicable if graphType is barGraph. */\r\n barGraphLayout?: 'vertical' | 'horizontal';\r\n /** Stroke width of the arcs and circle of the donut. Only applicable if graphType is donutChart. */\r\n donutStrokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of axis ticks */\r\n showTicks?: boolean;\r\n /** Toggle visibility of axis line for the main axis. Only applicable if `graphType` is `barGraph`. */\r\n hideAxisLine?: boolean;\r\n /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n numberDisplayOptions?: NumberFormatOptions;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function Histogram(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n barPadding,\r\n showValues,\r\n showTicks,\r\n leftMargin,\r\n rightMargin,\r\n height,\r\n width,\r\n footNote,\r\n colors,\r\n padding,\r\n backgroundColor,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n graphID,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload,\r\n dataDownload,\r\n numberOfBins,\r\n truncateBy,\r\n graphType,\r\n barGraphLayout,\r\n donutStrokeWidth,\r\n sortData,\r\n language,\r\n minHeight,\r\n theme = 'light',\r\n maxBarThickness,\r\n ariaLabel,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n hideAxisLine = false,\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n const bins = bin()\r\n .thresholds(numberOfBins || 10)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .value((d: any) => d.value)(data as any);\r\n const dataFormatted = bins.map(d => ({\r\n label: `${d.x0}-${d.x1}`,\r\n size: d.length,\r\n data: {\r\n options: `${d.x0}-${d.x1}`,\r\n frequency: d.length,\r\n },\r\n }));\r\n if (dataFormatted.length === 0)\r\n return (\r\n <div style={{ width: `${width}px`, height: `${height}px`, margin: 'auto' }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n );\r\n if (graphType === 'circlePacking')\r\n return (\r\n <CirclePackingGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n numberDisplayOptions={numberDisplayOptions}\r\n />\r\n );\r\n if (graphType === 'treeMap')\r\n return (\r\n <TreeMapGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n numberDisplayOptions={numberDisplayOptions}\r\n />\r\n );\r\n if (graphType === 'donutChart')\r\n return (\r\n <DonutChart\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n radius={width && height ? (width < height ? width : height) : width || height || undefined}\r\n sources={sources}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted as DonutChartDataType[]}\r\n strokeWidth={donutStrokeWidth}\r\n showColorScale\r\n sortData={sortData}\r\n language={language}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n numberDisplayOptions={numberDisplayOptions}\r\n />\r\n );\r\n return (\r\n <SimpleBarGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n barPadding={barPadding}\r\n refValues={refValues}\r\n truncateBy={truncateBy}\r\n maxValue={maxValue}\r\n showTicks={showTicks}\r\n sortData={sortData}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n maxBarThickness={maxBarThickness}\r\n ariaLabel={ariaLabel}\r\n orientation={barGraphLayout}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n hideAxisLine={hideAxisLine}\r\n numberDisplayOptions={numberDisplayOptions}\r\n />\r\n );\r\n}\r\n"],"names":["count","values","valueof","value","identity","x","array","slice","constant","nice","start","stop","prestep","step","tickIncrement","thresholdSturges","bin","domain","extent","threshold","sturges","histogram","data","i","n","xz","x0","x1","tz","max","tn","ticks","m","a","b","bins","j","bisect","_","Histogram","props","$","_c","graphTitle","sources","graphDescription","barPadding","showValues","showTicks","leftMargin","rightMargin","height","width","footNote","colors","padding","backgroundColor","topMargin","bottomMargin","showLabels","relativeHeight","tooltip","onSeriesMouseOver","refValues","graphID","maxValue","onSeriesMouseClick","graphDownload","dataDownload","numberOfBins","truncateBy","graphType","barGraphLayout","donutStrokeWidth","sortData","language","minHeight","theme","t0","maxBarThickness","ariaLabel","detailsOnClick","styles","classNames","hideAxisLine","t1","numberDisplayOptions","undefined","t2","thresholds","_temp","map","_temp2","dataFormatted","length","t3","t4","t5","margin","t6","Symbol","for","jsx","Spinner","t7","Colors","graphMainColor","CirclePackingGraph","TreeMapGraph","categoricalColors","DonutChart","SimpleBarGraph","d_0","label","d","size","options","frequency"],"mappings":";;;;;;;;;AAAe,SAASA,GAAMC,GAAQC,GAAS;AAC7C,MAAIF,IAAQ;AAEV,WAASG,KAASF;AAChB,IAAIE,KAAS,SAASA,IAAQ,CAACA,MAAUA,KACvC,EAAEH;AAWR,SAAOA;AACT;ACjBe,SAASI,GAASC,GAAG;AAClC,SAAOA;AACT;ACFA,IAAIC,KAAQ,MAAM,WAEPC,KAAQD,GAAM;ACFV,SAASE,GAASH,GAAG;AAClC,SAAO,MAAMA;AACf;ACAe,SAASI,GAAKC,GAAOC,GAAMX,GAAO;AAC/C,MAAIY;AACJ,aAAa;AACX,UAAMC,IAAOC,GAAcJ,GAAOC,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GAAA,GA1CFuD;AA0CE;AAtNC,SAAAJ,GAAAoB,GAAA;AAAA,SAmDgC;AAAA,IAAAC,OAC5B,GAAGC,EAACxF,EAAG,IAAIwF,EAACvF,EAAG;AAAA,IAAEwF,MAClBD,EAACpB;AAAAA,IAAOxE,MACR;AAAA,MAAA8F,SACK,GAAGF,EAACxF,EAAG,IAAIwF,EAACvF,EAAG;AAAA,MAAE0F,WACfH,EAACpB;AAAAA,IAAAA;AAAAA,EACd;AACD;AA1DI,SAAAJ,GAAAwB,GAAA;AAAA,SAkDgBA,EAAC/G;AAAM;","x_google_ignoreList":[0,1,2,3,4,5,6]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-D4pAp7u0.cjs"),s=require("react"),zt=require("./parse-xYI9yrvL.cjs"),Vt=require("./getSliderMarks-BzrpHrHS.cjs"),Kt=require("./Spinner-WHzzloYQ.cjs"),Wt=require("./index-DQA8q5sC.cjs"),_=require("./index-DLFt97gy.cjs"),Pt=require("./Typography-BqmyF1gP.cjs"),Qt=require("./index-C5K--w8d.cjs"),Lt=require("./Source-PKuwZOn3.cjs"),eo=require("./index-w64Zl8io-DrMm5QSb.cjs"),to=require("./Tooltip-Hr46paWP.cjs"),gt=require("./index-BhI7mBJx.cjs"),oo=require("./DetailsModal-jmmKRMRM.cjs"),ro=require("./pow-BnyPO-NX.cjs"),ao=require("./ordinal-CrsysVE-.cjs"),no=require("./threshold-DNsSUf8Q.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),le=require("./proxy-CqH8m8IQ.cjs"),ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),io=require("./numberFormattingFunction-Cn9R7CM9.cjs"),so=require("./use-in-view-dnRv_qqF.cjs"),lo=require("./index-FXfr51ZM.cjs"),co=require("./GraphFooter.cjs"),uo=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),$t=require("./fetchAndParseData-QTF6tjij.cjs"),Ft=require("./GraphContainer-Cul9b74X.cjs"),po=require("./getUniqValue-NX8DgwND.cjs"),mo=require("./getJenks-BzJvhy_H.cjs");function xo(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const f=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,f.get?f:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const ho=xo(s);var fo="Separator",Tt="horizontal",go=["horizontal","vertical"],At=ho.forwardRef((a,e)=>{const{decorative:t,orientation:f=Tt,...v}=a,l=yo(f)?f:Tt,j=t?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return r.ae.jsx(eo.w.div,{"data-orientation":l,...j,...v,ref:e})});At.displayName=fo;function yo(a){return go.includes(a)}var Ut=At;const Gt=s.forwardRef((a,e)=>{const t=r._.c(14);let f,v,l,j;t[0]!==a?({className:f,variant:l,orientation:j,...v}=a,t[0]=a,t[1]=f,t[2]=v,t[3]=l,t[4]=j):(f=t[1],v=t[2],l=t[3],j=t[4]);const b=l===void 0?"dark":l,c=j===void 0?"horizontal":j,x=c==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",R=b==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let C;t[5]!==f||t[6]!==x||t[7]!==R?(C=r.mo(x,R,f),t[5]=f,t[6]=x,t[7]=R,t[8]=C):C=t[8];let q;return t[9]!==c||t[10]!==v||t[11]!==e||t[12]!==C?(q=r.ae.jsx(Ut,{...v,ref:e,orientation:c,className:C}),t[9]=c,t[10]=v,t[11]=e,t[12]=C,t[13]=q):q=t[13],q});Gt.displayName=Ut.displayName;function vo(a){const{data:e,colors:t,mapData:f,mapColorLegendTitle:v,colorDomain:l,radius:j,height:b,width:c,scale:x,centerPoint:R,tooltip:C,showLabels:q,mapBorderWidth:ce,mapBorderColor:de,mapNoDataColor:Ce,onSeriesMouseOver:A,showColorScale:Re,zoomScaleExtend:Ge,zoomTranslateExtend:He,highlightedDataPoints:De,onSeriesMouseClick:z,resetSelectionOnDoubleClick:Se,detailsOnClick:U,styles:D,classNames:G,mapProjection:re,zoomInteraction:H,animate:E,dimmedOpacity:V,customLayers:ue,maxRadiusValue:Ne,categorical:ae,dotColor:X,collapseColorScaleByDefault:Me,highlightedIds:ne,mapProperty:pe,dotLegendTitle:me,dotBorderColor:Oe,labelColor:qe,projectionRotate:Y,rewindCoordinatesInMapData:J,overlayMapData:m,overlayMapBorderColor:y,overlayMapBorderWidth:Xe,locale:Ye}=a,Z=s.useMemo(()=>J?_.index_default(f,{reverse:!0}):f,[f,J]),Je=s.useMemo(()=>!J||!m?m:_.index_default(m,{reverse:!0}),[m,J]),[S,N]=s.useState(void 0),[xe,he]=s.useState(Me===void 0?!(c<680):!Me),fe=s.useRef(null),[K,Q]=s.useState(void 0),[ge,I]=s.useState(void 0),[Ie,M]=s.useState(void 0),[Pe,W]=s.useState(void 0),g=s.useRef(null),w=so.useInView(g,{once:E.once,amount:E.amount}),ie=s.useRef(null),k=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?ro.sqrt().domain([0,Ne]).range([.25,j]).nice():void 0,Be=ae?ao.ordinal().domain(l).range(t):no.threshold().domain(l).range(t);s.useEffect(()=>{const o=Bt.select(ie.current),n=Bt.select(g.current),h=i=>{if(H==="noZoom")return!1;if(H==="button")return!i.type.includes("wheel");const $=i.type==="wheel",Le=i.type.startsWith("touch"),$e=i.type==="mousedown"||i.type==="mousemove";return Le?!0:$?H==="scroll"?!0:i.ctrlKey:$e&&!i.button&&!i.ctrlKey},B=_.zoom().scaleExtent(Ge).translateExtent(He||[[-20,-20],[c+20,b+20]]).filter(h).on("zoom",({transform:i})=>{o.attr("transform",i)});n.call(B),fe.current=B},[b,c,H]);const ee=_.index_default$1(Z),L=Qt.index_default(Z),_e=(ee[2]-ee[0])*1.15,ze=(ee[3]-ee[1])*1.15,Ve=c*190/960*360/_e,We=b*190/678*180/ze,P=x*Math.min(Ve,We),te=re==="mercator"?_.geoMercator().rotate(Y).center(R||L.geometry.coordinates).translate([c/2,b/2]).scale(P):re==="equalEarth"?_.geoEqualEarth().rotate(Y).center(R||L.geometry.coordinates).translate([c/2,b/2]).scale(P):re==="naturalEarth"?_.geoNaturalEarth1().rotate(Y).center(R||L.geometry.coordinates).translate([c/2,b/2]).scale(P):re==="orthographic"?_.geoOrthographic().rotate(Y).center(R||L.geometry.coordinates).translate([c/2,b/2]).scale(P):_.geoAlbersUsa().rotate(Y).center(R||L.geometry.coordinates).translate([c/2,b/2]).scale(P),oe=_.geoPath().projection(te),ye=o=>{if(!g.current||!fe.current)return;Bt.select(g.current).call(fe.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(le.motion.svg,{width:`${c}px`,height:`${b}px`,viewBox:`0 0 ${c} ${b}`,ref:g,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:ie,children:[ue.filter(o=>o.position==="before").map(o=>o.layer),Z.features.map((o,n)=>{if(!o.properties?.[pe])return null;const h=oe(o);return h?r.jsxRuntimeExports.jsx(le.motion.g,{opacity:S?V:ne?ne.indexOf(o.properties[pe])!==-1?1:V:1,children:r.jsxRuntimeExports.jsx("path",{d:h,style:{stroke:de,strokeWidth:ce,fill:Ce,vectorEffect:"non-scaling-stroke"}})},n):null}),r.jsxRuntimeExports.jsxs(lo.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const n=Z.features.findIndex(i=>o.id===i.properties[pe]);if(n===-1)return null;const h=oe(Z.features[n]);if(!h)return null;const B=ft.checkIfNullOrUndefined(o.x)?Ce:Be(o.x);return r.jsxRuntimeExports.jsx(le.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:S?S===B?1:V:ne?ne.indexOf(o.id)!==-1?1:V:1,transition:{duration:E.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:i=>{I(o),W(i.clientY),M(i.clientX),A?.(o)},onMouseMove:i=>{I(o),W(i.clientY),M(i.clientX)},onMouseLeave:()=>{I(void 0),M(void 0),W(void 0),A?.(void 0)},onClick:()=>{(z||U)&&(Wt.isEqual(K,o)&&Se?(Q(void 0),z?.(void 0)):(Q(o),z?.(o)))},children:r.jsxRuntimeExports.jsx(le.motion.path,{d:h,variants:{initial:{fill:B,opacity:0},whileInView:{fill:B,opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},style:{stroke:de,strokeWidth:ce,vectorEffect:"non-scaling-stroke"}},`${o.id}`)},o.id)}),Je?.features.map((o,n)=>{const h=oe(o);return h?r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("path",{d:h,style:{stroke:y||de,strokeWidth:Xe||ce+1,fill:"none",pointerEvents:"none",vectorEffect:"non-scaling-stroke"}})},n):null}),e.filter(o=>!ft.checkIfNullOrUndefined(o.lat)&&!ft.checkIfNullOrUndefined(o.long)).map(o=>{const n=te([o.long,o.lat])[0]>.8*c?-1:1;return r.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:De?De.indexOf(o.label||"")!==-1?1:V:1,transition:{duration:E.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:h=>{I(o),W(h.clientY),M(h.clientX),A?.(o)},onMouseMove:h=>{I(o),W(h.clientY),M(h.clientX)},onMouseLeave:()=>{I(void 0),M(void 0),W(void 0),A?.(void 0)},onClick:()=>{(z||U)&&(Wt.isEqual(K,o)&&Se?(Q(void 0),z?.(void 0)):(Q(o),z?.(o)))},transform:`translate(${te([o.long,o.lat])[0]},${te([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:X,stroke:Oe||X},whileInView:{r:k?k(o.radius||0):j,fill:X,stroke:Oe||X,transition:{duration:E.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),q&&o.label?r.jsxRuntimeExports.jsx(le.motion.text,{variants:{initial:{opacity:0,x:n*(k?k(o.radius||0):j)},whileInView:{opacity:1,x:n*(k?k(o.radius||0):j),transition:{duration:E.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:r.mo("text-sm",G?.graphObjectValues),style:{textAnchor:n===-1?"end":"start",fill:qe||"#000",vectorEffect:"non-scaling-stroke",...D?.graphObjectValues||{}},dx:n*4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`)})]}),ue.filter(o=>o.position==="after").map(o=>o.layer)]})}),Re===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",G?.colorLegend),children:xe?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.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:()=>{he(!1)},children:r.jsxRuntimeExports.jsx(gt.X,{})}),r.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:ae?void 0:"340px"},children:[me&&me!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:X}}),r.jsxRuntimeExports.jsx(Pt._,{size:"xs",marginBottom:"none",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:me})]}),r.jsxRuntimeExports.jsx(Lt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Gt,{}),r.jsxRuntimeExports.jsx(Lt.n,{size:"xl"})]}):null,v&&v!==""?r.jsxRuntimeExports.jsx(Pt._,{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:v}):null,ae?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:l.map((o,n)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{N(t[n%t.length])},onMouseLeave:()=>{N(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[n%t.length]}}),r.jsxRuntimeExports.jsx(Pt._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},n))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[l.map((o,n)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{N(t[n])},onMouseLeave:()=>{N(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:n*320/t.length+1,y:1,width:320/t.length-2,height:8,className:S===t[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[n],...S===t[n]?{}:{stroke:t[n]}}}),r.jsxRuntimeExports.jsx("text",{x:(n+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:io.numberFormattingFunction(o,void 0,void 0,void 0,void 0,Ye)})]},n)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{N(t[l.length])},onMouseLeave:()=>{N(void 0)},x:l.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${S===t[l.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[l.length],...S===t[l.length]?{}:{stroke:t[l.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{he(!0)},children:r.jsxRuntimeExports.jsx(gt.ExpandIcon,{})})}),H==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>ye("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>ye("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),U&&K!==void 0?r.jsxRuntimeExports.jsx(oo.DetailsModal,{body:U,data:K,setData:Q,className:G?.modal}):null,ge&&C&&Ie&&Pe?r.jsxRuntimeExports.jsx(to.Tooltip,{data:ge,body:C,xPos:Ie,yPos:Pe,backgroundStyle:D?.tooltip,className:G?.tooltip}):null]})}function jo(a){const e=r.compilerRuntimeExports.c(141),{data:t,mapData:f,graphTitle:v,colors:l,sources:j,graphDescription:b,height:c,width:x,footNote:R,mapColorLegendTitle:C,colorDomain:q,choroplethScaleType:ce,radius:de,scale:Ce,centerPoint:A,padding:Re,mapBorderWidth:Ge,mapNoDataColor:He,backgroundColor:De,showLabels:z,mapBorderColor:Se,tooltip:U,relativeHeight:D,onSeriesMouseOver:G,isWorldMap:re,showColorScale:H,zoomScaleExtend:E,zoomTranslateExtend:V,graphID:ue,highlightedDataPoints:Ne,onSeriesMouseClick:ae,graphDownload:X,dataDownload:Me,showAntarctica:ne,language:pe,minHeight:me,theme:Oe,ariaLabel:qe,resetSelectionOnDoubleClick:Y,detailsOnClick:J,styles:m,classNames:y,mapProjection:Xe,zoomInteraction:Ye,animate:Z,dimmedOpacity:Je,customLayers:S,maxRadiusValue:N,timeline:xe,collapseColorScaleByDefault:he,dotColor:fe,highlightedIds:K,mapProperty:Q,dotLegendTitle:ge,dotBorderColor:I,labelColor:Ie,projectionRotate:M,rewindCoordinatesInMapData:Pe,locale:W,mapOverlay:g}=a,w=f===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":f,ie=R===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.":R,k=ce===void 0?"threshold":ce,Be=de===void 0?5:de,ee=Ce===void 0?.95:Ce,L=Ge===void 0?.5:Ge,_e=He===void 0?ke.Colors.light.graphNoData:He,ze=De===void 0?!1:De,Ve=z===void 0?!1:z,We=Se===void 0?ke.Colors.light.grays["gray-500"]:Se,P=re===void 0?!0:re,te=H===void 0?!0:H;let oe;e[0]!==E?(oe=E===void 0?[.8,6]:E,e[0]=E,e[1]=oe):oe=e[1];const ye=oe,o=X===void 0?!1:X,n=Me===void 0?!1:Me,h=ne===void 0?!1:ne,B=pe===void 0?"en":pe,i=me===void 0?0:me,$=Oe===void 0?"light":Oe,Le=Y===void 0?!0:Y,$e=Xe===void 0?"naturalEarth":Xe,yt=Ye===void 0?"button":Ye,Ze=Z===void 0?!1:Z,vt=Je===void 0?.3:Je;let Ke;e[2]!==S?(Ke=S===void 0?[]:S,e[2]=S,e[3]=Ke):Ke=e[3];const jt=Ke;let Qe;e[4]!==xe?(Qe=xe===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:xe,e[4]=xe,e[5]=Qe):Qe=e[5];const d=Qe,bt=fe===void 0?ke.Colors.primaryColors["blue-600"]:fe,Et=Q===void 0?"ISO3":Q,wt=Ie===void 0?ke.Colors.primaryColors["blue-600"]:Ie;let et;e[6]!==M?(et=M===void 0?[0,0]:M,e[6]=M,e[7]=et):et=e[7];const kt=et,Ct=Pe===void 0?!0:Pe,Rt=W===void 0?"en":W,[se,Ht]=s.useState(0),[Fe,Xt]=s.useState(0),[F,Yt]=s.useState(d.autoplay);let Te;if(e[8]!==t||e[9]!==d.dateFormat){let u;e[11]!==d.dateFormat?(u=O=>zt.parse(`${O.date}`,d.dateFormat||"yyyy",new Date).getTime(),e[11]=d.dateFormat,e[12]=u):u=e[12],Te=[...new Set(t.filter(Oo).map(u))],Te.sort(Mo),e[8]=t,e[9]=d.dateFormat,e[10]=Te}else Te=e[10];const p=Te,[T,Dt]=s.useState(d.autoplay?0:p.length-1),[ve,Jt]=s.useState(void 0),[St,Zt]=s.useState(void 0),Nt=s.useRef(null),_t=s.useRef(null);let tt;e[13]!==k||e[14]!==q||e[15]!==l?.length||e[16]!==t?(tt=q||(k==="categorical"?po.getUniqValue(t,"x"):mo.getJenks(t.map(No),l?.length||4)),e[13]=k,e[14]=q,e[15]=l?.length,e[16]=t,e[17]=tt):tt=e[17];const Ae=tt;let ot,rt;e[18]===Symbol.for("react.memo_cache_sentinel")?(ot=()=>{const u=new ResizeObserver(O=>{Ht(O[0].target.clientWidth||620),Xt(O[0].target.clientHeight||480)});return Nt.current&&u.observe(Nt.current),()=>u.disconnect()},rt=[],e[18]=ot,e[19]=rt):(ot=e[18],rt=e[19]),s.useEffect(ot,rt);let at;e[20]===Symbol.for("react.memo_cache_sentinel")?(at=u=>{Jt(u)},e[20]=at):at=e[20];const nt=s.useEffectEvent(at);let it;e[21]===Symbol.for("react.memo_cache_sentinel")?(it=u=>{Zt(u)},e[21]=it):it=e[21];const Ue=s.useEffectEvent(it);let st;e[22]!==w||e[23]!==nt?(st=()=>{typeof w=="string"?$t.fetchAndParseJSON(w).then(O=>{nt(O)}):nt(w)},e[22]=w,e[23]=nt,e[24]=st):st=e[24];let lt;e[25]!==w?(lt=[w],e[25]=w,e[26]=lt):lt=e[26],s.useEffect(st,lt);let ct;e[27]!==g?.mapData||e[28]!==Ue?(ct=()=>{g?.mapData||Ue(void 0),typeof g?.mapData=="string"?$t.fetchAndParseJSON(g?.mapData).then(O=>{Ue(O)}):Ue(g?.mapData)},e[27]=g?.mapData,e[28]=Ue,e[29]=ct):ct=e[29];const Mt=g?.mapData;let dt;e[30]!==Mt?(dt=[Mt],e[30]=Mt,e[31]=dt):dt=e[31],s.useEffect(ct,dt);let ut,pt;e[32]!==F||e[33]!==d.speed||e[34]!==p?(ut=()=>{const u=setInterval(()=>{Dt(O=>O<p.length-1?O+1:0)},(d.speed||2)*1e3);return F||clearInterval(u),()=>clearInterval(u)},pt=[p,F,d.speed],e[32]=F,e[33]=d.speed,e[34]=p,e[35]=ut,e[36]=pt):(ut=e[35],pt=e[36]),s.useEffect(ut,pt);const Ot=d.dateFormat||"yyyy";let mt;e[37]!==T||e[38]!==Ot||e[39]!==d.showOnlyActiveDate||e[40]!==p?(mt=Vt.getSliderMarks(p,T,d.showOnlyActiveDate,Ot),e[37]=T,e[38]=Ot,e[39]=d.showOnlyActiveDate,e[40]=p,e[41]=mt):mt=e[41];const xt=mt,qt=y?.graphContainer,It=m?.graphContainer;let je;e[42]!==y?.description||e[43]!==y?.title||e[44]!==t||e[45]!==n||e[46]!==b||e[47]!==o||e[48]!==v||e[49]!==m?.description||e[50]!==m?.title||e[51]!==x?(je=v||b||o||n?r.jsxRuntimeExports.jsx(uo.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:y?.title,description:y?.description},graphTitle:v,graphDescription:b,width:x,graphDownload:o?_t:void 0,dataDownload:n?t.map(So).filter(Do).length>0?t.map(Ro).filter(Co):t.filter(ko):null}):null,e[42]=y?.description,e[43]=y?.title,e[44]=t,e[45]=n,e[46]=b,e[47]=o,e[48]=v,e[49]=m?.description,e[50]=m?.title,e[51]=x,e[52]=je):je=e[52];let be;e[53]!==T||e[54]!==xt||e[55]!==F||e[56]!==d.enabled||e[57]!==p?(be=d.enabled&&p.length>0&&xt?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!F)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":F?"Click to pause animation":"Click to play animation",children:F?r.jsxRuntimeExports.jsx(gt.Pause,{}):r.jsxRuntimeExports.jsx(gt.Play,{})}),r.jsxRuntimeExports.jsx(Vt.Nr,{min:p[0],max:p[p.length-1],marks:xt,step:null,defaultValue:p[p.length-1],value:p[T],onChangeComplete:u=>{Dt(p.indexOf(u))},onChange:u=>{Dt(p.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[53]=T,e[54]=xt,e[55]=F,e[56]=d.enabled,e[57]=p,e[58]=be):be=e[58];let Ee;e[59]!==Ze||e[60]!==A||e[61]!==k||e[62]!==y||e[63]!==he||e[64]!==l||e[65]!==jt||e[66]!==t||e[67]!==J||e[68]!==vt||e[69]!==Ae||e[70]!==I||e[71]!==bt||e[72]!==ge||e[73]!==c||e[74]!==Ne||e[75]!==K||e[76]!==T||e[77]!==P||e[78]!==wt||e[79]!==Rt||e[80]!==We||e[81]!==L||e[82]!==C||e[83]!==_e||e[84]!==g?.mapBorderColor||e[85]!==g?.mapBorderWidth||e[86]!==$e||e[87]!==Et||e[88]!==ve||e[89]!==N||e[90]!==i||e[91]!==ae||e[92]!==G||e[93]!==St||e[94]!==kt||e[95]!==Be||e[96]!==D||e[97]!==Le||e[98]!==Ct||e[99]!==ee||e[100]!==h||e[101]!==te||e[102]!==Ve||e[103]!==m||e[104]!==Fe||e[105]!==se||e[106]!==$||e[107]!==d.dateFormat||e[108]!==d.enabled||e[109]!==U||e[110]!==p||e[111]!==x||e[112]!==yt||e[113]!==ye||e[114]!==V?(Ee=r.jsxRuntimeExports.jsx(Ft.GraphArea,{ref:Nt,children:se&&Fe&&ve?r.jsxRuntimeExports.jsx(vo,{dotColor:bt,data:t.filter(u=>d.enabled?`${u.date}`===zt.format(new Date(p[T]),d.dateFormat||"yyyy"):u),mapData:h?ve:{...ve,features:ve.features.filter(wo)},overlayMapData:St,overlayMapBorderColor:g?.mapBorderColor,overlayMapBorderWidth:g?.mapBorderWidth,colorDomain:Ae,width:se,height:Fe,scale:ee,centerPoint:A,colors:l||(k==="categorical"?ke.Colors[$].sequentialColors[`neutralColorsx0${Ae.length}`]:ke.Colors[$].sequentialColors[`neutralColorsx0${Ae.length+1}`]),mapColorLegendTitle:C,radius:Be,categorical:k==="categorical",mapBorderWidth:L,mapNoDataColor:_e,mapBorderColor:We,tooltip:U,onSeriesMouseOver:G,showLabels:Ve,isWorldMap:P,showColorScale:te,zoomScaleExtend:ye,zoomTranslateExtend:V,onSeriesMouseClick:ae,highlightedDataPoints:Ne,resetSelectionOnDoubleClick:Le,styles:m,classNames:y,zoomInteraction:yt,detailsOnClick:J,mapProjection:$e||(P?"naturalEarth":"mercator"),animate:Ze===!0?{duration:.5,once:!0,amount:.5}:Ze||{duration:0,once:!0,amount:0},dimmedOpacity:vt,customLayers:jt,maxRadiusValue:ft.checkIfNullOrUndefined(N)?Math.max(...t.map(Eo).filter(bo)):N,collapseColorScaleByDefault:he,highlightedIds:K,mapProperty:Et,dotLegendTitle:ge,dotBorderColor:I,labelColor:wt,projectionRotate:kt,rewindCoordinatesInMapData:Ct,locale:Rt}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(i,c||(D?i?(x||se)*D>i?(x||se)*D:i:(x||se)*D:Fe))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Kt.w,{"aria-label":"Loading graph"})})}),e[59]=Ze,e[60]=A,e[61]=k,e[62]=y,e[63]=he,e[64]=l,e[65]=jt,e[66]=t,e[67]=J,e[68]=vt,e[69]=Ae,e[70]=I,e[71]=bt,e[72]=ge,e[73]=c,e[74]=Ne,e[75]=K,e[76]=T,e[77]=P,e[78]=wt,e[79]=Rt,e[80]=We,e[81]=L,e[82]=C,e[83]=_e,e[84]=g?.mapBorderColor,e[85]=g?.mapBorderWidth,e[86]=$e,e[87]=Et,e[88]=ve,e[89]=N,e[90]=i,e[91]=ae,e[92]=G,e[93]=St,e[94]=kt,e[95]=Be,e[96]=D,e[97]=Le,e[98]=Ct,e[99]=ee,e[100]=h,e[101]=te,e[102]=Ve,e[103]=m,e[104]=Fe,e[105]=se,e[106]=$,e[107]=d.dateFormat,e[108]=d.enabled,e[109]=U,e[110]=p,e[111]=x,e[112]=yt,e[113]=ye,e[114]=V,e[115]=Ee):Ee=e[115];let we;e[116]!==y?.footnote||e[117]!==y?.source||e[118]!==ie||e[119]!==j||e[120]!==m?.footnote||e[121]!==m?.source||e[122]!==x?(we=j||ie?r.jsxRuntimeExports.jsx(co.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:y?.footnote,source:y?.source},sources:j,footNote:ie,width:x}):null,e[116]=y?.footnote,e[117]=y?.source,e[118]=ie,e[119]=j,e[120]=m?.footnote,e[121]=m?.source,e[122]=x,e[123]=we):we=e[123];let ht;return e[124]!==qe||e[125]!==ze||e[126]!==ue||e[127]!==c||e[128]!==B||e[129]!==i||e[130]!==Re||e[131]!==D||e[132]!==qt||e[133]!==It||e[134]!==je||e[135]!==be||e[136]!==Ee||e[137]!==we||e[138]!==$||e[139]!==x?(ht=r.jsxRuntimeExports.jsxs(Ft.GraphContainer,{className:qt,style:It,id:ue,ref:_t,"aria-label":qe,backgroundColor:ze,theme:$,language:B,minHeight:i,width:x,height:c,relativeHeight:D,padding:Re,children:[je,be,Ee,we]}),e[124]=qe,e[125]=ze,e[126]=ue,e[127]=c,e[128]=B,e[129]=i,e[130]=Re,e[131]=D,e[132]=qt,e[133]=It,e[134]=je,e[135]=be,e[136]=Ee,e[137]=we,e[138]=$,e[139]=x,e[140]=ht):ht=e[140],ht}function bo(a){return a!=null}function Eo(a){return a.radius}function wo(a){return a.properties?.NAME!=="Antarctica"}function ko(a){return a!==void 0}function Co(a){return a!==void 0}function Ro(a){return a.data}function Do(a){return a!==void 0}function So(a){return a.data}function No(a){return a.x}function Mo(a,e){return a-e}function Oo(a){return a.date}exports.HybridMap=jo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-D4pAp7u0.cjs"),i=require("react"),zt=require("./parse-xYI9yrvL.cjs"),_t=require("./getSliderMarks-BzrpHrHS.cjs"),Zt=require("./Spinner-WHzzloYQ.cjs"),Vt=require("./index-DQA8q5sC.cjs"),z=require("./index-DLFt97gy.cjs"),It=require("./Typography-BqmyF1gP.cjs"),Kt=require("./index-C5K--w8d.cjs"),Wt=require("./Source-PKuwZOn3.cjs"),Qt=require("./index-w64Zl8io-DrMm5QSb.cjs"),eo=require("./Tooltip-C9F3uYG0.cjs"),yt=require("./index-BhI7mBJx.cjs"),to=require("./DetailsModal-Du8Fr1QD.cjs"),oo=require("./ImageDownloadButton.cjs"),ro=require("./pow-BnyPO-NX.cjs"),ao=require("./ordinal-CrsysVE-.cjs"),no=require("./threshold-DNsSUf8Q.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),ce=require("./proxy-CqH8m8IQ.cjs"),ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),io=require("./numberFormattingFunction-u2iNHL_c.cjs"),so=require("./use-in-view-dnRv_qqF.cjs"),lo=require("./index-FXfr51ZM.cjs"),co=require("./GraphFooter.cjs"),uo=require("./GraphHeader.cjs"),Ce=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),$t=require("./GraphContainer-Cul9b74X.cjs"),po=require("./getUniqValue-NX8DgwND.cjs"),mo=require("./getJenks-BzJvhy_H.cjs");function xo(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const f=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,f.get?f:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const ho=xo(i);var go="Separator",Ft="horizontal",fo=["horizontal","vertical"],Tt=ho.forwardRef((a,e)=>{const{decorative:t,orientation:f=Ft,...v}=a,s=yo(f)?f:Ft,j=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return r.ae.jsx(Qt.w.div,{"data-orientation":s,...j,...v,ref:e})});Tt.displayName=go;function yo(a){return fo.includes(a)}var At=Tt;const Ut=i.forwardRef((a,e)=>{const t=r._.c(14);let f,v,s,j;t[0]!==a?({className:f,variant:s,orientation:j,...v}=a,t[0]=a,t[1]=f,t[2]=v,t[3]=s,t[4]=j):(f=t[1],v=t[2],s=t[3],j=t[4]);const b=s===void 0?"dark":s,c=j===void 0?"horizontal":j,x=c==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",C=b==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let R;t[5]!==f||t[6]!==x||t[7]!==C?(R=r.mo(x,C,f),t[5]=f,t[6]=x,t[7]=C,t[8]=R):R=t[8];let O;return t[9]!==c||t[10]!==v||t[11]!==e||t[12]!==R?(O=r.ae.jsx(At,{...v,ref:e,orientation:c,className:R}),t[9]=c,t[10]=v,t[11]=e,t[12]=R,t[13]=O):O=t[13],O});Ut.displayName=At.displayName;function vo(a){const{data:e,colors:t,mapData:f,mapColorLegendTitle:v,colorDomain:s,radius:j,height:b,width:c,scale:x,centerPoint:C,tooltip:R,showLabels:O,mapBorderWidth:de,mapBorderColor:ue,mapNoDataColor:De,onSeriesMouseOver:H,showColorScale:Se,zoomScaleExtend:Ye,zoomTranslateExtend:Je,highlightedDataPoints:Ne,onSeriesMouseClick:_,resetSelectionOnDoubleClick:Me,detailsOnClick:X,styles:D,classNames:Y,mapProjection:oe,zoomInteraction:J,animate:E,dimmedOpacity:q,customLayers:pe,maxRadiusValue:Oe,categorical:re,dotColor:Z,collapseColorScaleByDefault:qe,highlightedIds:V,mapProperty:me,dotLegendTitle:xe,dotBorderColor:Ie,labelColor:Be,projectionRotate:K,rewindCoordinatesInMapData:Q,overlayMapData:m,overlayMapBorderColor:y,overlayMapBorderWidth:Ze,numberDisplayOptions:he,graphDownload:Pe}=a,ee=i.useMemo(()=>Q?z.index_default(f,{reverse:!0}):f,[f,Q]),ge=i.useMemo(()=>!Q||!m?m:z.index_default(m,{reverse:!0}),[m,Q]),[S,N]=i.useState(void 0),[ze,_e]=i.useState(qe===void 0?!(c<680):!qe),ae=i.useRef(null),[ne,W]=i.useState(void 0),[fe,L]=i.useState(void 0),[ie,$]=i.useState(void 0),[ye,h]=i.useState(void 0),k=i.useRef(null),I=so.useInView(k,{once:E.once,amount:E.amount}),B=i.useRef(null),P=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?ro.sqrt().domain([0,Oe]).range([.25,j]).nice():void 0,Ve=re?ao.ordinal().domain(s).range(t):no.threshold().domain(s).range(t);i.useEffect(()=>{const o=Bt.select(B.current),n=Bt.select(k.current),g=l=>{if(J==="noZoom")return!1;if(J==="button")return!l.type.includes("wheel");const Fe=l.type==="wheel",Te=l.type.startsWith("touch"),Ae=l.type==="mousedown"||l.type==="mousemove";return Te?!0:Fe?J==="scroll"?!0:l.ctrlKey:Ae&&!l.button&&!l.ctrlKey},w=z.zoom().scaleExtent(Ye).translateExtent(Je||[[-20,-20],[c+20,b+20]]).filter(g).on("zoom",({transform:l})=>{o.attr("transform",l)});n.call(w),ae.current=w},[b,c,J]);const te=z.index_default$1(ee),F=Kt.index_default(ee),We=(te[2]-te[0])*1.15,Le=(te[3]-te[1])*1.15,$e=c*190/960*360/We,ve=b*190/678*180/Le,T=x*Math.min($e,ve),A=oe==="mercator"?z.geoMercator().rotate(K).center(C||F.geometry.coordinates).translate([c/2,b/2]).scale(T):oe==="equalEarth"?z.geoEqualEarth().rotate(K).center(C||F.geometry.coordinates).translate([c/2,b/2]).scale(T):oe==="naturalEarth"?z.geoNaturalEarth1().rotate(K).center(C||F.geometry.coordinates).translate([c/2,b/2]).scale(T):oe==="orthographic"?z.geoOrthographic().rotate(K).center(C||F.geometry.coordinates).translate([c/2,b/2]).scale(T):z.geoAlbersUsa().rotate(K).center(C||F.geometry.coordinates).translate([c/2,b/2]).scale(T),se=z.geoPath().projection(A),je=o=>{if(!k.current||!ae.current)return;Bt.select(k.current).call(ae.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(ce.motion.svg,{width:`${c}px`,height:`${b}px`,viewBox:`0 0 ${c} ${b}`,ref:k,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:B,children:[pe.filter(o=>o.position==="before").map(o=>o.layer),ee.features.map((o,n)=>{if(!o.properties?.[me])return null;const g=se(o);return g?r.jsxRuntimeExports.jsx(ce.motion.g,{opacity:S?q:V?V.indexOf(o.properties[me])!==-1?1:q:1,children:r.jsxRuntimeExports.jsx("path",{d:g,style:{stroke:ue,strokeWidth:de,fill:De,vectorEffect:"non-scaling-stroke"}})},n):null}),r.jsxRuntimeExports.jsxs(lo.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const n=ee.features.findIndex(l=>o.id===l.properties[me]);if(n===-1)return null;const g=se(ee.features[n]);if(!g)return null;const w=ft.checkIfNullOrUndefined(o.x)?De:Ve(o.x);return r.jsxRuntimeExports.jsx(ce.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:S?S===w&&(!V||V.indexOf(o.id)!==-1)?1:q:V?V.indexOf(o.id)!==-1?1:q:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:l=>{L(o),h(l.clientY),$(l.clientX),H?.(o)},onMouseMove:l=>{L(o),h(l.clientY),$(l.clientX)},onMouseLeave:()=>{L(void 0),$(void 0),h(void 0),H?.(void 0)},onClick:()=>{(_||X)&&(Vt.isEqual(ne,o)&&Me?(W(void 0),_?.(void 0)):(W(o),_?.(o)))},children:r.jsxRuntimeExports.jsx(ce.motion.path,{d:g,variants:{initial:{fill:w,opacity:0},whileInView:{fill:w,opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},style:{stroke:ue,strokeWidth:de,vectorEffect:"non-scaling-stroke"}},`${o.id}`)},o.id)}),ge?.features.map((o,n)=>{const g=se(o);return g?r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("path",{d:g,style:{stroke:y||ue,strokeWidth:Ze||de+1,fill:"none",pointerEvents:"none",vectorEffect:"non-scaling-stroke"}})},n):null}),e.filter(o=>!ft.checkIfNullOrUndefined(o.lat)&&!ft.checkIfNullOrUndefined(o.long)).map(o=>{const n=A([o.long,o.lat])[0]>.8*c?-1:1;return r.jsxRuntimeExports.jsxs(ce.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:Ne?Ne.indexOf(o.label||"")!==-1?1:q:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:g=>{L(o),h(g.clientY),$(g.clientX),H?.(o)},onMouseMove:g=>{L(o),h(g.clientY),$(g.clientX)},onMouseLeave:()=>{L(void 0),$(void 0),h(void 0),H?.(void 0)},onClick:()=>{(_||X)&&(Vt.isEqual(ne,o)&&Me?(W(void 0),_?.(void 0)):(W(o),_?.(o)))},transform:`translate(${A([o.long,o.lat])[0]},${A([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(ce.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:Z,stroke:Ie||Z},whileInView:{r:P?P(o.radius||0):j,fill:Z,stroke:Ie||Z,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),O&&o.label?r.jsxRuntimeExports.jsx(ce.motion.text,{variants:{initial:{opacity:0,x:n*(P?P(o.radius||0):j)},whileInView:{opacity:1,x:n*(P?P(o.radius||0):j),transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:r.mo("text-sm",Y?.graphObjectValues),style:{textAnchor:n===-1?"end":"start",fill:Be||"#000",vectorEffect:"non-scaling-stroke",...D?.graphObjectValues||{}},dx:n*4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`)})]}),pe.filter(o=>o.position==="after").map(o=>o.layer)]})}),Se===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",Y?.colorLegend),children:ze?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.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:()=>{_e(!1)},children:r.jsxRuntimeExports.jsx(yt.X,{})}),r.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:re?void 0:"340px"},children:[xe&&xe!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Z}}),r.jsxRuntimeExports.jsx(It._,{size:"xs",marginBottom:"none",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:xe})]}),r.jsxRuntimeExports.jsx(Wt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Ut,{}),r.jsxRuntimeExports.jsx(Wt.n,{size:"xl"})]}):null,v&&v!==""?r.jsxRuntimeExports.jsx(It._,{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:v}):null,re?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:s.map((o,n)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{N(t[n%t.length])},onMouseLeave:()=>{N(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[n%t.length]}}),r.jsxRuntimeExports.jsx(It._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},n))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[s.map((o,n)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{N(t[n])},onMouseLeave:()=>{N(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:n*320/t.length+1,y:1,width:320/t.length-2,height:8,className:S===t[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[n],...S===t[n]?{}:{stroke:t[n]}}}),r.jsxRuntimeExports.jsx("text",{x:(n+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:io.numberFormattingFunction(o,void 0,he?.precision??2,void 0,void 0,he?.locale||"en",he?.padZeros||!1)})]},n)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{N(t[s.length])},onMouseLeave:()=>{N(void 0)},x:s.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${S===t[s.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[s.length],...S===t[s.length]?{}:{stroke:t[s.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{_e(!0)},children:r.jsxRuntimeExports.jsx(yt.ExpandIcon,{})})}),J==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>je("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>je("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]}),Pe&&r.jsxRuntimeExports.jsx("div",{className:"absolute right-4 top-4 flex flex-col image-download-button",children:r.jsxRuntimeExports.jsx(oo.ImageDownloadButton,{nodeID:Pe,buttonSmall:!0})})]}),X&&ne!==void 0?r.jsxRuntimeExports.jsx(to.DetailsModal,{body:X,data:ne,setData:W,className:Y?.modal}):null,fe&&R&&ie&&ye?r.jsxRuntimeExports.jsx(eo.Tooltip,{data:fe,body:R,xPos:ie,yPos:ye,backgroundStyle:D?.tooltip,className:Y?.tooltip}):null]})}function jo(a){const e=r.compilerRuntimeExports.c(141),{data:t,mapData:f,graphTitle:v,colors:s,sources:j,graphDescription:b,height:c,width:x,footNote:C,mapColorLegendTitle:R,colorDomain:O,choroplethScaleType:de,radius:ue,scale:De,centerPoint:H,padding:Se,mapBorderWidth:Ye,mapNoDataColor:Je,backgroundColor:Ne,showLabels:_,mapBorderColor:Me,tooltip:X,relativeHeight:D,onSeriesMouseOver:Y,isWorldMap:oe,showColorScale:J,zoomScaleExtend:E,zoomTranslateExtend:q,graphID:pe,highlightedDataPoints:Oe,onSeriesMouseClick:re,graphDownload:Z,dataDownload:qe,showAntarctica:V,language:me,minHeight:xe,theme:Ie,ariaLabel:Be,resetSelectionOnDoubleClick:K,detailsOnClick:Q,styles:m,classNames:y,mapProjection:Ze,zoomInteraction:he,animate:Pe,dimmedOpacity:ee,customLayers:ge,maxRadiusValue:S,timeline:N,collapseColorScaleByDefault:ze,dotColor:_e,highlightedIds:ae,mapProperty:ne,dotLegendTitle:W,dotBorderColor:fe,labelColor:L,projectionRotate:ie,rewindCoordinatesInMapData:$,numberDisplayOptions:ye,mapOverlay:h}=a,k=f===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":f,I=C===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":C,B=de===void 0?"threshold":de,P=ue===void 0?5:ue,Ve=De===void 0?.95:De,te=Ye===void 0?.5:Ye,F=Je===void 0?Ce.Colors.light.graphNoData:Je,We=Ne===void 0?!1:Ne,Le=_===void 0?!1:_,$e=Me===void 0?Ce.Colors.light.grays["gray-500"]:Me,ve=oe===void 0?!0:oe,T=J===void 0?!0:J;let A;e[0]!==E?(A=E===void 0?[.8,6]:E,e[0]=E,e[1]=A):A=e[1];const se=A,je=Z===void 0?!1:Z,o=qe===void 0?!1:qe,n=V===void 0?!1:V,g=me===void 0?"en":me,w=xe===void 0?0:xe,l=Ie===void 0?"light":Ie,Fe=K===void 0?!0:K,Te=Ze===void 0?"naturalEarth":Ze,Ae=he===void 0?"button":he,Ke=Pe===void 0?!1:Pe,vt=ee===void 0?.3:ee;let Qe;e[2]!==ge?(Qe=ge===void 0?[]:ge,e[2]=ge,e[3]=Qe):Qe=e[3];const jt=Qe;let et;e[4]!==N?(et=N===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:N,e[4]=N,e[5]=et):et=e[5];const d=et,bt=_e===void 0?Ce.Colors.primaryColors["blue-600"]:_e,Et=ne===void 0?"ISO3":ne,wt=L===void 0?Ce.Colors.primaryColors["blue-600"]:L;let tt;e[6]!==ie?(tt=ie===void 0?[0,0]:ie,e[6]=ie,e[7]=tt):tt=e[7];const kt=tt,Rt=$===void 0?!0:$,[le,Gt]=i.useState(0),[Ue,Ht]=i.useState(0),[U,Xt]=i.useState(d.autoplay);let Ge;if(e[8]!==t||e[9]!==d.dateFormat){let u;e[11]!==d.dateFormat?(u=M=>zt.parse(`${M.date}`,d.dateFormat||"yyyy",new Date).getTime(),e[11]=d.dateFormat,e[12]=u):u=e[12],Ge=[...new Set(t.filter(Oo).map(u))],Ge.sort(Mo),e[8]=t,e[9]=d.dateFormat,e[10]=Ge}else Ge=e[10];const p=Ge,[G,Ct]=i.useState(d.autoplay?0:p.length-1),[be,Yt]=i.useState(void 0),[Dt,Jt]=i.useState(void 0),St=i.useRef(null),Pt=i.useRef(null);let ot;e[13]!==B||e[14]!==O||e[15]!==s?.length||e[16]!==t?(ot=O||(B==="categorical"?po.getUniqValue(t,"x"):mo.getJenks(t.map(No),s?.length||4)),e[13]=B,e[14]=O,e[15]=s?.length,e[16]=t,e[17]=ot):ot=e[17];const He=ot;let rt,at;e[18]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const u=new ResizeObserver(M=>{Gt(M[0].target.clientWidth||620),Ht(M[0].target.clientHeight||480)});return St.current&&u.observe(St.current),()=>u.disconnect()},at=[],e[18]=rt,e[19]=at):(rt=e[18],at=e[19]),i.useEffect(rt,at);let nt;e[20]===Symbol.for("react.memo_cache_sentinel")?(nt=u=>{Yt(u)},e[20]=nt):nt=e[20];const it=i.useEffectEvent(nt);let st;e[21]===Symbol.for("react.memo_cache_sentinel")?(st=u=>{Jt(u)},e[21]=st):st=e[21];const Xe=i.useEffectEvent(st);let lt;e[22]!==k||e[23]!==it?(lt=()=>{typeof k=="string"?Lt.fetchAndParseJSON(k).then(M=>{it(M)}):it(k)},e[22]=k,e[23]=it,e[24]=lt):lt=e[24];let ct;e[25]!==k?(ct=[k],e[25]=k,e[26]=ct):ct=e[26],i.useEffect(lt,ct);let dt;e[27]!==h?.mapData||e[28]!==Xe?(dt=()=>{h?.mapData||Xe(void 0),typeof h?.mapData=="string"?Lt.fetchAndParseJSON(h?.mapData).then(M=>{Xe(M)}):Xe(h?.mapData)},e[27]=h?.mapData,e[28]=Xe,e[29]=dt):dt=e[29];const Nt=h?.mapData;let ut;e[30]!==Nt?(ut=[Nt],e[30]=Nt,e[31]=ut):ut=e[31],i.useEffect(dt,ut);let pt,mt;e[32]!==U||e[33]!==d.speed||e[34]!==p?(pt=()=>{const u=setInterval(()=>{Ct(M=>M<p.length-1?M+1:0)},(d.speed||2)*1e3);return U||clearInterval(u),()=>clearInterval(u)},mt=[p,U,d.speed],e[32]=U,e[33]=d.speed,e[34]=p,e[35]=pt,e[36]=mt):(pt=e[35],mt=e[36]),i.useEffect(pt,mt);const Mt=d.dateFormat||"yyyy";let xt;e[37]!==G||e[38]!==Mt||e[39]!==d.showOnlyActiveDate||e[40]!==p?(xt=_t.getSliderMarks(p,G,d.showOnlyActiveDate,Mt),e[37]=G,e[38]=Mt,e[39]=d.showOnlyActiveDate,e[40]=p,e[41]=xt):xt=e[41];const ht=xt,Ot=y?.graphContainer,qt=m?.graphContainer;let Ee;e[42]!==y?.description||e[43]!==y?.title||e[44]!==t||e[45]!==o||e[46]!==b||e[47]!==v||e[48]!==m?.description||e[49]!==m?.title||e[50]!==x?(Ee=v||b||o?r.jsxRuntimeExports.jsx(uo.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:y?.title,description:y?.description},graphTitle:v,graphDescription:b,width:x,dataDownload:o?t.map(So).filter(Do).length>0?t.map(Co).filter(Ro):t.filter(ko):null}):null,e[42]=y?.description,e[43]=y?.title,e[44]=t,e[45]=o,e[46]=b,e[47]=v,e[48]=m?.description,e[49]=m?.title,e[50]=x,e[51]=Ee):Ee=e[51];let we;e[52]!==G||e[53]!==ht||e[54]!==U||e[55]!==d.enabled||e[56]!==p?(we=d.enabled&&p.length>0&&ht?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Xt(!U)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":U?"Click to pause animation":"Click to play animation",children:U?r.jsxRuntimeExports.jsx(yt.Pause,{}):r.jsxRuntimeExports.jsx(yt.Play,{})}),r.jsxRuntimeExports.jsx(_t.Nr,{min:p[0],max:p[p.length-1],marks:ht,step:null,defaultValue:p[p.length-1],value:p[G],onChangeComplete:u=>{Ct(p.indexOf(u))},onChange:u=>{Ct(p.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[52]=G,e[53]=ht,e[54]=U,e[55]=d.enabled,e[56]=p,e[57]=we):we=e[57];let ke;e[58]!==Ke||e[59]!==H||e[60]!==B||e[61]!==y||e[62]!==ze||e[63]!==s||e[64]!==jt||e[65]!==t||e[66]!==Q||e[67]!==vt||e[68]!==He||e[69]!==fe||e[70]!==bt||e[71]!==W||e[72]!==je||e[73]!==c||e[74]!==Oe||e[75]!==ae||e[76]!==G||e[77]!==ve||e[78]!==wt||e[79]!==$e||e[80]!==te||e[81]!==R||e[82]!==F||e[83]!==h?.mapBorderColor||e[84]!==h?.mapBorderWidth||e[85]!==Te||e[86]!==Et||e[87]!==be||e[88]!==S||e[89]!==w||e[90]!==ye||e[91]!==re||e[92]!==Y||e[93]!==Dt||e[94]!==kt||e[95]!==P||e[96]!==D||e[97]!==Fe||e[98]!==Rt||e[99]!==Ve||e[100]!==n||e[101]!==T||e[102]!==Le||e[103]!==m||e[104]!==Ue||e[105]!==le||e[106]!==l||e[107]!==d.dateFormat||e[108]!==d.enabled||e[109]!==X||e[110]!==p||e[111]!==x||e[112]!==Ae||e[113]!==se||e[114]!==q?(ke=r.jsxRuntimeExports.jsx($t.GraphArea,{ref:St,children:le&&Ue&&be?r.jsxRuntimeExports.jsx(vo,{dotColor:bt,data:t.filter(u=>d.enabled?`${u.date}`===zt.format(new Date(p[G]),d.dateFormat||"yyyy"):u),mapData:n?be:{...be,features:be.features.filter(wo)},overlayMapData:Dt,overlayMapBorderColor:h?.mapBorderColor,overlayMapBorderWidth:h?.mapBorderWidth,colorDomain:He,width:le,height:Ue,scale:Ve,centerPoint:H,colors:s||(B==="categorical"?Ce.Colors[l].sequentialColors[`neutralColorsx0${He.length}`]:Ce.Colors[l].sequentialColors[`neutralColorsx0${He.length+1}`]),mapColorLegendTitle:R,radius:P,categorical:B==="categorical",mapBorderWidth:te,mapNoDataColor:F,mapBorderColor:$e,tooltip:X,onSeriesMouseOver:Y,showLabels:Le,isWorldMap:ve,showColorScale:T,zoomScaleExtend:se,zoomTranslateExtend:q,onSeriesMouseClick:re,highlightedDataPoints:Oe,resetSelectionOnDoubleClick:Fe,styles:m,classNames:y,zoomInteraction:Ae,detailsOnClick:Q,mapProjection:Te||(ve?"naturalEarth":"mercator"),animate:Ke===!0?{duration:.5,once:!0,amount:.5}:Ke||{duration:0,once:!0,amount:0},dimmedOpacity:vt,customLayers:jt,maxRadiusValue:ft.checkIfNullOrUndefined(S)?Math.max(...t.map(Eo).filter(bo)):S,collapseColorScaleByDefault:ze,highlightedIds:ae,mapProperty:Et,dotLegendTitle:W,dotBorderColor:fe,labelColor:wt,projectionRotate:kt,rewindCoordinatesInMapData:Rt,numberDisplayOptions:ye,graphDownload:je?Pt:void 0}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(w,c||(D?w?(x||le)*D>w?(x||le)*D:w:(x||le)*D:Ue))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Zt.w,{"aria-label":"Loading graph"})})}),e[58]=Ke,e[59]=H,e[60]=B,e[61]=y,e[62]=ze,e[63]=s,e[64]=jt,e[65]=t,e[66]=Q,e[67]=vt,e[68]=He,e[69]=fe,e[70]=bt,e[71]=W,e[72]=je,e[73]=c,e[74]=Oe,e[75]=ae,e[76]=G,e[77]=ve,e[78]=wt,e[79]=$e,e[80]=te,e[81]=R,e[82]=F,e[83]=h?.mapBorderColor,e[84]=h?.mapBorderWidth,e[85]=Te,e[86]=Et,e[87]=be,e[88]=S,e[89]=w,e[90]=ye,e[91]=re,e[92]=Y,e[93]=Dt,e[94]=kt,e[95]=P,e[96]=D,e[97]=Fe,e[98]=Rt,e[99]=Ve,e[100]=n,e[101]=T,e[102]=Le,e[103]=m,e[104]=Ue,e[105]=le,e[106]=l,e[107]=d.dateFormat,e[108]=d.enabled,e[109]=X,e[110]=p,e[111]=x,e[112]=Ae,e[113]=se,e[114]=q,e[115]=ke):ke=e[115];let Re;e[116]!==y?.footnote||e[117]!==y?.source||e[118]!==I||e[119]!==j||e[120]!==m?.footnote||e[121]!==m?.source||e[122]!==x?(Re=j||I?r.jsxRuntimeExports.jsx(co.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:y?.footnote,source:y?.source},sources:j,footNote:I,width:x}):null,e[116]=y?.footnote,e[117]=y?.source,e[118]=I,e[119]=j,e[120]=m?.footnote,e[121]=m?.source,e[122]=x,e[123]=Re):Re=e[123];let gt;return e[124]!==Be||e[125]!==We||e[126]!==pe||e[127]!==c||e[128]!==g||e[129]!==w||e[130]!==Se||e[131]!==D||e[132]!==Ot||e[133]!==qt||e[134]!==Ee||e[135]!==we||e[136]!==ke||e[137]!==Re||e[138]!==l||e[139]!==x?(gt=r.jsxRuntimeExports.jsxs($t.GraphContainer,{className:Ot,style:qt,id:pe,ref:Pt,"aria-label":Be,backgroundColor:We,theme:l,language:g,minHeight:w,width:x,height:c,relativeHeight:D,padding:Se,children:[Ee,we,ke,Re]}),e[124]=Be,e[125]=We,e[126]=pe,e[127]=c,e[128]=g,e[129]=w,e[130]=Se,e[131]=D,e[132]=Ot,e[133]=qt,e[134]=Ee,e[135]=we,e[136]=ke,e[137]=Re,e[138]=l,e[139]=x,e[140]=gt):gt=e[140],gt}function bo(a){return a!=null}function Eo(a){return a.radius}function wo(a){return a.properties?.NAME!=="Antarctica"}function ko(a){return a!==void 0}function Ro(a){return a!==void 0}function Co(a){return a.data}function Do(a){return a!==void 0}function So(a){return a.data}function No(a){return a.x}function Mo(a,e){return a-e}function Oo(a){return a.date}exports.HybridMap=jo;
2
2
  //# sourceMappingURL=HybridMap.cjs.map