@dpuse/dpuse-tool-d3-visualiser 0.0.41 → 0.0.46
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/dpuse-tool-d3-visualiser.es.js +2 -2
- package/dist/{erdDiagram-Ds-nrw7Q.js → erdDiagram-Ds1hsQDD.js} +491 -452
- package/dist/erdDiagram-Ds1hsQDD.js.map +1 -0
- package/dist/tanStackCharts-DNzjtkwh.js +3462 -0
- package/dist/tanStackCharts-DNzjtkwh.js.map +1 -0
- package/package.json +10 -10
- package/dist/erdDiagram-Ds-nrw7Q.js.map +0 -1
- package/dist/tanStackCharts-BJAX22lS.js +0 -2356
- package/dist/tanStackCharts-BJAX22lS.js.map +0 -1
|
@@ -0,0 +1,3462 @@
|
|
|
1
|
+
import { t as e } from "./linear-BnhqTvdX.js";
|
|
2
|
+
import { t } from "./band-C1twWuW2.js";
|
|
3
|
+
import { r as n, t as r } from "./array-Cv4-2llb.js";
|
|
4
|
+
//#region node_modules/d3-shape/src/offset/none.js
|
|
5
|
+
function i(e, t) {
|
|
6
|
+
if ((o = e.length) > 1) for (var n = 1, r, i, a = e[t[0]], o, s = a.length; n < o; ++n) for (i = a, a = e[t[n]], r = 0; r < s; ++r) a[r][1] += a[r][0] = isNaN(i[r][1]) ? i[r][0] : i[r][1];
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region node_modules/d3-shape/src/order/none.js
|
|
10
|
+
function a(e) {
|
|
11
|
+
for (var t = e.length, n = Array(t); --t >= 0;) n[t] = t;
|
|
12
|
+
return n;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region node_modules/d3-shape/src/stack.js
|
|
16
|
+
function o(e, t) {
|
|
17
|
+
return e[t];
|
|
18
|
+
}
|
|
19
|
+
function s(e) {
|
|
20
|
+
let t = [];
|
|
21
|
+
return t.key = e, t;
|
|
22
|
+
}
|
|
23
|
+
function c() {
|
|
24
|
+
var e = n([]), t = a, c = i, l = o;
|
|
25
|
+
function u(n) {
|
|
26
|
+
var i = Array.from(e.apply(this, arguments), s), a, o = i.length, u = -1, d;
|
|
27
|
+
for (let e of n) for (a = 0, ++u; a < o; ++a) (i[a][u] = [0, +l(e, i[a].key, u, n)]).data = e;
|
|
28
|
+
for (a = 0, d = r(t(i)); a < o; ++a) i[d[a]].index = a;
|
|
29
|
+
return c(i, d), i;
|
|
30
|
+
}
|
|
31
|
+
return u.keys = function(t) {
|
|
32
|
+
return arguments.length ? (e = typeof t == "function" ? t : n(Array.from(t)), u) : e;
|
|
33
|
+
}, u.value = function(e) {
|
|
34
|
+
return arguments.length ? (l = typeof e == "function" ? e : n(+e), u) : l;
|
|
35
|
+
}, u.order = function(e) {
|
|
36
|
+
return arguments.length ? (t = e == null ? a : typeof e == "function" ? e : n(Array.from(e)), u) : t;
|
|
37
|
+
}, u.offset = function(e) {
|
|
38
|
+
return arguments.length ? (c = e ?? i, u) : c;
|
|
39
|
+
}, u;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region node_modules/d3-shape/src/offset/expand.js
|
|
43
|
+
function l(e, t) {
|
|
44
|
+
if ((r = e.length) > 0) {
|
|
45
|
+
for (var n, r, a = 0, o = e[0].length, s; a < o; ++a) {
|
|
46
|
+
for (s = n = 0; n < r; ++n) s += e[n][a][1] || 0;
|
|
47
|
+
if (s) for (n = 0; n < r; ++n) e[n][a][1] /= s;
|
|
48
|
+
}
|
|
49
|
+
i(e, t);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region node_modules/d3-shape/src/offset/diverging.js
|
|
54
|
+
function u(e, t) {
|
|
55
|
+
if ((c = e.length) > 0) for (var n, r = 0, i, a, o, s, c, l = e[t[0]].length; r < l; ++r) for (o = s = 0, n = 0; n < c; ++n) (a = (i = e[t[n]][r])[1] - i[0]) > 0 ? (i[0] = o, i[1] = o += a) : a < 0 ? (i[1] = s, i[0] = s += a) : (i[0] = 0, i[1] = a);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region node_modules/d3-shape/src/offset/silhouette.js
|
|
59
|
+
function d(e, t) {
|
|
60
|
+
if ((a = e.length) > 0) {
|
|
61
|
+
for (var n = 0, r = e[t[0]], a, o = r.length; n < o; ++n) {
|
|
62
|
+
for (var s = 0, c = 0; s < a; ++s) c += e[s][n][1] || 0;
|
|
63
|
+
r[n][1] += r[n][0] = -c / 2;
|
|
64
|
+
}
|
|
65
|
+
i(e, t);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region node_modules/d3-shape/src/offset/wiggle.js
|
|
70
|
+
function f(e, t) {
|
|
71
|
+
if (!(!((s = e.length) > 0) || !((o = (a = e[t[0]]).length) > 0))) {
|
|
72
|
+
for (var n = 0, r = 1, a, o, s; r < o; ++r) {
|
|
73
|
+
for (var c = 0, l = 0, u = 0; c < s; ++c) {
|
|
74
|
+
for (var d = e[t[c]], f = d[r][1] || 0, p = (f - (d[r - 1][1] || 0)) / 2, m = 0; m < c; ++m) {
|
|
75
|
+
var h = e[t[m]], g = h[r][1] || 0, _ = h[r - 1][1] || 0;
|
|
76
|
+
p += g - _;
|
|
77
|
+
}
|
|
78
|
+
l += f, u += p * f;
|
|
79
|
+
}
|
|
80
|
+
a[r - 1][1] += a[r - 1][0] = n, l && (n -= u / l);
|
|
81
|
+
}
|
|
82
|
+
a[r - 1][1] += a[r - 1][0] = n, i(e, t);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region node_modules/d3-shape/src/order/appearance.js
|
|
87
|
+
function p(e) {
|
|
88
|
+
var t = e.map(m);
|
|
89
|
+
return a(e).sort(function(e, n) {
|
|
90
|
+
return t[e] - t[n];
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function m(e) {
|
|
94
|
+
for (var t = -1, n = 0, r = e.length, i, a = -Infinity; ++t < r;) (i = +e[t][1]) > a && (a = i, n = t);
|
|
95
|
+
return n;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region node_modules/d3-shape/src/order/ascending.js
|
|
99
|
+
function h(e) {
|
|
100
|
+
for (var t = 0, n = -1, r = e.length, i; ++n < r;) (i = +e[n][1]) && (t += i);
|
|
101
|
+
return t;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region node_modules/d3-shape/src/order/insideOut.js
|
|
105
|
+
function g(e) {
|
|
106
|
+
var t = e.length, n, r, i = e.map(h), a = p(e), o = 0, s = 0, c = [], l = [];
|
|
107
|
+
for (n = 0; n < t; ++n) r = a[n], o < s ? (o += i[r], c.push(r)) : (s += i[r], l.push(r));
|
|
108
|
+
return l.reverse().concat(c);
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region node_modules/@tanstack/charts/dist/group.js
|
|
112
|
+
function _(e = {}) {
|
|
113
|
+
return {
|
|
114
|
+
type: "group",
|
|
115
|
+
...e
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region node_modules/@tanstack/charts/dist/scale-input.js
|
|
120
|
+
function v(e, t) {
|
|
121
|
+
let n = y(e), r = n ? e() : e;
|
|
122
|
+
if (typeof r != "function" || typeof r.copy != "function" || typeof r.domain != "function" || typeof r.range != "function") throw TypeError("A scale factory must return a copyable scale with domain and range methods");
|
|
123
|
+
let i = r.copy();
|
|
124
|
+
if (n) {
|
|
125
|
+
let e = b(i, t.values, t.includeZero);
|
|
126
|
+
e && i.domain(e);
|
|
127
|
+
}
|
|
128
|
+
return C(i, t.nice, t.niceCount), i;
|
|
129
|
+
}
|
|
130
|
+
function y(e) {
|
|
131
|
+
return typeof e == "function" && !("copy" in e);
|
|
132
|
+
}
|
|
133
|
+
function b(e, t, n = !1) {
|
|
134
|
+
let r = t.filter(N);
|
|
135
|
+
if (!r.length) return;
|
|
136
|
+
if (typeof e.bandwidth == "function" || typeof e.ticks != "function") {
|
|
137
|
+
let e = [], t = /* @__PURE__ */ new Set();
|
|
138
|
+
for (let n of r) {
|
|
139
|
+
let r = n instanceof Date ? `date:${n.getTime()}` : `${typeof n}:${String(n)}`;
|
|
140
|
+
t.has(r) || (t.add(r), e.push(n));
|
|
141
|
+
}
|
|
142
|
+
return e;
|
|
143
|
+
}
|
|
144
|
+
if (e.domain().some((e) => e instanceof Date)) {
|
|
145
|
+
let e = r.filter((e) => e instanceof Date);
|
|
146
|
+
if (e.length !== r.length) throw TypeError("A temporal scale factory requires Date channel values");
|
|
147
|
+
let t = Infinity, n = -Infinity;
|
|
148
|
+
for (let r of e) {
|
|
149
|
+
let e = r.getTime();
|
|
150
|
+
t = Math.min(t, e), n = Math.max(n, e);
|
|
151
|
+
}
|
|
152
|
+
if (!Number.isFinite(t) || !Number.isFinite(n)) throw TypeError("A temporal scale factory requires Date channel values");
|
|
153
|
+
if (t === n) {
|
|
154
|
+
let e = 432e5;
|
|
155
|
+
t -= e, n += e;
|
|
156
|
+
}
|
|
157
|
+
return [new Date(t), new Date(n)];
|
|
158
|
+
}
|
|
159
|
+
let i = Infinity, a = -Infinity;
|
|
160
|
+
for (let e of r) {
|
|
161
|
+
if (!P(e)) throw TypeError("A quantitative scale factory requires numeric values");
|
|
162
|
+
i = Math.min(i, e), a = Math.max(a, e);
|
|
163
|
+
}
|
|
164
|
+
if (!Number.isFinite(i) || !Number.isFinite(a)) throw TypeError("A quantitative scale factory requires numeric values");
|
|
165
|
+
let o = x(e);
|
|
166
|
+
if (n) {
|
|
167
|
+
if (o) throw TypeError("An inferred log scale cannot include an implicit zero baseline");
|
|
168
|
+
i = Math.min(0, i), a = Math.max(0, a);
|
|
169
|
+
}
|
|
170
|
+
if (S(e, i, a), i === a) {
|
|
171
|
+
if (i === 0) return [0, 1];
|
|
172
|
+
let e = Math.abs(i) * .05 || 1;
|
|
173
|
+
i -= e, a += e;
|
|
174
|
+
}
|
|
175
|
+
return [i, a];
|
|
176
|
+
}
|
|
177
|
+
function x(e) {
|
|
178
|
+
return "base" in e && typeof e.base == "function";
|
|
179
|
+
}
|
|
180
|
+
function S(e, t, n) {
|
|
181
|
+
if (x(e) && (t === 0 || n === 0 || t < 0 && n > 0)) throw TypeError("An inferred log domain cannot include or cross zero");
|
|
182
|
+
}
|
|
183
|
+
function C(e, t, n = 5) {
|
|
184
|
+
if (!t) return;
|
|
185
|
+
let r = e;
|
|
186
|
+
if (typeof r.nice != "function") throw TypeError("This scale does not support nicening");
|
|
187
|
+
r.nice(typeof t == "number" ? t : n);
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region node_modules/@tanstack/charts/dist/scales.js
|
|
191
|
+
function w(e, t, n) {
|
|
192
|
+
if (t?.scale) {
|
|
193
|
+
let r = D(t.scale), i = r ? t.scale() : t.scale;
|
|
194
|
+
if (typeof i != "function" || typeof i.copy != "function") throw TypeError("A color scale must be callable and copyable");
|
|
195
|
+
if (r && (typeof i.domain != "function" || typeof i.range != "function")) throw TypeError("A color scale factory must return a scale with domain and range methods");
|
|
196
|
+
let a = i.copy(), o = j(a);
|
|
197
|
+
if (r) {
|
|
198
|
+
let n = a;
|
|
199
|
+
t.range?.length && n.range(t.range);
|
|
200
|
+
let r = t.domain ?? O(n, e);
|
|
201
|
+
(t.domain !== void 0 || r.length) && n.domain(r);
|
|
202
|
+
let i = n.range();
|
|
203
|
+
if (!i.length || i.some((e) => typeof e != "string")) throw TypeError("A color-scale factory requires a string range");
|
|
204
|
+
}
|
|
205
|
+
if (t.nice) {
|
|
206
|
+
let e = a.nice;
|
|
207
|
+
if (typeof e != "function") throw TypeError("This color scale does not support nicening");
|
|
208
|
+
e.call(a, typeof t.nice == "number" ? t.nice : 5);
|
|
209
|
+
}
|
|
210
|
+
let s = a.domain?.() ?? t.domain ?? [], c = (a.range?.() ?? t.range ?? n.palette).map(String);
|
|
211
|
+
return {
|
|
212
|
+
type: "configured",
|
|
213
|
+
kind: o,
|
|
214
|
+
domain: s,
|
|
215
|
+
range: c,
|
|
216
|
+
map: (e) => {
|
|
217
|
+
if (e == null) return c[0] ?? "currentColor";
|
|
218
|
+
let t = a(e);
|
|
219
|
+
return t == null ? "currentColor" : String(t);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (t?.resolver) return t.resolver.resolve({
|
|
224
|
+
values: e,
|
|
225
|
+
domain: t.domain,
|
|
226
|
+
range: t.range,
|
|
227
|
+
theme: n
|
|
228
|
+
});
|
|
229
|
+
let r = t?.range?.length ? t.range : n.palette, i = T(t?.domain ?? e), a = i.map(M);
|
|
230
|
+
return {
|
|
231
|
+
type: "ordinal",
|
|
232
|
+
kind: "categorical",
|
|
233
|
+
domain: i,
|
|
234
|
+
range: r,
|
|
235
|
+
map: (e) => {
|
|
236
|
+
if (e == null) return r[0] ?? "currentColor";
|
|
237
|
+
let t = a.indexOf(M(e));
|
|
238
|
+
return t < 0 && (t = a.push(M(e)) - 1), r[t % r.length] ?? "currentColor";
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function T(e) {
|
|
243
|
+
return [...new Set(e.filter(E))];
|
|
244
|
+
}
|
|
245
|
+
function E(e) {
|
|
246
|
+
return typeof e == "string" || typeof e == "number";
|
|
247
|
+
}
|
|
248
|
+
function D(e) {
|
|
249
|
+
return typeof e == "function" && !("copy" in e);
|
|
250
|
+
}
|
|
251
|
+
function O(e, t) {
|
|
252
|
+
let n = t.filter(E), r = e.quantiles, i = e.thresholds;
|
|
253
|
+
if (r) return k(n);
|
|
254
|
+
if (e.invertExtent && !i) throw TypeError("Threshold color-scale factory requires an explicit domain");
|
|
255
|
+
if (e.ticks || i) {
|
|
256
|
+
let t = k(n), r = Infinity, a = -Infinity;
|
|
257
|
+
for (let e of t) r = Math.min(r, e), a = Math.max(a, e);
|
|
258
|
+
if (!Number.isFinite(r) || !Number.isFinite(a)) return [];
|
|
259
|
+
if (S(e, r, a), r === a) if (r === 0) a = 1;
|
|
260
|
+
else {
|
|
261
|
+
let e = Math.abs(r) * .05 || 1;
|
|
262
|
+
r -= e, a += e;
|
|
263
|
+
}
|
|
264
|
+
if (i) return [r, a];
|
|
265
|
+
let o = Math.max(2, e.domain().length, e.range().length);
|
|
266
|
+
return Array.from({ length: o }, (e, t) => r + (a - r) * t / (o - 1));
|
|
267
|
+
}
|
|
268
|
+
return T(n);
|
|
269
|
+
}
|
|
270
|
+
function k(e) {
|
|
271
|
+
let t = e.filter((e) => typeof e == "number" && Number.isFinite(e));
|
|
272
|
+
return t.length !== e.length && A(), t;
|
|
273
|
+
}
|
|
274
|
+
function A() {
|
|
275
|
+
throw TypeError("A quantitative color-scale factory requires numeric values");
|
|
276
|
+
}
|
|
277
|
+
function j(e) {
|
|
278
|
+
return e.quantiles ? e.invertExtent ? "quantile" : "continuous" : e.thresholds ? "quantize" : e.invertExtent ? "threshold" : e.ticks ? "continuous" : "categorical";
|
|
279
|
+
}
|
|
280
|
+
function M(e) {
|
|
281
|
+
return e instanceof Date ? `date:${e.getTime()}` : typeof e == "string" ? `string:${e.length}:${e}` : `${typeof e}:${String(e)}`;
|
|
282
|
+
}
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region node_modules/@tanstack/charts/dist/mark.js
|
|
285
|
+
var ee = /* @__PURE__ */ new WeakSet();
|
|
286
|
+
function N(e) {
|
|
287
|
+
return typeof e == "string" || e instanceof Date && Number.isFinite(e.getTime()) || P(e);
|
|
288
|
+
}
|
|
289
|
+
function P(e) {
|
|
290
|
+
return typeof e == "number" && Number.isFinite(e);
|
|
291
|
+
}
|
|
292
|
+
function te(e, t) {
|
|
293
|
+
let n = (n) => {
|
|
294
|
+
let r = ne(e(n));
|
|
295
|
+
return t === void 0 || r.motion !== void 0 ? r : {
|
|
296
|
+
...r,
|
|
297
|
+
motion: t
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
return t === void 0 ? { initialize: n } : {
|
|
301
|
+
initialize: n,
|
|
302
|
+
motion: t
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function ne(e) {
|
|
306
|
+
return typeof e.render == "function" ? e : {
|
|
307
|
+
...e,
|
|
308
|
+
render: () => {
|
|
309
|
+
throw TypeError(`Mark "${e.id}" must resolve its layout before rendering`);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function F(e, t) {
|
|
314
|
+
return t?.length ? {
|
|
315
|
+
data: e,
|
|
316
|
+
definitions: t
|
|
317
|
+
} : void 0;
|
|
318
|
+
}
|
|
319
|
+
function re(e, t, n, r, i) {
|
|
320
|
+
return typeof e == "function" ? e(t, {
|
|
321
|
+
index: n,
|
|
322
|
+
data: r
|
|
323
|
+
}) : e ?? i;
|
|
324
|
+
}
|
|
325
|
+
function I(e, t, n) {
|
|
326
|
+
return typeof t == "function" ? e.map((n, r) => t(n, {
|
|
327
|
+
index: r,
|
|
328
|
+
data: e
|
|
329
|
+
})) : t === void 0 ? e.map((t, r) => n(t, {
|
|
330
|
+
index: r,
|
|
331
|
+
data: e
|
|
332
|
+
})) : e.map((e) => typeof e == "object" && e ? e[t] : void 0);
|
|
333
|
+
}
|
|
334
|
+
function ie(e, t, n = {}) {
|
|
335
|
+
if (t !== void 0) return I(e, t, (e, { index: t }) => t);
|
|
336
|
+
let r = [
|
|
337
|
+
e.map((e) => typeof e == "object" && e ? e.id : void 0),
|
|
338
|
+
e.map((e) => {
|
|
339
|
+
if (typeof e != "object" || !e) return;
|
|
340
|
+
let t = e.data;
|
|
341
|
+
return typeof t == "object" && t ? t.id : void 0;
|
|
342
|
+
}),
|
|
343
|
+
...n.candidates ?? []
|
|
344
|
+
];
|
|
345
|
+
for (let t of r) {
|
|
346
|
+
if (t.length !== e.length) continue;
|
|
347
|
+
let r = t.map(ae);
|
|
348
|
+
if (r.every((e) => e !== void 0) && oe(r, n.groups)) return r;
|
|
349
|
+
}
|
|
350
|
+
return se(n.markId, n.candidates, n.warningIdentity), e.map((e, t) => t);
|
|
351
|
+
}
|
|
352
|
+
function ae(e) {
|
|
353
|
+
if (E(e)) return e;
|
|
354
|
+
if (e instanceof Date && Number.isFinite(e.getTime())) return `date:${e.getTime()}`;
|
|
355
|
+
}
|
|
356
|
+
function oe(e, t) {
|
|
357
|
+
let n = /* @__PURE__ */ new Set();
|
|
358
|
+
for (let r = 0; r < e.length; r += 1) {
|
|
359
|
+
let i = JSON.stringify([M(t?.[r] ?? null), M(e[r])]);
|
|
360
|
+
if (n.has(i)) return !1;
|
|
361
|
+
n.add(i);
|
|
362
|
+
}
|
|
363
|
+
return !0;
|
|
364
|
+
}
|
|
365
|
+
function se(e, t, n) {
|
|
366
|
+
!e || !t?.length || !n || ee.has(n) || typeof process > "u" || process.env.NODE_ENV === "production" || (ee.add(n), console.warn(`TanStack Charts could not infer a unique key for mark "${e}". Using row position; supply key for stable identity across updates.`));
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region node_modules/@tanstack/charts/dist/stack-internal.js
|
|
370
|
+
function L(e, t = {}) {
|
|
371
|
+
let n = ce(t);
|
|
372
|
+
if (e.length === 0) return /* @__PURE__ */ new Map();
|
|
373
|
+
let r = [], a = /* @__PURE__ */ new Map(), o = [], s = /* @__PURE__ */ new Set();
|
|
374
|
+
for (let t of e) {
|
|
375
|
+
let e = M(t.position);
|
|
376
|
+
a.has(e) || (a.set(e, r.length), r.push(t.position));
|
|
377
|
+
let n = M(t.series);
|
|
378
|
+
s.has(n) || (s.add(n), o.push(t.series));
|
|
379
|
+
}
|
|
380
|
+
let p = r.map(() => /* @__PURE__ */ Object.create(null)), m = /* @__PURE__ */ new Map();
|
|
381
|
+
for (let t of e) {
|
|
382
|
+
let e = a.get(M(t.position)), n = M(t.series), r = `${e}:${n}`;
|
|
383
|
+
if (m.has(r)) throw TypeError(`A stack requires at most one value for each position and series; duplicate ${String(t.position)} / ${String(t.series)}`);
|
|
384
|
+
m.set(r, t.index), p[e][n] = t.value;
|
|
385
|
+
}
|
|
386
|
+
let h = t.order === "inside-out";
|
|
387
|
+
if (n !== void 0 && e.some(({ value: e }) => e < 0)) throw TypeError("A stack anchor requires nonnegative values");
|
|
388
|
+
let _ = B(e, o, t.order);
|
|
389
|
+
t.reverse && !h && _.reverse();
|
|
390
|
+
let v = _.map(M), y = t.anchor ? i : t.offset === "normalize" ? l : t.offset === "center" ? d : t.offset === "wiggle" ? f : u, b = c().keys(v).value((e, t) => e[t] ?? 0).offset(y);
|
|
391
|
+
h && b.order(t.reverse ? (e) => g(e).reverse() : g);
|
|
392
|
+
let x = b(p);
|
|
393
|
+
t.anchor && n !== void 0 && R(x, t.anchor.series, n), t.offset === "wiggle" && le(x);
|
|
394
|
+
let S = /* @__PURE__ */ new Map();
|
|
395
|
+
return x.forEach((e) => {
|
|
396
|
+
let t = e.key;
|
|
397
|
+
e.forEach((e, n) => {
|
|
398
|
+
let r = m.get(`${n}:${t}`);
|
|
399
|
+
r !== void 0 && S.set(r, {
|
|
400
|
+
start: e[0],
|
|
401
|
+
end: e[1]
|
|
402
|
+
});
|
|
403
|
+
});
|
|
404
|
+
}), S;
|
|
405
|
+
}
|
|
406
|
+
function ce(e) {
|
|
407
|
+
let t = e.anchor;
|
|
408
|
+
if (!t) return;
|
|
409
|
+
if (e.offset !== void 0 && e.offset !== "diverging") throw TypeError("A stack anchor can only be used with the diverging offset");
|
|
410
|
+
let n = t.fraction ?? .5;
|
|
411
|
+
if (!Number.isFinite(n) || n < 0 || n > 1) throw TypeError("A stack anchor fraction must be between zero and one");
|
|
412
|
+
return n;
|
|
413
|
+
}
|
|
414
|
+
function R(e, t, n) {
|
|
415
|
+
let r = M(t), i = e.find((e) => e.key === r);
|
|
416
|
+
if (!i) throw TypeError(`Stack anchor series "${String(t)}" is not in the resolved series order`);
|
|
417
|
+
i.forEach((t, r) => {
|
|
418
|
+
let i = t[0] + (t[1] - t[0]) * n;
|
|
419
|
+
for (let t of e) {
|
|
420
|
+
let e = t[r];
|
|
421
|
+
e && (e[0] -= i, e[1] -= i);
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function le(e) {
|
|
426
|
+
let t = Infinity;
|
|
427
|
+
for (let n of e) for (let e of n) t = Math.min(t, e[0]);
|
|
428
|
+
if (!(!Number.isFinite(t) || t === 0)) for (let n of e) for (let e of n) e[0] -= t, e[1] -= t;
|
|
429
|
+
}
|
|
430
|
+
function ue(e, t, n, r = {}, i = "value") {
|
|
431
|
+
let a = [];
|
|
432
|
+
for (let r = 0; r < e.length; r += 1) {
|
|
433
|
+
let o = e[r], s = t[r];
|
|
434
|
+
if (!z(o) || !fe(s)) continue;
|
|
435
|
+
let c = n[r];
|
|
436
|
+
a.push({
|
|
437
|
+
index: r,
|
|
438
|
+
position: o,
|
|
439
|
+
value: s,
|
|
440
|
+
series: de(c) ? c : i === "index" ? r : "value"
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
let o = L(a, r), s = Array.from({ length: e.length }, () => void 0), c = Array.from({ length: e.length }, () => void 0);
|
|
444
|
+
for (let [e, t] of o) s[e] = t.start, c[e] = t.end;
|
|
445
|
+
return {
|
|
446
|
+
starts: s,
|
|
447
|
+
ends: c
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function de(e) {
|
|
451
|
+
return typeof e == "string" || typeof e == "number";
|
|
452
|
+
}
|
|
453
|
+
function z(e) {
|
|
454
|
+
return typeof e == "string" || fe(e) || e instanceof Date && Number.isFinite(e.getTime());
|
|
455
|
+
}
|
|
456
|
+
function fe(e) {
|
|
457
|
+
return typeof e == "number" && Number.isFinite(e);
|
|
458
|
+
}
|
|
459
|
+
function B(e, t, n) {
|
|
460
|
+
if (Array.isArray(n)) {
|
|
461
|
+
let e = [...n], r = new Set(e.map(M));
|
|
462
|
+
return [...e, ...t.filter((e) => !r.has(M(e)))];
|
|
463
|
+
}
|
|
464
|
+
if (n !== "ascending" && n !== "descending") return [...t];
|
|
465
|
+
let r = new Map(t.map((e) => [M(e), 0]));
|
|
466
|
+
for (let t of e) {
|
|
467
|
+
let e = M(t.series);
|
|
468
|
+
r.set(e, (r.get(e) ?? 0) + Math.abs(t.value));
|
|
469
|
+
}
|
|
470
|
+
return [...t].sort((e, t) => {
|
|
471
|
+
let i = (r.get(M(e)) ?? 0) - (r.get(M(t)) ?? 0);
|
|
472
|
+
return n === "ascending" ? i : -i;
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region node_modules/@tanstack/charts/dist/configured-scale.js
|
|
477
|
+
function pe(e, t) {
|
|
478
|
+
let n = v(e, {
|
|
479
|
+
values: t.values,
|
|
480
|
+
includeZero: t.includeZero,
|
|
481
|
+
nice: t.options?.nice,
|
|
482
|
+
niceCount: t.tickCount
|
|
483
|
+
}), r = ve(n.domain()), i = me(n, t, r), a = n.bandwidth !== void 0, o = a && t.id === "y" ? [Math.min(...t.range), Math.max(...t.range)] : t.range, s = t.options?.reverse ? [o[1], o[0]] : o;
|
|
484
|
+
n.range(s);
|
|
485
|
+
let c = ve(n.domain());
|
|
486
|
+
if (i && (!ge(c, i.domain) || !_e(n, i.domain, s))) throw TypeError(`Chart viewport "${t.id}" requires independent configurable domain and range capabilities`);
|
|
487
|
+
let l = t.options?.axis === !1 ? void 0 : t.options?.axis?.ticks, u = l === !1 ? void 0 : l, d = u?.values ?? n.ticks?.(t.tickCount) ?? c, f = n.tickFormat?.(t.tickCount), p = n.bandwidth?.() ?? 0, m = (e) => {
|
|
488
|
+
let t = n(e);
|
|
489
|
+
return t === void 0 ? NaN : t + p / 2;
|
|
490
|
+
}, h = n.invert ? (e) => n.invert(e - p / 2) : void 0;
|
|
491
|
+
return {
|
|
492
|
+
id: t.id,
|
|
493
|
+
type: a ? "band" : "configured",
|
|
494
|
+
domain: c,
|
|
495
|
+
map: m,
|
|
496
|
+
...h ? { invert: h } : {},
|
|
497
|
+
ticks: d.map((e) => ({
|
|
498
|
+
value: e,
|
|
499
|
+
position: m(e),
|
|
500
|
+
label: u?.format?.(e) ?? f?.(e) ?? Ee(e)
|
|
501
|
+
})),
|
|
502
|
+
bandwidth: p,
|
|
503
|
+
...i ? { viewport: {
|
|
504
|
+
contentDomain: r,
|
|
505
|
+
domain: i.domain,
|
|
506
|
+
translate: i.translate,
|
|
507
|
+
map: (e) => m(e) + i.translate
|
|
508
|
+
} } : {}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
function me(e, t, n) {
|
|
512
|
+
let r = t.options?.viewport;
|
|
513
|
+
if (!r) return;
|
|
514
|
+
let i = e;
|
|
515
|
+
if (e.bandwidth !== void 0 || typeof e.ticks != "function" || typeof i.invert != "function") throw TypeError(`Chart viewport "${t.id}" requires a continuous numeric or temporal scale`);
|
|
516
|
+
if (typeof i.clamp == "function" && i.clamp() === !0) throw TypeError(`Chart viewport "${t.id}" does not support a clamped scale`);
|
|
517
|
+
let a = r.domain;
|
|
518
|
+
(a.length !== 2 || !Se(a[0], a[1])) && Te(t.id);
|
|
519
|
+
let o = Ce(a[0]), s = Ce(a[1]);
|
|
520
|
+
(!Number.isFinite(o) || !Number.isFinite(s) || o === s) && Te(t.id), be(e, t.id, n, a);
|
|
521
|
+
let c = r.translate ?? 0;
|
|
522
|
+
if (!Number.isFinite(c)) throw TypeError(`Chart viewport "${t.id}" translate must be a finite number`);
|
|
523
|
+
ge(e.domain(), a) && he(e, [a[1], a[0]], t.id), he(e, a, t.id);
|
|
524
|
+
let l = ve(e.domain());
|
|
525
|
+
return (l.length !== 2 || !Se(l[0], l[1])) && ye(t.id), {
|
|
526
|
+
domain: l,
|
|
527
|
+
translate: c
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
function he(e, t, n) {
|
|
531
|
+
let r = e.domain;
|
|
532
|
+
try {
|
|
533
|
+
r.call(e, [...t]);
|
|
534
|
+
} catch {
|
|
535
|
+
ye(n);
|
|
536
|
+
}
|
|
537
|
+
ge(e.domain(), t) || ye(n);
|
|
538
|
+
}
|
|
539
|
+
function ge(e, t) {
|
|
540
|
+
return e.length === t.length && e.every((e, n) => we(e, t[n]));
|
|
541
|
+
}
|
|
542
|
+
function _e(e, t, n) {
|
|
543
|
+
let r = e(t[0]), i = e(t[1]);
|
|
544
|
+
return r !== void 0 && i !== void 0 && Number.isFinite(r) && Number.isFinite(i) && Math.abs(r - n[0]) <= 1e-6 && Math.abs(i - n[1]) <= 1e-6;
|
|
545
|
+
}
|
|
546
|
+
function ve(e) {
|
|
547
|
+
return e.map((e) => e instanceof Date ? new Date(e.getTime()) : e);
|
|
548
|
+
}
|
|
549
|
+
function ye(e) {
|
|
550
|
+
throw TypeError(`Chart viewport "${e}" requires a scale with a configurable domain`);
|
|
551
|
+
}
|
|
552
|
+
function be(e, t, n, r) {
|
|
553
|
+
if (!x(e)) return;
|
|
554
|
+
let i = xe(n), a = xe(r);
|
|
555
|
+
if (i === void 0 || a === void 0 || i !== a) throw TypeError(`Chart viewport "${t}" logarithmic content and viewport domains must be finite, nonzero, and stay on the same side of zero`);
|
|
556
|
+
}
|
|
557
|
+
function xe(e) {
|
|
558
|
+
let t;
|
|
559
|
+
for (let n of e) {
|
|
560
|
+
if (typeof n != "number" || !Number.isFinite(n) || n === 0) return;
|
|
561
|
+
let e = Math.sign(n);
|
|
562
|
+
if (t !== void 0 && e !== t) return;
|
|
563
|
+
t = e;
|
|
564
|
+
}
|
|
565
|
+
return t;
|
|
566
|
+
}
|
|
567
|
+
function Se(e, t) {
|
|
568
|
+
return typeof e == "number" && typeof t == "number" || e instanceof Date && t instanceof Date;
|
|
569
|
+
}
|
|
570
|
+
function Ce(e) {
|
|
571
|
+
return e instanceof Date ? e.getTime() : e;
|
|
572
|
+
}
|
|
573
|
+
function we(e, t) {
|
|
574
|
+
return e instanceof Date && t instanceof Date ? e.getTime() === t.getTime() : Object.is(e, t);
|
|
575
|
+
}
|
|
576
|
+
function Te(e) {
|
|
577
|
+
throw TypeError(`Chart viewport "${e}" domain must contain two distinct finite numbers or Dates`);
|
|
578
|
+
}
|
|
579
|
+
function Ee(e) {
|
|
580
|
+
return e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
581
|
+
}
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region node_modules/@tanstack/charts/dist/guide-layout.js
|
|
584
|
+
var De = 16, Oe = 400, V = {
|
|
585
|
+
fontFamily: "sans-serif",
|
|
586
|
+
fontStyle: "normal",
|
|
587
|
+
fontStretch: "normal",
|
|
588
|
+
letterSpacing: 0,
|
|
589
|
+
direction: "inherit",
|
|
590
|
+
fontScale: 1
|
|
591
|
+
};
|
|
592
|
+
function H(e, t) {
|
|
593
|
+
let n = G(t.fontScale, 1), r = W(t.fontSize, De) * n, i = W(t.fontWeight, Oe), a = Me(t.letterSpacing, 0) * n;
|
|
594
|
+
if (!e || r === 0) return {
|
|
595
|
+
x: 0,
|
|
596
|
+
y: 0,
|
|
597
|
+
width: 0,
|
|
598
|
+
height: 0
|
|
599
|
+
};
|
|
600
|
+
let o = 0;
|
|
601
|
+
for (let t of e) o += je(t);
|
|
602
|
+
let s = 1 + (Math.min(900, Math.max(100, i)) - 400) / 12500, c = Math.max(0, o * r * s + Math.max(0, Array.from(e).length - 1) * a), l = r;
|
|
603
|
+
return {
|
|
604
|
+
x: t.anchor === "middle" ? -c / 2 : t.anchor === "end" ? -c : 0,
|
|
605
|
+
y: t.baseline === "middle" ? -l / 2 : t.baseline === "hanging" ? 0 : -r * .8,
|
|
606
|
+
width: c,
|
|
607
|
+
height: l
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function U(e, t = H) {
|
|
611
|
+
let n = W(e.fontSize, De), r = e.anchor ?? "start", i = e.baseline ?? "auto", a = e.text.length === 0 ? {
|
|
612
|
+
x: 0,
|
|
613
|
+
y: 0,
|
|
614
|
+
width: 0,
|
|
615
|
+
height: 0
|
|
616
|
+
} : t(e.text, {
|
|
617
|
+
fontSize: n,
|
|
618
|
+
fontWeight: e.fontWeight,
|
|
619
|
+
...V,
|
|
620
|
+
anchor: r,
|
|
621
|
+
baseline: i
|
|
622
|
+
}), o = Me(a.x, 0), s = Me(a.y, 0), c = W(a.width, 0), l = W(a.height, 0), u = {
|
|
623
|
+
x: e.x + o,
|
|
624
|
+
y: e.y + s,
|
|
625
|
+
width: c,
|
|
626
|
+
height: l
|
|
627
|
+
};
|
|
628
|
+
return e.rotate ? Ae(u, e.x, e.y, e.rotate) : u;
|
|
629
|
+
}
|
|
630
|
+
function ke(e = H, t = {}) {
|
|
631
|
+
let n = {
|
|
632
|
+
...V,
|
|
633
|
+
...t,
|
|
634
|
+
fontFamily: t.fontFamily || V.fontFamily,
|
|
635
|
+
fontStyle: t.fontStyle || V.fontStyle,
|
|
636
|
+
fontStretch: t.fontStretch || V.fontStretch,
|
|
637
|
+
letterSpacing: Me(t.letterSpacing, 0),
|
|
638
|
+
fontScale: G(t.fontScale, 1)
|
|
639
|
+
};
|
|
640
|
+
return (t, r) => e(t, {
|
|
641
|
+
...r,
|
|
642
|
+
...n
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
function Ae(e, t, n, r) {
|
|
646
|
+
let i = r * Math.PI / 180, a = Math.cos(i), o = Math.sin(i), s = e.x + e.width / 2 - t, c = e.y + e.height / 2 - n, l = Math.abs(e.width * a) + Math.abs(e.height * o), u = Math.abs(e.width * o) + Math.abs(e.height * a), d = s * a - c * o + t, f = s * o + c * a + n;
|
|
647
|
+
return {
|
|
648
|
+
x: d - l / 2,
|
|
649
|
+
y: f - u / 2,
|
|
650
|
+
width: l,
|
|
651
|
+
height: u
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
function je(e) {
|
|
655
|
+
return /\s/u.test(e) ? .33 : /[\u0300-\u036f]/u.test(e) ? 0 : /[ilI1|!.,:;'`]/u.test(e) ? .28 : /[mwMW@#%&]/u.test(e) ? .9 : /[A-Z]/u.test(e) ? .64 : /[0-9]/u.test(e) ? .56 : e.codePointAt(0) > 127 ? 1 : .54;
|
|
656
|
+
}
|
|
657
|
+
function W(e, t) {
|
|
658
|
+
return e !== void 0 && Number.isFinite(e) && e >= 0 ? e : t;
|
|
659
|
+
}
|
|
660
|
+
function Me(e, t) {
|
|
661
|
+
return e !== void 0 && Number.isFinite(e) ? e : t;
|
|
662
|
+
}
|
|
663
|
+
function G(e, t) {
|
|
664
|
+
return e !== void 0 && Number.isFinite(e) && e > 0 ? e : t;
|
|
665
|
+
}
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region node_modules/@tanstack/charts/dist/nearest.js
|
|
668
|
+
var K = /* @__PURE__ */ new WeakMap();
|
|
669
|
+
function Ne(e, t, n, r) {
|
|
670
|
+
let i, a = Infinity;
|
|
671
|
+
for (let r = e.length; r--;) {
|
|
672
|
+
let o = e[r], s = o.x - t, c = o.y - n, l = s * s + c * c;
|
|
673
|
+
l <= a && (i = o, a = l);
|
|
674
|
+
}
|
|
675
|
+
return i && a <= Math.max(0, r) ** 2 ? i : null;
|
|
676
|
+
}
|
|
677
|
+
function Pe(e, t, n, r, i = e.points) {
|
|
678
|
+
let a = Ie(e), o = i === e.points ? void 0 : new Set(i);
|
|
679
|
+
if (!a.targets.length && !a.attachedPoints.size) return Ne(i, t, n, r);
|
|
680
|
+
let s = Fe(e, t, n, i);
|
|
681
|
+
if (s) return s.point;
|
|
682
|
+
let c, l, u = Infinity, d = Infinity;
|
|
683
|
+
for (let e of a.targets) {
|
|
684
|
+
let r = e.node.interaction;
|
|
685
|
+
if (!ze(r, o)) continue;
|
|
686
|
+
let i = r.affinity ?? "xy";
|
|
687
|
+
if (i === "geometry") continue;
|
|
688
|
+
let a = i === "x" ? "x" : i === "y" ? "y" : void 0, s = a ? rt(e.bounds, a === "x" ? t : n, a) : Ve(e, t, n);
|
|
689
|
+
if (s > u) continue;
|
|
690
|
+
let f = a ? Ve(e, t, n) : s;
|
|
691
|
+
(s < u || s === u && f < d) && (l = r, c = void 0, u = s, d = f);
|
|
692
|
+
}
|
|
693
|
+
if (u !== 0) for (let e of i) {
|
|
694
|
+
if (a.attachedPoints.has(e)) continue;
|
|
695
|
+
let r = e.x - t, i = e.y - n, o = r * r + i * i;
|
|
696
|
+
o < u && (c = e, l = void 0, u = o, d = o);
|
|
697
|
+
}
|
|
698
|
+
return u > Math.max(0, r) ** 2 ? null : c ?? (l ? Re(l, t, n, o) : void 0) ?? null;
|
|
699
|
+
}
|
|
700
|
+
function Fe(e, t, n, r = e.points) {
|
|
701
|
+
let i = Ie(e), a = r === e.points ? void 0 : new Set(r);
|
|
702
|
+
for (let e = i.targets.length; e--;) {
|
|
703
|
+
let r = i.targets[e];
|
|
704
|
+
if (nt(r.bounds, t, n) && Be(r, t, n)) {
|
|
705
|
+
let e = r.node.interaction, i = Re(e, t, n, a), o = e.point ? !0 : e.points.length > 0;
|
|
706
|
+
if (i || !a || !o) return { point: i };
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return null;
|
|
710
|
+
}
|
|
711
|
+
function Ie(e) {
|
|
712
|
+
let t = K.get(e);
|
|
713
|
+
if (t) return t;
|
|
714
|
+
let n = [], r = /* @__PURE__ */ new Set();
|
|
715
|
+
Le(e.nodes, 0, 0, void 0, n, r);
|
|
716
|
+
let i = {
|
|
717
|
+
targets: n,
|
|
718
|
+
attachedPoints: r
|
|
719
|
+
};
|
|
720
|
+
return K.set(e, i), i;
|
|
721
|
+
}
|
|
722
|
+
function Le(e, t, n, r, i, a) {
|
|
723
|
+
for (let o of e) {
|
|
724
|
+
if (o.kind === "group") {
|
|
725
|
+
if (o.focus) continue;
|
|
726
|
+
let e = t + (o.translateX ?? 0), s = n + (o.translateY ?? 0), c = o.clip ? $e(o.clip, e, s) : void 0, l = r === null ? null : tt(r, c);
|
|
727
|
+
Le(o.children, e, s, l, i, a);
|
|
728
|
+
continue;
|
|
729
|
+
}
|
|
730
|
+
if (o.kind === "label" || !o.interaction) continue;
|
|
731
|
+
if (o.interaction.point) a.add(o.interaction.point);
|
|
732
|
+
else for (let e of o.interaction.points) a.add(e);
|
|
733
|
+
if (r === null) continue;
|
|
734
|
+
let e = He(o);
|
|
735
|
+
if (!e) continue;
|
|
736
|
+
let s = $e(e, t, n), c = r ? tt(s, r) : s;
|
|
737
|
+
c != null && i.push({
|
|
738
|
+
node: o,
|
|
739
|
+
offsetX: t,
|
|
740
|
+
offsetY: n,
|
|
741
|
+
bounds: c,
|
|
742
|
+
clip: r
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
function Re(e, t, n, r) {
|
|
747
|
+
if (e.point) return !r || r.has(e.point) ? e.point : null;
|
|
748
|
+
let i = e.affinity ?? "xy", a, o = Infinity, s = Infinity;
|
|
749
|
+
for (let c of e.points) {
|
|
750
|
+
if (r && !r.has(c)) continue;
|
|
751
|
+
let e = c.x - t, l = c.y - n, u = e * e + l * l, d = i === "x" ? e * e : i === "y" ? l * l : u;
|
|
752
|
+
(d < o || d === o && u < s) && (a = c, o = d, s = u);
|
|
753
|
+
}
|
|
754
|
+
return a ?? null;
|
|
755
|
+
}
|
|
756
|
+
function ze(e, t) {
|
|
757
|
+
return t ? e.point ? t.has(e.point) : e.points.some((e) => t.has(e)) : !0;
|
|
758
|
+
}
|
|
759
|
+
function Be(e, t, n) {
|
|
760
|
+
let r = t - e.offsetX, i = n - e.offsetY, { node: a } = e;
|
|
761
|
+
switch (a.kind) {
|
|
762
|
+
case "rect": return Ue(a, r, i);
|
|
763
|
+
case "dot": {
|
|
764
|
+
let e = r - a.x, t = i - a.y, n = Math.max(0, a.radius);
|
|
765
|
+
return e * e + t * t <= n * n;
|
|
766
|
+
}
|
|
767
|
+
case "area": return a.polygons === void 0 ? Ge(a.points, r, i) : Ke(a.polygons, r, i);
|
|
768
|
+
case "polyline": return Je(a.points, r, i, !1) <= q(a) ** 2;
|
|
769
|
+
case "rule": return Ye(a.x1, a.y1, a.x2, a.y2, r, i) <= q(a) ** 2;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
function Ve(e, t, n) {
|
|
773
|
+
let r = t - e.offsetX, i = n - e.offsetY, { node: a } = e, o;
|
|
774
|
+
switch (a.kind) {
|
|
775
|
+
case "rect":
|
|
776
|
+
o = a.radius ? We(a, r, i) : it(a, r, i);
|
|
777
|
+
break;
|
|
778
|
+
case "dot": {
|
|
779
|
+
let e = r - a.x, t = i - a.y, n = Math.max(0, Math.sqrt(e * e + t * t) - Math.max(0, a.radius));
|
|
780
|
+
o = n * n;
|
|
781
|
+
break;
|
|
782
|
+
}
|
|
783
|
+
case "area":
|
|
784
|
+
o = a.polygons === void 0 ? Je(a.points, r, i, !0) : qe(a.polygons, r, i);
|
|
785
|
+
break;
|
|
786
|
+
case "polyline": {
|
|
787
|
+
let e = Je(a.points, r, i, !1), t = Math.max(0, Math.sqrt(e) - q(a));
|
|
788
|
+
o = t * t;
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
case "rule": {
|
|
792
|
+
let e = Ye(a.x1, a.y1, a.x2, a.y2, r, i), t = Math.max(0, Math.sqrt(e) - q(a));
|
|
793
|
+
o = t * t;
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return e.clip ? Math.max(o, it(e.clip, t, n)) : o;
|
|
798
|
+
}
|
|
799
|
+
function He(e) {
|
|
800
|
+
switch (e.kind) {
|
|
801
|
+
case "rect": return Qe(e);
|
|
802
|
+
case "dot": {
|
|
803
|
+
let t = Math.max(0, e.radius);
|
|
804
|
+
return {
|
|
805
|
+
x: e.x - t,
|
|
806
|
+
y: e.y - t,
|
|
807
|
+
width: t * 2,
|
|
808
|
+
height: t * 2
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
case "area": return e.polygons === void 0 ? Xe(e.points) : Ze(e.polygons);
|
|
812
|
+
case "polyline": {
|
|
813
|
+
let t = Xe(e.points);
|
|
814
|
+
return t ? et(t, q(e)) : null;
|
|
815
|
+
}
|
|
816
|
+
case "rule": return et({
|
|
817
|
+
x: Math.min(e.x1, e.x2),
|
|
818
|
+
y: Math.min(e.y1, e.y2),
|
|
819
|
+
width: Math.abs(e.x2 - e.x1),
|
|
820
|
+
height: Math.abs(e.y2 - e.y1)
|
|
821
|
+
}, q(e));
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
function Ue(e, t, n) {
|
|
825
|
+
let r = Qe(e);
|
|
826
|
+
if (!nt(r, t, n)) return !1;
|
|
827
|
+
let i = Math.max(0, Math.min(e.radius ?? 0, r.width / 2, r.height / 2));
|
|
828
|
+
if (i === 0 || t >= r.x + i && t <= r.x + r.width - i || n >= r.y + i && n <= r.y + r.height - i) return !0;
|
|
829
|
+
let a = t < r.x + i ? r.x + i : r.x + r.width - i, o = n < r.y + i ? r.y + i : r.y + r.height - i, s = t - a, c = n - o;
|
|
830
|
+
return s * s + c * c <= i * i;
|
|
831
|
+
}
|
|
832
|
+
function We(e, t, n) {
|
|
833
|
+
let r = Qe(e), i = r.width / 2, a = r.height / 2, o = Math.max(0, Math.min(e.radius ?? 0, i, a)), s = Math.abs(t - (r.x + i)) - (i - o), c = Math.abs(n - (r.y + a)) - (a - o), l = Math.sqrt(Math.max(0, s) ** 2 + Math.max(0, c) ** 2) - o;
|
|
834
|
+
return Math.max(0, l) ** 2;
|
|
835
|
+
}
|
|
836
|
+
function Ge(e, t, n) {
|
|
837
|
+
let r = !1;
|
|
838
|
+
for (let i = 0, a = e.length - 1; i < e.length; a = i++) {
|
|
839
|
+
let o = e[i], s = e[a];
|
|
840
|
+
o[1] > n != s[1] > n && t < (s[0] - o[0]) * (n - o[1]) / (s[1] - o[1]) + o[0] && (r = !r);
|
|
841
|
+
}
|
|
842
|
+
return r;
|
|
843
|
+
}
|
|
844
|
+
function Ke(e, t, n) {
|
|
845
|
+
return e.some(([e, ...r]) => !e || !Ge(e, t, n) ? !1 : !r.some((e) => Ge(e, t, n)));
|
|
846
|
+
}
|
|
847
|
+
function qe(e, t, n) {
|
|
848
|
+
let r = Infinity;
|
|
849
|
+
for (let i of e) for (let e of i) r = Math.min(r, Je(e, t, n, !0));
|
|
850
|
+
return r;
|
|
851
|
+
}
|
|
852
|
+
function Je(e, t, n, r) {
|
|
853
|
+
if (!e.length) return Infinity;
|
|
854
|
+
if (e.length === 1) {
|
|
855
|
+
let r = e[0];
|
|
856
|
+
return (r[0] - t) ** 2 + (r[1] - n) ** 2;
|
|
857
|
+
}
|
|
858
|
+
let i = Infinity, a = r ? e.length : Math.max(0, e.length - 1);
|
|
859
|
+
for (let r = 0; r < a; r += 1) {
|
|
860
|
+
let a = e[r], o = e[(r + 1) % e.length];
|
|
861
|
+
i = Math.min(i, Ye(a[0], a[1], o[0], o[1], t, n));
|
|
862
|
+
}
|
|
863
|
+
return i;
|
|
864
|
+
}
|
|
865
|
+
function Ye(e, t, n, r, i, a) {
|
|
866
|
+
let o = n - e, s = r - t, c = o * o + s * s, l = c ? Math.max(0, Math.min(1, ((i - e) * o + (a - t) * s) / c)) : 0, u = i - (e + l * o), d = a - (t + l * s);
|
|
867
|
+
return u * u + d * d;
|
|
868
|
+
}
|
|
869
|
+
function Xe(e) {
|
|
870
|
+
let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity;
|
|
871
|
+
for (let a of e) !Number.isFinite(a[0]) || !Number.isFinite(a[1]) || (t = Math.min(t, a[0]), n = Math.min(n, a[1]), r = Math.max(r, a[0]), i = Math.max(i, a[1]));
|
|
872
|
+
return Number.isFinite(t) ? {
|
|
873
|
+
x: t,
|
|
874
|
+
y: n,
|
|
875
|
+
width: r - t,
|
|
876
|
+
height: i - n
|
|
877
|
+
} : null;
|
|
878
|
+
}
|
|
879
|
+
function Ze(e) {
|
|
880
|
+
return Xe(e.flatMap((e) => e.flat()));
|
|
881
|
+
}
|
|
882
|
+
function Qe(e) {
|
|
883
|
+
return {
|
|
884
|
+
x: Math.min(e.x, e.x + e.width),
|
|
885
|
+
y: Math.min(e.y, e.y + e.height),
|
|
886
|
+
width: Math.abs(e.width),
|
|
887
|
+
height: Math.abs(e.height)
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function $e(e, t, n) {
|
|
891
|
+
let r = Qe(e);
|
|
892
|
+
return {
|
|
893
|
+
...r,
|
|
894
|
+
x: r.x + t,
|
|
895
|
+
y: r.y + n
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
function et(e, t) {
|
|
899
|
+
return {
|
|
900
|
+
x: e.x - t,
|
|
901
|
+
y: e.y - t,
|
|
902
|
+
width: e.width + t * 2,
|
|
903
|
+
height: e.height + t * 2
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
function tt(e, t) {
|
|
907
|
+
if (!e) return t;
|
|
908
|
+
if (!t) return e;
|
|
909
|
+
let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
|
|
910
|
+
return i < n || a < r ? null : {
|
|
911
|
+
x: n,
|
|
912
|
+
y: r,
|
|
913
|
+
width: i - n,
|
|
914
|
+
height: a - r
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function nt(e, t, n) {
|
|
918
|
+
return t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height;
|
|
919
|
+
}
|
|
920
|
+
function rt(e, t, n) {
|
|
921
|
+
let r = n === "x" ? e.x : e.y, i = n === "x" ? e.width : e.height, a = t < r ? r - t : t > r + i ? t - r - i : 0;
|
|
922
|
+
return a * a;
|
|
923
|
+
}
|
|
924
|
+
function it(e, t, n) {
|
|
925
|
+
let r = Qe(e), i = t < r.x ? r.x - t : t > r.x + r.width ? t - r.x - r.width : 0, a = n < r.y ? r.y - n : n > r.y + r.height ? n - r.y - r.height : 0;
|
|
926
|
+
return i * i + a * a;
|
|
927
|
+
}
|
|
928
|
+
function q(e) {
|
|
929
|
+
return Math.max(0, e.style?.strokeWidth ?? 1) / 2;
|
|
930
|
+
}
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region node_modules/@tanstack/charts/dist/scene-point-map.js
|
|
933
|
+
function at(e, t) {
|
|
934
|
+
return ["x", "y"].some((n) => (e.scales[n]?.viewport?.translate ?? 0) !== (t.scales[n]?.viewport?.translate ?? 0));
|
|
935
|
+
}
|
|
936
|
+
function ot(e, t) {
|
|
937
|
+
return e.map((e) => e.kind === "group" ? {
|
|
938
|
+
...e,
|
|
939
|
+
children: ot(e.children, t),
|
|
940
|
+
...e.focus ? { focus: {
|
|
941
|
+
...e.focus,
|
|
942
|
+
points: e.focus.points.map(t)
|
|
943
|
+
} } : {},
|
|
944
|
+
...e.states ? { states: {
|
|
945
|
+
...e.states,
|
|
946
|
+
points: e.states.points.map(t)
|
|
947
|
+
} } : {}
|
|
948
|
+
} : e.kind === "label" || !e.interaction ? e : {
|
|
949
|
+
...e,
|
|
950
|
+
interaction: e.interaction.point ? {
|
|
951
|
+
...e.interaction,
|
|
952
|
+
point: t(e.interaction.point)
|
|
953
|
+
} : {
|
|
954
|
+
...e.interaction,
|
|
955
|
+
points: e.interaction.points.map(t)
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
//#endregion
|
|
960
|
+
//#region node_modules/@tanstack/charts/dist/scene-source.js
|
|
961
|
+
var st = /* @__PURE__ */ Symbol("chart-scene-source"), ct = {
|
|
962
|
+
foreground: "currentColor",
|
|
963
|
+
muted: "currentColor",
|
|
964
|
+
grid: "currentColor",
|
|
965
|
+
background: "transparent",
|
|
966
|
+
palette: [
|
|
967
|
+
"var(--ts-chart-1, #2563eb)",
|
|
968
|
+
"var(--ts-chart-2, #f97316)",
|
|
969
|
+
"var(--ts-chart-3, #10b981)",
|
|
970
|
+
"var(--ts-chart-4, #8b5cf6)",
|
|
971
|
+
"var(--ts-chart-5, #ec4899)",
|
|
972
|
+
"var(--ts-chart-6, #06b6d4)"
|
|
973
|
+
]
|
|
974
|
+
};
|
|
975
|
+
function lt(e, t) {
|
|
976
|
+
return t ? {
|
|
977
|
+
...e,
|
|
978
|
+
...t
|
|
979
|
+
} : typeof e == "function" ? { chart: e } : e;
|
|
980
|
+
}
|
|
981
|
+
function ut(e, t, n = {}) {
|
|
982
|
+
return ft(e, t, (e) => {
|
|
983
|
+
if (!e.options?.scale) throw TypeError(`Chart scale "${e.id}" requires a configured scale`);
|
|
984
|
+
return dt(e.options.scale, e);
|
|
985
|
+
}, n);
|
|
986
|
+
}
|
|
987
|
+
function dt(e, t) {
|
|
988
|
+
if (typeof e == "function") return pe(e, t);
|
|
989
|
+
if (t.options?.viewport) throw TypeError(`Chart viewport "${t.id}" requires a configured or inferable continuous scale`);
|
|
990
|
+
return e.resolve(t);
|
|
991
|
+
}
|
|
992
|
+
function ft(e, t, n, r) {
|
|
993
|
+
let i = Wt(t.width), a = Wt(t.height), o = {
|
|
994
|
+
...r,
|
|
995
|
+
measureText: ke(r.measureText, r.typography)
|
|
996
|
+
}, s = {
|
|
997
|
+
...ct,
|
|
998
|
+
...o.defaultTheme,
|
|
999
|
+
palette: o.defaultTheme?.palette ?? ct.palette
|
|
1000
|
+
}, c = {
|
|
1001
|
+
...s,
|
|
1002
|
+
...e.theme,
|
|
1003
|
+
palette: e.theme?.palette ?? s.palette
|
|
1004
|
+
}, l = e.marks.map((e, t) => e.initialize({ markIndex: t })), u = vt(l, "x"), d = vt(l, "y"), f = e.guides === !1 ? 0 : (e.x != null && e.x.axis !== !1) | (e.y != null && e.y.axis !== !1) << 1, { margin: p, chart: m, scales: h, axes: g, marks: _, colors: v, legend: y, legendBounds: b } = xt(e, l, i, a, c, u, d, f, n, o), x = [], S = [], C = [], w = h.x.viewport?.translate ?? 0, T = h.y.viewport?.translate ?? 0, E = [], D = _.findIndex((e) => !e.focus && !e.focusGuideOnly);
|
|
1005
|
+
_.forEach((e, t) => {
|
|
1006
|
+
let n = !!(h.x.viewport && J(e, "x")), r = !!(h.y.viewport && J(e, "y")), s = /* @__PURE__ */ new Map(), l = (e) => {
|
|
1007
|
+
let t = s.get(e);
|
|
1008
|
+
if (t) return t;
|
|
1009
|
+
let i = n || r ? {
|
|
1010
|
+
...e,
|
|
1011
|
+
x: e.x + (n ? w : 0),
|
|
1012
|
+
y: e.y + (r ? T : 0)
|
|
1013
|
+
} : e;
|
|
1014
|
+
return s.set(e, i), i;
|
|
1015
|
+
}, u = e.render({
|
|
1016
|
+
markIndex: t,
|
|
1017
|
+
surface: {
|
|
1018
|
+
x: 0,
|
|
1019
|
+
y: 0,
|
|
1020
|
+
width: i,
|
|
1021
|
+
height: a
|
|
1022
|
+
},
|
|
1023
|
+
chart: m,
|
|
1024
|
+
scales: h,
|
|
1025
|
+
theme: c,
|
|
1026
|
+
color: v.map,
|
|
1027
|
+
colors: v,
|
|
1028
|
+
layout: o
|
|
1029
|
+
});
|
|
1030
|
+
y?.filterMark && (u = y.filterMark(u, { seriesFromColor: e.seriesFromColor })), e.postDomain && (u = e.postDomain(u));
|
|
1031
|
+
let d = _t(u.nodes, u.points), f = n || r ? ot(u.nodes, l) : u.nodes, p = d.map(l), g = [], _ = D < 0 || t < D ? "under" : "over";
|
|
1032
|
+
for (let e of u.focusGuides ?? []) E.push({
|
|
1033
|
+
...e,
|
|
1034
|
+
placement: e.placement ?? _
|
|
1035
|
+
});
|
|
1036
|
+
if (e.focus) {
|
|
1037
|
+
let t = e.focus.retarget === !0;
|
|
1038
|
+
g.push({
|
|
1039
|
+
kind: "group",
|
|
1040
|
+
key: `focus:${e.id}`,
|
|
1041
|
+
className: "ts-chart__focus-layer",
|
|
1042
|
+
ariaHidden: !0,
|
|
1043
|
+
focus: {
|
|
1044
|
+
match: e.focus.match ?? "primary",
|
|
1045
|
+
anchors: u.focusAnchors ?? d,
|
|
1046
|
+
points: p,
|
|
1047
|
+
placement: _,
|
|
1048
|
+
...t ? {
|
|
1049
|
+
retarget: !0,
|
|
1050
|
+
candidates: f
|
|
1051
|
+
} : {}
|
|
1052
|
+
},
|
|
1053
|
+
children: t ? [] : f
|
|
1054
|
+
});
|
|
1055
|
+
} else {
|
|
1056
|
+
let t = p;
|
|
1057
|
+
if (e.states) g.push({
|
|
1058
|
+
kind: "group",
|
|
1059
|
+
key: `states:${e.id}`,
|
|
1060
|
+
children: f,
|
|
1061
|
+
states: {
|
|
1062
|
+
data: e.states.data,
|
|
1063
|
+
definitions: e.states.definitions,
|
|
1064
|
+
points: t
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
else for (let e of f) g.push(e);
|
|
1068
|
+
for (let e of t) C.push(e);
|
|
1069
|
+
t.length && S.push({
|
|
1070
|
+
markId: e.id,
|
|
1071
|
+
points: t,
|
|
1072
|
+
clipped: n || r
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
x.push({
|
|
1076
|
+
key: e.id,
|
|
1077
|
+
nodes: g,
|
|
1078
|
+
viewportX: n,
|
|
1079
|
+
viewportY: r
|
|
1080
|
+
});
|
|
1081
|
+
});
|
|
1082
|
+
let O = pt(x, w, T, m), k = [{
|
|
1083
|
+
kind: "group",
|
|
1084
|
+
key: "marks",
|
|
1085
|
+
className: "ts-chart__marks",
|
|
1086
|
+
clip: e.clip ? m : void 0,
|
|
1087
|
+
children: O
|
|
1088
|
+
}];
|
|
1089
|
+
e.guides !== !1 && (e.x?.grid || e.y?.grid) && k.unshift(At(m, h, e, c)), f && k.push(g);
|
|
1090
|
+
let A = [], j = /* @__PURE__ */ new Set();
|
|
1091
|
+
for (let t of e.controls ?? []) {
|
|
1092
|
+
if (!t.id.trim()) throw TypeError("Chart control ids must be nonempty");
|
|
1093
|
+
if (j.has(t.id)) throw TypeError(`Duplicate chart control id "${t.id}"`);
|
|
1094
|
+
j.add(t.id);
|
|
1095
|
+
let e = t.resolve({
|
|
1096
|
+
chart: m,
|
|
1097
|
+
scales: h,
|
|
1098
|
+
colors: v,
|
|
1099
|
+
theme: c,
|
|
1100
|
+
width: i,
|
|
1101
|
+
height: a
|
|
1102
|
+
});
|
|
1103
|
+
e.nodes && k.push(...e.nodes), e.controls && A.push(...e.controls);
|
|
1104
|
+
}
|
|
1105
|
+
if (y && b) {
|
|
1106
|
+
let e = {
|
|
1107
|
+
colors: v,
|
|
1108
|
+
chart: m,
|
|
1109
|
+
bounds: b,
|
|
1110
|
+
theme: c,
|
|
1111
|
+
width: i,
|
|
1112
|
+
height: a
|
|
1113
|
+
};
|
|
1114
|
+
k.push(y.render(e)), y.control && A.push(y.control(e));
|
|
1115
|
+
}
|
|
1116
|
+
let M = /* @__PURE__ */ new Set();
|
|
1117
|
+
for (let e of A) {
|
|
1118
|
+
let t = `${e.extension.id}:${e.key}`;
|
|
1119
|
+
if (M.has(t)) throw TypeError(`Duplicate chart host control "${t}"`);
|
|
1120
|
+
M.add(t);
|
|
1121
|
+
}
|
|
1122
|
+
if (e.focus !== !1 && e.focusRing !== !1 && C.length) for (let e of S) k.push({
|
|
1123
|
+
kind: "group",
|
|
1124
|
+
key: `default-focus:${e.markId}`,
|
|
1125
|
+
className: "ts-chart__focus-layer ts-chart__focus-layer--default",
|
|
1126
|
+
ariaHidden: !0,
|
|
1127
|
+
clip: e.clipped ? m : void 0,
|
|
1128
|
+
focus: {
|
|
1129
|
+
match: "primary",
|
|
1130
|
+
anchors: e.points,
|
|
1131
|
+
points: e.points,
|
|
1132
|
+
placement: "over"
|
|
1133
|
+
},
|
|
1134
|
+
children: e.points.map((e) => ({
|
|
1135
|
+
kind: "dot",
|
|
1136
|
+
key: e.key,
|
|
1137
|
+
x: e.x,
|
|
1138
|
+
y: e.y,
|
|
1139
|
+
radius: 5,
|
|
1140
|
+
style: {
|
|
1141
|
+
fill: "var(--ts-chart-focus-fill, Canvas)",
|
|
1142
|
+
stroke: e.color,
|
|
1143
|
+
strokeWidth: 2.5
|
|
1144
|
+
}
|
|
1145
|
+
}))
|
|
1146
|
+
});
|
|
1147
|
+
return {
|
|
1148
|
+
width: i,
|
|
1149
|
+
height: a,
|
|
1150
|
+
margin: p,
|
|
1151
|
+
chart: m,
|
|
1152
|
+
nodes: k,
|
|
1153
|
+
points: C,
|
|
1154
|
+
scales: h,
|
|
1155
|
+
colors: v,
|
|
1156
|
+
gradients: e.gradients ?? [],
|
|
1157
|
+
theme: c,
|
|
1158
|
+
...A.length ? { controls: A } : {},
|
|
1159
|
+
...E.length ? { focusGuides: E } : {},
|
|
1160
|
+
[st]: [e, l]
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
function J(e, t) {
|
|
1164
|
+
let n = e.viewport?.[t];
|
|
1165
|
+
return n ? n === "content" : Object.values(e.channels).some((e) => e.scale === t);
|
|
1166
|
+
}
|
|
1167
|
+
function pt(e, t, n, r) {
|
|
1168
|
+
return e.flatMap((e) => !e.viewportX && !e.viewportY ? [...e.nodes] : [{
|
|
1169
|
+
kind: "group",
|
|
1170
|
+
key: `viewport-clip:${e.key}`,
|
|
1171
|
+
className: "ts-chart__viewport-clip",
|
|
1172
|
+
clip: r,
|
|
1173
|
+
children: [{
|
|
1174
|
+
kind: "group",
|
|
1175
|
+
key: `viewport-content:${e.key}`,
|
|
1176
|
+
className: "ts-chart__viewport-content",
|
|
1177
|
+
...e.viewportX ? { translateX: t } : {},
|
|
1178
|
+
...e.viewportY ? { translateY: n } : {},
|
|
1179
|
+
children: e.nodes
|
|
1180
|
+
}]
|
|
1181
|
+
}]);
|
|
1182
|
+
}
|
|
1183
|
+
function mt(e, t, n, r = Infinity, i = e.points) {
|
|
1184
|
+
return Pe(e, t, n, r, i);
|
|
1185
|
+
}
|
|
1186
|
+
function ht(e, t = e.points) {
|
|
1187
|
+
if (!e.scales.x?.viewport && !e.scales.y?.viewport) return t;
|
|
1188
|
+
let { x: n, y: r, width: i, height: a } = e.chart, o = n + i, s = r + a, c = t.filter((t) => !gt(e, t) || t.x >= n && t.x <= o && t.y >= r && t.y <= s);
|
|
1189
|
+
return c.length === t.length ? t : c;
|
|
1190
|
+
}
|
|
1191
|
+
function gt(e, t) {
|
|
1192
|
+
let n = e[st]?.[1].find((e) => e.id === t.markId);
|
|
1193
|
+
return !n || !!(e.scales.x?.viewport && J(n, "x") || e.scales.y?.viewport && J(n, "y"));
|
|
1194
|
+
}
|
|
1195
|
+
function _t(e, t) {
|
|
1196
|
+
let n = t ? [...t] : [], r = new Set(n), i = (e) => {
|
|
1197
|
+
for (let t of e) {
|
|
1198
|
+
if (t.kind === "group") {
|
|
1199
|
+
t.focus || i(t.children);
|
|
1200
|
+
continue;
|
|
1201
|
+
}
|
|
1202
|
+
if (t.kind === "label" || !t.interaction) continue;
|
|
1203
|
+
let e = t.interaction;
|
|
1204
|
+
if (e.point) r.has(e.point) || (r.add(e.point), n.push(e.point));
|
|
1205
|
+
else for (let t of e.points) r.has(t) || (r.add(t), n.push(t));
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
return i(e), n;
|
|
1209
|
+
}
|
|
1210
|
+
function vt(e, t) {
|
|
1211
|
+
let n = [], r = !1, i = !1;
|
|
1212
|
+
for (let a of e) for (let e of Object.values(a.channels)) if (e.scale === t) {
|
|
1213
|
+
i = !0;
|
|
1214
|
+
for (let t of e.values) n.push(t);
|
|
1215
|
+
r ||= e.includeZero ?? !1;
|
|
1216
|
+
}
|
|
1217
|
+
return {
|
|
1218
|
+
values: n,
|
|
1219
|
+
includeZero: r,
|
|
1220
|
+
materialized: i
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
var Y = 4, yt = 4, bt = .25;
|
|
1224
|
+
function xt(e, t, n, r, i, a, o, s, c, l) {
|
|
1225
|
+
let u = wt(e.margin), d = Et(Ot(s ? Y : 0), u), f = d;
|
|
1226
|
+
for (let e = 0; e < yt; e += 1) {
|
|
1227
|
+
let e = h(d), t = g(e);
|
|
1228
|
+
if (f = Et(t, u, f), Dt(d, t)) return e;
|
|
1229
|
+
d = t;
|
|
1230
|
+
}
|
|
1231
|
+
let p = h(f), m = Et(g(p), u, f);
|
|
1232
|
+
return Dt(f, m) || (p = h(m)), p;
|
|
1233
|
+
function h(u) {
|
|
1234
|
+
let d = {
|
|
1235
|
+
x: u.left,
|
|
1236
|
+
y: u.top,
|
|
1237
|
+
width: Math.max(1, n - u.left - u.right),
|
|
1238
|
+
height: Math.max(1, r - u.top - u.bottom)
|
|
1239
|
+
}, f = Mt(e.x, d.width, 92, 8), p = Mt(e.y, d.height, 48, 7), m = {
|
|
1240
|
+
x: e.x == null ? kt("x", a.materialized, e.x) : c({
|
|
1241
|
+
id: "x",
|
|
1242
|
+
values: a.values,
|
|
1243
|
+
range: [d.x, d.x + d.width],
|
|
1244
|
+
options: e.x,
|
|
1245
|
+
tickCount: f,
|
|
1246
|
+
includeZero: a.includeZero
|
|
1247
|
+
}),
|
|
1248
|
+
y: e.y == null ? kt("y", o.materialized, e.y) : c({
|
|
1249
|
+
id: "y",
|
|
1250
|
+
values: o.values,
|
|
1251
|
+
range: [d.y + d.height, d.y],
|
|
1252
|
+
options: e.y,
|
|
1253
|
+
tickCount: p,
|
|
1254
|
+
includeZero: o.includeZero
|
|
1255
|
+
})
|
|
1256
|
+
}, h = St(t, {
|
|
1257
|
+
chart: d,
|
|
1258
|
+
scales: m,
|
|
1259
|
+
theme: i,
|
|
1260
|
+
layout: l
|
|
1261
|
+
}), g = w(vt(h, "color").values, e.color, i);
|
|
1262
|
+
if (g.kind !== "categorical" && h.some((e) => e.seriesFromColor)) throw TypeError("A continuous color channel cannot infer series identity; supply z explicitly");
|
|
1263
|
+
let _ = g.domain.length ? e.color?.legend : void 0;
|
|
1264
|
+
if (_?.seriesVisible && g.kind !== "categorical") throw TypeError("An interactive color legend requires a categorical color scale");
|
|
1265
|
+
let v = _?.height(g.domain.length, {
|
|
1266
|
+
colors: g,
|
|
1267
|
+
chart: d,
|
|
1268
|
+
bounds: {
|
|
1269
|
+
x: d.x,
|
|
1270
|
+
y: 0,
|
|
1271
|
+
width: d.width,
|
|
1272
|
+
height: 0
|
|
1273
|
+
},
|
|
1274
|
+
theme: i,
|
|
1275
|
+
width: n,
|
|
1276
|
+
height: r
|
|
1277
|
+
}), y = _ && v !== void 0 ? {
|
|
1278
|
+
x: d.x,
|
|
1279
|
+
y: _.placement === "bottom" ? r - v : 0,
|
|
1280
|
+
width: d.width,
|
|
1281
|
+
height: v
|
|
1282
|
+
} : void 0, b = jt(d, m, e, i, n, s, l.measureText);
|
|
1283
|
+
return {
|
|
1284
|
+
margin: u,
|
|
1285
|
+
chart: d,
|
|
1286
|
+
scales: m,
|
|
1287
|
+
axes: b.axes,
|
|
1288
|
+
guideMargin: b.margin,
|
|
1289
|
+
marks: h,
|
|
1290
|
+
colors: g,
|
|
1291
|
+
legend: _,
|
|
1292
|
+
legendBounds: y
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
function g(t) {
|
|
1296
|
+
let a = t.guideMargin;
|
|
1297
|
+
if (t.legend) {
|
|
1298
|
+
let e = t.legend.height(t.colors.domain.length, {
|
|
1299
|
+
colors: t.colors,
|
|
1300
|
+
chart: t.chart,
|
|
1301
|
+
bounds: {
|
|
1302
|
+
x: t.chart.x,
|
|
1303
|
+
y: 0,
|
|
1304
|
+
width: t.chart.width,
|
|
1305
|
+
height: 0
|
|
1306
|
+
},
|
|
1307
|
+
theme: i,
|
|
1308
|
+
width: n,
|
|
1309
|
+
height: r
|
|
1310
|
+
});
|
|
1311
|
+
t.legend.placement === "bottom" ? u.bottom === void 0 && (a.bottom += e) : u.top === void 0 && (a.top = Math.max(a.top, e));
|
|
1312
|
+
}
|
|
1313
|
+
return e.clip || t.marks.forEach((e, o) => {
|
|
1314
|
+
if (t.scales.x.viewport && J(e, "x") || t.scales.y.viewport && J(e, "y")) return;
|
|
1315
|
+
let s = e.layoutLabels?.({
|
|
1316
|
+
markIndex: o,
|
|
1317
|
+
surface: {
|
|
1318
|
+
x: 0,
|
|
1319
|
+
y: 0,
|
|
1320
|
+
width: n,
|
|
1321
|
+
height: r
|
|
1322
|
+
},
|
|
1323
|
+
chart: t.chart,
|
|
1324
|
+
scales: t.scales,
|
|
1325
|
+
theme: i,
|
|
1326
|
+
color: t.colors.map,
|
|
1327
|
+
colors: t.colors,
|
|
1328
|
+
layout: l
|
|
1329
|
+
});
|
|
1330
|
+
for (let e of s ?? []) Ct(a, t.chart, e, l.measureText);
|
|
1331
|
+
}), Et(a, u);
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
function St(e, t) {
|
|
1335
|
+
return e.map((e, n) => {
|
|
1336
|
+
if (typeof e.resolveLayout != "function") return e;
|
|
1337
|
+
let r = e.resolveLayout({
|
|
1338
|
+
...t,
|
|
1339
|
+
markIndex: n
|
|
1340
|
+
});
|
|
1341
|
+
return {
|
|
1342
|
+
id: e.id,
|
|
1343
|
+
channels: r.channels ?? e.channels,
|
|
1344
|
+
viewport: e.viewport,
|
|
1345
|
+
focusGuideOnly: e.focusGuideOnly,
|
|
1346
|
+
seriesFromColor: e.seriesFromColor,
|
|
1347
|
+
focus: e.focus,
|
|
1348
|
+
states: r.states ?? e.states,
|
|
1349
|
+
postDomain: r.postDomain ?? e.postDomain,
|
|
1350
|
+
layoutLabels: r.layoutLabels ?? e.layoutLabels,
|
|
1351
|
+
render: r.render
|
|
1352
|
+
};
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
function Ct(e, t, n, r) {
|
|
1356
|
+
let i = U(n, r);
|
|
1357
|
+
return n.text ? (e.top = Math.max(e.top, t.y - i.y + Y), e.right = Math.max(e.right, i.x + i.width - t.x - t.width + Y), e.bottom = Math.max(e.bottom, i.y + i.height - t.y - t.height + Y), e.left = Math.max(e.left, t.x - i.x + Y), i) : i;
|
|
1358
|
+
}
|
|
1359
|
+
function wt(e) {
|
|
1360
|
+
if (typeof e == "number") return Ot(X(e));
|
|
1361
|
+
if (!e) return {};
|
|
1362
|
+
let t = {};
|
|
1363
|
+
for (let n of Tt) e[n] !== void 0 && (t[n] = X(e[n]));
|
|
1364
|
+
return t;
|
|
1365
|
+
}
|
|
1366
|
+
var Tt = [
|
|
1367
|
+
"top",
|
|
1368
|
+
"right",
|
|
1369
|
+
"bottom",
|
|
1370
|
+
"left"
|
|
1371
|
+
];
|
|
1372
|
+
function Et(e, t, n) {
|
|
1373
|
+
let r = { ...e };
|
|
1374
|
+
for (let i of Tt) r[i] = t[i] ?? (n ? Math.max(n[i], e[i]) : e[i]);
|
|
1375
|
+
return r;
|
|
1376
|
+
}
|
|
1377
|
+
function Dt(e, t) {
|
|
1378
|
+
return Tt.every((n) => Math.abs(e[n] - t[n]) <= bt);
|
|
1379
|
+
}
|
|
1380
|
+
function X(e) {
|
|
1381
|
+
return e !== void 0 && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
1382
|
+
}
|
|
1383
|
+
function Ot(e) {
|
|
1384
|
+
return {
|
|
1385
|
+
top: e,
|
|
1386
|
+
right: e,
|
|
1387
|
+
bottom: e,
|
|
1388
|
+
left: e
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
function kt(e, t, n) {
|
|
1392
|
+
if (t) throw TypeError(n === null ? `Chart scale "${e}" cannot be null when a mark materializes its channel` : `Chart scale "${e}" requires a configured scale when a mark materializes its channel`);
|
|
1393
|
+
return {
|
|
1394
|
+
id: e,
|
|
1395
|
+
type: "none",
|
|
1396
|
+
domain: [],
|
|
1397
|
+
map: () => {
|
|
1398
|
+
throw TypeError(`Chart scale "${e}" is not configured`);
|
|
1399
|
+
},
|
|
1400
|
+
ticks: [],
|
|
1401
|
+
bandwidth: 0
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
function At(e, t, n, r) {
|
|
1405
|
+
let i = [];
|
|
1406
|
+
if (n.y?.grid) for (let n of t.y.ticks) i.push({
|
|
1407
|
+
kind: "rule",
|
|
1408
|
+
key: `y-grid:${M(n.value)}`,
|
|
1409
|
+
x1: e.x,
|
|
1410
|
+
x2: e.x + e.width,
|
|
1411
|
+
y1: n.position,
|
|
1412
|
+
y2: n.position
|
|
1413
|
+
});
|
|
1414
|
+
if (n.x?.grid) for (let n of t.x.ticks) i.push({
|
|
1415
|
+
kind: "rule",
|
|
1416
|
+
key: `x-grid:${M(n.value)}`,
|
|
1417
|
+
x1: n.position,
|
|
1418
|
+
x2: n.position,
|
|
1419
|
+
y1: e.y,
|
|
1420
|
+
y2: e.y + e.height
|
|
1421
|
+
});
|
|
1422
|
+
return {
|
|
1423
|
+
kind: "group",
|
|
1424
|
+
key: "grid",
|
|
1425
|
+
className: "ts-chart__grid",
|
|
1426
|
+
ariaHidden: !0,
|
|
1427
|
+
children: i,
|
|
1428
|
+
style: {
|
|
1429
|
+
stroke: r.grid,
|
|
1430
|
+
strokeOpacity: .11,
|
|
1431
|
+
strokeWidth: 1
|
|
1432
|
+
}
|
|
1433
|
+
};
|
|
1434
|
+
}
|
|
1435
|
+
function jt(e, t, n, r, i, a, o) {
|
|
1436
|
+
let s = a & 1, c = a & 2, l = Nt(n.x), u = Nt(n.y), d = !s || l?.line === !1 ? [] : [{
|
|
1437
|
+
kind: "rule",
|
|
1438
|
+
key: "x-axis",
|
|
1439
|
+
x1: e.x,
|
|
1440
|
+
x2: e.x + e.width,
|
|
1441
|
+
y1: e.y + e.height,
|
|
1442
|
+
y2: e.y + e.height,
|
|
1443
|
+
style: {
|
|
1444
|
+
stroke: r.foreground,
|
|
1445
|
+
strokeOpacity: .28
|
|
1446
|
+
}
|
|
1447
|
+
}];
|
|
1448
|
+
c && u?.line !== !1 && d.push({
|
|
1449
|
+
kind: "rule",
|
|
1450
|
+
key: "y-axis",
|
|
1451
|
+
x1: e.x,
|
|
1452
|
+
x2: e.x,
|
|
1453
|
+
y1: e.y,
|
|
1454
|
+
y2: e.y + e.height,
|
|
1455
|
+
style: {
|
|
1456
|
+
stroke: r.foreground,
|
|
1457
|
+
strokeOpacity: .28
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
let f = Pt(l), p = Pt(u), m = e.y + e.height, h = e.x, g = Ot(a ? Y : 0), _ = (t) => Ct(g, e, t, o), v = l?.ticks === !1 ? [] : t.x.ticks, y = u?.ticks === !1 ? [] : t.y.ticks, b = X(l?.ticks === !1 ? 0 : l?.ticks?.size ?? 4), x = X(u?.ticks === !1 ? 0 : u?.ticks?.size ?? 4), S = X(l?.ticks === !1 ? 0 : l?.ticks?.padding ?? 4), C = X(u?.ticks === !1 ? 0 : u?.ticks?.padding ?? 4), w = f === !1 ? [] : Rt("x", Lt(t.x, n.x, f), e, b, S, f, t.x.bandwidth, i, r, o), T = p === !1 ? [] : Rt("y", Lt(t.y, n.y, p), e, x, C, p, t.y.bandwidth, i, r, o), E = f === !1 ? [] : zt(w, f, t.x.type === "band"), D = p === !1 ? [] : zt(T, p, !1);
|
|
1461
|
+
for (let t of s ? v : []) {
|
|
1462
|
+
let n = M(t.value);
|
|
1463
|
+
b > 0 && d.push({
|
|
1464
|
+
kind: "rule",
|
|
1465
|
+
key: `x-tick-rule:${n}`,
|
|
1466
|
+
x1: t.position,
|
|
1467
|
+
x2: t.position,
|
|
1468
|
+
y1: e.y + e.height,
|
|
1469
|
+
y2: e.y + e.height + b,
|
|
1470
|
+
style: {
|
|
1471
|
+
stroke: r.foreground,
|
|
1472
|
+
strokeOpacity: .28
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
for (let e of s ? E : []) {
|
|
1477
|
+
let t = _(e.label);
|
|
1478
|
+
Ft(l) && It(l) === "auto" && (m = Math.max(m, t.y + t.height)), d.push(e.label);
|
|
1479
|
+
}
|
|
1480
|
+
for (let t of c ? y : []) {
|
|
1481
|
+
let n = M(t.value);
|
|
1482
|
+
x > 0 && d.push({
|
|
1483
|
+
kind: "rule",
|
|
1484
|
+
key: `y-tick-rule:${n}`,
|
|
1485
|
+
x1: e.x - x,
|
|
1486
|
+
x2: e.x,
|
|
1487
|
+
y1: t.position,
|
|
1488
|
+
y2: t.position,
|
|
1489
|
+
style: {
|
|
1490
|
+
stroke: r.foreground,
|
|
1491
|
+
strokeOpacity: .28
|
|
1492
|
+
}
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
for (let e of c ? D : []) {
|
|
1496
|
+
let t = _(e.label);
|
|
1497
|
+
Ft(u) && It(u) === "auto" && (h = Math.min(h, t.x)), d.push(e.label);
|
|
1498
|
+
}
|
|
1499
|
+
let O = Ft(l);
|
|
1500
|
+
if (s && O) {
|
|
1501
|
+
let t = It(l), n = t !== "auto", a = {
|
|
1502
|
+
kind: "label",
|
|
1503
|
+
key: "x-label",
|
|
1504
|
+
x: e.x + e.width / 2,
|
|
1505
|
+
y: n ? e.y + e.height + Math.max(0, X(t)) : m + 8,
|
|
1506
|
+
text: O,
|
|
1507
|
+
anchor: "middle",
|
|
1508
|
+
baseline: n ? "auto" : "hanging",
|
|
1509
|
+
fontSize: i < 360 ? 10 : 11,
|
|
1510
|
+
fontWeight: 600,
|
|
1511
|
+
style: {
|
|
1512
|
+
fill: r.foreground,
|
|
1513
|
+
fillOpacity: .76
|
|
1514
|
+
}
|
|
1515
|
+
};
|
|
1516
|
+
_(a), d.push(a);
|
|
1517
|
+
}
|
|
1518
|
+
let k = Ft(u);
|
|
1519
|
+
if (c && k) {
|
|
1520
|
+
let t = {
|
|
1521
|
+
kind: "label",
|
|
1522
|
+
key: "y-label",
|
|
1523
|
+
x: e.x,
|
|
1524
|
+
y: e.y + e.height / 2,
|
|
1525
|
+
text: k,
|
|
1526
|
+
anchor: "middle",
|
|
1527
|
+
baseline: "middle",
|
|
1528
|
+
rotate: -90,
|
|
1529
|
+
fontSize: 11,
|
|
1530
|
+
fontWeight: 600,
|
|
1531
|
+
style: {
|
|
1532
|
+
fill: r.foreground,
|
|
1533
|
+
fillOpacity: .76
|
|
1534
|
+
}
|
|
1535
|
+
}, n = It(u);
|
|
1536
|
+
if (n !== "auto") t.x = e.x - Math.max(0, X(n));
|
|
1537
|
+
else {
|
|
1538
|
+
let e = U({
|
|
1539
|
+
...t,
|
|
1540
|
+
x: 0,
|
|
1541
|
+
y: 0
|
|
1542
|
+
}, o);
|
|
1543
|
+
t.x = h - 8 - (e.x + e.width);
|
|
1544
|
+
}
|
|
1545
|
+
_(t), d.push(t);
|
|
1546
|
+
}
|
|
1547
|
+
return {
|
|
1548
|
+
axes: {
|
|
1549
|
+
kind: "group",
|
|
1550
|
+
key: "axes",
|
|
1551
|
+
className: "ts-chart__axes",
|
|
1552
|
+
ariaHidden: !0,
|
|
1553
|
+
children: d
|
|
1554
|
+
},
|
|
1555
|
+
margin: g
|
|
1556
|
+
};
|
|
1557
|
+
}
|
|
1558
|
+
function Mt(e, t, n, r) {
|
|
1559
|
+
let i = e?.axis === !1 ? void 0 : e?.axis?.ticks;
|
|
1560
|
+
if (i === !1) return Math.max(2, Math.min(r, Math.floor(t / n)));
|
|
1561
|
+
let a = i ?? {};
|
|
1562
|
+
if ([
|
|
1563
|
+
a.count !== void 0,
|
|
1564
|
+
a.spacing !== void 0,
|
|
1565
|
+
a.values !== void 0
|
|
1566
|
+
].filter(Boolean).length > 1) throw TypeError("Axis ticks accept only one candidate policy: count, spacing, or values");
|
|
1567
|
+
if (a.values) return Math.max(1, a.values.length);
|
|
1568
|
+
if (a.count !== void 0) return Math.max(1, Math.floor(X(a.count)));
|
|
1569
|
+
if (a.spacing !== void 0) {
|
|
1570
|
+
let e = Math.max(1, X(a.spacing));
|
|
1571
|
+
return Math.max(1, Math.floor(t / e));
|
|
1572
|
+
}
|
|
1573
|
+
return Math.max(2, Math.min(r, Math.floor(t / n)));
|
|
1574
|
+
}
|
|
1575
|
+
function Nt(e) {
|
|
1576
|
+
if (!(!e || e.axis === !1)) return e.axis ?? {};
|
|
1577
|
+
}
|
|
1578
|
+
function Pt(e) {
|
|
1579
|
+
return e?.ticks === !1 || e?.tickLabels === !1 ? !1 : e?.tickLabels ?? {};
|
|
1580
|
+
}
|
|
1581
|
+
function Ft(e) {
|
|
1582
|
+
return typeof e?.label == "string" ? e.label : e?.label?.text;
|
|
1583
|
+
}
|
|
1584
|
+
function It(e) {
|
|
1585
|
+
return typeof e?.label == "object" ? e.label.offset ?? "auto" : "auto";
|
|
1586
|
+
}
|
|
1587
|
+
function Lt(e, t, n) {
|
|
1588
|
+
let r = (typeof n.thin == "object" ? n.thin : void 0)?.keep ?? [];
|
|
1589
|
+
if (!r.length) return e.ticks;
|
|
1590
|
+
let i = t?.axis === !1 || t?.axis?.ticks === !1 ? void 0 : t?.axis?.ticks?.format, a = e.ticks.map((e) => ({
|
|
1591
|
+
...e,
|
|
1592
|
+
hard: r.some((t) => M(t) === M(e.value))
|
|
1593
|
+
})), o = new Set(a.map((e) => M(e.value)));
|
|
1594
|
+
for (let t of r) {
|
|
1595
|
+
let n = e.map(t);
|
|
1596
|
+
o.has(M(t)) || !Number.isFinite(n) || a.push({
|
|
1597
|
+
value: t,
|
|
1598
|
+
position: n,
|
|
1599
|
+
label: i?.(t) ?? Ut(t),
|
|
1600
|
+
hard: !0
|
|
1601
|
+
});
|
|
1602
|
+
}
|
|
1603
|
+
return a;
|
|
1604
|
+
}
|
|
1605
|
+
function Rt(e, t, n, r, i, a, o, s, c, l) {
|
|
1606
|
+
let u = s < 360 ? 10 : 11;
|
|
1607
|
+
return t.map((t, s) => {
|
|
1608
|
+
let d = {
|
|
1609
|
+
value: t.value,
|
|
1610
|
+
index: s,
|
|
1611
|
+
position: t.position,
|
|
1612
|
+
bandwidth: o
|
|
1613
|
+
}, f = a.rotate, p = Z(a.fontSize, d) ?? u, m = Z(a.fontWeight, d), h = Z(a.opacity, d), g = Z(a.dx, d) ?? 0, _ = Z(a.dy, d) ?? 0, v = e === "y" || (f ?? 0) < 0 ? "end" : (f ?? 0) > 0 ? "start" : "middle", y = Z(a.anchor, d) ?? v, b = e === "x" ? {
|
|
1614
|
+
kind: "label",
|
|
1615
|
+
key: `x-tick-label:${M(t.value)}`,
|
|
1616
|
+
x: t.position + g,
|
|
1617
|
+
y: n.y + n.height + r + i + p * .8 + _,
|
|
1618
|
+
text: t.label,
|
|
1619
|
+
anchor: y,
|
|
1620
|
+
rotate: f,
|
|
1621
|
+
fontSize: p,
|
|
1622
|
+
fontWeight: m,
|
|
1623
|
+
style: {
|
|
1624
|
+
fill: c.muted,
|
|
1625
|
+
...h === void 0 ? { fillOpacity: .68 } : { opacity: h }
|
|
1626
|
+
}
|
|
1627
|
+
} : {
|
|
1628
|
+
kind: "label",
|
|
1629
|
+
key: `y-tick-label:${M(t.value)}`,
|
|
1630
|
+
x: n.x - r - i + g,
|
|
1631
|
+
y: t.position + _,
|
|
1632
|
+
text: t.label,
|
|
1633
|
+
anchor: y,
|
|
1634
|
+
baseline: "middle",
|
|
1635
|
+
rotate: f,
|
|
1636
|
+
fontSize: p,
|
|
1637
|
+
fontWeight: m,
|
|
1638
|
+
style: {
|
|
1639
|
+
fill: c.muted,
|
|
1640
|
+
...h === void 0 ? { fillOpacity: .68 } : { opacity: h }
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
return {
|
|
1644
|
+
value: t.value,
|
|
1645
|
+
label: b,
|
|
1646
|
+
bounds: U(b, l),
|
|
1647
|
+
hard: t.hard ?? !1
|
|
1648
|
+
};
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
function Z(e, t) {
|
|
1652
|
+
return typeof e == "function" ? e(t) : e;
|
|
1653
|
+
}
|
|
1654
|
+
function zt(e, t, n) {
|
|
1655
|
+
if (t.thin === !1 || e.length < 2) return [...e];
|
|
1656
|
+
let r = typeof t.thin == "object" ? t.thin : {}, i = Math.max(0, X(r.minGap ?? 4)), a = e.filter((e) => e.hard), o = e.filter((e) => !e.hard);
|
|
1657
|
+
if ((r.priority === "ends" || n) && o.length) {
|
|
1658
|
+
let e = o[0], t = o.at(-1);
|
|
1659
|
+
Vt(e, a, i) || a.push(e), t !== e && !Vt(t, a, i) && a.push(t);
|
|
1660
|
+
}
|
|
1661
|
+
let s = Bt(o.filter((e) => !a.includes(e)));
|
|
1662
|
+
for (let e of s) Vt(e, a, i) || a.push(e);
|
|
1663
|
+
let c = new Set(a);
|
|
1664
|
+
return e.filter((e) => c.has(e));
|
|
1665
|
+
}
|
|
1666
|
+
function Bt(e) {
|
|
1667
|
+
if (e.length < 3) return [...e];
|
|
1668
|
+
let t = [], n = [e];
|
|
1669
|
+
for (; n.length;) {
|
|
1670
|
+
let e = n.shift();
|
|
1671
|
+
if (!e.length) continue;
|
|
1672
|
+
let r = Math.floor(e.length / 2);
|
|
1673
|
+
t.push(e[r]), n.push(e.slice(0, r), e.slice(r + 1));
|
|
1674
|
+
}
|
|
1675
|
+
return t;
|
|
1676
|
+
}
|
|
1677
|
+
function Vt(e, t, n) {
|
|
1678
|
+
return t.some((t) => Ht(e.bounds, t.bounds, n));
|
|
1679
|
+
}
|
|
1680
|
+
function Ht(e, t, n) {
|
|
1681
|
+
return !(e.x + e.width + n <= t.x || t.x + t.width + n <= e.x || e.y + e.height + n <= t.y || t.y + t.height + n <= e.y);
|
|
1682
|
+
}
|
|
1683
|
+
function Ut(e) {
|
|
1684
|
+
return e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
1685
|
+
}
|
|
1686
|
+
function Wt(e) {
|
|
1687
|
+
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
1688
|
+
}
|
|
1689
|
+
//#endregion
|
|
1690
|
+
//#region node_modules/@tanstack/charts/dist/runtime.js
|
|
1691
|
+
function Gt(e = {}) {
|
|
1692
|
+
let t = {
|
|
1693
|
+
...ct,
|
|
1694
|
+
...e.defaultTheme,
|
|
1695
|
+
palette: e.defaultTheme?.palette ?? ct.palette
|
|
1696
|
+
};
|
|
1697
|
+
return {
|
|
1698
|
+
render(e, n, r) {
|
|
1699
|
+
if (!Kt(e)) return ut(e, n, {
|
|
1700
|
+
...r,
|
|
1701
|
+
defaultTheme: t
|
|
1702
|
+
});
|
|
1703
|
+
let { chart: i, ...a } = e;
|
|
1704
|
+
return ut({
|
|
1705
|
+
...i({
|
|
1706
|
+
width: n.width,
|
|
1707
|
+
height: n.height,
|
|
1708
|
+
defaultTheme: t
|
|
1709
|
+
}),
|
|
1710
|
+
...a
|
|
1711
|
+
}, n, {
|
|
1712
|
+
...r,
|
|
1713
|
+
defaultTheme: t
|
|
1714
|
+
});
|
|
1715
|
+
},
|
|
1716
|
+
destroy() {}
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
function Kt(e) {
|
|
1720
|
+
return "chart" in e && typeof e.chart == "function";
|
|
1721
|
+
}
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region node_modules/@tanstack/charts/dist/adapter-shared.js
|
|
1724
|
+
function qt(e, t = 0) {
|
|
1725
|
+
return e.keyboard === !1 || e.focus === !1 || e.cursor?.mode === "free" ? -1 : t;
|
|
1726
|
+
}
|
|
1727
|
+
//#endregion
|
|
1728
|
+
//#region node_modules/@tanstack/charts/dist/dom-text.js
|
|
1729
|
+
function Jt(e) {
|
|
1730
|
+
let t = e.ownerDocument.defaultView, n = t?.CanvasRenderingContext2D ? e.ownerDocument.createElement("canvas").getContext("2d") : null, r = o(), i = Zt(r), a = /* @__PURE__ */ new Map();
|
|
1731
|
+
return {
|
|
1732
|
+
measureText(e, t) {
|
|
1733
|
+
if (!n) return H(e, t);
|
|
1734
|
+
let o = `${i}\0${t.fontSize}\0${t.fontWeight ?? ""}\0${t.fontFamily}\0${t.fontStyle}\0${t.fontStretch}\0${t.letterSpacing}\0${t.direction}\0${t.locale ?? ""}\0${t.fontScale}\0${t.anchor}\0${t.baseline}\0${e}`, s = a.get(o);
|
|
1735
|
+
if (s) return s;
|
|
1736
|
+
Yt(n, r.weight, t);
|
|
1737
|
+
let c = Xt(n.measureText(e), t);
|
|
1738
|
+
return a.set(o, c), c;
|
|
1739
|
+
},
|
|
1740
|
+
typography() {
|
|
1741
|
+
return {
|
|
1742
|
+
fontFamily: r.family,
|
|
1743
|
+
fontStyle: r.style,
|
|
1744
|
+
fontStretch: r.stretch,
|
|
1745
|
+
letterSpacing: r.letterSpacing,
|
|
1746
|
+
direction: r.direction
|
|
1747
|
+
};
|
|
1748
|
+
},
|
|
1749
|
+
refresh() {
|
|
1750
|
+
let e = o(), t = Zt(e);
|
|
1751
|
+
return t !== i && (r = e, i = t, a.clear(), !0);
|
|
1752
|
+
},
|
|
1753
|
+
invalidate() {
|
|
1754
|
+
a.clear();
|
|
1755
|
+
}
|
|
1756
|
+
};
|
|
1757
|
+
function o() {
|
|
1758
|
+
let n = t?.getComputedStyle(e);
|
|
1759
|
+
return {
|
|
1760
|
+
family: n?.fontFamily || "sans-serif",
|
|
1761
|
+
style: n?.fontStyle || "normal",
|
|
1762
|
+
stretch: Qt(n?.fontStretch),
|
|
1763
|
+
weight: n?.fontWeight || "400",
|
|
1764
|
+
direction: n?.direction === "rtl" ? "rtl" : n?.direction === "ltr" ? "ltr" : "inherit",
|
|
1765
|
+
letterSpacing: $t(n?.letterSpacing)
|
|
1766
|
+
};
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
function Yt(e, t, n) {
|
|
1770
|
+
let r = en(n.fontScale, 1), i = n.fontSize * r, a = n.fontWeight ?? t;
|
|
1771
|
+
e.font = [
|
|
1772
|
+
n.fontStyle,
|
|
1773
|
+
a,
|
|
1774
|
+
`${i}px`,
|
|
1775
|
+
n.fontFamily
|
|
1776
|
+
].join(" "), "fontStretch" in e && (e.fontStretch = Qt(n.fontStretch)), e.textAlign = n.anchor === "middle" ? "center" : n.anchor, e.textBaseline = n.baseline === "auto" ? "alphabetic" : n.baseline, e.direction = n.direction, "letterSpacing" in e && (e.letterSpacing = `${n.letterSpacing * r}px`);
|
|
1777
|
+
}
|
|
1778
|
+
function Xt(e, t) {
|
|
1779
|
+
let n = t.fontSize * en(t.fontScale, 1), r = e.actualBoundingBoxLeft, i = e.actualBoundingBoxRight, a = e.actualBoundingBoxAscent, o = e.actualBoundingBoxDescent;
|
|
1780
|
+
if ([
|
|
1781
|
+
r,
|
|
1782
|
+
i,
|
|
1783
|
+
a,
|
|
1784
|
+
o
|
|
1785
|
+
].every((e) => Number.isFinite(e)) && (r + i > 0 || e.width === 0) && (a + o > 0 || e.width === 0)) return {
|
|
1786
|
+
x: -r,
|
|
1787
|
+
y: -a,
|
|
1788
|
+
width: r + i,
|
|
1789
|
+
height: a + o
|
|
1790
|
+
};
|
|
1791
|
+
let s = Number.isFinite(e.width) ? Math.max(0, e.width) : 0;
|
|
1792
|
+
return {
|
|
1793
|
+
x: t.anchor === "middle" ? -s / 2 : t.anchor === "end" ? -s : 0,
|
|
1794
|
+
y: t.baseline === "middle" ? -n / 2 : t.baseline === "hanging" ? 0 : -n * .8,
|
|
1795
|
+
width: s,
|
|
1796
|
+
height: n
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
function Zt(e) {
|
|
1800
|
+
return [
|
|
1801
|
+
e.family,
|
|
1802
|
+
e.style,
|
|
1803
|
+
e.stretch,
|
|
1804
|
+
e.weight,
|
|
1805
|
+
e.direction,
|
|
1806
|
+
e.letterSpacing
|
|
1807
|
+
].join("\0");
|
|
1808
|
+
}
|
|
1809
|
+
function Qt(e) {
|
|
1810
|
+
if (e === "ultra-condensed" || e === "extra-condensed" || e === "condensed" || e === "semi-condensed" || e === "normal" || e === "semi-expanded" || e === "expanded" || e === "extra-expanded" || e === "ultra-expanded") return e;
|
|
1811
|
+
let t = Number.parseFloat(e ?? "");
|
|
1812
|
+
return Number.isFinite(t) ? t <= 50 ? "ultra-condensed" : t <= 62.5 ? "extra-condensed" : t <= 75 ? "condensed" : t <= 87.5 ? "semi-condensed" : t < 112.5 ? "normal" : t < 125 ? "semi-expanded" : t < 150 ? "expanded" : t < 200 ? "extra-expanded" : "ultra-expanded" : "normal";
|
|
1813
|
+
}
|
|
1814
|
+
function $t(e) {
|
|
1815
|
+
let t = Number.parseFloat(e ?? "");
|
|
1816
|
+
return Number.isFinite(t) ? t : 0;
|
|
1817
|
+
}
|
|
1818
|
+
function en(e, t) {
|
|
1819
|
+
return e !== void 0 && Number.isFinite(e) && e > 0 ? e : t;
|
|
1820
|
+
}
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region node_modules/@tanstack/charts/dist/focus-disabled.js
|
|
1823
|
+
var tn = {
|
|
1824
|
+
resolve: () => [],
|
|
1825
|
+
group: () => [],
|
|
1826
|
+
navigation: () => []
|
|
1827
|
+
}, nn = sn("x", !0), rn = sn("y", !0), an = sn("x", !1), on = sn("y", !1);
|
|
1828
|
+
function sn(e, t) {
|
|
1829
|
+
let n = (t) => e === "x" ? t.x : t.y, r = (t) => e === "x" ? t.xValue : t.yValue, i = (t) => e === "x" ? t.y : t.x;
|
|
1830
|
+
return {
|
|
1831
|
+
resolve(a, o) {
|
|
1832
|
+
let { x: s, y: c, maxDistance: l } = o, u = e === "x" ? s : c, d, f = l;
|
|
1833
|
+
for (let e of a) {
|
|
1834
|
+
let t = Math.abs(n(e) - u);
|
|
1835
|
+
t >= f || (d = e, f = t);
|
|
1836
|
+
}
|
|
1837
|
+
if (!d) return [];
|
|
1838
|
+
let p = cn(a, d, r), m = e === "x" ? c : s, h = p.reduce((e, t) => Math.abs(i(t) - m) < Math.abs(i(e) - m) ? t : e, d);
|
|
1839
|
+
return t ? [h, ...p.filter((e) => e !== h)] : [h];
|
|
1840
|
+
},
|
|
1841
|
+
group(e, n) {
|
|
1842
|
+
let { point: i } = n;
|
|
1843
|
+
return t ? cn(e, i, r) : [i];
|
|
1844
|
+
},
|
|
1845
|
+
navigation(e) {
|
|
1846
|
+
let n = [...e].sort((e, t) => e.x - t.x || e.y - t.y);
|
|
1847
|
+
if (!t) return n;
|
|
1848
|
+
let i = /* @__PURE__ */ new Map();
|
|
1849
|
+
for (let e of n) {
|
|
1850
|
+
let t = M(r(e));
|
|
1851
|
+
i.has(t) || i.set(t, e);
|
|
1852
|
+
}
|
|
1853
|
+
return [...i.values()];
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
function cn(e, t, n) {
|
|
1858
|
+
let r = M(n(t)), i = /* @__PURE__ */ new Map();
|
|
1859
|
+
i.set(M(t.group), t);
|
|
1860
|
+
for (let t of e) {
|
|
1861
|
+
if (M(n(t)) !== r) continue;
|
|
1862
|
+
let e = M(t.group);
|
|
1863
|
+
i.has(e) || i.set(e, t);
|
|
1864
|
+
}
|
|
1865
|
+
return [t, ...[...i.values()].sort((e, t) => e.y - t.y).filter((e) => e !== t)];
|
|
1866
|
+
}
|
|
1867
|
+
//#endregion
|
|
1868
|
+
//#region node_modules/@tanstack/charts/dist/interaction.js
|
|
1869
|
+
function ln(e) {
|
|
1870
|
+
if (e !== !1) {
|
|
1871
|
+
if (typeof e != "string") return e;
|
|
1872
|
+
switch (e) {
|
|
1873
|
+
case "nearest-x": return an;
|
|
1874
|
+
case "nearest-y": return on;
|
|
1875
|
+
case "group-x": return nn;
|
|
1876
|
+
case "group-y": return rn;
|
|
1877
|
+
case "nearest": return;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
function un(e, t, n, r, i, a = e.points) {
|
|
1882
|
+
let o = ln(t);
|
|
1883
|
+
if (o) {
|
|
1884
|
+
if (a === e.points && (o === an || o === on || o === nn || o === rn)) {
|
|
1885
|
+
let t = Fe(e, n, r);
|
|
1886
|
+
if (t) return t.point ? o.group(a, { point: t.point }) : [];
|
|
1887
|
+
}
|
|
1888
|
+
return o.resolve(a, {
|
|
1889
|
+
x: n,
|
|
1890
|
+
y: r,
|
|
1891
|
+
maxDistance: i
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
function dn(e, t) {
|
|
1896
|
+
return e === t || e !== null && t !== null && e.key === t.key && e.markId === t.markId && e.datumIndex === t.datumIndex;
|
|
1897
|
+
}
|
|
1898
|
+
function fn(e, t) {
|
|
1899
|
+
let n = e.filter((e) => e.key === t.key);
|
|
1900
|
+
if (n.length < 2) return n[0] ?? null;
|
|
1901
|
+
let r = typeof t.datum;
|
|
1902
|
+
if (t.datum !== null && (r === "object" || r === "function")) {
|
|
1903
|
+
let e = n.find((e) => e.datum === t.datum);
|
|
1904
|
+
if (e) return e;
|
|
1905
|
+
}
|
|
1906
|
+
return n.find((e) => e.markId === t.markId && Object.is(e.group, t.group) && _n(e.xValue, t.xValue) && _n(e.yValue, t.yValue)) ?? n.find((e) => e.markId === t.markId && e.datumIndex === t.datumIndex) ?? n[0] ?? null;
|
|
1907
|
+
}
|
|
1908
|
+
function pn(e, t, n) {
|
|
1909
|
+
let r = t ? e.findIndex((e) => dn(e, t)) : -1, i;
|
|
1910
|
+
switch (n) {
|
|
1911
|
+
case "ArrowRight":
|
|
1912
|
+
case "ArrowDown":
|
|
1913
|
+
i = Math.min(e.length - 1, r + 1);
|
|
1914
|
+
break;
|
|
1915
|
+
case "ArrowLeft":
|
|
1916
|
+
case "ArrowUp":
|
|
1917
|
+
i = Math.max(0, r < 0 ? 0 : r - 1);
|
|
1918
|
+
break;
|
|
1919
|
+
case "Home":
|
|
1920
|
+
i = 0;
|
|
1921
|
+
break;
|
|
1922
|
+
case "End":
|
|
1923
|
+
i = e.length - 1;
|
|
1924
|
+
break;
|
|
1925
|
+
default: return;
|
|
1926
|
+
}
|
|
1927
|
+
return e[i] ?? null;
|
|
1928
|
+
}
|
|
1929
|
+
function mn(e, t, n) {
|
|
1930
|
+
let r = n === "ArrowRight" || n === "ArrowDown" ? 1 : n === "ArrowLeft" || n === "ArrowUp" ? -1 : n === "Home" ? 0 : n === "End" ? 2 : void 0;
|
|
1931
|
+
if (r === void 0) return;
|
|
1932
|
+
if (!e.length) return null;
|
|
1933
|
+
let i = t ? e.findIndex((e) => dn(e, t)) : -1;
|
|
1934
|
+
if (!t || i < 0 || r === 0 || r === 2) return hn(e, r === 2);
|
|
1935
|
+
let a = null, o = -1;
|
|
1936
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
1937
|
+
let s = e[n];
|
|
1938
|
+
if (!s) continue;
|
|
1939
|
+
let c = gn(s, n, t, i);
|
|
1940
|
+
r > 0 && c <= 0 || r < 0 && c >= 0 || (!a || r * gn(s, n, a, o) < 0) && (a = s, o = n);
|
|
1941
|
+
}
|
|
1942
|
+
return a ?? t;
|
|
1943
|
+
}
|
|
1944
|
+
function hn(e, t) {
|
|
1945
|
+
let n = e[0] ?? null, r = 0;
|
|
1946
|
+
for (let i = 1; i < e.length; i += 1) {
|
|
1947
|
+
let a = e[i];
|
|
1948
|
+
if (!a || !n) continue;
|
|
1949
|
+
let o = gn(a, i, n, r);
|
|
1950
|
+
(t && o > 0 || !t && o < 0) && (n = a, r = i);
|
|
1951
|
+
}
|
|
1952
|
+
return n;
|
|
1953
|
+
}
|
|
1954
|
+
function gn(e, t, n, r) {
|
|
1955
|
+
return e.x - n.x || e.y - n.y || t - r;
|
|
1956
|
+
}
|
|
1957
|
+
function _n(e, t) {
|
|
1958
|
+
return e instanceof Date && t instanceof Date ? e.getTime() === t.getTime() : Object.is(e, t);
|
|
1959
|
+
}
|
|
1960
|
+
//#endregion
|
|
1961
|
+
//#region node_modules/@tanstack/charts/dist/cursor-host-contract.js
|
|
1962
|
+
function vn(e) {
|
|
1963
|
+
let t = e.use;
|
|
1964
|
+
if (t.__chartExtensionType !== "cursor") throw TypeError("A chart cursor requires a cursor host extension.");
|
|
1965
|
+
return t.create(e.controller);
|
|
1966
|
+
}
|
|
1967
|
+
//#endregion
|
|
1968
|
+
//#region node_modules/@tanstack/charts/dist/renderer.js
|
|
1969
|
+
function yn(e, t, n = Gt()) {
|
|
1970
|
+
Cn(t.definition.tooltip);
|
|
1971
|
+
let r = t, i, a, o = null, s = "pointer", c = null, l = null, u = null, d, f, p = !1, m, h = !1, g = !1, _, v, y = !1, b = !1, x, S, C = !1, w, T = /* @__PURE__ */ new Map(), E, D, O, k, A, j, M = null, ee = !1, N = e.style.position, P = e.ownerDocument.defaultView, te = P?.getComputedStyle(e).position, ne = !te || te === "static", F = Jt(e), re = e.ownerDocument.fonts;
|
|
1972
|
+
ne && (e.style.position = "relative");
|
|
1973
|
+
let I = (t = !1, n = "update") => {
|
|
1974
|
+
if (h) return;
|
|
1975
|
+
t && !r.measureText && F.refresh();
|
|
1976
|
+
let d = o, f = M, p = A;
|
|
1977
|
+
i = xn(Te()), a = i, _ ? _.renderer !== r.renderer && (v?.(), v = void 0, G(), De(), _.destroy(), e.replaceChildren(), _ = r.renderer.mount(e, oe), ke(), g = !1) : (_ = r.renderer.mount(e, oe), ke()), y = !0;
|
|
1978
|
+
try {
|
|
1979
|
+
_.render(i, {
|
|
1980
|
+
ariaLabel: r.ariaLabel,
|
|
1981
|
+
ariaDescription: r.ariaDescription,
|
|
1982
|
+
className: r.className,
|
|
1983
|
+
tabIndex: qt(r.definition, r.tabIndex),
|
|
1984
|
+
idPrefix: r.idPrefix,
|
|
1985
|
+
animation: g ? Dn(r.definition.svgAnimation, e, n) : void 0
|
|
1986
|
+
});
|
|
1987
|
+
} finally {
|
|
1988
|
+
y = !1;
|
|
1989
|
+
}
|
|
1990
|
+
Ee(), g = !0;
|
|
1991
|
+
let m = H();
|
|
1992
|
+
w = r.definition.focus === !1 ? void 0 : r.definition.spatialIndex?.(ht(i, i.points), { scene: i });
|
|
1993
|
+
let b = L();
|
|
1994
|
+
if (A = b, b) ue(!0);
|
|
1995
|
+
else if (p) M = null, o = null, u = null, l = null, c = null, B(null, []), d && (r.onFocusChange?.(null), r.onFocusGroupChange?.([]));
|
|
1996
|
+
else {
|
|
1997
|
+
M = null;
|
|
1998
|
+
let e = (c === "pointer" || c === "controlled" && s === "pointer") && u === null ? l : null, t = e ? V(e.x, e.y, je()) : d ? (() => {
|
|
1999
|
+
let e = fn(m, d);
|
|
2000
|
+
return e ? U(e, m) : [];
|
|
2001
|
+
})() : [], n = t[0] ?? null;
|
|
2002
|
+
o = n, n || (u = null), (d || n || f) && (e || (s = "restored"), B(n, t), r.onFocusChange?.(n), r.onFocusGroupChange?.(t));
|
|
2003
|
+
}
|
|
2004
|
+
let x = r.onRender;
|
|
2005
|
+
x && x({
|
|
2006
|
+
container: e,
|
|
2007
|
+
scene: i,
|
|
2008
|
+
surface: _,
|
|
2009
|
+
interaction: he
|
|
2010
|
+
});
|
|
2011
|
+
}, ie = () => {
|
|
2012
|
+
let t = r.width ?? e.getBoundingClientRect().width;
|
|
2013
|
+
return r.width !== void 0 || t > 0 ? t : void 0;
|
|
2014
|
+
}, ae = () => {
|
|
2015
|
+
if (d?.disconnect(), d = void 0, r.width !== void 0) return;
|
|
2016
|
+
let t = P?.ResizeObserver;
|
|
2017
|
+
t && (d = new t(() => {
|
|
2018
|
+
let e = ie();
|
|
2019
|
+
e !== void 0 && e !== i.width && oe(!1, "resize");
|
|
2020
|
+
}), d.observe(e));
|
|
2021
|
+
}, oe = (e = !1, t = "layout") => {
|
|
2022
|
+
if (p ||= e, m = m === "layout" || t === "layout" ? "layout" : "resize", f === void 0) {
|
|
2023
|
+
if (!P?.requestAnimationFrame) {
|
|
2024
|
+
let e = ie(), t = p || e !== void 0 && e !== i.width;
|
|
2025
|
+
p = !1;
|
|
2026
|
+
let n = m ?? "layout";
|
|
2027
|
+
m = void 0, t && I(!0, n);
|
|
2028
|
+
return;
|
|
2029
|
+
}
|
|
2030
|
+
f = P.requestAnimationFrame(() => {
|
|
2031
|
+
f = void 0;
|
|
2032
|
+
let e = ie(), t = p || e !== void 0 && e !== i.width;
|
|
2033
|
+
p = !1;
|
|
2034
|
+
let n = m ?? "layout";
|
|
2035
|
+
m = void 0, t && I(!0, n);
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
}, se = () => {
|
|
2039
|
+
h || r.measureText || (F.invalidate(), oe(!0));
|
|
2040
|
+
}, L = () => r.definition.cursor, ce = () => E?.getState()?.pinned === !0, R = () => u !== null || ce(), le = () => {
|
|
2041
|
+
let e = L();
|
|
2042
|
+
e && (ee = !0);
|
|
2043
|
+
let t = e?.controller, n = e?.mode, r = e?.mode === "focus" ? e.match ?? "xy" : void 0;
|
|
2044
|
+
(t !== E?.controller || n !== D || r !== O || e?.use !== k) && (j?.(), j = void 0, E?.destroy(), E = e ? vn(e) : void 0, D = n, O = r, k = e?.use, j = E?.subscribe(() => {
|
|
2045
|
+
!h && g && ue(!1);
|
|
2046
|
+
}));
|
|
2047
|
+
}, ue = (e) => {
|
|
2048
|
+
let t = L();
|
|
2049
|
+
if (!t) {
|
|
2050
|
+
M = null;
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
let n = E;
|
|
2054
|
+
if (!n) return;
|
|
2055
|
+
let a = n.getState();
|
|
2056
|
+
(a?.source !== "pointer" || !n.owns(a)) && (l = null), M = n.resolvePresentation(i, t, a);
|
|
2057
|
+
let c = o;
|
|
2058
|
+
if (t.mode === "focus") {
|
|
2059
|
+
let i = ln(r.definition.focus), l = n.resolveFocus(H(), t, a, i), d = l[0] ?? null;
|
|
2060
|
+
a && (s = a.source), u = a?.pinned && d ? d.key : null, o = d, B(d, l), (!dn(c, d) || e && (c !== null || d !== null)) && (r.onFocusChange?.(d), r.onFocusGroupChange?.(l));
|
|
2061
|
+
return;
|
|
2062
|
+
}
|
|
2063
|
+
u = null, o = null, B(null, []), c && (r.onFocusChange?.(null), r.onFocusGroupChange?.([]));
|
|
2064
|
+
}, de = (e, t = R()) => {
|
|
2065
|
+
let n = L();
|
|
2066
|
+
if (n?.mode !== "focus") return !1;
|
|
2067
|
+
let r = E;
|
|
2068
|
+
if (!r) return !1;
|
|
2069
|
+
let a = e[0];
|
|
2070
|
+
return a ? (r.publish(r.createFocusState(i, n, {
|
|
2071
|
+
primary: a,
|
|
2072
|
+
group: e,
|
|
2073
|
+
source: s,
|
|
2074
|
+
pinned: t
|
|
2075
|
+
})), !0) : (r.clearOwnedTransient(), !0);
|
|
2076
|
+
}, z = (e, t = !1) => {
|
|
2077
|
+
let n = e[0] ?? null;
|
|
2078
|
+
if (!de(e)) {
|
|
2079
|
+
if (dn(n, o)) {
|
|
2080
|
+
o = n, t && B(n, e);
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
o = n, B(n, e), r.onFocusChange?.(n), r.onFocusGroupChange?.(e);
|
|
2084
|
+
}
|
|
2085
|
+
}, fe = () => {
|
|
2086
|
+
let t = L();
|
|
2087
|
+
if (!o && !u && !E?.getState()) return;
|
|
2088
|
+
let n = !!S?.contains(e.ownerDocument.activeElement);
|
|
2089
|
+
u = null, l = null, c = null, t ? E?.clear() : z([]);
|
|
2090
|
+
let r = _?.element;
|
|
2091
|
+
n && r && "focus" in r && typeof r.focus == "function" && (C = !0, r.focus());
|
|
2092
|
+
}, B = (e, t) => {
|
|
2093
|
+
b = !0;
|
|
2094
|
+
let n;
|
|
2095
|
+
try {
|
|
2096
|
+
let r = e ? {
|
|
2097
|
+
primary: e,
|
|
2098
|
+
group: t,
|
|
2099
|
+
source: s,
|
|
2100
|
+
pinned: R()
|
|
2101
|
+
} : null;
|
|
2102
|
+
n = ee ? _?.paintFocus(r, l, M) : _?.paintFocus(r, l);
|
|
2103
|
+
} finally {
|
|
2104
|
+
b = !1;
|
|
2105
|
+
}
|
|
2106
|
+
a = n ?? i, W(e, t);
|
|
2107
|
+
}, pe = (e, t) => {
|
|
2108
|
+
let n = _?.clientToScene?.(i, e, t);
|
|
2109
|
+
return n ? {
|
|
2110
|
+
position: n,
|
|
2111
|
+
points: V(n.x, n.y, je())
|
|
2112
|
+
} : null;
|
|
2113
|
+
}, me = (e, t) => {
|
|
2114
|
+
let n = pe(e, t);
|
|
2115
|
+
return l = n?.position ?? null, n?.points ?? [];
|
|
2116
|
+
}, he = {
|
|
2117
|
+
clientToScene(e, t) {
|
|
2118
|
+
return h ? null : _?.clientToScene?.(i, e, t) ?? null;
|
|
2119
|
+
},
|
|
2120
|
+
resolvePointer(e, t) {
|
|
2121
|
+
if (h) return null;
|
|
2122
|
+
let n = pe(e, t), r = n?.points[0];
|
|
2123
|
+
return n && r ? {
|
|
2124
|
+
position: n.position,
|
|
2125
|
+
point: r,
|
|
2126
|
+
points: n.points
|
|
2127
|
+
} : null;
|
|
2128
|
+
},
|
|
2129
|
+
setControlledFocus(e, t = {}) {
|
|
2130
|
+
if (h) return;
|
|
2131
|
+
if (c = "controlled", !e) {
|
|
2132
|
+
s = t.source ?? "programmatic", l = null, u = null, z([]), c = null;
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2135
|
+
let n, r;
|
|
2136
|
+
Sn(e) ? (n = e, r = e.point) : (n = null, r = e), s = t.source ?? (n === null ? "programmatic" : "pointer");
|
|
2137
|
+
let i = H(), a = fn(i, r);
|
|
2138
|
+
if (l = n?.position ?? null, !a) {
|
|
2139
|
+
u = null, z([]), c = null;
|
|
2140
|
+
return;
|
|
2141
|
+
}
|
|
2142
|
+
let d = U(a, i);
|
|
2143
|
+
if (u = t.pinned && (K() || L()?.pin === !0) ? a.key : null, dn(a, o)) {
|
|
2144
|
+
o = a, B(a, d);
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
z(d);
|
|
2148
|
+
}
|
|
2149
|
+
}, ge = (e, t) => {
|
|
2150
|
+
let n = _?.clientToScene?.(i, e, t);
|
|
2151
|
+
return l = n ?? null, n;
|
|
2152
|
+
}, _e = (e, t) => {
|
|
2153
|
+
let n = L();
|
|
2154
|
+
if (n?.mode !== "free") return !1;
|
|
2155
|
+
if (ce()) return !0;
|
|
2156
|
+
let r = ge(e, t);
|
|
2157
|
+
if (!r || !En(i, r)) return l = null, E?.clearOwnedTransient(), !0;
|
|
2158
|
+
let a = E;
|
|
2159
|
+
return a ? (a.publish(a.createFreeState(i, n, r, "pointer", !1)), !0) : !1;
|
|
2160
|
+
}, ve = (e) => {
|
|
2161
|
+
if (Oe(e.target)) {
|
|
2162
|
+
R() || (l = null, z([]));
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2165
|
+
r.definition.pointer === !1 || R() || (c = "pointer", s = "pointer", !_e(e.clientX, e.clientY) && z(me(e.clientX, e.clientY), Pe()));
|
|
2166
|
+
}, ye = (e) => {
|
|
2167
|
+
r.definition.pointer === !1 || R() || (c = "pointer", s = "pointer", _e(e.clientX, e.clientY));
|
|
2168
|
+
}, be = ({ relatedTarget: t }) => {
|
|
2169
|
+
r.definition.pointer !== !1 && c === "pointer" && !R() && !(P && t instanceof P.Node && e.contains(t)) && (l = null, L() ? E?.clearOwnedTransient() : z([]), c = null);
|
|
2170
|
+
}, xe = ({ relatedTarget: t }) => {
|
|
2171
|
+
c === "keyboard" && !u && !(P && t instanceof P.Node && e.contains(t)) && (l = null, L() ? E?.clearOwnedTransient() : z([]), c = null);
|
|
2172
|
+
}, Se = (t) => {
|
|
2173
|
+
if (Oe(t.target) || r.definition.pointer === !1) return;
|
|
2174
|
+
let n = S, i = e.ownerDocument.defaultView?.Node, a = i ? t.composedPath().some((e) => e instanceof i && n?.contains(e)) : n?.contains(t.target);
|
|
2175
|
+
if (n && a) return;
|
|
2176
|
+
c = "pointer";
|
|
2177
|
+
let o = L();
|
|
2178
|
+
if (o?.mode === "free") {
|
|
2179
|
+
E?.getState() || _e(t.clientX, t.clientY);
|
|
2180
|
+
let e = E?.getState();
|
|
2181
|
+
o.pin && e && (e.pinned ? E?.clear() : E?.publish({
|
|
2182
|
+
...e,
|
|
2183
|
+
pinned: !0
|
|
2184
|
+
})), r.onSelect?.(null);
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
let l = me(t.clientX, t.clientY);
|
|
2188
|
+
s = "pointer";
|
|
2189
|
+
let d = l[0] ?? null, f = !1, p = K() || o?.pin === !0;
|
|
2190
|
+
p && (R() ? (u = null, f = !0, o && E?.clear()) : d && (u = d.key, f = !0)), o && p && f && !u || z(l, f), r.definition.selection?.change(d, "pointer"), r.onSelect?.(d);
|
|
2191
|
+
}, Ce = (e) => {
|
|
2192
|
+
if (Oe(e.target)) return;
|
|
2193
|
+
let t = L();
|
|
2194
|
+
if (e.key === "Escape" && E?.getState()) {
|
|
2195
|
+
e.preventDefault(), fe();
|
|
2196
|
+
return;
|
|
2197
|
+
}
|
|
2198
|
+
if (e.key === "Escape" && u) {
|
|
2199
|
+
e.preventDefault(), fe();
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2202
|
+
if (r.definition.keyboard === !1 || t?.mode === "free") return;
|
|
2203
|
+
let n = H();
|
|
2204
|
+
if (!n.length) return;
|
|
2205
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2206
|
+
if (!o) return;
|
|
2207
|
+
e.preventDefault();
|
|
2208
|
+
let n = o, i = K() || t?.pin === !0;
|
|
2209
|
+
t?.mode === "focus" && i ? R() ? (u = null, E?.clear()) : (u = n.key, de(U(n), !0)) : K() && (u = u ? null : n.key, B(n, U(n))), r.definition.selection?.change(n, "keyboard"), r.onSelect?.(n);
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
let i = Tn(r.definition.focus), a = i ? pn(i.navigation(n), o, e.key) : mn(n, o, e.key);
|
|
2213
|
+
a !== void 0 && (e.preventDefault(), l = null, c = "keyboard", s = "keyboard", z(a ? U(a) : []));
|
|
2214
|
+
}, we = (e) => {
|
|
2215
|
+
if (Oe(e.target)) {
|
|
2216
|
+
u || (l = null, z([]));
|
|
2217
|
+
return;
|
|
2218
|
+
}
|
|
2219
|
+
if (e.target === _?.element && C) {
|
|
2220
|
+
C = !1;
|
|
2221
|
+
return;
|
|
2222
|
+
}
|
|
2223
|
+
if (r.definition.keyboard !== !1 && L()?.mode !== "free" && e.target === _?.element && !o) {
|
|
2224
|
+
let e = Tn(r.definition.focus), t = H(), n = e ? e.navigation(t)[0] : mn(t, null, "Home");
|
|
2225
|
+
l = null, c = "keyboard", s = "keyboard", z(n ? U(n) : []);
|
|
2226
|
+
}
|
|
2227
|
+
};
|
|
2228
|
+
return e.addEventListener("pointermove", ve), e.addEventListener("pointerdown", ye), e.addEventListener("pointercancel", be), e.addEventListener("mouseleave", be), e.addEventListener("click", Se), e.addEventListener("keydown", Ce), e.addEventListener("focusin", we), e.addEventListener("focusout", xe), re?.addEventListener?.("loadingdone", se), le(), I(), ae(), {
|
|
2229
|
+
interaction: he,
|
|
2230
|
+
update(e) {
|
|
2231
|
+
if (h) return;
|
|
2232
|
+
Cn(e.definition.tooltip);
|
|
2233
|
+
let t = e.measureText === void 0 && F.refresh(), n = r.definition !== e.definition, i = r.height !== e.height || r.aspectRatio !== e.aspectRatio || r.width !== e.width || r.initialWidth !== e.initialWidth, a = r.idPrefix !== e.idPrefix || r.renderer !== e.renderer || r.measureText !== e.measureText || t, s = n || i || r.ariaLabel !== e.ariaLabel || r.ariaDescription !== e.ariaDescription || r.className !== e.className || r.tabIndex !== e.tabIndex || r.idPrefix !== e.idPrefix || r.renderer !== e.renderer || r.measureText !== e.measureText || t, d = r.width !== e.width, f = r.definition.pointer !== !1 && e.definition.pointer === !1 && c === "pointer";
|
|
2234
|
+
r = e, le(), Me(), f && (l = null, u = null, c = null, z([])), K() || (u = null), s ? I(!1, a ? "layout" : i ? "resize" : "update") : L() ? ue(!1) : o && B(o, U(o)), d && ae();
|
|
2235
|
+
},
|
|
2236
|
+
getScene: () => i,
|
|
2237
|
+
destroy() {
|
|
2238
|
+
h || (h = !0, d?.disconnect(), j?.(), j = void 0, E?.destroy(), E = void 0, D = void 0, O = void 0, k = void 0, re?.removeEventListener?.("loadingdone", se), f !== void 0 && P?.cancelAnimationFrame?.(f), G(), De(), v?.(), v = void 0, _?.destroy(), n.destroy(), e.removeEventListener("pointermove", ve), e.removeEventListener("pointerdown", ye), e.removeEventListener("pointercancel", be), e.removeEventListener("mouseleave", be), e.removeEventListener("click", Se), e.removeEventListener("keydown", Ce), e.removeEventListener("focusin", we), e.removeEventListener("focusout", xe), e.replaceChildren(), ne && e.style.position === "relative" && (e.style.position = N));
|
|
2239
|
+
}
|
|
2240
|
+
};
|
|
2241
|
+
function Te() {
|
|
2242
|
+
let e = ie() ?? r.initialWidth ?? 640;
|
|
2243
|
+
return n.render(r.definition, {
|
|
2244
|
+
width: e,
|
|
2245
|
+
height: r.height ?? (wn(r.aspectRatio) ? e / r.aspectRatio : 320)
|
|
2246
|
+
}, {
|
|
2247
|
+
measureText: r.measureText ?? F.measureText,
|
|
2248
|
+
typography: F.typography()
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
function Ee() {
|
|
2252
|
+
let t = /* @__PURE__ */ new Set();
|
|
2253
|
+
for (let n of i.controls ?? []) {
|
|
2254
|
+
let r = n.extension, a = `${r.id}:${n.key}`;
|
|
2255
|
+
t.add(a);
|
|
2256
|
+
let o = T.get(a);
|
|
2257
|
+
o && o.extension !== r && (o.instance.destroy(), T.delete(a), o = void 0), o || (o = {
|
|
2258
|
+
extension: r,
|
|
2259
|
+
instance: r.create({
|
|
2260
|
+
container: e,
|
|
2261
|
+
surface: _
|
|
2262
|
+
})
|
|
2263
|
+
}, T.set(a, o)), o.instance.update(n, i);
|
|
2264
|
+
}
|
|
2265
|
+
for (let [e, n] of T) t.has(e) || (n.instance.destroy(), T.delete(e));
|
|
2266
|
+
}
|
|
2267
|
+
function De() {
|
|
2268
|
+
for (let e of T.values()) e.instance.destroy();
|
|
2269
|
+
T.clear();
|
|
2270
|
+
}
|
|
2271
|
+
function Oe(e) {
|
|
2272
|
+
for (let t of T.values()) if (t.instance.contains?.(e)) return !0;
|
|
2273
|
+
return !1;
|
|
2274
|
+
}
|
|
2275
|
+
function V(e, t, n) {
|
|
2276
|
+
let o = H(), s = Tn(r.definition.focus), c = un(a, s, e, t, n, o);
|
|
2277
|
+
if (c) return c;
|
|
2278
|
+
let l = _?.getPresentationPoints?.() === void 0 ? w && a === i ? w.findNearest(e, t, n) : mt(a, e, t, n, o) : Ne(o, e, t, n), u = l ? fn(o, l) : null;
|
|
2279
|
+
return u ? [u] : [];
|
|
2280
|
+
}
|
|
2281
|
+
function H() {
|
|
2282
|
+
let e = _?.getPresentationPoints?.() ?? a.points;
|
|
2283
|
+
return ht(i, e);
|
|
2284
|
+
}
|
|
2285
|
+
function U(e, t = H()) {
|
|
2286
|
+
return Tn(r.definition.focus)?.group(t, { point: e }) ?? [e];
|
|
2287
|
+
}
|
|
2288
|
+
function ke() {
|
|
2289
|
+
v = _?.subscribePresentationPoints?.(Ae);
|
|
2290
|
+
}
|
|
2291
|
+
function Ae(e) {
|
|
2292
|
+
if (h || y || b) return;
|
|
2293
|
+
if (L()) {
|
|
2294
|
+
ue(!1);
|
|
2295
|
+
return;
|
|
2296
|
+
}
|
|
2297
|
+
let t = ht(i, e);
|
|
2298
|
+
if (l && u === null) {
|
|
2299
|
+
z(V(l.x, l.y, je()), !0);
|
|
2300
|
+
return;
|
|
2301
|
+
}
|
|
2302
|
+
if (!o) return;
|
|
2303
|
+
let n = fn(t, o);
|
|
2304
|
+
z(n ? U(n, t) : [], !0);
|
|
2305
|
+
}
|
|
2306
|
+
function je() {
|
|
2307
|
+
return r.definition.maxFocusDistance ?? 48;
|
|
2308
|
+
}
|
|
2309
|
+
function W(t, n) {
|
|
2310
|
+
let a = Cn(r.definition.tooltip);
|
|
2311
|
+
if (!a || !t || !_) {
|
|
2312
|
+
S?.hide();
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
(x !== a.extension || !S) && (G(), x = a.extension, S = a.extension.create({
|
|
2316
|
+
container: e,
|
|
2317
|
+
dismiss: fe,
|
|
2318
|
+
bodyChange: () => r.onTooltipBodyChange
|
|
2319
|
+
}));
|
|
2320
|
+
let o = S;
|
|
2321
|
+
o.update(a.options), o.paint({
|
|
2322
|
+
point: t,
|
|
2323
|
+
points: n,
|
|
2324
|
+
scene: i,
|
|
2325
|
+
surface: _,
|
|
2326
|
+
pointer: l,
|
|
2327
|
+
focus: {
|
|
2328
|
+
primary: t,
|
|
2329
|
+
group: n,
|
|
2330
|
+
source: s,
|
|
2331
|
+
pinned: R()
|
|
2332
|
+
},
|
|
2333
|
+
pinned: R()
|
|
2334
|
+
});
|
|
2335
|
+
}
|
|
2336
|
+
function Me() {
|
|
2337
|
+
let e = Cn(r.definition.tooltip);
|
|
2338
|
+
e ? e.extension === x ? S?.update(e.options) : G() : (S?.update(bn), S?.hide());
|
|
2339
|
+
}
|
|
2340
|
+
function G() {
|
|
2341
|
+
S?.destroy(), S = void 0, x = void 0;
|
|
2342
|
+
}
|
|
2343
|
+
function K() {
|
|
2344
|
+
let e = Cn(r.definition.tooltip);
|
|
2345
|
+
return !!(e && e.options.sticky !== !1);
|
|
2346
|
+
}
|
|
2347
|
+
function Pe() {
|
|
2348
|
+
let e = Cn(r.definition.tooltip)?.options.anchor;
|
|
2349
|
+
return e === "pointer" || typeof e == "function" || typeof e == "object" && (e.x === "pointer" || e.y === "pointer");
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
var bn = {};
|
|
2353
|
+
function xn(e) {
|
|
2354
|
+
let t = new Set((e.controls ?? []).flatMap((e) => e.fallbackNodeKey ? [e.fallbackNodeKey] : []));
|
|
2355
|
+
return t.size ? {
|
|
2356
|
+
...e,
|
|
2357
|
+
nodes: e.nodes.filter((e) => !t.has(e.key))
|
|
2358
|
+
} : e;
|
|
2359
|
+
}
|
|
2360
|
+
function Sn(e) {
|
|
2361
|
+
return "position" in e && "point" in e && "points" in e;
|
|
2362
|
+
}
|
|
2363
|
+
function Cn(e) {
|
|
2364
|
+
if (!e) return null;
|
|
2365
|
+
let t = "create" in e ? e : e.use;
|
|
2366
|
+
if (t.__chartTooltipHost !== "dom") throw TypeError("DOM chart hosts require a tooltip extension from @tanstack/charts/tooltip.");
|
|
2367
|
+
let n = t;
|
|
2368
|
+
return "create" in e ? {
|
|
2369
|
+
extension: n,
|
|
2370
|
+
options: bn
|
|
2371
|
+
} : {
|
|
2372
|
+
extension: n,
|
|
2373
|
+
options: e
|
|
2374
|
+
};
|
|
2375
|
+
}
|
|
2376
|
+
function wn(e) {
|
|
2377
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2378
|
+
}
|
|
2379
|
+
function Tn(e) {
|
|
2380
|
+
return e === !1 ? tn : ln(e);
|
|
2381
|
+
}
|
|
2382
|
+
function En(e, t) {
|
|
2383
|
+
return t.x >= e.chart.x && t.x <= e.chart.x + e.chart.width && t.y >= e.chart.y && t.y <= e.chart.y + e.chart.height;
|
|
2384
|
+
}
|
|
2385
|
+
function Dn(e, t, n) {
|
|
2386
|
+
let r = e === !0 ? {} : e || void 0;
|
|
2387
|
+
if (!r || n === "layout" || n === "resize" && r.resize !== !0 || (r.respectReducedMotion ?? !0) && t.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
2388
|
+
let { resize: i, ...a } = r;
|
|
2389
|
+
return a;
|
|
2390
|
+
}
|
|
2391
|
+
//#endregion
|
|
2392
|
+
//#region node_modules/@tanstack/charts/dist/reconcile.js
|
|
2393
|
+
var On = /* @__PURE__ */ new Set([
|
|
2394
|
+
"cx",
|
|
2395
|
+
"cy",
|
|
2396
|
+
"d",
|
|
2397
|
+
"fill-opacity",
|
|
2398
|
+
"font-size",
|
|
2399
|
+
"font-weight",
|
|
2400
|
+
"height",
|
|
2401
|
+
"opacity",
|
|
2402
|
+
"r",
|
|
2403
|
+
"rx",
|
|
2404
|
+
"stroke-opacity",
|
|
2405
|
+
"stroke-width",
|
|
2406
|
+
"transform",
|
|
2407
|
+
"width",
|
|
2408
|
+
"x",
|
|
2409
|
+
"x1",
|
|
2410
|
+
"x2",
|
|
2411
|
+
"y",
|
|
2412
|
+
"y1",
|
|
2413
|
+
"y2"
|
|
2414
|
+
]);
|
|
2415
|
+
function kn(e, t, n) {
|
|
2416
|
+
let r = e.ownerDocument.createElement("template");
|
|
2417
|
+
r.innerHTML = t;
|
|
2418
|
+
let i = r.content.firstElementChild;
|
|
2419
|
+
if (!i) return () => {};
|
|
2420
|
+
let a = e.firstElementChild;
|
|
2421
|
+
if (!a || a.namespaceURI !== i.namespaceURI || a.localName !== i.localName) return e.replaceChildren(i), () => {};
|
|
2422
|
+
let o = [];
|
|
2423
|
+
return jn(a, i, n ? o : void 0), n ? Fn(e, o, n) : () => {};
|
|
2424
|
+
}
|
|
2425
|
+
function An(e, t, n) {
|
|
2426
|
+
let r = e.ownerDocument.createElement("template");
|
|
2427
|
+
r.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`;
|
|
2428
|
+
let i = r.content.firstElementChild?.firstElementChild;
|
|
2429
|
+
if (!i) return () => {};
|
|
2430
|
+
if (e.namespaceURI !== i.namespaceURI || e.localName !== i.localName) return e.replaceWith(i), () => {};
|
|
2431
|
+
let a = [];
|
|
2432
|
+
return jn(e, i, n ? a : void 0), n ? Fn(e, a, n) : () => {};
|
|
2433
|
+
}
|
|
2434
|
+
function jn(e, t, n) {
|
|
2435
|
+
if (Mn(e, t, n), !t.firstElementChild) {
|
|
2436
|
+
if (e.firstElementChild) for (let t of [...e.children]) n ? Pn(t, n) : t.remove();
|
|
2437
|
+
else e.textContent !== t.textContent && (e.textContent = t.textContent);
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
let r = [...e.children], i = [...t.children], a = zn(r), o = Bn(i), s = /* @__PURE__ */ new Set(), c = e.firstElementChild;
|
|
2441
|
+
i.forEach((t, r) => {
|
|
2442
|
+
let i = o[r], l = a.get(i), u;
|
|
2443
|
+
l && l.namespaceURI === t.namespaceURI && l.localName === t.localName ? (u = l, s.add(l), u !== c && e.insertBefore(u, c), jn(u, t, n)) : (u = t.cloneNode(!0), e.insertBefore(u, c), Nn(u, t, n)), c = u.nextElementSibling;
|
|
2444
|
+
});
|
|
2445
|
+
for (let t of r) !s.has(t) && t.parentElement === e && (n ? Pn(t, n) : t.remove());
|
|
2446
|
+
}
|
|
2447
|
+
function Mn(e, t, n) {
|
|
2448
|
+
let r = new Set(t.getAttributeNames());
|
|
2449
|
+
for (let t of e.getAttributeNames()) r.has(t) || e.removeAttribute(t);
|
|
2450
|
+
for (let i of r) {
|
|
2451
|
+
let r = t.getAttribute(i), a = e.getAttribute(i);
|
|
2452
|
+
if (r === a) continue;
|
|
2453
|
+
let o = n && a !== null && r !== null && On.has(i) ? Ln(a, r) : void 0;
|
|
2454
|
+
o && n ? n.push({
|
|
2455
|
+
element: e,
|
|
2456
|
+
name: i,
|
|
2457
|
+
interpolate: o,
|
|
2458
|
+
target: r
|
|
2459
|
+
}) : r !== null && e.setAttribute(i, r);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
function Nn(e, t, n) {
|
|
2463
|
+
if (!n) return;
|
|
2464
|
+
let r = t.getAttribute("opacity"), i = r ?? "1";
|
|
2465
|
+
e.setAttribute("opacity", "0"), n.push({
|
|
2466
|
+
element: e,
|
|
2467
|
+
name: "opacity",
|
|
2468
|
+
interpolate: (e) => String(Number(i) * Math.max(0, Math.min(1, e))),
|
|
2469
|
+
target: r
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
function Pn(e, t) {
|
|
2473
|
+
let n = Number(e.getAttribute("opacity") ?? 1), r = Number.isFinite(n) ? n : 1;
|
|
2474
|
+
t.push({
|
|
2475
|
+
element: e,
|
|
2476
|
+
name: "opacity",
|
|
2477
|
+
interpolate: (e) => String(r * (1 - e)),
|
|
2478
|
+
target: "0",
|
|
2479
|
+
removeOnFinish: !0
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
function Fn(e, t, n) {
|
|
2483
|
+
if (!t.length) return () => {};
|
|
2484
|
+
let r = e.ownerDocument.defaultView, i = r?.requestAnimationFrame?.bind(r), a = r?.cancelAnimationFrame?.bind(r), o = Math.max(0, n.duration ?? 240);
|
|
2485
|
+
if (!i || !a || o === 0) return In(t), () => {};
|
|
2486
|
+
let s = 0, c = !1, l, u = Vn(n.easing ?? "ease-out"), d = (e) => {
|
|
2487
|
+
if (c) return;
|
|
2488
|
+
l ??= e;
|
|
2489
|
+
let n = Math.min(1, (e - l) / o), r = u(n);
|
|
2490
|
+
for (let e of t) e.element.setAttribute(e.name, e.interpolate(r));
|
|
2491
|
+
n < 1 ? s = i(d) : In(t);
|
|
2492
|
+
};
|
|
2493
|
+
return s = i(d), () => {
|
|
2494
|
+
c = !0, a(s);
|
|
2495
|
+
};
|
|
2496
|
+
}
|
|
2497
|
+
function In(e) {
|
|
2498
|
+
for (let t of e) {
|
|
2499
|
+
if (t.removeOnFinish) {
|
|
2500
|
+
t.element.remove();
|
|
2501
|
+
continue;
|
|
2502
|
+
}
|
|
2503
|
+
t.target === null ? t.element.removeAttribute(t.name) : t.element.setAttribute(t.name, t.target);
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
function Ln(e, t) {
|
|
2507
|
+
let n = Rn(e), r = Rn(t);
|
|
2508
|
+
if (!(n.skeleton !== r.skeleton || n.values.length !== r.values.length || !n.values.length)) return (e) => {
|
|
2509
|
+
let t = 0;
|
|
2510
|
+
return r.skeleton.replaceAll("#", () => {
|
|
2511
|
+
let i = n.values[t], a = r.values[t];
|
|
2512
|
+
return t += 1, Hn(i + (a - i) * e);
|
|
2513
|
+
});
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2516
|
+
function Rn(e) {
|
|
2517
|
+
let t = [];
|
|
2518
|
+
return {
|
|
2519
|
+
skeleton: e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi, (e) => (t.push(Number(e)), "#")),
|
|
2520
|
+
values: t
|
|
2521
|
+
};
|
|
2522
|
+
}
|
|
2523
|
+
function zn(e) {
|
|
2524
|
+
let t = /* @__PURE__ */ new Map();
|
|
2525
|
+
return Bn(e).forEach((n, r) => {
|
|
2526
|
+
t.set(n, e[r]);
|
|
2527
|
+
}), t;
|
|
2528
|
+
}
|
|
2529
|
+
function Bn(e) {
|
|
2530
|
+
let t = /* @__PURE__ */ new Map();
|
|
2531
|
+
return e.map((e) => {
|
|
2532
|
+
let n = e.getAttribute("data-ts-key");
|
|
2533
|
+
if (n) return `key:${n}`;
|
|
2534
|
+
let r = t.get(e.localName) ?? 0;
|
|
2535
|
+
return t.set(e.localName, r + 1), `tag:${e.localName}:${r}`;
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
function Vn(e) {
|
|
2539
|
+
if (typeof e == "function") return e;
|
|
2540
|
+
switch (e) {
|
|
2541
|
+
case "linear": return (e) => e;
|
|
2542
|
+
case "ease-in": return (e) => e * e;
|
|
2543
|
+
case "ease-in-out": return (e) => e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2;
|
|
2544
|
+
case "ease":
|
|
2545
|
+
case "ease-out": return (e) => 1 - (1 - e) ** 3;
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
function Hn(e) {
|
|
2549
|
+
return String(Math.round(e * 1e3) / 1e3);
|
|
2550
|
+
}
|
|
2551
|
+
//#endregion
|
|
2552
|
+
//#region node_modules/@tanstack/charts/dist/svg-renderer.js
|
|
2553
|
+
function Un(e, t, n) {
|
|
2554
|
+
let r = t.idPrefix ?? "", i = t.className ? `ts-chart ${t.className}` : "ts-chart", a = t.ariaDescription ? `<desc>${er(t.ariaDescription)}</desc>` : "", o = n?.renderDefinitions?.(e, r) ?? "", s = e.theme.background === "transparent" ? "" : qn({
|
|
2555
|
+
kind: "rect",
|
|
2556
|
+
key: "background",
|
|
2557
|
+
x: 0,
|
|
2558
|
+
y: 0,
|
|
2559
|
+
width: e.width,
|
|
2560
|
+
height: e.height,
|
|
2561
|
+
style: { fill: e.theme.background }
|
|
2562
|
+
}, n, r);
|
|
2563
|
+
return `<svg class="${tr(i)}" width="100%" height="100%" viewBox="0 0 ${Q(e.width)} ${Q(e.height)}" role="img" aria-roledescription="chart" aria-label="${tr(t.ariaLabel)}" tabindex="${Q(t.tabIndex ?? 0)}" style="display:block;overflow:visible">${a}${o}${s}${Wn(e.nodes, r, n)}</svg>`;
|
|
2564
|
+
}
|
|
2565
|
+
function Wn(e, t = "", n) {
|
|
2566
|
+
return e.map((e) => qn(e, n, t)).join("");
|
|
2567
|
+
}
|
|
2568
|
+
function Gn(e, t, n = "", r) {
|
|
2569
|
+
return `<g data-ts-key="focus-guide-layer:${t}" class="ts-chart__focus-guide-layer ts-chart__focus-guide-layer--${t}" data-ts-focus-layer="${t}" data-ts-focus-guide-layer="${t}" aria-hidden="true" visibility="${e.length ? "visible" : "hidden"}">${Wn(e, n, r ?? Kn)}</g>`;
|
|
2570
|
+
}
|
|
2571
|
+
var Kn = { renderGroup: Xn };
|
|
2572
|
+
function qn(e, t, n) {
|
|
2573
|
+
let r = Qn(e, t, n);
|
|
2574
|
+
switch (e.kind) {
|
|
2575
|
+
case "group": {
|
|
2576
|
+
let i = e.translateX === void 0 && e.translateY === void 0 ? "" : ` transform="translate(${Q(e.translateX ?? 0)} ${Q(e.translateY ?? 0)})"`, a = t?.renderGroup?.(e, n);
|
|
2577
|
+
return `<g${r}${i}${e.focus ? ` data-ts-focus-layer="${e.focus.placement}"${e.focus.retarget ? " data-ts-focus-retarget=\"true\"" : ""} visibility="hidden"` : ""}${a?.attributes ?? ""}>${a?.content ?? ""}${e.children.map((e) => qn(e, t, n)).join("")}</g>`;
|
|
2578
|
+
}
|
|
2579
|
+
case "rule": return `<line${r} x1="${Q(e.x1)}" y1="${Q(e.y1)}" x2="${Q(e.x2)}" y2="${Q(e.y2)}"/>`;
|
|
2580
|
+
case "polyline": return `<path${r} d="${e.path ?? e.points.map(([e, t], n) => `${n === 0 ? "M" : "L"}${Q(e)},${Q(t)}`).join("")}" vector-effect="non-scaling-stroke"/>`;
|
|
2581
|
+
case "area": return `<path${r} d="${e.polygons === void 0 ? e.path ?? Yn(e.points, !0) : Jn(e.polygons)}"${e.polygons === void 0 ? "" : " fill-rule=\"evenodd\""} vector-effect="non-scaling-stroke"/>`;
|
|
2582
|
+
case "dot": return `<circle${r} cx="${Q(e.x)}" cy="${Q(e.y)}" r="${Q(e.radius)}"/>`;
|
|
2583
|
+
case "rect": return `<rect${r} x="${Q(e.x)}" y="${Q(e.y)}" width="${Q(e.width)}" height="${Q(e.height)}"${e.radius === void 0 ? "" : ` rx="${Q(e.radius)}"`}/>`;
|
|
2584
|
+
case "label": {
|
|
2585
|
+
let t = e.rotate === void 0 ? "" : ` transform="rotate(${Q(e.rotate)} ${Q(e.x)} ${Q(e.y)})"`, n = e.anchor ? ` text-anchor="${e.anchor}"` : "", i = e.baseline ? ` dominant-baseline="${e.baseline}"` : "", a = e.fontSize === void 0 ? "" : ` font-size="${Q(e.fontSize)}"`, o = e.fontWeight === void 0 ? "" : ` font-weight="${Q(e.fontWeight)}"`;
|
|
2586
|
+
return `<text${r} x="${Q(e.x)}" y="${Q(e.y)}"${n}${i}${t}${a}${o} font-family="inherit">${er(e.text)}</text>`;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
function Jn(e) {
|
|
2591
|
+
return e.flatMap((e) => e).filter((e) => e.length > 0).map((e) => Yn(e, !0)).join("");
|
|
2592
|
+
}
|
|
2593
|
+
function Yn(e, t) {
|
|
2594
|
+
return `${e.map(([e, t], n) => `${n === 0 ? "M" : "L"}${Q(e)},${Q(t)}`).join("")}${t ? "Z" : ""}`;
|
|
2595
|
+
}
|
|
2596
|
+
function Xn(e, t) {
|
|
2597
|
+
if (!e.clip) return;
|
|
2598
|
+
let n = t.replaceAll(/[^a-zA-Z0-9_-]/g, ""), r = `${n ? `${n}-` : ""}ts-chart-clip-${Zn(e.key)}`;
|
|
2599
|
+
return {
|
|
2600
|
+
attributes: ` clip-path="url(#${r})"`,
|
|
2601
|
+
content: `<defs data-ts-key="${tr(`${e.key}:clip-defs`)}"><clipPath id="${r}"><rect x="${Q(e.clip.x)}" y="${Q(e.clip.y)}" width="${Q(e.clip.width)}" height="${Q(e.clip.height)}"/></clipPath></defs>`
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
function Zn(e) {
|
|
2605
|
+
let t = 2166136261;
|
|
2606
|
+
for (let n = 0; n < e.length; n += 1) t = Math.imul(t ^ e.charCodeAt(n), 16777619);
|
|
2607
|
+
return (t >>> 0).toString(36);
|
|
2608
|
+
}
|
|
2609
|
+
function Qn(e, t, n) {
|
|
2610
|
+
return `${` data-ts-key="${tr(e.key)}"`}${e.className ? ` class="${tr(e.className)}"` : ""}${e.ariaHidden ? " aria-hidden=\"true\"" : ""}${$n(e.style, t, n)}`;
|
|
2611
|
+
}
|
|
2612
|
+
function $n(e, t, n) {
|
|
2613
|
+
if (!e) return "";
|
|
2614
|
+
let r = (e) => e && t?.resolvePaint ? t.resolvePaint(e, n) : e;
|
|
2615
|
+
return [
|
|
2616
|
+
["fill", r(e.fill)],
|
|
2617
|
+
["fill-opacity", e.fillOpacity],
|
|
2618
|
+
["stroke", r(e.stroke)],
|
|
2619
|
+
["stroke-opacity", e.strokeOpacity],
|
|
2620
|
+
["stroke-width", e.strokeWidth],
|
|
2621
|
+
["opacity", e.opacity],
|
|
2622
|
+
["stroke-linecap", e.lineCap],
|
|
2623
|
+
["stroke-linejoin", e.lineJoin],
|
|
2624
|
+
["stroke-dasharray", e.strokeDasharray]
|
|
2625
|
+
].filter((e) => e[1] != null).map(([e, t]) => ` ${e}="${typeof t == "number" ? Q(t) : tr(t)}"`).join("");
|
|
2626
|
+
}
|
|
2627
|
+
function Q(e) {
|
|
2628
|
+
return String(Math.round(e * 100) / 100);
|
|
2629
|
+
}
|
|
2630
|
+
function er(e) {
|
|
2631
|
+
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
2632
|
+
}
|
|
2633
|
+
function tr(e) {
|
|
2634
|
+
return er(e).replaceAll("\"", """);
|
|
2635
|
+
}
|
|
2636
|
+
//#endregion
|
|
2637
|
+
//#region node_modules/@tanstack/charts/dist/svg.js
|
|
2638
|
+
function nr(e, t) {
|
|
2639
|
+
let n = new Set(e.gradients.map((e) => e.id));
|
|
2640
|
+
return Un(e, t, {
|
|
2641
|
+
renderDefinitions: (e, t) => rr(e, or(t)),
|
|
2642
|
+
renderGroup: (e, t) => ir(e, or(t)),
|
|
2643
|
+
resolvePaint: (e, t) => {
|
|
2644
|
+
let r = /^url\(#([^)]+)\)$/.exec(e)?.[1];
|
|
2645
|
+
return r && n.has(r) ? `url(#${ar(or(t), r)})` : e;
|
|
2646
|
+
}
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
function rr(e, t) {
|
|
2650
|
+
return e.gradients.length ? `<defs data-ts-key="gradients">${e.gradients.map((e) => `<linearGradient data-ts-key="gradient:${ur(e.id)}" id="${ur(ar(t, e.id))}" x1="${sr(e.x1 ?? 0)}" y1="${sr(e.y1 ?? 1)}" x2="${sr(e.x2 ?? 0)}" y2="${sr(e.y2 ?? 0)}">${e.stops.map((t, n) => `<stop data-ts-key="gradient:${ur(e.id)}:stop:${n}" offset="${sr(t.offset)}" stop-color="${ur(t.color)}"${t.opacity === void 0 ? "" : ` stop-opacity="${lr(t.opacity)}"`}/>`).join("")}</linearGradient>`).join("")}</defs>` : "";
|
|
2651
|
+
}
|
|
2652
|
+
function ir(e, t) {
|
|
2653
|
+
if (!e.clip) return;
|
|
2654
|
+
let n = ar(t, `ts-chart-clip-${cr(e.key)}`);
|
|
2655
|
+
return {
|
|
2656
|
+
attributes: ` clip-path="url(#${n})"`,
|
|
2657
|
+
content: `<defs data-ts-key="${ur(`${e.key}:clip-defs`)}"><clipPath id="${n}"><rect x="${lr(e.clip.x)}" y="${lr(e.clip.y)}" width="${lr(e.clip.width)}" height="${lr(e.clip.height)}"/></clipPath></defs>`
|
|
2658
|
+
};
|
|
2659
|
+
}
|
|
2660
|
+
function ar(e, t) {
|
|
2661
|
+
return e ? `${e}-${t}` : t;
|
|
2662
|
+
}
|
|
2663
|
+
function or(e) {
|
|
2664
|
+
return e.replaceAll(/[^a-zA-Z0-9_-]/g, "");
|
|
2665
|
+
}
|
|
2666
|
+
function sr(e) {
|
|
2667
|
+
return `${lr(Math.max(0, Math.min(1, e)) * 100)}%`;
|
|
2668
|
+
}
|
|
2669
|
+
function cr(e) {
|
|
2670
|
+
let t = 2166136261;
|
|
2671
|
+
for (let n = 0; n < e.length; n += 1) t = Math.imul(t ^ e.charCodeAt(n), 16777619);
|
|
2672
|
+
return (t >>> 0).toString(36);
|
|
2673
|
+
}
|
|
2674
|
+
function lr(e) {
|
|
2675
|
+
return String(Math.round(e * 100) / 100);
|
|
2676
|
+
}
|
|
2677
|
+
function ur(e) {
|
|
2678
|
+
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """);
|
|
2679
|
+
}
|
|
2680
|
+
//#endregion
|
|
2681
|
+
//#region node_modules/@tanstack/charts/dist/scene-point-ownership-internal.js
|
|
2682
|
+
function dr(e) {
|
|
2683
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (e, t, n) => {
|
|
2684
|
+
let r = e.get(t);
|
|
2685
|
+
r ? r.push(n) : e.set(t, [n]);
|
|
2686
|
+
};
|
|
2687
|
+
for (let i of e) {
|
|
2688
|
+
r(n, i.markId, i);
|
|
2689
|
+
let e = i.key.length;
|
|
2690
|
+
for (; e > 0;) r(t, i.key.slice(0, e), i), e = i.key.lastIndexOf(":", e - 1);
|
|
2691
|
+
}
|
|
2692
|
+
return {
|
|
2693
|
+
points: e,
|
|
2694
|
+
keys: t,
|
|
2695
|
+
marks: n
|
|
2696
|
+
};
|
|
2697
|
+
}
|
|
2698
|
+
function fr(e, t, n, r = t) {
|
|
2699
|
+
if (e.kind === "group") {
|
|
2700
|
+
let n = e.focusCandidateIndex;
|
|
2701
|
+
if (n !== void 0 && Number.isInteger(n) && n >= 0) {
|
|
2702
|
+
let e = t[n];
|
|
2703
|
+
if (e) return [e];
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
if (e.pointOwner) {
|
|
2707
|
+
let n = mr(e.pointOwner, t);
|
|
2708
|
+
if (n.length) return n;
|
|
2709
|
+
}
|
|
2710
|
+
if ("interaction" in e && e.interaction) {
|
|
2711
|
+
let n = (e.interaction.point ? [e.interaction.point] : e.interaction.points).flatMap((e) => mr(e, t));
|
|
2712
|
+
if (n.length) return n;
|
|
2713
|
+
}
|
|
2714
|
+
return pr(e.key, t, n, r);
|
|
2715
|
+
}
|
|
2716
|
+
function pr(e, t, n, r = t) {
|
|
2717
|
+
let i = (e) => e === void 0 ? [] : t === n.points ? e : e.filter((e) => t.includes(e)), a = i(n.keys.get(e)), o = a.filter((t) => t.key === e);
|
|
2718
|
+
if (o.length) return o;
|
|
2719
|
+
let s = e;
|
|
2720
|
+
for (; s.includes(":");) {
|
|
2721
|
+
let e = s.lastIndexOf(":");
|
|
2722
|
+
s = s.slice(0, e);
|
|
2723
|
+
let t = i(n.keys.get(s)).filter((e) => e.key === s);
|
|
2724
|
+
if (t.length) return t;
|
|
2725
|
+
}
|
|
2726
|
+
if (a.length) return a;
|
|
2727
|
+
let c = i(n.marks.get(e));
|
|
2728
|
+
return c.length ? c : r;
|
|
2729
|
+
}
|
|
2730
|
+
function mr(e, t) {
|
|
2731
|
+
let n = t.filter((t) => t === e);
|
|
2732
|
+
if (n.length) return n;
|
|
2733
|
+
let r = t.filter((t) => t.key === e.key);
|
|
2734
|
+
if (r.length) return r;
|
|
2735
|
+
let i = t.filter((t) => Object.is(t.datum, e.datum) && (hr(e.datum) || t.datumIndex === e.datumIndex));
|
|
2736
|
+
return i.length === 1 ? i : [];
|
|
2737
|
+
}
|
|
2738
|
+
function hr(e) {
|
|
2739
|
+
return typeof e == "object" && !!e || typeof e == "function";
|
|
2740
|
+
}
|
|
2741
|
+
//#endregion
|
|
2742
|
+
//#region node_modules/@tanstack/charts/dist/focus-layer.js
|
|
2743
|
+
var gr = [];
|
|
2744
|
+
function _r(e, t, n, r) {
|
|
2745
|
+
let i = [], a = [];
|
|
2746
|
+
if (!r && !t) return {
|
|
2747
|
+
under: i,
|
|
2748
|
+
over: a
|
|
2749
|
+
};
|
|
2750
|
+
for (let o of e.focusGuides ?? []) {
|
|
2751
|
+
let s = t && Nr(o, t) ? t : null;
|
|
2752
|
+
if (!r && t && !s) continue;
|
|
2753
|
+
let c = o.resolve({
|
|
2754
|
+
scene: e,
|
|
2755
|
+
guide: o,
|
|
2756
|
+
focus: s,
|
|
2757
|
+
pointer: n,
|
|
2758
|
+
cursor: r
|
|
2759
|
+
});
|
|
2760
|
+
c && (o.placement === "under" ? i : a).push(c);
|
|
2761
|
+
}
|
|
2762
|
+
return {
|
|
2763
|
+
under: i,
|
|
2764
|
+
over: a
|
|
2765
|
+
};
|
|
2766
|
+
}
|
|
2767
|
+
function vr(e, t) {
|
|
2768
|
+
if (!t) return {
|
|
2769
|
+
scene: e,
|
|
2770
|
+
retargeted: !1
|
|
2771
|
+
};
|
|
2772
|
+
let n = !1, r = (e) => e.map((e) => {
|
|
2773
|
+
if (e.kind !== "group") return e;
|
|
2774
|
+
if (e.focus?.retarget) {
|
|
2775
|
+
let r = e.focus.points.filter((n) => Dr(n, t, e.focus.match)), i = dr(e.focus.points), a = wr(Cr(e.focus.candidates ?? e.children, r, e.focus.points, i), r, e.focus.points, i, e.key);
|
|
2776
|
+
return a.length ? (n = !0, {
|
|
2777
|
+
...e,
|
|
2778
|
+
focus: {
|
|
2779
|
+
...e.focus,
|
|
2780
|
+
activePoints: r
|
|
2781
|
+
},
|
|
2782
|
+
children: a
|
|
2783
|
+
}) : e;
|
|
2784
|
+
}
|
|
2785
|
+
let i = r(e.children);
|
|
2786
|
+
return i.some((t, n) => t !== e.children[n]) ? {
|
|
2787
|
+
...e,
|
|
2788
|
+
children: i
|
|
2789
|
+
} : e;
|
|
2790
|
+
}), i = r(e.nodes);
|
|
2791
|
+
return n ? {
|
|
2792
|
+
scene: {
|
|
2793
|
+
...e,
|
|
2794
|
+
nodes: i
|
|
2795
|
+
},
|
|
2796
|
+
retargeted: n
|
|
2797
|
+
} : {
|
|
2798
|
+
scene: e,
|
|
2799
|
+
retargeted: n
|
|
2800
|
+
};
|
|
2801
|
+
}
|
|
2802
|
+
function yr(e, t) {
|
|
2803
|
+
if (!e.focus || !t) return /* @__PURE__ */ new Set();
|
|
2804
|
+
let n = /* @__PURE__ */ new Set();
|
|
2805
|
+
return Mr(br(e, t), (e) => n.add(e.key)), n;
|
|
2806
|
+
}
|
|
2807
|
+
function br(e, t) {
|
|
2808
|
+
let n = e.focus;
|
|
2809
|
+
if (n.retarget) return e.children;
|
|
2810
|
+
if (n.anchors) {
|
|
2811
|
+
let r = n.anchors.filter((e) => Dr(e, t, n.match));
|
|
2812
|
+
return Sr(e.children, r);
|
|
2813
|
+
}
|
|
2814
|
+
let r = n.points.filter((e) => Dr(e, t, n.match));
|
|
2815
|
+
return xr(e.children, r, n.points);
|
|
2816
|
+
}
|
|
2817
|
+
function xr(e, t, n) {
|
|
2818
|
+
return Cr(e, t, n, dr(n));
|
|
2819
|
+
}
|
|
2820
|
+
function Sr(e, t) {
|
|
2821
|
+
let n = [];
|
|
2822
|
+
for (let r of e) {
|
|
2823
|
+
if (r.kind !== "group") {
|
|
2824
|
+
t.some((e) => kr(r.key, e.key)) && n.push(r);
|
|
2825
|
+
continue;
|
|
2826
|
+
}
|
|
2827
|
+
let e = Sr(r.children, t);
|
|
2828
|
+
e.length ? n.push({
|
|
2829
|
+
...r,
|
|
2830
|
+
children: e
|
|
2831
|
+
}) : t.some((e) => e.key.startsWith(`${r.key}:`)) && n.push(r);
|
|
2832
|
+
}
|
|
2833
|
+
return n;
|
|
2834
|
+
}
|
|
2835
|
+
function Cr(e, t, n, r) {
|
|
2836
|
+
let i = [];
|
|
2837
|
+
for (let a of e) {
|
|
2838
|
+
if (a.kind !== "group") {
|
|
2839
|
+
fr(a, n, r, gr).some((e) => t.includes(e)) && i.push(a);
|
|
2840
|
+
continue;
|
|
2841
|
+
}
|
|
2842
|
+
let e = Er(a, n);
|
|
2843
|
+
if (e) {
|
|
2844
|
+
t.includes(e) && i.push(a);
|
|
2845
|
+
continue;
|
|
2846
|
+
}
|
|
2847
|
+
let o = Tr(a, n, r);
|
|
2848
|
+
if (o.length) {
|
|
2849
|
+
o.some((e) => t.includes(e)) && i.push(a);
|
|
2850
|
+
continue;
|
|
2851
|
+
}
|
|
2852
|
+
let s = fr(a, n, r, gr), c = s.length ? s : n, l = Cr(a.children, t, c, r);
|
|
2853
|
+
l.length && i.push({
|
|
2854
|
+
...a,
|
|
2855
|
+
children: l
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
return i;
|
|
2859
|
+
}
|
|
2860
|
+
function wr(e, t, n, r, i) {
|
|
2861
|
+
let a = new Map(t.map((e, t) => [e, t])), o = (e, t) => {
|
|
2862
|
+
let s = fr(e, n, r, gr).filter((e) => a.has(e)), c = s.length === 1 ? s[0] : void 0, l = e.key;
|
|
2863
|
+
if (c && e.key !== c.markId) {
|
|
2864
|
+
let n = `${i}:selection:${a.get(c) ?? 0}`;
|
|
2865
|
+
l = e.key === c.key ? n : e.key.startsWith(`${c.key}:`) ? `${n}${e.key.slice(c.key.length)}` : c.key.startsWith(`${e.key}:`) ? `${n}:ancestor:${t}` : `${n}:node:${t}`;
|
|
2866
|
+
}
|
|
2867
|
+
return e.kind === "group" ? {
|
|
2868
|
+
...e,
|
|
2869
|
+
key: l,
|
|
2870
|
+
children: e.children.map((e, n) => o(e, `${t}:${n}`))
|
|
2871
|
+
} : {
|
|
2872
|
+
...e,
|
|
2873
|
+
key: l
|
|
2874
|
+
};
|
|
2875
|
+
};
|
|
2876
|
+
return e.map((e, t) => o(e, String(t)));
|
|
2877
|
+
}
|
|
2878
|
+
function Tr(e, t, n) {
|
|
2879
|
+
let r = Er(e, t);
|
|
2880
|
+
if (r) return [r];
|
|
2881
|
+
if (e.pointOwner) {
|
|
2882
|
+
let r = fr(e, t, n, gr);
|
|
2883
|
+
if (r.length) return r;
|
|
2884
|
+
}
|
|
2885
|
+
let i = n.keys.get(e.key)?.filter((t) => t.key === e.key);
|
|
2886
|
+
return i === void 0 ? gr : i.filter((e) => t.includes(e));
|
|
2887
|
+
}
|
|
2888
|
+
function Er(e, t) {
|
|
2889
|
+
let n = e.focusCandidateIndex;
|
|
2890
|
+
if (!(n === void 0 || !Number.isInteger(n) || n < 0)) return t[n];
|
|
2891
|
+
}
|
|
2892
|
+
function Dr(e, t, n) {
|
|
2893
|
+
return n === "x" ? e.xValue !== void 0 && Ar(e.xValue, t.primary.xValue) : n === "y" ? e.yValue !== void 0 && Ar(e.yValue, t.primary.yValue) : n === "series" ? Ar(e.group, t.primary.group) : n === "key" ? e.key === t.primary.key || e.datum === t.primary.datum : n === "group" ? t.group.some((t) => Or(e, t)) : Or(e, t.primary);
|
|
2894
|
+
}
|
|
2895
|
+
function Or(e, t) {
|
|
2896
|
+
return e === t || e.key === t.key ? !0 : Object.is(e.datum, t.datum) ? jr(e.datum) || e.datumIndex === t.datumIndex : !1;
|
|
2897
|
+
}
|
|
2898
|
+
function kr(e, t) {
|
|
2899
|
+
return e === t || e.startsWith(`${t}:`) || t.startsWith(`${e}:`);
|
|
2900
|
+
}
|
|
2901
|
+
function Ar(e, t) {
|
|
2902
|
+
return M(e) === M(t);
|
|
2903
|
+
}
|
|
2904
|
+
function jr(e) {
|
|
2905
|
+
return typeof e == "object" && !!e || typeof e == "function";
|
|
2906
|
+
}
|
|
2907
|
+
function Mr(e, t) {
|
|
2908
|
+
for (let n of e) t(n), n.kind === "group" && Mr(n.children, t);
|
|
2909
|
+
}
|
|
2910
|
+
function Nr(e, t) {
|
|
2911
|
+
return e.scope === void 0 || t.primary.key === e.scope || t.primary.key.startsWith(`${e.scope}:`);
|
|
2912
|
+
}
|
|
2913
|
+
//#endregion
|
|
2914
|
+
//#region node_modules/@tanstack/charts/dist/svg-focus-guide-serializer.js
|
|
2915
|
+
function Pr(e, t, n, r, i, a) {
|
|
2916
|
+
let o = e.ownerDocument, s = `focus-guide-layer:${r}`, c = {
|
|
2917
|
+
kind: "group",
|
|
2918
|
+
key: s,
|
|
2919
|
+
className: `ts-chart__focus-guide-layer ts-chart__focus-guide-layer--${r}`,
|
|
2920
|
+
ariaHidden: !0,
|
|
2921
|
+
children: n
|
|
2922
|
+
}, l = Br(o, a({
|
|
2923
|
+
...t,
|
|
2924
|
+
nodes: [c],
|
|
2925
|
+
focusGuides: void 0
|
|
2926
|
+
}, i)), u = l ? Hr(l, s) : void 0;
|
|
2927
|
+
if (!l || !u || u.localName !== "g") throw Error(`The SVG renderer must preserve a g[data-ts-key="${s}"] element when serializing focus guides.`);
|
|
2928
|
+
return u.classList.add("ts-chart__focus-guide-layer", `ts-chart__focus-guide-layer--${r}`), u.setAttribute("data-ts-focus-layer", r), u.setAttribute("data-ts-focus-guide-layer", r), u.setAttribute("aria-hidden", "true"), u.setAttribute("visibility", n.length ? "visible" : "hidden"), Fr(o, u, n, r, i.idPrefix ?? ""), Ir(e, l, u, s), u.outerHTML;
|
|
2929
|
+
}
|
|
2930
|
+
function Fr(e, t, n, r, i) {
|
|
2931
|
+
let a = Vr(e, Gn(n, r, i));
|
|
2932
|
+
if (a) for (let e of Ur(a)) {
|
|
2933
|
+
let n = e.getAttribute("clip-path"), r = e.getAttribute("data-ts-key");
|
|
2934
|
+
if (!n || !r) continue;
|
|
2935
|
+
let i = Hr(t, r);
|
|
2936
|
+
if (!i || i.hasAttribute("clip-path")) continue;
|
|
2937
|
+
i.setAttribute("clip-path", n);
|
|
2938
|
+
let o = Hr(a, `${r}:clip-defs`);
|
|
2939
|
+
o && i.insertBefore(o.cloneNode(!0), i.firstChild);
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
function Ir(e, t, n, r) {
|
|
2943
|
+
let i = [...Rr(n)], a = /* @__PURE__ */ new Set(), o;
|
|
2944
|
+
for (; i.length;) {
|
|
2945
|
+
let s = i.shift();
|
|
2946
|
+
if (!s || a.has(s) || (a.add(s), zr(n, s) || Lr(e, s))) continue;
|
|
2947
|
+
let c = zr(t, s);
|
|
2948
|
+
if (!c) continue;
|
|
2949
|
+
o || (o = e.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "defs"), o.setAttribute("data-ts-key", `${r}:renderer-defs`), n.insertBefore(o, n.firstChild));
|
|
2950
|
+
let l = c.cloneNode(!0);
|
|
2951
|
+
o.append(l), i.push(...Rr(l));
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
function Lr(e, t) {
|
|
2955
|
+
let n = zr(e, t);
|
|
2956
|
+
return n?.closest("[data-ts-focus-guide-layer]") ? void 0 : n;
|
|
2957
|
+
}
|
|
2958
|
+
function Rr(e) {
|
|
2959
|
+
let t = /* @__PURE__ */ new Set();
|
|
2960
|
+
for (let n of [e, ...e.querySelectorAll("*")]) for (let e of n.attributes) {
|
|
2961
|
+
for (let n of e.value.matchAll(/url\(#([^)]+)\)/g)) n[1] && t.add(n[1]);
|
|
2962
|
+
(e.localName === "href" || e.name === "xlink:href") && e.value.startsWith("#") && t.add(e.value.slice(1));
|
|
2963
|
+
}
|
|
2964
|
+
return t;
|
|
2965
|
+
}
|
|
2966
|
+
function zr(e, t) {
|
|
2967
|
+
return [...e.getAttribute("id") === t ? [e] : [], ...e.querySelectorAll("[id]")].find((e) => e.getAttribute("id") === t);
|
|
2968
|
+
}
|
|
2969
|
+
function Br(e, t) {
|
|
2970
|
+
let n = e.createElement("template");
|
|
2971
|
+
n.innerHTML = t.trim();
|
|
2972
|
+
let r = n.content.firstElementChild;
|
|
2973
|
+
return r?.localName === "svg" ? r : void 0;
|
|
2974
|
+
}
|
|
2975
|
+
function Vr(e, t) {
|
|
2976
|
+
let n = e.createElement("template");
|
|
2977
|
+
return n.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`, n.content.firstElementChild?.firstElementChild ?? void 0;
|
|
2978
|
+
}
|
|
2979
|
+
function Hr(e, t) {
|
|
2980
|
+
return Ur(e).find((e) => e.getAttribute("data-ts-key") === t);
|
|
2981
|
+
}
|
|
2982
|
+
function Ur(e) {
|
|
2983
|
+
return [...e.hasAttribute("data-ts-key") ? [e] : [], ...e.querySelectorAll("[data-ts-key]")];
|
|
2984
|
+
}
|
|
2985
|
+
//#endregion
|
|
2986
|
+
//#region node_modules/@tanstack/charts/dist/svg-focus-guide-layer.js
|
|
2987
|
+
function Wr(e) {
|
|
2988
|
+
let t = {};
|
|
2989
|
+
if (!e) return t;
|
|
2990
|
+
for (let n of ["under", "over"]) {
|
|
2991
|
+
let r = Yr(e, n);
|
|
2992
|
+
r && (t[n] = r, r.remove());
|
|
2993
|
+
}
|
|
2994
|
+
return t;
|
|
2995
|
+
}
|
|
2996
|
+
function Gr(e, t, n = () => !0) {
|
|
2997
|
+
for (let r of ["under", "over"]) {
|
|
2998
|
+
let i = t[r];
|
|
2999
|
+
i && n(r) && Jr(e, i, r);
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
function Kr(e, t) {
|
|
3003
|
+
let n = Yr(e, t);
|
|
3004
|
+
if (n) return n;
|
|
3005
|
+
let r = e.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
3006
|
+
return r.dataset.tsKey = `focus-guide-layer:${t}`, r.dataset.tsFocusLayer = t, r.dataset.tsFocusGuideLayer = t, r.setAttribute("class", `ts-chart__focus-guide-layer ts-chart__focus-guide-layer--${t}`), r.setAttribute("aria-hidden", "true"), r.setAttribute("visibility", "hidden"), Jr(e, r, t), r;
|
|
3007
|
+
}
|
|
3008
|
+
function qr(e, t) {
|
|
3009
|
+
Yr(e, t)?.remove();
|
|
3010
|
+
}
|
|
3011
|
+
function Jr(e, t, n) {
|
|
3012
|
+
if (n === "under") {
|
|
3013
|
+
let n = [...e.children].find((e) => e.getAttribute("data-ts-key") === "grid" || e.getAttribute("data-ts-key") === "marks" || e.classList.contains("ts-chart__grid") || e.classList.contains("ts-chart__marks"));
|
|
3014
|
+
e.insertBefore(t, n ?? null);
|
|
3015
|
+
} else e.append(t);
|
|
3016
|
+
}
|
|
3017
|
+
function Yr(e, t) {
|
|
3018
|
+
return [...e.children].find((e) => e.localName === "g" && e.getAttribute("data-ts-focus-guide-layer") === t);
|
|
3019
|
+
}
|
|
3020
|
+
//#endregion
|
|
3021
|
+
//#region node_modules/@tanstack/charts/dist/mark-state.js
|
|
3022
|
+
function Xr(e, t, n = null) {
|
|
3023
|
+
if (!t || !Zr(e.nodes)) return { scene: e };
|
|
3024
|
+
let r, i = {}, a = (e, o, s, c, l) => e.map((e) => {
|
|
3025
|
+
let u = e.kind === "group" ? e.states : void 0, d = u?.points ?? o, f = u?.definitions ?? s, p = u?.data ?? c, m = u ? dr(u.points) : l, h = d ? m ? fr(e, d, m) : d : ri, g = e.kind !== "group" && f && p && h.length ? Qr(e, h, p, f, t, n) : { node: e };
|
|
3026
|
+
if (g.transition) {
|
|
3027
|
+
r = ii(r, g.transition);
|
|
3028
|
+
for (let e of h) i[e.markId] = ii(i[e.markId], g.transition);
|
|
3029
|
+
}
|
|
3030
|
+
let _ = g.node;
|
|
3031
|
+
return _.kind === "group" ? {
|
|
3032
|
+
..._,
|
|
3033
|
+
children: a(_.children, h.length ? h : d, f, p, m)
|
|
3034
|
+
} : _;
|
|
3035
|
+
}), o = a(e.nodes);
|
|
3036
|
+
return {
|
|
3037
|
+
scene: {
|
|
3038
|
+
...e,
|
|
3039
|
+
nodes: o
|
|
3040
|
+
},
|
|
3041
|
+
transition: r,
|
|
3042
|
+
...Object.keys(i).length ? { transitions: i } : {}
|
|
3043
|
+
};
|
|
3044
|
+
}
|
|
3045
|
+
function Zr(e) {
|
|
3046
|
+
return e.some((e) => e.kind === "group" && (e.states !== void 0 || Zr(e.children)));
|
|
3047
|
+
}
|
|
3048
|
+
function Qr(e, t, n, r, i, a) {
|
|
3049
|
+
let o = e, s;
|
|
3050
|
+
for (let e of r) {
|
|
3051
|
+
let r = $r(t, n, e, i, a);
|
|
3052
|
+
r && (o = ti(o, e.style, r), e.transition && (s = ii(s, e.transition)));
|
|
3053
|
+
}
|
|
3054
|
+
return {
|
|
3055
|
+
node: o,
|
|
3056
|
+
transition: s
|
|
3057
|
+
};
|
|
3058
|
+
}
|
|
3059
|
+
function $r(e, t, n, r, i) {
|
|
3060
|
+
if (!(typeof n.when != "function" && n.when.focus === "unmatched" && e.some((e) => Dr(e, r, "group")))) for (let a of e) {
|
|
3061
|
+
let e = {
|
|
3062
|
+
datum: a.datum,
|
|
3063
|
+
index: a.datumIndex,
|
|
3064
|
+
data: t,
|
|
3065
|
+
point: a,
|
|
3066
|
+
focus: r,
|
|
3067
|
+
pointer: i,
|
|
3068
|
+
matches: (e) => Dr(a, r, e)
|
|
3069
|
+
};
|
|
3070
|
+
if (typeof n.when == "function" ? n.when(e) : ei(n.when, e)) return e;
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
function ei(e, t) {
|
|
3074
|
+
let n = e.source;
|
|
3075
|
+
return n !== void 0 && !(Array.isArray(n) ? n.includes(t.focus.source) : n === t.focus.source) || e.pinned !== void 0 && e.pinned !== t.focus.pinned ? !1 : e.focus === "unmatched" ? !t.matches("group") : t.matches(e.focus);
|
|
3076
|
+
}
|
|
3077
|
+
function ti(e, t, n) {
|
|
3078
|
+
let r = { ...e.style };
|
|
3079
|
+
for (let e of ni) {
|
|
3080
|
+
let i = $(t[e], n);
|
|
3081
|
+
i !== void 0 && (r[e] = i);
|
|
3082
|
+
}
|
|
3083
|
+
let i = {
|
|
3084
|
+
...e,
|
|
3085
|
+
style: r
|
|
3086
|
+
}, a = $(t.dx, n) ?? 0, o = $(t.dy, n) ?? 0, s = $(t.r, n), c = $(t.radius, n), l = $(t.inset, n), u = $(t.fontSize, n), d = $(t.fontWeight, n), f = $(t.rotate, n);
|
|
3087
|
+
switch (i.kind) {
|
|
3088
|
+
case "dot":
|
|
3089
|
+
i = {
|
|
3090
|
+
...i,
|
|
3091
|
+
x: i.x + a,
|
|
3092
|
+
y: i.y + o,
|
|
3093
|
+
radius: s ?? i.radius
|
|
3094
|
+
};
|
|
3095
|
+
break;
|
|
3096
|
+
case "rect": {
|
|
3097
|
+
let e = i.inset ?? 0, t = Math.max(0, l ?? e);
|
|
3098
|
+
if (Number.isFinite(i.maxThickness) && (i.insetAxis === "x" || i.insetAxis === "y")) {
|
|
3099
|
+
let n = (i.insetAxis === "x" ? i.width : i.height) + e * 2, r = Math.max(0, n - t * 2);
|
|
3100
|
+
t = (n - Math.min(r, Math.max(0, i.maxThickness))) / 2;
|
|
3101
|
+
}
|
|
3102
|
+
let n = t - e, r = i.insetAxis === "y" ? 0 : n, s = i.insetAxis === "x" ? 0 : n;
|
|
3103
|
+
i = {
|
|
3104
|
+
...i,
|
|
3105
|
+
x: i.x + r + a,
|
|
3106
|
+
y: i.y + s + o,
|
|
3107
|
+
width: Math.max(0, i.width - r * 2),
|
|
3108
|
+
height: Math.max(0, i.height - s * 2),
|
|
3109
|
+
radius: c ?? i.radius,
|
|
3110
|
+
inset: t
|
|
3111
|
+
};
|
|
3112
|
+
break;
|
|
3113
|
+
}
|
|
3114
|
+
case "label": i = {
|
|
3115
|
+
...i,
|
|
3116
|
+
x: i.x + a,
|
|
3117
|
+
y: i.y + o,
|
|
3118
|
+
fontSize: u ?? i.fontSize,
|
|
3119
|
+
fontWeight: d ?? i.fontWeight,
|
|
3120
|
+
rotate: f ?? i.rotate
|
|
3121
|
+
};
|
|
3122
|
+
}
|
|
3123
|
+
return i;
|
|
3124
|
+
}
|
|
3125
|
+
var ni = [
|
|
3126
|
+
"fill",
|
|
3127
|
+
"fillOpacity",
|
|
3128
|
+
"stroke",
|
|
3129
|
+
"strokeOpacity",
|
|
3130
|
+
"strokeWidth",
|
|
3131
|
+
"opacity",
|
|
3132
|
+
"strokeDasharray"
|
|
3133
|
+
];
|
|
3134
|
+
function $(e, t) {
|
|
3135
|
+
return typeof e == "function" ? e(t) : e;
|
|
3136
|
+
}
|
|
3137
|
+
var ri = [];
|
|
3138
|
+
function ii(e, t) {
|
|
3139
|
+
return !e || e.type !== t.type ? t : e.type === "spring" && t.type === "spring" ? {
|
|
3140
|
+
...e,
|
|
3141
|
+
...t
|
|
3142
|
+
} : e.type !== "tween" || t.type !== "tween" ? t : {
|
|
3143
|
+
...e,
|
|
3144
|
+
...t,
|
|
3145
|
+
duration: Math.max(e.duration ?? 250, t.duration ?? 250)
|
|
3146
|
+
};
|
|
3147
|
+
}
|
|
3148
|
+
//#endregion
|
|
3149
|
+
//#region node_modules/@tanstack/charts/dist/mark-state-transition.js
|
|
3150
|
+
function ai(e, t) {
|
|
3151
|
+
if (!e || e.type !== "tween" || (e.respectReducedMotion ?? !0) && t.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
3152
|
+
let { type: n, ...r } = e;
|
|
3153
|
+
return r;
|
|
3154
|
+
}
|
|
3155
|
+
//#endregion
|
|
3156
|
+
//#region node_modules/@tanstack/charts/dist/svg-coordinates.js
|
|
3157
|
+
function oi(e, t, n, r) {
|
|
3158
|
+
let i = e.getScreenCTM?.();
|
|
3159
|
+
if (!i) {
|
|
3160
|
+
let i = e.getBoundingClientRect();
|
|
3161
|
+
return !i.width || !i.height ? null : {
|
|
3162
|
+
x: (n - i.left) / i.width * t.width,
|
|
3163
|
+
y: (r - i.top) / i.height * t.height
|
|
3164
|
+
};
|
|
3165
|
+
}
|
|
3166
|
+
let a;
|
|
3167
|
+
try {
|
|
3168
|
+
a = i.inverse();
|
|
3169
|
+
} catch {
|
|
3170
|
+
return null;
|
|
3171
|
+
}
|
|
3172
|
+
let o = a.a * n + a.c * r + a.e, s = a.b * n + a.d * r + a.f;
|
|
3173
|
+
return !Number.isFinite(o) || !Number.isFinite(s) ? null : {
|
|
3174
|
+
x: o,
|
|
3175
|
+
y: s
|
|
3176
|
+
};
|
|
3177
|
+
}
|
|
3178
|
+
//#endregion
|
|
3179
|
+
//#region node_modules/@tanstack/charts/dist/svg-surface.js
|
|
3180
|
+
function si(e = nr) {
|
|
3181
|
+
let t = {
|
|
3182
|
+
id: "svg",
|
|
3183
|
+
prerender: e,
|
|
3184
|
+
mount(n) {
|
|
3185
|
+
let r = () => {}, i = () => {}, a, o, s, c = !1, l = !1, u = () => {
|
|
3186
|
+
let e = n.querySelector("svg.ts-chart");
|
|
3187
|
+
if (!e) throw Error("The SVG renderer must produce an svg.ts-chart root element.");
|
|
3188
|
+
return e;
|
|
3189
|
+
};
|
|
3190
|
+
return {
|
|
3191
|
+
renderer: t,
|
|
3192
|
+
get element() {
|
|
3193
|
+
return u();
|
|
3194
|
+
},
|
|
3195
|
+
render(t, d) {
|
|
3196
|
+
let f = !!(a && at(a, t));
|
|
3197
|
+
r(), i(), i = () => {};
|
|
3198
|
+
let p = !!a?.focusGuides?.length, m = p ? Wr(u()) : {};
|
|
3199
|
+
r = kn(n, e(t, d), f ? void 0 : d.animation), p && Gr(u(), m, (e) => t.focusGuides?.some((t) => t.placement === e) === !0), a = t, o = d, s = void 0, c = !1, l = !1;
|
|
3200
|
+
},
|
|
3201
|
+
clientToScene(e, t, n) {
|
|
3202
|
+
return oi(u(), e, t, n);
|
|
3203
|
+
},
|
|
3204
|
+
paintFocus(t, d, f) {
|
|
3205
|
+
if (!a || !o) return;
|
|
3206
|
+
let p = Xr(a, t, d), m = vr(p.scene, t), h = s;
|
|
3207
|
+
if (m.scene !== a || c || l || h) {
|
|
3208
|
+
i(), i = () => {};
|
|
3209
|
+
let t = Wr(u());
|
|
3210
|
+
r(), r = kn(n, e(m.scene, o), ai(p.transition ?? h, n)), Gr(u(), t);
|
|
3211
|
+
}
|
|
3212
|
+
return l = m.retargeted, c = !!(t && p.scene !== a), s = t ? p.transition ?? h : void 0, ci(u(), m.scene, t), i(), i = li(u(), m.scene, t, d, f, o, e), m.scene;
|
|
3213
|
+
},
|
|
3214
|
+
destroy() {
|
|
3215
|
+
r(), i();
|
|
3216
|
+
}
|
|
3217
|
+
};
|
|
3218
|
+
}
|
|
3219
|
+
};
|
|
3220
|
+
return t;
|
|
3221
|
+
}
|
|
3222
|
+
function ci(e, t, n) {
|
|
3223
|
+
let r = ui(t.nodes);
|
|
3224
|
+
e.querySelectorAll("[data-ts-focus-layer]:not([data-ts-focus-guide-layer])").forEach((e, t) => {
|
|
3225
|
+
let i = r[t], a = i ? yr(i, n) : /* @__PURE__ */ new Set();
|
|
3226
|
+
e.setAttribute("visibility", n && a.size ? "visible" : "hidden"), e.querySelectorAll("[data-ts-key]").forEach((e) => {
|
|
3227
|
+
let t = e.dataset.tsKey;
|
|
3228
|
+
e.setAttribute("visibility", t && a.has(t) ? "visible" : "hidden");
|
|
3229
|
+
});
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
function li(e, t, n, r, i, a, o) {
|
|
3233
|
+
let s = _r(t, n, r, i), c = [];
|
|
3234
|
+
for (let n of ["under", "over"]) {
|
|
3235
|
+
if (!t.focusGuides?.some((e) => e.placement === n)) {
|
|
3236
|
+
qr(e, n);
|
|
3237
|
+
continue;
|
|
3238
|
+
}
|
|
3239
|
+
let r = Kr(e, n), i = s[n];
|
|
3240
|
+
if (!i.length) {
|
|
3241
|
+
r.setAttribute("visibility", "hidden");
|
|
3242
|
+
continue;
|
|
3243
|
+
}
|
|
3244
|
+
let l = o === nr ? Gn(i, n, a.idPrefix ?? "") : Pr(e, t, i, n, a, o);
|
|
3245
|
+
c.push(An(r, l));
|
|
3246
|
+
}
|
|
3247
|
+
return () => c.forEach((e) => e());
|
|
3248
|
+
}
|
|
3249
|
+
function ui(e) {
|
|
3250
|
+
let t = [];
|
|
3251
|
+
for (let n of e) n.kind === "group" && (n.focus ? t.push(n) : t.push(...ui(n.children)));
|
|
3252
|
+
return t;
|
|
3253
|
+
}
|
|
3254
|
+
//#endregion
|
|
3255
|
+
//#region node_modules/@tanstack/charts/dist/dom.js
|
|
3256
|
+
function di(e, t, n = Gt()) {
|
|
3257
|
+
let r = t.renderSvg ?? nr, i = si(r), a = (t) => {
|
|
3258
|
+
let n = t.renderSvg ?? nr;
|
|
3259
|
+
n !== r && (r = n, i = si(r));
|
|
3260
|
+
let { renderSvg: a, onRender: o, ...s } = t;
|
|
3261
|
+
return {
|
|
3262
|
+
...s,
|
|
3263
|
+
renderer: i,
|
|
3264
|
+
onRender: o ? ({ container: t, scene: n, surface: r, interaction: i }) => {
|
|
3265
|
+
let a = r.element, s = e.ownerDocument.defaultView?.SVGSVGElement;
|
|
3266
|
+
if (!s || !(a instanceof s)) throw TypeError("Expected the SVG chart surface.");
|
|
3267
|
+
o({
|
|
3268
|
+
container: t,
|
|
3269
|
+
scene: n,
|
|
3270
|
+
svg: a,
|
|
3271
|
+
interaction: i
|
|
3272
|
+
});
|
|
3273
|
+
} : void 0
|
|
3274
|
+
};
|
|
3275
|
+
}, o = yn(e, a(t), n);
|
|
3276
|
+
return {
|
|
3277
|
+
interaction: o.interaction,
|
|
3278
|
+
update(e) {
|
|
3279
|
+
o.update(a(e));
|
|
3280
|
+
},
|
|
3281
|
+
getScene: o.getScene,
|
|
3282
|
+
destroy: o.destroy
|
|
3283
|
+
};
|
|
3284
|
+
}
|
|
3285
|
+
//#endregion
|
|
3286
|
+
//#region node_modules/@tanstack/charts/dist/bar.js
|
|
3287
|
+
function fi(e, t = {}) {
|
|
3288
|
+
let n = Array.isArray(e) ? e : Array.from(e);
|
|
3289
|
+
return te(({ markIndex: e }) => {
|
|
3290
|
+
let r = t.id ?? `bar-y-${e}`, i = I(n, t.x, (e, { index: t }) => t), a = _i(n, t.y ?? t.y2, (e) => typeof e == "number" ? e : void 0), o = I(n, t.z, () => null), s = t.color === void 0 ? o : I(n, t.color, () => null), c = t.z === void 0 && t.color !== void 0 ? s : o, l = t.y1 !== void 0 || t.y2 !== void 0;
|
|
3291
|
+
if (l && t.layout?.type === "stack") throw TypeError("A bar with explicit y1 or y2 endpoints cannot also configure a stack layout");
|
|
3292
|
+
let u = t.layout?.type === "group", d = t.layout?.type === "stack" ? t.layout : {}, f = !l && !u ? ue(i, a, c, d, "index") : void 0, p = l ? _i(n, t.y1, () => 0) : f?.starts ?? n.map(() => 0), m = l ? _i(n, t.y2 ?? t.y, () => void 0) : u ? a : f.ends, h = hi(i), g = u || !l && h ? c : o, _ = ie(n, t.key, {
|
|
3293
|
+
groups: g,
|
|
3294
|
+
candidates: [i],
|
|
3295
|
+
markId: r,
|
|
3296
|
+
warningIdentity: t
|
|
3297
|
+
});
|
|
3298
|
+
return {
|
|
3299
|
+
id: r,
|
|
3300
|
+
states: F(n, t.states),
|
|
3301
|
+
seriesFromColor: t.z === void 0 && t.color !== void 0 && (u || h),
|
|
3302
|
+
channels: {
|
|
3303
|
+
x: {
|
|
3304
|
+
scale: "x",
|
|
3305
|
+
values: i.filter(N)
|
|
3306
|
+
},
|
|
3307
|
+
y: {
|
|
3308
|
+
scale: "y",
|
|
3309
|
+
values: [...m.filter(P), ...p.filter(P)],
|
|
3310
|
+
includeZero: t.y1 === void 0
|
|
3311
|
+
},
|
|
3312
|
+
color: {
|
|
3313
|
+
scale: "color",
|
|
3314
|
+
values: s.filter(E)
|
|
3315
|
+
}
|
|
3316
|
+
},
|
|
3317
|
+
render: ({ scales: e, chart: o, color: c }) => {
|
|
3318
|
+
let l = e.x.bandwidth || gi(e.x, i, o.width, n.length), u = mi(t.layout?.type === "group" ? t.layout : void 0, g, l), d = u?.bandwidth ?? l, f = pi(d, t.inset, t.maxThickness), h = [];
|
|
3319
|
+
return n.forEach((o, v) => {
|
|
3320
|
+
let y = i[v], b = a[v], x = p[v], S = m[v];
|
|
3321
|
+
if (!N(y) || !P(b) || !P(x) || !P(S)) return;
|
|
3322
|
+
let C = g[v] ?? null, w = u?.map(C) ?? 0, T = c(s[v]), E = re(t.fill, o, v, n, T), D = e.x.map(y), O = e.y.map(x), k = e.y.map(S), A = D - l / 2 + w + f.inset, j = Math.min(O, k), ee = f.size, te = Math.abs(O - k), ne = `${r}:${M(C)}:${M(_[v])}`, F = {
|
|
3323
|
+
key: ne,
|
|
3324
|
+
markId: r,
|
|
3325
|
+
group: C,
|
|
3326
|
+
groupLabel: C == null ? r : String(C),
|
|
3327
|
+
datum: o,
|
|
3328
|
+
datumIndex: v,
|
|
3329
|
+
xValue: y,
|
|
3330
|
+
yValue: b,
|
|
3331
|
+
y1Value: x,
|
|
3332
|
+
y2Value: S,
|
|
3333
|
+
yInterval: "difference",
|
|
3334
|
+
x: D - l / 2 + w + d / 2,
|
|
3335
|
+
y: k,
|
|
3336
|
+
color: E
|
|
3337
|
+
};
|
|
3338
|
+
h.push({
|
|
3339
|
+
kind: "rect",
|
|
3340
|
+
key: ne,
|
|
3341
|
+
x: A,
|
|
3342
|
+
y: j,
|
|
3343
|
+
width: ee,
|
|
3344
|
+
height: te,
|
|
3345
|
+
radius: t.radius,
|
|
3346
|
+
inset: f.inset,
|
|
3347
|
+
insetAxis: "x",
|
|
3348
|
+
...f.maximum === void 0 ? {} : { maxThickness: f.maximum },
|
|
3349
|
+
interaction: {
|
|
3350
|
+
point: F,
|
|
3351
|
+
affinity: "x"
|
|
3352
|
+
},
|
|
3353
|
+
style: {
|
|
3354
|
+
fill: E,
|
|
3355
|
+
fillOpacity: t.fillOpacity
|
|
3356
|
+
}
|
|
3357
|
+
});
|
|
3358
|
+
}), { nodes: [{
|
|
3359
|
+
kind: "group",
|
|
3360
|
+
key: r,
|
|
3361
|
+
className: "ts-chart__bar ts-chart__bar-y",
|
|
3362
|
+
ariaHidden: !0,
|
|
3363
|
+
children: h
|
|
3364
|
+
}] };
|
|
3365
|
+
}
|
|
3366
|
+
};
|
|
3367
|
+
}, t.motion);
|
|
3368
|
+
}
|
|
3369
|
+
function pi(e, t, n) {
|
|
3370
|
+
let r = Math.max(0, t ?? 0), i = Math.max(0, e), a = Math.max(0, i - r * 2), o = Number.isFinite(n), s = o ? Math.max(0, n) : a, c = Math.min(a, s);
|
|
3371
|
+
return {
|
|
3372
|
+
inset: (i - c) / 2,
|
|
3373
|
+
maximum: o ? s : void 0,
|
|
3374
|
+
size: c
|
|
3375
|
+
};
|
|
3376
|
+
}
|
|
3377
|
+
function mi(e, n, r) {
|
|
3378
|
+
if (!e) return;
|
|
3379
|
+
let i = v(e.scale ?? (() => t().padding(Number.isFinite(e.padding) ? Math.max(0, e.padding) : .1)), { values: n });
|
|
3380
|
+
i.range([0, r]);
|
|
3381
|
+
let a = i.bandwidth?.();
|
|
3382
|
+
if (a === void 0) throw TypeError("A grouped bar layout requires a D3 band scale");
|
|
3383
|
+
return {
|
|
3384
|
+
bandwidth: a,
|
|
3385
|
+
map(e) {
|
|
3386
|
+
if (e === null) throw TypeError("A grouped bar requires an explicit z channel or a discrete color channel");
|
|
3387
|
+
let t = i(e);
|
|
3388
|
+
if (t === void 0 || !Number.isFinite(t)) throw TypeError(`Bar group value "${String(e)}" is outside the group layout scale domain`);
|
|
3389
|
+
return t;
|
|
3390
|
+
}
|
|
3391
|
+
};
|
|
3392
|
+
}
|
|
3393
|
+
function hi(e) {
|
|
3394
|
+
let t = /* @__PURE__ */ new Set();
|
|
3395
|
+
for (let n of e) {
|
|
3396
|
+
if (!N(n)) continue;
|
|
3397
|
+
let e = M(n);
|
|
3398
|
+
if (t.has(e)) return !0;
|
|
3399
|
+
t.add(e);
|
|
3400
|
+
}
|
|
3401
|
+
return !1;
|
|
3402
|
+
}
|
|
3403
|
+
function gi(e, t, n, r) {
|
|
3404
|
+
let i = [...new Set(t.filter(N).map(e.map).filter((e) => Number.isFinite(e)))].sort((e, t) => e - t), a = Infinity;
|
|
3405
|
+
for (let e = 1; e < i.length; e += 1) a = Math.min(a, i[e] - i[e - 1]);
|
|
3406
|
+
return Number.isFinite(a) ? a * .8 : Math.min(48, n / Math.max(2, r + 1) * .8);
|
|
3407
|
+
}
|
|
3408
|
+
function _i(e, t, n) {
|
|
3409
|
+
return typeof t == "number" ? e.map(() => t) : I(e, t, n);
|
|
3410
|
+
}
|
|
3411
|
+
//#endregion
|
|
3412
|
+
//#region src/tanStackCharts.ts
|
|
3413
|
+
function vi(n, r) {
|
|
3414
|
+
let i = {
|
|
3415
|
+
ariaLabel: "Bar chart",
|
|
3416
|
+
definition: lt({
|
|
3417
|
+
marks: [fi(yi(n), {
|
|
3418
|
+
color: "seriesName",
|
|
3419
|
+
fill: "seriesName",
|
|
3420
|
+
layout: _(),
|
|
3421
|
+
x: "category",
|
|
3422
|
+
y: "value",
|
|
3423
|
+
z: "seriesName"
|
|
3424
|
+
})],
|
|
3425
|
+
x: { scale: () => t().padding(.2) },
|
|
3426
|
+
y: {
|
|
3427
|
+
grid: !0,
|
|
3428
|
+
nice: !0,
|
|
3429
|
+
scale: e
|
|
3430
|
+
}
|
|
3431
|
+
})
|
|
3432
|
+
}, a = di(r, i);
|
|
3433
|
+
function o() {
|
|
3434
|
+
let e = r.querySelector("svg");
|
|
3435
|
+
if (e == null) throw Error("Failed to create TanStack Charts SVG element.");
|
|
3436
|
+
return e;
|
|
3437
|
+
}
|
|
3438
|
+
return {
|
|
3439
|
+
destroy: () => {
|
|
3440
|
+
a.destroy();
|
|
3441
|
+
},
|
|
3442
|
+
resize: () => {
|
|
3443
|
+
a.update(i);
|
|
3444
|
+
},
|
|
3445
|
+
get svg() {
|
|
3446
|
+
return o();
|
|
3447
|
+
}
|
|
3448
|
+
};
|
|
3449
|
+
}
|
|
3450
|
+
function yi(e) {
|
|
3451
|
+
let t = [];
|
|
3452
|
+
for (let n of e.series) for (let [r, i] of e.categories.entries()) t.push({
|
|
3453
|
+
category: i,
|
|
3454
|
+
seriesName: n.name,
|
|
3455
|
+
value: n.values[r] ?? 0
|
|
3456
|
+
});
|
|
3457
|
+
return t;
|
|
3458
|
+
}
|
|
3459
|
+
//#endregion
|
|
3460
|
+
export { vi as renderTanStackCharts };
|
|
3461
|
+
|
|
3462
|
+
//# sourceMappingURL=tanStackCharts-DNzjtkwh.js.map
|