@undp/data-viz 2.4.1 → 2.5.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 (262) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.d.ts +11 -9
  4. package/dist/AreaChart.js +320 -322
  5. package/dist/AreaChart.js.map +1 -1
  6. package/dist/BarGraph.cjs +1 -1
  7. package/dist/BarGraph.cjs.map +1 -1
  8. package/dist/BarGraph.d.ts +15 -25
  9. package/dist/BarGraph.js +1694 -1694
  10. package/dist/BarGraph.js.map +1 -1
  11. package/dist/BasicStatCard.cjs +1 -1
  12. package/dist/BasicStatCard.cjs.map +1 -1
  13. package/dist/BasicStatCard.d.ts +13 -9
  14. package/dist/BasicStatCard.js +79 -81
  15. package/dist/BasicStatCard.js.map +1 -1
  16. package/dist/BeeSwarmChart.cjs +1 -1
  17. package/dist/BeeSwarmChart.cjs.map +1 -1
  18. package/dist/BeeSwarmChart.d.ts +11 -9
  19. package/dist/BeeSwarmChart.js +335 -336
  20. package/dist/BeeSwarmChart.js.map +1 -1
  21. package/dist/BiVariateChoroplethMap.cjs +1 -1
  22. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  23. package/dist/BiVariateChoroplethMap.d.ts +13 -3
  24. package/dist/BiVariateChoroplethMap.js +247 -245
  25. package/dist/BiVariateChoroplethMap.js.map +1 -1
  26. package/dist/BulletChart.cjs +1 -1
  27. package/dist/BulletChart.cjs.map +1 -1
  28. package/dist/BulletChart.d.ts +11 -5
  29. package/dist/BulletChart.js +560 -559
  30. package/dist/BulletChart.js.map +1 -1
  31. package/dist/ButterflyChart.cjs +1 -1
  32. package/dist/ButterflyChart.cjs.map +1 -1
  33. package/dist/ButterflyChart.d.ts +11 -9
  34. package/dist/ButterflyChart.js +348 -350
  35. package/dist/ButterflyChart.js.map +1 -1
  36. package/dist/ChoroplethMap.cjs +1 -1
  37. package/dist/ChoroplethMap.cjs.map +1 -1
  38. package/dist/ChoroplethMap.d.ts +11 -3
  39. package/dist/ChoroplethMap.js +213 -213
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.d.ts +11 -9
  43. package/dist/CirclePackingGraph.js +1 -1
  44. package/dist/DataCards.cjs +1 -1
  45. package/dist/DataCards.d.ts +1 -1
  46. package/dist/DataCards.js +1 -1
  47. package/dist/DataTable.cjs +1 -1
  48. package/dist/DataTable.cjs.map +1 -1
  49. package/dist/DataTable.d.ts +4 -5
  50. package/dist/DataTable.js +114 -116
  51. package/dist/DataTable.js.map +1 -1
  52. package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
  53. package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
  54. package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
  55. package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
  56. package/dist/DifferenceLineChart.cjs +1 -1
  57. package/dist/DifferenceLineChart.cjs.map +1 -1
  58. package/dist/DifferenceLineChart.d.ts +11 -9
  59. package/dist/DifferenceLineChart.js +502 -504
  60. package/dist/DifferenceLineChart.js.map +1 -1
  61. package/dist/DonutChart.cjs +1 -1
  62. package/dist/DonutChart.cjs.map +1 -1
  63. package/dist/DonutChart.d.ts +14 -9
  64. package/dist/DonutChart.js +174 -179
  65. package/dist/DonutChart.js.map +1 -1
  66. package/dist/DotDensityMap.cjs +1 -1
  67. package/dist/DotDensityMap.d.ts +1 -1
  68. package/dist/DotDensityMap.js +2 -2
  69. package/dist/DualAxisLineChart.cjs +1 -1
  70. package/dist/DualAxisLineChart.cjs.map +1 -1
  71. package/dist/DualAxisLineChart.d.ts +13 -9
  72. package/dist/DualAxisLineChart.js +341 -351
  73. package/dist/DualAxisLineChart.js.map +1 -1
  74. package/dist/DumbbellChart.cjs +1 -1
  75. package/dist/DumbbellChart.cjs.map +1 -1
  76. package/dist/DumbbellChart.d.ts +11 -9
  77. package/dist/DumbbellChart.js +592 -593
  78. package/dist/DumbbellChart.js.map +1 -1
  79. package/dist/GeoHubCompareMaps.cjs +1 -1
  80. package/dist/GeoHubCompareMaps.d.ts +1 -1
  81. package/dist/GeoHubCompareMaps.js +1 -1
  82. package/dist/GeoHubMap.cjs +1 -1
  83. package/dist/GeoHubMap.d.ts +1 -1
  84. package/dist/GeoHubMap.js +1 -1
  85. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  86. package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
  87. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  88. package/dist/GraphEl-B7x5ku_y.cjs +2 -0
  89. package/dist/GraphEl-B7x5ku_y.cjs.map +1 -0
  90. package/dist/GraphEl-B8tGXqWk.js +1829 -0
  91. package/dist/GraphEl-B8tGXqWk.js.map +1 -0
  92. package/dist/GriddedGraphs.cjs +1 -1
  93. package/dist/GriddedGraphs.d.ts +28 -16
  94. package/dist/GriddedGraphs.js +1 -1
  95. package/dist/GriddedGraphsFromConfig.d.ts +28 -16
  96. package/dist/HeatMap.cjs +1 -1
  97. package/dist/HeatMap.cjs.map +1 -1
  98. package/dist/HeatMap.d.ts +11 -9
  99. package/dist/HeatMap.js +203 -205
  100. package/dist/HeatMap.js.map +1 -1
  101. package/dist/Histogram.cjs +1 -1
  102. package/dist/Histogram.cjs.map +1 -1
  103. package/dist/Histogram.d.ts +11 -5
  104. package/dist/Histogram.js +88 -89
  105. package/dist/Histogram.js.map +1 -1
  106. package/dist/HybridMap.cjs +1 -1
  107. package/dist/HybridMap.cjs.map +1 -1
  108. package/dist/HybridMap.d.ts +11 -3
  109. package/dist/HybridMap.js +279 -279
  110. package/dist/HybridMap.js.map +1 -1
  111. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  112. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  113. package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
  114. package/dist/LineChartWithConfidenceInterval.js +393 -395
  115. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  116. package/dist/LinearColorLegend.cjs +1 -1
  117. package/dist/LinearColorLegend.js +1 -1
  118. package/dist/MultiGraphDashboard.d.ts +28 -16
  119. package/dist/MultiGraphDashboardFromConfig.d.ts +28 -16
  120. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
  121. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
  122. package/dist/MultiLineAltChart.cjs +1 -1
  123. package/dist/MultiLineAltChart.cjs.map +1 -1
  124. package/dist/MultiLineAltChart.d.ts +11 -9
  125. package/dist/MultiLineAltChart.js +411 -413
  126. package/dist/MultiLineAltChart.js.map +1 -1
  127. package/dist/MultiLineChart.cjs +1 -1
  128. package/dist/MultiLineChart.cjs.map +1 -1
  129. package/dist/MultiLineChart.d.ts +11 -9
  130. package/dist/MultiLineChart.js +438 -440
  131. package/dist/MultiLineChart.js.map +1 -1
  132. package/dist/ParetoChart.cjs +1 -1
  133. package/dist/ParetoChart.cjs.map +1 -1
  134. package/dist/ParetoChart.d.ts +13 -13
  135. package/dist/ParetoChart.js +347 -355
  136. package/dist/ParetoChart.js.map +1 -1
  137. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +28 -16
  138. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +28 -16
  139. package/dist/PerformanceIntensiveScrollStory.d.ts +28 -16
  140. package/dist/RadarChart.cjs +1 -1
  141. package/dist/RadarChart.cjs.map +1 -1
  142. package/dist/RadarChart.d.ts +11 -5
  143. package/dist/RadarChart.js +213 -213
  144. package/dist/RadarChart.js.map +1 -1
  145. package/dist/SankeyChart.cjs +1 -1
  146. package/dist/SankeyChart.cjs.map +1 -1
  147. package/dist/SankeyChart.d.ts +11 -9
  148. package/dist/SankeyChart.js +448 -450
  149. package/dist/SankeyChart.js.map +1 -1
  150. package/dist/ScatterPlot.cjs +1 -1
  151. package/dist/ScatterPlot.cjs.map +1 -1
  152. package/dist/ScatterPlot.d.ts +13 -13
  153. package/dist/ScatterPlot.js +490 -498
  154. package/dist/ScatterPlot.js.map +1 -1
  155. package/dist/ScrollStory.d.ts +28 -16
  156. package/dist/SimpleLineChart.cjs +1 -1
  157. package/dist/SimpleLineChart.cjs.map +1 -1
  158. package/dist/SimpleLineChart.d.ts +11 -9
  159. package/dist/SimpleLineChart.js +362 -364
  160. package/dist/SimpleLineChart.js.map +1 -1
  161. package/dist/SingleGraphDashboard.cjs +1 -1
  162. package/dist/SingleGraphDashboard.d.ts +28 -16
  163. package/dist/SingleGraphDashboard.js +1 -1
  164. package/dist/SingleGraphDashboardFromConfig.d.ts +28 -16
  165. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +28 -16
  166. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +28 -16
  167. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  168. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  169. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +28 -16
  170. package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
  171. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  172. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +28 -16
  173. package/dist/SlopeChart.cjs +1 -1
  174. package/dist/SlopeChart.d.ts +1 -1
  175. package/dist/SlopeChart.js +2 -2
  176. package/dist/SparkLine.cjs +1 -1
  177. package/dist/SparkLine.d.ts +1 -1
  178. package/dist/SparkLine.js +1 -1
  179. package/dist/StatCardFromData.cjs +1 -1
  180. package/dist/StatCardFromData.cjs.map +1 -1
  181. package/dist/StatCardFromData.d.ts +11 -9
  182. package/dist/StatCardFromData.js +113 -116
  183. package/dist/StatCardFromData.js.map +1 -1
  184. package/dist/StripChart.cjs +1 -1
  185. package/dist/StripChart.cjs.map +1 -1
  186. package/dist/StripChart.d.ts +11 -9
  187. package/dist/StripChart.js +434 -435
  188. package/dist/StripChart.js.map +1 -1
  189. package/dist/ThreeDGlobe.cjs +1 -1
  190. package/dist/ThreeDGlobe.cjs.map +1 -1
  191. package/dist/ThreeDGlobe.d.ts +11 -3
  192. package/dist/ThreeDGlobe.js +143 -143
  193. package/dist/ThreeDGlobe.js.map +1 -1
  194. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  195. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  196. package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
  197. package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
  198. package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
  199. package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
  200. package/dist/TreeMapGraph.cjs +1 -1
  201. package/dist/TreeMapGraph.cjs.map +1 -1
  202. package/dist/TreeMapGraph.d.ts +11 -9
  203. package/dist/TreeMapGraph.js +369 -371
  204. package/dist/TreeMapGraph.js.map +1 -1
  205. package/dist/Types.d.ts +28 -16
  206. package/dist/UnitChart.cjs +1 -1
  207. package/dist/UnitChart.cjs.map +1 -1
  208. package/dist/UnitChart.d.ts +11 -5
  209. package/dist/UnitChart.js +118 -119
  210. package/dist/UnitChart.js.map +1 -1
  211. package/dist/WaterfallChart.cjs +1 -1
  212. package/dist/WaterfallChart.cjs.map +1 -1
  213. package/dist/WaterfallChart.d.ts +11 -9
  214. package/dist/WaterfallChart.js +306 -308
  215. package/dist/WaterfallChart.js.map +1 -1
  216. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
  217. package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
  218. package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
  219. package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
  220. package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
  221. package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
  222. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
  223. package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
  224. package/dist/index-BPyj_6hG.js +375 -0
  225. package/dist/index-BPyj_6hG.js.map +1 -0
  226. package/dist/index-DuLvdHo2.cjs +2 -0
  227. package/dist/index-DuLvdHo2.cjs.map +1 -0
  228. package/dist/index.cjs +1 -1
  229. package/dist/index.d.ts +105 -245
  230. package/dist/index.js +2 -2
  231. package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
  232. package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
  233. package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
  234. package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
  235. package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
  236. package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
  237. package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
  238. package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
  239. package/dist/utils.cjs +1 -1
  240. package/dist/utils.d.ts +1 -1
  241. package/dist/utils.js +1 -1
  242. package/package.json +2 -2
  243. package/dist/GraphEl-B73N4RIA.js +0 -1906
  244. package/dist/GraphEl-B73N4RIA.js.map +0 -1
  245. package/dist/GraphEl-Lt1og0C-.cjs +0 -2
  246. package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
  247. package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
  248. package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
  249. package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
  250. package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
  251. package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
  252. package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
  253. package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
  254. package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
  255. package/dist/index-B0Awa_de.js +0 -377
  256. package/dist/index-B0Awa_de.js.map +0 -1
  257. package/dist/index-CP8cmNzt.cjs +0 -2
  258. package/dist/index-CP8cmNzt.cjs.map +0 -1
  259. package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
  260. package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
  261. package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
  262. package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
@@ -1,143 +1,144 @@
1
- import { c as re, j as s, m as ae } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { useRef as oe, useState as xt, useEffect as le } from "react";
3
- import { i as ce } from "./index-Bwrro8-q.js";
4
- import { n as ne } from "./numberFormattingFunction-DqMf_v1m.js";
5
- import { T as me } from "./Tooltip-Bj-s__cI.js";
6
- import { c as Ht } from "./checkIfNullOrUndefined-DmfiKkNw.js";
7
- import { Colors as vt } from "./Colors.js";
8
- import { A as ue } from "./AxisTitle-CyLCqpW6.js";
9
- import { A as fe } from "./Axis-CNZYWzH0.js";
10
- import { a as de } from "./ReferenceLine-D41VuUhE.js";
11
- import { Y as he } from "./YTicksAndGridLines-CsNSq9W9.js";
12
- import { X as pe } from "./XAxesLabels-B9gkjUiC.js";
13
- import { D as ge } from "./DetailsModal-B2XBWR7w.js";
14
- import { g as Gt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
15
- import { a as xe } from "./linear-DNXM5Pdl.js";
16
- import { b as ve } from "./band-DYty33LD.js";
17
- import { m as ie } from "./proxy-BsxtcZKa.js";
18
- import { u as be } from "./use-in-view-KOXq5Kmc.js";
19
- import { A as ye } from "./index-Cv_5q6Rb.js";
20
- import { ColorLegendWithMouseOver as we } from "./ColorLegendWithMouseOver.js";
21
- import { E as Ae } from "./EmptyState-CaxXCkiN.js";
22
- import { a as Me, G as Oe } from "./GraphContainer-B8ZqOzKI.js";
23
- import { GraphFooter as Ce } from "./GraphFooter.js";
24
- import { GraphHeader as $e } from "./GraphHeader.js";
25
- import { u as se } from "./uniqBy-BHy4I8PK.js";
26
- function Le(i) {
27
- let t = 0, n = 0, y = 0;
28
- for (const d of i)
29
- t += d || 0, t > n && (n = t), t < y && (y = t);
1
+ import { c as te, j as a, m as ie } from "./index-CHPV5EwG-BzibaIRc.js";
2
+ import { useRef as Jt, useState as vt, useEffect as oe } from "react";
3
+ import { i as ne } from "./index-Bwrro8-q.js";
4
+ import { n as Qt } from "./numberFormattingFunction-BUUV_luR.js";
5
+ import { T as se } from "./Tooltip-3EYDVa3w.js";
6
+ import { c as Bt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
7
+ import { Colors as bt } from "./Colors.js";
8
+ import { A as re } from "./AxisTitle-CyLCqpW6.js";
9
+ import { A as ae } from "./Axis-CNZYWzH0.js";
10
+ import { a as le } from "./ReferenceLine-D41VuUhE.js";
11
+ import { Y as ce } from "./YTicksAndGridLines-BbujwxOB.js";
12
+ import { X as me } from "./XAxesLabels-B9gkjUiC.js";
13
+ import { D as ue } from "./DetailsModal-GqEbGHY2.js";
14
+ import { g as zt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
15
+ import { a as fe } from "./linear-DNXM5Pdl.js";
16
+ import { b as de } from "./band-DYty33LD.js";
17
+ import { m as Ut } from "./proxy-BsxtcZKa.js";
18
+ import { u as pe } from "./use-in-view-KOXq5Kmc.js";
19
+ import { A as he } from "./index-Cv_5q6Rb.js";
20
+ import { ColorLegendWithMouseOver as ge } from "./ColorLegendWithMouseOver.js";
21
+ import { E as xe } from "./EmptyState-CaxXCkiN.js";
22
+ import { a as ve, G as be } from "./GraphContainer-B8ZqOzKI.js";
23
+ import { GraphFooter as ye } from "./GraphFooter.js";
24
+ import { GraphHeader as we } from "./GraphHeader.js";
25
+ import { u as _t } from "./uniqBy-BHy4I8PK.js";
26
+ function Ae(i) {
27
+ let t = 0, o = 0, w = 0;
28
+ for (const g of i)
29
+ t += g || 0, t > o && (o = t), t < w && (w = t);
30
30
  return {
31
- max: n,
32
- min: y
31
+ max: o,
32
+ min: w
33
33
  };
34
34
  }
35
- function je(i) {
36
- const t = re.c(46), {
37
- leftMargin: n,
38
- rightMargin: y,
39
- topMargin: d,
40
- bottomMargin: Yt,
41
- data: h,
42
- width: bt,
43
- height: P,
44
- barColor: p,
45
- suffix: yt,
46
- prefix: wt,
47
- barPadding: Jt,
48
- showLabels: Rt,
49
- showValues: u,
50
- showTicks: it,
51
- colorDomain: g,
52
- truncateBy: At,
53
- tooltip: E,
54
- onSeriesMouseOver: Mt,
55
- refValues: Xt,
56
- selectedColor: W,
57
- maxValue: Ot,
58
- minValue: Ct,
59
- highlightedDataPoints: G,
60
- onSeriesMouseClick: $t,
61
- labelOrder: x,
62
- maxBarThickness: Lt,
63
- minBarThickness: jt,
64
- detailsOnClick: D,
65
- barAxisTitle: ot,
66
- noOfTicks: Ft,
67
- styles: f,
68
- classNames: c,
69
- dimmedOpacity: C,
35
+ function Oe(i) {
36
+ const t = te.c(46), {
37
+ leftMargin: o,
38
+ rightMargin: w,
39
+ topMargin: g,
40
+ bottomMargin: tt,
41
+ data: x,
42
+ width: yt,
43
+ height: wt,
44
+ barColor: v,
45
+ suffix: At,
46
+ prefix: et,
47
+ barPadding: d,
48
+ showLabels: Ot,
49
+ showValues: H,
50
+ showTicks: Mt,
51
+ colorDomain: D,
52
+ truncateBy: Ct,
53
+ tooltip: it,
54
+ onSeriesMouseOver: $t,
55
+ refValues: Lt,
56
+ selectedColor: Y,
57
+ maxValue: jt,
58
+ minValue: Pt,
59
+ highlightedDataPoints: R,
60
+ onSeriesMouseClick: ot,
61
+ labelOrder: y,
62
+ maxBarThickness: Dt,
63
+ minBarThickness: Et,
64
+ detailsOnClick: T,
65
+ barAxisTitle: X,
66
+ noOfTicks: Wt,
67
+ styles: p,
68
+ classNames: u,
69
+ dimmedOpacity: V,
70
70
  animate: m,
71
71
  precision: kt,
72
- customLayers: $,
73
- naLabel: Kt,
74
- hideAxisLine: Qt,
75
- locale: Dt
76
- } = i, L = n === void 0 ? 20 : n, nt = y === void 0 ? 20 : y, H = d === void 0 ? 20 : d, st = Yt === void 0 ? 25 : Yt, Nt = oe(null);
77
- let Y;
78
- t[0] !== m.amount || t[1] !== m.once ? (Y = {
72
+ customLayers: I,
73
+ naLabel: Ft,
74
+ hideAxisLine: Zt,
75
+ locale: nt,
76
+ padZeros: F
77
+ } = i, A = o === void 0 ? 20 : o, st = w === void 0 ? 20 : w, rt = g === void 0 ? 20 : g, at = tt === void 0 ? 25 : tt, Gt = Jt(null);
78
+ let l;
79
+ t[0] !== m.amount || t[1] !== m.once ? (l = {
79
80
  once: m.once,
80
81
  amount: m.amount
81
- }, t[0] = m.amount, t[1] = m.once, t[2] = Y) : Y = t[2];
82
- const N = be(Nt, Y), Tt = ot ? L + 30 : L;
83
- let a;
84
- t[3] !== st || t[4] !== nt || t[5] !== Tt || t[6] !== H ? (a = {
85
- top: H,
86
- bottom: st,
87
- left: Tt,
88
- right: nt
89
- }, t[3] = st, t[4] = nt, t[5] = Tt, t[6] = H, t[7] = a) : a = t[7];
90
- const o = a, {
91
- max: Zt,
92
- min: _t
93
- } = Le(h.map(Ge)), qt = Ht(Ot) ? Zt : Ot, v = Ht(Ct) ? _t : Ct, [T, Vt] = xt(void 0), [R, X] = xt(void 0), [F, rt] = xt(void 0), [q, at] = xt(void 0), j = bt - o.left - o.right, It = P - o.top - o.bottom;
94
- let U;
95
- if (t[8] !== h || t[9] !== x) {
96
- const e = /* @__PURE__ */ new Set(), k = h.map((O, et) => {
97
- const B = x ? `${O.label}` : `${et}`;
98
- return e.add(B), {
99
- ...O,
100
- id: B
82
+ }, t[0] = m.amount, t[1] = m.once, t[2] = l) : l = t[2];
83
+ const s = pe(Gt, l), Nt = X ? A + 30 : A;
84
+ let lt;
85
+ t[3] !== at || t[4] !== st || t[5] !== Nt || t[6] !== rt ? (lt = {
86
+ top: rt,
87
+ bottom: at,
88
+ left: Nt,
89
+ right: st
90
+ }, t[3] = at, t[4] = st, t[5] = Nt, t[6] = rt, t[7] = lt) : lt = t[7];
91
+ const b = lt, {
92
+ max: Tt,
93
+ min: qt
94
+ } = Ae(x.map(ze)), Ht = Bt(jt) ? Tt : jt, r = Bt(Pt) ? qt : Pt, [Z, ct] = vt(void 0), [S, z] = vt(void 0), [q, mt] = vt(void 0), [U, J] = vt(void 0), O = yt - b.left - b.right, k = wt - b.top - b.bottom;
95
+ let K;
96
+ if (t[8] !== x || t[9] !== y) {
97
+ const e = /* @__PURE__ */ new Set(), j = x.map((G, ee) => {
98
+ const Kt = y ? `${G.label}` : `${ee}`;
99
+ return e.add(Kt), {
100
+ ...G,
101
+ id: Kt
101
102
  };
102
- }), M = x ? x.filter((O) => !e.has(O)) : [];
103
- U = [...k, ...M.map(We)], t[8] = h, t[9] = x, t[10] = U;
103
+ }), c = y ? y.filter((G) => !e.has(G)) : [];
104
+ K = [...j, ...c.map(Se)], t[8] = x, t[9] = y, t[10] = K;
104
105
  } else
105
- U = t[10];
106
- const J = U;
107
- let K;
108
- t[11] !== J || t[12] !== x ? (K = x ?? J.map(Ee), t[11] = J, t[12] = x, t[13] = K) : K = t[13];
109
- const Q = K, r = xe().domain([v, qt]).range([It, 0]).nice(), l = ve().domain(Q).range([0, jt ? Math.max(j, jt * Q.length) : Lt ? Math.min(j, Lt * Q.length) : j]).paddingInner(Jt), St = r.ticks(Ft);
110
- let Z = 0;
111
- const w = J.map((e) => {
112
- const k = Z;
113
- return Z = Z + (e.size || 0), {
106
+ K = t[10];
107
+ const Q = K;
108
+ let h;
109
+ t[11] !== Q || t[12] !== y ? (h = y ?? Q.map(Ie), t[11] = Q, t[12] = y, t[13] = h) : h = t[13];
110
+ const ut = h, n = fe().domain([r, Ht]).range([k, 0]).nice(), f = de().domain(ut).range([0, Et ? Math.max(O, Et * ut.length) : Dt ? Math.min(O, Dt * ut.length) : O]).paddingInner(d), Vt = n.ticks(Wt);
111
+ let B = 0;
112
+ const Yt = Q.map((e) => {
113
+ const j = B;
114
+ return B = B + (e.size || 0), {
114
115
  ...e,
115
- start: k,
116
- end: Z
116
+ start: j,
117
+ end: B
117
118
  };
118
- }), lt = c?.xAxis?.axis, A = c?.yAxis?.labels;
119
- let V;
120
- t[14] !== A || t[15] !== lt ? (V = {
121
- axis: lt,
122
- label: A
123
- }, t[14] = A, t[15] = lt, t[16] = V) : V = t[16];
124
- const ct = f?.xAxis?.axis, mt = f?.yAxis?.labels;
125
- let I;
126
- t[17] !== ct || t[18] !== mt ? (I = {
127
- axis: ct,
128
- label: mt
129
- }, t[17] = ct, t[18] = mt, t[19] = I) : I = t[19];
130
- const ut = 0 - L - 15, ft = It / 2, dt = f?.yAxis?.title, ht = c?.yAxis?.title;
131
- let S;
132
- t[20] !== ot || t[21] !== ut || t[22] !== ft || t[23] !== dt || t[24] !== ht ? (S = /* @__PURE__ */ s.jsx(ue, { x: ut, y: ft, style: dt, className: ht, text: ot, rotate90: !0 }), t[20] = ot, t[21] = ut, t[22] = ft, t[23] = dt, t[24] = ht, t[25] = S) : S = t[25];
133
- let zt;
134
- t[26] !== $ ? (zt = $.filter(ze).map(Se), t[26] = $, t[27] = zt) : zt = t[27];
135
- const _ = ye, Ut = w.map((e, k) => Ht(l(e.id)) ? null : /* @__PURE__ */ s.jsxs(ie.g, { className: "undp-viz-g-with-hover", initial: "initial", animate: N ? "whileInView" : "initial", variants: {
119
+ }), ft = u?.xAxis?.axis, dt = u?.yAxis?.labels;
120
+ let P;
121
+ t[14] !== dt || t[15] !== ft ? (P = {
122
+ axis: ft,
123
+ label: dt
124
+ }, t[14] = dt, t[15] = ft, t[16] = P) : P = t[16];
125
+ const Rt = p?.xAxis?.axis, _ = p?.yAxis?.labels;
126
+ let It;
127
+ t[17] !== Rt || t[18] !== _ ? (It = {
128
+ axis: Rt,
129
+ label: _
130
+ }, t[17] = Rt, t[18] = _, t[19] = It) : It = t[19];
131
+ const pt = 0 - A - 15, Xt = k / 2, ht = p?.yAxis?.title, St = u?.yAxis?.title;
132
+ let E;
133
+ t[20] !== X || t[21] !== pt || t[22] !== Xt || t[23] !== ht || t[24] !== St ? (E = /* @__PURE__ */ a.jsx(re, { x: pt, y: Xt, style: ht, className: St, text: X, rotate90: !0 }), t[20] = X, t[21] = pt, t[22] = Xt, t[23] = ht, t[24] = St, t[25] = E) : E = t[25];
134
+ let W;
135
+ t[26] !== I ? (W = I.filter(Ne).map(ke), t[26] = I, t[27] = W) : W = t[27];
136
+ const gt = he, xt = Yt.map((e, j) => Bt(f(e.id)) ? null : /* @__PURE__ */ a.jsxs(Ut.g, { className: "undp-viz-g-with-hover", initial: "initial", animate: s ? "whileInView" : "initial", variants: {
136
137
  initial: {
137
- opacity: W ? e.color && p[g.indexOf(e.color)] === W ? 1 : C : G ? G.indexOf(e.label) !== -1 ? 0.85 : C : 0.85
138
+ opacity: Y ? e.color && v[D.indexOf(e.color)] === Y ? 1 : V : R ? R.indexOf(e.label) !== -1 ? 0.85 : V : 0.85
138
139
  },
139
140
  whileInView: {
140
- opacity: W ? e.color && p[g.indexOf(e.color)] === W ? 1 : C : G ? G.indexOf(e.label) !== -1 ? 0.85 : C : 0.85,
141
+ opacity: Y ? e.color && v[D.indexOf(e.color)] === Y ? 1 : V : R ? R.indexOf(e.label) !== -1 ? 0.85 : V : 0.85,
141
142
  transition: {
142
143
  duration: m.duration
143
144
  }
@@ -147,133 +148,133 @@ function je(i) {
147
148
  transition: {
148
149
  duration: m.duration
149
150
  }
150
- }, onMouseEnter: (M) => {
151
- Vt(e), at(M.clientY), rt(M.clientX), Mt?.(e);
151
+ }, onMouseEnter: (c) => {
152
+ ct(e), J(c.clientY), mt(c.clientX), $t?.(e);
152
153
  }, onClick: () => {
153
- ($t || D) && (ce(R, e) ? (X(void 0), $t?.(void 0)) : (X(e), $t?.(e)));
154
- }, onMouseMove: (M) => {
155
- Vt(e), at(M.clientY), rt(M.clientX);
154
+ (ot || T) && (ne(S, e) ? (z(void 0), ot?.(void 0)) : (z(e), ot?.(e)));
155
+ }, onMouseMove: (c) => {
156
+ ct(e), J(c.clientY), mt(c.clientX);
156
157
  }, onMouseLeave: () => {
157
- Vt(void 0), rt(void 0), at(void 0), Mt?.(void 0);
158
+ ct(void 0), mt(void 0), J(void 0), $t?.(void 0);
158
159
  }, children: [
159
- e.size ? /* @__PURE__ */ s.jsx(ie.rect, { width: l.bandwidth(), initial: "initial", animate: N ? "whileInView" : "initial", variants: {
160
+ e.size ? /* @__PURE__ */ a.jsx(Ut.rect, { width: f.bandwidth(), initial: "initial", animate: s ? "whileInView" : "initial", variants: {
160
161
  initial: {
161
162
  height: 0,
162
- x: l(`${e.id}`),
163
- y: r(e.start),
164
- fill: h.filter(Ie).length === 0 ? p[0] : e.color ? p[g.indexOf(e.color)] : vt.gray
163
+ x: f(`${e.id}`),
164
+ y: n(e.start),
165
+ fill: x.filter(De).length === 0 ? v[0] : e.color ? v[D.indexOf(e.color)] : bt.gray
165
166
  },
166
167
  whileInView: {
167
- height: Math.abs(r(e.start) - r(e.end)),
168
- y: r(Math.max(e.start, e.end)),
169
- x: l(`${e.id}`),
170
- fill: h.filter(Ve).length === 0 ? p[0] : e.color ? p[g.indexOf(e.color)] : vt.gray,
168
+ height: Math.abs(n(e.start) - n(e.end)),
169
+ y: n(Math.max(e.start, e.end)),
170
+ x: f(`${e.id}`),
171
+ fill: x.filter(je).length === 0 ? v[0] : e.color ? v[D.indexOf(e.color)] : bt.gray,
171
172
  transition: {
172
173
  duration: m.duration
173
174
  }
174
175
  }
175
176
  }, exit: {
176
177
  height: 0,
177
- y: r(e.start),
178
+ y: n(e.start),
178
179
  transition: {
179
180
  duration: m.duration
180
181
  }
181
182
  } }) : null,
182
- Rt ? /* @__PURE__ */ s.jsx(pe, { value: `${e.label}`.length < At ? `${e.label}` : `${`${e.label}`.substring(0, At)}...`, y: r(0) + 5, x: l(`${e.id}`), width: l.bandwidth(), height: o.bottom, style: f?.xAxis?.labels, className: c?.xAxis?.labels, alignment: "top", animate: m, isInView: N }) : null,
183
- u && Math.abs(r(e.start) - r(e.end)) > 16 ? /* @__PURE__ */ s.jsx(ie.text, { style: {
183
+ Ot ? /* @__PURE__ */ a.jsx(me, { value: `${e.label}`.length < Ct ? `${e.label}` : `${`${e.label}`.substring(0, Ct)}...`, y: n(0) + 5, x: f(`${e.id}`), width: f.bandwidth(), height: b.bottom, style: p?.xAxis?.labels, className: u?.xAxis?.labels, alignment: "top", animate: m, isInView: s }) : null,
184
+ H && Math.abs(n(e.start) - n(e.end)) > 16 ? /* @__PURE__ */ a.jsx(Ut.text, { style: {
184
185
  textAnchor: "middle",
185
- ...f?.graphObjectValues || {}
186
- }, className: ae("graph-value text-sm", c?.graphObjectValues), dy: "0.33em", variants: {
186
+ ...p?.graphObjectValues || {}
187
+ }, className: ie("graph-value text-sm", u?.graphObjectValues), dy: "0.33em", variants: {
187
188
  initial: {
188
- x: l(`${e.id}`) + l.bandwidth() / 2,
189
- y: (r(e.start) + r(e.end)) / 2,
189
+ x: f(`${e.id}`) + f.bandwidth() / 2,
190
+ y: (n(e.start) + n(e.end)) / 2,
190
191
  opacity: 0,
191
- fill: h.filter(Te).length === 0 ? Gt(p[0]) : e.color ? Gt(p[g.indexOf(e.color)]) : Gt(vt.gray)
192
+ fill: x.filter(Le).length === 0 ? zt(v[0]) : e.color ? zt(v[D.indexOf(e.color)]) : zt(bt.gray)
192
193
  },
193
194
  whileInView: {
194
- x: l(`${e.id}`) + l.bandwidth() / 2,
195
- y: (r(e.start) + r(e.end)) / 2,
196
- fill: h.filter(Ne).length === 0 ? Gt(p[0]) : e.color ? Gt(p[g.indexOf(e.color)]) : Gt(vt.gray),
195
+ x: f(`${e.id}`) + f.bandwidth() / 2,
196
+ y: (n(e.start) + n(e.end)) / 2,
197
+ fill: x.filter($e).length === 0 ? zt(v[0]) : e.color ? zt(v[D.indexOf(e.color)]) : zt(bt.gray),
197
198
  opacity: 1,
198
199
  transition: {
199
200
  duration: m.duration
200
201
  }
201
202
  }
202
- }, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
203
+ }, initial: "initial", animate: s ? "whileInView" : "initial", exit: {
203
204
  opacity: 0,
204
205
  transition: {
205
206
  duration: m.duration
206
207
  }
207
- }, children: ne(e.size ? Math.abs(e.size) : e.size, Kt, kt, wt, yt, Dt) }) : null
208
- ] }, e.label)), pt = Xt ? /* @__PURE__ */ s.jsx(s.Fragment, { children: Xt.map((e, k) => /* @__PURE__ */ s.jsx(de, { text: e.text, color: e.color, y: r(e.value), x1: 0 - L, x2: j + o.right, classNames: e.classNames, styles: e.styles, animate: m, isInView: N }, k)) }) : null;
209
- let Bt;
210
- t[28] !== _ || t[29] !== Ut || t[30] !== pt ? (Bt = /* @__PURE__ */ s.jsxs(_, { children: [
211
- Ut,
212
- pt
213
- ] }), t[28] = _, t[29] = Ut, t[30] = pt, t[31] = Bt) : Bt = t[31];
214
- let tt;
215
- t[32] !== $ ? (tt = $.filter(De).map(ke), t[32] = $, t[33] = tt) : tt = t[33];
216
- let gt;
217
- t[34] !== c?.tooltip || t[35] !== F || t[36] !== q || t[37] !== T || t[38] !== f?.tooltip || t[39] !== E ? (gt = T && E && F && q ? /* @__PURE__ */ s.jsx(me, { data: T, body: E, xPos: F, yPos: q, backgroundStyle: f?.tooltip, className: c?.tooltip }) : null, t[34] = c?.tooltip, t[35] = F, t[36] = q, t[37] = T, t[38] = f?.tooltip, t[39] = E, t[40] = gt) : gt = t[40];
218
- let z;
219
- return t[41] !== c?.modal || t[42] !== D || t[43] !== R || t[44] !== X ? (z = D && R !== void 0 ? /* @__PURE__ */ s.jsx(ge, { body: D, data: R, setData: X, className: c?.modal }) : null, t[41] = c?.modal, t[42] = D, t[43] = R, t[44] = X, t[45] = z) : z = t[45], /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
220
- /* @__PURE__ */ s.jsx(ie.svg, { ref: Nt, width: `${bt}px`, height: `${P}px`, viewBox: `0 0 ${bt} ${P}`, direction: "ltr", children: /* @__PURE__ */ s.jsxs("g", { transform: `translate(${o.left},${o.top})`, children: [
221
- /* @__PURE__ */ s.jsx(fe, { y1: r(v < 0 ? 0 : v), y2: r(v < 0 ? 0 : v), x1: 0 - L, x2: j + o.right, hideAxisLine: Qt, label: it ? ne(v < 0 ? 0 : v, void 0, kt, wt, yt, Dt) : void 0, labelPos: {
222
- x: 0 - L,
208
+ }, children: Qt(e.size ? Math.abs(e.size) : e.size, Ft, kt, et, At, nt, F) }) : null
209
+ ] }, e.label)), N = Lt ? /* @__PURE__ */ a.jsx(a.Fragment, { children: Lt.map((e, j) => /* @__PURE__ */ a.jsx(le, { text: e.text, color: e.color, y: n(e.value), x1: 0 - A, x2: O + b.right, classNames: e.classNames, styles: e.styles, animate: m, isInView: s }, j)) }) : null;
210
+ let M;
211
+ t[28] !== gt || t[29] !== xt || t[30] !== N ? (M = /* @__PURE__ */ a.jsxs(gt, { children: [
212
+ xt,
213
+ N
214
+ ] }), t[28] = gt, t[29] = xt, t[30] = N, t[31] = M) : M = t[31];
215
+ let C;
216
+ t[32] !== I ? (C = I.filter(Ce).map(Me), t[32] = I, t[33] = C) : C = t[33];
217
+ let $;
218
+ t[34] !== u?.tooltip || t[35] !== q || t[36] !== U || t[37] !== Z || t[38] !== p?.tooltip || t[39] !== it ? ($ = Z && it && q && U ? /* @__PURE__ */ a.jsx(se, { data: Z, body: it, xPos: q, yPos: U, backgroundStyle: p?.tooltip, className: u?.tooltip }) : null, t[34] = u?.tooltip, t[35] = q, t[36] = U, t[37] = Z, t[38] = p?.tooltip, t[39] = it, t[40] = $) : $ = t[40];
219
+ let L;
220
+ return t[41] !== u?.modal || t[42] !== T || t[43] !== S || t[44] !== z ? (L = T && S !== void 0 ? /* @__PURE__ */ a.jsx(ue, { body: T, data: S, setData: z, className: u?.modal }) : null, t[41] = u?.modal, t[42] = T, t[43] = S, t[44] = z, t[45] = L) : L = t[45], /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
221
+ /* @__PURE__ */ a.jsx(Ut.svg, { ref: Gt, width: `${yt}px`, height: `${wt}px`, viewBox: `0 0 ${yt} ${wt}`, direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { transform: `translate(${b.left},${b.top})`, children: [
222
+ /* @__PURE__ */ a.jsx(ae, { y1: n(r < 0 ? 0 : r), y2: n(r < 0 ? 0 : r), x1: 0 - A, x2: O + b.right, hideAxisLine: Zt, label: Mt ? Qt(r < 0 ? 0 : r, void 0, kt, et, At, nt, F) : void 0, labelPos: {
223
+ x: 0 - A,
223
224
  dx: 0,
224
- dy: qt < 0 ? "1em" : -5,
225
- y: r(v < 0 ? 0 : v)
226
- }, classNames: V, styles: I }),
227
- it ? /* @__PURE__ */ s.jsx(he, { values: St.filter(Pe), y: St.filter(Be).map((e) => r(e)), x1: 0 - L, x2: j + o.right, styles: {
228
- gridLines: f?.yAxis?.gridLines,
229
- labels: f?.yAxis?.labels
225
+ dy: Ht < 0 ? "1em" : -5,
226
+ y: n(r < 0 ? 0 : r)
227
+ }, classNames: P, styles: It }),
228
+ Mt ? /* @__PURE__ */ a.jsx(ce, { values: Vt.filter(Ve), y: Vt.filter(Te).map((e) => n(e)), x1: 0 - A, x2: O + b.right, styles: {
229
+ gridLines: p?.yAxis?.gridLines,
230
+ labels: p?.yAxis?.labels
230
231
  }, classNames: {
231
- gridLines: c?.yAxis?.gridLines,
232
- labels: c?.yAxis?.labels
233
- }, suffix: yt, prefix: wt, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: kt, locale: Dt }) : null,
234
- S,
235
- zt,
236
- Bt,
237
- tt
232
+ gridLines: u?.yAxis?.gridLines,
233
+ labels: u?.yAxis?.labels
234
+ }, suffix: At, prefix: et, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: kt, locale: nt, padZeros: F }) : null,
235
+ E,
236
+ W,
237
+ M,
238
+ C
238
239
  ] }) }),
239
- gt,
240
- z
240
+ $,
241
+ L
241
242
  ] });
242
243
  }
243
- function ke(i) {
244
+ function Me(i) {
244
245
  return i.layer;
245
246
  }
246
- function De(i) {
247
+ function Ce(i) {
247
248
  return i.position === "after";
248
249
  }
249
- function Ne(i) {
250
+ function $e(i) {
250
251
  return i.color;
251
252
  }
252
- function Te(i) {
253
+ function Le(i) {
253
254
  return i.color;
254
255
  }
255
- function Ve(i) {
256
+ function je(i) {
256
257
  return i.color;
257
258
  }
258
- function Ie(i) {
259
+ function De(i) {
259
260
  return i.color;
260
261
  }
261
- function Se(i) {
262
+ function ke(i) {
262
263
  return i.layer;
263
264
  }
264
- function ze(i) {
265
+ function Ne(i) {
265
266
  return i.position === "before";
266
267
  }
267
- function Be(i) {
268
+ function Te(i) {
268
269
  return i !== 0;
269
270
  }
270
- function Pe(i) {
271
+ function Ve(i) {
271
272
  return i !== 0;
272
273
  }
273
- function Ee(i) {
274
+ function Ie(i) {
274
275
  return `${i.id}`;
275
276
  }
276
- function We(i) {
277
+ function Se(i) {
277
278
  return {
278
279
  id: i,
279
280
  label: i,
@@ -281,148 +282,145 @@ function We(i) {
281
282
  size: null
282
283
  };
283
284
  }
284
- function Ge(i) {
285
+ function ze(i) {
285
286
  return i.size;
286
287
  }
287
- function wi(i) {
288
- const t = re.c(100), {
289
- data: n,
290
- graphTitle: y,
291
- colors: d,
292
- suffix: Yt,
293
- sources: h,
294
- prefix: bt,
295
- graphDescription: P,
296
- barPadding: p,
297
- showValues: yt,
298
- showTicks: wt,
299
- truncateBy: Jt,
300
- height: Rt,
301
- width: u,
302
- footNote: it,
303
- colorDomain: g,
304
- colorLegendTitle: At,
305
- highlightedDataPoints: E,
306
- padding: Mt,
307
- backgroundColor: Xt,
308
- topMargin: W,
309
- bottomMargin: Ot,
310
- leftMargin: Ct,
311
- rightMargin: G,
312
- showLabels: $t,
313
- relativeHeight: x,
314
- tooltip: Lt,
315
- onSeriesMouseOver: jt,
316
- refValues: D,
317
- showColorScale: ot,
318
- graphID: Ft,
319
- maxValue: f,
320
- minValue: c,
321
- onSeriesMouseClick: C,
322
- graphDownload: m,
323
- dataDownload: kt,
324
- labelOrder: $,
325
- language: Kt,
326
- showNAColor: Qt,
327
- minHeight: Dt,
328
- theme: L,
288
+ function gi(i) {
289
+ const t = te.c(101), {
290
+ data: o,
291
+ graphTitle: w,
292
+ colors: g,
293
+ sources: tt,
294
+ graphDescription: x,
295
+ barPadding: yt,
296
+ showValues: wt,
297
+ showTicks: v,
298
+ truncateBy: At,
299
+ height: et,
300
+ width: d,
301
+ footNote: Ot,
302
+ colorDomain: H,
303
+ colorLegendTitle: Mt,
304
+ highlightedDataPoints: D,
305
+ padding: Ct,
306
+ backgroundColor: it,
307
+ topMargin: $t,
308
+ bottomMargin: Lt,
309
+ leftMargin: Y,
310
+ rightMargin: jt,
311
+ showLabels: Pt,
312
+ relativeHeight: R,
313
+ tooltip: ot,
314
+ onSeriesMouseOver: y,
315
+ refValues: Dt,
316
+ showColorScale: Et,
317
+ graphID: T,
318
+ maxValue: X,
319
+ minValue: Wt,
320
+ onSeriesMouseClick: p,
321
+ graphDownload: u,
322
+ dataDownload: V,
323
+ labelOrder: m,
324
+ language: kt,
325
+ showNAColor: I,
326
+ minHeight: Ft,
327
+ theme: Zt,
329
328
  maxBarThickness: nt,
330
- maxNumberOfBars: H,
331
- minBarThickness: st,
332
- ariaLabel: Nt,
333
- detailsOnClick: Y,
334
- barAxisTitle: N,
335
- noOfTicks: Tt,
336
- styles: a,
337
- classNames: o,
338
- filterNA: Zt,
339
- animate: _t,
340
- dimmedOpacity: qt,
341
- precision: v,
342
- customLayers: T,
343
- naLabel: Vt,
344
- hideAxisLine: R,
345
- locale: X
346
- } = i, F = Yt === void 0 ? "" : Yt, rt = bt === void 0 ? "" : bt, q = p === void 0 ? 0.25 : p, at = yt === void 0 ? !0 : yt, j = wt === void 0 ? !0 : wt, It = Jt === void 0 ? 999 : Jt, U = Xt === void 0 ? !1 : Xt, J = $t === void 0 ? !0 : $t, K = ot === void 0 ? !0 : ot, Q = m === void 0 ? !1 : m, r = kt === void 0 ? !1 : kt, l = Kt === void 0 ? "en" : Kt, St = Qt === void 0 ? !0 : Qt, Z = Dt === void 0 ? 0 : Dt, w = L === void 0 ? "light" : L, lt = Tt === void 0 ? 5 : Tt, A = Zt === void 0 ? !0 : Zt, V = _t === void 0 ? !1 : _t, ct = qt === void 0 ? 0.3 : qt, mt = v === void 0 ? 2 : v;
347
- let I;
348
- t[0] !== T ? (I = T === void 0 ? [] : T, t[0] = T, t[1] = I) : I = t[1];
349
- const ut = I, ft = Vt === void 0 ? "NA" : Vt, dt = R === void 0 ? !1 : R, ht = X === void 0 ? "en" : X, [S, zt] = xt(0), [_, Ut] = xt(0), [pt, Bt] = xt(void 0), tt = oe(null), gt = oe(null);
350
- let z, e;
351
- t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => {
352
- const b = new ResizeObserver((ee) => {
353
- zt(ee[0].target.clientWidth || 620), Ut(ee[0].target.clientHeight || 480);
329
+ maxNumberOfBars: F,
330
+ minBarThickness: A,
331
+ ariaLabel: st,
332
+ detailsOnClick: rt,
333
+ barAxisTitle: at,
334
+ noOfTicks: Gt,
335
+ styles: l,
336
+ classNames: s,
337
+ filterNA: Nt,
338
+ animate: lt,
339
+ dimmedOpacity: b,
340
+ customLayers: Tt,
341
+ naLabel: qt,
342
+ hideAxisLine: Ht,
343
+ numberDisplayOptions: r
344
+ } = i, Z = yt === void 0 ? 0.25 : yt, ct = wt === void 0 ? !0 : wt, S = v === void 0 ? !0 : v, z = At === void 0 ? 999 : At, q = it === void 0 ? !1 : it, mt = Pt === void 0 ? !0 : Pt, U = Et === void 0 ? !0 : Et, J = u === void 0 ? !1 : u, O = V === void 0 ? !1 : V, k = kt === void 0 ? "en" : kt, K = I === void 0 ? !0 : I, Q = Ft === void 0 ? 0 : Ft, h = Zt === void 0 ? "light" : Zt, ut = Gt === void 0 ? 5 : Gt, n = Nt === void 0 ? !0 : Nt, f = lt === void 0 ? !1 : lt, Vt = b === void 0 ? 0.3 : b;
345
+ let B;
346
+ t[0] !== Tt ? (B = Tt === void 0 ? [] : Tt, t[0] = Tt, t[1] = B) : B = t[1];
347
+ const Yt = B, ft = qt === void 0 ? "NA" : qt, dt = Ht === void 0 ? !1 : Ht, [P, Rt] = vt(0), [_, It] = vt(0), [pt, Xt] = vt(void 0), ht = Jt(null), St = Jt(null);
348
+ let E, W;
349
+ t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => {
350
+ const c = new ResizeObserver((G) => {
351
+ Rt(G[0].target.clientWidth || 620), It(G[0].target.clientHeight || 480);
354
352
  });
355
- return tt.current && b.observe(tt.current), () => b.disconnect();
356
- }, e = [], t[2] = z, t[3] = e) : (z = t[2], e = t[3]), le(z, e);
357
- const k = o?.graphContainer, M = a?.graphContainer;
358
- let O;
359
- t[4] !== o?.description || t[5] !== o?.title || t[6] !== n || t[7] !== r || t[8] !== P || t[9] !== Q || t[10] !== y || t[11] !== a?.description || t[12] !== a?.title || t[13] !== u ? (O = y || P || Q || r ? /* @__PURE__ */ s.jsx($e, { styles: {
360
- title: a?.title,
361
- description: a?.description
353
+ return ht.current && c.observe(ht.current), () => c.disconnect();
354
+ }, W = [], t[2] = E, t[3] = W) : (E = t[2], W = t[3]), oe(E, W);
355
+ const gt = s?.graphContainer, xt = l?.graphContainer;
356
+ let N;
357
+ t[4] !== s?.description || t[5] !== s?.title || t[6] !== o || t[7] !== O || t[8] !== x || t[9] !== J || t[10] !== w || t[11] !== l?.description || t[12] !== l?.title || t[13] !== d ? (N = w || x || J || O ? /* @__PURE__ */ a.jsx(we, { styles: {
358
+ title: l?.title,
359
+ description: l?.description
362
360
  }, classNames: {
363
- title: o?.title,
364
- description: o?.description
365
- }, graphTitle: y, graphDescription: P, width: u, graphDownload: Q ? gt : void 0, dataDownload: r ? n.map(Je).filter(Ue).length > 0 ? n.map(qe).filter(Fe) : n.filter(Xe) : null }) : null, t[4] = o?.description, t[5] = o?.title, t[6] = n, t[7] = r, t[8] = P, t[9] = Q, t[10] = y, t[11] = a?.description, t[12] = a?.title, t[13] = u, t[14] = O) : O = t[14];
366
- let et;
367
- t[15] !== o?.colorLegend || t[16] !== g || t[17] !== At || t[18] !== d || t[19] !== n || t[20] !== K || t[21] !== St || t[22] !== w || t[23] !== u ? (et = K && n.filter(Re).length !== 0 && n.length > 0 ? /* @__PURE__ */ s.jsx(we, { width: u, colorLegendTitle: At, colors: d || vt[w].categoricalColors.colors, colorDomain: g || se(n, "color", !0), setSelectedColor: Bt, showNAColor: St, className: o?.colorLegend }) : null, t[15] = o?.colorLegend, t[16] = g, t[17] = At, t[18] = d, t[19] = n, t[20] = K, t[21] = St, t[22] = w, t[23] = u, t[24] = et) : et = t[24];
368
- let B;
369
- t[25] !== n || t[26] !== A ? (B = n.filter((b) => A ? !Ht(b.size) : b).length === 0 && /* @__PURE__ */ s.jsx(Ae, {}), t[25] = n, t[26] = A, t[27] = B) : B = t[27];
370
- let Pt;
371
- t[28] !== V || t[29] !== N || t[30] !== q || t[31] !== Ot || t[32] !== o || t[33] !== g || t[34] !== d || t[35] !== ut || t[36] !== n || t[37] !== Y || t[38] !== ct || t[39] !== A || t[40] !== dt || t[41] !== E || t[42] !== $ || t[43] !== l || t[44] !== Ct || t[45] !== ht || t[46] !== nt || t[47] !== H || t[48] !== f || t[49] !== st || t[50] !== c || t[51] !== ft || t[52] !== lt || t[53] !== C || t[54] !== jt || t[55] !== mt || t[56] !== rt || t[57] !== D || t[58] !== G || t[59] !== pt || t[60] !== J || t[61] !== j || t[62] !== at || t[63] !== a || t[64] !== F || t[65] !== _ || t[66] !== S || t[67] !== w || t[68] !== Lt || t[69] !== W || t[70] !== It ? (Pt = S && _ && n.filter((b) => A ? !Ht(b.size) : b).length > 0 ? /* @__PURE__ */ s.jsx(je, { hideAxisLine: dt, data: n.filter((b) => A ? !Ht(b.size) : b).filter((b, ee) => H ? ee < H : !0), barColor: n.filter(Ye).length === 0 ? d ? [d] : [vt.primaryColors["blue-600"]] : d || vt[w].categoricalColors.colors, colorDomain: n.filter(He).length === 0 ? [] : g || se(n, "color", !0), selectedColor: pt, width: S, height: _, suffix: F, prefix: rt, barPadding: q, showValues: at, showTicks: j, leftMargin: Ct, rightMargin: G, topMargin: W, bottomMargin: Ot, truncateBy: It, showLabels: J, tooltip: Lt, onSeriesMouseOver: jt, refValues: D, maxValue: f, minValue: c, highlightedDataPoints: E, onSeriesMouseClick: C, labelOrder: $, rtl: l === "he" || l === "ar", maxBarThickness: nt, minBarThickness: st, detailsOnClick: Y, barAxisTitle: N, noOfTicks: lt, classNames: o, styles: a, animate: V === !0 ? {
361
+ title: s?.title,
362
+ description: s?.description
363
+ }, graphTitle: w, graphDescription: x, width: d, graphDownload: J ? St : void 0, dataDownload: O ? o.map(Re).filter(Ye).length > 0 ? o.map(He).filter(Ge) : o.filter(We) : null }) : null, t[4] = s?.description, t[5] = s?.title, t[6] = o, t[7] = O, t[8] = x, t[9] = J, t[10] = w, t[11] = l?.description, t[12] = l?.title, t[13] = d, t[14] = N) : N = t[14];
364
+ let M;
365
+ t[15] !== s?.colorLegend || t[16] !== H || t[17] !== Mt || t[18] !== g || t[19] !== o || t[20] !== U || t[21] !== K || t[22] !== h || t[23] !== d ? (M = U && o.filter(Ee).length !== 0 && o.length > 0 ? /* @__PURE__ */ a.jsx(ge, { width: d, colorLegendTitle: Mt, colors: g || bt[h].categoricalColors.colors, colorDomain: H || _t(o, "color", !0), setSelectedColor: Xt, showNAColor: K, className: s?.colorLegend }) : null, t[15] = s?.colorLegend, t[16] = H, t[17] = Mt, t[18] = g, t[19] = o, t[20] = U, t[21] = K, t[22] = h, t[23] = d, t[24] = M) : M = t[24];
366
+ let C;
367
+ t[25] !== o || t[26] !== n ? (C = o.filter((c) => n ? !Bt(c.size) : c).length === 0 && /* @__PURE__ */ a.jsx(xe, {}), t[25] = o, t[26] = n, t[27] = C) : C = t[27];
368
+ let $;
369
+ t[28] !== f || t[29] !== at || t[30] !== Z || t[31] !== Lt || t[32] !== s || t[33] !== H || t[34] !== g || t[35] !== Yt || t[36] !== o || t[37] !== rt || t[38] !== Vt || t[39] !== n || t[40] !== dt || t[41] !== D || t[42] !== m || t[43] !== k || t[44] !== Y || t[45] !== nt || t[46] !== F || t[47] !== X || t[48] !== A || t[49] !== Wt || t[50] !== ft || t[51] !== ut || t[52] !== r?.locale || t[53] !== r?.padZeros || t[54] !== r?.precision || t[55] !== r?.prefix || t[56] !== r?.suffix || t[57] !== p || t[58] !== y || t[59] !== Dt || t[60] !== jt || t[61] !== pt || t[62] !== mt || t[63] !== S || t[64] !== ct || t[65] !== l || t[66] !== _ || t[67] !== P || t[68] !== h || t[69] !== ot || t[70] !== $t || t[71] !== z ? ($ = P && _ && o.filter((c) => n ? !Bt(c.size) : c).length > 0 ? /* @__PURE__ */ a.jsx(Oe, { hideAxisLine: dt, data: o.filter((c) => n ? !Bt(c.size) : c).filter((c, G) => F ? G < F : !0), barColor: o.filter(Pe).length === 0 ? g ? [g] : [bt.primaryColors["blue-600"]] : g || bt[h].categoricalColors.colors, colorDomain: o.filter(Be).length === 0 ? [] : H || _t(o, "color", !0), selectedColor: pt, width: P, height: _, barPadding: Z, showValues: ct, showTicks: S, leftMargin: Y, rightMargin: jt, topMargin: $t, bottomMargin: Lt, truncateBy: z, showLabels: mt, tooltip: ot, onSeriesMouseOver: y, refValues: Dt, maxValue: X, minValue: Wt, highlightedDataPoints: D, onSeriesMouseClick: p, labelOrder: m, rtl: k === "he" || k === "ar", maxBarThickness: nt, minBarThickness: A, detailsOnClick: rt, barAxisTitle: at, noOfTicks: ut, classNames: s, styles: l, animate: f === !0 ? {
372
370
  duration: 0.5,
373
371
  once: !0,
374
372
  amount: 0.5
375
- } : V || {
373
+ } : f || {
376
374
  duration: 0,
377
375
  once: !0,
378
376
  amount: 0
379
- }, dimmedOpacity: ct, precision: mt, customLayers: ut, naLabel: ft, locale: ht }) : null, t[28] = V, t[29] = N, t[30] = q, t[31] = Ot, t[32] = o, t[33] = g, t[34] = d, t[35] = ut, t[36] = n, t[37] = Y, t[38] = ct, t[39] = A, t[40] = dt, t[41] = E, t[42] = $, t[43] = l, t[44] = Ct, t[45] = ht, t[46] = nt, t[47] = H, t[48] = f, t[49] = st, t[50] = c, t[51] = ft, t[52] = lt, t[53] = C, t[54] = jt, t[55] = mt, t[56] = rt, t[57] = D, t[58] = G, t[59] = pt, t[60] = J, t[61] = j, t[62] = at, t[63] = a, t[64] = F, t[65] = _, t[66] = S, t[67] = w, t[68] = Lt, t[69] = W, t[70] = It, t[71] = Pt) : Pt = t[71];
380
- let Et;
381
- t[72] !== B || t[73] !== Pt ? (Et = /* @__PURE__ */ s.jsxs(Me, { ref: tt, children: [
382
- B,
383
- Pt
384
- ] }), t[72] = B, t[73] = Pt, t[74] = Et) : Et = t[74];
385
- let Wt;
386
- t[75] !== o?.footnote || t[76] !== o?.source || t[77] !== it || t[78] !== h || t[79] !== a?.footnote || t[80] !== a?.source || t[81] !== u ? (Wt = h || it ? /* @__PURE__ */ s.jsx(Ce, { sources: h, footNote: it, width: u, styles: {
387
- footnote: a?.footnote,
388
- source: a?.source
377
+ }, dimmedOpacity: Vt, customLayers: Yt, naLabel: ft, locale: r?.locale || "en", padZeros: r?.padZeros || !1, suffix: r?.suffix || "", prefix: r?.prefix || "", precision: r?.precision ?? 2 }) : null, t[28] = f, t[29] = at, t[30] = Z, t[31] = Lt, t[32] = s, t[33] = H, t[34] = g, t[35] = Yt, t[36] = o, t[37] = rt, t[38] = Vt, t[39] = n, t[40] = dt, t[41] = D, t[42] = m, t[43] = k, t[44] = Y, t[45] = nt, t[46] = F, t[47] = X, t[48] = A, t[49] = Wt, t[50] = ft, t[51] = ut, t[52] = r?.locale, t[53] = r?.padZeros, t[54] = r?.precision, t[55] = r?.prefix, t[56] = r?.suffix, t[57] = p, t[58] = y, t[59] = Dt, t[60] = jt, t[61] = pt, t[62] = mt, t[63] = S, t[64] = ct, t[65] = l, t[66] = _, t[67] = P, t[68] = h, t[69] = ot, t[70] = $t, t[71] = z, t[72] = $) : $ = t[72];
378
+ let L;
379
+ t[73] !== C || t[74] !== $ ? (L = /* @__PURE__ */ a.jsxs(ve, { ref: ht, children: [
380
+ C,
381
+ $
382
+ ] }), t[73] = C, t[74] = $, t[75] = L) : L = t[75];
383
+ let e;
384
+ t[76] !== s?.footnote || t[77] !== s?.source || t[78] !== Ot || t[79] !== tt || t[80] !== l?.footnote || t[81] !== l?.source || t[82] !== d ? (e = tt || Ot ? /* @__PURE__ */ a.jsx(ye, { sources: tt, footNote: Ot, width: d, styles: {
385
+ footnote: l?.footnote,
386
+ source: l?.source
389
387
  }, classNames: {
390
- footnote: o?.footnote,
391
- source: o?.source
392
- } }) : null, t[75] = o?.footnote, t[76] = o?.source, t[77] = it, t[78] = h, t[79] = a?.footnote, t[80] = a?.source, t[81] = u, t[82] = Wt) : Wt = t[82];
393
- let te;
394
- return t[83] !== Nt || t[84] !== U || t[85] !== Ft || t[86] !== Rt || t[87] !== l || t[88] !== Z || t[89] !== Mt || t[90] !== x || t[91] !== k || t[92] !== M || t[93] !== O || t[94] !== et || t[95] !== Et || t[96] !== Wt || t[97] !== w || t[98] !== u ? (te = /* @__PURE__ */ s.jsxs(Oe, { className: k, style: M, id: Ft, ref: gt, "aria-label": Nt, backgroundColor: U, theme: w, language: l, minHeight: Z, width: u, height: Rt, relativeHeight: x, padding: Mt, children: [
395
- O,
396
- et,
397
- Et,
398
- Wt
399
- ] }), t[83] = Nt, t[84] = U, t[85] = Ft, t[86] = Rt, t[87] = l, t[88] = Z, t[89] = Mt, t[90] = x, t[91] = k, t[92] = M, t[93] = O, t[94] = et, t[95] = Et, t[96] = Wt, t[97] = w, t[98] = u, t[99] = te) : te = t[99], te;
388
+ footnote: s?.footnote,
389
+ source: s?.source
390
+ } }) : null, t[76] = s?.footnote, t[77] = s?.source, t[78] = Ot, t[79] = tt, t[80] = l?.footnote, t[81] = l?.source, t[82] = d, t[83] = e) : e = t[83];
391
+ let j;
392
+ return t[84] !== st || t[85] !== q || t[86] !== T || t[87] !== et || t[88] !== k || t[89] !== Q || t[90] !== Ct || t[91] !== R || t[92] !== gt || t[93] !== xt || t[94] !== N || t[95] !== M || t[96] !== L || t[97] !== e || t[98] !== h || t[99] !== d ? (j = /* @__PURE__ */ a.jsxs(be, { className: gt, style: xt, id: T, ref: St, "aria-label": st, backgroundColor: q, theme: h, language: k, minHeight: Q, width: d, height: et, relativeHeight: R, padding: Ct, children: [
393
+ N,
394
+ M,
395
+ L,
396
+ e
397
+ ] }), t[84] = st, t[85] = q, t[86] = T, t[87] = et, t[88] = k, t[89] = Q, t[90] = Ct, t[91] = R, t[92] = gt, t[93] = xt, t[94] = N, t[95] = M, t[96] = L, t[97] = e, t[98] = h, t[99] = d, t[100] = j) : j = t[100], j;
400
398
  }
401
- function He(i) {
399
+ function Be(i) {
402
400
  return i.color;
403
401
  }
404
- function Ye(i) {
402
+ function Pe(i) {
405
403
  return i.color;
406
404
  }
407
- function Re(i) {
405
+ function Ee(i) {
408
406
  return i.color;
409
407
  }
410
- function Xe(i) {
408
+ function We(i) {
411
409
  return i !== void 0;
412
410
  }
413
- function Fe(i) {
411
+ function Ge(i) {
414
412
  return i !== void 0;
415
413
  }
416
- function qe(i) {
414
+ function He(i) {
417
415
  return i.data;
418
416
  }
419
- function Ue(i) {
417
+ function Ye(i) {
420
418
  return i !== void 0;
421
419
  }
422
- function Je(i) {
420
+ function Re(i) {
423
421
  return i.data;
424
422
  }
425
423
  export {
426
- wi as WaterfallChart
424
+ gi as WaterfallChart
427
425
  };
428
426
  //# sourceMappingURL=WaterfallChart.js.map