@undp/data-viz 2.1.3 → 2.1.4

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 (118) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +279 -272
  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.d.ts +2 -0
  8. package/dist/BarGraph.js +1795 -1724
  9. package/dist/BarGraph.js.map +1 -1
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.js +312 -305
  13. package/dist/BeeSwarmChart.js.map +1 -1
  14. package/dist/BulletChart.cjs +1 -1
  15. package/dist/BulletChart.cjs.map +1 -1
  16. package/dist/BulletChart.js +298 -287
  17. package/dist/BulletChart.js.map +1 -1
  18. package/dist/ButterflyChart.cjs +1 -1
  19. package/dist/ButterflyChart.cjs.map +1 -1
  20. package/dist/ButterflyChart.js +224 -217
  21. package/dist/ButterflyChart.js.map +1 -1
  22. package/dist/CirclePackingGraph.cjs +1 -1
  23. package/dist/CirclePackingGraph.js +2 -2
  24. package/dist/DifferenceLineChart.cjs +1 -1
  25. package/dist/DifferenceLineChart.cjs.map +1 -1
  26. package/dist/DifferenceLineChart.js +404 -397
  27. package/dist/DifferenceLineChart.js.map +1 -1
  28. package/dist/DonutChart.cjs +1 -1
  29. package/dist/DonutChart.cjs.map +1 -1
  30. package/dist/DonutChart.js +42 -39
  31. package/dist/DonutChart.js.map +1 -1
  32. package/dist/DualAxisLineChart.cjs +1 -1
  33. package/dist/DualAxisLineChart.cjs.map +1 -1
  34. package/dist/DualAxisLineChart.js +320 -313
  35. package/dist/DualAxisLineChart.js.map +1 -1
  36. package/dist/DumbbellChart.cjs +1 -1
  37. package/dist/DumbbellChart.cjs.map +1 -1
  38. package/dist/DumbbellChart.js +298 -291
  39. package/dist/DumbbellChart.js.map +1 -1
  40. package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
  41. package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
  42. package/dist/EmptyState-gLDRXBHm.cjs +2 -0
  43. package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
  44. package/dist/GraphEl-C2Fgg8PA.cjs +2 -0
  45. package/dist/GraphEl-C2Fgg8PA.cjs.map +1 -0
  46. package/dist/{GraphEl-CRrAlbcr.js → GraphEl-oZwZiTHI.js} +3 -2
  47. package/dist/GraphEl-oZwZiTHI.js.map +1 -0
  48. package/dist/GriddedGraphs.cjs +1 -1
  49. package/dist/GriddedGraphs.js +1 -1
  50. package/dist/HeatMap.cjs +1 -1
  51. package/dist/HeatMap.cjs.map +1 -1
  52. package/dist/HeatMap.js +179 -172
  53. package/dist/HeatMap.js.map +1 -1
  54. package/dist/Histogram.cjs +1 -1
  55. package/dist/Histogram.js +1 -1
  56. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  57. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  58. package/dist/LineChartWithConfidenceInterval.js +368 -361
  59. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  60. package/dist/MultiLineAltChart.cjs +1 -1
  61. package/dist/MultiLineAltChart.cjs.map +1 -1
  62. package/dist/MultiLineAltChart.js +327 -320
  63. package/dist/MultiLineAltChart.js.map +1 -1
  64. package/dist/MultiLineChart.cjs +1 -1
  65. package/dist/MultiLineChart.cjs.map +1 -1
  66. package/dist/MultiLineChart.js +374 -367
  67. package/dist/MultiLineChart.js.map +1 -1
  68. package/dist/ParetoChart.cjs +1 -1
  69. package/dist/ParetoChart.cjs.map +1 -1
  70. package/dist/ParetoChart.js +385 -378
  71. package/dist/ParetoChart.js.map +1 -1
  72. package/dist/RadarChart.cjs +1 -1
  73. package/dist/RadarChart.cjs.map +1 -1
  74. package/dist/RadarChart.js +34 -33
  75. package/dist/RadarChart.js.map +1 -1
  76. package/dist/SankeyChart.cjs +1 -1
  77. package/dist/SankeyChart.cjs.map +1 -1
  78. package/dist/SankeyChart.js +176 -169
  79. package/dist/SankeyChart.js.map +1 -1
  80. package/dist/ScatterPlot.cjs +1 -1
  81. package/dist/ScatterPlot.cjs.map +1 -1
  82. package/dist/ScatterPlot.js +366 -359
  83. package/dist/ScatterPlot.js.map +1 -1
  84. package/dist/SimpleLineChart.cjs +1 -1
  85. package/dist/SimpleLineChart.cjs.map +1 -1
  86. package/dist/SimpleLineChart.js +285 -278
  87. package/dist/SimpleLineChart.js.map +1 -1
  88. package/dist/SingleGraphDashboard.cjs +1 -1
  89. package/dist/SingleGraphDashboard.js +1 -1
  90. package/dist/SlopeChart.cjs +1 -1
  91. package/dist/SlopeChart.cjs.map +1 -1
  92. package/dist/SlopeChart.js +243 -236
  93. package/dist/SlopeChart.js.map +1 -1
  94. package/dist/StripChart.cjs +1 -1
  95. package/dist/StripChart.cjs.map +1 -1
  96. package/dist/StripChart.js +293 -286
  97. package/dist/StripChart.js.map +1 -1
  98. package/dist/TreeMapGraph.cjs +1 -1
  99. package/dist/TreeMapGraph.cjs.map +1 -1
  100. package/dist/TreeMapGraph.js +222 -215
  101. package/dist/TreeMapGraph.js.map +1 -1
  102. package/dist/index-Blvf-Q3U.cjs +2 -0
  103. package/dist/{index-CF5hnGvG.cjs.map → index-Blvf-Q3U.cjs.map} +1 -1
  104. package/dist/index-D1RrKgK6.js +337 -0
  105. package/dist/index-D1RrKgK6.js.map +1 -0
  106. package/dist/index.cjs +1 -1
  107. package/dist/index.d.ts +2 -0
  108. package/dist/index.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/EmptyState-BZo1BbAn.js.map +0 -1
  111. package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
  112. package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
  113. package/dist/GraphEl-BLMih7RN.cjs +0 -2
  114. package/dist/GraphEl-BLMih7RN.cjs.map +0 -1
  115. package/dist/GraphEl-CRrAlbcr.js.map +0 -1
  116. package/dist/index-CF5hnGvG.cjs +0 -2
  117. package/dist/index-DPGq3eIL.js +0 -330
  118. package/dist/index-DPGq3eIL.js.map +0 -1
@@ -1,35 +1,35 @@
1
- import { c as ve, j as i, m as le } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useRef as de, useState as Dt, useEffect as ue } from "react";
3
- import { g as we, N as je } from "./getSliderMarks-HIDJ0_Cd.js";
4
- import { f as Ae, p as Be } from "./parse-DlCRUFh_.js";
5
- import { i as fe } from "./index-Bwrro8-q.js";
6
- import { n as xe } from "./numberFormattingFunction-14YCbkN2.js";
7
- import { T as Me } from "./Tooltip-Dj5eVppQ.js";
8
- import { X as he } from "./XTicksAndGridLines-CObVFSm4.js";
9
- import { A as pe } from "./Axis-CRyfcLjc.js";
10
- import { Y as Ce } from "./YAxesLabels-a57ZRv-0.js";
11
- import { R as ge } from "./ReferenceLine-2XCwHXQ4.js";
12
- import { D as Le } from "./DetailsModal-0Ry5nXiC.js";
13
- import { b as ke } from "./band-DHUZ2X7J.js";
14
- import { a as ye } from "./linear-BqltdMeF.js";
15
- import { u as Ve } from "./use-in-view-Cxa7y1TH.js";
1
+ import { c as Ae, j as i, m as ce } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useRef as he, useState as Dt, useEffect as xe } from "react";
3
+ import { g as Be, N as Le } from "./getSliderMarks-HIDJ0_Cd.js";
4
+ import { f as Me, p as Ce } from "./parse-DlCRUFh_.js";
5
+ import { i as pe } from "./index-Bwrro8-q.js";
6
+ import { n as ge } from "./numberFormattingFunction-14YCbkN2.js";
7
+ import { T as ke } from "./Tooltip-Dj5eVppQ.js";
8
+ import { X as ye } from "./XTicksAndGridLines-CObVFSm4.js";
9
+ import { A as be } from "./Axis-CRyfcLjc.js";
10
+ import { Y as Ve } from "./YAxesLabels-a57ZRv-0.js";
11
+ import { R as ve } from "./ReferenceLine-2XCwHXQ4.js";
12
+ import { D as $e } from "./DetailsModal-0Ry5nXiC.js";
13
+ import { b as Ne } from "./band-DHUZ2X7J.js";
14
+ import { a as we } from "./linear-BqltdMeF.js";
15
+ import { u as Oe } from "./use-in-view-Cxa7y1TH.js";
16
16
  import { m as Ot } from "./proxy-BxkFHwUw.js";
17
- import { A as ce } from "./index-BqfRwk1n.js";
18
- import { GraphFooter as $e } from "./GraphFooter.js";
19
- import { GraphHeader as Ne } from "./GraphHeader.js";
20
- import { ColorLegend as Oe } from "./ColorLegend.js";
21
- import { Colors as be } from "./Colors.js";
22
- import { E as De } from "./EmptyState-BZo1BbAn.js";
23
- import { P as Te, e as Se } from "./index-D491FEn1.js";
24
- import { c as me } from "./checkIfNullOrUndefined-DmfiKkNw.js";
25
- import { c as Fe } from "./ensureCompleteData-DH5c52Ub.js";
26
- import { a as Ie, G as Ge } from "./GraphContainer-CRqzdKu2.js";
27
- function Re(a) {
28
- const t = ve.c(140), {
29
- data: r,
30
- width: A,
17
+ import { A as ue } from "./index-BqfRwk1n.js";
18
+ import { GraphFooter as De } from "./GraphFooter.js";
19
+ import { GraphHeader as Te } from "./GraphHeader.js";
20
+ import { ColorLegend as Se } from "./ColorLegend.js";
21
+ import { Colors as je } from "./Colors.js";
22
+ import { E as Fe } from "./EmptyState-C7ZXkZWd.js";
23
+ import { P as Ie, e as Ge } from "./index-D491FEn1.js";
24
+ import { c as fe } from "./checkIfNullOrUndefined-DmfiKkNw.js";
25
+ import { c as Re } from "./ensureCompleteData-DH5c52Ub.js";
26
+ import { a as Pe, G as Ee } from "./GraphContainer-CRqzdKu2.js";
27
+ function Xe(a) {
28
+ const t = Ae.c(140), {
29
+ data: l,
30
+ width: B,
31
31
  height: v,
32
- barColors: d,
32
+ barColors: u,
33
33
  centerGap: w,
34
34
  refValues: p,
35
35
  maxValue: rt,
@@ -44,28 +44,28 @@ function Re(a) {
44
44
  onSeriesMouseOver: dt,
45
45
  barPadding: St,
46
46
  truncateBy: jt,
47
- onSeriesMouseClick: V,
47
+ onSeriesMouseClick: N,
48
48
  showTicks: At,
49
49
  suffix: ut,
50
50
  prefix: ft,
51
51
  resetSelectionOnDoubleClick: Bt,
52
- detailsOnClick: O,
53
- styles: l,
52
+ detailsOnClick: T,
53
+ styles: n,
54
54
  classNames: s,
55
- noOfTicks: B,
55
+ noOfTicks: L,
56
56
  animate: m,
57
- precision: xt,
58
- customLayers: D,
59
- minValueLeftBar: T,
60
- minValueRightBar: S,
57
+ precision: ht,
58
+ customLayers: S,
59
+ minValueLeftBar: F,
60
+ minValueRightBar: I,
61
61
  naLabel: Ft
62
- } = a, ae = de(null);
62
+ } = a, le = he(null);
63
63
  let It;
64
64
  t[0] !== m.amount || t[1] !== m.once ? (It = {
65
65
  once: m.once,
66
66
  amount: m.amount
67
67
  }, t[0] = m.amount, t[1] = m.once, t[2] = It) : It = t[2];
68
- const M = Ve(ae, It), [Gt, ht] = Dt(void 0), [$, Mt] = Dt(void 0), [Ct, u] = Dt(void 0), [x, pt] = Dt(void 0);
68
+ const M = Oe(le, It), [Gt, xt] = Dt(void 0), [O, Lt] = Dt(void 0), [Mt, f] = Dt(void 0), [d, pt] = Dt(void 0);
69
69
  let Rt;
70
70
  t[3] !== Kt || t[4] !== Jt || t[5] !== Ut || t[6] !== Y ? (Rt = {
71
71
  top: Y,
@@ -73,85 +73,85 @@ function Re(a) {
73
73
  left: Jt,
74
74
  right: Ut
75
75
  }, t[3] = Kt, t[4] = Jt, t[5] = Ut, t[6] = Y, t[7] = Rt) : Rt = t[7];
76
- const f = Rt, C = A - f.left - f.right, j = v - f.top - f.bottom;
77
- let gt, F, I, W, z, q, U, J, G, L, K, Q, Z, _;
78
- if (t[8] !== m || t[9] !== d[0] || t[10] !== d[1] || t[11] !== St || t[12] !== w || t[13] !== s?.graphObjectValues || t[14] !== s?.xAxis?.gridLines || t[15] !== s?.xAxis?.labels || t[16] !== s?.yAxis?.axis || t[17] !== s?.yAxis?.labels || t[18] !== D || t[19] !== r || t[20] !== O || t[21] !== j || t[22] !== C || t[23] !== v || t[24] !== M || t[25] !== f.bottom || t[26] !== f.left || t[27] !== f.top || t[28] !== rt || t[29] !== wt || t[30] !== T || t[31] !== S || t[32] !== $ || t[33] !== Ft || t[34] !== B || t[35] !== V || t[36] !== dt || t[37] !== xt || t[38] !== ft || t[39] !== p || t[40] !== Bt || t[41] !== At || t[42] !== ct || t[43] !== l?.graphObjectValues || t[44] !== l?.xAxis?.gridLines || t[45] !== l?.xAxis?.labels || t[46] !== l?.yAxis?.axis || t[47] !== l?.yAxis?.labels || t[48] !== ut || t[49] !== Y || t[50] !== jt || t[51] !== A) {
79
- const yt = r.map(Je), N = ke().domain(yt.map(Ue)).range([j, 0]).paddingInner(St), n = ye().domain([wt, rt]).range([0, (C - w) / 2]).nice(), se = n.ticks(B), h = ye().domain([wt, rt]).range([(C - w) / 2, 0]).nice(), c = h.ticks(B);
80
- I = Ot.svg, Z = `${A}px`, _ = `${v}px`, W = `0 0 ${A} ${v}`, z = "ltr", q = ae, G = `translate(${f.left},${f.top})`, t[66] !== D ? (L = D.filter(qe).map(ze), t[66] = D, t[67] = L) : L = t[67];
81
- const k = s?.yAxis?.axis;
76
+ const h = Rt, C = B - h.left - h.right, j = v - h.top - h.bottom;
77
+ let gt, G, k, W, z, q, U, J, V, A, K, Q, Z, _;
78
+ if (t[8] !== m || t[9] !== u[0] || t[10] !== u[1] || t[11] !== St || t[12] !== w || t[13] !== s?.graphObjectValues || t[14] !== s?.xAxis?.gridLines || t[15] !== s?.xAxis?.labels || t[16] !== s?.yAxis?.axis || t[17] !== s?.yAxis?.labels || t[18] !== S || t[19] !== l || t[20] !== T || t[21] !== j || t[22] !== C || t[23] !== v || t[24] !== M || t[25] !== h.bottom || t[26] !== h.left || t[27] !== h.top || t[28] !== rt || t[29] !== wt || t[30] !== F || t[31] !== I || t[32] !== O || t[33] !== Ft || t[34] !== L || t[35] !== N || t[36] !== dt || t[37] !== ht || t[38] !== ft || t[39] !== p || t[40] !== Bt || t[41] !== At || t[42] !== ct || t[43] !== n?.graphObjectValues || t[44] !== n?.xAxis?.gridLines || t[45] !== n?.xAxis?.labels || t[46] !== n?.yAxis?.axis || t[47] !== n?.yAxis?.labels || t[48] !== ut || t[49] !== Y || t[50] !== jt || t[51] !== B) {
79
+ const yt = l.map(Ze), D = Ne().domain(yt.map(Qe)).range([j, 0]).paddingInner(St), r = we().domain([wt, rt]).range([0, (C - w) / 2]).nice(), ne = r.ticks(L), x = we().domain([wt, rt]).range([(C - w) / 2, 0]).nice(), c = x.ticks(L);
80
+ k = Ot.svg, Z = `${B}px`, _ = `${v}px`, W = `0 0 ${B} ${v}`, z = "ltr", q = le, V = `translate(${h.left},${h.top})`, t[66] !== S ? (A = S.filter(Ke).map(Je), t[66] = S, t[67] = A) : A = t[67];
81
+ const $ = s?.yAxis?.axis;
82
82
  let Vt;
83
- t[68] !== k ? (Vt = {
84
- axis: k
85
- }, t[68] = k, t[69] = Vt) : Vt = t[69];
86
- const Wt = l?.yAxis?.axis;
83
+ t[68] !== $ ? (Vt = {
84
+ axis: $
85
+ }, t[68] = $, t[69] = Vt) : Vt = t[69];
86
+ const Wt = n?.yAxis?.axis;
87
87
  let zt;
88
88
  t[70] !== Wt ? (zt = {
89
89
  axis: Wt
90
90
  }, t[70] = Wt, t[71] = zt) : zt = t[71], K = /* @__PURE__ */ i.jsxs("g", { transform: "translate(0,0)", children: [
91
- At ? /* @__PURE__ */ i.jsx(he, { values: c.filter(We), x: c.filter(Ye).map((e) => h(e)), y1: 0 - Y, y2: j + f.bottom, styles: {
92
- gridLines: l?.xAxis?.gridLines,
93
- labels: l?.xAxis?.labels
91
+ At ? /* @__PURE__ */ i.jsx(ye, { values: c.filter(Ue), x: c.filter(qe).map((e) => x(e)), y1: 0 - Y, y2: j + h.bottom, styles: {
92
+ gridLines: n?.xAxis?.gridLines,
93
+ labels: n?.xAxis?.labels
94
94
  }, classNames: {
95
95
  gridLines: s?.xAxis?.gridLines,
96
96
  labels: s?.xAxis?.labels
97
- }, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, leftLabel: !0, precision: xt }) : null,
98
- /* @__PURE__ */ i.jsxs(ce, { children: [
97
+ }, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, leftLabel: !0, precision: ht }) : null,
98
+ /* @__PURE__ */ i.jsxs(ue, { children: [
99
99
  yt.map((e, g) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (b) => {
100
- ht(e), pt(b.clientY), u(b.clientX), dt?.(e);
100
+ xt(e), pt(b.clientY), f(b.clientX), dt?.(e);
101
101
  }, onClick: () => {
102
- (V || O) && (fe($, e) && Bt ? (Mt(void 0), V?.(void 0)) : (Mt(e), V?.(e)));
102
+ (N || T) && (pe(O, e) && Bt ? (Lt(void 0), N?.(void 0)) : (Lt(e), N?.(e)));
103
103
  }, onMouseMove: (b) => {
104
- ht(e), pt(b.clientY), u(b.clientX);
104
+ xt(e), pt(b.clientY), f(b.clientX);
105
105
  }, onMouseLeave: () => {
106
- ht(void 0), u(void 0), pt(void 0), dt?.(void 0);
106
+ xt(void 0), f(void 0), pt(void 0), dt?.(void 0);
107
107
  }, children: [
108
- e.leftBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: N(`${g}`), style: {
109
- fill: d[0]
110
- }, height: N.bandwidth(), variants: {
108
+ e.leftBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: D(`${g}`), style: {
109
+ fill: u[0]
110
+ }, height: D.bandwidth(), variants: {
111
111
  initial: {
112
- x: h(0),
112
+ x: x(0),
113
113
  width: 0
114
114
  },
115
115
  whileInView: {
116
- x: e.leftBar < 0 ? h(0) : h(e.leftBar),
117
- width: e.leftBar < 0 ? h(e.leftBar) - h(0) : h(0) - h(e.leftBar),
116
+ x: e.leftBar < 0 ? x(0) : x(e.leftBar),
117
+ width: e.leftBar < 0 ? x(e.leftBar) - x(0) : x(0) - x(e.leftBar),
118
118
  transition: {
119
119
  duration: m.duration
120
120
  }
121
121
  }
122
122
  }, initial: "initial", animate: M ? "whileInView" : "initial", exit: {
123
- x: h(0),
123
+ x: x(0),
124
124
  width: 0,
125
125
  transition: {
126
126
  duration: m.duration
127
127
  }
128
128
  } }) : null,
129
- ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: N(`${g}`) + N.bandwidth() / 2, style: {
129
+ ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: D(`${g}`) + D.bandwidth() / 2, style: {
130
130
  textAnchor: e.rightBar && e.rightBar > 0 ? "end" : "start",
131
- ...l?.graphObjectValues || {}
132
- }, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className: le("graph-value text-sm", s?.graphObjectValues), exit: {
131
+ ...n?.graphObjectValues || {}
132
+ }, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className: ce("graph-value text-sm", s?.graphObjectValues), exit: {
133
133
  opacity: 0,
134
134
  transition: {
135
135
  duration: m.duration
136
136
  }
137
137
  }, variants: {
138
138
  initial: {
139
- x: h(0),
139
+ x: x(0),
140
140
  opacity: 0,
141
- fill: d[0]
141
+ fill: u[0]
142
142
  },
143
143
  whileInView: {
144
- x: e.leftBar ? h(e.leftBar) : h(T < 0 ? 0 : T),
144
+ x: e.leftBar ? x(e.leftBar) : x(F < 0 ? 0 : F),
145
145
  opacity: 1,
146
- fill: d[0],
146
+ fill: u[0],
147
147
  transition: {
148
148
  duration: m.duration
149
149
  }
150
150
  }
151
- }, initial: "initial", animate: M ? "whileInView" : "initial", children: xe(e.rightBar, Ft, xt, ft, ut) }) : null
151
+ }, initial: "initial", animate: M ? "whileInView" : "initial", children: ge(e.rightBar, Ft, ht, ft, ut) }) : null
152
152
  ] }, e.label)),
153
- /* @__PURE__ */ i.jsx(pe, { y1: -2.5, y2: j + f.bottom, x1: h(T < 0 ? 0 : T), x2: h(T < 0 ? 0 : T), classNames: Vt, styles: zt }),
154
- p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ge, { text: e.text, color: e.color, x: h(e.value), y1: 0 - f.top, y2: j + f.bottom, textSide: "left", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
153
+ /* @__PURE__ */ i.jsx(be, { y1: -2.5, y2: j + h.bottom, x1: x(F < 0 ? 0 : F), x2: x(F < 0 ? 0 : F), classNames: Vt, styles: zt }),
154
+ p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ve, { text: e.text, color: e.color, x: x(e.value), y1: 0 - h.top, y2: j + h.bottom, textSide: "left", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
155
155
  ] })
156
156
  ] });
157
157
  const $t = s?.yAxis?.axis;
@@ -159,106 +159,106 @@ function Re(a) {
159
159
  t[72] !== $t ? (bt = {
160
160
  axis: $t
161
161
  }, t[72] = $t, t[73] = bt) : bt = t[73];
162
- const Nt = l?.yAxis?.axis;
162
+ const Nt = n?.yAxis?.axis;
163
163
  let vt;
164
164
  t[74] !== Nt ? (vt = {
165
165
  axis: Nt
166
166
  }, t[74] = Nt, t[75] = vt) : vt = t[75], Q = /* @__PURE__ */ i.jsxs("g", { transform: `translate(${(C + w) / 2},0)`, children: [
167
- At ? /* @__PURE__ */ i.jsx(he, { values: se.filter(He), x: se.filter(Xe).map((e) => n(e)), y1: 0 - Y, y2: j + f.bottom, styles: {
168
- gridLines: l?.xAxis?.gridLines,
169
- labels: l?.xAxis?.labels
167
+ At ? /* @__PURE__ */ i.jsx(ye, { values: ne.filter(ze), x: ne.filter(We).map((e) => r(e)), y1: 0 - Y, y2: j + h.bottom, styles: {
168
+ gridLines: n?.xAxis?.gridLines,
169
+ labels: n?.xAxis?.labels
170
170
  }, classNames: {
171
171
  gridLines: s?.xAxis?.gridLines,
172
172
  labels: s?.xAxis?.labels
173
- }, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, precision: xt }) : null,
174
- /* @__PURE__ */ i.jsxs(ce, { children: [
173
+ }, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, precision: ht }) : null,
174
+ /* @__PURE__ */ i.jsxs(ue, { children: [
175
175
  yt.map((e, g) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (b) => {
176
- ht(e), pt(b.clientY), u(b.clientX), dt?.(e);
176
+ xt(e), pt(b.clientY), f(b.clientX), dt?.(e);
177
177
  }, onClick: () => {
178
- (V || O) && (fe($, e) && Bt ? (Mt(void 0), V?.(void 0)) : (Mt(e), V?.(e)));
178
+ (N || T) && (pe(O, e) && Bt ? (Lt(void 0), N?.(void 0)) : (Lt(e), N?.(e)));
179
179
  }, onMouseMove: (b) => {
180
- ht(e), pt(b.clientY), u(b.clientX);
180
+ xt(e), pt(b.clientY), f(b.clientX);
181
181
  }, onMouseLeave: () => {
182
- ht(void 0), u(void 0), pt(void 0), dt?.(void 0);
182
+ xt(void 0), f(void 0), pt(void 0), dt?.(void 0);
183
183
  }, children: [
184
- e.rightBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: N(`${g}`), style: {
185
- fill: d[1]
186
- }, height: N.bandwidth(), exit: {
187
- x: n(0),
184
+ e.rightBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: D(`${g}`), style: {
185
+ fill: u[1]
186
+ }, height: D.bandwidth(), exit: {
187
+ x: r(0),
188
188
  width: 0,
189
189
  transition: {
190
190
  duration: m.duration
191
191
  }
192
192
  }, variants: {
193
193
  initial: {
194
- x: n(0),
194
+ x: r(0),
195
195
  width: 0
196
196
  },
197
197
  whileInView: {
198
- x: e.rightBar >= 0 ? n(0) : n(e.rightBar),
199
- width: e.rightBar >= 0 ? n(e.rightBar) - n(0) : n(0) - n(e.rightBar),
198
+ x: e.rightBar >= 0 ? r(0) : r(e.rightBar),
199
+ width: e.rightBar >= 0 ? r(e.rightBar) - r(0) : r(0) - r(e.rightBar),
200
200
  transition: {
201
201
  duration: m.duration
202
202
  }
203
203
  }
204
204
  }, initial: "initial", animate: M ? "whileInView" : "initial" }) : null,
205
- ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: N(`${g}`) + N.bandwidth() / 2, style: {
205
+ ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: D(`${g}`) + D.bandwidth() / 2, style: {
206
206
  textAnchor: e.rightBar && e.rightBar < 0 ? "end" : "start",
207
- ...l?.graphObjectValues || {}
208
- }, className: le("graph-value text-sm", s?.graphObjectValues), dx: e.rightBar && e.rightBar < 0 ? -5 : 5, dy: "0.33em", exit: {
207
+ ...n?.graphObjectValues || {}
208
+ }, className: ce("graph-value text-sm", s?.graphObjectValues), dx: e.rightBar && e.rightBar < 0 ? -5 : 5, dy: "0.33em", exit: {
209
209
  opacity: 0,
210
210
  transition: {
211
211
  duration: m.duration
212
212
  }
213
213
  }, variants: {
214
214
  initial: {
215
- x: n(0),
215
+ x: r(0),
216
216
  opacity: 0,
217
- fill: d[1]
217
+ fill: u[1]
218
218
  },
219
219
  whileInView: {
220
- x: e.rightBar ? n(e.rightBar) : n(S < 0 ? 0 : S),
220
+ x: e.rightBar ? r(e.rightBar) : r(I < 0 ? 0 : I),
221
221
  opacity: 1,
222
- fill: d[1],
222
+ fill: u[1],
223
223
  transition: {
224
224
  duration: m.duration
225
225
  }
226
226
  }
227
- }, initial: "initial", animate: M ? "whileInView" : "initial", children: xe(e.rightBar, Ft, xt, ft, ut) }) : null
227
+ }, initial: "initial", animate: M ? "whileInView" : "initial", children: ge(e.rightBar, Ft, ht, ft, ut) }) : null
228
228
  ] }, g)),
229
- /* @__PURE__ */ i.jsx(pe, { y1: -2.5, y2: j + f.bottom, x1: n(S < 0 ? 0 : S), x2: n(S < 0 ? 0 : S), classNames: bt, styles: vt }),
230
- p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ge, { text: e.text, color: e.color, x: n(e.value), y1: 0 - f.top, y2: j + f.bottom, textSide: "right", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
229
+ /* @__PURE__ */ i.jsx(be, { y1: -2.5, y2: j + h.bottom, x1: r(I < 0 ? 0 : I), x2: r(I < 0 ? 0 : I), classNames: bt, styles: vt }),
230
+ p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ve, { text: e.text, color: e.color, x: r(e.value), y1: 0 - h.top, y2: j + h.bottom, textSide: "right", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
231
231
  ] })
232
- ] }), F = ce, gt = Ot.g, U = `translate(${C / 2},0)`, J = yt.map((e, g) => /* @__PURE__ */ i.jsx(Ce, { value: `${e.label}`.length < jt ? `${e.label}` : `${`${e.label}`.substring(0, jt)}...`, y: N(`${e.id}`), x: 0 - w / 2, width: w, height: N.bandwidth(), alignment: "center", style: l?.yAxis?.labels, className: s?.yAxis?.labels, animate: m, isInView: M }, g)), t[8] = m, t[9] = d[0], t[10] = d[1], t[11] = St, t[12] = w, t[13] = s?.graphObjectValues, t[14] = s?.xAxis?.gridLines, t[15] = s?.xAxis?.labels, t[16] = s?.yAxis?.axis, t[17] = s?.yAxis?.labels, t[18] = D, t[19] = r, t[20] = O, t[21] = j, t[22] = C, t[23] = v, t[24] = M, t[25] = f.bottom, t[26] = f.left, t[27] = f.top, t[28] = rt, t[29] = wt, t[30] = T, t[31] = S, t[32] = $, t[33] = Ft, t[34] = B, t[35] = V, t[36] = dt, t[37] = xt, t[38] = ft, t[39] = p, t[40] = Bt, t[41] = At, t[42] = ct, t[43] = l?.graphObjectValues, t[44] = l?.xAxis?.gridLines, t[45] = l?.xAxis?.labels, t[46] = l?.yAxis?.axis, t[47] = l?.yAxis?.labels, t[48] = ut, t[49] = Y, t[50] = jt, t[51] = A, t[52] = gt, t[53] = F, t[54] = I, t[55] = W, t[56] = z, t[57] = q, t[58] = U, t[59] = J, t[60] = G, t[61] = L, t[62] = K, t[63] = Q, t[64] = Z, t[65] = _;
232
+ ] }), G = ue, gt = Ot.g, U = `translate(${C / 2},0)`, J = yt.map((e, g) => /* @__PURE__ */ i.jsx(Ve, { value: `${e.label}`.length < jt ? `${e.label}` : `${`${e.label}`.substring(0, jt)}...`, y: D(`${e.id}`), x: 0 - w / 2, width: w, height: D.bandwidth(), alignment: "center", style: n?.yAxis?.labels, className: s?.yAxis?.labels, animate: m, isInView: M }, g)), t[8] = m, t[9] = u[0], t[10] = u[1], t[11] = St, t[12] = w, t[13] = s?.graphObjectValues, t[14] = s?.xAxis?.gridLines, t[15] = s?.xAxis?.labels, t[16] = s?.yAxis?.axis, t[17] = s?.yAxis?.labels, t[18] = S, t[19] = l, t[20] = T, t[21] = j, t[22] = C, t[23] = v, t[24] = M, t[25] = h.bottom, t[26] = h.left, t[27] = h.top, t[28] = rt, t[29] = wt, t[30] = F, t[31] = I, t[32] = O, t[33] = Ft, t[34] = L, t[35] = N, t[36] = dt, t[37] = ht, t[38] = ft, t[39] = p, t[40] = Bt, t[41] = At, t[42] = ct, t[43] = n?.graphObjectValues, t[44] = n?.xAxis?.gridLines, t[45] = n?.xAxis?.labels, t[46] = n?.yAxis?.axis, t[47] = n?.yAxis?.labels, t[48] = ut, t[49] = Y, t[50] = jt, t[51] = B, t[52] = gt, t[53] = G, t[54] = k, t[55] = W, t[56] = z, t[57] = q, t[58] = U, t[59] = J, t[60] = V, t[61] = A, t[62] = K, t[63] = Q, t[64] = Z, t[65] = _;
233
233
  } else
234
- gt = t[52], F = t[53], I = t[54], W = t[55], z = t[56], q = t[57], U = t[58], J = t[59], G = t[60], L = t[61], K = t[62], Q = t[63], Z = t[64], _ = t[65];
234
+ gt = t[52], G = t[53], k = t[54], W = t[55], z = t[56], q = t[57], U = t[58], J = t[59], V = t[60], A = t[61], K = t[62], Q = t[63], Z = t[64], _ = t[65];
235
235
  let R;
236
236
  t[76] !== gt || t[77] !== U || t[78] !== J ? (R = /* @__PURE__ */ i.jsx(gt, { transform: U, children: J }), t[76] = gt, t[77] = U, t[78] = J, t[79] = R) : R = t[79];
237
237
  let tt;
238
- t[80] !== F || t[81] !== R ? (tt = /* @__PURE__ */ i.jsx(F, { children: R }), t[80] = F, t[81] = R, t[82] = tt) : tt = t[82];
239
- const Pt = `translate(0,${j})`, Et = l?.yAxis?.title;
238
+ t[80] !== G || t[81] !== R ? (tt = /* @__PURE__ */ i.jsx(G, { children: R }), t[80] = G, t[81] = R, t[82] = tt) : tt = t[82];
239
+ const Pt = `translate(0,${j})`, Et = n?.yAxis?.title;
240
240
  let et;
241
- t[83] !== d[0] || t[84] !== Et ? (et = {
242
- fill: d[0],
241
+ t[83] !== u[0] || t[84] !== Et ? (et = {
242
+ fill: u[0],
243
243
  textAnchor: "end",
244
244
  ...Et
245
- }, t[83] = d[0], t[84] = Et, t[85] = et) : et = t[85];
245
+ }, t[83] = u[0], t[84] = Et, t[85] = et) : et = t[85];
246
246
  const Xt = s?.yAxis?.title;
247
247
  let P;
248
- t[86] !== Xt ? (P = le("text-base", Xt), t[86] = Xt, t[87] = P) : P = t[87];
249
- const Lt = C / 2 - w / 2;
248
+ t[86] !== Xt ? (P = ce("text-base", Xt), t[86] = Xt, t[87] = P) : P = t[87];
249
+ const Ct = C / 2 - w / 2;
250
250
  let it;
251
- t[88] !== mt[0] || t[89] !== et || t[90] !== P || t[91] !== Lt ? (it = /* @__PURE__ */ i.jsx("text", { style: et, className: P, x: Lt, y: 0, dx: -5, dy: 20, children: mt[0] }), t[88] = mt[0], t[89] = et, t[90] = P, t[91] = Lt, t[92] = it) : it = t[92];
252
- const Ht = l?.yAxis?.title;
251
+ t[88] !== mt[0] || t[89] !== et || t[90] !== P || t[91] !== Ct ? (it = /* @__PURE__ */ i.jsx("text", { style: et, className: P, x: Ct, y: 0, dx: -5, dy: 20, children: mt[0] }), t[88] = mt[0], t[89] = et, t[90] = P, t[91] = Ct, t[92] = it) : it = t[92];
252
+ const Ht = n?.yAxis?.title;
253
253
  let at;
254
- t[93] !== d[1] || t[94] !== Ht ? (at = {
255
- fill: d[1],
254
+ t[93] !== u[1] || t[94] !== Ht ? (at = {
255
+ fill: u[1],
256
256
  textAnchor: "start",
257
257
  ...Ht
258
- }, t[93] = d[1], t[94] = Ht, t[95] = at) : at = t[95];
258
+ }, t[93] = u[1], t[94] = Ht, t[95] = at) : at = t[95];
259
259
  const Yt = s?.yAxis?.title;
260
260
  let st;
261
- t[96] !== Yt ? (st = le("text-base", Yt), t[96] = Yt, t[97] = st) : st = t[97];
261
+ t[96] !== Yt ? (st = ce("text-base", Yt), t[96] = Yt, t[97] = st) : st = t[97];
262
262
  const kt = C / 2 + w / 2;
263
263
  let ot;
264
264
  t[98] !== mt[1] || t[99] !== at || t[100] !== st || t[101] !== kt ? (ot = /* @__PURE__ */ i.jsx("text", { style: at, className: st, x: kt, y: 0, dx: 5, dy: 20, children: mt[1] }), t[98] = mt[1], t[99] = at, t[100] = st, t[101] = kt, t[102] = ot) : ot = t[102];
@@ -268,22 +268,22 @@ function Re(a) {
268
268
  ot
269
269
  ] }), t[103] = Pt, t[104] = it, t[105] = ot, t[106] = E) : E = t[106];
270
270
  let lt;
271
- t[107] !== D ? (lt = D.filter(Ee).map(Pe), t[107] = D, t[108] = lt) : lt = t[108];
271
+ t[107] !== S ? (lt = S.filter(Ye).map(He), t[107] = S, t[108] = lt) : lt = t[108];
272
272
  let X;
273
- t[109] !== tt || t[110] !== E || t[111] !== lt || t[112] !== G || t[113] !== L || t[114] !== K || t[115] !== Q ? (X = /* @__PURE__ */ i.jsxs("g", { transform: G, children: [
274
- L,
273
+ t[109] !== tt || t[110] !== E || t[111] !== lt || t[112] !== V || t[113] !== A || t[114] !== K || t[115] !== Q ? (X = /* @__PURE__ */ i.jsxs("g", { transform: V, children: [
274
+ A,
275
275
  K,
276
276
  Q,
277
277
  tt,
278
278
  E,
279
279
  lt
280
- ] }), t[109] = tt, t[110] = E, t[111] = lt, t[112] = G, t[113] = L, t[114] = K, t[115] = Q, t[116] = X) : X = t[116];
280
+ ] }), t[109] = tt, t[110] = E, t[111] = lt, t[112] = V, t[113] = A, t[114] = K, t[115] = Q, t[116] = X) : X = t[116];
281
281
  let o;
282
- t[117] !== I || t[118] !== W || t[119] !== z || t[120] !== q || t[121] !== X || t[122] !== Z || t[123] !== _ ? (o = /* @__PURE__ */ i.jsx(I, { width: Z, height: _, viewBox: W, direction: z, ref: q, children: X }), t[117] = I, t[118] = W, t[119] = z, t[120] = q, t[121] = X, t[122] = Z, t[123] = _, t[124] = o) : o = t[124];
282
+ t[117] !== k || t[118] !== W || t[119] !== z || t[120] !== q || t[121] !== X || t[122] !== Z || t[123] !== _ ? (o = /* @__PURE__ */ i.jsx(k, { width: Z, height: _, viewBox: W, direction: z, ref: q, children: X }), t[117] = k, t[118] = W, t[119] = z, t[120] = q, t[121] = X, t[122] = Z, t[123] = _, t[124] = o) : o = t[124];
283
283
  let nt;
284
- t[125] !== s?.tooltip || t[126] !== Ct || t[127] !== x || t[128] !== Gt || t[129] !== l?.tooltip || t[130] !== Tt ? (nt = Gt && Tt && Ct && x ? /* @__PURE__ */ i.jsx(Me, { data: Gt, body: Tt, xPos: Ct, yPos: x, backgroundStyle: l?.tooltip, className: s?.tooltip }) : null, t[125] = s?.tooltip, t[126] = Ct, t[127] = x, t[128] = Gt, t[129] = l?.tooltip, t[130] = Tt, t[131] = nt) : nt = t[131];
284
+ t[125] !== s?.tooltip || t[126] !== Mt || t[127] !== d || t[128] !== Gt || t[129] !== n?.tooltip || t[130] !== Tt ? (nt = Gt && Tt && Mt && d ? /* @__PURE__ */ i.jsx(ke, { data: Gt, body: Tt, xPos: Mt, yPos: d, backgroundStyle: n?.tooltip, className: s?.tooltip }) : null, t[125] = s?.tooltip, t[126] = Mt, t[127] = d, t[128] = Gt, t[129] = n?.tooltip, t[130] = Tt, t[131] = nt) : nt = t[131];
285
285
  let H;
286
- t[132] !== s?.modal || t[133] !== O || t[134] !== $ ? (H = O && $ !== void 0 ? /* @__PURE__ */ i.jsx(Le, { body: O, data: $, setData: Mt, className: s?.modal }) : null, t[132] = s?.modal, t[133] = O, t[134] = $, t[135] = H) : H = t[135];
286
+ t[132] !== s?.modal || t[133] !== T || t[134] !== O ? (H = T && O !== void 0 ? /* @__PURE__ */ i.jsx($e, { body: T, data: O, setData: Lt, className: s?.modal }) : null, t[132] = s?.modal, t[133] = T, t[134] = O, t[135] = H) : H = t[135];
287
287
  let Qt;
288
288
  return t[136] !== o || t[137] !== nt || t[138] !== H ? (Qt = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
289
289
  o,
@@ -291,52 +291,52 @@ function Re(a) {
291
291
  H
292
292
  ] }), t[136] = o, t[137] = nt, t[138] = H, t[139] = Qt) : Qt = t[139], Qt;
293
293
  }
294
- function Pe(a) {
294
+ function He(a) {
295
295
  return a.layer;
296
296
  }
297
- function Ee(a) {
297
+ function Ye(a) {
298
298
  return a.position === "after";
299
299
  }
300
- function Xe(a) {
300
+ function We(a) {
301
301
  return a !== 0;
302
302
  }
303
- function He(a) {
303
+ function ze(a) {
304
304
  return a !== 0;
305
305
  }
306
- function Ye(a) {
306
+ function qe(a) {
307
307
  return a !== 0;
308
308
  }
309
- function We(a) {
309
+ function Ue(a) {
310
310
  return a !== 0;
311
311
  }
312
- function ze(a) {
312
+ function Je(a) {
313
313
  return a.layer;
314
314
  }
315
- function qe(a) {
315
+ function Ke(a) {
316
316
  return a.position === "before";
317
317
  }
318
- function Ue(a) {
318
+ function Qe(a) {
319
319
  return `${a.id}`;
320
320
  }
321
- function Je(a, t) {
321
+ function Ze(a, t) {
322
322
  return {
323
323
  ...a,
324
324
  id: `${t}`
325
325
  };
326
326
  }
327
- function ie(a, t, r, A) {
328
- const v = a.map((p) => p[t]).filter((p) => !me(p)), d = me(r) ? Math.min(...v) >= 0 ? 0 : Math.min(...v) : r, w = me(A) ? Math.max(...v) < 0 ? 0 : Math.max(...v) : A;
327
+ function oe(a, t, l, B) {
328
+ const v = a.map((p) => p[t]).filter((p) => !fe(p)), u = fe(l) ? Math.min(...v) >= 0 ? 0 : Math.min(...v) : l, w = fe(B) ? Math.max(...v) < 0 ? 0 : Math.max(...v) : B;
329
329
  return {
330
- min: d,
330
+ min: u,
331
331
  max: w
332
332
  };
333
333
  }
334
- function Vi(a) {
335
- const t = ve.c(106), {
336
- data: r,
337
- graphTitle: A,
334
+ function Oi(a) {
335
+ const t = Ae.c(118), {
336
+ data: l,
337
+ graphTitle: B,
338
338
  sources: v,
339
- graphDescription: d,
339
+ graphDescription: u,
340
340
  height: w,
341
341
  width: p,
342
342
  footNote: rt,
@@ -351,44 +351,44 @@ function Vi(a) {
351
351
  leftBarTitle: dt,
352
352
  tooltip: St,
353
353
  relativeHeight: jt,
354
- onSeriesMouseOver: V,
354
+ onSeriesMouseOver: N,
355
355
  graphID: At,
356
356
  barPadding: ut,
357
357
  truncateBy: ft,
358
358
  onSeriesMouseClick: Bt,
359
- centerGap: O,
360
- showValues: l,
359
+ centerGap: T,
360
+ showValues: n,
361
361
  maxValue: s,
362
- minValue: B,
362
+ minValue: L,
363
363
  refValues: m,
364
- suffix: xt,
365
- prefix: D,
366
- showTicks: T,
367
- showColorScale: S,
364
+ suffix: ht,
365
+ prefix: S,
366
+ showTicks: F,
367
+ showColorScale: I,
368
368
  graphDownload: Ft,
369
- dataDownload: ae,
369
+ dataDownload: le,
370
370
  language: It,
371
371
  colorLegendTitle: M,
372
372
  minHeight: Gt,
373
- theme: ht,
374
- ariaLabel: $,
375
- resetSelectionOnDoubleClick: Mt,
376
- detailsOnClick: Ct,
377
- styles: u,
378
- classNames: x,
373
+ theme: xt,
374
+ ariaLabel: O,
375
+ resetSelectionOnDoubleClick: Lt,
376
+ detailsOnClick: Mt,
377
+ styles: f,
378
+ classNames: d,
379
379
  noOfTicks: pt,
380
380
  animate: Rt,
381
- precision: f,
381
+ precision: h,
382
382
  customLayers: C,
383
383
  timeline: j,
384
384
  naLabel: gt
385
385
  } = a;
386
- let F;
387
- t[0] !== ct ? (F = ct === void 0 ? [be.light.categoricalColors.colors[0], be.light.categoricalColors.colors[1]] : ct, t[0] = ct, t[1] = F) : F = t[1];
388
- const I = F, W = mt === void 0 ? !1 : mt, z = Ut === void 0 ? 20 : Ut, q = Jt === void 0 ? 20 : Jt, U = Y === void 0 ? 25 : Y, J = Kt === void 0 ? 30 : Kt, G = Tt === void 0 ? "Right bar graph" : Tt, L = dt === void 0 ? "Left bar graph" : dt, K = ut === void 0 ? 0.25 : ut, Q = ft === void 0 ? 999 : ft, Z = O === void 0 ? 100 : O, _ = l === void 0 ? !0 : l;
386
+ let G;
387
+ t[0] !== ct ? (G = ct === void 0 ? [je.light.categoricalColors.colors[0], je.light.categoricalColors.colors[1]] : ct, t[0] = ct, t[1] = G) : G = t[1];
388
+ const k = G, W = mt === void 0 ? !1 : mt, z = Ut === void 0 ? 20 : Ut, q = Jt === void 0 ? 20 : Jt, U = Y === void 0 ? 25 : Y, J = Kt === void 0 ? 30 : Kt, V = Tt === void 0 ? "Right bar graph" : Tt, A = dt === void 0 ? "Left bar graph" : dt, K = ut === void 0 ? 0.25 : ut, Q = ft === void 0 ? 999 : ft, Z = T === void 0 ? 100 : T, _ = n === void 0 ? !0 : n;
389
389
  let R;
390
390
  t[2] !== m ? (R = m === void 0 ? [] : m, t[2] = m, t[3] = R) : R = t[3];
391
- const tt = R, Pt = xt === void 0 ? "" : xt, Et = D === void 0 ? "" : D, et = T === void 0 ? !0 : T, Xt = S === void 0 ? !1 : S, P = Ft === void 0 ? !1 : Ft, Lt = ae === void 0 ? !1 : ae, it = It === void 0 ? "en" : It, Ht = Gt === void 0 ? 0 : Gt, at = ht === void 0 ? "light" : ht, Yt = Mt === void 0 ? !0 : Mt, st = pt === void 0 ? 5 : pt, kt = Rt === void 0 ? !1 : Rt, ot = f === void 0 ? 2 : f;
391
+ const tt = R, Pt = ht === void 0 ? "" : ht, Et = S === void 0 ? "" : S, et = F === void 0 ? !0 : F, Xt = I === void 0 ? !1 : I, P = Ft === void 0 ? !1 : Ft, Ct = le === void 0 ? !1 : le, it = It === void 0 ? "en" : It, Ht = Gt === void 0 ? 0 : Gt, at = xt === void 0 ? "light" : xt, Yt = Lt === void 0 ? !0 : Lt, st = pt === void 0 ? 5 : pt, kt = Rt === void 0 ? !1 : Rt, ot = h === void 0 ? 2 : h;
392
392
  let E;
393
393
  t[4] !== C ? (E = C === void 0 ? [] : C, t[4] = C, t[5] = E) : E = t[5];
394
394
  const lt = E;
@@ -398,102 +398,109 @@ function Vi(a) {
398
398
  autoplay: !1,
399
399
  showOnlyActiveDate: !0
400
400
  } : j, t[6] = j, t[7] = X) : X = t[7];
401
- const o = X, nt = gt === void 0 ? "NA" : gt, [H, Qt] = Dt(0), [yt, N] = Dt(0), [n, se] = Dt(o.autoplay);
402
- let h;
403
- if (t[8] !== r || t[9] !== o.dateFormat) {
401
+ const o = X, nt = gt === void 0 ? "NA" : gt, [H, Qt] = Dt(0), [yt, D] = Dt(0), [r, ne] = Dt(o.autoplay);
402
+ let x;
403
+ if (t[8] !== l || t[9] !== o.dateFormat) {
404
404
  let y;
405
- t[11] !== o.dateFormat ? (y = (qt) => Be(`${qt.date}`, o.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[11] = o.dateFormat, t[12] = y) : y = t[12], h = [...new Set(r.filter(ii).map(y))], h.sort(ei), t[8] = r, t[9] = o.dateFormat, t[10] = h;
405
+ t[11] !== o.dateFormat ? (y = (qt) => Ce(`${qt.date}`, o.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[11] = o.dateFormat, t[12] = y) : y = t[12], x = [...new Set(l.filter(oi).map(y))], x.sort(si), t[8] = l, t[9] = o.dateFormat, t[10] = x;
406
406
  } else
407
- h = t[10];
408
- const c = h, [k, Vt] = Dt(o.autoplay ? 0 : c.length - 1), Wt = de(null), zt = de(null);
407
+ x = t[10];
408
+ const c = x, [$, Vt] = Dt(o.autoplay ? 0 : c.length - 1), Wt = he(null), zt = he(null);
409
409
  let $t, bt;
410
410
  t[13] === Symbol.for("react.memo_cache_sentinel") ? ($t = () => {
411
411
  const y = new ResizeObserver((qt) => {
412
- Qt(qt[0].target.clientWidth || 620), N(qt[0].target.clientHeight || 480);
412
+ Qt(qt[0].target.clientWidth || 620), D(qt[0].target.clientHeight || 480);
413
413
  });
414
414
  return Wt.current && y.observe(Wt.current), () => y.disconnect();
415
- }, bt = [], t[13] = $t, t[14] = bt) : ($t = t[13], bt = t[14]), ue($t, bt);
415
+ }, bt = [], t[13] = $t, t[14] = bt) : ($t = t[13], bt = t[14]), xe($t, bt);
416
416
  let Nt, vt;
417
- t[15] !== n || t[16] !== o.speed || t[17] !== c ? (Nt = () => {
417
+ t[15] !== r || t[16] !== o.speed || t[17] !== c ? (Nt = () => {
418
418
  const y = setInterval(() => {
419
419
  Vt((qt) => qt < c.length - 1 ? qt + 1 : 0);
420
420
  }, (o.speed || 2) * 1e3);
421
- return n || clearInterval(y), () => clearInterval(y);
422
- }, vt = [c, n, o.speed], t[15] = n, t[16] = o.speed, t[17] = c, t[18] = Nt, t[19] = vt) : (Nt = t[18], vt = t[19]), ue(Nt, vt);
421
+ return r || clearInterval(y), () => clearInterval(y);
422
+ }, vt = [c, r, o.speed], t[15] = r, t[16] = o.speed, t[17] = c, t[18] = Nt, t[19] = vt) : (Nt = t[18], vt = t[19]), xe(Nt, vt);
423
423
  const e = o.dateFormat || "yyyy";
424
424
  let g;
425
- t[20] !== k || t[21] !== e || t[22] !== o.showOnlyActiveDate || t[23] !== c ? (g = we(c, k, o.showOnlyActiveDate, e), t[20] = k, t[21] = e, t[22] = o.showOnlyActiveDate, t[23] = c, t[24] = g) : g = t[24];
426
- const b = g, ne = x?.graphContainer, re = u?.graphContainer;
425
+ t[20] !== $ || t[21] !== e || t[22] !== o.showOnlyActiveDate || t[23] !== c ? (g = Be(c, $, o.showOnlyActiveDate, e), t[20] = $, t[21] = e, t[22] = o.showOnlyActiveDate, t[23] = c, t[24] = g) : g = t[24];
426
+ const b = g, me = d?.graphContainer, de = f?.graphContainer;
427
427
  let Zt;
428
- t[25] !== x?.description || t[26] !== x?.title || t[27] !== r || t[28] !== Lt || t[29] !== d || t[30] !== P || t[31] !== A || t[32] !== u?.description || t[33] !== u?.title || t[34] !== p ? (Zt = A || d || P || Lt ? /* @__PURE__ */ i.jsx(Ne, { styles: {
429
- title: u?.title,
430
- description: u?.description
428
+ t[25] !== d?.description || t[26] !== d?.title || t[27] !== l || t[28] !== Ct || t[29] !== u || t[30] !== P || t[31] !== B || t[32] !== f?.description || t[33] !== f?.title || t[34] !== p ? (Zt = B || u || P || Ct ? /* @__PURE__ */ i.jsx(Te, { styles: {
429
+ title: f?.title,
430
+ description: f?.description
431
431
  }, classNames: {
432
- title: x?.title,
433
- description: x?.description
434
- }, graphTitle: A, graphDescription: d, width: p, graphDownload: P ? zt : void 0, dataDownload: Lt ? r.map(ti).filter(_e).length > 0 ? r.map(Ze).filter(Qe) : r.filter(Ke) : null }) : null, t[25] = x?.description, t[26] = x?.title, t[27] = r, t[28] = Lt, t[29] = d, t[30] = P, t[31] = A, t[32] = u?.description, t[33] = u?.title, t[34] = p, t[35] = Zt) : Zt = t[35];
432
+ title: d?.title,
433
+ description: d?.description
434
+ }, graphTitle: B, graphDescription: u, width: p, graphDownload: P ? zt : void 0, dataDownload: Ct ? l.map(ai).filter(ii).length > 0 ? l.map(ei).filter(ti) : l.filter(_e) : null }) : null, t[25] = d?.description, t[26] = d?.title, t[27] = l, t[28] = Ct, t[29] = u, t[30] = P, t[31] = B, t[32] = f?.description, t[33] = f?.title, t[34] = p, t[35] = Zt) : Zt = t[35];
435
435
  let _t;
436
- t[36] !== k || t[37] !== b || t[38] !== n || t[39] !== o.enabled || t[40] !== c ? (_t = o.enabled && c.length > 0 && b ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
436
+ t[36] !== $ || t[37] !== b || t[38] !== r || t[39] !== o.enabled || t[40] !== c ? (_t = o.enabled && c.length > 0 && b ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
437
437
  /* @__PURE__ */ i.jsx("button", { type: "button", onClick: () => {
438
- se(!n);
439
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": n ? "Click to pause animation" : "Click to play animation", children: n ? /* @__PURE__ */ i.jsx(Te, {}) : /* @__PURE__ */ i.jsx(Se, {}) }),
440
- /* @__PURE__ */ i.jsx(je, { min: c[0], max: c[c.length - 1], marks: b, step: null, defaultValue: c[c.length - 1], value: c[k], onChangeComplete: (y) => {
438
+ ne(!r);
439
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": r ? "Click to pause animation" : "Click to play animation", children: r ? /* @__PURE__ */ i.jsx(Ie, {}) : /* @__PURE__ */ i.jsx(Ge, {}) }),
440
+ /* @__PURE__ */ i.jsx(Le, { min: c[0], max: c[c.length - 1], marks: b, step: null, defaultValue: c[c.length - 1], value: c[$], onChangeComplete: (y) => {
441
441
  Vt(c.indexOf(y));
442
442
  }, onChange: (y) => {
443
443
  Vt(c.indexOf(y));
444
444
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
445
- ] }) : null, t[36] = k, t[37] = b, t[38] = n, t[39] = o.enabled, t[40] = c, t[41] = _t) : _t = t[41];
445
+ ] }) : null, t[36] = $, t[37] = b, t[38] = r, t[39] = o.enabled, t[40] = c, t[41] = _t) : _t = t[41];
446
446
  let te;
447
- t[42] !== kt || t[43] !== I || t[44] !== K || t[45] !== J || t[46] !== Z || t[47] !== x || t[48] !== M || t[49] !== lt || t[50] !== r || t[51] !== Ct || t[52] !== k || t[53] !== L || t[54] !== z || t[55] !== s || t[56] !== B || t[57] !== nt || t[58] !== st || t[59] !== Bt || t[60] !== V || t[61] !== ot || t[62] !== Et || t[63] !== tt || t[64] !== Yt || t[65] !== G || t[66] !== q || t[67] !== Xt || t[68] !== et || t[69] !== _ || t[70] !== u || t[71] !== Pt || t[72] !== yt || t[73] !== H || t[74] !== o.dateFormat || t[75] !== o.enabled || t[76] !== St || t[77] !== U || t[78] !== Q || t[79] !== c ? (te = r.length === 0 ? /* @__PURE__ */ i.jsx(De, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
448
- Xt ? /* @__PURE__ */ i.jsx(Oe, { colorLegendTitle: M, colorDomain: [L, G], colors: I, showNAColor: !1, className: x?.colorLegend }) : null,
449
- /* @__PURE__ */ i.jsx(Ie, { ref: Wt, children: H && yt ? /* @__PURE__ */ i.jsx(Re, { data: Fe(r, o.dateFormat || "yyyy").filter((y) => o.enabled ? y.date === Ae(new Date(c[k]), o.dateFormat || "yyyy") : y), barColors: I, width: H, centerGap: Z, height: yt, truncateBy: Q, leftMargin: z, rightMargin: q, topMargin: U, bottomMargin: J, axisTitles: [L, G], tooltip: St, onSeriesMouseOver: V, barPadding: K, refValues: tt, maxValue: Math.max(ie(r, "leftBar", B, s).max, ie(r, "rightBar", B, s).max), minValue: Math.min(ie(r, "leftBar", B, s).min, ie(r, "rightBar", B, s).min), minValueLeftBar: ie(r, "leftBar", B, s).min, minValueRightBar: ie(r, "rightBar", B, s).min, showValues: _, onSeriesMouseClick: Bt, showTicks: et, suffix: Pt, prefix: Et, resetSelectionOnDoubleClick: Yt, detailsOnClick: Ct, styles: u, classNames: x, noOfTicks: st, animate: kt === !0 ? {
450
- duration: 0.5,
451
- once: !0,
452
- amount: 0.5
453
- } : kt || {
454
- duration: 0,
455
- once: !0,
456
- amount: 0
457
- }, precision: ot, customLayers: lt, naLabel: nt }) : null })
458
- ] }), t[42] = kt, t[43] = I, t[44] = K, t[45] = J, t[46] = Z, t[47] = x, t[48] = M, t[49] = lt, t[50] = r, t[51] = Ct, t[52] = k, t[53] = L, t[54] = z, t[55] = s, t[56] = B, t[57] = nt, t[58] = st, t[59] = Bt, t[60] = V, t[61] = ot, t[62] = Et, t[63] = tt, t[64] = Yt, t[65] = G, t[66] = q, t[67] = Xt, t[68] = et, t[69] = _, t[70] = u, t[71] = Pt, t[72] = yt, t[73] = H, t[74] = o.dateFormat, t[75] = o.enabled, t[76] = St, t[77] = U, t[78] = Q, t[79] = c, t[80] = te) : te = t[80];
447
+ t[42] !== k || t[43] !== d?.colorLegend || t[44] !== M || t[45] !== l.length || t[46] !== A || t[47] !== V || t[48] !== Xt ? (te = Xt && l.length > 0 ? /* @__PURE__ */ i.jsx(Se, { colorLegendTitle: M, colorDomain: [A, V], colors: k, showNAColor: !1, className: d?.colorLegend }) : null, t[42] = k, t[43] = d?.colorLegend, t[44] = M, t[45] = l.length, t[46] = A, t[47] = V, t[48] = Xt, t[49] = te) : te = t[49];
459
448
  let ee;
460
- t[81] !== x?.footnote || t[82] !== x?.source || t[83] !== rt || t[84] !== v || t[85] !== u?.footnote || t[86] !== u?.source || t[87] !== p ? (ee = v || rt ? /* @__PURE__ */ i.jsx($e, { styles: {
461
- footnote: u?.footnote,
462
- source: u?.source
449
+ t[50] !== l.length ? (ee = l.length === 0 && /* @__PURE__ */ i.jsx(Fe, {}), t[50] = l.length, t[51] = ee) : ee = t[51];
450
+ let ie;
451
+ t[52] !== kt || t[53] !== k || t[54] !== K || t[55] !== J || t[56] !== Z || t[57] !== d || t[58] !== lt || t[59] !== l || t[60] !== Mt || t[61] !== $ || t[62] !== A || t[63] !== z || t[64] !== s || t[65] !== L || t[66] !== nt || t[67] !== st || t[68] !== Bt || t[69] !== N || t[70] !== ot || t[71] !== Et || t[72] !== tt || t[73] !== Yt || t[74] !== V || t[75] !== q || t[76] !== et || t[77] !== _ || t[78] !== f || t[79] !== Pt || t[80] !== yt || t[81] !== H || t[82] !== o.dateFormat || t[83] !== o.enabled || t[84] !== St || t[85] !== U || t[86] !== Q || t[87] !== c ? (ie = H && yt && l.length > 0 ? /* @__PURE__ */ i.jsx(Xe, { data: Re(l, o.dateFormat || "yyyy").filter((y) => o.enabled ? y.date === Me(new Date(c[$]), o.dateFormat || "yyyy") : y), barColors: k, width: H, centerGap: Z, height: yt, truncateBy: Q, leftMargin: z, rightMargin: q, topMargin: U, bottomMargin: J, axisTitles: [A, V], tooltip: St, onSeriesMouseOver: N, barPadding: K, refValues: tt, maxValue: Math.max(oe(l, "leftBar", L, s).max, oe(l, "rightBar", L, s).max), minValue: Math.min(oe(l, "leftBar", L, s).min, oe(l, "rightBar", L, s).min), minValueLeftBar: oe(l, "leftBar", L, s).min, minValueRightBar: oe(l, "rightBar", L, s).min, showValues: _, onSeriesMouseClick: Bt, showTicks: et, suffix: Pt, prefix: Et, resetSelectionOnDoubleClick: Yt, detailsOnClick: Mt, styles: f, classNames: d, noOfTicks: st, animate: kt === !0 ? {
452
+ duration: 0.5,
453
+ once: !0,
454
+ amount: 0.5
455
+ } : kt || {
456
+ duration: 0,
457
+ once: !0,
458
+ amount: 0
459
+ }, precision: ot, customLayers: lt, naLabel: nt }) : null, t[52] = kt, t[53] = k, t[54] = K, t[55] = J, t[56] = Z, t[57] = d, t[58] = lt, t[59] = l, t[60] = Mt, t[61] = $, t[62] = A, t[63] = z, t[64] = s, t[65] = L, t[66] = nt, t[67] = st, t[68] = Bt, t[69] = N, t[70] = ot, t[71] = Et, t[72] = tt, t[73] = Yt, t[74] = V, t[75] = q, t[76] = et, t[77] = _, t[78] = f, t[79] = Pt, t[80] = yt, t[81] = H, t[82] = o.dateFormat, t[83] = o.enabled, t[84] = St, t[85] = U, t[86] = Q, t[87] = c, t[88] = ie) : ie = t[88];
460
+ let ae;
461
+ t[89] !== ee || t[90] !== ie ? (ae = /* @__PURE__ */ i.jsxs(Pe, { ref: Wt, children: [
462
+ ee,
463
+ ie
464
+ ] }), t[89] = ee, t[90] = ie, t[91] = ae) : ae = t[91];
465
+ let se;
466
+ t[92] !== d?.footnote || t[93] !== d?.source || t[94] !== rt || t[95] !== v || t[96] !== f?.footnote || t[97] !== f?.source || t[98] !== p ? (se = v || rt ? /* @__PURE__ */ i.jsx(De, { styles: {
467
+ footnote: f?.footnote,
468
+ source: f?.source
463
469
  }, classNames: {
464
- footnote: x?.footnote,
465
- source: x?.source
466
- }, sources: v, footNote: rt, width: p }) : null, t[81] = x?.footnote, t[82] = x?.source, t[83] = rt, t[84] = v, t[85] = u?.footnote, t[86] = u?.source, t[87] = p, t[88] = ee) : ee = t[88];
467
- let oe;
468
- return t[89] !== $ || t[90] !== W || t[91] !== At || t[92] !== w || t[93] !== it || t[94] !== Ht || t[95] !== wt || t[96] !== jt || t[97] !== ne || t[98] !== re || t[99] !== Zt || t[100] !== _t || t[101] !== te || t[102] !== ee || t[103] !== at || t[104] !== p ? (oe = /* @__PURE__ */ i.jsxs(Ge, { className: ne, style: re, id: At, ref: zt, "aria-label": $, backgroundColor: W, theme: at, language: it, minHeight: Ht, width: p, height: w, relativeHeight: jt, padding: wt, children: [
470
+ footnote: d?.footnote,
471
+ source: d?.source
472
+ }, sources: v, footNote: rt, width: p }) : null, t[92] = d?.footnote, t[93] = d?.source, t[94] = rt, t[95] = v, t[96] = f?.footnote, t[97] = f?.source, t[98] = p, t[99] = se) : se = t[99];
473
+ let re;
474
+ return t[100] !== O || t[101] !== W || t[102] !== At || t[103] !== w || t[104] !== it || t[105] !== Ht || t[106] !== wt || t[107] !== jt || t[108] !== me || t[109] !== de || t[110] !== Zt || t[111] !== _t || t[112] !== te || t[113] !== ae || t[114] !== se || t[115] !== at || t[116] !== p ? (re = /* @__PURE__ */ i.jsxs(Ee, { className: me, style: de, id: At, ref: zt, "aria-label": O, backgroundColor: W, theme: at, language: it, minHeight: Ht, width: p, height: w, relativeHeight: jt, padding: wt, children: [
469
475
  Zt,
470
476
  _t,
471
477
  te,
472
- ee
473
- ] }), t[89] = $, t[90] = W, t[91] = At, t[92] = w, t[93] = it, t[94] = Ht, t[95] = wt, t[96] = jt, t[97] = ne, t[98] = re, t[99] = Zt, t[100] = _t, t[101] = te, t[102] = ee, t[103] = at, t[104] = p, t[105] = oe) : oe = t[105], oe;
478
+ ae,
479
+ se
480
+ ] }), t[100] = O, t[101] = W, t[102] = At, t[103] = w, t[104] = it, t[105] = Ht, t[106] = wt, t[107] = jt, t[108] = me, t[109] = de, t[110] = Zt, t[111] = _t, t[112] = te, t[113] = ae, t[114] = se, t[115] = at, t[116] = p, t[117] = re) : re = t[117], re;
474
481
  }
475
- function Ke(a) {
482
+ function _e(a) {
476
483
  return a !== void 0;
477
484
  }
478
- function Qe(a) {
485
+ function ti(a) {
479
486
  return a !== void 0;
480
487
  }
481
- function Ze(a) {
488
+ function ei(a) {
482
489
  return a.data;
483
490
  }
484
- function _e(a) {
491
+ function ii(a) {
485
492
  return a !== void 0;
486
493
  }
487
- function ti(a) {
494
+ function ai(a) {
488
495
  return a.data;
489
496
  }
490
- function ei(a, t) {
497
+ function si(a, t) {
491
498
  return a - t;
492
499
  }
493
- function ii(a) {
500
+ function oi(a) {
494
501
  return a.date;
495
502
  }
496
503
  export {
497
- Vi as ButterflyChart
504
+ Oi as ButterflyChart
498
505
  };
499
506
  //# sourceMappingURL=ButterflyChart.js.map