@undp/data-viz 2.5.4 → 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 (438) 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 +83 -81
  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/CopyTextButton.cjs +1 -1
  52. package/dist/CopyTextButton.cjs.map +1 -1
  53. package/dist/CopyTextButton.js +37 -754
  54. package/dist/CopyTextButton.js.map +1 -1
  55. package/dist/CsvDownloadButton.cjs +4 -4
  56. package/dist/CsvDownloadButton.cjs.map +1 -1
  57. package/dist/CsvDownloadButton.js +47 -45
  58. package/dist/CsvDownloadButton.js.map +1 -1
  59. package/dist/DataCards.cjs +1 -1
  60. package/dist/DataCards.cjs.map +1 -1
  61. package/dist/DataCards.js +213 -467
  62. package/dist/DataCards.js.map +1 -1
  63. package/dist/DataTable.cjs +1 -1
  64. package/dist/DataTable.cjs.map +1 -1
  65. package/dist/DataTable.js +19 -19
  66. package/dist/DetailsModal-BmjtLqrZ.cjs +2 -0
  67. package/dist/{DetailsModal-Du8Fr1QD.cjs.map → DetailsModal-BmjtLqrZ.cjs.map} +1 -1
  68. package/dist/{DetailsModal-GqEbGHY2.js → DetailsModal-k-Me_U_T.js} +3 -3
  69. package/dist/{DetailsModal-GqEbGHY2.js.map → DetailsModal-k-Me_U_T.js.map} +1 -1
  70. package/dist/DifferenceLineChart.cjs +1 -1
  71. package/dist/DifferenceLineChart.cjs.map +1 -1
  72. package/dist/DifferenceLineChart.js +61 -60
  73. package/dist/DifferenceLineChart.js.map +1 -1
  74. package/dist/DonutChart.cjs +1 -1
  75. package/dist/DonutChart.cjs.map +1 -1
  76. package/dist/DonutChart.js +47 -46
  77. package/dist/DonutChart.js.map +1 -1
  78. package/dist/DotDensityMap.cjs +1 -1
  79. package/dist/DotDensityMap.cjs.map +1 -1
  80. package/dist/DotDensityMap.js +112 -110
  81. package/dist/DotDensityMap.js.map +1 -1
  82. package/dist/DualAxisLineChart.cjs +1 -1
  83. package/dist/DualAxisLineChart.cjs.map +1 -1
  84. package/dist/DualAxisLineChart.js +13 -12
  85. package/dist/DualAxisLineChart.js.map +1 -1
  86. package/dist/DumbbellChart.cjs +1 -1
  87. package/dist/DumbbellChart.cjs.map +1 -1
  88. package/dist/DumbbellChart.js +104 -102
  89. package/dist/DumbbellChart.js.map +1 -1
  90. package/dist/EmptyState-BoaUUuo6.cjs +2 -0
  91. package/dist/{EmptyState-CFmiFPHz.cjs.map → EmptyState-BoaUUuo6.cjs.map} +1 -1
  92. package/dist/{EmptyState-CaxXCkiN.js → EmptyState-prZ8OnEs.js} +4 -4
  93. package/dist/{EmptyState-CaxXCkiN.js.map → EmptyState-prZ8OnEs.js.map} +1 -1
  94. package/dist/ExcelDownloadButton.cjs +1 -1
  95. package/dist/ExcelDownloadButton.cjs.map +1 -1
  96. package/dist/ExcelDownloadButton.js +15 -13
  97. package/dist/ExcelDownloadButton.js.map +1 -1
  98. package/dist/FootNote.cjs +1 -1
  99. package/dist/FootNote.cjs.map +1 -1
  100. package/dist/FootNote.js +10 -9
  101. package/dist/FootNote.js.map +1 -1
  102. package/dist/GeoHubCompareMaps.cjs +1 -1
  103. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  104. package/dist/GeoHubCompareMaps.js +14 -14
  105. package/dist/GeoHubMap.cjs +1 -1
  106. package/dist/GeoHubMap.cjs.map +1 -1
  107. package/dist/GeoHubMap.js +59 -59
  108. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  109. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  110. package/dist/GeoHubMapWithLayerSelection.js +50 -50
  111. package/dist/{GraphContainer-B8ZqOzKI.js → GraphContainer-DcOM2CI6.js} +28 -27
  112. package/dist/GraphContainer-DcOM2CI6.js.map +1 -0
  113. package/dist/GraphContainer-gaG9TSy4.cjs +2 -0
  114. package/dist/{GraphContainer-Cul9b74X.cjs.map → GraphContainer-gaG9TSy4.cjs.map} +1 -1
  115. package/dist/GraphDescription.cjs +1 -1
  116. package/dist/GraphDescription.cjs.map +1 -1
  117. package/dist/GraphDescription.js +14 -13
  118. package/dist/GraphDescription.js.map +1 -1
  119. package/dist/{GraphEl-Ch0uAeZw.js → GraphEl-C7KBBHvB.js} +9 -9
  120. package/dist/{GraphEl-Ch0uAeZw.js.map → GraphEl-C7KBBHvB.js.map} +1 -1
  121. package/dist/GraphEl-CGALp07K.cjs +2 -0
  122. package/dist/{GraphEl-BgkDbq50.cjs.map → GraphEl-CGALp07K.cjs.map} +1 -1
  123. package/dist/GraphFooter.cjs +1 -1
  124. package/dist/GraphFooter.cjs.map +1 -1
  125. package/dist/GraphFooter.js +2 -2
  126. package/dist/GraphHeader.cjs +1 -1
  127. package/dist/GraphHeader.cjs.map +1 -1
  128. package/dist/GraphHeader.js +1 -1
  129. package/dist/GraphTitle.cjs +1 -1
  130. package/dist/GraphTitle.cjs.map +1 -1
  131. package/dist/GraphTitle.js +14 -13
  132. package/dist/GraphTitle.js.map +1 -1
  133. package/dist/GriddedGraphs.cjs +1 -1
  134. package/dist/GriddedGraphs.cjs.map +1 -1
  135. package/dist/GriddedGraphs.js +58 -55
  136. package/dist/GriddedGraphs.js.map +1 -1
  137. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  138. package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
  139. package/dist/GriddedGraphsFromConfig.js +15 -15
  140. package/dist/HeatMap.cjs +1 -1
  141. package/dist/HeatMap.cjs.map +1 -1
  142. package/dist/HeatMap.js +17 -16
  143. package/dist/HeatMap.js.map +1 -1
  144. package/dist/Histogram.cjs +1 -1
  145. package/dist/Histogram.cjs.map +1 -1
  146. package/dist/Histogram.js +3 -3
  147. package/dist/HybridMap.cjs +1 -1
  148. package/dist/HybridMap.cjs.map +1 -1
  149. package/dist/HybridMap.js +392 -424
  150. package/dist/HybridMap.js.map +1 -1
  151. package/dist/ImageDownloadButton.cjs +1 -1
  152. package/dist/ImageDownloadButton.cjs.map +1 -1
  153. package/dist/ImageDownloadButton.js +16 -14
  154. package/dist/ImageDownloadButton.js.map +1 -1
  155. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  156. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  157. package/dist/LineChartWithConfidenceInterval.js +16 -15
  158. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  159. package/dist/LinearColorLegend.cjs +1 -1
  160. package/dist/LinearColorLegend.cjs.map +1 -1
  161. package/dist/LinearColorLegend.js +5 -4
  162. package/dist/LinearColorLegend.js.map +1 -1
  163. package/dist/MultiGraphDashboard.cjs +1 -1
  164. package/dist/MultiGraphDashboard.cjs.map +1 -1
  165. package/dist/MultiGraphDashboard.js +62 -60
  166. package/dist/MultiGraphDashboard.js.map +1 -1
  167. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  168. package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
  169. package/dist/MultiGraphDashboardFromConfig.js +7 -7
  170. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  171. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
  172. package/dist/MultiGraphDashboardWideToLongFormat.js +21 -21
  173. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
  174. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  175. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
  176. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +3 -3
  177. package/dist/MultiLineAltChart.cjs +1 -1
  178. package/dist/MultiLineAltChart.cjs.map +1 -1
  179. package/dist/MultiLineAltChart.js +16 -15
  180. package/dist/MultiLineAltChart.js.map +1 -1
  181. package/dist/MultiLineChart.cjs +1 -1
  182. package/dist/MultiLineChart.cjs.map +1 -1
  183. package/dist/MultiLineChart.js +16 -15
  184. package/dist/MultiLineChart.js.map +1 -1
  185. package/dist/ParetoChart.cjs +1 -1
  186. package/dist/ParetoChart.cjs.map +1 -1
  187. package/dist/ParetoChart.js +14 -13
  188. package/dist/ParetoChart.js.map +1 -1
  189. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  190. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  191. package/dist/PerformanceIntensiveMultiGraphDashboard.js +67 -65
  192. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  193. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  194. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
  195. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +8 -8
  196. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  197. package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
  198. package/dist/PerformanceIntensiveScrollStory.js +3 -3
  199. package/dist/RadarChart.cjs +1 -1
  200. package/dist/RadarChart.cjs.map +1 -1
  201. package/dist/RadarChart.js +11 -10
  202. package/dist/RadarChart.js.map +1 -1
  203. package/dist/ReferenceLine-CxITVT1K.cjs +2 -0
  204. package/dist/{ReferenceLine-CpU4G01Y.cjs.map → ReferenceLine-CxITVT1K.cjs.map} +1 -1
  205. package/dist/{ReferenceLine-D41VuUhE.js → ReferenceLine-NF4g3Reh.js} +26 -25
  206. package/dist/ReferenceLine-NF4g3Reh.js.map +1 -0
  207. package/dist/RegressionLine-BQ6h-NZP.js +88 -0
  208. package/dist/RegressionLine-BQ6h-NZP.js.map +1 -0
  209. package/dist/RegressionLine-BpcVBjL0.cjs +2 -0
  210. package/dist/{RegressionLine-BFoBiVJk.cjs.map → RegressionLine-BpcVBjL0.cjs.map} +1 -1
  211. package/dist/SVGDownloadButton.cjs +1 -1
  212. package/dist/SVGDownloadButton.cjs.map +1 -1
  213. package/dist/SVGDownloadButton.js +11 -9
  214. package/dist/SVGDownloadButton.js.map +1 -1
  215. package/dist/SankeyChart.cjs +1 -1
  216. package/dist/SankeyChart.cjs.map +1 -1
  217. package/dist/SankeyChart.js +63 -62
  218. package/dist/SankeyChart.js.map +1 -1
  219. package/dist/ScatterPlot.cjs +1 -1
  220. package/dist/ScatterPlot.cjs.map +1 -1
  221. package/dist/ScatterPlot.js +109 -107
  222. package/dist/ScatterPlot.js.map +1 -1
  223. package/dist/ScrollStory.cjs +1 -1
  224. package/dist/ScrollStory.cjs.map +1 -1
  225. package/dist/ScrollStory.js +3 -3
  226. package/dist/SimpleLineChart.cjs +1 -1
  227. package/dist/SimpleLineChart.cjs.map +1 -1
  228. package/dist/SimpleLineChart.js +17 -16
  229. package/dist/SimpleLineChart.js.map +1 -1
  230. package/dist/SingleGraphDashboard.cjs +1 -1
  231. package/dist/SingleGraphDashboard.cjs.map +1 -1
  232. package/dist/SingleGraphDashboard.js +59 -56
  233. package/dist/SingleGraphDashboard.js.map +1 -1
  234. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  235. package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
  236. package/dist/SingleGraphDashboardFromConfig.js +6 -6
  237. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  238. package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
  239. package/dist/SingleGraphDashboardGeoHubMaps.js +12 -12
  240. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  241. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
  242. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +8 -8
  243. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  244. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  245. package/dist/SingleGraphDashboardThreeDGraphs.js +59 -56
  246. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  247. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  248. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
  249. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +7 -7
  250. package/dist/SlopeChart.cjs +1 -1
  251. package/dist/SlopeChart.cjs.map +1 -1
  252. package/dist/SlopeChart.js +60 -59
  253. package/dist/SlopeChart.js.map +1 -1
  254. package/dist/Source.cjs +1 -1
  255. package/dist/Source.cjs.map +1 -1
  256. package/dist/Source.js +38 -4
  257. package/dist/Source.js.map +1 -1
  258. package/dist/SparkLine.cjs +1 -1
  259. package/dist/SparkLine.cjs.map +1 -1
  260. package/dist/SparkLine.js +11 -10
  261. package/dist/SparkLine.js.map +1 -1
  262. package/dist/StatCardFromData.cjs +1 -1
  263. package/dist/StatCardFromData.cjs.map +1 -1
  264. package/dist/StatCardFromData.js +15 -14
  265. package/dist/StatCardFromData.js.map +1 -1
  266. package/dist/StripChart.cjs +1 -1
  267. package/dist/StripChart.cjs.map +1 -1
  268. package/dist/StripChart.js +11 -10
  269. package/dist/StripChart.js.map +1 -1
  270. package/dist/ThreeDGlobe.cjs +1 -1
  271. package/dist/ThreeDGlobe.cjs.map +1 -1
  272. package/dist/ThreeDGlobe.js +52 -51
  273. package/dist/ThreeDGlobe.js.map +1 -1
  274. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  275. package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
  276. package/dist/ThresholdColorLegendWithMouseOver.js +17 -16
  277. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
  278. package/dist/{Tooltip-3EYDVa3w.js → Tooltip-DO56mY4b.js} +11 -10
  279. package/dist/{Tooltip-3EYDVa3w.js.map → Tooltip-DO56mY4b.js.map} +1 -1
  280. package/dist/Tooltip-DwUFLDrj.cjs +2 -0
  281. package/dist/{Tooltip-C9F3uYG0.cjs.map → Tooltip-DwUFLDrj.cjs.map} +1 -1
  282. package/dist/TreeMapGraph.cjs +1 -1
  283. package/dist/TreeMapGraph.cjs.map +1 -1
  284. package/dist/TreeMapGraph.js +34 -33
  285. package/dist/TreeMapGraph.js.map +1 -1
  286. package/dist/UnitChart.cjs +1 -1
  287. package/dist/UnitChart.cjs.map +1 -1
  288. package/dist/UnitChart.js +27 -27
  289. package/dist/WaterfallChart.cjs +1 -1
  290. package/dist/WaterfallChart.cjs.map +1 -1
  291. package/dist/WaterfallChart.js +21 -20
  292. package/dist/WaterfallChart.js.map +1 -1
  293. package/dist/XAxesLabels-0ROJnigy.cjs +2 -0
  294. package/dist/{XAxesLabels-C03jHniq.cjs.map → XAxesLabels-0ROJnigy.cjs.map} +1 -1
  295. package/dist/{XAxesLabels-B9gkjUiC.js → XAxesLabels-CPZX3OJN.js} +12 -11
  296. package/dist/XAxesLabels-CPZX3OJN.js.map +1 -0
  297. package/dist/XTicksAndGridLines-BO6KJc8d.cjs +2 -0
  298. package/dist/{XTicksAndGridLines-B4UhDVyU.cjs.map → XTicksAndGridLines-BO6KJc8d.cjs.map} +1 -1
  299. package/dist/{XTicksAndGridLines-CkYwVshF.js → XTicksAndGridLines-obTK2e7G.js} +10 -9
  300. package/dist/{XTicksAndGridLines-CkYwVshF.js.map → XTicksAndGridLines-obTK2e7G.js.map} +1 -1
  301. package/dist/{YAxesLabels-hWEUCTvs.js → YAxesLabels-CwVnFG2a.js} +13 -12
  302. package/dist/YAxesLabels-CwVnFG2a.js.map +1 -0
  303. package/dist/YAxesLabels-DIa2cEXL.cjs +2 -0
  304. package/dist/{YAxesLabels-DeENFC2M.cjs.map → YAxesLabels-DIa2cEXL.cjs.map} +1 -1
  305. package/dist/YTicksAndGridLines-C7glLI5b.cjs +2 -0
  306. package/dist/{YTicksAndGridLines-sT3zdCs6.cjs.map → YTicksAndGridLines-C7glLI5b.cjs.map} +1 -1
  307. package/dist/{YTicksAndGridLines-BbujwxOB.js → YTicksAndGridLines-wtuAKNeT.js} +10 -9
  308. package/dist/{YTicksAndGridLines-BbujwxOB.js.map → YTicksAndGridLines-wtuAKNeT.js.map} +1 -1
  309. package/dist/checkIfMultiple-BIEQDuA3.cjs +2 -0
  310. package/dist/checkIfMultiple-BIEQDuA3.cjs.map +1 -0
  311. package/dist/checkIfMultiple-D2tgEnYM.js +11 -0
  312. package/dist/checkIfMultiple-D2tgEnYM.js.map +1 -0
  313. package/dist/compiler-runtime-oPPev21o.cjs +11 -0
  314. package/dist/compiler-runtime-oPPev21o.cjs.map +1 -0
  315. package/dist/compiler-runtime-qHgugrLy.js +297 -0
  316. package/dist/compiler-runtime-qHgugrLy.js.map +1 -0
  317. package/dist/customArea-BCGIYDQa.cjs +2 -0
  318. package/dist/{customArea-BAcQ3pBM.cjs.map → customArea-BCGIYDQa.cjs.map} +1 -1
  319. package/dist/{customArea-D89lETG0.js → customArea-Dixg0NtQ.js} +10 -9
  320. package/dist/{customArea-D89lETG0.js.map → customArea-Dixg0NtQ.js.map} +1 -1
  321. package/dist/{fetchAndParseData-BAXhgTDM.js → fetchAndParseData-CDjQZ1fL.js} +5 -5
  322. package/dist/{fetchAndParseData-BAXhgTDM.js.map → fetchAndParseData-CDjQZ1fL.js.map} +1 -1
  323. package/dist/fetchAndParseData.js +1 -1
  324. package/dist/getSliderMarks-Bj_JJTtX.cjs +2 -0
  325. package/dist/getSliderMarks-Bj_JJTtX.cjs.map +1 -0
  326. package/dist/getSliderMarks-DSxFGb1f.js +21 -0
  327. package/dist/getSliderMarks-DSxFGb1f.js.map +1 -0
  328. package/dist/index-5BQWR1Z8.cjs +10 -0
  329. package/dist/{index-FXfr51ZM.cjs.map → index-5BQWR1Z8.cjs.map} +1 -1
  330. package/dist/index-BaXzoD4r.cjs +2 -0
  331. package/dist/{index-BuhBhuCq.cjs.map → index-BaXzoD4r.cjs.map} +1 -1
  332. package/dist/{index-Cv_5q6Rb.js → index-CNUlPiEL.js} +3 -3
  333. package/dist/{index-Cv_5q6Rb.js.map → index-CNUlPiEL.js.map} +1 -1
  334. package/dist/{index-DHVGV8Df.js → index-CmkqqFRG.js} +3 -3
  335. package/dist/{index-DHVGV8Df.js.map → index-CmkqqFRG.js.map} +1 -1
  336. package/dist/index-D_ls5oK8.js +142 -0
  337. package/dist/index-D_ls5oK8.js.map +1 -0
  338. package/dist/index-DbSnila_.cjs +2 -0
  339. package/dist/index-DbSnila_.cjs.map +1 -0
  340. package/dist/{index-BPyj_6hG.js → index-_w-CQAbR.js} +113 -112
  341. package/dist/{index-BPyj_6hG.js.map → index-_w-CQAbR.js.map} +1 -1
  342. package/dist/index-dN3wiQgD.cjs +2 -0
  343. package/dist/{index-DuLvdHo2.cjs.map → index-dN3wiQgD.cjs.map} +1 -1
  344. package/dist/index.cjs +1 -1
  345. package/dist/index.js +181 -180
  346. package/dist/index.js.map +1 -1
  347. package/dist/{proxy-BsxtcZKa.js → proxy-D31SA_aE.js} +2 -2
  348. package/dist/{proxy-BsxtcZKa.js.map → proxy-D31SA_aE.js.map} +1 -1
  349. package/dist/proxy-QMeVVqam.cjs +2 -0
  350. package/dist/{proxy-CqH8m8IQ.cjs.map → proxy-QMeVVqam.cjs.map} +1 -1
  351. package/dist/style.css +1 -1
  352. package/dist/transformData.js +2 -2
  353. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js → transformDataForGraphFromFile-COZC6A0_.js} +4 -4
  354. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js.map → transformDataForGraphFromFile-COZC6A0_.js.map} +1 -1
  355. package/dist/{use-in-view-KOXq5Kmc.js → use-in-view-Co5SmzfT.js} +2 -2
  356. package/dist/{use-in-view-KOXq5Kmc.js.map → use-in-view-Co5SmzfT.js.map} +1 -1
  357. package/dist/use-in-view-DjR_gqJP.cjs +2 -0
  358. package/dist/{use-in-view-dnRv_qqF.cjs.map → use-in-view-DjR_gqJP.cjs.map} +1 -1
  359. package/package.json +1 -1
  360. package/dist/Axis-BTaS9oPQ.cjs +0 -2
  361. package/dist/AxisTitle-CyLCqpW6.js +0 -29
  362. package/dist/AxisTitle-CyLCqpW6.js.map +0 -1
  363. package/dist/AxisTitle-DP_evhbe.cjs +0 -2
  364. package/dist/DetailsModal-Du8Fr1QD.cjs +0 -2
  365. package/dist/DropdownSelect-CX1yMemd.cjs +0 -5
  366. package/dist/DropdownSelect-CX1yMemd.cjs.map +0 -1
  367. package/dist/DropdownSelect-Dz7imdTB.js +0 -4191
  368. package/dist/DropdownSelect-Dz7imdTB.js.map +0 -1
  369. package/dist/EmptyState-CFmiFPHz.cjs +0 -2
  370. package/dist/GraphContainer-B8ZqOzKI.js.map +0 -1
  371. package/dist/GraphContainer-Cul9b74X.cjs +0 -2
  372. package/dist/GraphEl-BgkDbq50.cjs +0 -2
  373. package/dist/Modal-BIErPPKT.cjs +0 -46
  374. package/dist/Modal-BIErPPKT.cjs.map +0 -1
  375. package/dist/Modal-CrUYln5V.js +0 -1047
  376. package/dist/Modal-CrUYln5V.js.map +0 -1
  377. package/dist/ReferenceLine-CpU4G01Y.cjs +0 -2
  378. package/dist/ReferenceLine-D41VuUhE.js.map +0 -1
  379. package/dist/RegressionLine-BFoBiVJk.cjs +0 -2
  380. package/dist/RegressionLine-CuwB42I6.js +0 -87
  381. package/dist/RegressionLine-CuwB42I6.js.map +0 -1
  382. package/dist/Source-PKuwZOn3.cjs +0 -2
  383. package/dist/Source-PKuwZOn3.cjs.map +0 -1
  384. package/dist/Source-QGk8vhkS.js +0 -78
  385. package/dist/Source-QGk8vhkS.js.map +0 -1
  386. package/dist/Spinner-B2IIKg9r.js +0 -47
  387. package/dist/Spinner-B2IIKg9r.js.map +0 -1
  388. package/dist/Spinner-WHzzloYQ.cjs +0 -2
  389. package/dist/Spinner-WHzzloYQ.cjs.map +0 -1
  390. package/dist/Tooltip-C9F3uYG0.cjs +0 -2
  391. package/dist/Typography-BO0gQDIT.js +0 -270
  392. package/dist/Typography-BO0gQDIT.js.map +0 -1
  393. package/dist/Typography-BqmyF1gP.cjs +0 -2
  394. package/dist/Typography-BqmyF1gP.cjs.map +0 -1
  395. package/dist/XAxesLabels-B9gkjUiC.js.map +0 -1
  396. package/dist/XAxesLabels-C03jHniq.cjs +0 -2
  397. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +0 -2
  398. package/dist/YAxesLabels-DeENFC2M.cjs +0 -2
  399. package/dist/YAxesLabels-hWEUCTvs.js.map +0 -1
  400. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +0 -2
  401. package/dist/checkIfMultiple-CH5tqj4q.cjs +0 -2
  402. package/dist/checkIfMultiple-CH5tqj4q.cjs.map +0 -1
  403. package/dist/checkIfMultiple-Dpyy6BUP.js +0 -938
  404. package/dist/checkIfMultiple-Dpyy6BUP.js.map +0 -1
  405. package/dist/customArea-BAcQ3pBM.cjs +0 -2
  406. package/dist/getSliderMarks-BzrpHrHS.cjs +0 -2
  407. package/dist/getSliderMarks-BzrpHrHS.cjs.map +0 -1
  408. package/dist/getSliderMarks-X-_goqH9.js +0 -1027
  409. package/dist/getSliderMarks-X-_goqH9.js.map +0 -1
  410. package/dist/index-ApTBN0kp.js +0 -196
  411. package/dist/index-ApTBN0kp.js.map +0 -1
  412. package/dist/index-BhI7mBJx.cjs +0 -2
  413. package/dist/index-BhI7mBJx.cjs.map +0 -1
  414. package/dist/index-BuhBhuCq.cjs +0 -2
  415. package/dist/index-CHPV5EwG-BzibaIRc.js +0 -3360
  416. package/dist/index-CHPV5EwG-BzibaIRc.js.map +0 -1
  417. package/dist/index-CHPV5EwG-D4pAp7u0.cjs +0 -20
  418. package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +0 -1
  419. package/dist/index-DuLvdHo2.cjs +0 -2
  420. package/dist/index-FXfr51ZM.cjs +0 -10
  421. package/dist/index-Scxs_wcm-BAjU0Cob.js +0 -49
  422. package/dist/index-Scxs_wcm-BAjU0Cob.js.map +0 -1
  423. package/dist/index-Scxs_wcm-DUDU-Gll.cjs +0 -2
  424. package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +0 -1
  425. package/dist/index-w64Zl8io-DrMm5QSb.cjs +0 -2
  426. package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +0 -1
  427. package/dist/index-w64Zl8io-ihagHOdP.js +0 -459
  428. package/dist/index-w64Zl8io-ihagHOdP.js.map +0 -1
  429. package/dist/proxy-CqH8m8IQ.cjs +0 -2
  430. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +0 -4
  431. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +0 -1
  432. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +0 -145
  433. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +0 -1
  434. package/dist/use-in-view-dnRv_qqF.cjs +0 -2
  435. package/dist/x-BXShoIAM-BC2sxios.cjs +0 -2
  436. package/dist/x-BXShoIAM-BC2sxios.cjs.map +0 -1
  437. package/dist/x-BXShoIAM-D6VWO6z5.js +0 -74
  438. package/dist/x-BXShoIAM-D6VWO6z5.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/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 { scaleSqrt } 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 rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\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: DotDensityMapDataType[];\r\n\r\n mapData: FeatureCollection;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\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 projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\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 colorLegendTitle,\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 collapseColorScaleByDefault,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\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 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\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\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 const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <path\r\n d={path}\r\n key={i}\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 );\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 <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\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: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : 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, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) 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:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={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 {data.filter(el => el.color).length === 0 || 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 className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\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 {colorLegendTitle}\r\n </p>\r\n ) : null}\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 </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 DotDensityMapDataType,\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 MapOverlayDataType,\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 { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\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 | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\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 /** 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 /** 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 /** 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 DotDensityMap(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 colorLegendTitle,\r\n colorDomain,\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\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\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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);\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 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 colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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","colorLegendTitle","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","collapseColorScaleByDefault","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","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","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","path","stroke","strokeWidth","fill","vectorEffect","pointerEvents","AnimatePresence","color","el","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","key","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","t13","showAntarctica","t14","language","t15","minHeight","t16","theme","t17","ariaLabel","t18","t19","t20","t21","t22","t23","timeline","t24","t25","t26","mapOverlay","light","graphNoData","grays","t27","t28","t29","enabled","autoplay","showOnlyActiveDate","t30","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t31","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t32","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t33","shape","onUpdateShape","useEffectEvent","t34","shape_0","onUpdateOverlayMapShape","t35","fetchAndParseJSON","then","d_1","t36","t37","d_2","t38","t39","t40","t41","speed","interval","setInterval","clearInterval","t42","t43","getSliderMarks","markObj","t44","graphContainer","t45","t46","description","title","GraphHeader","t47","Pause","Play","SliderUI","nextValue","nextValue_0","t48","GraphArea","d_3","format","_temp3","_temp4","uniqBy","_temp5","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp6","_temp7","_temp8","_temp9","_temp0","_temp1","_temp10","Spinner","t49","footnote","source","GraphFooter","t50","GraphContainer","d_8","d_7","d_6","d_10","d_9","d_5","d_4","el_1","el_0","properties","NAME","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA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AA8K,SAAA0B,GAAA1B,SAAA4B,GAAA5B,SAAAU,IAAAV,SAAAgB,GAAAhB,SAAAsH,IAAAtH,SAAAwH,IAAAxH,SAAAyH,IAAAzH,SAAA6H,IAAA7H,SAAAmI,IAAAnI,SAAAuJ,IAAAvJ,SAAA8B,GAAA9B,SAAA7K,GAAA6K,SAAA2J,MAAAA,KAAA3J,EAAA,GAAA,GA5KjB2J;AA4KiB;AAnTd,SAAAN,GAAAQ,GAAA;AAAA,SA8Q8B7Q,MAAMrB;AAAS;AA9Q7C,SAAAyR,GAAAU,GAAA;AAAA,SA6Q+C9Q,MAAMrB;AAAS;AA7Q9D,SAAAwR,GAAAY,GAAA;AAAA,SA6Q2B/Q,EAACpE;AAAK;AA7QjC,SAAAsU,GAAAc,GAAA;AAAA,SA4Q6ChR,MAAMrB;AAAS;AA5Q5D,SAAAsR,GAAAgB,GAAA;AAAA,SA4QyBjR,EAACpE;AAAK;AA5Q/B,SAAAoU,GAAAkB,GAAA;AAAA,SAoQ8ElR,KAAM;AAAI;AApQxF,SAAA+P,GAAAoB,GAAA;AAAA,SAoQqCnR,EAAC/D;AAAO;AApQ7C,SAAAyT,GAAA0B,GAAA;AAAA,SA6NyB3M,EAAED;AAAM;AA7NjC,SAAAgL,GAAA6B,GAAA;AAAA,SAoNyB5M,EAAED;AAAM;AApNjC,SAAA+K,GAAA9K,GAAA;AAAA,SAgNsDA,EAAE6M,YAAiBC,SAAK;AAAY;AAhN1F,SAAAhG,GAAAiG,GAAAC,GAAA;AAAA,SAmEkBD,IAAIC;AAAC;AAnEvB,SAAApG,GAAArL,GAAA;AAAA,SA+DgBA,EAACiL;AAAK;"}
1
+ {"version":3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/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 { scaleSqrt } 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 rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\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: DotDensityMapDataType[];\r\n\r\n mapData: FeatureCollection;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\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 projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\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 colorLegendTitle,\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 collapseColorScaleByDefault,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\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 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\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\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 const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <path\r\n d={path}\r\n key={i}\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 );\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 <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\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: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : 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, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) 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:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={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 {data.filter(el => el.color).length === 0 || 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 className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\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 {colorLegendTitle}\r\n </p>\r\n ) : null}\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 </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 DotDensityMapDataType,\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 MapOverlayDataType,\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 { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\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 | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\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 /** 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 /** 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 /** 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 DotDensityMap(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 colorLegendTitle,\r\n colorDomain,\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\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\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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);\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 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 colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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","colorLegendTitle","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","collapseColorScaleByDefault","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","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","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","path","stroke","strokeWidth","fill","vectorEffect","pointerEvents","AnimatePresence","color","el","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","key","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","t13","showAntarctica","t14","language","t15","minHeight","t16","theme","t17","ariaLabel","t18","t19","t20","t21","t22","t23","timeline","t24","t25","t26","mapOverlay","light","graphNoData","grays","t27","t28","t29","enabled","autoplay","showOnlyActiveDate","t30","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t31","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t32","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t33","shape","onUpdateShape","useEffectEvent","t34","shape_0","onUpdateOverlayMapShape","t35","fetchAndParseJSON","then","d_1","t36","t37","d_2","t38","t39","t40","t41","speed","interval","setInterval","clearInterval","t42","t43","getSliderMarks","markObj","t44","graphContainer","t45","t46","description","title","GraphHeader","t47","Pause","Play","SliderUI","nextValue","nextValue_0","t48","GraphArea","d_3","format","_temp3","_temp4","uniqBy","_temp5","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp6","_temp7","_temp8","_temp9","_temp0","_temp1","_temp10","Spinner","t49","footnote","source","GraphFooter","t50","GraphContainer","d_8","d_7","d_6","d_10","d_9","d_5","d_4","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Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-D4pAp7u0.cjs"),N=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),Re=require("./index-Cno4Q0YE.cjs"),ae=require("./numberFormattingFunction-u2iNHL_c.cjs"),ke=require("./Tooltip-C9F3uYG0.cjs"),T=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-B4UhDVyU.cjs"),he=require("./Axis-BTaS9oPQ.cjs"),ve=require("./AxisTitle-DP_evhbe.cjs"),Le=require("./index-BuhBhuCq.cjs"),Oe=require("./time-CkcKbhwe.cjs"),je=require("./linear-CgUCbw9F.cjs"),ye=require("./line-DaEMhXmx.cjs"),ce=require("./step-BZ3C8QFW.cjs"),De=require("./select-Bnfk0lJx.cjs"),ct=require("./proxy-CqH8m8IQ.cjs"),Ie=require("./init-DU0ybBc_.cjs"),qe=require("./pointer-Dkq5NV1q.cjs"),Me=require("./use-in-view-dnRv_qqF.cjs"),Se=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ve=require("./EmptyState-CFmiFPHz.cjs"),we=require("./GraphContainer-Cul9b74X.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:B,height:z,lineColors:o,labels:j,sameAxes:A,dateFormat:p,showValues:At,noOfXTicks:Zt,rightMargin:Bt,leftMargin:Gt,topMargin:J,bottomMargin:wt,tooltip:ut,highlightAreaSettings:bt,onSeriesMouseOver:Et,animate:s,strokeWidth:H,showDots:C,noOfYTicks:Rt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:b,minDate:xt,maxDate:kt,curveType:K,styles:a,classNames:c,customLayers:U,showAxisLabels:P,naLabel:Ht}=e,Ut=N.useRef(null);let mt;t[0]!==s.amount||t[1]!==s.once?(mt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=mt):mt=t[2];const d=Me.useInView(Ut,mt),[y,Pt]=N.useState(!1);let pt,Q;t[3]!==s.duration||t[4]!==y||t[5]!==d?(pt=()=>{if(d&&!y){const i=setTimeout(()=>{Pt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},Q=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=pt,t[7]=Q):(pt=t[6],Q=t[7]),N.useEffect(pt,Q);const Wt=K==="linear"?ye.curveLinear:K==="step"?ce.curveStep:K==="stepAfter"?ce.stepAfter:K==="stepBefore"?ce.stepBefore:ce.monotoneX,[O,Nt]=N.useState(void 0),[ft,f]=N.useState(void 0),[u,dt]=N.useState(void 0),Lt=Gt+50,Ot=Bt+65;let _;t[8]!==wt||t[9]!==Lt||t[10]!==Ot||t[11]!==J?(_={top:J,bottom:wt,left:Lt,right:Ot},t[8]=wt,t[9]=Lt,t[10]=Ot,t[11]=J,t[12]=_):_=t[12];const h=_,W=N.useRef(null);let D;t[13]!==p?(D=i=>({...i,date:Ft.parse(`${i.date}`,p,new Date)}),t[13]=p,t[14]=D):D=t[14];const r=Re.orderBy(v.map(D),["date"],["asc"]);let tt;if(t[15]!==p||t[16]!==bt){let i;t[18]!==p?(i=k=>({...k,coordinates:[k.coordinates[0]===null?null:Ft.parse(`${k.coordinates[0]}`,p,new Date),k.coordinates[1]===null?null:Ft.parse(`${k.coordinates[1]}`,p,new Date)]}),t[18]=p,t[19]=i):i=t[19],tt=bt.map(i),t[15]=p,t[16]=bt,t[17]=tt}else tt=t[17];const ht=tt,x=B-h.left-h.right,l=z-h.top-h.bottom,Xt=xt?Ft.parse(`${xt}`,p,new Date):r[0].date,Dt=kt?Ft.parse(`${kt}`,p,new Date):r[r.length-1].date,yt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(fi))>0?0:Math.min(...r.map(pi).filter(mi)):0,et=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,X=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Qe)):0,It=yt<et?yt:et,it=X>Y?X:Y,m=Oe.time().domain([Xt,Dt]).range([0,x]),I=je.linear().domain([A?It:yt,A?it>0?it:0:X>0?X:0]).range([l,0]).nice(),g=je.linear().domain([A?It:et,A?it>0?it:0:Y>0?Y:0]).range([l,0]).nice(),qt=ye.line().defined(Ke).x(i=>m(i.date)).y(i=>I(i.y1)).curve(Wt),gt=ye.line().defined(Je).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Wt),Yt=I.ticks(Rt),Mt=g.ticks(Rt),St=m.ticks(Zt);N.useEffect(()=>{const i=de=>{const ge=r[Ie.bisectCenter(r.map(ze),m.invert(qe.pointer(de)[0]),0)];Nt(ge||r[r.length-1]),Et?.(ge||r[r.length-1]),dt(de.clientY),f(de.clientX)},k=()=>{Nt(void 0),f(void 0),dt(void 0),Et?.(void 0)};De.select(W.current).on("mousemove",i).on("mouseout",k)},[m,r,Et]);let nt;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==ht||t[24]!==d||t[25]!==m?(nt=n.jsxRuntimeExports.jsx(Le.HighlightArea,{areaSettings:ht,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=ht,t[24]=d,t[25]=m,t[26]=nt):nt=t[26];const vt=c?.xAxis?.axis;let L;t[27]!==vt?(L={axis:vt},t[27]=vt,t[28]=L):L=t[28];let st;t[29]!==a?.xAxis?.axis?(st=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=st):st=t[30];let q;t[31]!==o[0]||t[32]!==st?(q={axis:{stroke:o[0],...st}},t[31]=o[0],t[32]=st,t[33]=q):q=t[33];let Tt;t[34]!==l||t[35]!==L||t[36]!==q?(Tt=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:L,styles:q}),t[34]=l,t[35]=L,t[36]=q,t[37]=Tt):Tt=t[37];let ot;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==P||t[44]!==a?.yAxis?.title?(ot=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=P,t[44]=a?.yAxis?.title,t[45]=ot):ot=t[45];const Ct=x+15,rt=x+15,lt=c?.xAxis?.axis;let V;t[46]!==lt?(V={axis:lt},t[46]=lt,t[47]=V):V=t[47];let $;t[48]!==a?.xAxis?.axis?($=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=$):$=t[49];let E;t[50]!==o[1]||t[51]!==$?(E={axis:{stroke:o[1],...$}},t[50]=o[1],t[51]=$,t[52]=E):E=t[52];let M;t[53]!==l||t[54]!==Ct||t[55]!==rt||t[56]!==V||t[57]!==E?(M=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:Ct,x2:rt,classNames:V,styles:E}),t[53]=l,t[54]=Ct,t[55]=rt,t[56]=V,t[57]=E,t[58]=M):M=t[58];let S;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==P||t[66]!==a?.yAxis?.title?(S=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=P,t[66]=a?.yAxis?.title,t[67]=S):S=t[67];const F=x+15,G=c?.xAxis?.axis;let R;t[68]!==G?(R={axis:G},t[68]=G,t[69]=R):R=t[69];const at=a?.xAxis?.axis;let Z;t[70]!==at?(Z={axis:at},t[70]=at,t[71]=Z):Z=t[71];let jt;t[72]!==l||t[73]!==F||t[74]!==R||t[75]!==Z?(jt=n.jsxRuntimeExports.jsx(he.Axis,{y1:l,y2:l,x1:-15,x2:F,classNames:R,styles:Z}),t[72]=l,t[73]=F,t[74]=R,t[75]=Z,t[76]=jt):jt=t[76];let zt;t[77]!==p?(zt=i=>Ft.format(i,p),t[77]=p,t[78]=zt):zt=t[78];const be=St.map(zt),Ee=St.map(i=>m(i)),ue=a?.xAxis?.gridLines,xe=a?.xAxis?.labels;let Jt;t[79]!==ue||t[80]!==xe?(Jt={gridLines:ue,labels:xe},t[79]=ue,t[80]=xe,t[81]=Jt):Jt=t[81];const me=c?.xAxis?.gridLines;let Vt;t[82]!==me?(Vt=n.mo("opacity-0",me),t[82]=me,t[83]=Vt):Vt=t[83];const pe=c?.xAxis?.labels;let $t;t[84]!==pe?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",pe),t[84]=pe,t[85]=$t):$t=t[85];let Kt;t[86]!==Vt||t[87]!==$t?(Kt={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=Kt):Kt=t[88];let Qt;t[89]!==U?(Qt=U.filter(Be).map(Ze),t[89]=U,t[90]=Qt):Qt=t[90];let _t;t[91]!==o[0]||t[92]!==H?(_t={stroke:o[0],strokeWidth:H,fill:"none"},t[91]=o[0],t[92]=H,t[93]=_t):_t=t[93];let te;t[94]!==s.duration?(te={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=te):te=t[95];let ee;t[96]!==o[1]||t[97]!==H?(ee={stroke:o[1],strokeWidth:H,fill:"none"},t[96]=o[1],t[97]=H,t[98]=ee):ee=t[98];let ie;t[99]!==s.duration?(ie={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ie):ie=t[100];const fe=r.map((i,k)=>n.jsxRuntimeExports.jsxs(ct.motion.g,{children:[T.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:I(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:I(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,At?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y1,Ht,w?.precision??2,w?.prefix,w?.suffix,w?.locale,w?.padZeros)}):null]}),T.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,At?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y2,Ht,b?.precision??2,b?.prefix,b?.suffix,b?.locale,b?.padZeros)}):null]})]},k));let ne;t[101]!==fe?(ne=n.jsxRuntimeExports.jsx("g",{children:fe}),t[101]=fe,t[102]=ne):ne=t[102];let se;t[103]!==U?(se=U.filter(He).map(Ge),t[103]=U,t[104]=se):se=t[104];let oe;t[105]===Symbol.for("react.memo_cache_sentinel")?(oe={fill:"none",pointerEvents:"all"},t[105]=oe):oe=t[105];let re;t[106]!==W||t[107]!==l||t[108]!==x?(re=n.jsxRuntimeExports.jsx("rect",{ref:W,style:oe,width:x,height:l}),t[106]=W,t[107]=l,t[108]=x,t[109]=re):re=t[109];let le;return t[110]!==c?.tooltip||t[111]!==ft||t[112]!==u||t[113]!==O||t[114]!==a?.tooltip||t[115]!==ut?(le=O&&ut&&ft&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:O,body:ut,xPos:ft,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=ft,t[112]=u,t[113]=O,t[114]=a?.tooltip,t[115]=ut,t[116]=le):le=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ct.motion.svg,{width:`${B}px`,height:`${z}px`,viewBox:`0 0 ${B} ${z}`,direction:"ltr",ref:Ut,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[nt,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:I(i),y2:I(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:I(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:ae.numberFormattingFunction(i,void 0,w?.precision,w?.prefix,w?.suffix,w?.locale,w?.padZeros)})]},k)),Tt,ot]}),n.jsxRuntimeExports.jsxs("g",{children:[Mt.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:ae.numberFormattingFunction(i,void 0,b?.precision,b?.prefix,b?.suffix,b?.locale,b?.padZeros)})]},k)),M,S]}),n.jsxRuntimeExports.jsxs("g",{children:[jt,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:be,x:Ee,y1:0,y2:l,styles:Jt,classNames:Kt,labelType:"primary",showGridLines:!0,padZeros:!1})]}),Qt,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ct.motion.path,{style:_t,exit:te,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(ct.motion.path,{d:gt(r.filter(We))||"",style:ee,exit:ie,variants:{initial:{pathLength:0,d:gt(r.filter(Pe))||"",opacity:1},whileInView:{pathLength:1,d:gt(r.filter(Ue))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),O?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(O.date),x2:m(O.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),ne,se,re]})}),le]})}function Ge(e){return e.layer}function He(e){return e.position==="after"}function Ue(e){return!T.checkIfNullOrUndefined(e.y2)}function Pe(e){return!T.checkIfNullOrUndefined(e.y2)}function We(e){return!T.checkIfNullOrUndefined(e.y2)}function Xe(e){return!T.checkIfNullOrUndefined(e.y1)}function Ye(e){return!T.checkIfNullOrUndefined(e.y1)}function Ze(e){return e.layer}function Be(e){return e.position==="before"}function ze(e){return e.date}function Je(e){return!T.checkIfNullOrUndefined(e.y2)}function Ke(e){return!T.checkIfNullOrUndefined(e.y1)}function Qe(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function pi(e){return e.y1}function fi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(86),{data:v,graphTitle:B,sources:z,graphDescription:o,height:j,width:A,footNote:p,noOfXTicks:At,dateFormat:Zt,showValues:Bt,padding:Gt,lineColors:J,sameAxes:wt,backgroundColor:ut,leftMargin:bt,rightMargin:Et,topMargin:s,bottomMargin:H,labels:C,rightLineNumberDisplayOptions:Rt,leftLineNumberDisplayOptions:w,tooltip:b,highlightAreaSettings:xt,relativeHeight:kt,onSeriesMouseOver:K,graphID:a,graphDownload:c,dataDownload:U,animate:P,strokeWidth:Ht,showDots:Ut,language:mt,showColorScale:d,minHeight:y,colorLegendTitle:Pt,theme:pt,ariaLabel:Q,noOfYTicks:Wt,maxDate:O,minDate:Nt,curveType:ft,styles:f,classNames:u,customLayers:dt,showAxisLabels:Lt,naLabel:Ot}=e,_=Zt===void 0?"yyyy":Zt,h=Bt===void 0?!1:Bt;let W;t[0]!==J?(W=J===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:J,t[0]=J,t[1]=W):W=t[1];const D=W,r=wt===void 0?!1:wt,tt=ut===void 0?!1:ut,ht=bt===void 0?80:bt,x=Et===void 0?80:Et,l=s===void 0?20:s,Xt=H===void 0?25:H;let Dt;t[2]!==xt?(Dt=xt===void 0?[]:xt,t[2]=xt,t[3]=Dt):Dt=t[3];const yt=Dt,et=c===void 0?!1:c,X=U===void 0?!1:U,Y=P===void 0?!1:P,It=Ht===void 0?2:Ht,it=Ut===void 0?!0:Ut,m=mt===void 0?"en":mt,I=d===void 0?!0:d,g=y===void 0?0:y,qt=pt===void 0?"light":pt,gt=Wt===void 0?5:Wt,Yt=ft===void 0?"curve":ft;let Mt;t[4]!==dt?(Mt=dt===void 0?[]:dt,t[4]=dt,t[5]=Mt):Mt=t[5];const St=Mt,nt=Lt===void 0?!0:Lt,vt=Ot===void 0?"NA":Ot,[L,st]=N.useState(0),[q,Tt]=N.useState(0),ot=N.useRef(null),Ct=N.useRef(null);let rt,lt;t[6]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const Z=new ResizeObserver(jt=>{st(jt[0].target.clientWidth||620),Tt(jt[0].target.clientHeight||480)});return ot.current&&Z.observe(ot.current),()=>Z.disconnect()},lt=[],t[6]=rt,t[7]=lt):(rt=t[6],lt=t[7]),N.useEffect(rt,lt);const V=u?.graphContainer,$=f?.graphContainer;let E;t[8]!==u?.description||t[9]!==u?.title||t[10]!==v||t[11]!==X||t[12]!==o||t[13]!==et||t[14]!==B||t[15]!==f?.description||t[16]!==f?.title||t[17]!==A?(E=B||o||et||X?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:u?.title,description:u?.description},graphTitle:B,graphDescription:o,width:A,graphDownload:et?Ct:void 0,dataDownload:X?v.map(bi).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[8]=u?.description,t[9]=u?.title,t[10]=v,t[11]=X,t[12]=o,t[13]=et,t[14]=B,t[15]=f?.description,t[16]=f?.title,t[17]=A,t[18]=E):E=t[18];let M;t[19]!==u?.colorLegend||t[20]!==Pt||t[21]!==C||t[22]!==D||t[23]!==I?(M=I&&C.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:C,colorLegendTitle:Pt,colors:D,showNAColor:!1,className:u?.colorLegend}):null,t[19]=u?.colorLegend,t[20]=Pt,t[21]=C,t[22]=D,t[23]=I,t[24]=M):M=t[24];let S;t[25]!==v.length?(S=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[25]=v.length,t[26]=S):S=t[26];let F;t[27]!==Y||t[28]!==Xt||t[29]!==u||t[30]!==Yt||t[31]!==St||t[32]!==v||t[33]!==_||t[34]!==yt||t[35]!==C||t[36]!==w||t[37]!==ht||t[38]!==D||t[39]!==O||t[40]!==Nt||t[41]!==vt||t[42]!==At||t[43]!==gt||t[44]!==K||t[45]!==Rt||t[46]!==x||t[47]!==r||t[48]!==nt||t[49]!==it||t[50]!==h||t[51]!==It||t[52]!==f||t[53]!==q||t[54]!==L||t[55]!==b||t[56]!==l?(F=L&&q&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:D,width:L,height:q,dateFormat:_,showValues:h,noOfXTicks:At??$e.getNoOfTicks(L),leftMargin:ht,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:C,highlightAreaSettings:yt,tooltip:b,onSeriesMouseOver:K,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},strokeWidth:It,showDots:it,noOfYTicks:gt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:Rt,minDate:Nt,maxDate:O,curveType:Yt,styles:f,classNames:u,customLayers:St,showAxisLabels:nt,naLabel:vt}):null,t[27]=Y,t[28]=Xt,t[29]=u,t[30]=Yt,t[31]=St,t[32]=v,t[33]=_,t[34]=yt,t[35]=C,t[36]=w,t[37]=ht,t[38]=D,t[39]=O,t[40]=Nt,t[41]=vt,t[42]=At,t[43]=gt,t[44]=K,t[45]=Rt,t[46]=x,t[47]=r,t[48]=nt,t[49]=it,t[50]=h,t[51]=It,t[52]=f,t[53]=q,t[54]=L,t[55]=b,t[56]=l,t[57]=F):F=t[57];let G;t[58]!==S||t[59]!==F?(G=n.jsxRuntimeExports.jsxs(we.GraphArea,{ref:ot,children:[S,F]}),t[58]=S,t[59]=F,t[60]=G):G=t[60];let R;t[61]!==u?.footnote||t[62]!==u?.source||t[63]!==p||t[64]!==z||t[65]!==f?.footnote||t[66]!==f?.source||t[67]!==A?(R=z||p?n.jsxRuntimeExports.jsx(Se.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:z,footNote:p,width:A}):null,t[61]=u?.footnote,t[62]=u?.source,t[63]=p,t[64]=z,t[65]=f?.footnote,t[66]=f?.source,t[67]=A,t[68]=R):R=t[68];let at;return t[69]!==Q||t[70]!==tt||t[71]!==a||t[72]!==j||t[73]!==m||t[74]!==g||t[75]!==Gt||t[76]!==kt||t[77]!==V||t[78]!==$||t[79]!==E||t[80]!==M||t[81]!==G||t[82]!==R||t[83]!==qt||t[84]!==A?(at=n.jsxRuntimeExports.jsxs(we.GraphContainer,{className:V,style:$,id:a,ref:Ct,"aria-label":Q,backgroundColor:tt,theme:qt,language:m,minHeight:g,width:A,height:j,relativeHeight:kt,padding:Gt,children:[E,M,G,R]}),t[69]=Q,t[70]=tt,t[71]=a,t[72]=j,t[73]=m,t[74]=g,t[75]=Gt,t[76]=kt,t[77]=V,t[78]=$,t[79]=E,t[80]=M,t[81]=G,t[82]=R,t[83]=qt,t[84]=A,t[85]=at):at=t[85],at}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function bi(e){return e.data}exports.DualAxisLineChart=gi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./compiler-runtime-oPPev21o.cjs"),N=require("react"),Ut=require("./parse-xYI9yrvL.cjs"),At=require("@undp/design-system-react/cn"),ke=require("./index-Cno4Q0YE.cjs"),ce=require("./numberFormattingFunction-u2iNHL_c.cjs"),Ne=require("./Tooltip-DwUFLDrj.cjs"),T=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Le=require("./XTicksAndGridLines-BO6KJc8d.cjs"),ye=require("./Axis-DY7jsk1Y.cjs"),je=require("./AxisTitle-CyFFbdNU.cjs"),Oe=require("./index-BaXzoD4r.cjs"),De=require("./time-CkcKbhwe.cjs"),Ae=require("./linear-CgUCbw9F.cjs"),ge=require("./line-DaEMhXmx.cjs"),ue=require("./step-BZ3C8QFW.cjs"),Ie=require("./select-Bnfk0lJx.cjs"),ct=require("./proxy-QMeVVqam.cjs"),qe=require("./init-DU0ybBc_.cjs"),Me=require("./pointer-Dkq5NV1q.cjs"),Se=require("./use-in-view-DjR_gqJP.cjs"),Te=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),Ve=require("./ColorLegend.cjs"),we=require("./Colors.cjs"),$e=require("./EmptyState-BoaUUuo6.cjs"),Re=require("./GraphContainer-gaG9TSy4.cjs"),Fe=require("./getNoOfTicks-C_1CFXv_.cjs");function Ue(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:B,height:z,lineColors:o,labels:j,sameAxes:A,dateFormat:p,showValues:wt,noOfXTicks:Bt,rightMargin:zt,leftMargin:Gt,topMargin:J,bottomMargin:Rt,tooltip:ut,highlightAreaSettings:bt,onSeriesMouseOver:Et,animate:s,strokeWidth:G,showDots:C,noOfYTicks:kt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:R,minDate:xt,maxDate:Nt,curveType:K,styles:a,classNames:c,customLayers:H,showAxisLabels:P,naLabel:Ht}=e,Pt=N.useRef(null);let mt;t[0]!==s.amount||t[1]!==s.once?(mt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=mt):mt=t[2];const d=Se.useInView(Pt,mt),[y,Wt]=N.useState(!1);let pt,Q;t[3]!==s.duration||t[4]!==y||t[5]!==d?(pt=()=>{if(d&&!y){const i=setTimeout(()=>{Wt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},Q=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=pt,t[7]=Q):(pt=t[6],Q=t[7]),N.useEffect(pt,Q);const Xt=K==="linear"?ge.curveLinear:K==="step"?ue.curveStep:K==="stepAfter"?ue.stepAfter:K==="stepBefore"?ue.stepBefore:ue.monotoneX,[O,Lt]=N.useState(void 0),[ft,f]=N.useState(void 0),[u,dt]=N.useState(void 0),Ot=Gt+50,Dt=zt+65;let _;t[8]!==Rt||t[9]!==Ot||t[10]!==Dt||t[11]!==J?(_={top:J,bottom:Rt,left:Ot,right:Dt},t[8]=Rt,t[9]=Ot,t[10]=Dt,t[11]=J,t[12]=_):_=t[12];const h=_,W=N.useRef(null);let D;t[13]!==p?(D=i=>({...i,date:Ut.parse(`${i.date}`,p,new Date)}),t[13]=p,t[14]=D):D=t[14];const r=ke.orderBy(v.map(D),["date"],["asc"]);let tt;if(t[15]!==p||t[16]!==bt){let i;t[18]!==p?(i=k=>({...k,coordinates:[k.coordinates[0]===null?null:Ut.parse(`${k.coordinates[0]}`,p,new Date),k.coordinates[1]===null?null:Ut.parse(`${k.coordinates[1]}`,p,new Date)]}),t[18]=p,t[19]=i):i=t[19],tt=bt.map(i),t[15]=p,t[16]=bt,t[17]=tt}else tt=t[17];const ht=tt,x=B-h.left-h.right,l=z-h.top-h.bottom,Yt=xt?Ut.parse(`${xt}`,p,new Date):r[0].date,It=Nt?Ut.parse(`${Nt}`,p,new Date):r[r.length-1].date,yt=Math.min(...r.map(gi).filter(yi))!==1/0?Math.min(...r.map(hi).filter(di))>0?0:Math.min(...r.map(fi).filter(pi)):0,et=Math.min(...r.map(mi).filter(xi))!==1/0?Math.min(...r.map(ui).filter(ci))>0?0:Math.min(...r.map(ai).filter(li)):0,X=Math.max(...r.map(ri).filter(oi))!==1/0?Math.max(...r.map(si).filter(ni)):0,Y=Math.max(...r.map(ii).filter(ei))!==1/0?Math.max(...r.map(ti).filter(_e)):0,qt=yt<et?yt:et,it=X>Y?X:Y,m=De.time().domain([Yt,It]).range([0,x]),I=Ae.linear().domain([A?qt:yt,A?it>0?it:0:X>0?X:0]).range([l,0]).nice(),g=Ae.linear().domain([A?qt:et,A?it>0?it:0:Y>0?Y:0]).range([l,0]).nice(),Mt=ge.line().defined(Qe).x(i=>m(i.date)).y(i=>I(i.y1)).curve(Xt),gt=ge.line().defined(Ke).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Xt),Zt=I.ticks(kt),St=g.ticks(kt),Tt=m.ticks(Bt);N.useEffect(()=>{const i=he=>{const ve=r[qe.bisectCenter(r.map(Je),m.invert(Me.pointer(he)[0]),0)];Lt(ve||r[r.length-1]),Et?.(ve||r[r.length-1]),dt(he.clientY),f(he.clientX)},k=()=>{Lt(void 0),f(void 0),dt(void 0),Et?.(void 0)};Ie.select(W.current).on("mousemove",i).on("mouseout",k)},[m,r,Et]);let nt;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==ht||t[24]!==d||t[25]!==m?(nt=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:ht,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=ht,t[24]=d,t[25]=m,t[26]=nt):nt=t[26];const vt=c?.xAxis?.axis;let L;t[27]!==vt?(L={axis:vt},t[27]=vt,t[28]=L):L=t[28];let st;t[29]!==a?.xAxis?.axis?(st=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=st):st=t[30];let q;t[31]!==o[0]||t[32]!==st?(q={axis:{stroke:o[0],...st}},t[31]=o[0],t[32]=st,t[33]=q):q=t[33];let Ct;t[34]!==l||t[35]!==L||t[36]!==q?(Ct=n.jsxRuntimeExports.jsx(ye.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:L,styles:q}),t[34]=l,t[35]=L,t[36]=q,t[37]=Ct):Ct=t[37];let ot;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==P||t[44]!==a?.yAxis?.title?(ot=P?n.jsxRuntimeExports.jsx(je.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=P,t[44]=a?.yAxis?.title,t[45]=ot):ot=t[45];const Vt=x+15,rt=x+15,lt=c?.xAxis?.axis;let V;t[46]!==lt?(V={axis:lt},t[46]=lt,t[47]=V):V=t[47];let $;t[48]!==a?.xAxis?.axis?($=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=$):$=t[49];let b;t[50]!==o[1]||t[51]!==$?(b={axis:{stroke:o[1],...$}},t[50]=o[1],t[51]=$,t[52]=b):b=t[52];let M;t[53]!==l||t[54]!==Vt||t[55]!==rt||t[56]!==V||t[57]!==b?(M=n.jsxRuntimeExports.jsx(ye.Axis,{y1:0,y2:l,x1:Vt,x2:rt,classNames:V,styles:b}),t[53]=l,t[54]=Vt,t[55]=rt,t[56]=V,t[57]=b,t[58]=M):M=t[58];let S;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==P||t[66]!==a?.yAxis?.title?(S=P?n.jsxRuntimeExports.jsx(je.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=P,t[66]=a?.yAxis?.title,t[67]=S):S=t[67];const F=x+15,U=c?.xAxis?.axis;let E;t[68]!==U?(E={axis:U},t[68]=U,t[69]=E):E=t[69];const at=a?.xAxis?.axis;let Z;t[70]!==at?(Z={axis:at},t[70]=at,t[71]=Z):Z=t[71];let jt;t[72]!==l||t[73]!==F||t[74]!==E||t[75]!==Z?(jt=n.jsxRuntimeExports.jsx(ye.Axis,{y1:l,y2:l,x1:-15,x2:F,classNames:E,styles:Z}),t[72]=l,t[73]=F,t[74]=E,t[75]=Z,t[76]=jt):jt=t[76];let Jt;t[77]!==p?(Jt=i=>Ut.format(i,p),t[77]=p,t[78]=Jt):Jt=t[78];const be=Tt.map(Jt),Ee=Tt.map(i=>m(i)),xe=a?.xAxis?.gridLines,me=a?.xAxis?.labels;let Kt;t[79]!==xe||t[80]!==me?(Kt={gridLines:xe,labels:me},t[79]=xe,t[80]=me,t[81]=Kt):Kt=t[81];const pe=c?.xAxis?.gridLines;let $t;t[82]!==pe?($t=At.cn("opacity-0",pe),t[82]=pe,t[83]=$t):$t=t[83];const fe=c?.xAxis?.labels;let Ft;t[84]!==fe?(Ft=At.cn("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",fe),t[84]=fe,t[85]=Ft):Ft=t[85];let Qt;t[86]!==$t||t[87]!==Ft?(Qt={gridLines:$t,labels:Ft},t[86]=$t,t[87]=Ft,t[88]=Qt):Qt=t[88];let _t;t[89]!==H?(_t=H.filter(ze).map(Be),t[89]=H,t[90]=_t):_t=t[90];let te;t[91]!==o[0]||t[92]!==G?(te={stroke:o[0],strokeWidth:G,fill:"none"},t[91]=o[0],t[92]=G,t[93]=te):te=t[93];let ee;t[94]!==s.duration?(ee={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=ee):ee=t[95];let ie;t[96]!==o[1]||t[97]!==G?(ie={stroke:o[1],strokeWidth:G,fill:"none"},t[96]=o[1],t[97]=G,t[98]=ie):ie=t[98];let ne;t[99]!==s.duration?(ne={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ne):ne=t[100];const de=r.map((i,k)=>n.jsxRuntimeExports.jsxs(ct.motion.g,{children:[T.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:I(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:I(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,wt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:At.cn("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ce.numberFormattingFunction(i.y1,Ht,w?.precision??2,w?.prefix,w?.suffix,w?.locale,w?.padZeros)}):null]}),T.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,wt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:At.cn("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ce.numberFormattingFunction(i.y2,Ht,R?.precision??2,R?.prefix,R?.suffix,R?.locale,R?.padZeros)}):null]})]},k));let se;t[101]!==de?(se=n.jsxRuntimeExports.jsx("g",{children:de}),t[101]=de,t[102]=se):se=t[102];let oe;t[103]!==H?(oe=H.filter(He).map(Ge),t[103]=H,t[104]=oe):oe=t[104];let re;t[105]===Symbol.for("react.memo_cache_sentinel")?(re={fill:"none",pointerEvents:"all"},t[105]=re):re=t[105];let le;t[106]!==W||t[107]!==l||t[108]!==x?(le=n.jsxRuntimeExports.jsx("rect",{ref:W,style:re,width:x,height:l}),t[106]=W,t[107]=l,t[108]=x,t[109]=le):le=t[109];let ae;return t[110]!==c?.tooltip||t[111]!==ft||t[112]!==u||t[113]!==O||t[114]!==a?.tooltip||t[115]!==ut?(ae=O&&ut&&ft&&u?n.jsxRuntimeExports.jsx(Ne.Tooltip,{data:O,body:ut,xPos:ft,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=ft,t[112]=u,t[113]=O,t[114]=a?.tooltip,t[115]=ut,t[116]=ae):ae=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ct.motion.svg,{width:`${B}px`,height:`${z}px`,viewBox:`0 0 ${B} ${z}`,direction:"ltr",ref:Pt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[nt,n.jsxRuntimeExports.jsxs("g",{children:[Zt.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:I(i),y2:I(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:I(i),dy:"0.33em",className:At.cn("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:ce.numberFormattingFunction(i,void 0,w?.precision,w?.prefix,w?.suffix,w?.locale,w?.padZeros)})]},k)),Ct,ot]}),n.jsxRuntimeExports.jsxs("g",{children:[St.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:At.cn("text-xs",c?.yAxis?.labels),children:ce.numberFormattingFunction(i,void 0,R?.precision,R?.prefix,R?.suffix,R?.locale,R?.padZeros)})]},k)),M,S]}),n.jsxRuntimeExports.jsxs("g",{children:[jt,n.jsxRuntimeExports.jsx(Le.XTicksAndGridLines,{values:be,x:Ee,y1:0,y2:l,styles:Kt,classNames:Qt,labelType:"primary",showGridLines:!0,padZeros:!1})]}),_t,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ct.motion.path,{style:te,exit:ee,variants:{initial:{pathLength:0,d:Mt(r.filter(Ze))||"",opacity:1},whileInView:{pathLength:1,d:Mt(r.filter(Ye))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(ct.motion.path,{d:gt(r.filter(Xe))||"",style:ie,exit:ne,variants:{initial:{pathLength:0,d:gt(r.filter(We))||"",opacity:1},whileInView:{pathLength:1,d:gt(r.filter(Pe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),O?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(O.date),x2:m(O.date),className:At.cn("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),se,oe,le]})}),ae]})}function Ge(e){return e.layer}function He(e){return e.position==="after"}function Pe(e){return!T.checkIfNullOrUndefined(e.y2)}function We(e){return!T.checkIfNullOrUndefined(e.y2)}function Xe(e){return!T.checkIfNullOrUndefined(e.y2)}function Ye(e){return!T.checkIfNullOrUndefined(e.y1)}function Ze(e){return!T.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!T.checkIfNullOrUndefined(e.y2)}function Qe(e){return!T.checkIfNullOrUndefined(e.y1)}function _e(e){return e!=null}function ti(e){return e.y2}function ei(e){return e!=null}function ii(e){return e.y2}function ni(e){return e!=null}function si(e){return e.y1}function oi(e){return e!=null}function ri(e){return e.y1}function li(e){return e!=null}function ai(e){return e.y2}function ci(e){return e!=null}function ui(e){return e.y2}function xi(e){return e!=null}function mi(e){return e.y2}function pi(e){return e!=null}function fi(e){return e.y1}function di(e){return e!=null}function hi(e){return e.y2}function yi(e){return e!=null}function gi(e){return e.y1}function vi(e){const t=n.compilerRuntimeExports.c(86),{data:v,graphTitle:B,sources:z,graphDescription:o,height:j,width:A,footNote:p,noOfXTicks:wt,dateFormat:Bt,showValues:zt,padding:Gt,lineColors:J,sameAxes:Rt,backgroundColor:ut,leftMargin:bt,rightMargin:Et,topMargin:s,bottomMargin:G,labels:C,rightLineNumberDisplayOptions:kt,leftLineNumberDisplayOptions:w,tooltip:R,highlightAreaSettings:xt,relativeHeight:Nt,onSeriesMouseOver:K,graphID:a,graphDownload:c,dataDownload:H,animate:P,strokeWidth:Ht,showDots:Pt,language:mt,showColorScale:d,minHeight:y,colorLegendTitle:Wt,theme:pt,ariaLabel:Q,noOfYTicks:Xt,maxDate:O,minDate:Lt,curveType:ft,styles:f,classNames:u,customLayers:dt,showAxisLabels:Ot,naLabel:Dt}=e,_=Bt===void 0?"yyyy":Bt,h=zt===void 0?!1:zt;let W;t[0]!==J?(W=J===void 0?[we.Colors.light.categoricalColors.colors[0],we.Colors.light.categoricalColors.colors[1]]:J,t[0]=J,t[1]=W):W=t[1];const D=W,r=Rt===void 0?!1:Rt,tt=ut===void 0?!1:ut,ht=bt===void 0?80:bt,x=Et===void 0?80:Et,l=s===void 0?20:s,Yt=G===void 0?25:G;let It;t[2]!==xt?(It=xt===void 0?[]:xt,t[2]=xt,t[3]=It):It=t[3];const yt=It,et=c===void 0?!1:c,X=H===void 0?!1:H,Y=P===void 0?!1:P,qt=Ht===void 0?2:Ht,it=Pt===void 0?!0:Pt,m=mt===void 0?"en":mt,I=d===void 0?!0:d,g=y===void 0?0:y,Mt=pt===void 0?"light":pt,gt=Xt===void 0?5:Xt,Zt=ft===void 0?"curve":ft;let St;t[4]!==dt?(St=dt===void 0?[]:dt,t[4]=dt,t[5]=St):St=t[5];const Tt=St,nt=Ot===void 0?!0:Ot,vt=Dt===void 0?"NA":Dt,[L,st]=N.useState(0),[q,Ct]=N.useState(0),ot=N.useRef(null),Vt=N.useRef(null);let rt,lt;t[6]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const Z=new ResizeObserver(jt=>{st(jt[0].target.clientWidth||620),Ct(jt[0].target.clientHeight||480)});return ot.current&&Z.observe(ot.current),()=>Z.disconnect()},lt=[],t[6]=rt,t[7]=lt):(rt=t[6],lt=t[7]),N.useEffect(rt,lt);const V=u?.graphContainer,$=f?.graphContainer;let b;t[8]!==u?.description||t[9]!==u?.title||t[10]!==v||t[11]!==X||t[12]!==o||t[13]!==et||t[14]!==B||t[15]!==f?.description||t[16]!==f?.title||t[17]!==A?(b=B||o||et||X?n.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:u?.title,description:u?.description},graphTitle:B,graphDescription:o,width:A,graphDownload:et?Vt:void 0,dataDownload:X?v.map(bi).filter(Ri).length>0?v.map(wi).filter(Ai):v.filter(ji):null}):null,t[8]=u?.description,t[9]=u?.title,t[10]=v,t[11]=X,t[12]=o,t[13]=et,t[14]=B,t[15]=f?.description,t[16]=f?.title,t[17]=A,t[18]=b):b=t[18];let M;t[19]!==u?.colorLegend||t[20]!==Wt||t[21]!==C||t[22]!==D||t[23]!==I?(M=I&&C.length>0?n.jsxRuntimeExports.jsx(Ve.ColorLegend,{colorDomain:C,colorLegendTitle:Wt,colors:D,showNAColor:!1,className:u?.colorLegend}):null,t[19]=u?.colorLegend,t[20]=Wt,t[21]=C,t[22]=D,t[23]=I,t[24]=M):M=t[24];let S;t[25]!==v.length?(S=v.length===0&&n.jsxRuntimeExports.jsx($e.EmptyState,{}),t[25]=v.length,t[26]=S):S=t[26];let F;t[27]!==Y||t[28]!==Yt||t[29]!==u||t[30]!==Zt||t[31]!==Tt||t[32]!==v||t[33]!==_||t[34]!==yt||t[35]!==C||t[36]!==w||t[37]!==ht||t[38]!==D||t[39]!==O||t[40]!==Lt||t[41]!==vt||t[42]!==wt||t[43]!==gt||t[44]!==K||t[45]!==kt||t[46]!==x||t[47]!==r||t[48]!==nt||t[49]!==it||t[50]!==h||t[51]!==qt||t[52]!==f||t[53]!==q||t[54]!==L||t[55]!==R||t[56]!==l?(F=L&&q&&v.length>0?n.jsxRuntimeExports.jsx(Ue,{data:v,sameAxes:r,lineColors:D,width:L,height:q,dateFormat:_,showValues:h,noOfXTicks:wt??Fe.getNoOfTicks(L),leftMargin:ht,rightMargin:x,topMargin:l,bottomMargin:Yt,labels:C,highlightAreaSettings:yt,tooltip:R,onSeriesMouseOver:K,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},strokeWidth:qt,showDots:it,noOfYTicks:gt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:kt,minDate:Lt,maxDate:O,curveType:Zt,styles:f,classNames:u,customLayers:Tt,showAxisLabels:nt,naLabel:vt}):null,t[27]=Y,t[28]=Yt,t[29]=u,t[30]=Zt,t[31]=Tt,t[32]=v,t[33]=_,t[34]=yt,t[35]=C,t[36]=w,t[37]=ht,t[38]=D,t[39]=O,t[40]=Lt,t[41]=vt,t[42]=wt,t[43]=gt,t[44]=K,t[45]=kt,t[46]=x,t[47]=r,t[48]=nt,t[49]=it,t[50]=h,t[51]=qt,t[52]=f,t[53]=q,t[54]=L,t[55]=R,t[56]=l,t[57]=F):F=t[57];let U;t[58]!==S||t[59]!==F?(U=n.jsxRuntimeExports.jsxs(Re.GraphArea,{ref:ot,children:[S,F]}),t[58]=S,t[59]=F,t[60]=U):U=t[60];let E;t[61]!==u?.footnote||t[62]!==u?.source||t[63]!==p||t[64]!==z||t[65]!==f?.footnote||t[66]!==f?.source||t[67]!==A?(E=z||p?n.jsxRuntimeExports.jsx(Te.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:z,footNote:p,width:A}):null,t[61]=u?.footnote,t[62]=u?.source,t[63]=p,t[64]=z,t[65]=f?.footnote,t[66]=f?.source,t[67]=A,t[68]=E):E=t[68];let at;return t[69]!==Q||t[70]!==tt||t[71]!==a||t[72]!==j||t[73]!==m||t[74]!==g||t[75]!==Gt||t[76]!==Nt||t[77]!==V||t[78]!==$||t[79]!==b||t[80]!==M||t[81]!==U||t[82]!==E||t[83]!==Mt||t[84]!==A?(at=n.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:V,style:$,id:a,ref:Vt,"aria-label":Q,backgroundColor:tt,theme:Mt,language:m,minHeight:g,width:A,height:j,relativeHeight:Nt,padding:Gt,children:[b,M,U,E]}),t[69]=Q,t[70]=tt,t[71]=a,t[72]=j,t[73]=m,t[74]=g,t[75]=Gt,t[76]=Nt,t[77]=V,t[78]=$,t[79]=b,t[80]=M,t[81]=U,t[82]=E,t[83]=Mt,t[84]=A,t[85]=at):at=t[85],at}function ji(e){return e!==void 0}function Ai(e){return e!==void 0}function wi(e){return e.data}function Ri(e){return e!==void 0}function bi(e){return e.data}exports.DualAxisLineChart=vi;
2
2
  //# sourceMappingURL=DualAxisLineChart.cjs.map