@undp/data-viz 2.5.3 → 2.6.0

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 (444) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +17 -16
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/Axis-DY7jsk1Y.cjs +2 -0
  6. package/dist/{Axis-BTaS9oPQ.cjs.map → Axis-DY7jsk1Y.cjs.map} +1 -1
  7. package/dist/{Axis-CNZYWzH0.js → Axis-RRx-0Rlw.js} +9 -8
  8. package/dist/{Axis-CNZYWzH0.js.map → Axis-RRx-0Rlw.js.map} +1 -1
  9. package/dist/AxisTitle-B9F80_Z0.js +30 -0
  10. package/dist/AxisTitle-B9F80_Z0.js.map +1 -0
  11. package/dist/AxisTitle-CyFFbdNU.cjs +2 -0
  12. package/dist/{AxisTitle-DP_evhbe.cjs.map → AxisTitle-CyFFbdNU.cjs.map} +1 -1
  13. package/dist/BarGraph.cjs +1 -1
  14. package/dist/BarGraph.cjs.map +1 -1
  15. package/dist/BarGraph.js +203 -201
  16. package/dist/BarGraph.js.map +1 -1
  17. package/dist/BasicStatCard.cjs +1 -1
  18. package/dist/BasicStatCard.cjs.map +1 -1
  19. package/dist/BasicStatCard.js +15 -14
  20. package/dist/BasicStatCard.js.map +1 -1
  21. package/dist/BeeSwarmChart.cjs +1 -1
  22. package/dist/BeeSwarmChart.cjs.map +1 -1
  23. package/dist/BeeSwarmChart.js +60 -59
  24. package/dist/BeeSwarmChart.js.map +1 -1
  25. package/dist/BiVariateChoroplethMap.cjs +1 -1
  26. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  27. package/dist/BiVariateChoroplethMap.js +88 -86
  28. package/dist/BiVariateChoroplethMap.js.map +1 -1
  29. package/dist/BulletChart.cjs +1 -1
  30. package/dist/BulletChart.cjs.map +1 -1
  31. package/dist/BulletChart.js +88 -86
  32. package/dist/BulletChart.js.map +1 -1
  33. package/dist/ButterflyChart.cjs +1 -1
  34. package/dist/ButterflyChart.cjs.map +1 -1
  35. package/dist/ButterflyChart.js +100 -98
  36. package/dist/ButterflyChart.js.map +1 -1
  37. package/dist/ChoroplethMap.cjs +1 -1
  38. package/dist/ChoroplethMap.cjs.map +1 -1
  39. package/dist/ChoroplethMap.js +266 -243
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.js +4 -4
  43. package/dist/ColorLegend.cjs +1 -1
  44. package/dist/ColorLegend.cjs.map +1 -1
  45. package/dist/ColorLegend.js +17 -16
  46. package/dist/ColorLegend.js.map +1 -1
  47. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  48. package/dist/ColorLegendWithMouseOver.cjs.map +1 -1
  49. package/dist/ColorLegendWithMouseOver.js +13 -12
  50. package/dist/ColorLegendWithMouseOver.js.map +1 -1
  51. package/dist/Colors.cjs +1 -1
  52. package/dist/Colors.cjs.map +1 -1
  53. package/dist/Colors.d.ts +16 -0
  54. package/dist/Colors.js +16 -0
  55. package/dist/Colors.js.map +1 -1
  56. package/dist/CopyTextButton.cjs +1 -1
  57. package/dist/CopyTextButton.cjs.map +1 -1
  58. package/dist/CopyTextButton.js +37 -754
  59. package/dist/CopyTextButton.js.map +1 -1
  60. package/dist/CsvDownloadButton.cjs +4 -4
  61. package/dist/CsvDownloadButton.cjs.map +1 -1
  62. package/dist/CsvDownloadButton.js +47 -45
  63. package/dist/CsvDownloadButton.js.map +1 -1
  64. package/dist/DataCards.cjs +1 -1
  65. package/dist/DataCards.cjs.map +1 -1
  66. package/dist/DataCards.js +213 -467
  67. package/dist/DataCards.js.map +1 -1
  68. package/dist/DataTable.cjs +1 -1
  69. package/dist/DataTable.cjs.map +1 -1
  70. package/dist/DataTable.js +19 -19
  71. package/dist/DetailsModal-BmjtLqrZ.cjs +2 -0
  72. package/dist/{DetailsModal-Du8Fr1QD.cjs.map → DetailsModal-BmjtLqrZ.cjs.map} +1 -1
  73. package/dist/{DetailsModal-GqEbGHY2.js → DetailsModal-k-Me_U_T.js} +3 -3
  74. package/dist/{DetailsModal-GqEbGHY2.js.map → DetailsModal-k-Me_U_T.js.map} +1 -1
  75. package/dist/DifferenceLineChart.cjs +1 -1
  76. package/dist/DifferenceLineChart.cjs.map +1 -1
  77. package/dist/DifferenceLineChart.js +61 -60
  78. package/dist/DifferenceLineChart.js.map +1 -1
  79. package/dist/DonutChart.cjs +1 -1
  80. package/dist/DonutChart.cjs.map +1 -1
  81. package/dist/DonutChart.js +47 -46
  82. package/dist/DonutChart.js.map +1 -1
  83. package/dist/DotDensityMap.cjs +1 -1
  84. package/dist/DotDensityMap.cjs.map +1 -1
  85. package/dist/DotDensityMap.js +112 -110
  86. package/dist/DotDensityMap.js.map +1 -1
  87. package/dist/DualAxisLineChart.cjs +1 -1
  88. package/dist/DualAxisLineChart.cjs.map +1 -1
  89. package/dist/DualAxisLineChart.js +13 -12
  90. package/dist/DualAxisLineChart.js.map +1 -1
  91. package/dist/DumbbellChart.cjs +1 -1
  92. package/dist/DumbbellChart.cjs.map +1 -1
  93. package/dist/DumbbellChart.js +104 -102
  94. package/dist/DumbbellChart.js.map +1 -1
  95. package/dist/EmptyState-BoaUUuo6.cjs +2 -0
  96. package/dist/{EmptyState-CFmiFPHz.cjs.map → EmptyState-BoaUUuo6.cjs.map} +1 -1
  97. package/dist/{EmptyState-CaxXCkiN.js → EmptyState-prZ8OnEs.js} +4 -4
  98. package/dist/{EmptyState-CaxXCkiN.js.map → EmptyState-prZ8OnEs.js.map} +1 -1
  99. package/dist/ExcelDownloadButton.cjs +1 -1
  100. package/dist/ExcelDownloadButton.cjs.map +1 -1
  101. package/dist/ExcelDownloadButton.js +15 -13
  102. package/dist/ExcelDownloadButton.js.map +1 -1
  103. package/dist/FootNote.cjs +1 -1
  104. package/dist/FootNote.cjs.map +1 -1
  105. package/dist/FootNote.js +10 -9
  106. package/dist/FootNote.js.map +1 -1
  107. package/dist/GeoHubCompareMaps.cjs +1 -1
  108. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  109. package/dist/GeoHubCompareMaps.js +14 -14
  110. package/dist/GeoHubMap.cjs +1 -1
  111. package/dist/GeoHubMap.cjs.map +1 -1
  112. package/dist/GeoHubMap.js +59 -59
  113. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  114. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  115. package/dist/GeoHubMapWithLayerSelection.js +50 -50
  116. package/dist/{GraphContainer-B8ZqOzKI.js → GraphContainer-DcOM2CI6.js} +28 -27
  117. package/dist/GraphContainer-DcOM2CI6.js.map +1 -0
  118. package/dist/GraphContainer-gaG9TSy4.cjs +2 -0
  119. package/dist/{GraphContainer-Cul9b74X.cjs.map → GraphContainer-gaG9TSy4.cjs.map} +1 -1
  120. package/dist/GraphDescription.cjs +1 -1
  121. package/dist/GraphDescription.cjs.map +1 -1
  122. package/dist/GraphDescription.js +14 -13
  123. package/dist/GraphDescription.js.map +1 -1
  124. package/dist/{GraphEl-Ch0uAeZw.js → GraphEl-C7KBBHvB.js} +9 -9
  125. package/dist/{GraphEl-Ch0uAeZw.js.map → GraphEl-C7KBBHvB.js.map} +1 -1
  126. package/dist/GraphEl-CGALp07K.cjs +2 -0
  127. package/dist/{GraphEl-BgkDbq50.cjs.map → GraphEl-CGALp07K.cjs.map} +1 -1
  128. package/dist/GraphFooter.cjs +1 -1
  129. package/dist/GraphFooter.cjs.map +1 -1
  130. package/dist/GraphFooter.js +2 -2
  131. package/dist/GraphHeader.cjs +1 -1
  132. package/dist/GraphHeader.cjs.map +1 -1
  133. package/dist/GraphHeader.js +1 -1
  134. package/dist/GraphTitle.cjs +1 -1
  135. package/dist/GraphTitle.cjs.map +1 -1
  136. package/dist/GraphTitle.js +14 -13
  137. package/dist/GraphTitle.js.map +1 -1
  138. package/dist/GriddedGraphs.cjs +1 -1
  139. package/dist/GriddedGraphs.cjs.map +1 -1
  140. package/dist/GriddedGraphs.js +58 -55
  141. package/dist/GriddedGraphs.js.map +1 -1
  142. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  143. package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
  144. package/dist/GriddedGraphsFromConfig.js +15 -15
  145. package/dist/HeatMap.cjs +1 -1
  146. package/dist/HeatMap.cjs.map +1 -1
  147. package/dist/HeatMap.js +17 -16
  148. package/dist/HeatMap.js.map +1 -1
  149. package/dist/Histogram.cjs +1 -1
  150. package/dist/Histogram.cjs.map +1 -1
  151. package/dist/Histogram.js +3 -3
  152. package/dist/HybridMap.cjs +1 -1
  153. package/dist/HybridMap.cjs.map +1 -1
  154. package/dist/HybridMap.js +409 -420
  155. package/dist/HybridMap.js.map +1 -1
  156. package/dist/ImageDownloadButton.cjs +1 -1
  157. package/dist/ImageDownloadButton.cjs.map +1 -1
  158. package/dist/ImageDownloadButton.js +16 -14
  159. package/dist/ImageDownloadButton.js.map +1 -1
  160. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  161. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  162. package/dist/LineChartWithConfidenceInterval.js +16 -15
  163. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  164. package/dist/LinearColorLegend.cjs +1 -1
  165. package/dist/LinearColorLegend.cjs.map +1 -1
  166. package/dist/LinearColorLegend.js +5 -4
  167. package/dist/LinearColorLegend.js.map +1 -1
  168. package/dist/MultiGraphDashboard.cjs +1 -1
  169. package/dist/MultiGraphDashboard.cjs.map +1 -1
  170. package/dist/MultiGraphDashboard.js +62 -60
  171. package/dist/MultiGraphDashboard.js.map +1 -1
  172. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  173. package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
  174. package/dist/MultiGraphDashboardFromConfig.js +7 -7
  175. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  176. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
  177. package/dist/MultiGraphDashboardWideToLongFormat.js +21 -21
  178. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
  179. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  180. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
  181. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +3 -3
  182. package/dist/MultiLineAltChart.cjs +1 -1
  183. package/dist/MultiLineAltChart.cjs.map +1 -1
  184. package/dist/MultiLineAltChart.js +16 -15
  185. package/dist/MultiLineAltChart.js.map +1 -1
  186. package/dist/MultiLineChart.cjs +1 -1
  187. package/dist/MultiLineChart.cjs.map +1 -1
  188. package/dist/MultiLineChart.js +16 -15
  189. package/dist/MultiLineChart.js.map +1 -1
  190. package/dist/ParetoChart.cjs +1 -1
  191. package/dist/ParetoChart.cjs.map +1 -1
  192. package/dist/ParetoChart.js +14 -13
  193. package/dist/ParetoChart.js.map +1 -1
  194. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  195. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  196. package/dist/PerformanceIntensiveMultiGraphDashboard.js +67 -65
  197. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  198. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  199. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
  200. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +8 -8
  201. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  202. package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
  203. package/dist/PerformanceIntensiveScrollStory.js +3 -3
  204. package/dist/RadarChart.cjs +1 -1
  205. package/dist/RadarChart.cjs.map +1 -1
  206. package/dist/RadarChart.js +11 -10
  207. package/dist/RadarChart.js.map +1 -1
  208. package/dist/ReferenceLine-CxITVT1K.cjs +2 -0
  209. package/dist/{ReferenceLine-CpU4G01Y.cjs.map → ReferenceLine-CxITVT1K.cjs.map} +1 -1
  210. package/dist/{ReferenceLine-D41VuUhE.js → ReferenceLine-NF4g3Reh.js} +26 -25
  211. package/dist/ReferenceLine-NF4g3Reh.js.map +1 -0
  212. package/dist/RegressionLine-BQ6h-NZP.js +88 -0
  213. package/dist/RegressionLine-BQ6h-NZP.js.map +1 -0
  214. package/dist/RegressionLine-BpcVBjL0.cjs +2 -0
  215. package/dist/{RegressionLine-BFoBiVJk.cjs.map → RegressionLine-BpcVBjL0.cjs.map} +1 -1
  216. package/dist/SVGDownloadButton.cjs +1 -1
  217. package/dist/SVGDownloadButton.cjs.map +1 -1
  218. package/dist/SVGDownloadButton.js +11 -9
  219. package/dist/SVGDownloadButton.js.map +1 -1
  220. package/dist/SankeyChart.cjs +1 -1
  221. package/dist/SankeyChart.cjs.map +1 -1
  222. package/dist/SankeyChart.js +63 -62
  223. package/dist/SankeyChart.js.map +1 -1
  224. package/dist/ScatterPlot.cjs +1 -1
  225. package/dist/ScatterPlot.cjs.map +1 -1
  226. package/dist/ScatterPlot.js +109 -107
  227. package/dist/ScatterPlot.js.map +1 -1
  228. package/dist/ScrollStory.cjs +1 -1
  229. package/dist/ScrollStory.cjs.map +1 -1
  230. package/dist/ScrollStory.js +3 -3
  231. package/dist/SimpleLineChart.cjs +1 -1
  232. package/dist/SimpleLineChart.cjs.map +1 -1
  233. package/dist/SimpleLineChart.js +17 -16
  234. package/dist/SimpleLineChart.js.map +1 -1
  235. package/dist/SingleGraphDashboard.cjs +1 -1
  236. package/dist/SingleGraphDashboard.cjs.map +1 -1
  237. package/dist/SingleGraphDashboard.js +59 -56
  238. package/dist/SingleGraphDashboard.js.map +1 -1
  239. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  240. package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
  241. package/dist/SingleGraphDashboardFromConfig.js +6 -6
  242. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  243. package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
  244. package/dist/SingleGraphDashboardGeoHubMaps.js +12 -12
  245. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  246. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
  247. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +8 -8
  248. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  249. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  250. package/dist/SingleGraphDashboardThreeDGraphs.js +59 -56
  251. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  252. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  253. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
  254. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +7 -7
  255. package/dist/SlopeChart.cjs +1 -1
  256. package/dist/SlopeChart.cjs.map +1 -1
  257. package/dist/SlopeChart.js +60 -59
  258. package/dist/SlopeChart.js.map +1 -1
  259. package/dist/Source.cjs +1 -1
  260. package/dist/Source.cjs.map +1 -1
  261. package/dist/Source.js +38 -4
  262. package/dist/Source.js.map +1 -1
  263. package/dist/SparkLine.cjs +1 -1
  264. package/dist/SparkLine.cjs.map +1 -1
  265. package/dist/SparkLine.js +11 -10
  266. package/dist/SparkLine.js.map +1 -1
  267. package/dist/StatCardFromData.cjs +1 -1
  268. package/dist/StatCardFromData.cjs.map +1 -1
  269. package/dist/StatCardFromData.js +15 -14
  270. package/dist/StatCardFromData.js.map +1 -1
  271. package/dist/StripChart.cjs +1 -1
  272. package/dist/StripChart.cjs.map +1 -1
  273. package/dist/StripChart.js +11 -10
  274. package/dist/StripChart.js.map +1 -1
  275. package/dist/ThreeDGlobe.cjs +1 -1
  276. package/dist/ThreeDGlobe.cjs.map +1 -1
  277. package/dist/ThreeDGlobe.js +52 -51
  278. package/dist/ThreeDGlobe.js.map +1 -1
  279. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  280. package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
  281. package/dist/ThresholdColorLegendWithMouseOver.js +17 -16
  282. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
  283. package/dist/{Tooltip-3EYDVa3w.js → Tooltip-DO56mY4b.js} +11 -10
  284. package/dist/{Tooltip-3EYDVa3w.js.map → Tooltip-DO56mY4b.js.map} +1 -1
  285. package/dist/Tooltip-DwUFLDrj.cjs +2 -0
  286. package/dist/{Tooltip-C9F3uYG0.cjs.map → Tooltip-DwUFLDrj.cjs.map} +1 -1
  287. package/dist/TreeMapGraph.cjs +1 -1
  288. package/dist/TreeMapGraph.cjs.map +1 -1
  289. package/dist/TreeMapGraph.js +34 -33
  290. package/dist/TreeMapGraph.js.map +1 -1
  291. package/dist/UnitChart.cjs +1 -1
  292. package/dist/UnitChart.cjs.map +1 -1
  293. package/dist/UnitChart.js +27 -27
  294. package/dist/WaterfallChart.cjs +1 -1
  295. package/dist/WaterfallChart.cjs.map +1 -1
  296. package/dist/WaterfallChart.js +21 -20
  297. package/dist/WaterfallChart.js.map +1 -1
  298. package/dist/XAxesLabels-0ROJnigy.cjs +2 -0
  299. package/dist/{XAxesLabels-C03jHniq.cjs.map → XAxesLabels-0ROJnigy.cjs.map} +1 -1
  300. package/dist/{XAxesLabels-B9gkjUiC.js → XAxesLabels-CPZX3OJN.js} +12 -11
  301. package/dist/XAxesLabels-CPZX3OJN.js.map +1 -0
  302. package/dist/XTicksAndGridLines-BO6KJc8d.cjs +2 -0
  303. package/dist/{XTicksAndGridLines-B4UhDVyU.cjs.map → XTicksAndGridLines-BO6KJc8d.cjs.map} +1 -1
  304. package/dist/{XTicksAndGridLines-CkYwVshF.js → XTicksAndGridLines-obTK2e7G.js} +10 -9
  305. package/dist/{XTicksAndGridLines-CkYwVshF.js.map → XTicksAndGridLines-obTK2e7G.js.map} +1 -1
  306. package/dist/{YAxesLabels-hWEUCTvs.js → YAxesLabels-CwVnFG2a.js} +13 -12
  307. package/dist/YAxesLabels-CwVnFG2a.js.map +1 -0
  308. package/dist/YAxesLabels-DIa2cEXL.cjs +2 -0
  309. package/dist/{YAxesLabels-DeENFC2M.cjs.map → YAxesLabels-DIa2cEXL.cjs.map} +1 -1
  310. package/dist/YTicksAndGridLines-C7glLI5b.cjs +2 -0
  311. package/dist/{YTicksAndGridLines-sT3zdCs6.cjs.map → YTicksAndGridLines-C7glLI5b.cjs.map} +1 -1
  312. package/dist/{YTicksAndGridLines-BbujwxOB.js → YTicksAndGridLines-wtuAKNeT.js} +10 -9
  313. package/dist/{YTicksAndGridLines-BbujwxOB.js.map → YTicksAndGridLines-wtuAKNeT.js.map} +1 -1
  314. package/dist/checkIfMultiple-BIEQDuA3.cjs +2 -0
  315. package/dist/checkIfMultiple-BIEQDuA3.cjs.map +1 -0
  316. package/dist/checkIfMultiple-D2tgEnYM.js +11 -0
  317. package/dist/checkIfMultiple-D2tgEnYM.js.map +1 -0
  318. package/dist/compiler-runtime-oPPev21o.cjs +11 -0
  319. package/dist/compiler-runtime-oPPev21o.cjs.map +1 -0
  320. package/dist/compiler-runtime-qHgugrLy.js +297 -0
  321. package/dist/compiler-runtime-qHgugrLy.js.map +1 -0
  322. package/dist/customArea-BCGIYDQa.cjs +2 -0
  323. package/dist/{customArea-BAcQ3pBM.cjs.map → customArea-BCGIYDQa.cjs.map} +1 -1
  324. package/dist/{customArea-D89lETG0.js → customArea-Dixg0NtQ.js} +10 -9
  325. package/dist/{customArea-D89lETG0.js.map → customArea-Dixg0NtQ.js.map} +1 -1
  326. package/dist/{fetchAndParseData-BAXhgTDM.js → fetchAndParseData-CDjQZ1fL.js} +5 -5
  327. package/dist/{fetchAndParseData-BAXhgTDM.js.map → fetchAndParseData-CDjQZ1fL.js.map} +1 -1
  328. package/dist/fetchAndParseData.js +1 -1
  329. package/dist/getSliderMarks-Bj_JJTtX.cjs +2 -0
  330. package/dist/getSliderMarks-Bj_JJTtX.cjs.map +1 -0
  331. package/dist/getSliderMarks-DSxFGb1f.js +21 -0
  332. package/dist/getSliderMarks-DSxFGb1f.js.map +1 -0
  333. package/dist/index-5BQWR1Z8.cjs +10 -0
  334. package/dist/{index-FXfr51ZM.cjs.map → index-5BQWR1Z8.cjs.map} +1 -1
  335. package/dist/index-BaXzoD4r.cjs +2 -0
  336. package/dist/{index-BuhBhuCq.cjs.map → index-BaXzoD4r.cjs.map} +1 -1
  337. package/dist/{index-Cv_5q6Rb.js → index-CNUlPiEL.js} +3 -3
  338. package/dist/{index-Cv_5q6Rb.js.map → index-CNUlPiEL.js.map} +1 -1
  339. package/dist/{index-DHVGV8Df.js → index-CmkqqFRG.js} +3 -3
  340. package/dist/{index-DHVGV8Df.js.map → index-CmkqqFRG.js.map} +1 -1
  341. package/dist/index-D_ls5oK8.js +142 -0
  342. package/dist/index-D_ls5oK8.js.map +1 -0
  343. package/dist/index-DbSnila_.cjs +2 -0
  344. package/dist/index-DbSnila_.cjs.map +1 -0
  345. package/dist/{index-BPyj_6hG.js → index-_w-CQAbR.js} +113 -112
  346. package/dist/{index-BPyj_6hG.js.map → index-_w-CQAbR.js.map} +1 -1
  347. package/dist/index-dN3wiQgD.cjs +2 -0
  348. package/dist/{index-DuLvdHo2.cjs.map → index-dN3wiQgD.cjs.map} +1 -1
  349. package/dist/index.cjs +1 -1
  350. package/dist/index.d.ts +16 -0
  351. package/dist/index.js +181 -180
  352. package/dist/index.js.map +1 -1
  353. package/dist/{proxy-BsxtcZKa.js → proxy-D31SA_aE.js} +2 -2
  354. package/dist/{proxy-BsxtcZKa.js.map → proxy-D31SA_aE.js.map} +1 -1
  355. package/dist/proxy-QMeVVqam.cjs +2 -0
  356. package/dist/{proxy-CqH8m8IQ.cjs.map → proxy-QMeVVqam.cjs.map} +1 -1
  357. package/dist/style.css +1 -1
  358. package/dist/transformData.js +2 -2
  359. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js → transformDataForGraphFromFile-COZC6A0_.js} +4 -4
  360. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js.map → transformDataForGraphFromFile-COZC6A0_.js.map} +1 -1
  361. package/dist/{use-in-view-KOXq5Kmc.js → use-in-view-Co5SmzfT.js} +2 -2
  362. package/dist/{use-in-view-KOXq5Kmc.js.map → use-in-view-Co5SmzfT.js.map} +1 -1
  363. package/dist/use-in-view-DjR_gqJP.cjs +2 -0
  364. package/dist/{use-in-view-dnRv_qqF.cjs.map → use-in-view-DjR_gqJP.cjs.map} +1 -1
  365. package/package.json +1 -1
  366. package/dist/Axis-BTaS9oPQ.cjs +0 -2
  367. package/dist/AxisTitle-CyLCqpW6.js +0 -29
  368. package/dist/AxisTitle-CyLCqpW6.js.map +0 -1
  369. package/dist/AxisTitle-DP_evhbe.cjs +0 -2
  370. package/dist/DetailsModal-Du8Fr1QD.cjs +0 -2
  371. package/dist/DropdownSelect-CX1yMemd.cjs +0 -5
  372. package/dist/DropdownSelect-CX1yMemd.cjs.map +0 -1
  373. package/dist/DropdownSelect-Dz7imdTB.js +0 -4191
  374. package/dist/DropdownSelect-Dz7imdTB.js.map +0 -1
  375. package/dist/EmptyState-CFmiFPHz.cjs +0 -2
  376. package/dist/GraphContainer-B8ZqOzKI.js.map +0 -1
  377. package/dist/GraphContainer-Cul9b74X.cjs +0 -2
  378. package/dist/GraphEl-BgkDbq50.cjs +0 -2
  379. package/dist/Modal-BIErPPKT.cjs +0 -46
  380. package/dist/Modal-BIErPPKT.cjs.map +0 -1
  381. package/dist/Modal-CrUYln5V.js +0 -1047
  382. package/dist/Modal-CrUYln5V.js.map +0 -1
  383. package/dist/ReferenceLine-CpU4G01Y.cjs +0 -2
  384. package/dist/ReferenceLine-D41VuUhE.js.map +0 -1
  385. package/dist/RegressionLine-BFoBiVJk.cjs +0 -2
  386. package/dist/RegressionLine-CuwB42I6.js +0 -87
  387. package/dist/RegressionLine-CuwB42I6.js.map +0 -1
  388. package/dist/Source-PKuwZOn3.cjs +0 -2
  389. package/dist/Source-PKuwZOn3.cjs.map +0 -1
  390. package/dist/Source-QGk8vhkS.js +0 -78
  391. package/dist/Source-QGk8vhkS.js.map +0 -1
  392. package/dist/Spinner-B2IIKg9r.js +0 -47
  393. package/dist/Spinner-B2IIKg9r.js.map +0 -1
  394. package/dist/Spinner-WHzzloYQ.cjs +0 -2
  395. package/dist/Spinner-WHzzloYQ.cjs.map +0 -1
  396. package/dist/Tooltip-C9F3uYG0.cjs +0 -2
  397. package/dist/Typography-BO0gQDIT.js +0 -270
  398. package/dist/Typography-BO0gQDIT.js.map +0 -1
  399. package/dist/Typography-BqmyF1gP.cjs +0 -2
  400. package/dist/Typography-BqmyF1gP.cjs.map +0 -1
  401. package/dist/XAxesLabels-B9gkjUiC.js.map +0 -1
  402. package/dist/XAxesLabels-C03jHniq.cjs +0 -2
  403. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +0 -2
  404. package/dist/YAxesLabels-DeENFC2M.cjs +0 -2
  405. package/dist/YAxesLabels-hWEUCTvs.js.map +0 -1
  406. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +0 -2
  407. package/dist/checkIfMultiple-CH5tqj4q.cjs +0 -2
  408. package/dist/checkIfMultiple-CH5tqj4q.cjs.map +0 -1
  409. package/dist/checkIfMultiple-Dpyy6BUP.js +0 -938
  410. package/dist/checkIfMultiple-Dpyy6BUP.js.map +0 -1
  411. package/dist/customArea-BAcQ3pBM.cjs +0 -2
  412. package/dist/getSliderMarks-BzrpHrHS.cjs +0 -2
  413. package/dist/getSliderMarks-BzrpHrHS.cjs.map +0 -1
  414. package/dist/getSliderMarks-X-_goqH9.js +0 -1027
  415. package/dist/getSliderMarks-X-_goqH9.js.map +0 -1
  416. package/dist/index-ApTBN0kp.js +0 -196
  417. package/dist/index-ApTBN0kp.js.map +0 -1
  418. package/dist/index-BhI7mBJx.cjs +0 -2
  419. package/dist/index-BhI7mBJx.cjs.map +0 -1
  420. package/dist/index-BuhBhuCq.cjs +0 -2
  421. package/dist/index-CHPV5EwG-BzibaIRc.js +0 -3360
  422. package/dist/index-CHPV5EwG-BzibaIRc.js.map +0 -1
  423. package/dist/index-CHPV5EwG-D4pAp7u0.cjs +0 -20
  424. package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +0 -1
  425. package/dist/index-DuLvdHo2.cjs +0 -2
  426. package/dist/index-FXfr51ZM.cjs +0 -10
  427. package/dist/index-Scxs_wcm-BAjU0Cob.js +0 -49
  428. package/dist/index-Scxs_wcm-BAjU0Cob.js.map +0 -1
  429. package/dist/index-Scxs_wcm-DUDU-Gll.cjs +0 -2
  430. package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +0 -1
  431. package/dist/index-w64Zl8io-DrMm5QSb.cjs +0 -2
  432. package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +0 -1
  433. package/dist/index-w64Zl8io-ihagHOdP.js +0 -459
  434. package/dist/index-w64Zl8io-ihagHOdP.js.map +0 -1
  435. package/dist/proxy-CqH8m8IQ.cjs +0 -2
  436. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +0 -4
  437. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +0 -1
  438. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +0 -145
  439. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +0 -1
  440. package/dist/use-in-view-dnRv_qqF.cjs +0 -2
  441. package/dist/x-BXShoIAM-BC2sxios.cjs +0 -2
  442. package/dist/x-BXShoIAM-BC2sxios.cjs.map +0 -1
  443. package/dist/x-BXShoIAM-D6VWO6z5.js +0 -74
  444. package/dist/x-BXShoIAM-D6VWO6z5.js.map +0 -1
@@ -1,2 +1,2 @@
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"),L=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("./CsvDownloadButton.cjs"),ao=require("./pow-BnyPO-NX.cjs"),no=require("./ordinal-CrsysVE-.cjs"),io=require("./threshold-DNsSUf8Q.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),le=require("./proxy-CqH8m8IQ.cjs"),ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),so=require("./numberFormattingFunction-u2iNHL_c.cjs"),lo=require("./use-in-view-dnRv_qqF.cjs"),co=require("./index-FXfr51ZM.cjs"),uo=require("./GraphFooter.cjs"),po=require("./GraphHeader.cjs"),Se=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),$t=require("./GraphContainer-Cul9b74X.cjs"),mo=require("./getUniqValue-NX8DgwND.cjs"),xo=require("./getJenks-BzJvhy_H.cjs");function ho(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const g=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,g.get?g:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const go=ho(i);var fo="Separator",Ft="horizontal",yo=["horizontal","vertical"],Tt=go.forwardRef((a,e)=>{const{decorative:t,orientation:g=Ft,...y}=a,s=vo(g)?g:Ft,v=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return r.ae.jsx(Qt.w.div,{"data-orientation":s,...v,...y,ref:e})});Tt.displayName=fo;function vo(a){return yo.includes(a)}var At=Tt;const Ut=i.forwardRef((a,e)=>{const t=r._.c(14);let g,y,s,v;t[0]!==a?({className:g,variant:s,orientation:v,...y}=a,t[0]=a,t[1]=g,t[2]=y,t[3]=s,t[4]=v):(g=t[1],y=t[2],s=t[3],v=t[4]);const j=s===void 0?"dark":s,c=v===void 0?"horizontal":v,h=c==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",C=j==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let D;t[5]!==g||t[6]!==h||t[7]!==C?(D=r.mo(h,C,g),t[5]=g,t[6]=h,t[7]=C,t[8]=D):D=t[8];let q;return t[9]!==c||t[10]!==y||t[11]!==e||t[12]!==D?(q=r.ae.jsx(At,{...y,ref:e,orientation:c,className:D}),t[9]=c,t[10]=y,t[11]=e,t[12]=D,t[13]=q):q=t[13],q});Ut.displayName=At.displayName;function jo(a){const{data:e,colors:t,mapData:g,mapColorLegendTitle:y,colorDomain:s,radius:v,height:j,width:c,scale:h,centerPoint:C,tooltip:D,showLabels:q,mapBorderWidth:ce,mapBorderColor:de,mapNoDataColor:Ne,onSeriesMouseOver:H,showColorScale:Oe,zoomScaleExtend:Ye,zoomTranslateExtend:Je,highlightedDataPoints:Me,onSeriesMouseClick:$,resetSelectionOnDoubleClick:qe,detailsOnClick:X,styles:S,classNames:Y,mapProjection:ae,zoomInteraction:J,animate:b,dimmedOpacity:I,customLayers:ue,maxRadiusValue:Ie,categorical:ne,dotColor:Z,collapseColorScaleByDefault:Be,highlightedIds:F,mapProperty:pe,dotLegendTitle:me,dotBorderColor:Pe,labelColor:ze,projectionRotate:K,rewindCoordinatesInMapData:Q,overlayMapData:x,overlayMapBorderColor:f,overlayMapBorderWidth:Ze,numberDisplayOptions:xe,graphDownload:he,dataDownload:ee}=a,B=i.useMemo(()=>Q?L.index_default(g,{reverse:!0}):g,[g,Q]),ge=i.useMemo(()=>!Q||!x?x:L.index_default(x,{reverse:!0}),[x,Q]),[N,P]=i.useState(void 0),[Ke,fe]=i.useState(Be===void 0?!(c<680):!Be),ye=i.useRef(null),[te,T]=i.useState(void 0),[_e,O]=i.useState(void 0),[Ve,z]=i.useState(void 0),[E,w]=i.useState(void 0),_=i.useRef(null),R=lo.useInView(_,{once:b.once,amount:b.amount}),ve=i.useRef(null),V=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?ao.sqrt().domain([0,Ie]).range([.25,v]).nice():void 0,We=ne?no.ordinal().domain(s).range(t):io.threshold().domain(s).range(t);i.useEffect(()=>{const o=Bt.select(ve.current),n=Bt.select(_.current),l=p=>{if(J==="noZoom")return!1;if(J==="button")return!p.type.includes("wheel");const Te=p.type==="wheel",Ae=p.type.startsWith("touch"),Ee=p.type==="mousedown"||p.type==="mousemove";return Ae?!0:Te?J==="scroll"?!0:p.ctrlKey:Ee&&!p.button&&!p.ctrlKey},k=L.zoom().scaleExtent(Ye).translateExtent(Je||[[-20,-20],[c+20,j+20]]).filter(l).on("zoom",({transform:p})=>{o.attr("transform",p)});n.call(k),ye.current=k},[j,c,J]);const oe=L.index_default$1(B),A=Kt.index_default(B),Le=(oe[2]-oe[0])*1.15,$e=(oe[3]-oe[1])*1.15,je=c*190/960*360/Le,Fe=j*190/678*180/$e,W=h*Math.min(je,Fe),re=ae==="mercator"?L.geoMercator().rotate(K).center(C||A.geometry.coordinates).translate([c/2,j/2]).scale(W):ae==="equalEarth"?L.geoEqualEarth().rotate(K).center(C||A.geometry.coordinates).translate([c/2,j/2]).scale(W):ae==="naturalEarth"?L.geoNaturalEarth1().rotate(K).center(C||A.geometry.coordinates).translate([c/2,j/2]).scale(W):ae==="orthographic"?L.geoOrthographic().rotate(K).center(C||A.geometry.coordinates).translate([c/2,j/2]).scale(W):L.geoAlbersUsa().rotate(K).center(C||A.geometry.coordinates).translate([c/2,j/2]).scale(W),ie=L.geoPath().projection(re),be=o=>{if(!_.current||!ye.current)return;Bt.select(_.current).call(ye.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:`${j}px`,viewBox:`0 0 ${c} ${j}`,ref:_,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:ve,children:[ue.filter(o=>o.position==="before").map(o=>o.layer),B.features.map((o,n)=>{if(!o.properties?.[pe])return null;const l=ie(o);return l?r.jsxRuntimeExports.jsx(le.motion.g,{opacity:N?I:F?F.indexOf(o.properties[pe])!==-1?1:I:1,children:r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:de,strokeWidth:ce,fill:Ne,vectorEffect:"non-scaling-stroke"}})},n):null}),r.jsxRuntimeExports.jsxs(co.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const n=B.features.findIndex(p=>o.id===p.properties[pe]);if(n===-1)return null;const l=ie(B.features[n]);if(!l)return null;const k=ft.checkIfNullOrUndefined(o.x)?Ne:We(o.x);return r.jsxRuntimeExports.jsx(le.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:N?N===k&&(!F||F.indexOf(o.id)!==-1)?1:I:F?F.indexOf(o.id)!==-1?1:I:1,transition:{duration:b.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:p=>{O(o),w(p.clientY),z(p.clientX),H?.(o)},onMouseMove:p=>{O(o),w(p.clientY),z(p.clientX)},onMouseLeave:()=>{O(void 0),z(void 0),w(void 0),H?.(void 0)},onClick:()=>{($||X)&&(Vt.isEqual(te,o)&&qe?(T(void 0),$?.(void 0)):(T(o),$?.(o)))},children:r.jsxRuntimeExports.jsx(le.motion.path,{d:l,variants:{initial:{fill:k,opacity:0},whileInView:{fill:k,opacity:1,transition:{duration:b.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},style:{stroke:de,strokeWidth:ce,vectorEffect:"non-scaling-stroke"}},`${o.id}`)},o.id)}),ge?.features.map((o,n)=>{const l=ie(o);return l?r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:f||de,strokeWidth:Ze||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=re([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:Me?Me.indexOf(o.label||"")!==-1?1:I:1,transition:{duration:b.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:l=>{O(o),w(l.clientY),z(l.clientX),H?.(o)},onMouseMove:l=>{O(o),w(l.clientY),z(l.clientX)},onMouseLeave:()=>{O(void 0),z(void 0),w(void 0),H?.(void 0)},onClick:()=>{($||X)&&(Vt.isEqual(te,o)&&qe?(T(void 0),$?.(void 0)):(T(o),$?.(o)))},transform:`translate(${re([o.long,o.lat])[0]},${re([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:Z,stroke:Pe||Z},whileInView:{r:V?V(o.radius||0):v,fill:Z,stroke:Pe||Z,transition:{duration:b.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{r:0,transition:{duration:b.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),q&&o.label?r.jsxRuntimeExports.jsx(le.motion.text,{variants:{initial:{opacity:0,x:n*(V?V(o.radius||0):v)},whileInView:{opacity:1,x:n*(V?V(o.radius||0):v),transition:{duration:b.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},y:0,className:r.mo("text-sm",Y?.graphObjectValues),style:{textAnchor:n===-1?"end":"start",fill:ze||"#000",vectorEffect:"non-scaling-stroke",...S?.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)]})}),Oe===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",Y?.colorLegend),children:Ke?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:()=>{fe(!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:ne?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: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:me})]}),r.jsxRuntimeExports.jsx(Wt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Ut,{}),r.jsxRuntimeExports.jsx(Wt.n,{size:"xl"})]}):null,y&&y!==""?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:y}):null,ne?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:()=>{P(t[n%t.length])},onMouseLeave:()=>{P(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:()=>{P(t[n])},onMouseLeave:()=>{P(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:N===t[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[n],...N===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:so.numberFormattingFunction(o,void 0,xe?.precision??2,void 0,void 0,xe?.locale||"en",xe?.padZeros||!1)})]},n)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{P(t[s.length])},onMouseLeave:()=>{P(void 0)},x:s.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${N===t[s.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[s.length],...N===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:()=>{fe(!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:()=>be("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:()=>be("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:"–"})]}),(he||ee)&&r.jsxRuntimeExports.jsxs("div",{className:"absolute right-4 top-4 flex flex-col image-download-button gap-2",children:[he&&r.jsxRuntimeExports.jsx(oo.ImageDownloadButton,{nodeID:he,buttonSmall:!0,className:"p-1"}),ee&&ee.length>0&&r.jsxRuntimeExports.jsx(ro.CsvDownloadButton,{csvData:ee,buttonSmall:!0,headers:Object.keys(ee[0]).map(o=>({label:o,key:o})),className:"p-1"})]})]}),X&&te!==void 0?r.jsxRuntimeExports.jsx(to.DetailsModal,{body:X,data:te,setData:T,className:Y?.modal}):null,_e&&D&&Ve&&E?r.jsxRuntimeExports.jsx(eo.Tooltip,{data:_e,body:D,xPos:Ve,yPos:E,backgroundStyle:S?.tooltip,className:Y?.tooltip}):null]})}function bo(a){const e=r.compilerRuntimeExports.c(140),{data:t,mapData:g,graphTitle:y,colors:s,sources:v,graphDescription:j,height:c,width:h,footNote:C,mapColorLegendTitle:D,colorDomain:q,choroplethScaleType:ce,radius:de,scale:Ne,centerPoint:H,padding:Oe,mapBorderWidth:Ye,mapNoDataColor:Je,backgroundColor:Me,showLabels:$,mapBorderColor:qe,tooltip:X,relativeHeight:S,onSeriesMouseOver:Y,isWorldMap:ae,showColorScale:J,zoomScaleExtend:b,zoomTranslateExtend:I,graphID:ue,highlightedDataPoints:Ie,onSeriesMouseClick:ne,graphDownload:Z,dataDownload:Be,showAntarctica:F,language:pe,minHeight:me,theme:Pe,ariaLabel:ze,resetSelectionOnDoubleClick:K,detailsOnClick:Q,styles:x,classNames:f,mapProjection:Ze,zoomInteraction:xe,animate:he,dimmedOpacity:ee,customLayers:B,maxRadiusValue:ge,timeline:N,collapseColorScaleByDefault:P,dotColor:Ke,highlightedIds:fe,mapProperty:ye,dotLegendTitle:te,dotBorderColor:T,labelColor:_e,projectionRotate:O,rewindCoordinatesInMapData:Ve,numberDisplayOptions:z,mapOverlay:E}=a,w=g===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":g,_=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,R=ce===void 0?"threshold":ce,ve=de===void 0?5:de,V=Ne===void 0?.95:Ne,We=Ye===void 0?.5:Ye,oe=Je===void 0?Se.Colors.light.graphNoData:Je,A=Me===void 0?!1:Me,Le=$===void 0?!1:$,$e=qe===void 0?Se.Colors.light.grays["gray-500"]:qe,je=ae===void 0?!0:ae,Fe=J===void 0?!0:J;let W;e[0]!==b?(W=b===void 0?[.8,6]:b,e[0]=b,e[1]=W):W=e[1];const re=W,ie=Z===void 0?!1:Z,be=Be===void 0?!1:Be,o=F===void 0?!1:F,n=pe===void 0?"en":pe,l=me===void 0?0:me,k=Pe===void 0?"light":Pe,p=K===void 0?!0:K,Te=Ze===void 0?"naturalEarth":Ze,Ae=xe===void 0?"button":xe,Ee=he===void 0?!1:he,vt=ee===void 0?.3:ee;let Qe;e[2]!==B?(Qe=B===void 0?[]:B,e[2]=B,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=Ke===void 0?Se.Colors.primaryColors["blue-600"]:Ke,Et=ye===void 0?"ISO3":ye,wt=_e===void 0?Se.Colors.primaryColors["blue-600"]:_e;let tt;e[6]!==O?(tt=O===void 0?[0,0]:O,e[6]=O,e[7]=tt):tt=e[7];const kt=tt,Dt=Ve===void 0?!0:Ve,[se,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(qo).map(u))],Ge.sort(Mo),e[8]=t,e[9]=d.dateFormat,e[10]=Ge}else Ge=e[10];const m=Ge,[G,Rt]=i.useState(d.autoplay?0:m.length-1),[we,Yt]=i.useState(void 0),[Ct,Jt]=i.useState(void 0),St=i.useRef(null),Pt=i.useRef(null);let ot;e[13]!==R||e[14]!==q||e[15]!==s?.length||e[16]!==t?(ot=q||(R==="categorical"?mo.getUniqValue(t,"x"):xo.getJenks(t.map(Oo),s?.length||4)),e[13]=R,e[14]=q,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]!==w||e[23]!==it?(lt=()=>{typeof w=="string"?Lt.fetchAndParseJSON(w).then(M=>{it(M)}):it(w)},e[22]=w,e[23]=it,e[24]=lt):lt=e[24];let ct;e[25]!==w?(ct=[w],e[25]=w,e[26]=ct):ct=e[26],i.useEffect(lt,ct);let dt;e[27]!==E?.mapData||e[28]!==Xe?(dt=()=>{E?.mapData||Xe(void 0),typeof E?.mapData=="string"?Lt.fetchAndParseJSON(E?.mapData).then(M=>{Xe(M)}):Xe(E?.mapData)},e[27]=E?.mapData,e[28]=Xe,e[29]=dt):dt=e[29];const Nt=E?.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]!==m?(pt=()=>{const u=setInterval(()=>{Rt(M=>M<m.length-1?M+1:0)},(d.speed||2)*1e3);return U||clearInterval(u),()=>clearInterval(u)},mt=[m,U,d.speed],e[32]=U,e[33]=d.speed,e[34]=m,e[35]=pt,e[36]=mt):(pt=e[35],mt=e[36]),i.useEffect(pt,mt);const Ot=d.dateFormat||"yyyy";let xt;e[37]!==G||e[38]!==Ot||e[39]!==d.showOnlyActiveDate||e[40]!==m?(xt=_t.getSliderMarks(m,G,d.showOnlyActiveDate,Ot),e[37]=G,e[38]=Ot,e[39]=d.showOnlyActiveDate,e[40]=m,e[41]=xt):xt=e[41];const ht=xt,Mt=f?.graphContainer,qt=x?.graphContainer;let ke;e[42]!==f?.description||e[43]!==f?.title||e[44]!==j||e[45]!==y||e[46]!==x?.description||e[47]!==x?.title||e[48]!==h?(ke=y||j?r.jsxRuntimeExports.jsx(po.GraphHeader,{styles:{title:x?.title,description:x?.description},classNames:{title:f?.title,description:f?.description},graphTitle:y,graphDescription:j,width:h}):null,e[42]=f?.description,e[43]=f?.title,e[44]=j,e[45]=y,e[46]=x?.description,e[47]=x?.title,e[48]=h,e[49]=ke):ke=e[49];let De;e[50]!==G||e[51]!==ht||e[52]!==U||e[53]!==d.enabled||e[54]!==m?(De=d.enabled&&m.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:m[0],max:m[m.length-1],marks:ht,step:null,defaultValue:m[m.length-1],value:m[G],onChangeComplete:u=>{Rt(m.indexOf(u))},onChange:u=>{Rt(m.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[50]=G,e[51]=ht,e[52]=U,e[53]=d.enabled,e[54]=m,e[55]=De):De=e[55];let Re;e[56]!==Ee||e[57]!==H||e[58]!==R||e[59]!==f||e[60]!==P||e[61]!==s||e[62]!==jt||e[63]!==t||e[64]!==be||e[65]!==Q||e[66]!==vt||e[67]!==He||e[68]!==T||e[69]!==bt||e[70]!==te||e[71]!==ie||e[72]!==c||e[73]!==Ie||e[74]!==fe||e[75]!==G||e[76]!==je||e[77]!==wt||e[78]!==$e||e[79]!==We||e[80]!==D||e[81]!==oe||e[82]!==E?.mapBorderColor||e[83]!==E?.mapBorderWidth||e[84]!==Te||e[85]!==Et||e[86]!==we||e[87]!==ge||e[88]!==l||e[89]!==z||e[90]!==ne||e[91]!==Y||e[92]!==Ct||e[93]!==kt||e[94]!==ve||e[95]!==S||e[96]!==p||e[97]!==Dt||e[98]!==V||e[99]!==o||e[100]!==Fe||e[101]!==Le||e[102]!==x||e[103]!==Ue||e[104]!==se||e[105]!==k||e[106]!==d.dateFormat||e[107]!==d.enabled||e[108]!==X||e[109]!==m||e[110]!==h||e[111]!==Ae||e[112]!==re||e[113]!==I?(Re=r.jsxRuntimeExports.jsx($t.GraphArea,{ref:St,children:se&&Ue&&we?r.jsxRuntimeExports.jsx(jo,{dotColor:bt,data:t.filter(u=>d.enabled?`${u.date}`===zt.format(new Date(m[G]),d.dateFormat||"yyyy"):u),mapData:o?we:{...we,features:we.features.filter(No)},overlayMapData:Ct,overlayMapBorderColor:E?.mapBorderColor,overlayMapBorderWidth:E?.mapBorderWidth,colorDomain:He,width:se,height:Ue,scale:V,centerPoint:H,colors:s||(R==="categorical"?Se.Colors[k].sequentialColors[`neutralColorsx0${He.length}`]:Se.Colors[k].sequentialColors[`neutralColorsx0${He.length+1}`]),mapColorLegendTitle:D,radius:ve,categorical:R==="categorical",mapBorderWidth:We,mapNoDataColor:oe,mapBorderColor:$e,tooltip:X,onSeriesMouseOver:Y,showLabels:Le,isWorldMap:je,showColorScale:Fe,zoomScaleExtend:re,zoomTranslateExtend:I,onSeriesMouseClick:ne,highlightedDataPoints:Ie,resetSelectionOnDoubleClick:p,styles:x,classNames:f,zoomInteraction:Ae,detailsOnClick:Q,mapProjection:Te||(je?"naturalEarth":"mercator"),animate:Ee===!0?{duration:.5,once:!0,amount:.5}:Ee||{duration:0,once:!0,amount:0},dimmedOpacity:vt,customLayers:jt,maxRadiusValue:ft.checkIfNullOrUndefined(ge)?Math.max(...t.map(So).filter(Co)):ge,collapseColorScaleByDefault:P,highlightedIds:fe,mapProperty:Et,dotLegendTitle:te,dotBorderColor:T,labelColor:wt,projectionRotate:kt,rewindCoordinatesInMapData:Dt,numberDisplayOptions:z,graphDownload:ie?Pt:void 0,dataDownload:be?t.map(Ro).filter(Do).length>0?t.map(ko).filter(wo):t.filter(Eo):null}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(l,c||(S?l?(h||se)*S>l?(h||se)*S:l:(h||se)*S:Ue))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Zt.w,{"aria-label":"Loading graph"})})}),e[56]=Ee,e[57]=H,e[58]=R,e[59]=f,e[60]=P,e[61]=s,e[62]=jt,e[63]=t,e[64]=be,e[65]=Q,e[66]=vt,e[67]=He,e[68]=T,e[69]=bt,e[70]=te,e[71]=ie,e[72]=c,e[73]=Ie,e[74]=fe,e[75]=G,e[76]=je,e[77]=wt,e[78]=$e,e[79]=We,e[80]=D,e[81]=oe,e[82]=E?.mapBorderColor,e[83]=E?.mapBorderWidth,e[84]=Te,e[85]=Et,e[86]=we,e[87]=ge,e[88]=l,e[89]=z,e[90]=ne,e[91]=Y,e[92]=Ct,e[93]=kt,e[94]=ve,e[95]=S,e[96]=p,e[97]=Dt,e[98]=V,e[99]=o,e[100]=Fe,e[101]=Le,e[102]=x,e[103]=Ue,e[104]=se,e[105]=k,e[106]=d.dateFormat,e[107]=d.enabled,e[108]=X,e[109]=m,e[110]=h,e[111]=Ae,e[112]=re,e[113]=I,e[114]=Re):Re=e[114];let Ce;e[115]!==f?.footnote||e[116]!==f?.source||e[117]!==_||e[118]!==v||e[119]!==x?.footnote||e[120]!==x?.source||e[121]!==h?(Ce=v||_?r.jsxRuntimeExports.jsx(uo.GraphFooter,{styles:{footnote:x?.footnote,source:x?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:v,footNote:_,width:h}):null,e[115]=f?.footnote,e[116]=f?.source,e[117]=_,e[118]=v,e[119]=x?.footnote,e[120]=x?.source,e[121]=h,e[122]=Ce):Ce=e[122];let gt;return e[123]!==ze||e[124]!==A||e[125]!==ue||e[126]!==c||e[127]!==n||e[128]!==l||e[129]!==Oe||e[130]!==S||e[131]!==Mt||e[132]!==qt||e[133]!==ke||e[134]!==De||e[135]!==Re||e[136]!==Ce||e[137]!==k||e[138]!==h?(gt=r.jsxRuntimeExports.jsxs($t.GraphContainer,{className:Mt,style:qt,id:ue,ref:Pt,"aria-label":ze,backgroundColor:A,theme:k,language:n,minHeight:l,width:h,height:c,relativeHeight:S,padding:Oe,children:[ke,De,Re,Ce]}),e[123]=ze,e[124]=A,e[125]=ue,e[126]=c,e[127]=n,e[128]=l,e[129]=Oe,e[130]=S,e[131]=Mt,e[132]=qt,e[133]=ke,e[134]=De,e[135]=Re,e[136]=Ce,e[137]=k,e[138]=h,e[139]=gt):gt=e[139],gt}function Eo(a){return a!==void 0}function wo(a){return a!==void 0}function ko(a){return a.data}function Do(a){return a!==void 0}function Ro(a){return a.data}function Co(a){return a!=null}function So(a){return a.radius}function No(a){return a.properties?.NAME!=="Antarctica"}function Oo(a){return a.x}function Mo(a,e){return a-e}function qo(a){return a.date}exports.HybridMap=bo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./compiler-runtime-oPPev21o.cjs"),s=require("react"),Lt=require("./parse-xYI9yrvL.cjs"),Xt=require("@undp/design-system-react/SliderUI"),Yt=require("@undp/design-system-react/Spinner"),Ft=require("./index-DQA8q5sC.cjs"),P=require("./index-DLFt97gy.cjs"),Ye=require("@undp/design-system-react/Typography"),Zt=require("./index-C5K--w8d.cjs"),$t=require("@undp/design-system-react/cn"),Vt=require("@undp/design-system-react/Spacer"),Jt=require("@undp/design-system-react/Separator"),Kt=require("./Tooltip-DwUFLDrj.cjs"),vt=require("./index-DbSnila_.cjs"),Qt=require("./DetailsModal-BmjtLqrZ.cjs"),eo=require("./ImageDownloadButton.cjs"),to=require("./CsvDownloadButton.cjs"),oo=require("./pow-BnyPO-NX.cjs"),ro=require("./ordinal-CrsysVE-.cjs"),ao=require("./threshold-DNsSUf8Q.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),ie=require("./proxy-QMeVVqam.cjs"),yt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Pt=require("./numberFormattingFunction-u2iNHL_c.cjs"),no=require("./use-in-view-DjR_gqJP.cjs"),io=require("./index-5BQWR1Z8.cjs"),so=require("./GraphFooter.cjs"),lo=require("./GraphHeader.cjs"),De=require("./Colors.cjs"),Wt=require("./fetchAndParseData-QTF6tjij.cjs"),co=require("./getSliderMarks-Bj_JJTtX.cjs"),_t=require("./GraphContainer-gaG9TSy4.cjs"),uo=require("./getUniqValue-NX8DgwND.cjs"),po=require("./getJenks-BzJvhy_H.cjs");function mo(n){const{data:e,colors:r,mapData:se,mapColorLegendTitle:A,colorDomain:p,radius:z,height:v,width:x,scale:f,centerPoint:T,tooltip:le,showLabels:Se,mapBorderWidth:ce,mapBorderColor:de,mapNoDataColor:Ne,onSeriesMouseOver:U,showColorScale:Me,zoomScaleExtend:Ze,zoomTranslateExtend:Je,highlightedDataPoints:Oe,onSeriesMouseClick:L,resetSelectionOnDoubleClick:qe,detailsOnClick:G,styles:w,classNames:H,mapProjection:re,zoomInteraction:X,animate:g,dimmedOpacity:N,customLayers:ue,maxRadiusValue:Ie,categorical:Y,dotColor:Z,collapseColorScaleByDefault:Be,highlightedIds:F,mapProperty:pe,dotLegendTitle:me,dotBorderColor:Pe,labelColor:ze,projectionRotate:J,rewindCoordinatesInMapData:K,overlayMapData:m,overlayMapBorderColor:h,overlayMapBorderWidth:Ke,numberDisplayOptions:k,graphDownload:xe,dataDownload:Q}=n,M=s.useMemo(()=>K?P.index_default(se,{reverse:!0}):se,[se,K]),he=s.useMemo(()=>!K||!m?m:P.index_default(m,{reverse:!0}),[m,K]),[C,b]=s.useState(void 0),[Qe,ge]=s.useState(Be===void 0?!(x<680):!Be),fe=s.useRef(null),[ee,$]=s.useState(void 0),[Le,D]=s.useState(void 0),[Fe,O]=s.useState(void 0),[y,j]=s.useState(void 0),q=s.useRef(null),R=no.useInView(q,{once:g.once,amount:g.amount}),ye=s.useRef(null),I=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?oo.sqrt().domain([0,Ie]).range([.25,z]).nice():void 0,$e=Y?ro.ordinal().domain(p).range(r):ao.threshold().domain(p).range(r);s.useEffect(()=>{const t=Bt.select(ye.current),a=Bt.select(q.current),i=d=>{if(X==="noZoom")return!1;if(X==="button")return!d.type.includes("wheel");const Ae=d.type==="wheel",Te=d.type.startsWith("touch"),be=d.type==="mousedown"||d.type==="mousemove";return Te?!0:Ae?X==="scroll"?!0:d.ctrlKey:be&&!d.button&&!d.ctrlKey},E=P.zoom().scaleExtent(Ze).translateExtent(Je||[[-20,-20],[x+20,v+20]]).filter(i).on("zoom",({transform:d})=>{t.attr("transform",d)});a.call(E),fe.current=E},[v,x,X]);const te=P.index_default$1(M),V=Zt.index_default(M),Ve=(te[2]-te[0])*1.15,We=(te[3]-te[1])*1.15,ve=x*190/960*360/Ve,_e=v*190/678*180/We,B=f*Math.min(ve,_e),oe=re==="mercator"?P.geoMercator().rotate(J).center(T||V.geometry.coordinates).translate([x/2,v/2]).scale(B):re==="equalEarth"?P.geoEqualEarth().rotate(J).center(T||V.geometry.coordinates).translate([x/2,v/2]).scale(B):re==="naturalEarth"?P.geoNaturalEarth1().rotate(J).center(T||V.geometry.coordinates).translate([x/2,v/2]).scale(B):re==="orthographic"?P.geoOrthographic().rotate(J).center(T||V.geometry.coordinates).translate([x/2,v/2]).scale(B):P.geoAlbersUsa().rotate(J).center(T||V.geometry.coordinates).translate([x/2,v/2]).scale(B),ae=P.geoPath().projection(oe),je=t=>{if(!q.current||!fe.current)return;Bt.select(q.current).call(fe.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(ie.motion.svg,{width:`${x}px`,height:`${v}px`,viewBox:`0 0 ${x} ${v}`,ref:q,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:ye,children:[ue.filter(t=>t.position==="before").map(t=>t.layer),M.features.map((t,a)=>{if(!t.properties?.[pe])return null;const i=ae(t);return i?o.jsxRuntimeExports.jsx(ie.motion.g,{opacity:C?N:F?F.indexOf(t.properties[pe])!==-1?1:N:1,children:o.jsxRuntimeExports.jsx("path",{d:i,style:{stroke:de,strokeWidth:ce,fill:Ne,vectorEffect:"non-scaling-stroke"}})},a):null}),o.jsxRuntimeExports.jsxs(io.AnimatePresence,{children:[e.filter(t=>t.id).map(t=>{const a=M.features.findIndex(d=>t.id===d.properties[pe]);if(a===-1)return null;const i=ae(M.features[a]);if(!i)return null;const E=yt.checkIfNullOrUndefined(t.x)?Ne:$e(t.x);return o.jsxRuntimeExports.jsx(ie.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:C?C===E&&(!F||F.indexOf(t.id)!==-1)?1:N:F?F.indexOf(t.id)!==-1?1:N:1,transition:{duration:g.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:d=>{D(t),j(d.clientY),O(d.clientX),U?.(t)},onMouseMove:d=>{D(t),j(d.clientY),O(d.clientX)},onMouseLeave:()=>{D(void 0),O(void 0),j(void 0),U?.(void 0)},onClick:()=>{(L||G)&&(Ft.isEqual(ee,t)&&qe?($(void 0),L?.(void 0)):($(t),L?.(t)))},children:o.jsxRuntimeExports.jsx(ie.motion.path,{d:i,variants:{initial:{fill:E,opacity:0},whileInView:{fill:E,opacity:1,transition:{duration:g.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{stroke:de,strokeWidth:ce,vectorEffect:"non-scaling-stroke"}},`${t.id}`)},t.id)}),he?.features.map((t,a)=>{const i=ae(t);return i?o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("path",{d:i,style:{stroke:h||de,strokeWidth:Ke||ce+1,fill:"none",pointerEvents:"none",vectorEffect:"non-scaling-stroke"}})},a):null}),e.filter(t=>!yt.checkIfNullOrUndefined(t.lat)&&!yt.checkIfNullOrUndefined(t.long)).map(t=>{const a=oe([t.long,t.lat])[0]>.8*x?-1:1;return o.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:Oe?Oe.indexOf(t.label||"")!==-1?1:N:1,transition:{duration:g.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:i=>{D(t),j(i.clientY),O(i.clientX),U?.(t)},onMouseMove:i=>{D(t),j(i.clientY),O(i.clientX)},onMouseLeave:()=>{D(void 0),O(void 0),j(void 0),U?.(void 0)},onClick:()=>{(L||G)&&(Ft.isEqual(ee,t)&&qe?($(void 0),L?.(void 0)):($(t),L?.(t)))},transform:`translate(${oe([t.long,t.lat])[0]},${oe([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(ie.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:Z,stroke:Pe||Z},whileInView:{r:I?I(t.radius||0):z,fill:Z,stroke:Pe||Z,transition:{duration:g.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{r:0,transition:{duration:g.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),Se&&t.label?o.jsxRuntimeExports.jsx(ie.motion.text,{variants:{initial:{opacity:0,x:a*(I?I(t.radius||0):z)},whileInView:{opacity:1,x:a*(I?I(t.radius||0):z),transition:{duration:g.duration}}},initial:"initial",animate:R?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},y:0,className:$t.cn("text-sm",H?.graphObjectValues),style:{textAnchor:a===-1?"end":"start",fill:ze||"#000",vectorEffect:"non-scaling-stroke",...w?.graphObjectValues||{}},dx:a*4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})]}),ue.filter(t=>t.position==="after").map(t=>t.layer)]})}),Me===!1?null:o.jsxRuntimeExports.jsx("div",{className:$t.cn("absolute left-4 bottom-4 map-color-legend",H?.colorLegend),children:Qe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ge(!1)},children:o.jsxRuntimeExports.jsx(vt.X,{})}),o.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:Y||p.length<2?void 0:"340px"},children:[me&&me!==""?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Z}}),o.jsxRuntimeExports.jsx(Ye.P,{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})]}),o.jsxRuntimeExports.jsx(Vt.Spacer,{size:"xl"}),o.jsxRuntimeExports.jsx(Jt.Separator,{}),o.jsxRuntimeExports.jsx(Vt.Spacer,{size:"xl"})]}):null,A&&A!==""?o.jsxRuntimeExports.jsx(Ye.P,{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:A}):null,!Y&&p.length>1?o.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{children:[p.map((t,a)=>o.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{b(r[a])},onMouseLeave:()=>{b(void 0)},className:"cursor-pointer",children:[o.jsxRuntimeExports.jsx("rect",{x:a*320/r.length+1,y:1,width:320/r.length-2,height:8,className:C===r[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:r[a],...C===r[a]?{}:{stroke:r[a]}}}),o.jsxRuntimeExports.jsx("text",{x:(a+1)*320/r.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Pt.numberFormattingFunction(t,void 0,k?.precision??2,void 0,void 0,k?.locale||"en",k?.padZeros||!1)})]},a)),o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{b(r[p.length])},onMouseLeave:()=>{b(void 0)},x:p.length*320/r.length+1,y:1,width:320/r.length-2,height:8,className:`cursor-pointer ${C===r[p.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:r[p.length],...C===r[p.length]?{}:{stroke:r[p.length]}}})})]})}):Y?o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:p.map((t,a)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{b(r[a%r.length])},onMouseLeave:()=>{b(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[a%r.length]}}),o.jsxRuntimeExports.jsx(Ye.P,{size:"sm",marginBottom:"none",leading:"none",children:t})]},a))}):o.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{b(r[0])},onMouseLeave:()=>{b(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[0]}}),o.jsxRuntimeExports.jsx(Ye.P,{size:"sm",marginBottom:"none",leading:"none",children:`<= ${Pt.numberFormattingFunction(p[0],"NA",k?.precision??2,void 0,void 0,k?.locale||"en",k?.padZeros||!1)}`})]}),o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{b(r[1])},onMouseLeave:()=>{b(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[1]}}),o.jsxRuntimeExports.jsx(Ye.P,{size:"sm",marginBottom:"none",leading:"none",children:`> ${Pt.numberFormattingFunction(p[0],"NA",k?.precision??2,void 0,void 0,k?.locale||"en",k?.padZeros||!1)}`})]})]})]})]}):o.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:()=>{ge(!0)},children:o.jsxRuntimeExports.jsx(vt.ExpandIcon,{})})}),X==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons",children:[o.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:"+"}),o.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:"–"})]}),(xe||Q)&&o.jsxRuntimeExports.jsxs("div",{className:"absolute right-4 top-4 flex flex-col image-download-button gap-2",children:[xe&&o.jsxRuntimeExports.jsx(eo.ImageDownloadButton,{nodeID:xe,buttonSmall:!0,className:"p-1"}),Q&&Q.length>0&&o.jsxRuntimeExports.jsx(to.CsvDownloadButton,{csvData:Q,buttonSmall:!0,headers:Object.keys(Q[0]).map(t=>({label:t,key:t})),className:"p-1"})]})]}),G&&ee!==void 0?o.jsxRuntimeExports.jsx(Qt.DetailsModal,{body:G,data:ee,setData:$,className:H?.modal}):null,Le&&le&&Fe&&y?o.jsxRuntimeExports.jsx(Kt.Tooltip,{data:Le,body:le,xPos:Fe,yPos:y,backgroundStyle:w?.tooltip,className:H?.tooltip}):null]})}function xo(n){const e=o.compilerRuntimeExports.c(140),{data:r,mapData:se,graphTitle:A,colors:p,sources:z,graphDescription:v,height:x,width:f,footNote:T,mapColorLegendTitle:le,colorDomain:Se,choroplethScaleType:ce,radius:de,scale:Ne,centerPoint:U,padding:Me,mapBorderWidth:Ze,mapNoDataColor:Je,backgroundColor:Oe,showLabels:L,mapBorderColor:qe,tooltip:G,relativeHeight:w,onSeriesMouseOver:H,isWorldMap:re,showColorScale:X,zoomScaleExtend:g,zoomTranslateExtend:N,graphID:ue,highlightedDataPoints:Ie,onSeriesMouseClick:Y,graphDownload:Z,dataDownload:Be,showAntarctica:F,language:pe,minHeight:me,theme:Pe,ariaLabel:ze,resetSelectionOnDoubleClick:J,detailsOnClick:K,styles:m,classNames:h,mapProjection:Ke,zoomInteraction:k,animate:xe,dimmedOpacity:Q,customLayers:M,maxRadiusValue:he,timeline:C,collapseColorScaleByDefault:b,dotColor:Qe,highlightedIds:ge,mapProperty:fe,dotLegendTitle:ee,dotBorderColor:$,labelColor:Le,projectionRotate:D,rewindCoordinatesInMapData:Fe,numberDisplayOptions:O,mapOverlay:y}=n,j=se===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":se,q=T===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":T,R=ce===void 0?"threshold":ce,ye=de===void 0?5:de,I=Ne===void 0?.95:Ne,$e=Ze===void 0?.5:Ze,te=Je===void 0?De.Colors.light.graphNoData:Je,V=Oe===void 0?!1:Oe,Ve=L===void 0?!1:L,We=qe===void 0?De.Colors.light.grays["gray-500"]:qe,ve=re===void 0?!0:re,_e=X===void 0?!0:X;let B;e[0]!==g?(B=g===void 0?[.8,6]:g,e[0]=g,e[1]=B):B=e[1];const oe=B,ae=Z===void 0?!1:Z,je=Be===void 0?!1:Be,t=F===void 0?!1:F,a=pe===void 0?"en":pe,i=me===void 0?0:me,E=Pe===void 0?"light":Pe,d=J===void 0?!0:J,Ae=Ke===void 0?"naturalEarth":Ke,Te=k===void 0?"button":k,be=xe===void 0?!1:xe,jt=Q===void 0?.3:Q;let et;e[2]!==M?(et=M===void 0?[]:M,e[2]=M,e[3]=et):et=e[3];const bt=et;let tt;e[4]!==C?(tt=C===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:C,e[4]=C,e[5]=tt):tt=e[5];const l=tt,Et=Qe===void 0?De.Colors.primaryColors["blue-600"]:Qe,Rt=fe===void 0?"ISO3":fe,wt=Le===void 0?De.Colors.primaryColors["blue-600"]:Le;let ot;e[6]!==D?(ot=D===void 0?[0,0]:D,e[6]=D,e[7]=ot):ot=e[7];const kt=ot,Ct=Fe===void 0?!0:Fe,[ne,At]=s.useState(0),[Ue,Tt]=s.useState(0),[W,Ut]=s.useState(l.autoplay);let Ge;if(e[8]!==r||e[9]!==l.dateFormat){let c;e[11]!==l.dateFormat?(c=S=>Lt.parse(`${S.date}`,l.dateFormat||"yyyy",new Date).getTime(),e[11]=l.dateFormat,e[12]=c):c=e[12],Ge=[...new Set(r.filter(ko).map(c))],Ge.sort(wo),e[8]=r,e[9]=l.dateFormat,e[10]=Ge}else Ge=e[10];const u=Ge,[_,Dt]=s.useState(l.autoplay?0:u.length-1),[Ee,Gt]=s.useState(void 0),[St,Ht]=s.useState(void 0),Nt=s.useRef(null),zt=s.useRef(null);let rt;e[13]!==R||e[14]!==Se||e[15]!==p?.length||e[16]!==r?(rt=Se||(R==="categorical"?uo.getUniqValue(r,"x"):po.getJenks(r.map(Ro),p?.length||4)),e[13]=R,e[14]=Se,e[15]=p?.length,e[16]=r,e[17]=rt):rt=e[17];const He=rt;let at,nt;e[18]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{const c=new ResizeObserver(S=>{At(S[0].target.clientWidth||620),Tt(S[0].target.clientHeight||480)});return Nt.current&&c.observe(Nt.current),()=>c.disconnect()},nt=[],e[18]=at,e[19]=nt):(at=e[18],nt=e[19]),s.useEffect(at,nt);let it;e[20]===Symbol.for("react.memo_cache_sentinel")?(it=c=>{Gt(c)},e[20]=it):it=e[20];const st=s.useEffectEvent(it);let lt;e[21]===Symbol.for("react.memo_cache_sentinel")?(lt=c=>{Ht(c)},e[21]=lt):lt=e[21];const Xe=s.useEffectEvent(lt);let ct;e[22]!==j||e[23]!==st?(ct=()=>{typeof j=="string"?Wt.fetchAndParseJSON(j).then(S=>{st(S)}):st(j)},e[22]=j,e[23]=st,e[24]=ct):ct=e[24];let dt;e[25]!==j?(dt=[j],e[25]=j,e[26]=dt):dt=e[26],s.useEffect(ct,dt);let ut;e[27]!==y?.mapData||e[28]!==Xe?(ut=()=>{y?.mapData||Xe(void 0),typeof y?.mapData=="string"?Wt.fetchAndParseJSON(y?.mapData).then(S=>{Xe(S)}):Xe(y?.mapData)},e[27]=y?.mapData,e[28]=Xe,e[29]=ut):ut=e[29];const Mt=y?.mapData;let pt;e[30]!==Mt?(pt=[Mt],e[30]=Mt,e[31]=pt):pt=e[31],s.useEffect(ut,pt);let mt,xt;e[32]!==W||e[33]!==l.speed||e[34]!==u?(mt=()=>{const c=setInterval(()=>{Dt(S=>S<u.length-1?S+1:0)},(l.speed||2)*1e3);return W||clearInterval(c),()=>clearInterval(c)},xt=[u,W,l.speed],e[32]=W,e[33]=l.speed,e[34]=u,e[35]=mt,e[36]=xt):(mt=e[35],xt=e[36]),s.useEffect(mt,xt);const Ot=l.dateFormat||"yyyy";let ht;e[37]!==_||e[38]!==Ot||e[39]!==l.showOnlyActiveDate||e[40]!==u?(ht=co.getSliderMarks(u,_,l.showOnlyActiveDate,Ot),e[37]=_,e[38]=Ot,e[39]=l.showOnlyActiveDate,e[40]=u,e[41]=ht):ht=e[41];const gt=ht,qt=h?.graphContainer,It=m?.graphContainer;let Re;e[42]!==h?.description||e[43]!==h?.title||e[44]!==v||e[45]!==A||e[46]!==m?.description||e[47]!==m?.title||e[48]!==f?(Re=A||v?o.jsxRuntimeExports.jsx(lo.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:h?.title,description:h?.description},graphTitle:A,graphDescription:v,width:f}):null,e[42]=h?.description,e[43]=h?.title,e[44]=v,e[45]=A,e[46]=m?.description,e[47]=m?.title,e[48]=f,e[49]=Re):Re=e[49];let we;e[50]!==_||e[51]!==gt||e[52]!==W||e[53]!==l.enabled||e[54]!==u?(we=l.enabled&&u.length>0&&gt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Ut(!W)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":W?"Click to pause animation":"Click to play animation",children:W?o.jsxRuntimeExports.jsx(vt.Pause,{}):o.jsxRuntimeExports.jsx(vt.Play,{})}),o.jsxRuntimeExports.jsx(Xt.SliderUI,{min:u[0],max:u[u.length-1],marks:gt,step:null,defaultValue:u[u.length-1],value:u[_],onChangeComplete:c=>{Dt(u.indexOf(c))},onChange:c=>{Dt(u.indexOf(c))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[50]=_,e[51]=gt,e[52]=W,e[53]=l.enabled,e[54]=u,e[55]=we):we=e[55];let ke;e[56]!==be||e[57]!==U||e[58]!==R||e[59]!==h||e[60]!==b||e[61]!==p||e[62]!==bt||e[63]!==r||e[64]!==je||e[65]!==K||e[66]!==jt||e[67]!==He||e[68]!==$||e[69]!==Et||e[70]!==ee||e[71]!==ae||e[72]!==x||e[73]!==Ie||e[74]!==ge||e[75]!==_||e[76]!==ve||e[77]!==wt||e[78]!==We||e[79]!==$e||e[80]!==le||e[81]!==te||e[82]!==y?.mapBorderColor||e[83]!==y?.mapBorderWidth||e[84]!==Ae||e[85]!==Rt||e[86]!==Ee||e[87]!==he||e[88]!==i||e[89]!==O||e[90]!==Y||e[91]!==H||e[92]!==St||e[93]!==kt||e[94]!==ye||e[95]!==w||e[96]!==d||e[97]!==Ct||e[98]!==I||e[99]!==t||e[100]!==_e||e[101]!==Ve||e[102]!==m||e[103]!==Ue||e[104]!==ne||e[105]!==E||e[106]!==l.dateFormat||e[107]!==l.enabled||e[108]!==G||e[109]!==u||e[110]!==f||e[111]!==Te||e[112]!==oe||e[113]!==N?(ke=o.jsxRuntimeExports.jsx(_t.GraphArea,{ref:Nt,children:ne&&Ue&&Ee?o.jsxRuntimeExports.jsx(mo,{dotColor:Et,data:r.filter(c=>l.enabled?`${c.date}`===Lt.format(new Date(u[_]),l.dateFormat||"yyyy"):c),mapData:t?Ee:{...Ee,features:Ee.features.filter(Eo)},overlayMapData:St,overlayMapBorderColor:y?.mapBorderColor,overlayMapBorderWidth:y?.mapBorderWidth,colorDomain:He,width:ne,height:Ue,scale:I,centerPoint:U,colors:p||(R==="categorical"?De.Colors[E].sequentialColors[`neutralColorsx0${He.length}`]:De.Colors[E].sequentialColors[`neutralColorsx0${He.length+1}`]),mapColorLegendTitle:le,radius:ye,categorical:R==="categorical",mapBorderWidth:$e,mapNoDataColor:te,mapBorderColor:We,tooltip:G,onSeriesMouseOver:H,showLabels:Ve,isWorldMap:ve,showColorScale:_e,zoomScaleExtend:oe,zoomTranslateExtend:N,onSeriesMouseClick:Y,highlightedDataPoints:Ie,resetSelectionOnDoubleClick:d,styles:m,classNames:h,zoomInteraction:Te,detailsOnClick:K,mapProjection:Ae||(ve?"naturalEarth":"mercator"),animate:be===!0?{duration:.5,once:!0,amount:.5}:be||{duration:0,once:!0,amount:0},dimmedOpacity:jt,customLayers:bt,maxRadiusValue:yt.checkIfNullOrUndefined(he)?Math.max(...r.map(bo).filter(jo)):he,collapseColorScaleByDefault:b,highlightedIds:ge,mapProperty:Rt,dotLegendTitle:ee,dotBorderColor:$,labelColor:wt,projectionRotate:kt,rewindCoordinatesInMapData:Ct,numberDisplayOptions:O,graphDownload:ae?zt:void 0,dataDownload:je?r.map(vo).filter(yo).length>0?r.map(fo).filter(go):r.filter(ho):null}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(i,x||(w?i?(f||ne)*w>i?(f||ne)*w:i:(f||ne)*w:Ue))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Yt.Spinner,{"aria-label":"Loading graph"})})}),e[56]=be,e[57]=U,e[58]=R,e[59]=h,e[60]=b,e[61]=p,e[62]=bt,e[63]=r,e[64]=je,e[65]=K,e[66]=jt,e[67]=He,e[68]=$,e[69]=Et,e[70]=ee,e[71]=ae,e[72]=x,e[73]=Ie,e[74]=ge,e[75]=_,e[76]=ve,e[77]=wt,e[78]=We,e[79]=$e,e[80]=le,e[81]=te,e[82]=y?.mapBorderColor,e[83]=y?.mapBorderWidth,e[84]=Ae,e[85]=Rt,e[86]=Ee,e[87]=he,e[88]=i,e[89]=O,e[90]=Y,e[91]=H,e[92]=St,e[93]=kt,e[94]=ye,e[95]=w,e[96]=d,e[97]=Ct,e[98]=I,e[99]=t,e[100]=_e,e[101]=Ve,e[102]=m,e[103]=Ue,e[104]=ne,e[105]=E,e[106]=l.dateFormat,e[107]=l.enabled,e[108]=G,e[109]=u,e[110]=f,e[111]=Te,e[112]=oe,e[113]=N,e[114]=ke):ke=e[114];let Ce;e[115]!==h?.footnote||e[116]!==h?.source||e[117]!==q||e[118]!==z||e[119]!==m?.footnote||e[120]!==m?.source||e[121]!==f?(Ce=z||q?o.jsxRuntimeExports.jsx(so.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:h?.footnote,source:h?.source},sources:z,footNote:q,width:f}):null,e[115]=h?.footnote,e[116]=h?.source,e[117]=q,e[118]=z,e[119]=m?.footnote,e[120]=m?.source,e[121]=f,e[122]=Ce):Ce=e[122];let ft;return e[123]!==ze||e[124]!==V||e[125]!==ue||e[126]!==x||e[127]!==a||e[128]!==i||e[129]!==Me||e[130]!==w||e[131]!==qt||e[132]!==It||e[133]!==Re||e[134]!==we||e[135]!==ke||e[136]!==Ce||e[137]!==E||e[138]!==f?(ft=o.jsxRuntimeExports.jsxs(_t.GraphContainer,{className:qt,style:It,id:ue,ref:zt,"aria-label":ze,backgroundColor:V,theme:E,language:a,minHeight:i,width:f,height:x,relativeHeight:w,padding:Me,children:[Re,we,ke,Ce]}),e[123]=ze,e[124]=V,e[125]=ue,e[126]=x,e[127]=a,e[128]=i,e[129]=Me,e[130]=w,e[131]=qt,e[132]=It,e[133]=Re,e[134]=we,e[135]=ke,e[136]=Ce,e[137]=E,e[138]=f,e[139]=ft):ft=e[139],ft}function ho(n){return n!==void 0}function go(n){return n!==void 0}function fo(n){return n.data}function yo(n){return n!==void 0}function vo(n){return n.data}function jo(n){return n!=null}function bo(n){return n.radius}function Eo(n){return n.properties?.NAME!=="Antarctica"}function Ro(n){return n.x}function wo(n,e){return n-e}function ko(n){return n.date}exports.HybridMap=xo;
2
2
  //# sourceMappingURL=HybridMap.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HybridMap.cjs","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { RefObject, useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n NumberFormatOptions,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { ImageDownloadButton } from '@/Components/Actions/ImageDownloadButton';\r\nimport { CsvDownloadButton } from '@/Components/Actions/CsvDownloadButton';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n graphDownload?: RefObject<HTMLDivElement | null>;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataDownload: any;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n numberDisplayOptions,\r\n graphDownload,\r\n dataDownload,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? !highlightedIds || highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n {(graphDownload || dataDownload) && (\r\n <div className='absolute right-4 top-4 flex flex-col image-download-button gap-2'>\r\n {graphDownload && (\r\n <ImageDownloadButton nodeID={graphDownload} buttonSmall className='p-1' />\r\n )}\r\n {dataDownload && dataDownload.length > 0 && (\r\n <CsvDownloadButton\r\n csvData={dataDownload}\r\n buttonSmall\r\n headers={Object.keys(dataDownload[0]).map(d => ({\r\n label: d,\r\n key: d,\r\n }))}\r\n className='p-1'\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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 /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\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 /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: 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 HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds,\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n numberDisplayOptions,\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n numberDisplayOptions={numberDisplayOptions}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","numberDisplayOptions","graphDownload","dataDownload","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","key","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","mapOverlay","Colors","light","graphNoData","grays","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","shape_0","onUpdateOverlayMapShape","t40","fetchAndParseJSON","then","d_2","t41","t42","d_3","t43","t44","t45","t46","speed","interval","setInterval","clearInterval","t47","t48","getSliderMarks","markObj","t49","graphContainer","t50","t51","description","title","GraphHeader","t52","Pause","Play","SliderUI","nextValue","nextValue_0","t53","GraphArea","d_4","format","_temp4","sequentialColors","max","_temp5","_temp6","_temp7","_temp8","_temp9","_temp0","_temp1","Spinner","t54","footnote","source","GraphFooter","t55","GraphContainer","d_9","d_8","d_7","d_11","d_10","d_6","d_5","NAME","d_1","b"],"mappings":"qjDAMA,IAAIA,GAAI,YAAaC,GAAI,aAAcC,GAAI,CAAC,aAAc,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AAA,EAnLjBgK,EAmLiB,CAzUd,SAAAN,GAAAQ,EAAA,CAAA,OAoS8B1W,IAAM6D,MAAS,CApS7C,SAAAoS,GAAAU,EAAA,CAAA,OAmS+C3W,IAAM6D,MAAS,CAnS9D,SAAAmS,GAAAY,EAAA,CAAA,OAmS2B5W,EAACM,IAAK,CAnSjC,SAAAyV,GAAAc,EAAA,CAAA,OAkS6C7W,IAAM6D,MAAS,CAlS5D,SAAAiS,GAAAgB,EAAA,CAAA,OAkSyB9W,EAACM,IAAK,CAlS/B,SAAAuV,GAAAkB,EAAA,CAAA,OAoR8E/W,GAAM,IAAI,CApRxF,SAAA4V,GAAAoB,EAAA,CAAA,OAoRqChX,EAACW,MAAO,CApR7C,SAAA8U,GAAA5L,EAAA,CAAA,OAgOsDA,EAAEX,YAAiB+N,OAAK,YAAY,CAhO1F,SAAAhF,GAAAiF,EAAA,CAAA,OAyFiBlX,EAACR,CAA+B,CAzFjD,SAAA8R,GAAApS,EAAAiY,EAAA,CAAA,OA2EkBjY,EAAIiY,CAAC,CA3EvB,SAAA/F,GAAApR,EAAA,CAAA,OAuEgBA,EAACgR,IAAK","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"HybridMap.cjs","sources":["../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { RefObject, useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n NumberFormatOptions,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { ImageDownloadButton } from '@/Components/Actions/ImageDownloadButton';\r\nimport { CsvDownloadButton } from '@/Components/Actions/CsvDownloadButton';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n graphDownload?: RefObject<HTMLDivElement | null>;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataDownload: any;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n numberDisplayOptions,\r\n graphDownload,\r\n dataDownload,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? !highlightedIds || highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical || colorDomain.length < 2 ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical && colorDomain.length > 1 ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : categorical ? (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n <div\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[0]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[0] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {`<= ${numberFormattingFunction(\r\n colorDomain[0] as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}`}\r\n </P>\r\n </div>\r\n <div\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[1]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[1] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {`> ${numberFormattingFunction(\r\n colorDomain[0] as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}`}\r\n </P>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n {(graphDownload || dataDownload) && (\r\n <div className='absolute right-4 top-4 flex flex-col image-download-button gap-2'>\r\n {graphDownload && (\r\n <ImageDownloadButton nodeID={graphDownload} buttonSmall className='p-1' />\r\n )}\r\n {dataDownload && dataDownload.length > 0 && (\r\n <CsvDownloadButton\r\n csvData={dataDownload}\r\n buttonSmall\r\n headers={Object.keys(dataDownload[0]).map(d => ({\r\n label: d,\r\n key: d,\r\n }))}\r\n className='p-1'\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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 /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\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 /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: 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 HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds,\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n numberDisplayOptions,\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n numberDisplayOptions={numberDisplayOptions}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","numberDisplayOptions","graphDownload","dataDownload","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","r","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","P","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","key","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","mapOverlay","Colors","light","graphNoData","grays","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","shape_0","onUpdateOverlayMapShape","t40","fetchAndParseJSON","then","d_2","t41","t42","d_3","t43","t44","t45","t46","speed","interval","setInterval","clearInterval","t47","t48","getSliderMarks","markObj","t49","graphContainer","t50","t51","description","title","GraphHeader","t52","Pause","Play","SliderUI","nextValue","nextValue_0","t53","GraphArea","d_4","format","_temp4","sequentialColors","max","_temp5","_temp6","_temp7","_temp8","_temp9","_temp0","_temp1","Spinner","t54","footnote","source","GraphFooter","t55","GraphContainer","d_9","d_8","d_7","d_11","d_10","d_6","d_5","NAME","d_1","a","b"],"mappings":"65CAgGO,SAASA,GAAMC,EAAc,CAClC,KAAM,CACJC,KAAAA,EACAC,OAAAA,EACAC,QAAAA,GACAC,oBAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,QAAAA,GACAC,WAAAA,GACAC,eAAAA,GACAC,eAAAA,GACAC,eAAAA,GACAC,kBAAAA,EACAC,eAAAA,GACAC,gBAAAA,GACAC,oBAAAA,GACAC,sBAAAA,GACAC,mBAAAA,EACAC,4BAAAA,GACAC,eAAAA,EACAC,OAAAA,EACAC,WAAAA,EACAC,cAAAA,GACAC,gBAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,GACAC,eAAAA,GACAC,YAAAA,EACAC,SAAAA,EACAC,4BAAAA,GACAC,eAAAA,EACAC,YAAAA,GACAC,eAAAA,GACAC,eAAAA,GACAC,WAAAA,GACAC,iBAAAA,EACAC,2BAAAA,EACAC,eAAAA,EACAC,sBAAAA,EACAC,sBAAAA,GACAC,qBAAAA,EACAC,cAAAA,GACAC,aAAAA,CAAAA,EACE/C,EACEgD,EAAmBC,EAAAA,QAAQ,IAC1BR,EAEES,EAAAA,cAAO/C,GAAS,CAAEgD,QAAS,EAAA,CAAM,EAFAhD,GAGvC,CAACA,GAASsC,CAA0B,CAAC,EAClCW,GAA0BH,EAAAA,QAAQ,IAClC,CAACR,GAA8B,CAACC,EAAuBA,EAEpDQ,EAAAA,cAAOR,EAAgB,CAAES,QAAS,EAAA,CAAM,EAC9C,CAACT,EAAgBD,CAA0B,CAAC,E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