@undp/data-viz 1.5.1 → 1.5.3

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 (230) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +3 -2
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.js +1221 -1247
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +130 -142
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +41 -41
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +483 -487
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +99 -99
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +125 -125
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +2 -2
  31. package/dist/Data/BureauPerformance.csv +8 -0
  32. package/dist/Data/EGDashboardData.csv +6 -0
  33. package/dist/DataCards.cjs +2 -2
  34. package/dist/DataCards.cjs.map +1 -1
  35. package/dist/DataCards.js +6 -6
  36. package/dist/DataCards.js.map +1 -1
  37. package/dist/DataTable.cjs +1 -1
  38. package/dist/DataTable.cjs.map +1 -1
  39. package/dist/DataTable.js +66 -68
  40. package/dist/DataTable.js.map +1 -1
  41. package/dist/DifferenceLineChart.cjs +1 -1
  42. package/dist/DifferenceLineChart.cjs.map +1 -1
  43. package/dist/DifferenceLineChart.js +3 -2
  44. package/dist/DifferenceLineChart.js.map +1 -1
  45. package/dist/DonutChart.cjs +1 -1
  46. package/dist/DonutChart.cjs.map +1 -1
  47. package/dist/DonutChart.js +205 -205
  48. package/dist/DonutChart.js.map +1 -1
  49. package/dist/DotDensityMap.cjs +1 -1
  50. package/dist/DotDensityMap.cjs.map +1 -1
  51. package/dist/DotDensityMap.js +78 -81
  52. package/dist/DotDensityMap.js.map +1 -1
  53. package/dist/DualAxisLineChart.cjs +1 -1
  54. package/dist/DualAxisLineChart.cjs.map +1 -1
  55. package/dist/DualAxisLineChart.js +3 -2
  56. package/dist/DualAxisLineChart.js.map +1 -1
  57. package/dist/DumbbellChart.cjs +1 -1
  58. package/dist/DumbbellChart.cjs.map +1 -1
  59. package/dist/DumbbellChart.js +64 -65
  60. package/dist/DumbbellChart.js.map +1 -1
  61. package/dist/GeoHubMap.cjs +1 -1
  62. package/dist/GeoHubMap.js +1 -1
  63. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  64. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  65. package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
  66. package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
  67. package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
  68. package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
  69. package/dist/GriddedGraphs.cjs +1 -1
  70. package/dist/GriddedGraphs.js +4 -4
  71. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  72. package/dist/GriddedGraphsFromConfig.js +1 -1
  73. package/dist/HeatMap.cjs +1 -1
  74. package/dist/HeatMap.cjs.map +1 -1
  75. package/dist/HeatMap.js +83 -83
  76. package/dist/HeatMap.js.map +1 -1
  77. package/dist/Histogram.cjs +1 -1
  78. package/dist/Histogram.js +1 -1
  79. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  80. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  81. package/dist/LineChartWithConfidenceInterval.js +7 -6
  82. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  83. package/dist/MultiGraphDashboard.cjs +1 -1
  84. package/dist/MultiGraphDashboard.js +2 -2
  85. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  86. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  87. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  88. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  89. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  90. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  91. package/dist/MultiLineAltChart.cjs +1 -1
  92. package/dist/MultiLineAltChart.cjs.map +1 -1
  93. package/dist/MultiLineAltChart.js +82 -91
  94. package/dist/MultiLineAltChart.js.map +1 -1
  95. package/dist/MultiLineChart.cjs +1 -1
  96. package/dist/MultiLineChart.cjs.map +1 -1
  97. package/dist/MultiLineChart.js +3 -2
  98. package/dist/MultiLineChart.js.map +1 -1
  99. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  100. package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
  101. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  102. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  103. package/dist/RadarChart.cjs +1 -1
  104. package/dist/RadarChart.cjs.map +1 -1
  105. package/dist/RadarChart.js +124 -130
  106. package/dist/RadarChart.js.map +1 -1
  107. package/dist/SankeyChart.cjs +1 -1
  108. package/dist/SankeyChart.cjs.map +1 -1
  109. package/dist/SankeyChart.js +200 -200
  110. package/dist/SankeyChart.js.map +1 -1
  111. package/dist/ScatterPlot.cjs +1 -1
  112. package/dist/ScatterPlot.cjs.map +1 -1
  113. package/dist/ScatterPlot.js +149 -155
  114. package/dist/ScatterPlot.js.map +1 -1
  115. package/dist/SimpleLineChart.cjs +1 -1
  116. package/dist/SimpleLineChart.cjs.map +1 -1
  117. package/dist/SimpleLineChart.js +44 -43
  118. package/dist/SimpleLineChart.js.map +1 -1
  119. package/dist/SingleGraphDashboard.cjs +1 -1
  120. package/dist/SingleGraphDashboard.js +4 -4
  121. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  122. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  123. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  124. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  125. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  126. package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
  127. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  128. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  129. package/dist/SlopeChart.cjs +1 -1
  130. package/dist/SlopeChart.cjs.map +1 -1
  131. package/dist/SlopeChart.js +107 -113
  132. package/dist/SlopeChart.js.map +1 -1
  133. package/dist/SparkLine.cjs +1 -1
  134. package/dist/SparkLine.cjs.map +1 -1
  135. package/dist/SparkLine.js +3 -2
  136. package/dist/SparkLine.js.map +1 -1
  137. package/dist/StripChart.cjs +1 -1
  138. package/dist/StripChart.cjs.map +1 -1
  139. package/dist/StripChart.js +159 -159
  140. package/dist/StripChart.js.map +1 -1
  141. package/dist/ThreeDGlobe.cjs +1 -1
  142. package/dist/ThreeDGlobe.cjs.map +1 -1
  143. package/dist/ThreeDGlobe.js +3 -3
  144. package/dist/ThreeDGlobe.js.map +1 -1
  145. package/dist/TreeMapGraph.cjs +1 -1
  146. package/dist/TreeMapGraph.cjs.map +1 -1
  147. package/dist/TreeMapGraph.js +194 -200
  148. package/dist/TreeMapGraph.js.map +1 -1
  149. package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
  150. package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
  151. package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
  152. package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
  153. package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
  154. package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
  155. package/dist/fetchAndParseData-sapWbnYk.js +583 -0
  156. package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
  157. package/dist/fetchAndParseData.cjs +1 -1
  158. package/dist/fetchAndParseData.js +1 -1
  159. package/dist/getJenks-BbngDoBQ.js +19 -0
  160. package/dist/getJenks-BbngDoBQ.js.map +1 -0
  161. package/dist/getJenks-GYmdwBqm.cjs +2 -0
  162. package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
  163. package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
  164. package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
  165. package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
  166. package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
  167. package/dist/getUniqValue-DiCh_MOD.js +13 -0
  168. package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
  169. package/dist/getUniqValue-RViz8tTw.cjs +2 -0
  170. package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
  171. package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
  172. package/dist/index-37q0ULNQ.js.map +1 -0
  173. package/dist/index-CVlCtJbC.cjs +2 -0
  174. package/dist/index-CVlCtJbC.cjs.map +1 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.d.ts +1 -1
  177. package/dist/index.js +6 -6
  178. package/dist/sort-DfK1b0F5.js +34 -0
  179. package/dist/sort-DfK1b0F5.js.map +1 -0
  180. package/dist/sort-O96oMZLb.cjs +2 -0
  181. package/dist/sort-O96oMZLb.cjs.map +1 -0
  182. package/dist/transformData.cjs +1 -1
  183. package/dist/transformData.js +3 -3
  184. package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
  185. package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
  186. package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
  187. package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
  188. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
  189. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
  190. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
  191. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
  192. package/dist/uniqBy-BHy4I8PK.js +8 -0
  193. package/dist/uniqBy-BHy4I8PK.js.map +1 -0
  194. package/dist/uniqBy-O05lp2S5.cjs +2 -0
  195. package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
  196. package/dist/utils.cjs +1 -1
  197. package/dist/utils.d.ts +1 -1
  198. package/dist/utils.js +2 -2
  199. package/package.json +1 -7
  200. package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
  201. package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
  202. package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
  203. package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
  204. package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
  205. package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
  206. package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
  207. package/dist/getJenks-DW96UYNE.js +0 -23
  208. package/dist/getJenks-DW96UYNE.js.map +0 -1
  209. package/dist/getJenks-vofIZmeb.cjs +0 -2
  210. package/dist/getJenks-vofIZmeb.cjs.map +0 -1
  211. package/dist/getSliderMarks-C0jptXeP.js +0 -1054
  212. package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
  213. package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
  214. package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
  215. package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
  216. package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
  217. package/dist/getUniqValue-CttuU_wn.js +0 -20
  218. package/dist/getUniqValue-CttuU_wn.js.map +0 -1
  219. package/dist/index-AqnpA7_O.js +0 -631
  220. package/dist/index-AqnpA7_O.js.map +0 -1
  221. package/dist/index-BJOeaYTk.cjs +0 -2
  222. package/dist/index-BJOeaYTk.cjs.map +0 -1
  223. package/dist/index-BMgDMxKJ.js.map +0 -1
  224. package/dist/index-DYH8g9WA.cjs +0 -2
  225. package/dist/index-DYH8g9WA.cjs.map +0 -1
  226. package/dist/index-Da2GUKrr.cjs +0 -2
  227. package/dist/index-Da2GUKrr.cjs.map +0 -1
  228. package/dist/index-fwdktvAS.js +0 -707
  229. package/dist/index-fwdktvAS.js.map +0 -1
  230. package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
@@ -1,22 +1,22 @@
1
1
  import { j as h, m as rt } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { useRef as wt, useState as Z, useEffect as _t } from "react";
3
- import { u as ot } from "./index-AqnpA7_O.js";
4
- import { s as ct } from "./index-fwdktvAS.js";
5
- import { s as Nt } from "./index-CeVNqhMO.js";
2
+ import { useRef as vt, useState as Z, useEffect as Mt } from "react";
3
+ import { s as _t } from "./index-CeVNqhMO.js";
4
+ import { o as Nt } from "./index-DvVprvy6.js";
6
5
  import { i as Ht } from "./index-Bwrro8-q.js";
7
6
  import { X as Wt } from "./Modal-DVVwpKhP.js";
8
- import { u as ft } from "./Typography-Ctgfl1J5.js";
7
+ import { u as ct } from "./Typography-Ctgfl1J5.js";
9
8
  import { n as St } from "./numberFormattingFunction-14YCbkN2.js";
10
9
  import { T as Rt } from "./Tooltip-CVCGWyzw.js";
11
10
  import { s as Gt } from "./string2HTML-oFCROsus.js";
12
11
  import { u as qt } from "./use-in-view-yS6jzJAp.js";
13
- import { m as mt } from "./proxy-CkpFesk1.js";
12
+ import { m as dt } from "./proxy-CkpFesk1.js";
14
13
  import { A as Xt } from "./index-CNvov0eg.js";
15
14
  import { GraphHeader as Ft } from "./GraphHeader.js";
16
15
  import { GraphFooter as Yt } from "./GraphFooter.js";
17
16
  import { Colors as Tt } from "./Colors.js";
18
17
  import { g as Ut } from "./generateRandomString-za3IQGfQ.js";
19
18
  import { E as Zt } from "./EmptyState-DdTp-Mdn.js";
19
+ import { u as ot } from "./uniqBy-BHy4I8PK.js";
20
20
  function Ct(e, n) {
21
21
  let i;
22
22
  if (n === void 0)
@@ -41,7 +41,7 @@ function Bt(e, n) {
41
41
  }
42
42
  return i;
43
43
  }
44
- function yt(e, n) {
44
+ function pt(e, n) {
45
45
  let i = 0;
46
46
  if (n === void 0)
47
47
  for (let a of e)
@@ -59,24 +59,24 @@ function Qt(e) {
59
59
  function Jt(e, n) {
60
60
  return e.sourceLinks.length ? e.depth : n - 1;
61
61
  }
62
- function xt(e) {
62
+ function mt(e) {
63
63
  return e.targetLinks.length ? e.depth : e.sourceLinks.length ? Bt(e.sourceLinks, Qt) - 1 : 0;
64
64
  }
65
- function ht(e) {
65
+ function ft(e) {
66
66
  return function() {
67
67
  return e;
68
68
  };
69
69
  }
70
70
  function Ot(e, n) {
71
- return gt(e.source, n.source) || e.index - n.index;
71
+ return ht(e.source, n.source) || e.index - n.index;
72
72
  }
73
73
  function Dt(e, n) {
74
- return gt(e.target, n.target) || e.index - n.index;
74
+ return ht(e.target, n.target) || e.index - n.index;
75
75
  }
76
- function gt(e, n) {
76
+ function ht(e, n) {
77
77
  return e.y0 - n.y0;
78
78
  }
79
- function vt(e) {
79
+ function yt(e) {
80
80
  return e.value;
81
81
  }
82
82
  function Kt(e) {
@@ -102,38 +102,38 @@ function zt({ nodes: e }) {
102
102
  l.y1 = a + l.width / 2, a += l.width;
103
103
  }
104
104
  }
105
- function kt() {
106
- let e = 0, n = 0, i = 1, a = 1, l = 24, y = 8, g, p = Kt, v = Jt, b, k, $ = te, j = ee, N = 6;
105
+ function xt() {
106
+ let e = 0, n = 0, i = 1, a = 1, l = 24, y = 8, g, p = Kt, x = Jt, k, v, w = te, b = ee, S = 6;
107
107
  function d() {
108
- const t = { nodes: $.apply(null, arguments), links: j.apply(null, arguments) };
109
- return S(t), M(t), z(t), X(t), W(t), zt(t), t;
108
+ const t = { nodes: w.apply(null, arguments), links: b.apply(null, arguments) };
109
+ return T(t), L(t), z(t), X(t), W(t), zt(t), t;
110
110
  }
111
111
  d.update = function(t) {
112
112
  return zt(t), t;
113
113
  }, d.nodeId = function(t) {
114
- return arguments.length ? (p = typeof t == "function" ? t : ht(t), d) : p;
114
+ return arguments.length ? (p = typeof t == "function" ? t : ft(t), d) : p;
115
115
  }, d.nodeAlign = function(t) {
116
- return arguments.length ? (v = typeof t == "function" ? t : ht(t), d) : v;
116
+ return arguments.length ? (x = typeof t == "function" ? t : ft(t), d) : x;
117
117
  }, d.nodeSort = function(t) {
118
- return arguments.length ? (b = t, d) : b;
118
+ return arguments.length ? (k = t, d) : k;
119
119
  }, d.nodeWidth = function(t) {
120
120
  return arguments.length ? (l = +t, d) : l;
121
121
  }, d.nodePadding = function(t) {
122
122
  return arguments.length ? (y = g = +t, d) : y;
123
123
  }, d.nodes = function(t) {
124
- return arguments.length ? ($ = typeof t == "function" ? t : ht(t), d) : $;
124
+ return arguments.length ? (w = typeof t == "function" ? t : ft(t), d) : w;
125
125
  }, d.links = function(t) {
126
- return arguments.length ? (j = typeof t == "function" ? t : ht(t), d) : j;
126
+ return arguments.length ? (b = typeof t == "function" ? t : ft(t), d) : b;
127
127
  }, d.linkSort = function(t) {
128
- return arguments.length ? (k = t, d) : k;
128
+ return arguments.length ? (v = t, d) : v;
129
129
  }, d.size = function(t) {
130
130
  return arguments.length ? (e = n = 0, i = +t[0], a = +t[1], d) : [i - e, a - n];
131
131
  }, d.extent = function(t) {
132
132
  return arguments.length ? (e = +t[0][0], i = +t[1][0], n = +t[0][1], a = +t[1][1], d) : [[e, n], [i, a]];
133
133
  }, d.iterations = function(t) {
134
- return arguments.length ? (N = +t, d) : N;
134
+ return arguments.length ? (S = +t, d) : S;
135
135
  };
136
- function S({ nodes: t, links: u }) {
136
+ function T({ nodes: t, links: u }) {
137
137
  for (const [c, r] of t.entries())
138
138
  r.index = c, r.sourceLinks = [], r.targetLinks = [];
139
139
  const s = new Map(t.map((c, r) => [p(c, r, t), c]));
@@ -142,13 +142,13 @@ function kt() {
142
142
  let { source: f, target: m } = r;
143
143
  typeof f != "object" && (f = r.source = Vt(s, f)), typeof m != "object" && (m = r.target = Vt(s, m)), f.sourceLinks.push(r), m.targetLinks.push(r);
144
144
  }
145
- if (k != null)
145
+ if (v != null)
146
146
  for (const { sourceLinks: c, targetLinks: r } of t)
147
- c.sort(k), r.sort(k);
147
+ c.sort(v), r.sort(v);
148
148
  }
149
- function M({ nodes: t }) {
149
+ function L({ nodes: t }) {
150
150
  for (const u of t)
151
- u.value = u.fixedValue === void 0 ? Math.max(yt(u.sourceLinks, vt), yt(u.targetLinks, vt)) : u.fixedValue;
151
+ u.value = u.fixedValue === void 0 ? Math.max(pt(u.sourceLinks, yt), pt(u.targetLinks, yt)) : u.fixedValue;
152
152
  }
153
153
  function z({ nodes: t }) {
154
154
  const u = t.length;
@@ -179,15 +179,15 @@ function kt() {
179
179
  function P({ nodes: t }) {
180
180
  const u = Ct(t, (r) => r.depth) + 1, s = (i - e - l) / (u - 1), c = new Array(u);
181
181
  for (const r of t) {
182
- const f = Math.max(0, Math.min(u - 1, Math.floor(v.call(null, r, u))));
182
+ const f = Math.max(0, Math.min(u - 1, Math.floor(x.call(null, r, u))));
183
183
  r.layer = f, r.x0 = e + f * s, r.x1 = r.x0 + l, c[f] ? c[f].push(r) : c[f] = [r];
184
184
  }
185
- if (b) for (const r of c)
186
- r.sort(b);
185
+ if (k) for (const r of c)
186
+ r.sort(k);
187
187
  return c;
188
188
  }
189
- function T(t) {
190
- const u = Bt(t, (s) => (a - n - (s.length - 1) * g) / yt(s, vt));
189
+ function C(t) {
190
+ const u = Bt(t, (s) => (a - n - (s.length - 1) * g) / pt(s, yt));
191
191
  for (const s of t) {
192
192
  let c = n;
193
193
  for (const r of s) {
@@ -205,9 +205,9 @@ function kt() {
205
205
  }
206
206
  function W(t) {
207
207
  const u = P(t);
208
- g = Math.min(y, (a - n) / (Ct(u, (s) => s.length) - 1)), T(u);
209
- for (let s = 0; s < N; ++s) {
210
- const c = Math.pow(0.99, s), r = Math.max(1 - c, (s + 1) / N);
208
+ g = Math.min(y, (a - n) / (Ct(u, (s) => s.length) - 1)), C(u);
209
+ for (let s = 0; s < S; ++s) {
210
+ const c = Math.pow(0.99, s), r = Math.max(1 - c, (s + 1) / S);
211
211
  et(u, c, r), tt(u, c, r);
212
212
  }
213
213
  }
@@ -215,32 +215,32 @@ function kt() {
215
215
  for (let c = 1, r = t.length; c < r; ++c) {
216
216
  const f = t[c];
217
217
  for (const m of f) {
218
- let C = 0, O = 0;
219
- for (const { source: E, value: V } of m.targetLinks) {
220
- let H = V * (m.layer - E.layer);
221
- C += Y(E, m) * H, O += H;
218
+ let O = 0, D = 0;
219
+ for (const { source: E, value: _ } of m.targetLinks) {
220
+ let H = _ * (m.layer - E.layer);
221
+ O += Y(E, m) * H, D += H;
222
222
  }
223
- if (!(O > 0)) continue;
224
- let R = (C / O - m.y0) * u;
225
- m.y0 += R, m.y1 += R, D(m);
223
+ if (!(D > 0)) continue;
224
+ let R = (O / D - m.y0) * u;
225
+ m.y0 += R, m.y1 += R, V(m);
226
226
  }
227
- b === void 0 && f.sort(gt), B(f, s);
227
+ k === void 0 && f.sort(ht), B(f, s);
228
228
  }
229
229
  }
230
230
  function et(t, u, s) {
231
231
  for (let c = t.length, r = c - 2; r >= 0; --r) {
232
232
  const f = t[r];
233
233
  for (const m of f) {
234
- let C = 0, O = 0;
235
- for (const { target: E, value: V } of m.sourceLinks) {
236
- let H = V * (E.layer - m.layer);
237
- C += nt(m, E) * H, O += H;
234
+ let O = 0, D = 0;
235
+ for (const { target: E, value: _ } of m.sourceLinks) {
236
+ let H = _ * (E.layer - m.layer);
237
+ O += nt(m, E) * H, D += H;
238
238
  }
239
- if (!(O > 0)) continue;
240
- let R = (C / O - m.y0) * u;
241
- m.y0 += R, m.y1 += R, D(m);
239
+ if (!(D > 0)) continue;
240
+ let R = (O / D - m.y0) * u;
241
+ m.y0 += R, m.y1 += R, V(m);
242
242
  }
243
- b === void 0 && f.sort(gt), B(f, s);
243
+ k === void 0 && f.sort(ht), B(f, s);
244
244
  }
245
245
  }
246
246
  function B(t, u) {
@@ -259,8 +259,8 @@ function kt() {
259
259
  f > 1e-6 && (r.y0 -= f, r.y1 -= f), u = r.y0 - g;
260
260
  }
261
261
  }
262
- function D({ sourceLinks: t, targetLinks: u }) {
263
- if (k === void 0) {
262
+ function V({ sourceLinks: t, targetLinks: u }) {
263
+ if (v === void 0) {
264
264
  for (const { source: { sourceLinks: s } } of u)
265
265
  s.sort(Dt);
266
266
  for (const { target: { targetLinks: s } } of t)
@@ -268,7 +268,7 @@ function kt() {
268
268
  }
269
269
  }
270
270
  function I(t) {
271
- if (k === void 0)
271
+ if (v === void 0)
272
272
  for (const { sourceLinks: u, targetLinks: s } of t)
273
273
  u.sort(Dt), s.sort(Ot);
274
274
  }
@@ -298,16 +298,16 @@ function kt() {
298
298
  }
299
299
  return d;
300
300
  }
301
- var bt = Math.PI, $t = 2 * bt, K = 1e-6, ne = $t - K;
302
- function jt() {
301
+ var kt = Math.PI, wt = 2 * kt, K = 1e-6, ne = wt - K;
302
+ function bt() {
303
303
  this._x0 = this._y0 = // start of current subpath
304
304
  this._x1 = this._y1 = null, this._ = "";
305
305
  }
306
306
  function It() {
307
- return new jt();
307
+ return new bt();
308
308
  }
309
- jt.prototype = It.prototype = {
310
- constructor: jt,
309
+ bt.prototype = It.prototype = {
310
+ constructor: bt,
311
311
  moveTo: function(e, n) {
312
312
  this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +n);
313
313
  },
@@ -325,22 +325,22 @@ jt.prototype = It.prototype = {
325
325
  },
326
326
  arcTo: function(e, n, i, a, l) {
327
327
  e = +e, n = +n, i = +i, a = +a, l = +l;
328
- var y = this._x1, g = this._y1, p = i - e, v = a - n, b = y - e, k = g - n, $ = b * b + k * k;
328
+ var y = this._x1, g = this._y1, p = i - e, x = a - n, k = y - e, v = g - n, w = k * k + v * v;
329
329
  if (l < 0) throw new Error("negative radius: " + l);
330
330
  if (this._x1 === null)
331
331
  this._ += "M" + (this._x1 = e) + "," + (this._y1 = n);
332
- else if ($ > K) if (!(Math.abs(k * p - v * b) > K) || !l)
332
+ else if (w > K) if (!(Math.abs(v * p - x * k) > K) || !l)
333
333
  this._ += "L" + (this._x1 = e) + "," + (this._y1 = n);
334
334
  else {
335
- var j = i - y, N = a - g, d = p * p + v * v, S = j * j + N * N, M = Math.sqrt(d), z = Math.sqrt($), X = l * Math.tan((bt - Math.acos((d + $ - S) / (2 * M * z))) / 2), P = X / z, T = X / M;
336
- Math.abs(P - 1) > K && (this._ += "L" + (e + P * b) + "," + (n + P * k)), this._ += "A" + l + "," + l + ",0,0," + +(k * j > b * N) + "," + (this._x1 = e + T * p) + "," + (this._y1 = n + T * v);
335
+ var b = i - y, S = a - g, d = p * p + x * x, T = b * b + S * S, L = Math.sqrt(d), z = Math.sqrt(w), X = l * Math.tan((kt - Math.acos((d + w - T) / (2 * L * z))) / 2), P = X / z, C = X / L;
336
+ Math.abs(P - 1) > K && (this._ += "L" + (e + P * k) + "," + (n + P * v)), this._ += "A" + l + "," + l + ",0,0," + +(v * b > k * S) + "," + (this._x1 = e + C * p) + "," + (this._y1 = n + C * x);
337
337
  }
338
338
  },
339
339
  arc: function(e, n, i, a, l, y) {
340
340
  e = +e, n = +n, i = +i, y = !!y;
341
- var g = i * Math.cos(a), p = i * Math.sin(a), v = e + g, b = n + p, k = 1 ^ y, $ = y ? a - l : l - a;
341
+ var g = i * Math.cos(a), p = i * Math.sin(a), x = e + g, k = n + p, v = 1 ^ y, w = y ? a - l : l - a;
342
342
  if (i < 0) throw new Error("negative radius: " + i);
343
- this._x1 === null ? this._ += "M" + v + "," + b : (Math.abs(this._x1 - v) > K || Math.abs(this._y1 - b) > K) && (this._ += "L" + v + "," + b), i && ($ < 0 && ($ = $ % $t + $t), $ > ne ? this._ += "A" + i + "," + i + ",0,1," + k + "," + (e - g) + "," + (n - p) + "A" + i + "," + i + ",0,1," + k + "," + (this._x1 = v) + "," + (this._y1 = b) : $ > K && (this._ += "A" + i + "," + i + ",0," + +($ >= bt) + "," + k + "," + (this._x1 = e + i * Math.cos(l)) + "," + (this._y1 = n + i * Math.sin(l))));
343
+ this._x1 === null ? this._ += "M" + x + "," + k : (Math.abs(this._x1 - x) > K || Math.abs(this._y1 - k) > K) && (this._ += "L" + x + "," + k), i && (w < 0 && (w = w % wt + wt), w > ne ? this._ += "A" + i + "," + i + ",0,1," + v + "," + (e - g) + "," + (n - p) + "A" + i + "," + i + ",0,1," + v + "," + (this._x1 = x) + "," + (this._y1 = k) : w > K && (this._ += "A" + i + "," + i + ",0," + +(w >= kt) + "," + v + "," + (this._x1 = e + i * Math.cos(l)) + "," + (this._y1 = n + i * Math.sin(l))));
344
344
  },
345
345
  rect: function(e, n, i, a) {
346
346
  this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +n) + "h" + +i + "v" + +a + "h" + -i + "Z";
@@ -370,8 +370,8 @@ function ae(e) {
370
370
  function le(e) {
371
371
  var n = se, i = ae, a = oe, l = ie, y = null;
372
372
  function g() {
373
- var p, v = re.call(arguments), b = n.apply(this, v), k = i.apply(this, v);
374
- if (y || (y = p = It()), e(y, +a.apply(this, (v[0] = b, v)), +l.apply(this, v), +a.apply(this, (v[0] = k, v)), +l.apply(this, v)), p) return y = null, p + "" || null;
373
+ var p, x = re.call(arguments), k = n.apply(this, x), v = i.apply(this, x);
374
+ if (y || (y = p = It()), e(y, +a.apply(this, (x[0] = k, x)), +l.apply(this, x), +a.apply(this, (x[0] = v, x)), +l.apply(this, x)), p) return y = null, p + "" || null;
375
375
  }
376
376
  return g.source = function(p) {
377
377
  return arguments.length ? (n = p, g) : n;
@@ -409,44 +409,44 @@ function de(e) {
409
409
  truncateBy: y,
410
410
  width: g,
411
411
  height: p,
412
- topMargin: v,
413
- bottomMargin: b,
414
- tooltip: k,
415
- onSeriesMouseOver: $,
416
- suffix: j,
417
- prefix: N,
412
+ topMargin: x,
413
+ bottomMargin: k,
414
+ tooltip: v,
415
+ onSeriesMouseOver: w,
416
+ suffix: b,
417
+ prefix: S,
418
418
  showValues: d,
419
- onSeriesMouseClick: S,
420
- nodePadding: M,
419
+ onSeriesMouseClick: T,
420
+ nodePadding: L,
421
421
  nodeWidth: z,
422
422
  id: X,
423
423
  highlightedSourceDataPoints: P,
424
- highlightedTargetDataPoints: T,
424
+ highlightedTargetDataPoints: C,
425
425
  defaultLinkOpacity: W,
426
426
  sourceTitle: tt,
427
427
  targetTitle: et,
428
428
  animate: B,
429
429
  sortNodes: F,
430
430
  resetSelectionOnDoubleClick: Q,
431
- detailsOnClick: D,
431
+ detailsOnClick: V,
432
432
  styles: I,
433
433
  classNames: Y,
434
434
  precision: nt,
435
435
  customLayers: t
436
- } = e, u = wt(null), s = qt(u, {
436
+ } = e, u = vt(null), s = qt(u, {
437
437
  once: B.once,
438
438
  amount: B.amount
439
- }), [c, r] = Z(void 0), [f, m] = Z(void 0), [C, O] = Z(void 0), [R, E] = Z(void 0), [V, H] = Z(void 0), A = {
440
- top: v,
441
- bottom: b,
439
+ }), [c, r] = Z(void 0), [f, m] = Z(void 0), [O, D] = Z(void 0), [R, E] = Z(void 0), [_, H] = Z(void 0), A = {
440
+ top: x,
441
+ bottom: k,
442
442
  left: a,
443
443
  right: l
444
- }, G = g - A.left - A.right, q = p - A.top - A.bottom, st = F === "mostReadable" ? kt().nodeWidth(z).nodePadding(M).size([G, q]).nodeAlign(xt) : F === "none" ? kt().nodeWidth(z).nodePadding(M).size([G, q]).nodeAlign(xt).nodeSort(() => null).linkSort(() => null) : kt().nodeWidth(z).nodePadding(M).size([G, q]).nodeAlign(xt).nodeSort(
445
- F === "desc" ? (o, _) => (_.value || 0) - (o.value || 0) : (o, _) => (o.value || 0) - (_.value || 0)
444
+ }, G = g - A.left - A.right, q = p - A.top - A.bottom, st = F === "mostReadable" ? xt().nodeWidth(z).nodePadding(L).size([G, q]).nodeAlign(mt) : F === "none" ? xt().nodeWidth(z).nodePadding(L).size([G, q]).nodeAlign(mt).nodeSort(() => null).linkSort(() => null) : xt().nodeWidth(z).nodePadding(L).size([G, q]).nodeAlign(mt).nodeSort(
445
+ F === "desc" ? (o, N) => (N.value || 0) - (o.value || 0) : (o, N) => (o.value || 0) - (N.value || 0)
446
446
  ), { nodes: at, links: lt } = st(n), J = ge();
447
447
  return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
448
448
  /* @__PURE__ */ h.jsxs(
449
- mt.svg,
449
+ dt.svg,
450
450
  {
451
451
  width: `${g}px`,
452
452
  height: `${p}px`,
@@ -477,14 +477,14 @@ function de(e) {
477
477
  ) : null,
478
478
  /* @__PURE__ */ h.jsxs("g", { transform: `translate(${A.left},${A.top})`, children: [
479
479
  t.filter((o) => o.position === "before").map((o) => o.layer),
480
- at.filter((o) => o.type === "source").map((o, _) => /* @__PURE__ */ h.jsx(
480
+ at.filter((o) => o.type === "source").map((o, N) => /* @__PURE__ */ h.jsx(
481
481
  "g",
482
482
  {
483
483
  onMouseEnter: () => {
484
- O(o);
484
+ D(o);
485
485
  },
486
486
  onMouseLeave: () => {
487
- O(void 0);
487
+ D(void 0);
488
488
  },
489
489
  children: /* @__PURE__ */ h.jsxs("g", { transform: `translate(${o.x0},${o.y0})`, children: [
490
490
  /* @__PURE__ */ h.jsx(
@@ -500,21 +500,21 @@ function de(e) {
500
500
  i || d ? /* @__PURE__ */ h.jsx(
501
501
  "foreignObject",
502
502
  {
503
- y: 0 - M / 2,
503
+ y: 0 - L / 2,
504
504
  x: 0 - a,
505
505
  width: a,
506
- height: (o.y1 || 0) - (o.y0 || 0) + M,
506
+ height: (o.y1 || 0) - (o.y0 || 0) + L,
507
507
  children: /* @__PURE__ */ h.jsxs(
508
508
  "div",
509
509
  {
510
510
  className: "flex flex-col gap-0.5 justify-center py-0 px-1.5",
511
511
  style: {
512
- height: `${(o.y1 || 0) - (o.y0 || 0) + M}px`,
512
+ height: `${(o.y1 || 0) - (o.y0 || 0) + L}px`,
513
513
  overflow: "visible"
514
514
  },
515
515
  children: [
516
516
  i ? /* @__PURE__ */ h.jsx(
517
- ft,
517
+ ct,
518
518
  {
519
519
  marginBottom: d ? "3xs" : "none",
520
520
  size: "sm",
@@ -532,7 +532,7 @@ function de(e) {
532
532
  }
533
533
  ) : null,
534
534
  d ? /* @__PURE__ */ h.jsx(
535
- ft,
535
+ ct,
536
536
  {
537
537
  marginBottom: "none",
538
538
  size: "sm",
@@ -546,7 +546,7 @@ function de(e) {
546
546
  color: o.color,
547
547
  ...I?.graphObjectValues
548
548
  },
549
- children: St(o.value, "NA", nt, N, j)
549
+ children: St(o.value, "NA", nt, S, b)
550
550
  }
551
551
  ) : null
552
552
  ]
@@ -556,16 +556,16 @@ function de(e) {
556
556
  ) : null
557
557
  ] })
558
558
  },
559
- _
559
+ N
560
560
  )),
561
- at.filter((o) => o.type === "target").map((o, _) => /* @__PURE__ */ h.jsx(
561
+ at.filter((o) => o.type === "target").map((o, N) => /* @__PURE__ */ h.jsx(
562
562
  "g",
563
563
  {
564
564
  onMouseEnter: () => {
565
- O(o);
565
+ D(o);
566
566
  },
567
567
  onMouseLeave: () => {
568
- O(void 0);
568
+ D(void 0);
569
569
  },
570
570
  children: /* @__PURE__ */ h.jsxs("g", { transform: `translate(${o.x0},${o.y0})`, children: [
571
571
  /* @__PURE__ */ h.jsx(
@@ -581,20 +581,20 @@ function de(e) {
581
581
  i || d ? /* @__PURE__ */ h.jsx(
582
582
  "foreignObject",
583
583
  {
584
- y: 0 - M / 2,
584
+ y: 0 - L / 2,
585
585
  x: z,
586
586
  width: l - z,
587
- height: (o.y1 || 0) - (o.y0 || 0) + M,
587
+ height: (o.y1 || 0) - (o.y0 || 0) + L,
588
588
  children: /* @__PURE__ */ h.jsxs(
589
589
  "div",
590
590
  {
591
591
  className: "flex flex-col gap-0.5 justify-center py-0 px-1.5",
592
592
  style: {
593
- height: `${(o.y1 || 0) - (o.y0 || 0) + M}px`
593
+ height: `${(o.y1 || 0) - (o.y0 || 0) + L}px`
594
594
  },
595
595
  children: [
596
596
  i ? /* @__PURE__ */ h.jsx(
597
- ft,
597
+ ct,
598
598
  {
599
599
  marginBottom: d ? "3xs" : "none",
600
600
  size: "sm",
@@ -612,7 +612,7 @@ function de(e) {
612
612
  }
613
613
  ) : null,
614
614
  d ? /* @__PURE__ */ h.jsx(
615
- ft,
615
+ ct,
616
616
  {
617
617
  size: "sm",
618
618
  leading: "none",
@@ -626,7 +626,7 @@ function de(e) {
626
626
  color: o.color,
627
627
  ...I?.graphObjectValues
628
628
  },
629
- children: St(o.value, "NA", nt, N, j)
629
+ children: St(o.value, "NA", nt, S, b)
630
630
  }
631
631
  ) : null
632
632
  ]
@@ -636,12 +636,12 @@ function de(e) {
636
636
  ) : null
637
637
  ] })
638
638
  },
639
- _
639
+ N
640
640
  )),
641
- /* @__PURE__ */ h.jsx("defs", { children: lt.map((o, _) => /* @__PURE__ */ h.jsxs(
641
+ /* @__PURE__ */ h.jsx("defs", { children: lt.map((o, N) => /* @__PURE__ */ h.jsxs(
642
642
  "linearGradient",
643
643
  {
644
- id: `${X}-gradient-${_}`,
644
+ id: `${X}-gradient-${N}`,
645
645
  x1: "0%",
646
646
  y1: "0%",
647
647
  x2: "100%",
@@ -670,48 +670,48 @@ function de(e) {
670
670
  )
671
671
  ]
672
672
  },
673
- _
673
+ N
674
674
  )) }),
675
- /* @__PURE__ */ h.jsx("g", { children: /* @__PURE__ */ h.jsx(Xt, { children: lt.map((o, _) => /* @__PURE__ */ h.jsx(
676
- mt.g,
675
+ /* @__PURE__ */ h.jsx("g", { children: /* @__PURE__ */ h.jsx(Xt, { children: lt.map((o, N) => /* @__PURE__ */ h.jsx(
676
+ dt.g,
677
677
  {
678
678
  className: "undp-viz-g-with-hover",
679
679
  onMouseEnter: (U) => {
680
- r(o.data), H(U.clientY), E(U.clientX), $?.(o);
680
+ r(o.data), H(U.clientY), E(U.clientX), w?.(o);
681
681
  },
682
682
  onMouseMove: (U) => {
683
683
  r(o.data), H(U.clientY), E(U.clientX);
684
684
  },
685
685
  onClick: () => {
686
- (S || D) && (// eslint-disable-next-line @typescript-eslint/no-explicit-any
687
- Ht(f, o.data) && Q ? (m(void 0), S?.(void 0)) : (m(o.data), S?.(o.data)));
686
+ (T || V) && (// eslint-disable-next-line @typescript-eslint/no-explicit-any
687
+ Ht(f, o.data) && Q ? (m(void 0), T?.(void 0)) : (m(o.data), T?.(o.data)));
688
688
  },
689
689
  onMouseLeave: () => {
690
- r(void 0), E(void 0), H(void 0), $?.(void 0);
690
+ r(void 0), E(void 0), H(void 0), w?.(void 0);
691
691
  },
692
692
  variants: {
693
693
  initial: {
694
- opacity: C ? (
694
+ opacity: O ? (
695
695
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
696
- o.source.name === C.name || // eslint-disable-next-line @typescript-eslint/no-explicit-any
697
- o.target.name === C.name ? 0.85 : W
698
- ) : (P.length !== 0 || T.length !== 0) && (P.indexOf(
696
+ o.source.name === O.name || // eslint-disable-next-line @typescript-eslint/no-explicit-any
697
+ o.target.name === O.name ? 0.85 : W
698
+ ) : (P.length !== 0 || C.length !== 0) && (P.indexOf(
699
699
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
700
700
  o.source.label
701
- ) !== -1 || T.indexOf(
701
+ ) !== -1 || C.indexOf(
702
702
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
703
703
  o.target.label
704
704
  ) !== -1) ? 0.85 : W
705
705
  },
706
706
  whileInView: {
707
- opacity: C ? (
707
+ opacity: O ? (
708
708
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
709
- o.source.name === C.name || // eslint-disable-next-line @typescript-eslint/no-explicit-any
710
- o.target.name === C.name ? 0.85 : W
711
- ) : (P.length !== 0 || T.length !== 0) && (P.indexOf(
709
+ o.source.name === O.name || // eslint-disable-next-line @typescript-eslint/no-explicit-any
710
+ o.target.name === O.name ? 0.85 : W
711
+ ) : (P.length !== 0 || C.length !== 0) && (P.indexOf(
712
712
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
713
713
  o.source.label
714
- ) !== -1 || T.indexOf(
714
+ ) !== -1 || C.indexOf(
715
715
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
716
716
  o.target.label
717
717
  ) !== -1) ? 0.85 : W,
@@ -722,11 +722,11 @@ function de(e) {
722
722
  animate: s ? "whileInView" : "initial",
723
723
  exit: { opacity: 0, transition: { duration: B.duration } },
724
724
  children: /* @__PURE__ */ h.jsx(
725
- mt.path,
725
+ dt.path,
726
726
  {
727
727
  d: J(o) || "",
728
728
  style: {
729
- stroke: `url(#${X}-gradient-${_})`,
729
+ stroke: `url(#${X}-gradient-${N})`,
730
730
  strokeWidth: o.width,
731
731
  fill: "none"
732
732
  },
@@ -755,18 +755,18 @@ function de(e) {
755
755
  ]
756
756
  }
757
757
  ),
758
- c && k && R && V ? /* @__PURE__ */ h.jsx(
758
+ c && v && R && _ ? /* @__PURE__ */ h.jsx(
759
759
  Rt,
760
760
  {
761
761
  data: c,
762
- body: k,
762
+ body: v,
763
763
  xPos: R,
764
- yPos: V,
764
+ yPos: _,
765
765
  backgroundStyle: I?.tooltip,
766
766
  className: Y?.tooltip
767
767
  }
768
768
  ) : null,
769
- D && f !== void 0 ? /* @__PURE__ */ h.jsx(
769
+ V && f !== void 0 ? /* @__PURE__ */ h.jsx(
770
770
  Wt,
771
771
  {
772
772
  open: f !== void 0,
@@ -777,8 +777,8 @@ function de(e) {
777
777
  "div",
778
778
  {
779
779
  className: "graph-modal-content m-0",
780
- dangerouslySetInnerHTML: typeof D == "string" ? { __html: Gt(D, f) } : void 0,
781
- children: typeof D == "function" ? D(f) : null
780
+ dangerouslySetInnerHTML: typeof V == "string" ? { __html: Gt(V, f) } : void 0,
781
+ children: typeof V == "function" ? V(f) : null
782
782
  }
783
783
  )
784
784
  }
@@ -794,26 +794,26 @@ function Ve(e) {
794
794
  showLabels: y = !0,
795
795
  leftMargin: g = 75,
796
796
  rightMargin: p = 75,
797
- topMargin: v = 30,
798
- bottomMargin: b = 10,
799
- truncateBy: k = 999,
800
- height: $,
801
- width: j,
802
- footNote: N,
797
+ topMargin: x = 30,
798
+ bottomMargin: k = 10,
799
+ truncateBy: v = 999,
800
+ height: w,
801
+ width: b,
802
+ footNote: S,
803
803
  padding: d,
804
- backgroundColor: S,
805
- tooltip: M,
804
+ backgroundColor: T,
805
+ tooltip: L,
806
806
  onSeriesMouseOver: z,
807
807
  suffix: X = "",
808
808
  prefix: P = "",
809
- relativeHeight: T,
809
+ relativeHeight: C,
810
810
  showValues: W = !0,
811
811
  graphID: tt,
812
812
  onSeriesMouseClick: et,
813
813
  graphDownload: B = !1,
814
814
  dataDownload: F = !1,
815
815
  fillContainer: Q = !0,
816
- language: D = "en",
816
+ language: V = "en",
817
817
  minHeight: I = 0,
818
818
  theme: Y = "light",
819
819
  ariaLabel: nt,
@@ -824,11 +824,11 @@ function Ve(e) {
824
824
  nodePadding: r = 5,
825
825
  nodeWidth: f = 5,
826
826
  highlightedSourceDataPoints: m = [],
827
- highlightedTargetDataPoints: C = [],
828
- defaultLinkOpacity: O = 0.3,
827
+ highlightedTargetDataPoints: O = [],
828
+ defaultLinkOpacity: D = 0.3,
829
829
  sourceTitle: R,
830
830
  targetTitle: E,
831
- sortNodes: V = "mostReadable",
831
+ sortNodes: _ = "mostReadable",
832
832
  resetSelectionOnDoubleClick: H = !0,
833
833
  detailsOnClick: A,
834
834
  styles: G,
@@ -836,68 +836,68 @@ function Ve(e) {
836
836
  animate: st = !1,
837
837
  precision: at = 2,
838
838
  customLayers: lt = []
839
- } = e, [J, o] = Z(0), [_, U] = Z(0), [Lt, At] = Z(void 0), it = wt(null), Mt = wt(null);
840
- return _t(() => {
841
- const L = ot(n, "source").map((w) => ({
842
- name: `source_${w.source}`,
839
+ } = e, [J, o] = Z(0), [N, U] = Z(0), [jt, At] = Z(void 0), it = vt(null), $t = vt(null);
840
+ return Mt(() => {
841
+ const j = ot(n, "source", !0).map((M) => ({
842
+ name: `source_${M}`,
843
843
  type: "source",
844
- label: `${w.source}`,
845
- color: typeof t == "string" || !t ? t || Tt.graphMainColor : t[(s || ot(n, "source").map((x) => `${x.source}`)).findIndex(
846
- (x) => `${x}` == `${w.source}`
847
- ) > t.length ? t.length - 1 : (s || ot(n, "source").map((x) => `${x.source}`)).findIndex(
848
- (x) => `${x}` == `${w.source}`
844
+ label: `${M}`,
845
+ color: typeof t == "string" || !t ? t || Tt.graphMainColor : t[(s || ot(n, "source", !0)).findIndex(
846
+ ($) => `${$}` == `${M}`
847
+ ) > t.length ? t.length - 1 : (s || ot(n, "source", !0)).findIndex(
848
+ ($) => `${$}` == `${M}`
849
849
  )],
850
- totalValue: Nt(n.filter((x) => `${x.source}` == `${w.source}`).map((x) => x.value))
851
- })), ut = V === "asc" ? ct(L, (w) => w.totalValue) : V === "desc" ? ct(L, (w) => w.totalValue).reverse() : L, dt = ot(n, "target").map((w) => ({
852
- name: `target_${w.target}`,
850
+ totalValue: _t(n.filter(($) => `${$.source}` == `${M}`).map(($) => $.value))
851
+ })), ut = _ === "asc" || _ === "desc" ? Nt(j, ["totalValue"], [_]) : j, Lt = ot(n, "target", !0).map((M) => ({
852
+ name: `target_${M}`,
853
853
  type: "target",
854
- label: `${w.target}`,
855
- color: typeof u == "string" || !u ? u || Tt.graphMainColor : u[(c || ot(n, "target").map((x) => `${x.target}`)).findIndex(
856
- (x) => `${x}` == `${w.target}`
857
- ) > u.length ? u.length - 1 : (c || ot(n, "target").map((x) => `${x.target}`)).findIndex(
858
- (x) => `${x}` == `${w.target}`
854
+ label: `${M}`,
855
+ color: typeof u == "string" || !u ? u || Tt.graphMainColor : u[(c || ot(n, "target", !0)).findIndex(
856
+ ($) => `${$}` == `${M}`
857
+ ) > u.length ? u.length - 1 : (c || ot(n, "target", !0)).findIndex(
858
+ ($) => `${$}` == `${M}`
859
859
  )],
860
- totalValue: Nt(n.filter((x) => `${x.target}` == `${w.target}`).map((x) => x.value))
861
- })), Et = V === "asc" ? ct(dt, (w) => w.totalValue) : V === "desc" ? ct(dt, (w) => w.totalValue).reverse() : dt, pt = [...ut, ...Et];
860
+ totalValue: _t(n.filter(($) => `${$.target}` == `${M}`).map(($) => $.value))
861
+ })), Et = _ === "asc" || _ === "desc" ? Nt(Lt, ["totalValue"], [_]) : Lt, gt = [...ut, ...Et];
862
862
  At({
863
- nodes: pt,
864
- links: n.map((w) => ({
865
- source: pt.findIndex((x) => x.name === `source_${w.source}`),
866
- target: pt.findIndex((x) => x.name === `target_${w.target}`),
867
- value: w.value,
868
- data: { ...w }
863
+ nodes: gt,
864
+ links: n.map((M) => ({
865
+ source: gt.findIndex(($) => $.name === `source_${M.source}`),
866
+ target: gt.findIndex(($) => $.name === `target_${M.target}`),
867
+ value: M.value,
868
+ data: { ...M }
869
869
  }))
870
870
  });
871
- }, [n, V, s, t, c, u]), _t(() => {
872
- const L = new ResizeObserver((ut) => {
873
- o(j || ut[0].target.clientWidth || 620), U($ || ut[0].target.clientHeight || 480);
871
+ }, [n, _, s, t, c, u]), Mt(() => {
872
+ const j = new ResizeObserver((ut) => {
873
+ o(b || ut[0].target.clientWidth || 620), U(w || ut[0].target.clientHeight || 480);
874
874
  });
875
- return it.current && (U(it.current.clientHeight || 480), o(it.current.clientWidth || 620), j || L.observe(it.current)), () => L.disconnect();
876
- }, [j, $]), /* @__PURE__ */ h.jsx(
875
+ return it.current && (U(it.current.clientHeight || 480), o(it.current.clientWidth || 620), b || j.observe(it.current)), () => j.disconnect();
876
+ }, [b, w]), /* @__PURE__ */ h.jsx(
877
877
  "div",
878
878
  {
879
- className: `${Y || "light"} flex ${j ? "grow-0" : "grow"} ${Q ? "w-full" : "w-fit"} `,
880
- dir: D === "he" || D === "ar" ? "rtl" : void 0,
879
+ className: `${Y || "light"} flex ${b ? "grow-0" : "grow"} ${Q ? "w-full" : "w-fit"} `,
880
+ dir: V === "he" || V === "ar" ? "rtl" : void 0,
881
881
  children: /* @__PURE__ */ h.jsx(
882
882
  "div",
883
883
  {
884
884
  className: rt(
885
- `${S ? S === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D || "en"}`,
885
+ `${T ? T === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V || "en"}`,
886
886
  Q ? "w-full" : "w-fit",
887
887
  q?.graphContainer
888
888
  ),
889
889
  style: {
890
890
  ...G?.graphContainer || {},
891
- ...S && S !== !0 ? { backgroundColor: S } : {}
891
+ ...T && T !== !0 ? { backgroundColor: T } : {}
892
892
  },
893
893
  id: tt,
894
- ref: Mt,
894
+ ref: $t,
895
895
  "aria-label": nt || `${i ? `The graph shows ${i}. ` : ""}This is a sankey chart showing flow. ${l ? ` ${l}` : ""}`,
896
896
  children: /* @__PURE__ */ h.jsx(
897
897
  "div",
898
898
  {
899
899
  className: "flex grow",
900
- style: { padding: S ? d || "1rem" : d || 0 },
900
+ style: { padding: T ? d || "1rem" : d || 0 },
901
901
  children: /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col gap-4 w-full grow justify-between", children: [
902
902
  i || l || B || F ? /* @__PURE__ */ h.jsx(
903
903
  Ft,
@@ -912,9 +912,9 @@ function Ve(e) {
912
912
  },
913
913
  graphTitle: i,
914
914
  graphDescription: l,
915
- width: j,
916
- graphDownload: B ? Mt.current : void 0,
917
- dataDownload: F ? n.map((L) => L.data).filter((L) => L !== void 0).length > 0 ? n.map((L) => L.data).filter((L) => L !== void 0) : n.filter((L) => L !== void 0) : null
915
+ width: b,
916
+ graphDownload: B ? $t.current : void 0,
917
+ dataDownload: F ? n.map((j) => j.data).filter((j) => j !== void 0).length > 0 ? n.map((j) => j.data).filter((j) => j !== void 0) : n.filter((j) => j !== void 0) : null
918
918
  }
919
919
  ) : null,
920
920
  /* @__PURE__ */ h.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ h.jsx(Zt, {}) : /* @__PURE__ */ h.jsx(
@@ -923,36 +923,36 @@ function Ve(e) {
923
923
  className: "flex flex-col grow justify-center gap-3 w-full leading-0",
924
924
  ref: it,
925
925
  "aria-label": "Graph area",
926
- children: (j || J) && ($ || _) && Lt ? /* @__PURE__ */ h.jsx(
926
+ children: (b || J) && (w || N) && jt ? /* @__PURE__ */ h.jsx(
927
927
  de,
928
928
  {
929
- data: Lt,
930
- width: j || J,
929
+ data: jt,
930
+ width: b || J,
931
931
  nodePadding: r,
932
932
  nodeWidth: f,
933
933
  height: Math.max(
934
934
  I,
935
- $ || (T ? I ? (j || J) * T > I ? (j || J) * T : I : (j || J) * T : _)
935
+ w || (C ? I ? (b || J) * C > I ? (b || J) * C : I : (b || J) * C : N)
936
936
  ),
937
937
  showLabels: y,
938
938
  leftMargin: g,
939
939
  rightMargin: p,
940
- topMargin: v,
941
- bottomMargin: b,
942
- truncateBy: k,
943
- tooltip: M,
940
+ topMargin: x,
941
+ bottomMargin: k,
942
+ truncateBy: v,
943
+ tooltip: L,
944
944
  onSeriesMouseOver: z,
945
945
  showValues: W,
946
946
  suffix: X,
947
947
  prefix: P,
948
948
  onSeriesMouseClick: et,
949
949
  id: Ut(8),
950
- highlightedSourceDataPoints: m.map((L) => `${L}`),
951
- highlightedTargetDataPoints: C.map((L) => `${L}`),
952
- defaultLinkOpacity: O,
950
+ highlightedSourceDataPoints: m.map((j) => `${j}`),
951
+ highlightedTargetDataPoints: O.map((j) => `${j}`),
952
+ defaultLinkOpacity: D,
953
953
  sourceTitle: R,
954
954
  targetTitle: E,
955
- sortNodes: V,
955
+ sortNodes: _,
956
956
  resetSelectionOnDoubleClick: H,
957
957
  styles: G,
958
958
  classNames: q,
@@ -964,7 +964,7 @@ function Ve(e) {
964
964
  ) : null
965
965
  }
966
966
  ) }),
967
- a || N ? /* @__PURE__ */ h.jsx(
967
+ a || S ? /* @__PURE__ */ h.jsx(
968
968
  Yt,
969
969
  {
970
970
  styles: { footnote: G?.footnote, source: G?.source },
@@ -973,8 +973,8 @@ function Ve(e) {
973
973
  source: q?.source
974
974
  },
975
975
  sources: a,
976
- footNote: N,
977
- width: j
976
+ footNote: S,
977
+ width: b
978
978
  }
979
979
  ) : null
980
980
  ] })