@undp/data-viz 2.0.9 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +4 -4
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1699 -1577
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +252 -245
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +566 -536
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +388 -378
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +297 -291
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +4 -4
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +252 -244
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +4 -4
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +563 -525
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-DEzobeOM.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-DEzobeOM.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +112 -117
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +3 -3
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +366 -359
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +4 -4
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.cjs.map +1 -1
  108. package/dist/MultiLineAltChart.d.ts +2 -0
  109. package/dist/MultiLineAltChart.js +453 -425
  110. package/dist/MultiLineAltChart.js.map +1 -1
  111. package/dist/MultiLineChart.cjs +1 -1
  112. package/dist/MultiLineChart.d.ts +2 -0
  113. package/dist/MultiLineChart.js +4 -4
  114. package/dist/ParetoChart.cjs +1 -1
  115. package/dist/ParetoChart.cjs.map +1 -1
  116. package/dist/ParetoChart.d.ts +2 -0
  117. package/dist/ParetoChart.js +188 -193
  118. package/dist/ParetoChart.js.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  122. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  123. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  124. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  125. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  126. package/dist/RadarChart.cjs +1 -1
  127. package/dist/RadarChart.cjs.map +1 -1
  128. package/dist/RadarChart.d.ts +2 -0
  129. package/dist/RadarChart.js +158 -163
  130. package/dist/RadarChart.js.map +1 -1
  131. package/dist/SankeyChart.cjs +1 -1
  132. package/dist/SankeyChart.cjs.map +1 -1
  133. package/dist/SankeyChart.d.ts +2 -0
  134. package/dist/SankeyChart.js +172 -177
  135. package/dist/SankeyChart.js.map +1 -1
  136. package/dist/ScatterPlot.cjs +1 -1
  137. package/dist/ScatterPlot.cjs.map +1 -1
  138. package/dist/ScatterPlot.d.ts +2 -0
  139. package/dist/ScatterPlot.js +494 -483
  140. package/dist/ScatterPlot.js.map +1 -1
  141. package/dist/ScrollStory.d.ts +2 -0
  142. package/dist/SimpleLineChart.cjs +1 -1
  143. package/dist/SimpleLineChart.d.ts +2 -0
  144. package/dist/SimpleLineChart.js +4 -4
  145. package/dist/SingleGraphDashboard.cjs +1 -1
  146. package/dist/SingleGraphDashboard.cjs.map +1 -1
  147. package/dist/SingleGraphDashboard.d.ts +2 -0
  148. package/dist/SingleGraphDashboard.js +24 -24
  149. package/dist/SingleGraphDashboard.js.map +1 -1
  150. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  152. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  153. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  154. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  155. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  156. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  157. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  158. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  159. package/dist/SlopeChart.cjs +1 -1
  160. package/dist/SlopeChart.cjs.map +1 -1
  161. package/dist/SlopeChart.d.ts +2 -0
  162. package/dist/SlopeChart.js +182 -187
  163. package/dist/SlopeChart.js.map +1 -1
  164. package/dist/SparkLine.cjs +1 -1
  165. package/dist/SparkLine.d.ts +2 -0
  166. package/dist/SparkLine.js +4 -4
  167. package/dist/StatCardFromData.d.ts +2 -0
  168. package/dist/StripChart.cjs +1 -1
  169. package/dist/StripChart.cjs.map +1 -1
  170. package/dist/StripChart.d.ts +2 -0
  171. package/dist/StripChart.js +249 -258
  172. package/dist/StripChart.js.map +1 -1
  173. package/dist/ThreeDGlobe.cjs +1 -1
  174. package/dist/ThreeDGlobe.cjs.map +1 -1
  175. package/dist/ThreeDGlobe.d.ts +2 -0
  176. package/dist/ThreeDGlobe.js +142 -147
  177. package/dist/ThreeDGlobe.js.map +1 -1
  178. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  179. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  180. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  181. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  182. package/dist/TreeMapGraph.cjs +1 -1
  183. package/dist/TreeMapGraph.cjs.map +1 -1
  184. package/dist/TreeMapGraph.d.ts +2 -0
  185. package/dist/TreeMapGraph.js +159 -164
  186. package/dist/TreeMapGraph.js.map +1 -1
  187. package/dist/Types.d.ts +2 -0
  188. package/dist/UnitChart.d.ts +2 -0
  189. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  190. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  191. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  192. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  193. package/dist/index-CF5hnGvG.cjs +2 -0
  194. package/dist/index-CF5hnGvG.cjs.map +1 -0
  195. package/dist/index-DPGq3eIL.js +330 -0
  196. package/dist/index-DPGq3eIL.js.map +1 -0
  197. package/dist/index.cjs +1 -1
  198. package/dist/index.d.ts +2 -0
  199. package/dist/index.js +1 -1
  200. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  201. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  202. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  203. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  204. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  205. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  206. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  207. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  208. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  209. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  210. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  211. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  212. package/package.json +4 -4
  213. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  214. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  215. package/dist/Tooltip-CwWUegPB.js +0 -43
  216. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  217. package/dist/index-B2LQV7Tk.js +0 -335
  218. package/dist/index-B2LQV7Tk.js.map +0 -1
  219. package/dist/index-xRHRLDIp.cjs +0 -2
  220. package/dist/index-xRHRLDIp.cjs.map +0 -1
  221. package/dist/sort-BIvMlUH1.js +0 -34
  222. package/dist/sort-BIvMlUH1.js.map +0 -1
  223. package/dist/sort-O96oMZLb.cjs +0 -2
  224. package/dist/sort-O96oMZLb.cjs.map +0 -1
@@ -1,296 +1,291 @@
1
- import { c as de, j as y, m as ge } from "./index-CHPV5EwG-Curnpaqc.js";
1
+ import { c as de, j as v, m as ge } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { useState as Z, useRef as ue, useEffect as pe } from "react";
3
3
  import { v as he, j as ie } from "./Typography-PxtFcnJb.js";
4
4
  import { o as ye } from "./index-BZQYSqar.js";
5
5
  import { n as xe } from "./Source-DwTHB8fn.js";
6
6
  import { i as ve } from "./index-Bwrro8-q.js";
7
- import { l as be } from "./Modal-DGcuAHyK.js";
8
- import { T as je } from "./Tooltip-CwWUegPB.js";
7
+ import { T as be } from "./Tooltip-Dj5eVppQ.js";
9
8
  import { Colors as _ } from "./Colors.js";
10
9
  import { n as me } from "./numberFormattingFunction-14YCbkN2.js";
11
- import { s as Ae } from "./string2HTML-DhG75NqA.js";
12
- import { w as Me, c as $, a as Ne } from "./array-B7TkkRH0.js";
13
- import { GraphFooter as Ce } from "./GraphFooter.js";
14
- import { GraphHeader as De } from "./GraphHeader.js";
15
- import { E as Re } from "./EmptyState-BZo1BbAn.js";
16
- import { G as ke, a as we } from "./GraphContainer-CRqzdKu2.js";
17
- const ce = Math.abs, P = Math.atan2, Q = Math.cos, Oe = Math.max, oe = Math.min, V = Math.sin, U = Math.sqrt, F = 1e-12, ee = Math.PI, re = ee / 2, te = 2 * ee;
18
- function Te(a) {
19
- return a > 1 ? 0 : a < -1 ? ee : Math.acos(a);
10
+ import { D as Ae } from "./DetailsModal-0Ry5nXiC.js";
11
+ import { w as je, c as B, a as Me } from "./array-B7TkkRH0.js";
12
+ import { GraphFooter as De } from "./GraphFooter.js";
13
+ import { GraphHeader as Ne } from "./GraphHeader.js";
14
+ import { E as Ce } from "./EmptyState-BZo1BbAn.js";
15
+ import { G as Re, a as ke } from "./GraphContainer-CRqzdKu2.js";
16
+ const ce = Math.abs, P = Math.atan2, Q = Math.cos, we = Math.max, oe = Math.min, V = Math.sin, U = Math.sqrt, W = 1e-12, ee = Math.PI, ae = ee / 2, te = 2 * ee;
17
+ function Oe(r) {
18
+ return r > 1 ? 0 : r < -1 ? ee : Math.acos(r);
20
19
  }
21
- function fe(a) {
22
- return a >= 1 ? re : a <= -1 ? -re : Math.asin(a);
20
+ function fe(r) {
21
+ return r >= 1 ? ae : r <= -1 ? -ae : Math.asin(r);
23
22
  }
24
- function Se(a) {
25
- return a.innerRadius;
23
+ function Te(r) {
24
+ return r.innerRadius;
26
25
  }
27
- function ze(a) {
28
- return a.outerRadius;
26
+ function Se(r) {
27
+ return r.outerRadius;
29
28
  }
30
- function Ee(a) {
31
- return a.startAngle;
29
+ function ze(r) {
30
+ return r.startAngle;
32
31
  }
33
- function Pe(a) {
34
- return a.endAngle;
32
+ function Ee(r) {
33
+ return r.endAngle;
35
34
  }
36
- function Ge(a) {
37
- return a && a.padAngle;
35
+ function Pe(r) {
36
+ return r && r.padAngle;
38
37
  }
39
- function Ie(a, e, c, j, l, A, m, n) {
40
- var d = c - a, s = j - e, t = m - l, M = n - A, r = M * d - t * s;
41
- if (!(r * r < F))
42
- return r = (t * (e - A) - M * (a - l)) / r, [a + r * d, e + r * s];
38
+ function Ge(r, e, c, A, l, j, f, n) {
39
+ var m = c - r, i = A - e, t = f - l, M = n - j, a = M * m - t * i;
40
+ if (!(a * a < W))
41
+ return a = (t * (e - j) - M * (r - l)) / a, [r + a * m, e + a * i];
43
42
  }
44
- function ne(a, e, c, j, l, A, m) {
45
- var n = a - c, d = e - j, s = (m ? A : -A) / U(n * n + d * d), t = s * d, M = -s * n, r = a + t, i = e + M, h = c + t, v = j + M, T = (r + h) / 2, g = (i + v) / 2, x = h - r, C = v - i, f = x * x + C * C, b = l - A, N = r * v - h * i, G = (C < 0 ? -1 : 1) * U(Oe(0, b * b * f - N * N)), I = (N * C - x * G) / f, E = (-N * x - C * G) / f, R = (N * C + x * G) / f, k = (-N * x + C * G) / f, w = I - T, o = E - g, u = R - T, L = k - g;
46
- return w * w + o * o > u * u + L * L && (I = R, E = k), {
47
- cx: I,
43
+ function ne(r, e, c, A, l, j, f) {
44
+ var n = r - c, m = e - A, i = (f ? j : -j) / U(n * n + m * m), t = i * m, M = -i * n, a = r + t, s = e + M, y = c + t, h = A + M, T = (a + y) / 2, d = (s + h) / 2, x = y - a, N = h - s, g = x * x + N * N, b = l - j, D = a * h - y * s, G = (N < 0 ? -1 : 1) * U(we(0, b * b * g - D * D)), $ = (D * N - x * G) / g, E = (-D * x - N * G) / g, R = (D * N + x * G) / g, k = (-D * x + N * G) / g, w = $ - T, o = E - d, u = R - T, H = k - d;
45
+ return w * w + o * o > u * u + H * H && ($ = R, E = k), {
46
+ cx: $,
48
47
  cy: E,
49
48
  x01: -t,
50
49
  y01: -M,
51
- x11: I * (l / b - 1),
50
+ x11: $ * (l / b - 1),
52
51
  y11: E * (l / b - 1)
53
52
  };
54
53
  }
55
54
  function $e() {
56
- var a = Se, e = ze, c = $(0), j = null, l = Ee, A = Pe, m = Ge, n = null, d = Me(s);
57
- function s() {
58
- var t, M, r = +a.apply(this, arguments), i = +e.apply(this, arguments), h = l.apply(this, arguments) - re, v = A.apply(this, arguments) - re, T = ce(v - h), g = v > h;
59
- if (n || (n = t = d()), i < r && (M = i, i = r, r = M), !(i > F)) n.moveTo(0, 0);
60
- else if (T > te - F)
61
- n.moveTo(i * Q(h), i * V(h)), n.arc(0, 0, i, h, v, !g), r > F && (n.moveTo(r * Q(v), r * V(v)), n.arc(0, 0, r, v, h, g));
55
+ var r = Te, e = Se, c = B(0), A = null, l = ze, j = Ee, f = Pe, n = null, m = je(i);
56
+ function i() {
57
+ var t, M, a = +r.apply(this, arguments), s = +e.apply(this, arguments), y = l.apply(this, arguments) - ae, h = j.apply(this, arguments) - ae, T = ce(h - y), d = h > y;
58
+ if (n || (n = t = m()), s < a && (M = s, s = a, a = M), !(s > W)) n.moveTo(0, 0);
59
+ else if (T > te - W)
60
+ n.moveTo(s * Q(y), s * V(y)), n.arc(0, 0, s, y, h, !d), a > W && (n.moveTo(a * Q(h), a * V(h)), n.arc(0, 0, a, h, y, d));
62
61
  else {
63
- var x = h, C = v, f = h, b = v, N = T, G = T, I = m.apply(this, arguments) / 2, E = I > F && (j ? +j.apply(this, arguments) : U(r * r + i * i)), R = oe(ce(i - r) / 2, +c.apply(this, arguments)), k = R, w = R, o, u;
64
- if (E > F) {
65
- var L = fe(E / r * V(I)), W = fe(E / i * V(I));
66
- (N -= L * 2) > F ? (L *= g ? 1 : -1, f += L, b -= L) : (N = 0, f = b = (h + v) / 2), (G -= W * 2) > F ? (W *= g ? 1 : -1, x += W, C -= W) : (G = 0, x = C = (h + v) / 2);
62
+ var x = y, N = h, g = y, b = h, D = T, G = T, $ = f.apply(this, arguments) / 2, E = $ > W && (A ? +A.apply(this, arguments) : U(a * a + s * s)), R = oe(ce(s - a) / 2, +c.apply(this, arguments)), k = R, w = R, o, u;
63
+ if (E > W) {
64
+ var H = fe(E / a * V($)), X = fe(E / s * V($));
65
+ (D -= H * 2) > W ? (H *= d ? 1 : -1, g += H, b -= H) : (D = 0, g = b = (y + h) / 2), (G -= X * 2) > W ? (X *= d ? 1 : -1, x += X, N -= X) : (G = 0, x = N = (y + h) / 2);
67
66
  }
68
- var X = i * Q(x), S = i * V(x), O = r * Q(b), B = r * V(b);
69
- if (R > F) {
70
- var H = i * Q(C), Y = i * V(C), q = r * Q(f), D = r * V(f), z;
67
+ var Y = s * Q(x), S = s * V(x), O = a * Q(b), I = a * V(b);
68
+ if (R > W) {
69
+ var F = s * Q(N), q = s * V(N), L = a * Q(g), C = a * V(g), z;
71
70
  if (T < ee)
72
- if (z = Ie(X, S, q, D, H, Y, O, B)) {
73
- var p = X - z[0], J = S - z[1], K = H - z[0], ae = Y - z[1], se = 1 / V(Te((p * K + J * ae) / (U(p * p + J * J) * U(K * K + ae * ae))) / 2), le = U(z[0] * z[0] + z[1] * z[1]);
74
- k = oe(R, (r - le) / (se - 1)), w = oe(R, (i - le) / (se + 1));
71
+ if (z = Ge(Y, S, L, C, F, q, O, I)) {
72
+ var p = Y - z[0], J = S - z[1], K = F - z[0], re = q - z[1], se = 1 / V(Oe((p * K + J * re) / (U(p * p + J * J) * U(K * K + re * re))) / 2), le = U(z[0] * z[0] + z[1] * z[1]);
73
+ k = oe(R, (a - le) / (se - 1)), w = oe(R, (s - le) / (se + 1));
75
74
  } else
76
75
  k = w = 0;
77
76
  }
78
- G > F ? w > F ? (o = ne(q, D, X, S, i, w, g), u = ne(H, Y, O, B, i, w, g), n.moveTo(o.cx + o.x01, o.cy + o.y01), w < R ? n.arc(o.cx, o.cy, w, P(o.y01, o.x01), P(u.y01, u.x01), !g) : (n.arc(o.cx, o.cy, w, P(o.y01, o.x01), P(o.y11, o.x11), !g), n.arc(0, 0, i, P(o.cy + o.y11, o.cx + o.x11), P(u.cy + u.y11, u.cx + u.x11), !g), n.arc(u.cx, u.cy, w, P(u.y11, u.x11), P(u.y01, u.x01), !g))) : (n.moveTo(X, S), n.arc(0, 0, i, x, C, !g)) : n.moveTo(X, S), !(r > F) || !(N > F) ? n.lineTo(O, B) : k > F ? (o = ne(O, B, H, Y, r, -k, g), u = ne(X, S, q, D, r, -k, g), n.lineTo(o.cx + o.x01, o.cy + o.y01), k < R ? n.arc(o.cx, o.cy, k, P(o.y01, o.x01), P(u.y01, u.x01), !g) : (n.arc(o.cx, o.cy, k, P(o.y01, o.x01), P(o.y11, o.x11), !g), n.arc(0, 0, r, P(o.cy + o.y11, o.cx + o.x11), P(u.cy + u.y11, u.cx + u.x11), g), n.arc(u.cx, u.cy, k, P(u.y11, u.x11), P(u.y01, u.x01), !g))) : n.arc(0, 0, r, b, f, g);
77
+ G > W ? w > W ? (o = ne(L, C, Y, S, s, w, d), u = ne(F, q, O, I, s, w, d), n.moveTo(o.cx + o.x01, o.cy + o.y01), w < R ? n.arc(o.cx, o.cy, w, P(o.y01, o.x01), P(u.y01, u.x01), !d) : (n.arc(o.cx, o.cy, w, P(o.y01, o.x01), P(o.y11, o.x11), !d), n.arc(0, 0, s, P(o.cy + o.y11, o.cx + o.x11), P(u.cy + u.y11, u.cx + u.x11), !d), n.arc(u.cx, u.cy, w, P(u.y11, u.x11), P(u.y01, u.x01), !d))) : (n.moveTo(Y, S), n.arc(0, 0, s, x, N, !d)) : n.moveTo(Y, S), !(a > W) || !(D > W) ? n.lineTo(O, I) : k > W ? (o = ne(O, I, F, q, a, -k, d), u = ne(Y, S, L, C, a, -k, d), n.lineTo(o.cx + o.x01, o.cy + o.y01), k < R ? n.arc(o.cx, o.cy, k, P(o.y01, o.x01), P(u.y01, u.x01), !d) : (n.arc(o.cx, o.cy, k, P(o.y01, o.x01), P(o.y11, o.x11), !d), n.arc(0, 0, a, P(o.cy + o.y11, o.cx + o.x11), P(u.cy + u.y11, u.cx + u.x11), d), n.arc(u.cx, u.cy, k, P(u.y11, u.x11), P(u.y01, u.x01), !d))) : n.arc(0, 0, a, b, g, d);
79
78
  }
80
79
  if (n.closePath(), t) return n = null, t + "" || null;
81
80
  }
82
- return s.centroid = function() {
83
- var t = (+a.apply(this, arguments) + +e.apply(this, arguments)) / 2, M = (+l.apply(this, arguments) + +A.apply(this, arguments)) / 2 - ee / 2;
81
+ return i.centroid = function() {
82
+ var t = (+r.apply(this, arguments) + +e.apply(this, arguments)) / 2, M = (+l.apply(this, arguments) + +j.apply(this, arguments)) / 2 - ee / 2;
84
83
  return [Q(M) * t, V(M) * t];
85
- }, s.innerRadius = function(t) {
86
- return arguments.length ? (a = typeof t == "function" ? t : $(+t), s) : a;
87
- }, s.outerRadius = function(t) {
88
- return arguments.length ? (e = typeof t == "function" ? t : $(+t), s) : e;
89
- }, s.cornerRadius = function(t) {
90
- return arguments.length ? (c = typeof t == "function" ? t : $(+t), s) : c;
91
- }, s.padRadius = function(t) {
92
- return arguments.length ? (j = t == null ? null : typeof t == "function" ? t : $(+t), s) : j;
93
- }, s.startAngle = function(t) {
94
- return arguments.length ? (l = typeof t == "function" ? t : $(+t), s) : l;
95
- }, s.endAngle = function(t) {
96
- return arguments.length ? (A = typeof t == "function" ? t : $(+t), s) : A;
97
- }, s.padAngle = function(t) {
98
- return arguments.length ? (m = typeof t == "function" ? t : $(+t), s) : m;
99
- }, s.context = function(t) {
100
- return arguments.length ? (n = t ?? null, s) : n;
101
- }, s;
84
+ }, i.innerRadius = function(t) {
85
+ return arguments.length ? (r = typeof t == "function" ? t : B(+t), i) : r;
86
+ }, i.outerRadius = function(t) {
87
+ return arguments.length ? (e = typeof t == "function" ? t : B(+t), i) : e;
88
+ }, i.cornerRadius = function(t) {
89
+ return arguments.length ? (c = typeof t == "function" ? t : B(+t), i) : c;
90
+ }, i.padRadius = function(t) {
91
+ return arguments.length ? (A = t == null ? null : typeof t == "function" ? t : B(+t), i) : A;
92
+ }, i.startAngle = function(t) {
93
+ return arguments.length ? (l = typeof t == "function" ? t : B(+t), i) : l;
94
+ }, i.endAngle = function(t) {
95
+ return arguments.length ? (j = typeof t == "function" ? t : B(+t), i) : j;
96
+ }, i.padAngle = function(t) {
97
+ return arguments.length ? (f = typeof t == "function" ? t : B(+t), i) : f;
98
+ }, i.context = function(t) {
99
+ return arguments.length ? (n = t ?? null, i) : n;
100
+ }, i;
102
101
  }
103
- function Be(a, e) {
104
- return e < a ? -1 : e > a ? 1 : e >= a ? 0 : NaN;
102
+ function Be(r, e) {
103
+ return e < r ? -1 : e > r ? 1 : e >= r ? 0 : NaN;
105
104
  }
106
- function He(a) {
107
- return a;
105
+ function Ie(r) {
106
+ return r;
108
107
  }
109
108
  function Fe() {
110
- var a = He, e = Be, c = null, j = $(0), l = $(te), A = $(0);
111
- function m(n) {
112
- var d, s = (n = Ne(n)).length, t, M, r = 0, i = new Array(s), h = new Array(s), v = +j.apply(this, arguments), T = Math.min(te, Math.max(-te, l.apply(this, arguments) - v)), g, x = Math.min(Math.abs(T) / s, A.apply(this, arguments)), C = x * (T < 0 ? -1 : 1), f;
113
- for (d = 0; d < s; ++d)
114
- (f = h[i[d] = d] = +a(n[d], d, n)) > 0 && (r += f);
115
- for (e != null ? i.sort(function(b, N) {
116
- return e(h[b], h[N]);
117
- }) : c != null && i.sort(function(b, N) {
118
- return c(n[b], n[N]);
119
- }), d = 0, M = r ? (T - s * C) / r : 0; d < s; ++d, v = g)
120
- t = i[d], f = h[t], g = v + (f > 0 ? f * M : 0) + C, h[t] = {
109
+ var r = Ie, e = Be, c = null, A = B(0), l = B(te), j = B(0);
110
+ function f(n) {
111
+ var m, i = (n = Me(n)).length, t, M, a = 0, s = new Array(i), y = new Array(i), h = +A.apply(this, arguments), T = Math.min(te, Math.max(-te, l.apply(this, arguments) - h)), d, x = Math.min(Math.abs(T) / i, j.apply(this, arguments)), N = x * (T < 0 ? -1 : 1), g;
112
+ for (m = 0; m < i; ++m)
113
+ (g = y[s[m] = m] = +r(n[m], m, n)) > 0 && (a += g);
114
+ for (e != null ? s.sort(function(b, D) {
115
+ return e(y[b], y[D]);
116
+ }) : c != null && s.sort(function(b, D) {
117
+ return c(n[b], n[D]);
118
+ }), m = 0, M = a ? (T - i * N) / a : 0; m < i; ++m, h = d)
119
+ t = s[m], g = y[t], d = h + (g > 0 ? g * M : 0) + N, y[t] = {
121
120
  data: n[t],
122
- index: d,
123
- value: f,
124
- startAngle: v,
125
- endAngle: g,
121
+ index: m,
122
+ value: g,
123
+ startAngle: h,
124
+ endAngle: d,
126
125
  padAngle: x
127
126
  };
128
- return h;
127
+ return y;
129
128
  }
130
- return m.value = function(n) {
131
- return arguments.length ? (a = typeof n == "function" ? n : $(+n), m) : a;
132
- }, m.sortValues = function(n) {
133
- return arguments.length ? (e = n, c = null, m) : e;
134
- }, m.sort = function(n) {
135
- return arguments.length ? (c = n, e = null, m) : c;
136
- }, m.startAngle = function(n) {
137
- return arguments.length ? (j = typeof n == "function" ? n : $(+n), m) : j;
138
- }, m.endAngle = function(n) {
139
- return arguments.length ? (l = typeof n == "function" ? n : $(+n), m) : l;
140
- }, m.padAngle = function(n) {
141
- return arguments.length ? (A = typeof n == "function" ? n : $(+n), m) : A;
142
- }, m;
129
+ return f.value = function(n) {
130
+ return arguments.length ? (r = typeof n == "function" ? n : B(+n), f) : r;
131
+ }, f.sortValues = function(n) {
132
+ return arguments.length ? (e = n, c = null, f) : e;
133
+ }, f.sort = function(n) {
134
+ return arguments.length ? (c = n, e = null, f) : c;
135
+ }, f.startAngle = function(n) {
136
+ return arguments.length ? (A = typeof n == "function" ? n : B(+n), f) : A;
137
+ }, f.endAngle = function(n) {
138
+ return arguments.length ? (l = typeof n == "function" ? n : B(+n), f) : l;
139
+ }, f.padAngle = function(n) {
140
+ return arguments.length ? (j = typeof n == "function" ? n : B(+n), f) : j;
141
+ }, f;
143
142
  }
144
- function Le(a) {
145
- const e = de.c(43), {
143
+ function We(r) {
144
+ const e = de.c(44), {
146
145
  mainText: c,
147
- data: j,
146
+ data: A,
148
147
  radius: l,
149
- colors: A,
150
- subNote: m,
148
+ colors: j,
149
+ subNote: f,
151
150
  strokeWidth: n,
152
- tooltip: d,
153
- onSeriesMouseOver: s,
151
+ tooltip: m,
152
+ onSeriesMouseOver: i,
154
153
  onSeriesMouseClick: t,
155
154
  colorDomain: M,
156
- resetSelectionOnDoubleClick: r,
157
- detailsOnClick: i,
158
- styles: h,
159
- classNames: v,
155
+ resetSelectionOnDoubleClick: a,
156
+ detailsOnClick: s,
157
+ styles: y,
158
+ classNames: h,
160
159
  precision: T
161
- } = a, g = Fe().sort(null).startAngle(0).value(We), [x, C] = Z(void 0), [f, b] = Z(void 0), [N, G] = Z(void 0), [I, E] = Z(void 0), R = `${l * 2}px`, k = `${l * 2}px`, w = `0 0 ${l * 2} ${l * 2}`, o = "ltr", u = "mx-auto", L = `translate(${l} ${l})`;
162
- let W;
163
- e[0] !== j || e[1] !== c || e[2] !== T || e[3] !== l || e[4] !== n || e[5] !== m ? (W = c || m ? /* @__PURE__ */ y.jsx("foreignObject", { y: 0 - (l - n), x: 0 - (l - n), width: 2 * (l - n), height: 2 * (l - n), children: /* @__PURE__ */ y.jsxs("div", { className: "flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4", children: [
164
- c ? /* @__PURE__ */ y.jsx(he, { marginBottom: "none", className: "donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center", children: typeof c == "string" ? c : j.findIndex((D) => D.label === c.label) !== -1 ? me(j[j.findIndex((D) => D.label === c.label)].size, "NA", T, c.prefix, c.suffix) : "NA" }) : null,
165
- m ? /* @__PURE__ */ y.jsx(ie, { marginBottom: "none", size: "base", leading: "none", className: "donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold", children: m }) : typeof c == "string" || !c ? null : /* @__PURE__ */ y.jsx(ie, { size: "base", marginBottom: "none", leading: "none", className: "donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold", children: c.label })
166
- ] }) }) : null, e[0] = j, e[1] = c, e[2] = T, e[3] = l, e[4] = n, e[5] = m, e[6] = W) : W = e[6];
160
+ } = r, d = Fe().sort(null).startAngle(0).value(He), [x, N] = Z(void 0), [g, b] = Z(void 0), [D, G] = Z(void 0), [$, E] = Z(void 0), R = `${l * 2}px`, k = `${l * 2}px`, w = `0 0 ${l * 2} ${l * 2}`, o = "ltr", u = "mx-auto", H = `translate(${l} ${l})`;
167
161
  let X;
168
- e[7] !== M || e[8] !== A || e[9] !== i || e[10] !== f || e[11] !== x || e[12] !== t || e[13] !== s || e[14] !== l || e[15] !== r || e[16] !== b || e[17] !== n ? (X = (D, z) => /* @__PURE__ */ y.jsx("path", { d: $e()({
162
+ e[0] !== A || e[1] !== c || e[2] !== T || e[3] !== l || e[4] !== n || e[5] !== f ? (X = c || f ? /* @__PURE__ */ v.jsx("foreignObject", { y: 0 - (l - n), x: 0 - (l - n), width: 2 * (l - n), height: 2 * (l - n), children: /* @__PURE__ */ v.jsxs("div", { className: "flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4", children: [
163
+ c ? /* @__PURE__ */ v.jsx(he, { marginBottom: "none", className: "donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center", children: typeof c == "string" ? c : A.findIndex((C) => C.label === c.label) !== -1 ? me(A[A.findIndex((C) => C.label === c.label)].size, "NA", T, c.prefix, c.suffix) : "NA" }) : null,
164
+ f ? /* @__PURE__ */ v.jsx(ie, { marginBottom: "none", size: "base", leading: "none", className: "donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold", children: f }) : typeof c == "string" || !c ? null : /* @__PURE__ */ v.jsx(ie, { size: "base", marginBottom: "none", leading: "none", className: "donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold", children: c.label })
165
+ ] }) }) : null, e[0] = A, e[1] = c, e[2] = T, e[3] = l, e[4] = n, e[5] = f, e[6] = X) : X = e[6];
166
+ let Y;
167
+ e[7] !== M || e[8] !== j || e[9] !== s || e[10] !== g || e[11] !== x || e[12] !== t || e[13] !== i || e[14] !== l || e[15] !== a || e[16] !== b || e[17] !== n ? (Y = (C, z) => /* @__PURE__ */ v.jsx("path", { d: $e()({
169
168
  innerRadius: l - n,
170
169
  outerRadius: l,
171
- startAngle: D.startAngle,
172
- endAngle: D.endAngle
170
+ startAngle: C.startAngle,
171
+ endAngle: C.endAngle
173
172
  }), style: {
174
- fill: M.indexOf(D.data.label) !== -1 ? A[M.indexOf(D.data.label) % A.length] : _.gray,
175
- opacity: x ? x.label === D.data.label ? 1 : 0.3 : 1
173
+ fill: M.indexOf(C.data.label) !== -1 ? j[M.indexOf(C.data.label) % j.length] : _.gray,
174
+ opacity: x ? x.label === C.data.label ? 1 : 0.3 : 1
176
175
  }, onMouseEnter: (p) => {
177
- C(D.data), E(p.clientY), G(p.clientX), s?.(D);
176
+ N(C.data), E(p.clientY), G(p.clientX), i?.(C);
178
177
  }, onClick: () => {
179
- (t || i) && (ve(f, D.data) && r ? (b(void 0), t?.(void 0)) : (b(D.data), t && t(D.data)));
178
+ (t || s) && (ve(g, C.data) && a ? (b(void 0), t?.(void 0)) : (b(C.data), t && t(C.data)));
180
179
  }, onMouseMove: (p) => {
181
- C(D.data), E(p.clientY), G(p.clientX);
180
+ N(C.data), E(p.clientY), G(p.clientX);
182
181
  }, onMouseLeave: () => {
183
- C(void 0), G(void 0), E(void 0), s?.(void 0);
184
- } }, z), e[7] = M, e[8] = A, e[9] = i, e[10] = f, e[11] = x, e[12] = t, e[13] = s, e[14] = l, e[15] = r, e[16] = b, e[17] = n, e[18] = X) : X = e[18];
185
- const S = g(j).map(X);
182
+ N(void 0), G(void 0), E(void 0), i?.(void 0);
183
+ } }, z), e[7] = M, e[8] = j, e[9] = s, e[10] = g, e[11] = x, e[12] = t, e[13] = i, e[14] = l, e[15] = a, e[16] = b, e[17] = n, e[18] = Y) : Y = e[18];
184
+ const S = d(A).map(Y);
186
185
  let O;
187
- e[19] !== L || e[20] !== W || e[21] !== S ? (O = /* @__PURE__ */ y.jsxs("g", { transform: L, children: [
188
- W,
186
+ e[19] !== H || e[20] !== X || e[21] !== S ? (O = /* @__PURE__ */ v.jsxs("g", { transform: H, children: [
187
+ X,
189
188
  S
190
- ] }), e[19] = L, e[20] = W, e[21] = S, e[22] = O) : O = e[22];
191
- let B;
192
- e[23] !== R || e[24] !== k || e[25] !== w || e[26] !== O ? (B = /* @__PURE__ */ y.jsx("svg", { width: R, height: k, viewBox: w, direction: o, className: u, children: O }), e[23] = R, e[24] = k, e[25] = w, e[26] = O, e[27] = B) : B = e[27];
193
- let H;
194
- e[28] !== v?.tooltip || e[29] !== N || e[30] !== I || e[31] !== x || e[32] !== h?.tooltip || e[33] !== d ? (H = x && d && N && I ? /* @__PURE__ */ y.jsx(je, { data: x, body: d, xPos: N, yPos: I, backgroundStyle: h?.tooltip, className: v?.tooltip }) : null, e[28] = v?.tooltip, e[29] = N, e[30] = I, e[31] = x, e[32] = h?.tooltip, e[33] = d, e[34] = H) : H = e[34];
195
- let Y;
196
- e[35] !== i || e[36] !== f || e[37] !== b ? (Y = i && f !== void 0 ? /* @__PURE__ */ y.jsx(be, { open: f !== void 0, onClose: () => {
197
- b(void 0);
198
- }, children: /* @__PURE__ */ y.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof i == "string" ? {
199
- __html: Ae(i, f)
200
- } : void 0, children: typeof i == "function" ? i(f) : null }) }) : null, e[35] = i, e[36] = f, e[37] = b, e[38] = Y) : Y = e[38];
189
+ ] }), e[19] = H, e[20] = X, e[21] = S, e[22] = O) : O = e[22];
190
+ let I;
191
+ e[23] !== R || e[24] !== k || e[25] !== w || e[26] !== O ? (I = /* @__PURE__ */ v.jsx("svg", { width: R, height: k, viewBox: w, direction: o, className: u, children: O }), e[23] = R, e[24] = k, e[25] = w, e[26] = O, e[27] = I) : I = e[27];
192
+ let F;
193
+ e[28] !== h?.tooltip || e[29] !== D || e[30] !== $ || e[31] !== x || e[32] !== y?.tooltip || e[33] !== m ? (F = x && m && D && $ ? /* @__PURE__ */ v.jsx(be, { data: x, body: m, xPos: D, yPos: $, backgroundStyle: y?.tooltip, className: h?.tooltip }) : null, e[28] = h?.tooltip, e[29] = D, e[30] = $, e[31] = x, e[32] = y?.tooltip, e[33] = m, e[34] = F) : F = e[34];
201
194
  let q;
202
- return e[39] !== B || e[40] !== H || e[41] !== Y ? (q = /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
203
- B,
204
- H,
205
- Y
206
- ] }), e[39] = B, e[40] = H, e[41] = Y, e[42] = q) : q = e[42], q;
195
+ e[35] !== h?.modal || e[36] !== s || e[37] !== g || e[38] !== b ? (q = s && g !== void 0 ? /* @__PURE__ */ v.jsx(Ae, { body: s, data: g, setData: b, className: h?.modal }) : null, e[35] = h?.modal, e[36] = s, e[37] = g, e[38] = b, e[39] = q) : q = e[39];
196
+ let L;
197
+ return e[40] !== I || e[41] !== F || e[42] !== q ? (L = /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
198
+ I,
199
+ F,
200
+ q
201
+ ] }), e[40] = I, e[41] = F, e[42] = q, e[43] = L) : L = e[43], L;
207
202
  }
208
- function We(a) {
209
- return a.size;
203
+ function He(r) {
204
+ return r.size;
210
205
  }
211
- function sn(a) {
206
+ function rn(r) {
212
207
  const {
213
208
  mainText: e,
214
209
  graphTitle: c,
215
- colors: j = _.light.categoricalColors.colors,
210
+ colors: A = _.light.categoricalColors.colors,
216
211
  suffix: l = "",
217
- sources: A,
218
- prefix: m = "",
212
+ sources: j,
213
+ prefix: f = "",
219
214
  strokeWidth: n = 50,
220
- graphDescription: d,
221
- subNote: s,
215
+ graphDescription: m,
216
+ subNote: i,
222
217
  footNote: t,
223
218
  radius: M,
224
- data: r,
225
- showColorScale: i = !0,
226
- padding: h,
227
- backgroundColor: v = !1,
219
+ data: a,
220
+ showColorScale: s = !0,
221
+ padding: y,
222
+ backgroundColor: h = !1,
228
223
  tooltip: T,
229
- onSeriesMouseOver: g,
224
+ onSeriesMouseOver: d,
230
225
  graphID: x,
231
- onSeriesMouseClick: C,
232
- graphDownload: f = !1,
226
+ onSeriesMouseClick: N,
227
+ graphDownload: g = !1,
233
228
  dataDownload: b = !1,
234
- colorDomain: N,
229
+ colorDomain: D,
235
230
  sortData: G,
236
- language: I = "en",
231
+ language: $ = "en",
237
232
  theme: E = "light",
238
233
  width: R,
239
234
  height: k,
240
235
  minHeight: w = 0,
241
236
  relativeHeight: o,
242
237
  ariaLabel: u,
243
- resetSelectionOnDoubleClick: L = !0,
244
- colorScaleMaxWidth: W,
245
- detailsOnClick: X,
238
+ resetSelectionOnDoubleClick: H = !0,
239
+ colorScaleMaxWidth: X,
240
+ detailsOnClick: Y,
246
241
  styles: S,
247
242
  classNames: O,
248
- precision: B = 2
249
- } = a, [H, Y] = Z(0), q = ue(null), D = ue(null);
243
+ precision: I = 2
244
+ } = r, [F, q] = Z(0), L = ue(null), C = ue(null);
250
245
  pe(() => {
251
246
  const p = new ResizeObserver((J) => {
252
- Y((Math.min(J[0].target.clientWidth || 620, J[0].target.clientHeight || 480, M || 1 / 0) || 420) / 2);
247
+ q((Math.min(J[0].target.clientWidth || 620, J[0].target.clientHeight || 480, M || 1 / 0) || 420) / 2);
253
248
  });
254
- return q.current && p.observe(q.current), () => p.disconnect();
249
+ return L.current && p.observe(L.current), () => p.disconnect();
255
250
  }, [M]);
256
- const z = G ? ye(r, ["size"], [G]) : r;
257
- return /* @__PURE__ */ y.jsxs(ke, { className: O?.graphContainer, style: S?.graphContainer, id: x, ref: D, "aria-label": u, backgroundColor: v, theme: E, language: I, minHeight: w, width: R, height: k, relativeHeight: o, padding: h, children: [
258
- c || d || f || b ? /* @__PURE__ */ y.jsx(De, { styles: {
251
+ const z = G ? ye(a, ["size"], [G]) : a;
252
+ return /* @__PURE__ */ v.jsxs(Re, { className: O?.graphContainer, style: S?.graphContainer, id: x, ref: C, "aria-label": u, backgroundColor: h, theme: E, language: $, minHeight: w, width: R, height: k, relativeHeight: o, padding: y, children: [
253
+ c || m || g || b ? /* @__PURE__ */ v.jsx(Ne, { styles: {
259
254
  title: S?.title,
260
255
  description: S?.description
261
256
  }, classNames: {
262
257
  title: O?.title,
263
258
  description: O?.description
264
- }, graphTitle: c, graphDescription: d, width: R, graphDownload: f ? D : void 0, dataDownload: b ? r.map((p) => p.data).filter((p) => p !== void 0).length > 0 ? r.map((p) => p.data).filter((p) => p !== void 0) : r.filter((p) => p !== void 0) : null }) : null,
265
- r.length === 0 ? /* @__PURE__ */ y.jsx(Re, {}) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
266
- i ? /* @__PURE__ */ y.jsx("div", { className: ge("leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap", O?.colorLegend), style: {
267
- maxWidth: W
268
- }, "aria-label": "Color legend", children: z.map((p, J) => /* @__PURE__ */ y.jsxs("div", { className: "flex gap-2 items-center pb-3", children: [
269
- /* @__PURE__ */ y.jsx("div", { className: "w-3 h-3 rounded-full", style: {
270
- backgroundColor: (N || z.map((K) => K.label)).indexOf(p.label) !== -1 ? (j || _[E].categoricalColors.colors)[(N || z.map((K) => K.label)).indexOf(p.label) % (j || _[E].categoricalColors.colors).length] : _.gray
259
+ }, graphTitle: c, graphDescription: m, width: R, graphDownload: g ? C : void 0, dataDownload: b ? a.map((p) => p.data).filter((p) => p !== void 0).length > 0 ? a.map((p) => p.data).filter((p) => p !== void 0) : a.filter((p) => p !== void 0) : null }) : null,
260
+ a.length === 0 ? /* @__PURE__ */ v.jsx(Ce, {}) : /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
261
+ s ? /* @__PURE__ */ v.jsx("div", { className: ge("leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap", O?.colorLegend), style: {
262
+ maxWidth: X
263
+ }, "aria-label": "Color legend", children: z.map((p, J) => /* @__PURE__ */ v.jsxs("div", { className: "flex gap-2 items-center pb-3", children: [
264
+ /* @__PURE__ */ v.jsx("div", { className: "w-3 h-3 rounded-full", style: {
265
+ backgroundColor: (D || z.map((K) => K.label)).indexOf(p.label) !== -1 ? (A || _[E].categoricalColors.colors)[(D || z.map((K) => K.label)).indexOf(p.label) % (A || _[E].categoricalColors.colors).length] : _.gray
271
266
  } }),
272
- /* @__PURE__ */ y.jsxs(ie, { marginBottom: "none", size: "sm", className: "text-primary-gray-700 dark:text-primary-gray-100", children: [
267
+ /* @__PURE__ */ v.jsxs(ie, { marginBottom: "none", size: "sm", className: "text-primary-gray-700 dark:text-primary-gray-100", children: [
273
268
  p.label,
274
269
  ":",
275
270
  " ",
276
- /* @__PURE__ */ y.jsx("span", { className: "font-bold", style: {
271
+ /* @__PURE__ */ v.jsx("span", { className: "font-bold", style: {
277
272
  fontSize: "inherit"
278
- }, children: me(p.size, "NA", B, m, l) })
273
+ }, children: me(p.size, "NA", I, f, l) })
279
274
  ] })
280
275
  ] }, J)) }) : null,
281
- /* @__PURE__ */ y.jsx(xe, { size: "lg" }),
282
- /* @__PURE__ */ y.jsx(we, { ref: q, children: H ? /* @__PURE__ */ y.jsx(Le, { mainText: e, data: z, colors: j, radius: H, subNote: s, strokeWidth: n, tooltip: T, colorDomain: N || z.map((p) => p.label), onSeriesMouseOver: g, onSeriesMouseClick: C, resetSelectionOnDoubleClick: L, styles: S, detailsOnClick: X, precision: B }) : null })
276
+ /* @__PURE__ */ v.jsx(xe, { size: "lg" }),
277
+ /* @__PURE__ */ v.jsx(ke, { ref: L, children: F ? /* @__PURE__ */ v.jsx(We, { mainText: e, data: z, colors: A, radius: F, subNote: i, strokeWidth: n, tooltip: T, colorDomain: D || z.map((p) => p.label), onSeriesMouseOver: d, onSeriesMouseClick: N, resetSelectionOnDoubleClick: H, styles: S, detailsOnClick: Y, precision: I }) : null })
283
278
  ] }),
284
- A || t ? /* @__PURE__ */ y.jsx(Ce, { styles: {
279
+ j || t ? /* @__PURE__ */ v.jsx(De, { styles: {
285
280
  footnote: S?.footnote,
286
281
  source: S?.source
287
282
  }, classNames: {
288
283
  footnote: O?.footnote,
289
284
  source: O?.source
290
- }, sources: A, footNote: t, width: R }) : null
285
+ }, sources: j, footNote: t, width: R }) : null
291
286
  ] });
292
287
  }
293
288
  export {
294
- sn as DonutChart
289
+ rn as DonutChart
295
290
  };
296
291
  //# sourceMappingURL=DonutChart.js.map