@undp/data-viz 2.0.9 → 2.1.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 (224) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +4 -4
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1699 -1577
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +252 -245
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +566 -536
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +388 -378
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +297 -291
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +4 -4
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +252 -244
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +4 -4
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +563 -525
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-DEzobeOM.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-DEzobeOM.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +112 -117
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +3 -3
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +366 -359
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +4 -4
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.cjs.map +1 -1
  108. package/dist/MultiLineAltChart.d.ts +2 -0
  109. package/dist/MultiLineAltChart.js +453 -425
  110. package/dist/MultiLineAltChart.js.map +1 -1
  111. package/dist/MultiLineChart.cjs +1 -1
  112. package/dist/MultiLineChart.d.ts +2 -0
  113. package/dist/MultiLineChart.js +4 -4
  114. package/dist/ParetoChart.cjs +1 -1
  115. package/dist/ParetoChart.cjs.map +1 -1
  116. package/dist/ParetoChart.d.ts +2 -0
  117. package/dist/ParetoChart.js +188 -193
  118. package/dist/ParetoChart.js.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  122. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  123. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  124. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  125. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  126. package/dist/RadarChart.cjs +1 -1
  127. package/dist/RadarChart.cjs.map +1 -1
  128. package/dist/RadarChart.d.ts +2 -0
  129. package/dist/RadarChart.js +158 -163
  130. package/dist/RadarChart.js.map +1 -1
  131. package/dist/SankeyChart.cjs +1 -1
  132. package/dist/SankeyChart.cjs.map +1 -1
  133. package/dist/SankeyChart.d.ts +2 -0
  134. package/dist/SankeyChart.js +172 -177
  135. package/dist/SankeyChart.js.map +1 -1
  136. package/dist/ScatterPlot.cjs +1 -1
  137. package/dist/ScatterPlot.cjs.map +1 -1
  138. package/dist/ScatterPlot.d.ts +2 -0
  139. package/dist/ScatterPlot.js +494 -483
  140. package/dist/ScatterPlot.js.map +1 -1
  141. package/dist/ScrollStory.d.ts +2 -0
  142. package/dist/SimpleLineChart.cjs +1 -1
  143. package/dist/SimpleLineChart.d.ts +2 -0
  144. package/dist/SimpleLineChart.js +4 -4
  145. package/dist/SingleGraphDashboard.cjs +1 -1
  146. package/dist/SingleGraphDashboard.cjs.map +1 -1
  147. package/dist/SingleGraphDashboard.d.ts +2 -0
  148. package/dist/SingleGraphDashboard.js +24 -24
  149. package/dist/SingleGraphDashboard.js.map +1 -1
  150. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  152. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  153. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  154. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  155. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  156. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  157. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  158. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  159. package/dist/SlopeChart.cjs +1 -1
  160. package/dist/SlopeChart.cjs.map +1 -1
  161. package/dist/SlopeChart.d.ts +2 -0
  162. package/dist/SlopeChart.js +182 -187
  163. package/dist/SlopeChart.js.map +1 -1
  164. package/dist/SparkLine.cjs +1 -1
  165. package/dist/SparkLine.d.ts +2 -0
  166. package/dist/SparkLine.js +4 -4
  167. package/dist/StatCardFromData.d.ts +2 -0
  168. package/dist/StripChart.cjs +1 -1
  169. package/dist/StripChart.cjs.map +1 -1
  170. package/dist/StripChart.d.ts +2 -0
  171. package/dist/StripChart.js +249 -258
  172. package/dist/StripChart.js.map +1 -1
  173. package/dist/ThreeDGlobe.cjs +1 -1
  174. package/dist/ThreeDGlobe.cjs.map +1 -1
  175. package/dist/ThreeDGlobe.d.ts +2 -0
  176. package/dist/ThreeDGlobe.js +142 -147
  177. package/dist/ThreeDGlobe.js.map +1 -1
  178. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  179. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  180. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  181. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  182. package/dist/TreeMapGraph.cjs +1 -1
  183. package/dist/TreeMapGraph.cjs.map +1 -1
  184. package/dist/TreeMapGraph.d.ts +2 -0
  185. package/dist/TreeMapGraph.js +159 -164
  186. package/dist/TreeMapGraph.js.map +1 -1
  187. package/dist/Types.d.ts +2 -0
  188. package/dist/UnitChart.d.ts +2 -0
  189. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  190. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  191. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  192. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  193. package/dist/index-CF5hnGvG.cjs +2 -0
  194. package/dist/index-CF5hnGvG.cjs.map +1 -0
  195. package/dist/index-DPGq3eIL.js +330 -0
  196. package/dist/index-DPGq3eIL.js.map +1 -0
  197. package/dist/index.cjs +1 -1
  198. package/dist/index.d.ts +2 -0
  199. package/dist/index.js +1 -1
  200. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  201. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  202. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  203. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  204. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  205. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  206. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  207. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  208. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  209. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  210. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  211. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  212. package/package.json +4 -4
  213. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  214. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  215. package/dist/Tooltip-CwWUegPB.js +0 -43
  216. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  217. package/dist/index-B2LQV7Tk.js +0 -335
  218. package/dist/index-B2LQV7Tk.js.map +0 -1
  219. package/dist/index-xRHRLDIp.cjs +0 -2
  220. package/dist/index-xRHRLDIp.cjs.map +0 -1
  221. package/dist/sort-BIvMlUH1.js +0 -34
  222. package/dist/sort-BIvMlUH1.js.map +0 -1
  223. package/dist/sort-O96oMZLb.cjs +0 -2
  224. package/dist/sort-O96oMZLb.cjs.map +0 -1
@@ -1,161 +1,158 @@
1
- import { j as o, m as se, c as ce } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useState as D, useRef as $t, useEffect as Ut, useEffectEvent as me } from "react";
3
- import { p as de, f as ue } from "./parse-DlCRUFh_.js";
4
- import { g as pe, N as fe } from "./getSliderMarks-HIDJ0_Cd.js";
5
- import { w as he } from "./Spinner-D7rnnwnA.js";
6
- import { i as ge } from "./index-Bwrro8-q.js";
7
- import { z as ye, t as ve, g as xe, a as be, b as we, c as je, d as ke } from "./zoom-C9MFjAaV.js";
8
- import { l as De } from "./Modal-DGcuAHyK.js";
9
- import { j as Ce } from "./Typography-PxtFcnJb.js";
10
- import { t as Ne } from "./index-GEsywGxz.js";
11
- import { T as Se } from "./Tooltip-CwWUegPB.js";
12
- import { Colors as E } from "./Colors.js";
13
- import { s as Oe } from "./string2HTML-DhG75NqA.js";
14
- import { X as Me, P as $e, e as Ee } from "./index-D491FEn1.js";
15
- import { s as Le } from "./pow-DE4c7dbW.js";
16
- import { s as oe } from "./select-DKy99ogv.js";
17
- import { u as Pe } from "./use-in-view-Cxa7y1TH.js";
18
- import { m as Rt } from "./proxy-BxkFHwUw.js";
19
- import { A as _e } from "./index-BqfRwk1n.js";
20
- import { GraphFooter as ze } from "./GraphFooter.js";
21
- import { GraphHeader as Ie } from "./GraphHeader.js";
22
- import { f as Be } from "./fetchAndParseData-BpqkBPQL.js";
23
- import { c as We } from "./checkIfNullOrUndefined-DmfiKkNw.js";
24
- import { u as ae } from "./uniqBy-BHy4I8PK.js";
25
- import { a as Te, G as Ve } from "./GraphContainer-CRqzdKu2.js";
26
- import { s as Ae } from "./sort-BIvMlUH1.js";
27
- import { a as Fe } from "./init-BJFW6EwE.js";
28
- function He(a) {
1
+ import { j as o, m as pe, c as fe } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useState as C, useRef as Mt, useEffect as Kt, useEffectEvent as he } from "react";
3
+ import { f as ge, p as ye } from "./parse-DlCRUFh_.js";
4
+ import { g as xe, N as ve } from "./getSliderMarks-HIDJ0_Cd.js";
5
+ import { w as be } from "./Spinner-D7rnnwnA.js";
6
+ import { i as we } from "./index-Bwrro8-q.js";
7
+ import { z as De, t as je, g as ke, a as Ce, b as Ne, c as Se, d as Oe } from "./zoom-C9MFjAaV.js";
8
+ import { j as $e } from "./Typography-PxtFcnJb.js";
9
+ import { t as Me } from "./index-GEsywGxz.js";
10
+ import { T as Ee } from "./Tooltip-Dj5eVppQ.js";
11
+ import { Colors as z } from "./Colors.js";
12
+ import { X as Pe, P as ze, e as Le } from "./index-D491FEn1.js";
13
+ import { D as _e } from "./DetailsModal-0Ry5nXiC.js";
14
+ import { s as Ie } from "./pow-CM2aze4M.js";
15
+ import { s as le } from "./select-DKy99ogv.js";
16
+ import { u as Ae } from "./use-in-view-Cxa7y1TH.js";
17
+ import { m as Yt } from "./proxy-BxkFHwUw.js";
18
+ import { A as Be } from "./index-BqfRwk1n.js";
19
+ import { GraphFooter as We } from "./GraphFooter.js";
20
+ import { GraphHeader as Fe } from "./GraphHeader.js";
21
+ import { f as Ve } from "./fetchAndParseData-BpqkBPQL.js";
22
+ import { c as Te } from "./checkIfNullOrUndefined-DmfiKkNw.js";
23
+ import { u as Ge } from "./uniqBy-BHy4I8PK.js";
24
+ import { a as Re, G as He } from "./GraphContainer-CRqzdKu2.js";
25
+ function Ue(a) {
29
26
  const {
30
27
  data: t,
31
28
  colors: r,
32
29
  mapData: q,
33
30
  colorLegendTitle: L,
34
31
  colorDomain: b,
35
- radius: N,
36
- height: h,
37
- width: c,
38
- scale: u,
39
- centerPoint: P,
32
+ radius: S,
33
+ height: f,
34
+ width: u,
35
+ scale: p,
36
+ centerPoint: _,
40
37
  tooltip: X,
41
- showLabels: ut,
42
- mapBorderWidth: pt,
43
- mapBorderColor: ft,
38
+ showLabels: pt,
39
+ mapBorderWidth: ft,
40
+ mapBorderColor: ht,
44
41
  mapNoDataColor: Y,
45
42
  onSeriesMouseOver: K,
46
43
  showColorScale: Et,
47
- zoomScaleExtend: Lt,
48
- zoomTranslateExtend: Pt,
49
- highlightedDataPoints: ht,
44
+ zoomScaleExtend: Pt,
45
+ zoomTranslateExtend: zt,
46
+ highlightedDataPoints: gt,
50
47
  onSeriesMouseClick: Z,
51
- resetSelectionOnDoubleClick: gt,
52
- detailsOnClick: p,
53
- styles: yt,
54
- classNames: vt,
55
- mapProjection: T,
56
- zoomInteraction: C,
48
+ resetSelectionOnDoubleClick: yt,
49
+ detailsOnClick: x,
50
+ styles: xt,
51
+ classNames: J,
52
+ mapProjection: V,
53
+ zoomInteraction: N,
57
54
  animate: w,
58
- dimmedOpacity: J,
59
- customLayers: V,
60
- maxRadiusValue: xt,
55
+ dimmedOpacity: Q,
56
+ customLayers: T,
57
+ maxRadiusValue: vt,
61
58
  collapseColorScaleByDefault: bt
62
- } = a, [wt, jt] = D(void 0), [_t, kt] = D(bt === void 0 ? !(c < 680) : !bt), Q = $t(null), [S, tt] = D(void 0), [et, l] = D(void 0), [s, A] = D(void 0), [Dt, ot] = D(void 0), _ = $t(null), z = Pe(_, {
59
+ } = a, [wt, Dt] = C(void 0), [Lt, jt] = C(bt === void 0 ? !(u < 680) : !bt), tt = Mt(null), [G, et] = C(void 0), [ot, c] = C(void 0), [m, R] = C(void 0), [kt, rt] = C(void 0), I = Mt(null), A = Ae(I, {
63
60
  once: w.once,
64
61
  amount: w.amount
65
- }), F = $t(null), O = t.filter((e) => e.radius === void 0 || e.radius === null).length !== t.length ? Le().domain([0, xt]).range([0.25, N]).nice() : void 0;
66
- Ut(() => {
67
- const e = oe(F.current), g = oe(_.current), i = (n) => {
68
- if (C === "noZoom") return !1;
69
- if (C === "button") return !n.type.includes("wheel");
70
- const j = n.type === "wheel", x = n.type.startsWith("touch"), v = n.type === "mousedown" || n.type === "mousemove";
71
- return x ? !0 : j ? C === "scroll" ? !0 : n.ctrlKey : v && !n.button && !n.ctrlKey;
72
- }, k = ye().scaleExtent(Lt).translateExtent(Pt || [[-20, -20], [c + 20, h + 20]]).filter(i).on("zoom", ({
73
- transform: n
62
+ }), H = Mt(null), j = t.filter((e) => e.radius === void 0 || e.radius === null).length !== t.length ? Ie().domain([0, vt]).range([0.25, S]).nice() : void 0;
63
+ Kt(() => {
64
+ const e = le(H.current), h = le(I.current), i = (l) => {
65
+ if (N === "noZoom") return !1;
66
+ if (N === "button") return !l.type.includes("wheel");
67
+ const D = l.type === "wheel", v = l.type.startsWith("touch"), y = l.type === "mousedown" || l.type === "mousemove";
68
+ return v ? !0 : D ? N === "scroll" ? !0 : l.ctrlKey : y && !l.button && !l.ctrlKey;
69
+ }, k = De().scaleExtent(Pt).translateExtent(zt || [[-20, -20], [u + 20, f + 20]]).filter(i).on("zoom", ({
70
+ transform: l
74
71
  }) => {
75
- e.attr("transform", n);
72
+ e.attr("transform", l);
76
73
  });
77
- g.call(k), Q.current = k;
78
- }, [h, c, C]);
79
- const I = ve(q), y = Ne(q), rt = I[2] - I[0], Ct = I[3] - I[1], Nt = c * 190 / 960 * 360 / rt, St = h * 190 / 678 * 180 / Ct, M = u * Math.min(Nt, St), B = T === "mercator" ? xe().rotate([0, 0]).center(P || y.geometry.coordinates).translate([c / 2, h / 2]).scale(M) : T === "equalEarth" ? be().rotate([0, 0]).center(P || y.geometry.coordinates).translate([c / 2, h / 2]).scale(M) : T === "naturalEarth" ? we().rotate([0, 0]).center(P || y.geometry.coordinates).translate([c / 2, h / 2]).scale(M) : T === "orthographic" ? je().rotate([0, 0]).center(P || y.geometry.coordinates).translate([c / 2, h / 2]).scale(M) : ke().rotate([0, 0]).center(P || y.geometry.coordinates).translate([c / 2, h / 2]).scale(M), at = (e) => {
80
- if (!_.current || !Q.current) return;
81
- oe(_.current).call(Q.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
74
+ h.call(k), tt.current = k;
75
+ }, [f, u, N]);
76
+ const B = je(q), g = Me(q), at = B[2] - B[0], Ct = B[3] - B[1], Nt = u * 190 / 960 * 360 / at, St = f * 190 / 678 * 180 / Ct, O = p * Math.min(Nt, St), W = V === "mercator" ? ke().rotate([0, 0]).center(_ || g.geometry.coordinates).translate([u / 2, f / 2]).scale(O) : V === "equalEarth" ? Ce().rotate([0, 0]).center(_ || g.geometry.coordinates).translate([u / 2, f / 2]).scale(O) : V === "naturalEarth" ? Ne().rotate([0, 0]).center(_ || g.geometry.coordinates).translate([u / 2, f / 2]).scale(O) : V === "orthographic" ? Se().rotate([0, 0]).center(_ || g.geometry.coordinates).translate([u / 2, f / 2]).scale(O) : Oe().rotate([0, 0]).center(_ || g.geometry.coordinates).translate([u / 2, f / 2]).scale(O), it = (e) => {
77
+ if (!I.current || !tt.current) return;
78
+ le(I.current).call(tt.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
82
79
  };
83
80
  return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
84
81
  /* @__PURE__ */ o.jsxs("div", { className: "relative", children: [
85
- /* @__PURE__ */ o.jsx(Rt.svg, { width: `${c}px`, height: `${h}px`, viewBox: `0 0 ${c} ${h}`, ref: _, direction: "ltr", children: /* @__PURE__ */ o.jsxs("g", { ref: F, children: [
86
- V.filter((e) => e.position === "before").map((e) => e.layer),
82
+ /* @__PURE__ */ o.jsx(Yt.svg, { width: `${u}px`, height: `${f}px`, viewBox: `0 0 ${u} ${f}`, ref: I, direction: "ltr", children: /* @__PURE__ */ o.jsxs("g", { ref: H, children: [
83
+ T.filter((e) => e.position === "before").map((e) => e.layer),
87
84
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
- q.features.map((e, g) => /* @__PURE__ */ o.jsx("g", { children: e.geometry.type === "MultiPolygon" ? (
85
+ q.features.map((e, h) => /* @__PURE__ */ o.jsx("g", { children: e.geometry.type === "MultiPolygon" ? (
89
86
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
87
  e.geometry.coordinates.map((i, k) => {
91
- let n = "";
92
- return i.forEach((j) => {
93
- let x = " M";
94
- j.forEach((v, it) => {
95
- const W = B([v[0], v[1]]);
96
- it !== j.length - 1 ? x = `${x}${W[0]} ${W[1]}L` : x = `${x}${W[0]} ${W[1]}`;
97
- }), n += x;
98
- }), /* @__PURE__ */ o.jsx("path", { d: n, style: {
99
- stroke: ft,
100
- strokeWidth: pt,
88
+ let l = "";
89
+ return i.forEach((D) => {
90
+ let v = " M";
91
+ D.forEach((y, nt) => {
92
+ const F = W([y[0], y[1]]);
93
+ nt !== D.length - 1 ? v = `${v}${F[0]} ${F[1]}L` : v = `${v}${F[0]} ${F[1]}`;
94
+ }), l += v;
95
+ }), /* @__PURE__ */ o.jsx("path", { d: l, style: {
96
+ stroke: ht,
97
+ strokeWidth: ft,
101
98
  fill: Y
102
99
  } }, k);
103
100
  })
104
101
  ) : (
105
102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
106
103
  e.geometry.coordinates.map((i, k) => {
107
- let n = "M";
108
- return i.forEach((j, x) => {
109
- const v = B([j[0], j[1]]);
110
- x !== i.length - 1 ? n = `${n}${v[0]} ${v[1]}L` : n = `${n}${v[0]} ${v[1]}`;
111
- }), /* @__PURE__ */ o.jsx("path", { d: n, style: {
112
- stroke: ft,
113
- strokeWidth: pt,
104
+ let l = "M";
105
+ return i.forEach((D, v) => {
106
+ const y = W([D[0], D[1]]);
107
+ v !== i.length - 1 ? l = `${l}${y[0]} ${y[1]}L` : l = `${l}${y[0]} ${y[1]}`;
108
+ }), /* @__PURE__ */ o.jsx("path", { d: l, style: {
109
+ stroke: ht,
110
+ strokeWidth: ft,
114
111
  fill: Y
115
112
  } }, k);
116
113
  })
117
- ) }, g)),
118
- /* @__PURE__ */ o.jsx(_e, { children: t.map((e) => {
119
- const g = t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : E.gray;
120
- return /* @__PURE__ */ o.jsxs(Rt.g, { variants: {
114
+ ) }, h)),
115
+ /* @__PURE__ */ o.jsx(Be, { children: t.map((e) => {
116
+ const h = t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : z.gray;
117
+ return /* @__PURE__ */ o.jsxs(Yt.g, { variants: {
121
118
  initial: {
122
119
  opacity: 0
123
120
  },
124
121
  whileInView: {
125
- opacity: wt ? wt === g ? 1 : J : ht.length !== 0 ? ht.indexOf(e.label || "") !== -1 ? 1 : J : 1,
122
+ opacity: wt ? wt === h ? 1 : Q : gt.length !== 0 ? gt.indexOf(e.label || "") !== -1 ? 1 : Q : 1,
126
123
  transition: {
127
124
  duration: w.duration
128
125
  }
129
126
  }
130
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
127
+ }, initial: "initial", animate: A ? "whileInView" : "initial", exit: {
131
128
  opacity: 0,
132
129
  transition: {
133
130
  duration: w.duration
134
131
  }
135
132
  }, onMouseEnter: (i) => {
136
- l(e), ot(i.clientY), A(i.clientX), K?.(e);
133
+ c(e), rt(i.clientY), R(i.clientX), K?.(e);
137
134
  }, onMouseMove: (i) => {
138
- l(e), ot(i.clientY), A(i.clientX);
135
+ c(e), rt(i.clientY), R(i.clientX);
139
136
  }, onMouseLeave: () => {
140
- l(void 0), A(void 0), ot(void 0), K?.(void 0);
137
+ c(void 0), R(void 0), rt(void 0), K?.(void 0);
141
138
  }, onClick: () => {
142
- (Z || p) && (ge(S, e) && gt ? (tt(void 0), Z?.(void 0)) : (tt(e), Z?.(e)));
143
- }, transform: `translate(${B([e.long, e.lat])[0]},${B([e.long, e.lat])[1]})`, children: [
144
- /* @__PURE__ */ o.jsx(Rt.circle, { cx: 0, cy: 0, variants: {
139
+ (Z || x) && (we(G, e) && yt ? (et(void 0), Z?.(void 0)) : (et(e), Z?.(e)));
140
+ }, transform: `translate(${W([e.long, e.lat])[0]},${W([e.long, e.lat])[1]})`, children: [
141
+ /* @__PURE__ */ o.jsx(Yt.circle, { cx: 0, cy: 0, variants: {
145
142
  initial: {
146
143
  r: 0,
147
- fill: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : E.gray,
148
- stroke: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : E.gray
144
+ fill: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : z.gray,
145
+ stroke: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : z.gray
149
146
  },
150
147
  whileInView: {
151
- r: O ? O(e.radius || 0) : N,
152
- fill: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : E.gray,
153
- stroke: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : E.gray,
148
+ r: j ? j(e.radius || 0) : S,
149
+ fill: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : z.gray,
150
+ stroke: t.filter((i) => i.color).length === 0 ? r[0] : e.color ? r[b.indexOf(`${e.color}`)] : z.gray,
154
151
  transition: {
155
152
  duration: w.duration
156
153
  }
157
154
  }
158
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
155
+ }, initial: "initial", animate: A ? "whileInView" : "initial", exit: {
159
156
  r: 0,
160
157
  transition: {
161
158
  duration: w.duration
@@ -163,19 +160,19 @@ function He(a) {
163
160
  }, style: {
164
161
  fillOpacity: 0.8
165
162
  } }),
166
- ut && e.label ? /* @__PURE__ */ o.jsx(Rt.text, { variants: {
163
+ pt && e.label ? /* @__PURE__ */ o.jsx(Yt.text, { variants: {
167
164
  initial: {
168
165
  opacity: 0,
169
- x: O ? O(e.radius || 0) : N
166
+ x: j ? j(e.radius || 0) : S
170
167
  },
171
168
  whileInView: {
172
169
  opacity: 1,
173
- x: O ? O(e.radius || 0) : N,
170
+ x: j ? j(e.radius || 0) : S,
174
171
  transition: {
175
172
  duration: w.duration
176
173
  }
177
174
  }
178
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
175
+ }, initial: "initial", animate: A ? "whileInView" : "initial", exit: {
179
176
  opacity: 0,
180
177
  transition: {
181
178
  duration: w.duration
@@ -185,12 +182,12 @@ function He(a) {
185
182
  }, dx: 4, dy: 5, children: e.label }) : null
186
183
  ] }, e.label || `${e.lat}-${e.long}`);
187
184
  }) }),
188
- V.filter((e) => e.position === "after").map((e) => e.layer)
185
+ T.filter((e) => e.position === "after").map((e) => e.layer)
189
186
  ] }) }),
190
- t.filter((e) => e.color).length === 0 || Et === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: se("absolute left-4 bottom-4 map-color-legend", vt?.colorLegend), children: _t ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
187
+ t.filter((e) => e.color).length === 0 || Et === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: pe("absolute left-4 bottom-4 map-color-legend", J?.colorLegend), children: Lt ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
191
188
  /* @__PURE__ */ o.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: () => {
192
- kt(!1);
193
- }, children: /* @__PURE__ */ o.jsx(Me, {}) }),
189
+ jt(!1);
190
+ }, children: /* @__PURE__ */ o.jsx(Pe, {}) }),
194
191
  /* @__PURE__ */ o.jsxs("div", { className: "p-2", style: {
195
192
  backgroundColor: "rgba(240,240,240, 0.7)"
196
193
  }, children: [
@@ -199,208 +196,219 @@ function He(a) {
199
196
  WebkitLineClamp: "1",
200
197
  WebkitBoxOrient: "vertical"
201
198
  }, children: L }) : null,
202
- /* @__PURE__ */ o.jsx("div", { className: "flex flex-col gap-3", children: b.map((e, g) => /* @__PURE__ */ o.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
203
- jt(r[g % r.length]);
199
+ /* @__PURE__ */ o.jsx("div", { className: "flex flex-col gap-3", children: b.map((e, h) => /* @__PURE__ */ o.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
200
+ Dt(r[h % r.length]);
204
201
  }, onMouseLeave: () => {
205
- jt(void 0);
202
+ Dt(void 0);
206
203
  }, children: [
207
204
  /* @__PURE__ */ o.jsx("div", { className: "w-2 h-2 rounded-full", style: {
208
- backgroundColor: r[g % r.length]
205
+ backgroundColor: r[h % r.length]
209
206
  } }),
210
- /* @__PURE__ */ o.jsx(Ce, { size: "sm", marginBottom: "none", leading: "none", children: e })
211
- ] }, g)) })
207
+ /* @__PURE__ */ o.jsx($e, { size: "sm", marginBottom: "none", leading: "none", children: e })
208
+ ] }, h)) })
212
209
  ] })
213
210
  ] }) : /* @__PURE__ */ o.jsx("button", { type: "button", className: "mb-0 border-0 bg-transparent p-0 self-start", onClick: () => {
214
- kt(!0);
211
+ jt(!0);
215
212
  }, children: /* @__PURE__ */ o.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" }) }) }),
216
- C === "button" && /* @__PURE__ */ o.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
217
- /* @__PURE__ */ o.jsx("button", { onClick: () => at("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: "+" }),
218
- /* @__PURE__ */ o.jsx("button", { onClick: () => at("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: "–" })
213
+ N === "button" && /* @__PURE__ */ o.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
214
+ /* @__PURE__ */ o.jsx("button", { onClick: () => it("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: "+" }),
215
+ /* @__PURE__ */ o.jsx("button", { onClick: () => it("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: "–" })
219
216
  ] })
220
217
  ] }),
221
- p && S !== void 0 ? /* @__PURE__ */ o.jsx(De, { open: S !== void 0, onClose: () => {
222
- tt(void 0);
223
- }, children: /* @__PURE__ */ o.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof p == "string" ? {
224
- __html: Oe(p, S)
225
- } : void 0, children: typeof p == "function" ? p(S) : null }) }) : null,
226
- et && X && s && Dt ? /* @__PURE__ */ o.jsx(Se, { data: et, body: X, xPos: s, yPos: Dt, backgroundStyle: yt?.tooltip, className: vt?.tooltip }) : null
218
+ x && G !== void 0 ? /* @__PURE__ */ o.jsx(_e, { body: x, data: G, setData: et, className: J?.modal }) : null,
219
+ ot && X && m && kt ? /* @__PURE__ */ o.jsx(Ee, { data: ot, body: X, xPos: m, yPos: kt, backgroundStyle: xt?.tooltip, className: J?.tooltip }) : null
227
220
  ] });
228
221
  }
229
- function Mo(a) {
230
- const t = ce.c(102), {
222
+ function $o(a) {
223
+ const t = fe.c(117), {
231
224
  data: r,
232
225
  mapData: q,
233
226
  graphTitle: L,
234
227
  colors: b,
235
- sources: N,
236
- graphDescription: h,
237
- height: c,
238
- width: u,
239
- footNote: P,
228
+ sources: S,
229
+ graphDescription: f,
230
+ height: u,
231
+ width: p,
232
+ footNote: _,
240
233
  colorLegendTitle: X,
241
- colorDomain: ut,
242
- radius: pt,
243
- scale: ft,
234
+ colorDomain: pt,
235
+ radius: ft,
236
+ scale: ht,
244
237
  centerPoint: Y,
245
238
  padding: K,
246
239
  mapBorderWidth: Et,
247
- mapNoDataColor: Lt,
248
- backgroundColor: Pt,
249
- showLabels: ht,
240
+ mapNoDataColor: Pt,
241
+ backgroundColor: zt,
242
+ showLabels: gt,
250
243
  mapBorderColor: Z,
251
- tooltip: gt,
252
- relativeHeight: p,
253
- onSeriesMouseOver: yt,
254
- isWorldMap: vt,
255
- showColorScale: T,
256
- zoomScaleExtend: C,
244
+ tooltip: yt,
245
+ relativeHeight: x,
246
+ onSeriesMouseOver: xt,
247
+ isWorldMap: J,
248
+ showColorScale: V,
249
+ zoomScaleExtend: N,
257
250
  zoomTranslateExtend: w,
258
- graphID: J,
259
- highlightedDataPoints: V,
260
- onSeriesMouseClick: xt,
251
+ graphID: Q,
252
+ highlightedDataPoints: T,
253
+ onSeriesMouseClick: vt,
261
254
  graphDownload: bt,
262
255
  dataDownload: wt,
263
- showAntarctica: jt,
264
- language: _t,
265
- minHeight: kt,
266
- theme: Q,
267
- ariaLabel: S,
268
- resetSelectionOnDoubleClick: tt,
269
- detailsOnClick: et,
270
- styles: l,
271
- classNames: s,
272
- mapProjection: A,
273
- zoomInteraction: Dt,
274
- animate: ot,
275
- dimmedOpacity: _,
276
- customLayers: z,
277
- maxRadiusValue: F,
278
- timeline: O,
279
- collapseColorScaleByDefault: I
280
- } = a, y = q === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : q, rt = P === 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." : P, Ct = pt === void 0 ? 5 : pt, Nt = ft === void 0 ? 0.95 : ft, St = Et === void 0 ? 0.5 : Et, M = Lt === void 0 ? E.light.graphNoData : Lt, B = Pt === void 0 ? !1 : Pt, at = ht === void 0 ? !1 : ht, e = Z === void 0 ? E.light.grays["gray-500"] : Z, g = vt === void 0 ? !0 : vt, i = T === void 0 ? !0 : T;
256
+ showAntarctica: Dt,
257
+ language: Lt,
258
+ minHeight: jt,
259
+ theme: tt,
260
+ ariaLabel: G,
261
+ resetSelectionOnDoubleClick: et,
262
+ detailsOnClick: ot,
263
+ styles: c,
264
+ classNames: m,
265
+ mapProjection: R,
266
+ zoomInteraction: kt,
267
+ animate: rt,
268
+ dimmedOpacity: I,
269
+ customLayers: A,
270
+ maxRadiusValue: H,
271
+ timeline: j,
272
+ collapseColorScaleByDefault: B
273
+ } = a, g = q === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : q, at = _ === 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." : _, Ct = ft === void 0 ? 5 : ft, Nt = ht === void 0 ? 0.95 : ht, St = Et === void 0 ? 0.5 : Et, O = Pt === void 0 ? z.light.graphNoData : Pt, W = zt === void 0 ? !1 : zt, it = gt === void 0 ? !1 : gt, e = Z === void 0 ? z.light.grays["gray-500"] : Z, h = J === void 0 ? !0 : J, i = V === void 0 ? !0 : V;
281
274
  let k;
282
- t[0] !== C ? (k = C === void 0 ? [0.8, 6] : C, t[0] = C, t[1] = k) : k = t[1];
283
- const n = k;
284
- let j;
285
- t[2] !== V ? (j = V === void 0 ? [] : V, t[2] = V, t[3] = j) : j = t[3];
286
- const x = j, v = bt === void 0 ? !1 : bt, it = wt === void 0 ? !1 : wt, W = jt === void 0 ? !1 : jt, qt = _t === void 0 ? "en" : _t, $ = kt === void 0 ? 0 : kt, nt = Q === void 0 ? "light" : Q, Xt = tt === void 0 ? !0 : tt, Yt = Dt === void 0 ? "button" : Dt, zt = ot === void 0 ? !1 : ot, Kt = _ === void 0 ? 0.3 : _;
275
+ t[0] !== N ? (k = N === void 0 ? [0.8, 6] : N, t[0] = N, t[1] = k) : k = t[1];
276
+ const l = k;
277
+ let D;
278
+ t[2] !== T ? (D = T === void 0 ? [] : T, t[2] = T, t[3] = D) : D = t[3];
279
+ const v = D, y = bt === void 0 ? !1 : bt, nt = wt === void 0 ? !1 : wt, F = Dt === void 0 ? !1 : Dt, Zt = Lt === void 0 ? "en" : Lt, $ = jt === void 0 ? 0 : jt, lt = tt === void 0 ? "light" : tt, Jt = et === void 0 ? !0 : et, Qt = kt === void 0 ? "button" : kt, _t = rt === void 0 ? !1 : rt, te = I === void 0 ? 0.3 : I;
287
280
  let It;
288
- t[4] !== z ? (It = z === void 0 ? [] : z, t[4] = z, t[5] = It) : It = t[5];
289
- const Zt = It, f = O === void 0 ? {
281
+ t[4] !== A ? (It = A === void 0 ? [] : A, t[4] = A, t[5] = It) : It = t[5];
282
+ const ee = It;
283
+ let At;
284
+ t[6] !== j ? (At = j === void 0 ? {
290
285
  enabled: !1,
291
286
  autoplay: !1,
292
287
  showOnlyActiveDate: !0
293
- } : O, [H, ie] = D(0), [Ot, ne] = D(0), [G, Jt] = D(f.autoplay), m = Ae(ae(r, "date", !0).map((d) => de(`${d}`, f.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), to), [R, Mt] = D(f.autoplay ? 0 : m.length - 1), [lt, le] = D(void 0), Qt = $t(null), re = $t(null);
288
+ } : j, t[6] = j, t[7] = At) : At = t[7];
289
+ const n = At, [U, ce] = C(0), [Ot, de] = C(0), [M, me] = C(n.autoplay);
290
+ let $t;
291
+ if (t[8] !== r || t[9] !== n.dateFormat) {
292
+ let d;
293
+ t[11] !== n.dateFormat ? (d = (P) => ye(`${P}`, n.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[11] = n.dateFormat, t[12] = d) : d = t[12], $t = [...new Set(r.map(d))], $t.sort(ro), t[8] = r, t[9] = n.dateFormat, t[10] = $t;
294
+ } else
295
+ $t = t[10];
296
+ const s = $t, [E, oe] = C(n.autoplay ? 0 : s.length - 1), [st, ue] = C(void 0), re = Mt(null), se = Mt(null);
294
297
  let Bt, Wt;
295
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (Bt = () => {
296
- const d = new ResizeObserver((U) => {
297
- ie(U[0].target.clientWidth || 620), ne(U[0].target.clientHeight || 480);
298
+ t[13] === Symbol.for("react.memo_cache_sentinel") ? (Bt = () => {
299
+ const d = new ResizeObserver((P) => {
300
+ ce(P[0].target.clientWidth || 620), de(P[0].target.clientHeight || 480);
298
301
  });
299
- return Qt.current && d.observe(Qt.current), () => d.disconnect();
300
- }, Wt = [], t[6] = Bt, t[7] = Wt) : (Bt = t[6], Wt = t[7]), Ut(Bt, Wt);
301
- let Tt;
302
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (Tt = (d) => {
303
- le(d);
304
- }, t[8] = Tt) : Tt = t[8];
305
- const Vt = me(Tt);
306
- let At;
307
- t[9] !== y || t[10] !== Vt ? (At = () => {
308
- typeof y == "string" ? Be(y).then((U) => {
309
- Vt(U);
310
- }) : Vt(y);
311
- }, t[9] = y, t[10] = Vt, t[11] = At) : At = t[11];
302
+ return re.current && d.observe(re.current), () => d.disconnect();
303
+ }, Wt = [], t[13] = Bt, t[14] = Wt) : (Bt = t[13], Wt = t[14]), Kt(Bt, Wt);
312
304
  let Ft;
313
- t[12] !== y ? (Ft = [y], t[12] = y, t[13] = Ft) : Ft = t[13], Ut(At, Ft), Ut(() => {
305
+ t[15] === Symbol.for("react.memo_cache_sentinel") ? (Ft = (d) => {
306
+ ue(d);
307
+ }, t[15] = Ft) : Ft = t[15];
308
+ const Vt = he(Ft);
309
+ let Tt;
310
+ t[16] !== g || t[17] !== Vt ? (Tt = () => {
311
+ typeof g == "string" ? Ve(g).then((P) => {
312
+ Vt(P);
313
+ }) : Vt(g);
314
+ }, t[16] = g, t[17] = Vt, t[18] = Tt) : Tt = t[18];
315
+ let Gt;
316
+ t[19] !== g ? (Gt = [g], t[19] = g, t[20] = Gt) : Gt = t[20], Kt(Tt, Gt);
317
+ let Rt, Ht;
318
+ t[21] !== M || t[22] !== n.speed || t[23] !== s ? (Rt = () => {
314
319
  const d = setInterval(() => {
315
- Mt((U) => U < m.length - 1 ? U + 1 : 0);
316
- }, (f.speed || 2) * 1e3);
317
- return G || clearInterval(d), () => clearInterval(d);
318
- }, [m, G, f.speed]);
319
- const Ht = pe(m, R, f.showOnlyActiveDate, f.dateFormat || "yyyy"), te = s?.graphContainer, ee = l?.graphContainer;
320
- let st;
321
- t[14] !== s?.description || t[15] !== s?.title || t[16] !== r || t[17] !== it || t[18] !== h || t[19] !== v || t[20] !== L || t[21] !== l?.description || t[22] !== l?.title || t[23] !== u ? (st = L || h || v || it ? /* @__PURE__ */ o.jsx(Ie, { styles: {
322
- title: l?.title,
323
- description: l?.description
324
- }, classNames: {
325
- title: s?.title,
326
- description: s?.description
327
- }, graphTitle: L, graphDescription: h, width: u, graphDownload: v ? re : void 0, dataDownload: it ? r.map(Qe).filter(Je).length > 0 ? r.map(Ze).filter(Ke) : r.filter(Ye) : null }) : null, t[14] = s?.description, t[15] = s?.title, t[16] = r, t[17] = it, t[18] = h, t[19] = v, t[20] = L, t[21] = l?.description, t[22] = l?.title, t[23] = u, t[24] = st) : st = t[24];
320
+ oe((P) => P < s.length - 1 ? P + 1 : 0);
321
+ }, (n.speed || 2) * 1e3);
322
+ return M || clearInterval(d), () => clearInterval(d);
323
+ }, Ht = [s, M, n.speed], t[21] = M, t[22] = n.speed, t[23] = s, t[24] = Rt, t[25] = Ht) : (Rt = t[24], Ht = t[25]), Kt(Rt, Ht);
324
+ const ae = n.dateFormat || "yyyy";
325
+ let Ut;
326
+ t[26] !== E || t[27] !== ae || t[28] !== n.showOnlyActiveDate || t[29] !== s ? (Ut = xe(s, E, n.showOnlyActiveDate, ae), t[26] = E, t[27] = ae, t[28] = n.showOnlyActiveDate, t[29] = s, t[30] = Ut) : Ut = t[30];
327
+ const qt = Ut, ie = m?.graphContainer, ne = c?.graphContainer;
328
328
  let ct;
329
- t[25] !== R || t[26] !== Ht || t[27] !== G || t[28] !== Mt || t[29] !== Jt || t[30] !== f.enabled || t[31] !== m ? (ct = f.enabled && m.length > 0 && Ht ? /* @__PURE__ */ o.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
329
+ t[31] !== m?.description || t[32] !== m?.title || t[33] !== r || t[34] !== nt || t[35] !== f || t[36] !== y || t[37] !== L || t[38] !== c?.description || t[39] !== c?.title || t[40] !== p ? (ct = L || f || y || nt ? /* @__PURE__ */ o.jsx(Fe, { styles: {
330
+ title: c?.title,
331
+ description: c?.description
332
+ }, classNames: {
333
+ title: m?.title,
334
+ description: m?.description
335
+ }, graphTitle: L, graphDescription: f, width: p, graphDownload: y ? se : void 0, dataDownload: nt ? r.map(oo).filter(eo).length > 0 ? r.map(to).filter(Qe) : r.filter(Je) : null }) : null, t[31] = m?.description, t[32] = m?.title, t[33] = r, t[34] = nt, t[35] = f, t[36] = y, t[37] = L, t[38] = c?.description, t[39] = c?.title, t[40] = p, t[41] = ct) : ct = t[41];
336
+ let dt;
337
+ t[42] !== E || t[43] !== qt || t[44] !== M || t[45] !== n.enabled || t[46] !== s ? (dt = n.enabled && s.length > 0 && qt ? /* @__PURE__ */ o.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
330
338
  /* @__PURE__ */ o.jsx("button", { type: "button", onClick: () => {
331
- Jt(!G);
332
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": G ? "Click to pause animation" : "Click to play animation", children: G ? /* @__PURE__ */ o.jsx($e, {}) : /* @__PURE__ */ o.jsx(Ee, {}) }),
333
- /* @__PURE__ */ o.jsx(fe, { min: m[0], max: m[m.length - 1], marks: Ht, step: null, defaultValue: m[m.length - 1], value: m[R], onChangeComplete: (d) => {
334
- Mt(m.indexOf(d));
339
+ me(!M);
340
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": M ? "Click to pause animation" : "Click to play animation", children: M ? /* @__PURE__ */ o.jsx(ze, {}) : /* @__PURE__ */ o.jsx(Le, {}) }),
341
+ /* @__PURE__ */ o.jsx(ve, { min: s[0], max: s[s.length - 1], marks: qt, step: null, defaultValue: s[s.length - 1], value: s[E], onChangeComplete: (d) => {
342
+ oe(s.indexOf(d));
335
343
  }, onChange: (d) => {
336
- Mt(m.indexOf(d));
344
+ oe(s.indexOf(d));
337
345
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
338
- ] }) : null, t[25] = R, t[26] = Ht, t[27] = G, t[28] = Mt, t[29] = Jt, t[30] = f.enabled, t[31] = m, t[32] = ct) : ct = t[32];
346
+ ] }) : null, t[42] = E, t[43] = qt, t[44] = M, t[45] = n.enabled, t[46] = s, t[47] = dt) : dt = t[47];
339
347
  let mt;
340
- t[33] !== zt || t[34] !== Y || t[35] !== s || t[36] !== I || t[37] !== ut || t[38] !== X || t[39] !== b || t[40] !== Zt || t[41] !== r || t[42] !== et || t[43] !== Kt || t[44] !== c || t[45] !== x || t[46] !== R || t[47] !== g || t[48] !== e || t[49] !== St || t[50] !== M || t[51] !== A || t[52] !== lt || t[53] !== F || t[54] !== $ || t[55] !== xt || t[56] !== yt || t[57] !== Ct || t[58] !== p || t[59] !== Xt || t[60] !== Nt || t[61] !== W || t[62] !== i || t[63] !== at || t[64] !== l || t[65] !== Ot || t[66] !== H || t[67] !== nt || t[68] !== f.dateFormat || t[69] !== f.enabled || t[70] !== gt || t[71] !== m || t[72] !== u || t[73] !== Yt || t[74] !== n || t[75] !== w ? (mt = /* @__PURE__ */ o.jsx(Te, { ref: Qt, children: H && Ot && lt ? /* @__PURE__ */ o.jsx(He, { data: r.filter((d) => f.enabled ? d.date === ue(new Date(m[R]), f.dateFormat || "yyyy") : d), mapData: W ? lt : {
341
- ...lt,
342
- features: lt.features.filter(Xe)
343
- }, colorDomain: r.filter(qe).length === 0 ? [] : ut || ae(r, "color", !0), width: H, height: Ot, scale: Nt, centerPoint: Y, colors: r.filter(Ue).length === 0 ? b ? [b] : [E.primaryColors["blue-600"]] : b || E[nt].categoricalColors.colors, colorLegendTitle: X, radius: Ct, mapBorderWidth: St, mapNoDataColor: M, mapBorderColor: e, tooltip: gt, onSeriesMouseOver: yt, showLabels: at, isWorldMap: g, showColorScale: i, zoomScaleExtend: n, zoomTranslateExtend: w, onSeriesMouseClick: xt, highlightedDataPoints: x, resetSelectionOnDoubleClick: Xt, styles: l, classNames: s, zoomInteraction: Yt, detailsOnClick: et, mapProjection: A || (g ? "naturalEarth" : "mercator"), animate: zt === !0 ? {
348
+ t[48] !== _t || t[49] !== Y || t[50] !== m || t[51] !== B || t[52] !== pt || t[53] !== X || t[54] !== b || t[55] !== ee || t[56] !== r || t[57] !== ot || t[58] !== te || t[59] !== u || t[60] !== v || t[61] !== E || t[62] !== h || t[63] !== e || t[64] !== St || t[65] !== O || t[66] !== R || t[67] !== st || t[68] !== H || t[69] !== $ || t[70] !== vt || t[71] !== xt || t[72] !== Ct || t[73] !== x || t[74] !== Jt || t[75] !== Nt || t[76] !== F || t[77] !== i || t[78] !== it || t[79] !== c || t[80] !== Ot || t[81] !== U || t[82] !== lt || t[83] !== n.dateFormat || t[84] !== n.enabled || t[85] !== yt || t[86] !== s || t[87] !== p || t[88] !== Qt || t[89] !== l || t[90] !== w ? (mt = /* @__PURE__ */ o.jsx(Re, { ref: re, children: U && Ot && st ? /* @__PURE__ */ o.jsx(Ue, { data: r.filter((d) => n.enabled ? d.date === ge(new Date(s[E]), n.dateFormat || "yyyy") : d), mapData: F ? st : {
349
+ ...st,
350
+ features: st.features.filter(Ze)
351
+ }, colorDomain: r.filter(Ke).length === 0 ? [] : pt || Ge(r, "color", !0), width: U, height: Ot, scale: Nt, centerPoint: Y, colors: r.filter(Ye).length === 0 ? b ? [b] : [z.primaryColors["blue-600"]] : b || z[lt].categoricalColors.colors, colorLegendTitle: X, radius: Ct, mapBorderWidth: St, mapNoDataColor: O, mapBorderColor: e, tooltip: yt, onSeriesMouseOver: xt, showLabels: it, isWorldMap: h, showColorScale: i, zoomScaleExtend: l, zoomTranslateExtend: w, onSeriesMouseClick: vt, highlightedDataPoints: v, resetSelectionOnDoubleClick: Jt, styles: c, classNames: m, zoomInteraction: Qt, detailsOnClick: ot, mapProjection: R || (h ? "naturalEarth" : "mercator"), animate: _t === !0 ? {
344
352
  duration: 0.5,
345
353
  once: !0,
346
354
  amount: 0.5
347
- } : zt || {
355
+ } : _t || {
348
356
  duration: 0,
349
357
  once: !0,
350
358
  amount: 0
351
- }, dimmedOpacity: Kt, customLayers: Zt, maxRadiusValue: We(F) ? Math.max(...r.map(Re).filter(Ge)) : F, collapseColorScaleByDefault: I }) : /* @__PURE__ */ o.jsx("div", { style: {
352
- height: `${Math.max($, c || (p ? $ ? (u || H) * p > $ ? (u || H) * p : $ : (u || H) * p : Ot))}px`
353
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(he, { "aria-label": "Loading graph" }) }) }), t[33] = zt, t[34] = Y, t[35] = s, t[36] = I, t[37] = ut, t[38] = X, t[39] = b, t[40] = Zt, t[41] = r, t[42] = et, t[43] = Kt, t[44] = c, t[45] = x, t[46] = R, t[47] = g, t[48] = e, t[49] = St, t[50] = M, t[51] = A, t[52] = lt, t[53] = F, t[54] = $, t[55] = xt, t[56] = yt, t[57] = Ct, t[58] = p, t[59] = Xt, t[60] = Nt, t[61] = W, t[62] = i, t[63] = at, t[64] = l, t[65] = Ot, t[66] = H, t[67] = nt, t[68] = f.dateFormat, t[69] = f.enabled, t[70] = gt, t[71] = m, t[72] = u, t[73] = Yt, t[74] = n, t[75] = w, t[76] = mt) : mt = t[76];
354
- let dt;
355
- t[77] !== s?.footnote || t[78] !== s?.source || t[79] !== rt || t[80] !== N || t[81] !== l?.footnote || t[82] !== l?.source || t[83] !== u ? (dt = N || rt ? /* @__PURE__ */ o.jsx(ze, { styles: {
356
- footnote: l?.footnote,
357
- source: l?.source
359
+ }, dimmedOpacity: te, customLayers: ee, maxRadiusValue: Te(H) ? Math.max(...r.map(Xe).filter(qe)) : H, collapseColorScaleByDefault: B }) : /* @__PURE__ */ o.jsx("div", { style: {
360
+ height: `${Math.max($, u || (x ? $ ? (p || U) * x > $ ? (p || U) * x : $ : (p || U) * x : Ot))}px`
361
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(be, { "aria-label": "Loading graph" }) }) }), t[48] = _t, t[49] = Y, t[50] = m, t[51] = B, t[52] = pt, t[53] = X, t[54] = b, t[55] = ee, t[56] = r, t[57] = ot, t[58] = te, t[59] = u, t[60] = v, t[61] = E, t[62] = h, t[63] = e, t[64] = St, t[65] = O, t[66] = R, t[67] = st, t[68] = H, t[69] = $, t[70] = vt, t[71] = xt, t[72] = Ct, t[73] = x, t[74] = Jt, t[75] = Nt, t[76] = F, t[77] = i, t[78] = it, t[79] = c, t[80] = Ot, t[81] = U, t[82] = lt, t[83] = n.dateFormat, t[84] = n.enabled, t[85] = yt, t[86] = s, t[87] = p, t[88] = Qt, t[89] = l, t[90] = w, t[91] = mt) : mt = t[91];
362
+ let ut;
363
+ t[92] !== m?.footnote || t[93] !== m?.source || t[94] !== at || t[95] !== S || t[96] !== c?.footnote || t[97] !== c?.source || t[98] !== p ? (ut = S || at ? /* @__PURE__ */ o.jsx(We, { styles: {
364
+ footnote: c?.footnote,
365
+ source: c?.source
358
366
  }, classNames: {
359
- footnote: s?.footnote,
360
- source: s?.source
361
- }, sources: N, footNote: rt, width: u }) : null, t[77] = s?.footnote, t[78] = s?.source, t[79] = rt, t[80] = N, t[81] = l?.footnote, t[82] = l?.source, t[83] = u, t[84] = dt) : dt = t[84];
362
- let Gt;
363
- return t[85] !== S || t[86] !== B || t[87] !== J || t[88] !== c || t[89] !== qt || t[90] !== $ || t[91] !== K || t[92] !== p || t[93] !== te || t[94] !== ee || t[95] !== st || t[96] !== ct || t[97] !== mt || t[98] !== dt || t[99] !== nt || t[100] !== u ? (Gt = /* @__PURE__ */ o.jsxs(Ve, { className: te, style: ee, id: J, ref: re, "aria-label": S, backgroundColor: B, theme: nt, language: qt, minHeight: $, width: u, height: c, relativeHeight: p, padding: K, children: [
364
- st,
367
+ footnote: m?.footnote,
368
+ source: m?.source
369
+ }, sources: S, footNote: at, width: p }) : null, t[92] = m?.footnote, t[93] = m?.source, t[94] = at, t[95] = S, t[96] = c?.footnote, t[97] = c?.source, t[98] = p, t[99] = ut) : ut = t[99];
370
+ let Xt;
371
+ return t[100] !== G || t[101] !== W || t[102] !== Q || t[103] !== u || t[104] !== Zt || t[105] !== $ || t[106] !== K || t[107] !== x || t[108] !== ie || t[109] !== ne || t[110] !== ct || t[111] !== dt || t[112] !== mt || t[113] !== ut || t[114] !== lt || t[115] !== p ? (Xt = /* @__PURE__ */ o.jsxs(He, { className: ie, style: ne, id: Q, ref: se, "aria-label": G, backgroundColor: W, theme: lt, language: Zt, minHeight: $, width: p, height: u, relativeHeight: x, padding: K, children: [
365
372
  ct,
373
+ dt,
366
374
  mt,
367
- dt
368
- ] }), t[85] = S, t[86] = B, t[87] = J, t[88] = c, t[89] = qt, t[90] = $, t[91] = K, t[92] = p, t[93] = te, t[94] = ee, t[95] = st, t[96] = ct, t[97] = mt, t[98] = dt, t[99] = nt, t[100] = u, t[101] = Gt) : Gt = t[101], Gt;
375
+ ut
376
+ ] }), t[100] = G, t[101] = W, t[102] = Q, t[103] = u, t[104] = Zt, t[105] = $, t[106] = K, t[107] = x, t[108] = ie, t[109] = ne, t[110] = ct, t[111] = dt, t[112] = mt, t[113] = ut, t[114] = lt, t[115] = p, t[116] = Xt) : Xt = t[116], Xt;
369
377
  }
370
- function Ge(a) {
378
+ function qe(a) {
371
379
  return a != null;
372
380
  }
373
- function Re(a) {
381
+ function Xe(a) {
374
382
  return a.radius;
375
383
  }
376
- function Ue(a) {
384
+ function Ye(a) {
377
385
  return a.color;
378
386
  }
379
- function qe(a) {
387
+ function Ke(a) {
380
388
  return a.color;
381
389
  }
382
- function Xe(a) {
390
+ function Ze(a) {
383
391
  return a.properties.NAME !== "Antarctica";
384
392
  }
385
- function Ye(a) {
393
+ function Je(a) {
386
394
  return a !== void 0;
387
395
  }
388
- function Ke(a) {
396
+ function Qe(a) {
389
397
  return a !== void 0;
390
398
  }
391
- function Ze(a) {
399
+ function to(a) {
392
400
  return a.data;
393
401
  }
394
- function Je(a) {
402
+ function eo(a) {
395
403
  return a !== void 0;
396
404
  }
397
- function Qe(a) {
405
+ function oo(a) {
398
406
  return a.data;
399
407
  }
400
- function to(a, t) {
401
- return Fe(a, t);
408
+ function ro(a, t) {
409
+ return a - t;
402
410
  }
403
411
  export {
404
- Mo as DotDensityMap
412
+ $o as DotDensityMap
405
413
  };
406
414
  //# sourceMappingURL=DotDensityMap.js.map