@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.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +279 -272
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1795 -1724
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +312 -305
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +298 -287
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +224 -217
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +404 -397
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +42 -39
- package/dist/DonutChart.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +320 -313
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +298 -291
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
- package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
- package/dist/EmptyState-gLDRXBHm.cjs +2 -0
- package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
- package/dist/GraphEl-C2Fgg8PA.cjs +2 -0
- package/dist/GraphEl-C2Fgg8PA.cjs.map +1 -0
- package/dist/{GraphEl-CRrAlbcr.js → GraphEl-oZwZiTHI.js} +3 -2
- package/dist/GraphEl-oZwZiTHI.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +179 -172
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +368 -361
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +327 -320
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +374 -367
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.js +385 -378
- package/dist/ParetoChart.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +34 -33
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +176 -169
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +366 -359
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +285 -278
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +243 -236
- package/dist/SlopeChart.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +293 -286
- package/dist/StripChart.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +222 -215
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/index-Blvf-Q3U.cjs +2 -0
- package/dist/{index-CF5hnGvG.cjs.map → index-Blvf-Q3U.cjs.map} +1 -1
- package/dist/index-D1RrKgK6.js +337 -0
- package/dist/index-D1RrKgK6.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/EmptyState-BZo1BbAn.js.map +0 -1
- package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
- package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
- package/dist/GraphEl-BLMih7RN.cjs +0 -2
- package/dist/GraphEl-BLMih7RN.cjs.map +0 -1
- package/dist/GraphEl-CRrAlbcr.js.map +0 -1
- package/dist/index-CF5hnGvG.cjs +0 -2
- package/dist/index-DPGq3eIL.js +0 -330
- package/dist/index-DPGq3eIL.js.map +0 -1
package/dist/TreeMapGraph.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { j as
|
|
4
|
-
import { T as
|
|
5
|
-
import { n as
|
|
6
|
-
import { g as
|
|
1
|
+
import { c as Xt, j as b, m as Ht } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { useRef as Lt, useState as it, useEffect as _t } from "react";
|
|
3
|
+
import { j as Gt } from "./Typography-PxtFcnJb.js";
|
|
4
|
+
import { T as te } from "./Tooltip-Dj5eVppQ.js";
|
|
5
|
+
import { n as ee } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
|
+
import { g as $t } from "./getTextColorBasedOnBgColor-CDY808zi.js";
|
|
7
7
|
import { Colors as tt } from "./Colors.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { u as
|
|
10
|
-
import { m as
|
|
11
|
-
import { A as
|
|
12
|
-
import { c as
|
|
13
|
-
import { GraphFooter as
|
|
14
|
-
import { GraphHeader as
|
|
15
|
-
import { ColorLegendWithMouseOver as
|
|
16
|
-
import { E as
|
|
17
|
-
import { u as
|
|
18
|
-
import { a as
|
|
19
|
-
function
|
|
8
|
+
import { D as ne } from "./DetailsModal-0Ry5nXiC.js";
|
|
9
|
+
import { u as ie } from "./use-in-view-Cxa7y1TH.js";
|
|
10
|
+
import { m as Dt } from "./proxy-BxkFHwUw.js";
|
|
11
|
+
import { A as oe } from "./index-BqfRwk1n.js";
|
|
12
|
+
import { c as re } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
13
|
+
import { GraphFooter as ae } from "./GraphFooter.js";
|
|
14
|
+
import { GraphHeader as le } from "./GraphHeader.js";
|
|
15
|
+
import { ColorLegendWithMouseOver as se } from "./ColorLegendWithMouseOver.js";
|
|
16
|
+
import { E as ce } from "./EmptyState-C7ZXkZWd.js";
|
|
17
|
+
import { u as Wt } from "./uniqBy-BHy4I8PK.js";
|
|
18
|
+
import { a as ue, G as de } from "./GraphContainer-CRqzdKu2.js";
|
|
19
|
+
function fe(e) {
|
|
20
20
|
var t = 0, n = e.children, i = n && n.length;
|
|
21
21
|
if (!i) t = 1;
|
|
22
22
|
else for (; --i >= 0; ) t += n[i].value;
|
|
23
23
|
e.value = t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return this.eachAfter(
|
|
25
|
+
function he() {
|
|
26
|
+
return this.eachAfter(fe);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function pe(e, t) {
|
|
29
29
|
let n = -1;
|
|
30
30
|
for (const i of this)
|
|
31
31
|
e.call(t, i, ++n, this);
|
|
32
32
|
return this;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ge(e, t) {
|
|
35
35
|
for (var n = this, i = [n], r, l, a = -1; n = i.pop(); )
|
|
36
36
|
if (e.call(t, n, ++a, this), r = n.children)
|
|
37
37
|
for (l = r.length - 1; l >= 0; --l)
|
|
38
38
|
i.push(r[l]);
|
|
39
39
|
return this;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function me(e, t) {
|
|
42
42
|
for (var n = this, i = [n], r = [], l, a, d, g = -1; n = i.pop(); )
|
|
43
43
|
if (r.push(n), l = n.children)
|
|
44
44
|
for (a = 0, d = l.length; a < d; ++a)
|
|
@@ -47,58 +47,58 @@ function he(e, t) {
|
|
|
47
47
|
e.call(t, n, ++g, this);
|
|
48
48
|
return this;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ve(e, t) {
|
|
51
51
|
let n = -1;
|
|
52
52
|
for (const i of this)
|
|
53
53
|
if (e.call(t, i, ++n, this))
|
|
54
54
|
return i;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ye(e) {
|
|
57
57
|
return this.eachAfter(function(t) {
|
|
58
58
|
for (var n = +e(t.data) || 0, i = t.children, r = i && i.length; --r >= 0; ) n += i[r].value;
|
|
59
59
|
t.value = n;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function we(e) {
|
|
63
63
|
return this.eachBefore(function(t) {
|
|
64
64
|
t.children && t.children.sort(e);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
for (var t = this, n =
|
|
67
|
+
function xe(e) {
|
|
68
|
+
for (var t = this, n = be(t, e), i = [t]; t !== n; )
|
|
69
69
|
t = t.parent, i.push(t);
|
|
70
70
|
for (var r = i.length; e !== n; )
|
|
71
71
|
i.splice(r, 0, e), e = e.parent;
|
|
72
72
|
return i;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function be(e, t) {
|
|
75
75
|
if (e === t) return e;
|
|
76
76
|
var n = e.ancestors(), i = t.ancestors(), r = null;
|
|
77
77
|
for (e = n.pop(), t = i.pop(); e === t; )
|
|
78
78
|
r = e, e = n.pop(), t = i.pop();
|
|
79
79
|
return r;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Me() {
|
|
82
82
|
for (var e = this, t = [e]; e = e.parent; )
|
|
83
83
|
t.push(e);
|
|
84
84
|
return t;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Oe() {
|
|
87
87
|
return Array.from(this);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function je() {
|
|
90
90
|
var e = [];
|
|
91
91
|
return this.eachBefore(function(t) {
|
|
92
92
|
t.children || e.push(t);
|
|
93
93
|
}), e;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function Ce() {
|
|
96
96
|
var e = this, t = [];
|
|
97
97
|
return e.each(function(n) {
|
|
98
98
|
n !== e && t.push({ source: n.parent, target: n });
|
|
99
99
|
}), t;
|
|
100
100
|
}
|
|
101
|
-
function*
|
|
101
|
+
function* De() {
|
|
102
102
|
var e = this, t, n = [e], i, r, l;
|
|
103
103
|
do
|
|
104
104
|
for (t = n.reverse(), n = []; e = t.pop(); )
|
|
@@ -107,97 +107,97 @@ function* Oe() {
|
|
|
107
107
|
n.push(i[r]);
|
|
108
108
|
while (n.length);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
e instanceof Map ? (e = [void 0, e], t === void 0 && (t =
|
|
112
|
-
for (var n = new
|
|
110
|
+
function Yt(e, t) {
|
|
111
|
+
e instanceof Map ? (e = [void 0, e], t === void 0 && (t = Ve)) : t === void 0 && (t = Ie);
|
|
112
|
+
for (var n = new xt(e), i, r = [n], l, a, d, g; i = r.pop(); )
|
|
113
113
|
if ((a = t(i.data)) && (g = (a = Array.from(a)).length))
|
|
114
114
|
for (i.children = a, d = g - 1; d >= 0; --d)
|
|
115
|
-
r.push(l = a[d] = new
|
|
116
|
-
return n.eachBefore(
|
|
115
|
+
r.push(l = a[d] = new xt(a[d])), l.parent = i, l.depth = i.depth + 1;
|
|
116
|
+
return n.eachBefore(Kt);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
return
|
|
118
|
+
function ke() {
|
|
119
|
+
return Yt(this).eachBefore(Ne);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Ie(e) {
|
|
122
122
|
return e.children;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Ve(e) {
|
|
125
125
|
return Array.isArray(e) ? e[1] : null;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ne(e) {
|
|
128
128
|
e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Kt(e) {
|
|
131
131
|
var t = 0;
|
|
132
132
|
do
|
|
133
133
|
e.height = t;
|
|
134
134
|
while ((e = e.parent) && e.height < ++t);
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function xt(e) {
|
|
137
137
|
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
constructor:
|
|
141
|
-
count:
|
|
142
|
-
each:
|
|
143
|
-
eachAfter:
|
|
144
|
-
eachBefore:
|
|
145
|
-
find:
|
|
146
|
-
sum:
|
|
147
|
-
sort:
|
|
148
|
-
path:
|
|
149
|
-
ancestors:
|
|
150
|
-
descendants:
|
|
151
|
-
leaves:
|
|
152
|
-
links:
|
|
153
|
-
copy:
|
|
154
|
-
[Symbol.iterator]:
|
|
139
|
+
xt.prototype = Yt.prototype = {
|
|
140
|
+
constructor: xt,
|
|
141
|
+
count: he,
|
|
142
|
+
each: pe,
|
|
143
|
+
eachAfter: me,
|
|
144
|
+
eachBefore: ge,
|
|
145
|
+
find: ve,
|
|
146
|
+
sum: ye,
|
|
147
|
+
sort: we,
|
|
148
|
+
path: xe,
|
|
149
|
+
ancestors: Me,
|
|
150
|
+
descendants: Oe,
|
|
151
|
+
leaves: je,
|
|
152
|
+
links: Ce,
|
|
153
|
+
copy: ke,
|
|
154
|
+
[Symbol.iterator]: De
|
|
155
155
|
};
|
|
156
|
-
function
|
|
157
|
-
return e == null ? null :
|
|
156
|
+
function At(e) {
|
|
157
|
+
return e == null ? null : Ut(e);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ut(e) {
|
|
160
160
|
if (typeof e != "function") throw new Error();
|
|
161
161
|
return e;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function yt() {
|
|
164
164
|
return 0;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function wt(e) {
|
|
167
167
|
return function() {
|
|
168
168
|
return e;
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Be(e) {
|
|
172
172
|
e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Se(e, t, n, i, r) {
|
|
175
175
|
for (var l = e.children, a, d = -1, g = l.length, y = e.value && (i - t) / e.value; ++d < g; )
|
|
176
176
|
a = l[d], a.y0 = n, a.y1 = r, a.x0 = t, a.x1 = t += a.value * y;
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
function
|
|
178
|
+
var $e = { depth: -1 }, qt = {}, Et = {};
|
|
179
|
+
function Ae(e) {
|
|
180
180
|
return e.id;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Ee(e) {
|
|
183
183
|
return e.parentId;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
var e =
|
|
185
|
+
function Le() {
|
|
186
|
+
var e = Ae, t = Ee, n;
|
|
187
187
|
function i(r) {
|
|
188
188
|
var l = Array.from(r), a = e, d = t, g, y, c, v, o, f, u, m, h = /* @__PURE__ */ new Map();
|
|
189
189
|
if (n != null) {
|
|
190
|
-
const p = l.map((O,
|
|
190
|
+
const p = l.map((O, x) => Te(n(O, x, r))), j = p.map(Ft), k = new Set(p).add("");
|
|
191
191
|
for (const O of j)
|
|
192
|
-
k.has(O) || (k.add(O), p.push(O), j.push(
|
|
193
|
-
a = (O,
|
|
192
|
+
k.has(O) || (k.add(O), p.push(O), j.push(Ft(O)), l.push(Et));
|
|
193
|
+
a = (O, x) => p[x], d = (O, x) => j[x];
|
|
194
194
|
}
|
|
195
195
|
for (c = 0, g = l.length; c < g; ++c)
|
|
196
|
-
y = l[c], f = l[c] = new
|
|
196
|
+
y = l[c], f = l[c] = new xt(y), (u = a(y, c, r)) != null && (u += "") && (m = f.id = u, h.set(m, h.has(m) ? qt : f)), (u = d(y, c, r)) != null && (u += "") && (f.parent = u);
|
|
197
197
|
for (c = 0; c < g; ++c)
|
|
198
198
|
if (f = l[c], u = f.parent) {
|
|
199
199
|
if (o = h.get(u), !o) throw new Error("missing: " + u);
|
|
200
|
-
if (o ===
|
|
200
|
+
if (o === qt) throw new Error("ambiguous: " + u);
|
|
201
201
|
o.children ? o.children.push(f) : o.children = [f], f.parent = o;
|
|
202
202
|
} else {
|
|
203
203
|
if (v) throw new Error("multiple roots");
|
|
@@ -205,36 +205,36 @@ function $e() {
|
|
|
205
205
|
}
|
|
206
206
|
if (!v) throw new Error("no root");
|
|
207
207
|
if (n != null) {
|
|
208
|
-
for (; v.data ===
|
|
208
|
+
for (; v.data === Et && v.children.length === 1; )
|
|
209
209
|
v = v.children[0], --g;
|
|
210
|
-
for (let p = l.length - 1; p >= 0 && (f = l[p], f.data ===
|
|
210
|
+
for (let p = l.length - 1; p >= 0 && (f = l[p], f.data === Et); --p)
|
|
211
211
|
f.data = null;
|
|
212
212
|
}
|
|
213
|
-
if (v.parent =
|
|
213
|
+
if (v.parent = $e, v.eachBefore(function(p) {
|
|
214
214
|
p.depth = p.parent.depth + 1, --g;
|
|
215
|
-
}).eachBefore(
|
|
215
|
+
}).eachBefore(Kt), v.parent = null, g > 0) throw new Error("cycle");
|
|
216
216
|
return v;
|
|
217
217
|
}
|
|
218
218
|
return i.id = function(r) {
|
|
219
|
-
return arguments.length ? (e =
|
|
219
|
+
return arguments.length ? (e = At(r), i) : e;
|
|
220
220
|
}, i.parentId = function(r) {
|
|
221
|
-
return arguments.length ? (t =
|
|
221
|
+
return arguments.length ? (t = At(r), i) : t;
|
|
222
222
|
}, i.path = function(r) {
|
|
223
|
-
return arguments.length ? (n =
|
|
223
|
+
return arguments.length ? (n = At(r), i) : n;
|
|
224
224
|
}, i;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Te(e) {
|
|
227
227
|
e = `${e}`;
|
|
228
228
|
let t = e.length;
|
|
229
|
-
return
|
|
229
|
+
return Tt(e, t - 1) && !Tt(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Ft(e) {
|
|
232
232
|
let t = e.length;
|
|
233
233
|
if (t < 2) return "";
|
|
234
|
-
for (; --t > 1 && !
|
|
234
|
+
for (; --t > 1 && !Tt(e, t); ) ;
|
|
235
235
|
return e.slice(0, t);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Tt(e, t) {
|
|
238
238
|
if (e[t] === "/") {
|
|
239
239
|
let n = 0;
|
|
240
240
|
for (; t > 0 && e[--t] === "\\"; ) ++n;
|
|
@@ -242,40 +242,40 @@ function At(e, t) {
|
|
|
242
242
|
}
|
|
243
243
|
return !1;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function ze(e, t, n, i, r) {
|
|
246
246
|
for (var l = e.children, a, d = -1, g = l.length, y = e.value && (r - n) / e.value; ++d < g; )
|
|
247
247
|
a = l[d], a.x0 = t, a.x1 = i, a.y0 = n, a.y1 = n += a.value * y;
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
251
|
-
for (var a = [], d = t.children, g, y, c = 0, v = 0, o = d.length, f, u, m = t.value, h, p, j, k, O,
|
|
249
|
+
var Re = (1 + Math.sqrt(5)) / 2;
|
|
250
|
+
function Pe(e, t, n, i, r, l) {
|
|
251
|
+
for (var a = [], d = t.children, g, y, c = 0, v = 0, o = d.length, f, u, m = t.value, h, p, j, k, O, x, C; c < o; ) {
|
|
252
252
|
f = r - n, u = l - i;
|
|
253
253
|
do
|
|
254
254
|
h = d[v++].value;
|
|
255
255
|
while (!h && v < o);
|
|
256
|
-
for (p = j = h,
|
|
257
|
-
if (h += y = d[v].value, y < p && (p = y), y > j && (j = y), C = h * h *
|
|
256
|
+
for (p = j = h, x = Math.max(u / f, f / u) / (m * e), C = h * h * x, O = Math.max(j / C, C / p); v < o; ++v) {
|
|
257
|
+
if (h += y = d[v].value, y < p && (p = y), y > j && (j = y), C = h * h * x, k = Math.max(j / C, C / p), k > O) {
|
|
258
258
|
h -= y;
|
|
259
259
|
break;
|
|
260
260
|
}
|
|
261
261
|
O = k;
|
|
262
262
|
}
|
|
263
|
-
a.push(g = { value: h, dice: f < u, children: d.slice(c, v) }), g.dice ?
|
|
263
|
+
a.push(g = { value: h, dice: f < u, children: d.slice(c, v) }), g.dice ? Se(g, n, i, r, m ? i += u * h / m : l) : ze(g, n, i, m ? n += f * h / m : r, l), m -= h, c = v;
|
|
264
264
|
}
|
|
265
265
|
return a;
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const He = (function e(t) {
|
|
268
268
|
function n(i, r, l, a, d) {
|
|
269
|
-
|
|
269
|
+
Pe(t, i, r, l, a, d);
|
|
270
270
|
}
|
|
271
271
|
return n.ratio = function(i) {
|
|
272
272
|
return e((i = +i) > 1 ? i : 1);
|
|
273
273
|
}, n;
|
|
274
|
-
})(
|
|
275
|
-
function
|
|
276
|
-
var e =
|
|
274
|
+
})(Re);
|
|
275
|
+
function Ge() {
|
|
276
|
+
var e = He, t = !1, n = 1, i = 1, r = [0], l = yt, a = yt, d = yt, g = yt, y = yt;
|
|
277
277
|
function c(o) {
|
|
278
|
-
return o.x0 = o.y0 = 0, o.x1 = n, o.y1 = i, o.eachBefore(v), r = [0], t && o.eachBefore(
|
|
278
|
+
return o.x0 = o.y0 = 0, o.x1 = n, o.y1 = i, o.eachBefore(v), r = [0], t && o.eachBefore(Be), o;
|
|
279
279
|
}
|
|
280
280
|
function v(o) {
|
|
281
281
|
var f = r[o.depth], u = o.x0 + f, m = o.y0 + f, h = o.x1 - f, p = o.y1 - f;
|
|
@@ -286,25 +286,25 @@ function Re() {
|
|
|
286
286
|
}, c.size = function(o) {
|
|
287
287
|
return arguments.length ? (n = +o[0], i = +o[1], c) : [n, i];
|
|
288
288
|
}, c.tile = function(o) {
|
|
289
|
-
return arguments.length ? (e =
|
|
289
|
+
return arguments.length ? (e = Ut(o), c) : e;
|
|
290
290
|
}, c.padding = function(o) {
|
|
291
291
|
return arguments.length ? c.paddingInner(o).paddingOuter(o) : c.paddingInner();
|
|
292
292
|
}, c.paddingInner = function(o) {
|
|
293
|
-
return arguments.length ? (l = typeof o == "function" ? o :
|
|
293
|
+
return arguments.length ? (l = typeof o == "function" ? o : wt(+o), c) : l;
|
|
294
294
|
}, c.paddingOuter = function(o) {
|
|
295
295
|
return arguments.length ? c.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o) : c.paddingTop();
|
|
296
296
|
}, c.paddingTop = function(o) {
|
|
297
|
-
return arguments.length ? (a = typeof o == "function" ? o :
|
|
297
|
+
return arguments.length ? (a = typeof o == "function" ? o : wt(+o), c) : a;
|
|
298
298
|
}, c.paddingRight = function(o) {
|
|
299
|
-
return arguments.length ? (d = typeof o == "function" ? o :
|
|
299
|
+
return arguments.length ? (d = typeof o == "function" ? o : wt(+o), c) : d;
|
|
300
300
|
}, c.paddingBottom = function(o) {
|
|
301
|
-
return arguments.length ? (g = typeof o == "function" ? o :
|
|
301
|
+
return arguments.length ? (g = typeof o == "function" ? o : wt(+o), c) : g;
|
|
302
302
|
}, c.paddingLeft = function(o) {
|
|
303
|
-
return arguments.length ? (y = typeof o == "function" ? o :
|
|
303
|
+
return arguments.length ? (y = typeof o == "function" ? o : wt(+o), c) : y;
|
|
304
304
|
}, c;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
const t =
|
|
306
|
+
function We(e) {
|
|
307
|
+
const t = Xt.c(73), {
|
|
308
308
|
data: n,
|
|
309
309
|
colors: i,
|
|
310
310
|
leftMargin: r,
|
|
@@ -324,46 +324,46 @@ function Pe(e) {
|
|
|
324
324
|
highlightedDataPoints: j,
|
|
325
325
|
onSeriesMouseClick: k,
|
|
326
326
|
resetSelectionOnDoubleClick: O,
|
|
327
|
-
detailsOnClick:
|
|
327
|
+
detailsOnClick: x,
|
|
328
328
|
language: C,
|
|
329
329
|
styles: N,
|
|
330
330
|
classNames: I,
|
|
331
331
|
animate: D,
|
|
332
|
-
dimmedOpacity:
|
|
332
|
+
dimmedOpacity: U,
|
|
333
333
|
precision: Z
|
|
334
|
-
} = e, ot =
|
|
334
|
+
} = e, ot = Lt(null);
|
|
335
335
|
let et;
|
|
336
336
|
t[0] !== D.amount || t[1] !== D.once ? (et = {
|
|
337
337
|
once: D.once,
|
|
338
338
|
amount: D.amount
|
|
339
339
|
}, t[0] = D.amount, t[1] = D.once, t[2] = et) : et = t[2];
|
|
340
|
-
const J =
|
|
341
|
-
let
|
|
342
|
-
t[3] !== c || t[4] !== r || t[5] !== g || t[6] !== y ? (
|
|
340
|
+
const J = ie(ot, et), [nt, rt] = it(void 0), [L, at] = it(void 0), [Q, lt] = it(void 0), [_, M] = it(void 0);
|
|
341
|
+
let w;
|
|
342
|
+
t[3] !== c || t[4] !== r || t[5] !== g || t[6] !== y ? (w = {
|
|
343
343
|
top: y,
|
|
344
344
|
bottom: c,
|
|
345
345
|
left: r,
|
|
346
346
|
right: g
|
|
347
|
-
}, t[3] = c, t[4] = r, t[5] = g, t[6] = y, t[7] =
|
|
348
|
-
const V =
|
|
349
|
-
let
|
|
350
|
-
if (t[8] !== D.duration || t[9] !== I?.graphObjectValues || t[10] !== d || t[11] !== i || t[12] !== n || t[13] !==
|
|
351
|
-
const
|
|
347
|
+
}, t[3] = c, t[4] = r, t[5] = g, t[6] = y, t[7] = w) : w = t[7];
|
|
348
|
+
const V = w, st = l - V.left - V.right, ct = a - V.top - V.bottom;
|
|
349
|
+
let T, z, R, P, H, G, W, q, F;
|
|
350
|
+
if (t[8] !== D.duration || t[9] !== I?.graphObjectValues || t[10] !== d || t[11] !== i || t[12] !== n || t[13] !== x || t[14] !== U || t[15] !== ct || t[16] !== st || t[17] !== a || t[18] !== j || t[19] !== J || t[20] !== C || t[21] !== V.left || t[22] !== V.top || t[23] !== L || t[24] !== k || t[25] !== f || t[26] !== Z || t[27] !== p || t[28] !== O || t[29] !== u || t[30] !== v || t[31] !== m || t[32] !== N?.graphObjectValues || t[33] !== h || t[34] !== l) {
|
|
351
|
+
const vt = [{
|
|
352
352
|
id: "root",
|
|
353
353
|
parent: void 0,
|
|
354
354
|
value: void 0,
|
|
355
355
|
data: void 0
|
|
356
|
-
}, ...n.map(
|
|
357
|
-
ut.sum(
|
|
358
|
-
const
|
|
359
|
-
|
|
356
|
+
}, ...n.map(Qe)], ut = Le().id(Je).parentId(Ze)(vt);
|
|
357
|
+
ut.sum(Ue);
|
|
358
|
+
const E = Ge().size([st, ct]).padding(2)(ut);
|
|
359
|
+
z = Dt.svg, H = `${l}px`, G = `${a}px`, W = `0 0 ${l} ${a}`, q = "ltr", F = ot, P = `translate(${V.left},${V.top})`, T = oe, R = E.children?.map((s) => /* @__PURE__ */ b.jsxs(Dt.g, { className: "undp-viz-g-with-hover", variants: {
|
|
360
360
|
initial: {
|
|
361
361
|
opacity: 0,
|
|
362
362
|
x: s.x0,
|
|
363
363
|
y: s.y0
|
|
364
364
|
},
|
|
365
365
|
whileInView: {
|
|
366
|
-
opacity: u ? s.data.data.color && i[d.indexOf(s.data.data.color)] === u ? 1 :
|
|
366
|
+
opacity: u ? s.data.data.color && i[d.indexOf(s.data.data.color)] === u ? 1 : U : j.length !== 0 ? j.indexOf(s.data.id) !== -1 ? 0.85 : U : 0.85,
|
|
367
367
|
x: s.x0,
|
|
368
368
|
y: s.y0,
|
|
369
369
|
transition: {
|
|
@@ -375,16 +375,16 @@ function Pe(e) {
|
|
|
375
375
|
transition: {
|
|
376
376
|
duration: D.duration
|
|
377
377
|
}
|
|
378
|
-
}, onMouseEnter: (
|
|
379
|
-
rt(s.data.data), M(
|
|
378
|
+
}, onMouseEnter: (K) => {
|
|
379
|
+
rt(s.data.data), M(K.clientY), lt(K.clientX), f?.(s.data.data);
|
|
380
380
|
}, onClick: () => {
|
|
381
|
-
(k ||
|
|
382
|
-
}, onMouseMove: (
|
|
383
|
-
rt(s.data.data), M(
|
|
381
|
+
(k || x) && (L === s.data.id && O ? (at(void 0), k?.(void 0)) : (at(s.data.id), k?.(s.data.data)));
|
|
382
|
+
}, onMouseMove: (K) => {
|
|
383
|
+
rt(s.data.data), M(K.clientY), lt(K.clientX);
|
|
384
384
|
}, onMouseLeave: () => {
|
|
385
385
|
rt(void 0), lt(void 0), M(void 0), f?.(void 0);
|
|
386
386
|
}, children: [
|
|
387
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ b.jsx(Dt.rect, { x: 0, y: 0, exit: {
|
|
388
388
|
width: 0,
|
|
389
389
|
height: 0,
|
|
390
390
|
opacity: 0,
|
|
@@ -395,18 +395,18 @@ function Pe(e) {
|
|
|
395
395
|
initial: {
|
|
396
396
|
width: 0,
|
|
397
397
|
height: 0,
|
|
398
|
-
fill: n.filter(
|
|
398
|
+
fill: n.filter(Ke).length === 0 ? i[0] : s.data.data.color ? i[d.indexOf(s.data.data.color)] : tt.gray
|
|
399
399
|
},
|
|
400
400
|
whileInView: {
|
|
401
401
|
width: s.x1 - s.x0,
|
|
402
402
|
height: s.y1 - s.y0,
|
|
403
|
-
fill: n.filter(
|
|
403
|
+
fill: n.filter(Ye).length === 0 ? i[0] : s.data.data.color ? i[d.indexOf(s.data.data.color)] : tt.gray,
|
|
404
404
|
transition: {
|
|
405
405
|
duration: D.duration
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
}, initial: "initial", animate: J ? "whileInView" : "initial" }),
|
|
409
|
-
s.x1 - s.x0 > 50 && s.y1 - s.y0 > 25 && (v || m) ? /* @__PURE__ */
|
|
409
|
+
s.x1 - s.x0 > 50 && s.y1 - s.y0 > 25 && (v || m) ? /* @__PURE__ */ b.jsx(Dt.g, { variants: {
|
|
410
410
|
initial: {
|
|
411
411
|
opacity: 0
|
|
412
412
|
},
|
|
@@ -421,67 +421,67 @@ function Pe(e) {
|
|
|
421
421
|
transition: {
|
|
422
422
|
duration: D.duration
|
|
423
423
|
}
|
|
424
|
-
}, children: /* @__PURE__ */
|
|
425
|
-
color:
|
|
424
|
+
}, children: /* @__PURE__ */ b.jsx("foreignObject", { y: 0, x: 0, width: s.x1 - s.x0, height: s.y1 - s.y0, children: /* @__PURE__ */ b.jsxs("div", { className: "flex flex-col gap-0.5 p-2 w-full", style: {
|
|
425
|
+
color: $t(n.filter(Xe).length === 0 ? i[0] : s.data.data.color ? i[d.indexOf(s.data.data.color)] : tt.gray)
|
|
426
426
|
}, children: [
|
|
427
|
-
v ? /* @__PURE__ */
|
|
427
|
+
v ? /* @__PURE__ */ b.jsx(Gt, { marginBottom: "none", size: "sm", leading: "none", className: Ht("w-full treemap-label", C === "ar" || C === "he" ? "text-right" : "text-left", I?.graphObjectValues), style: {
|
|
428
428
|
WebkitLineClamp: s.y1 - s.y0 > 50 ? s.y1 - s.y0 > 100 ? s.y1 - s.y0 > 150 ? void 0 : 3 : 2 : 1,
|
|
429
429
|
display: "-webkit-box",
|
|
430
430
|
WebkitBoxOrient: "vertical",
|
|
431
431
|
overflow: "hidden",
|
|
432
|
-
color:
|
|
432
|
+
color: $t(n.filter(Fe).length === 0 ? i[0] : s.data.data.color ? i[d.indexOf(s.data.data.color)] : tt.gray),
|
|
433
433
|
...N?.graphObjectValues || {}
|
|
434
434
|
}, children: s.data.id }) : null,
|
|
435
|
-
m ? /* @__PURE__ */
|
|
436
|
-
color:
|
|
435
|
+
m ? /* @__PURE__ */ b.jsx(Gt, { marginBottom: "none", size: "sm", leading: "none", className: Ht("w-full font-bold treemap-value", C === "ar" || C === "he" ? "text-right" : "text-left", I?.graphObjectValues), style: {
|
|
436
|
+
color: $t(n.filter(qe).length === 0 ? i[0] : s.data.data.color ? i[d.indexOf(s.data.data.color)] : tt.gray),
|
|
437
437
|
...N?.graphObjectValues || {}
|
|
438
|
-
}, children:
|
|
438
|
+
}, children: ee(s.data.value, "NA", Z, p, h) }) : null
|
|
439
439
|
] }) }) }) : null
|
|
440
|
-
] }, s.data.id)), t[8] = D.duration, t[9] = I?.graphObjectValues, t[10] = d, t[11] = i, t[12] = n, t[13] =
|
|
440
|
+
] }, s.data.id)), t[8] = D.duration, t[9] = I?.graphObjectValues, t[10] = d, t[11] = i, t[12] = n, t[13] = x, t[14] = U, t[15] = ct, t[16] = st, t[17] = a, t[18] = j, t[19] = J, t[20] = C, t[21] = V.left, t[22] = V.top, t[23] = L, t[24] = k, t[25] = f, t[26] = Z, t[27] = p, t[28] = O, t[29] = u, t[30] = v, t[31] = m, t[32] = N?.graphObjectValues, t[33] = h, t[34] = l, t[35] = T, t[36] = z, t[37] = R, t[38] = P, t[39] = H, t[40] = G, t[41] = W, t[42] = q, t[43] = F;
|
|
441
441
|
} else
|
|
442
|
-
|
|
443
|
-
let F;
|
|
444
|
-
t[44] !== L || t[45] !== z ? (F = /* @__PURE__ */ w.jsx(L, { children: z }), t[44] = L, t[45] = z, t[46] = F) : F = t[46];
|
|
445
|
-
let B;
|
|
446
|
-
t[47] !== R || t[48] !== F ? (B = /* @__PURE__ */ w.jsx("g", { transform: R, children: F }), t[47] = R, t[48] = F, t[49] = B) : B = t[49];
|
|
442
|
+
T = t[35], z = t[36], R = t[37], P = t[38], H = t[39], G = t[40], W = t[41], q = t[42], F = t[43];
|
|
447
443
|
let X;
|
|
448
|
-
t[
|
|
444
|
+
t[44] !== T || t[45] !== R ? (X = /* @__PURE__ */ b.jsx(T, { children: R }), t[44] = T, t[45] = R, t[46] = X) : X = t[46];
|
|
445
|
+
let B;
|
|
446
|
+
t[47] !== P || t[48] !== X ? (B = /* @__PURE__ */ b.jsx("g", { transform: P, children: X }), t[47] = P, t[48] = X, t[49] = B) : B = t[49];
|
|
447
|
+
let Y;
|
|
448
|
+
t[50] !== z || t[51] !== B || t[52] !== H || t[53] !== G || t[54] !== W || t[55] !== q || t[56] !== F ? (Y = /* @__PURE__ */ b.jsx(z, { width: H, height: G, viewBox: W, direction: q, ref: F, children: B }), t[50] = z, t[51] = B, t[52] = H, t[53] = G, t[54] = W, t[55] = q, t[56] = F, t[57] = Y) : Y = t[57];
|
|
449
449
|
let S;
|
|
450
|
-
t[58] !== I?.tooltip || t[59] !== Q || t[60] !== _ || t[61] !== nt || t[62] !== N?.tooltip || t[63] !== o ? (S = nt && o && Q && _ ? /* @__PURE__ */
|
|
450
|
+
t[58] !== I?.tooltip || t[59] !== Q || t[60] !== _ || t[61] !== nt || t[62] !== N?.tooltip || t[63] !== o ? (S = nt && o && Q && _ ? /* @__PURE__ */ b.jsx(te, { data: nt, body: o, xPos: Q, yPos: _, backgroundStyle: N?.tooltip, className: I?.tooltip }) : null, t[58] = I?.tooltip, t[59] = Q, t[60] = _, t[61] = nt, t[62] = N?.tooltip, t[63] = o, t[64] = S) : S = t[64];
|
|
451
451
|
let $;
|
|
452
|
-
t[65] !== I?.modal || t[66] !==
|
|
452
|
+
t[65] !== I?.modal || t[66] !== x || t[67] !== L ? ($ = x && L !== void 0 ? /* @__PURE__ */ b.jsx(ne, { body: x, data: L, setData: at, className: I?.modal }) : null, t[65] = I?.modal, t[66] = x, t[67] = L, t[68] = $) : $ = t[68];
|
|
453
453
|
let A;
|
|
454
|
-
return t[69] !==
|
|
455
|
-
|
|
454
|
+
return t[69] !== Y || t[70] !== S || t[71] !== $ ? (A = /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
|
|
455
|
+
Y,
|
|
456
456
|
S,
|
|
457
457
|
$
|
|
458
|
-
] }), t[69] =
|
|
458
|
+
] }), t[69] = Y, t[70] = S, t[71] = $, t[72] = A) : A = t[72], A;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function qe(e) {
|
|
461
461
|
return e.color;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Fe(e) {
|
|
464
464
|
return e.color;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function Xe(e) {
|
|
467
467
|
return e.color;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Ye(e) {
|
|
470
470
|
return e.color;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Ke(e) {
|
|
473
473
|
return e.color;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Ue(e) {
|
|
476
476
|
return e.value;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ze(e) {
|
|
479
479
|
return e.parent;
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Je(e) {
|
|
482
482
|
return e.id;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Qe(e) {
|
|
485
485
|
return {
|
|
486
486
|
id: e.label,
|
|
487
487
|
value: e.size,
|
|
@@ -489,8 +489,8 @@ function Ue(e) {
|
|
|
489
489
|
data: e
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
const t =
|
|
492
|
+
function kn(e) {
|
|
493
|
+
const t = Xt.c(83), {
|
|
494
494
|
data: n,
|
|
495
495
|
graphTitle: i,
|
|
496
496
|
colors: r,
|
|
@@ -510,104 +510,111 @@ function jn(e) {
|
|
|
510
510
|
padding: j,
|
|
511
511
|
backgroundColor: k,
|
|
512
512
|
showLabels: O,
|
|
513
|
-
relativeHeight:
|
|
513
|
+
relativeHeight: x,
|
|
514
514
|
tooltip: C,
|
|
515
515
|
onSeriesMouseOver: N,
|
|
516
516
|
showColorScale: I,
|
|
517
517
|
showValues: D,
|
|
518
|
-
graphID:
|
|
518
|
+
graphID: U,
|
|
519
519
|
highlightedDataPoints: Z,
|
|
520
520
|
onSeriesMouseClick: ot,
|
|
521
521
|
graphDownload: et,
|
|
522
522
|
dataDownload: J,
|
|
523
523
|
language: nt,
|
|
524
524
|
showNAColor: rt,
|
|
525
|
-
minHeight:
|
|
525
|
+
minHeight: L,
|
|
526
526
|
theme: at,
|
|
527
527
|
ariaLabel: Q,
|
|
528
528
|
resetSelectionOnDoubleClick: lt,
|
|
529
529
|
detailsOnClick: _,
|
|
530
530
|
styles: M,
|
|
531
|
-
classNames:
|
|
531
|
+
classNames: w,
|
|
532
532
|
animate: V,
|
|
533
533
|
dimmedOpacity: st,
|
|
534
534
|
precision: ct
|
|
535
|
-
} = e,
|
|
535
|
+
} = e, T = l === void 0 ? "" : l, z = d === void 0 ? "" : d, R = y === void 0 ? 0 : y, P = c === void 0 ? 0 : c, H = v === void 0 ? 0 : v, G = o === void 0 ? 0 : o, W = k === void 0 ? !1 : k, q = O === void 0 ? !0 : O, F = I === void 0 ? !0 : I, X = D === void 0 ? !0 : D;
|
|
536
536
|
let B;
|
|
537
537
|
t[0] !== Z ? (B = Z === void 0 ? [] : Z, t[0] = Z, t[1] = B) : B = t[1];
|
|
538
|
-
const
|
|
539
|
-
let
|
|
540
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
541
|
-
const
|
|
542
|
-
|
|
538
|
+
const Y = B, S = et === void 0 ? !1 : et, $ = J === void 0 ? !1 : J, A = nt === void 0 ? "en" : nt, vt = rt === void 0 ? !0 : rt, ut = L === void 0 ? 0 : L, E = at === void 0 ? "light" : at, s = lt === void 0 ? !0 : lt, K = V === void 0 ? !1 : V, kt = st === void 0 ? 0.3 : st, It = ct === void 0 ? 2 : ct, [bt, Zt] = it(0), [Mt, Jt] = it(0), [Vt, Qt] = it(void 0), Nt = Lt(null), zt = Lt(null);
|
|
539
|
+
let Ot, jt;
|
|
540
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (Ot = () => {
|
|
541
|
+
const Rt = new ResizeObserver((Pt) => {
|
|
542
|
+
Zt(Pt[0].target.clientWidth || 620), Jt(Pt[0].target.clientHeight || 480);
|
|
543
543
|
});
|
|
544
|
-
return
|
|
545
|
-
},
|
|
546
|
-
const
|
|
544
|
+
return Nt.current && Rt.observe(Nt.current), () => Rt.disconnect();
|
|
545
|
+
}, jt = [], t[2] = Ot, t[3] = jt) : (Ot = t[2], jt = t[3]), _t(Ot, jt);
|
|
546
|
+
const Bt = w?.graphContainer, St = M?.graphContainer;
|
|
547
547
|
let dt;
|
|
548
|
-
t[4] !==
|
|
548
|
+
t[4] !== w?.description || t[5] !== w?.title || t[6] !== n || t[7] !== $ || t[8] !== g || t[9] !== S || t[10] !== i || t[11] !== M?.description || t[12] !== M?.title || t[13] !== u ? (dt = i || g || S || $ ? /* @__PURE__ */ b.jsx(le, { styles: {
|
|
549
549
|
title: M?.title,
|
|
550
550
|
description: M?.description
|
|
551
551
|
}, classNames: {
|
|
552
|
-
title:
|
|
553
|
-
description:
|
|
554
|
-
}, graphTitle: i, graphDescription: g, width: u, graphDownload: S ?
|
|
552
|
+
title: w?.title,
|
|
553
|
+
description: w?.description
|
|
554
|
+
}, graphTitle: i, graphDescription: g, width: u, graphDownload: S ? zt : void 0, dataDownload: $ ? n.map(sn).filter(ln).length > 0 ? n.map(an).filter(rn) : n.filter(on) : null }) : null, t[4] = w?.description, t[5] = w?.title, t[6] = n, t[7] = $, t[8] = g, t[9] = S, t[10] = i, t[11] = M?.description, t[12] = M?.title, t[13] = u, t[14] = dt) : dt = t[14];
|
|
555
555
|
let ft;
|
|
556
|
-
t[15] !==
|
|
557
|
-
q && n.filter(_e).length !== 0 ? /* @__PURE__ */ w.jsx(re, { width: u, colorLegendTitle: p, colors: r || tt[U].categoricalColors.colors, colorDomain: h || Pt(n, "color", !0), setSelectedColor: Ut, showNAColor: pt, className: x?.colorLegend }) : null,
|
|
558
|
-
/* @__PURE__ */ w.jsx(le, { ref: kt, children: yt && wt ? /* @__PURE__ */ w.jsx(Pe, { data: n.filter(Qe), colors: n.filter(Je).length === 0 ? r ? [r] : [tt.primaryColors["blue-600"]] : r || tt[U].categoricalColors.colors, colorDomain: n.filter(Ze).length === 0 ? [] : h || Pt(n, "color", !0), width: yt, height: wt, leftMargin: z, rightMargin: R, topMargin: P, bottomMargin: H, showLabels: W, showValues: F, suffix: L, prefix: T, selectedColor: Dt, tooltip: C, onSeriesMouseOver: N, onSeriesMouseClick: ot, highlightedDataPoints: X, resetSelectionOnDoubleClick: s, detailsOnClick: _, styles: M, classNames: x, language: A, animate: Y === !0 ? {
|
|
559
|
-
duration: 0.5,
|
|
560
|
-
once: !0,
|
|
561
|
-
amount: 0.5
|
|
562
|
-
} : Y || {
|
|
563
|
-
duration: 0,
|
|
564
|
-
once: !0,
|
|
565
|
-
amount: 0
|
|
566
|
-
}, dimmedOpacity: jt, precision: Ct }) : null })
|
|
567
|
-
] }), t[15] = Y, t[16] = H, t[17] = x, t[18] = h, t[19] = p, t[20] = r, t[21] = n, t[22] = _, t[23] = jt, t[24] = X, t[25] = A, t[26] = z, t[27] = ot, t[28] = N, t[29] = Ct, t[30] = T, t[31] = s, t[32] = R, t[33] = Dt, t[34] = q, t[35] = W, t[36] = pt, t[37] = F, t[38] = M, t[39] = L, t[40] = wt, t[41] = yt, t[42] = U, t[43] = C, t[44] = P, t[45] = u, t[46] = ft) : ft = t[46];
|
|
556
|
+
t[15] !== w?.colorLegend || t[16] !== h || t[17] !== p || t[18] !== r || t[19] !== n || t[20] !== F || t[21] !== vt || t[22] !== E || t[23] !== u ? (ft = F && n.filter(nn).length !== 0 && n.length > 0 ? /* @__PURE__ */ b.jsx(se, { width: u, colorLegendTitle: p, colors: r || tt[E].categoricalColors.colors, colorDomain: h || Wt(n, "color", !0), setSelectedColor: Qt, showNAColor: vt, className: w?.colorLegend }) : null, t[15] = w?.colorLegend, t[16] = h, t[17] = p, t[18] = r, t[19] = n, t[20] = F, t[21] = vt, t[22] = E, t[23] = u, t[24] = ft) : ft = t[24];
|
|
568
557
|
let ht;
|
|
569
|
-
t[
|
|
558
|
+
t[25] !== n.length ? (ht = n.length === 0 && /* @__PURE__ */ b.jsx(ce, {}), t[25] = n.length, t[26] = ht) : ht = t[26];
|
|
559
|
+
let pt;
|
|
560
|
+
t[27] !== K || t[28] !== G || t[29] !== w || t[30] !== h || t[31] !== r || t[32] !== n || t[33] !== _ || t[34] !== kt || t[35] !== Y || t[36] !== A || t[37] !== R || t[38] !== ot || t[39] !== N || t[40] !== It || t[41] !== z || t[42] !== s || t[43] !== P || t[44] !== Vt || t[45] !== q || t[46] !== X || t[47] !== M || t[48] !== T || t[49] !== Mt || t[50] !== bt || t[51] !== E || t[52] !== C || t[53] !== H ? (pt = bt && Mt && n.length > 0 ? /* @__PURE__ */ b.jsx(We, { data: n.filter(en), colors: n.filter(tn).length === 0 ? r ? [r] : [tt.primaryColors["blue-600"]] : r || tt[E].categoricalColors.colors, colorDomain: n.filter(_e).length === 0 ? [] : h || Wt(n, "color", !0), width: bt, height: Mt, leftMargin: R, rightMargin: P, topMargin: H, bottomMargin: G, showLabels: q, showValues: X, suffix: T, prefix: z, selectedColor: Vt, tooltip: C, onSeriesMouseOver: N, onSeriesMouseClick: ot, highlightedDataPoints: Y, resetSelectionOnDoubleClick: s, detailsOnClick: _, styles: M, classNames: w, language: A, animate: K === !0 ? {
|
|
561
|
+
duration: 0.5,
|
|
562
|
+
once: !0,
|
|
563
|
+
amount: 0.5
|
|
564
|
+
} : K || {
|
|
565
|
+
duration: 0,
|
|
566
|
+
once: !0,
|
|
567
|
+
amount: 0
|
|
568
|
+
}, dimmedOpacity: kt, precision: It }) : null, t[27] = K, t[28] = G, t[29] = w, t[30] = h, t[31] = r, t[32] = n, t[33] = _, t[34] = kt, t[35] = Y, t[36] = A, t[37] = R, t[38] = ot, t[39] = N, t[40] = It, t[41] = z, t[42] = s, t[43] = P, t[44] = Vt, t[45] = q, t[46] = X, t[47] = M, t[48] = T, t[49] = Mt, t[50] = bt, t[51] = E, t[52] = C, t[53] = H, t[54] = pt) : pt = t[54];
|
|
569
|
+
let gt;
|
|
570
|
+
t[55] !== ht || t[56] !== pt ? (gt = /* @__PURE__ */ b.jsxs(ue, { ref: Nt, children: [
|
|
571
|
+
ht,
|
|
572
|
+
pt
|
|
573
|
+
] }), t[55] = ht, t[56] = pt, t[57] = gt) : gt = t[57];
|
|
574
|
+
let mt;
|
|
575
|
+
t[58] !== w?.footnote || t[59] !== w?.source || t[60] !== m || t[61] !== a || t[62] !== M?.footnote || t[63] !== M?.source || t[64] !== u ? (mt = a || m ? /* @__PURE__ */ b.jsx(ae, { styles: {
|
|
570
576
|
footnote: M?.footnote,
|
|
571
577
|
source: M?.source
|
|
572
578
|
}, classNames: {
|
|
573
|
-
footnote:
|
|
574
|
-
source:
|
|
575
|
-
}, sources: a, footNote: m, width: u }) : null, t[
|
|
576
|
-
let
|
|
577
|
-
return t[
|
|
579
|
+
footnote: w?.footnote,
|
|
580
|
+
source: w?.source
|
|
581
|
+
}, sources: a, footNote: m, width: u }) : null, t[58] = w?.footnote, t[59] = w?.source, t[60] = m, t[61] = a, t[62] = M?.footnote, t[63] = M?.source, t[64] = u, t[65] = mt) : mt = t[65];
|
|
582
|
+
let Ct;
|
|
583
|
+
return t[66] !== Q || t[67] !== W || t[68] !== U || t[69] !== f || t[70] !== A || t[71] !== ut || t[72] !== j || t[73] !== x || t[74] !== Bt || t[75] !== St || t[76] !== dt || t[77] !== ft || t[78] !== gt || t[79] !== mt || t[80] !== E || t[81] !== u ? (Ct = /* @__PURE__ */ b.jsxs(de, { className: Bt, style: St, id: U, ref: zt, "aria-label": Q, backgroundColor: W, theme: E, language: A, minHeight: ut, width: u, height: f, relativeHeight: x, padding: j, children: [
|
|
578
584
|
dt,
|
|
579
585
|
ft,
|
|
580
|
-
|
|
581
|
-
|
|
586
|
+
gt,
|
|
587
|
+
mt
|
|
588
|
+
] }), t[66] = Q, t[67] = W, t[68] = U, t[69] = f, t[70] = A, t[71] = ut, t[72] = j, t[73] = x, t[74] = Bt, t[75] = St, t[76] = dt, t[77] = ft, t[78] = gt, t[79] = mt, t[80] = E, t[81] = u, t[82] = Ct) : Ct = t[82], Ct;
|
|
582
589
|
}
|
|
583
|
-
function
|
|
590
|
+
function _e(e) {
|
|
584
591
|
return e.color;
|
|
585
592
|
}
|
|
586
|
-
function
|
|
593
|
+
function tn(e) {
|
|
587
594
|
return e.color;
|
|
588
595
|
}
|
|
589
|
-
function
|
|
590
|
-
return !
|
|
596
|
+
function en(e) {
|
|
597
|
+
return !re(e.size);
|
|
591
598
|
}
|
|
592
|
-
function
|
|
599
|
+
function nn(e) {
|
|
593
600
|
return e.color;
|
|
594
601
|
}
|
|
595
|
-
function
|
|
602
|
+
function on(e) {
|
|
596
603
|
return e !== void 0;
|
|
597
604
|
}
|
|
598
|
-
function
|
|
605
|
+
function rn(e) {
|
|
599
606
|
return e !== void 0;
|
|
600
607
|
}
|
|
601
|
-
function
|
|
608
|
+
function an(e) {
|
|
602
609
|
return e.data;
|
|
603
610
|
}
|
|
604
|
-
function
|
|
611
|
+
function ln(e) {
|
|
605
612
|
return e !== void 0;
|
|
606
613
|
}
|
|
607
|
-
function
|
|
614
|
+
function sn(e) {
|
|
608
615
|
return e.data;
|
|
609
616
|
}
|
|
610
617
|
export {
|
|
611
|
-
|
|
618
|
+
kn as TreeMapGraph
|
|
612
619
|
};
|
|
613
620
|
//# sourceMappingURL=TreeMapGraph.js.map
|