@konstructio/ui 0.1.2-alpha.13 → 0.1.2-alpha.15
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/{chevron-down-Cx07rtLP.js → chevron-down-J5nS1Tu0.js} +2 -2
- package/dist/{chevron-right-DCDOrc04.js → chevron-right-DeMVrnIg.js} +3 -3
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Dropdown/Dropdown.variants.js +9 -4
- package/dist/components/Dropdown/components/List/List.js +55 -51
- package/dist/components/Dropdown/components/ListItem/ListItem.js +58 -36
- package/dist/components/Dropdown/components/Wrapper.js +128 -118
- package/dist/components/Dropdown/hooks/useDropdown.js +16 -12
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/PieChart/PieChart.js +460 -461
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/{createLucideIcon-DnY-81vT.js → createLucideIcon-DGhJ8Z4k.js} +4 -4
- package/dist/index.d.ts +4 -0
- package/dist/package.json +9 -9
- package/dist/styles.css +1 -1
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as ve } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Cs, useRef as Ie, useEffect as dt, useMemo as re } from "react";
|
|
3
3
|
/*!
|
|
4
4
|
* @kurkle/color v0.3.4
|
|
5
5
|
* https://github.com/kurkle/color#readme
|
|
@@ -19,11 +19,11 @@ function et(e) {
|
|
|
19
19
|
function G(e) {
|
|
20
20
|
return Q(It(e / 2.55) / 100, 0, 1);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Te(e) {
|
|
23
23
|
return Q(It(e * 100), 0, 100);
|
|
24
24
|
}
|
|
25
|
-
const N = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, me = [..."0123456789ABCDEF"],
|
|
26
|
-
function
|
|
25
|
+
const N = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, me = [..."0123456789ABCDEF"], ci = (e) => me[e & 15], li = (e) => me[(e & 240) >> 4] + me[e & 15], zt = (e) => (e & 240) >> 4 === (e & 15), hi = (e) => zt(e.r) && zt(e.g) && zt(e.b) && zt(e.a);
|
|
26
|
+
function di(e) {
|
|
27
27
|
var t = e.length, s;
|
|
28
28
|
return e[0] === "#" && (t === 4 || t === 5 ? s = {
|
|
29
29
|
r: 255 & N[e[1]] * 17,
|
|
@@ -37,75 +37,75 @@ function fi(e) {
|
|
|
37
37
|
a: t === 9 ? N[e[7]] << 4 | N[e[8]] : 255
|
|
38
38
|
})), s;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
var t =
|
|
43
|
-
return e ? "#" + t(e.r) + t(e.g) + t(e.b) +
|
|
40
|
+
const fi = (e, t) => e < 255 ? t(e) : "";
|
|
41
|
+
function ui(e) {
|
|
42
|
+
var t = hi(e) ? ci : li;
|
|
43
|
+
return e ? "#" + t(e.r) + t(e.g) + t(e.b) + fi(e.a, t) : void 0;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const gi = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
46
46
|
function As(e, t, s) {
|
|
47
47
|
const i = t * Math.min(s, 1 - s), n = (o, r = (o + e / 30) % 12) => s - i * Math.max(Math.min(r - 3, 9 - r, 1), -1);
|
|
48
48
|
return [n(0), n(8), n(4)];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function pi(e, t, s) {
|
|
51
51
|
const i = (n, o = (n + e / 60) % 6) => s - s * t * Math.max(Math.min(o, 4 - o, 1), 0);
|
|
52
52
|
return [i(5), i(3), i(1)];
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function mi(e, t, s) {
|
|
55
55
|
const i = As(e, 1, 0.5);
|
|
56
56
|
let n;
|
|
57
57
|
for (t + s > 1 && (n = 1 / (t + s), t *= n, s *= n), n = 0; n < 3; n++)
|
|
58
58
|
i[n] *= 1 - t - s, i[n] += t;
|
|
59
59
|
return i;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function _i(e, t, s, i, n) {
|
|
62
62
|
return e === n ? (t - s) / i + (t < s ? 6 : 0) : t === n ? (s - e) / i + 2 : (e - t) / i + 4;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function we(e) {
|
|
65
65
|
const s = e.r / 255, i = e.g / 255, n = e.b / 255, o = Math.max(s, i, n), r = Math.min(s, i, n), a = (o + r) / 2;
|
|
66
66
|
let c, l, h;
|
|
67
|
-
return o !== r && (h = o - r, l = a > 0.5 ? h / (2 - o - r) : h / (o + r), c =
|
|
67
|
+
return o !== r && (h = o - r, l = a > 0.5 ? h / (2 - o - r) : h / (o + r), c = _i(s, i, n, h, o), c = c * 60 + 0.5), [c | 0, l || 0, a];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Me(e, t, s, i) {
|
|
70
70
|
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, s, i)).map(et);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function ke(e, t, s) {
|
|
73
|
+
return Me(As, e, t, s);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
75
|
+
function bi(e, t, s) {
|
|
76
|
+
return Me(mi, e, t, s);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function xi(e, t, s) {
|
|
79
|
+
return Me(pi, e, t, s);
|
|
80
80
|
}
|
|
81
81
|
function Ps(e) {
|
|
82
82
|
return (e % 360 + 360) % 360;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const t =
|
|
84
|
+
function yi(e) {
|
|
85
|
+
const t = gi.exec(e);
|
|
86
86
|
let s = 255, i;
|
|
87
87
|
if (!t)
|
|
88
88
|
return;
|
|
89
89
|
t[5] !== i && (s = t[6] ? kt(+t[5]) : et(+t[5]));
|
|
90
90
|
const n = Ps(+t[2]), o = +t[3] / 100, r = +t[4] / 100;
|
|
91
|
-
return t[1] === "hwb" ? i =
|
|
91
|
+
return t[1] === "hwb" ? i = bi(n, o, r) : t[1] === "hsv" ? i = xi(n, o, r) : i = ke(n, o, r), {
|
|
92
92
|
r: i[0],
|
|
93
93
|
g: i[1],
|
|
94
94
|
b: i[2],
|
|
95
95
|
a: s
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
var s =
|
|
100
|
-
s[0] = Ps(s[0] + t), s =
|
|
98
|
+
function vi(e, t) {
|
|
99
|
+
var s = we(e);
|
|
100
|
+
s[0] = Ps(s[0] + t), s = ke(s), e.r = s[0], e.g = s[1], e.b = s[2];
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function wi(e) {
|
|
103
103
|
if (!e)
|
|
104
104
|
return;
|
|
105
|
-
const t =
|
|
105
|
+
const t = we(e), s = t[0], i = Te(t[1]), n = Te(t[2]);
|
|
106
106
|
return e.a < 255 ? `hsla(${s}, ${i}%, ${n}%, ${G(e.a)})` : `hsl(${s}, ${i}%, ${n}%)`;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Le = {
|
|
109
109
|
x: "dark",
|
|
110
110
|
Z: "light",
|
|
111
111
|
Y: "re",
|
|
@@ -133,7 +133,7 @@ const Te = {
|
|
|
133
133
|
H: "ea",
|
|
134
134
|
I: "ightg",
|
|
135
135
|
J: "wh"
|
|
136
|
-
},
|
|
136
|
+
}, ze = {
|
|
137
137
|
OiceXe: "f0f8ff",
|
|
138
138
|
antiquewEte: "faebd7",
|
|
139
139
|
aqua: "ffff",
|
|
@@ -283,19 +283,19 @@ const Te = {
|
|
|
283
283
|
Lw: "ffff00",
|
|
284
284
|
LwgYF: "9acd32"
|
|
285
285
|
};
|
|
286
|
-
function
|
|
287
|
-
const e = {}, t = Object.keys(
|
|
286
|
+
function Mi() {
|
|
287
|
+
const e = {}, t = Object.keys(ze), s = Object.keys(Le);
|
|
288
288
|
let i, n, o, r, a;
|
|
289
289
|
for (i = 0; i < t.length; i++) {
|
|
290
290
|
for (r = a = t[i], n = 0; n < s.length; n++)
|
|
291
|
-
o = s[n], a = a.replace(o,
|
|
292
|
-
o = parseInt(
|
|
291
|
+
o = s[n], a = a.replace(o, Le[o]);
|
|
292
|
+
o = parseInt(ze[r], 16), e[a] = [o >> 16 & 255, o >> 8 & 255, o & 255];
|
|
293
293
|
}
|
|
294
294
|
return e;
|
|
295
295
|
}
|
|
296
296
|
let Ft;
|
|
297
|
-
function
|
|
298
|
-
Ft || (Ft =
|
|
297
|
+
function ki(e) {
|
|
298
|
+
Ft || (Ft = Mi(), Ft.transparent = [0, 0, 0, 0]);
|
|
299
299
|
const t = Ft[e.toLowerCase()];
|
|
300
300
|
return t && {
|
|
301
301
|
r: t[0],
|
|
@@ -304,9 +304,9 @@ function Si(e) {
|
|
|
304
304
|
a: t.length === 4 ? t[3] : 255
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
const
|
|
308
|
-
function
|
|
309
|
-
const t =
|
|
307
|
+
const Si = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
308
|
+
function Oi(e) {
|
|
309
|
+
const t = Si.exec(e);
|
|
310
310
|
let s = 255, i, n, o;
|
|
311
311
|
if (t) {
|
|
312
312
|
if (t[7] !== i) {
|
|
@@ -321,11 +321,11 @@ function Di(e) {
|
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Di(e) {
|
|
325
325
|
return e && (e.a < 255 ? `rgba(${e.r}, ${e.g}, ${e.b}, ${G(e.a)})` : `rgb(${e.r}, ${e.g}, ${e.b})`);
|
|
326
326
|
}
|
|
327
327
|
const ae = (e) => e <= 31308e-7 ? e * 12.92 : Math.pow(e, 1 / 2.4) * 1.055 - 0.055, ft = (e) => e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
328
|
-
function
|
|
328
|
+
function Ci(e, t, s) {
|
|
329
329
|
const i = ft(G(e.r)), n = ft(G(e.g)), o = ft(G(e.b));
|
|
330
330
|
return {
|
|
331
331
|
r: et(ae(i + s * (ft(G(t.r)) - i))),
|
|
@@ -336,19 +336,19 @@ function Ai(e, t, s) {
|
|
|
336
336
|
}
|
|
337
337
|
function jt(e, t, s) {
|
|
338
338
|
if (e) {
|
|
339
|
-
let i =
|
|
340
|
-
i[t] = Math.max(0, Math.min(i[t] + i[t] * s, t === 0 ? 360 : 1)), i =
|
|
339
|
+
let i = we(e);
|
|
340
|
+
i[t] = Math.max(0, Math.min(i[t] + i[t] * s, t === 0 ? 360 : 1)), i = ke(i), e.r = i[0], e.g = i[1], e.b = i[2];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
function Es(e, t) {
|
|
344
344
|
return e && Object.assign(t || {}, e);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Fe(e) {
|
|
347
347
|
var t = { r: 0, g: 0, b: 0, a: 255 };
|
|
348
348
|
return Array.isArray(e) ? e.length >= 3 && (t = { r: e[0], g: e[1], b: e[2], a: 255 }, e.length > 3 && (t.a = et(e[3]))) : (t = Es(e, { r: 0, g: 0, b: 0, a: 1 }), t.a = et(t.a)), t;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
return e.charAt(0) === "r" ?
|
|
350
|
+
function Ai(e) {
|
|
351
|
+
return e.charAt(0) === "r" ? Oi(e) : yi(e);
|
|
352
352
|
}
|
|
353
353
|
class Ct {
|
|
354
354
|
constructor(t) {
|
|
@@ -356,7 +356,7 @@ class Ct {
|
|
|
356
356
|
return t;
|
|
357
357
|
const s = typeof t;
|
|
358
358
|
let i;
|
|
359
|
-
s === "object" ? i =
|
|
359
|
+
s === "object" ? i = Fe(t) : s === "string" && (i = di(t) || ki(t) || Ai(t)), this._rgb = i, this._valid = !!i;
|
|
360
360
|
}
|
|
361
361
|
get valid() {
|
|
362
362
|
return this._valid;
|
|
@@ -366,16 +366,16 @@ class Ct {
|
|
|
366
366
|
return t && (t.a = G(t.a)), t;
|
|
367
367
|
}
|
|
368
368
|
set rgb(t) {
|
|
369
|
-
this._rgb =
|
|
369
|
+
this._rgb = Fe(t);
|
|
370
370
|
}
|
|
371
371
|
rgbString() {
|
|
372
|
-
return this._valid ?
|
|
372
|
+
return this._valid ? Di(this._rgb) : void 0;
|
|
373
373
|
}
|
|
374
374
|
hexString() {
|
|
375
|
-
return this._valid ?
|
|
375
|
+
return this._valid ? ui(this._rgb) : void 0;
|
|
376
376
|
}
|
|
377
377
|
hslString() {
|
|
378
|
-
return this._valid ?
|
|
378
|
+
return this._valid ? wi(this._rgb) : void 0;
|
|
379
379
|
}
|
|
380
380
|
mix(t, s) {
|
|
381
381
|
if (t) {
|
|
@@ -387,7 +387,7 @@ class Ct {
|
|
|
387
387
|
return this;
|
|
388
388
|
}
|
|
389
389
|
interpolate(t, s) {
|
|
390
|
-
return t && (this._rgb =
|
|
390
|
+
return t && (this._rgb = Ci(this._rgb, t._rgb, s)), this;
|
|
391
391
|
}
|
|
392
392
|
clone() {
|
|
393
393
|
return new Ct(this.rgb);
|
|
@@ -424,7 +424,7 @@ class Ct {
|
|
|
424
424
|
return jt(this._rgb, 1, -t), this;
|
|
425
425
|
}
|
|
426
426
|
rotate(t) {
|
|
427
|
-
return
|
|
427
|
+
return vi(this._rgb, t), this;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
/*!
|
|
@@ -433,7 +433,7 @@ class Ct {
|
|
|
433
433
|
* (c) 2025 Chart.js Contributors
|
|
434
434
|
* Released under the MIT License
|
|
435
435
|
*/
|
|
436
|
-
const
|
|
436
|
+
const Pi = /* @__PURE__ */ (() => {
|
|
437
437
|
let e = 0;
|
|
438
438
|
return () => e++;
|
|
439
439
|
})();
|
|
@@ -458,7 +458,7 @@ function K(e, t) {
|
|
|
458
458
|
function A(e, t) {
|
|
459
459
|
return typeof e > "u" ? t : e;
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const Ei = (e, t) => typeof e == "string" && e.endsWith("%") ? parseFloat(e) / 100 : +e / t, Rs = (e, t) => typeof e == "string" && e.endsWith("%") ? parseFloat(e) / 100 * t : +e;
|
|
462
462
|
function E(e, t, s) {
|
|
463
463
|
if (e && typeof e.call == "function")
|
|
464
464
|
return e.apply(s, t);
|
|
@@ -472,7 +472,7 @@ function j(e, t, s, i) {
|
|
|
472
472
|
for (r = Object.keys(e), o = r.length, n = 0; n < o; n++)
|
|
473
473
|
t.call(s, e[r[n]], r[n]);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function je(e, t) {
|
|
476
476
|
let s, i, n, o;
|
|
477
477
|
if (!e || !t || e.length !== t.length)
|
|
478
478
|
return !1;
|
|
@@ -500,7 +500,7 @@ function Is(e) {
|
|
|
500
500
|
"constructor"
|
|
501
501
|
].indexOf(e) === -1;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ri(e, t, s, i) {
|
|
504
504
|
if (!Is(e))
|
|
505
505
|
return;
|
|
506
506
|
const n = t[e], o = s[e];
|
|
@@ -513,7 +513,7 @@ function At(e, t, s) {
|
|
|
513
513
|
if (!w(e))
|
|
514
514
|
return e;
|
|
515
515
|
s = s || {};
|
|
516
|
-
const o = s.merger ||
|
|
516
|
+
const o = s.merger || Ri;
|
|
517
517
|
let r;
|
|
518
518
|
for (let a = 0; a < n; ++a) {
|
|
519
519
|
if (r = i[a], !w(r))
|
|
@@ -526,31 +526,31 @@ function At(e, t, s) {
|
|
|
526
526
|
}
|
|
527
527
|
function Kt(e, t) {
|
|
528
528
|
return At(e, t, {
|
|
529
|
-
merger:
|
|
529
|
+
merger: Ii
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function Ii(e, t, s) {
|
|
533
533
|
if (!Is(e))
|
|
534
534
|
return;
|
|
535
535
|
const i = t[e], n = s[e];
|
|
536
536
|
w(i) && w(n) ? Kt(i, n) : Object.prototype.hasOwnProperty.call(t, e) || (t[e] = Zt(n));
|
|
537
537
|
}
|
|
538
|
-
const
|
|
538
|
+
const Be = {
|
|
539
539
|
// Chart.helpers.core resolveObjectKey should resolve empty key to root object
|
|
540
540
|
"": (e) => e,
|
|
541
541
|
// default resolvers
|
|
542
542
|
x: (e) => e.x,
|
|
543
543
|
y: (e) => e.y
|
|
544
544
|
};
|
|
545
|
-
function
|
|
545
|
+
function Ti(e) {
|
|
546
546
|
const t = e.split("."), s = [];
|
|
547
547
|
let i = "";
|
|
548
548
|
for (const n of t)
|
|
549
549
|
i += n, i.endsWith("\\") ? i = i.slice(0, -1) + "." : (s.push(i), i = "");
|
|
550
550
|
return s;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
const t =
|
|
552
|
+
function Li(e) {
|
|
553
|
+
const t = Ti(e);
|
|
554
554
|
return (s) => {
|
|
555
555
|
for (const i of t) {
|
|
556
556
|
if (i === "")
|
|
@@ -561,12 +561,12 @@ function zi(e) {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
function Pt(e, t) {
|
|
564
|
-
return (
|
|
564
|
+
return (Be[t] || (Be[t] = Li(t)))(e);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Se(e) {
|
|
567
567
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
568
568
|
}
|
|
569
|
-
const Gt = (e) => typeof e < "u", st = (e) => typeof e == "function",
|
|
569
|
+
const Gt = (e) => typeof e < "u", st = (e) => typeof e == "function", He = (e, t) => {
|
|
570
570
|
if (e.size !== t.size)
|
|
571
571
|
return !1;
|
|
572
572
|
for (const s of e)
|
|
@@ -574,27 +574,27 @@ const Gt = (e) => typeof e < "u", st = (e) => typeof e == "function", Be = (e, t
|
|
|
574
574
|
return !1;
|
|
575
575
|
return !0;
|
|
576
576
|
};
|
|
577
|
-
function
|
|
577
|
+
function zi(e) {
|
|
578
578
|
return e.type === "mouseup" || e.type === "click" || e.type === "contextmenu";
|
|
579
579
|
}
|
|
580
|
-
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2,
|
|
581
|
-
function
|
|
580
|
+
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2, We = Math.sign;
|
|
581
|
+
function Fi(e) {
|
|
582
582
|
const t = [], s = Math.sqrt(e);
|
|
583
583
|
let i;
|
|
584
584
|
for (i = 1; i < s; i++)
|
|
585
585
|
e % i === 0 && (t.push(i), t.push(e / i));
|
|
586
586
|
return s === (s | 0) && t.push(s), t.sort((n, o) => n - o).pop(), t;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function ji(e) {
|
|
589
589
|
return typeof e == "symbol" || typeof e == "object" && e !== null && !(Symbol.toPrimitive in e || "toString" in e || "valueOf" in e);
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
return !
|
|
591
|
+
function Ve(e) {
|
|
592
|
+
return !ji(e) && !isNaN(parseFloat(e)) && isFinite(e);
|
|
593
593
|
}
|
|
594
594
|
function gt(e) {
|
|
595
595
|
return e * (z / 180);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Bi(e) {
|
|
598
598
|
return e * (180 / z);
|
|
599
599
|
}
|
|
600
600
|
function Ts(e, t) {
|
|
@@ -615,10 +615,10 @@ function Jt(e, t, s, i) {
|
|
|
615
615
|
function J(e, t, s) {
|
|
616
616
|
return Math.max(t, Math.min(s, e));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Hi(e) {
|
|
619
619
|
return J(e, -32768, 32767);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Wi(e, t, s, i = 1e-6) {
|
|
622
622
|
return e >= Math.min(t, s) - i && e <= Math.max(t, s) + i;
|
|
623
623
|
}
|
|
624
624
|
function Ls(e, t, s) {
|
|
@@ -631,17 +631,17 @@ function Ls(e, t, s) {
|
|
|
631
631
|
hi: i
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const Vi = (e, t, s, i) => Ls(e, s, i ? (n) => {
|
|
635
635
|
const o = e[n][t];
|
|
636
636
|
return o < s || o === s && e[n + 1][t] === s;
|
|
637
|
-
} : (n) => e[n][t] < s),
|
|
637
|
+
} : (n) => e[n][t] < s), Ni = (e, t, s) => Ls(e, s, (i) => e[i][t] >= s), zs = [
|
|
638
638
|
"push",
|
|
639
639
|
"pop",
|
|
640
640
|
"shift",
|
|
641
641
|
"splice",
|
|
642
642
|
"unshift"
|
|
643
643
|
];
|
|
644
|
-
function
|
|
644
|
+
function $i(e, t) {
|
|
645
645
|
if (e._chartjs) {
|
|
646
646
|
e._chartjs.listeners.push(t);
|
|
647
647
|
return;
|
|
@@ -655,7 +655,7 @@ function Yi(e, t) {
|
|
|
655
655
|
]
|
|
656
656
|
}
|
|
657
657
|
}), zs.forEach((s) => {
|
|
658
|
-
const i = "_onData" +
|
|
658
|
+
const i = "_onData" + Se(s), n = e[s];
|
|
659
659
|
Object.defineProperty(e, s, {
|
|
660
660
|
configurable: !0,
|
|
661
661
|
enumerable: !1,
|
|
@@ -668,7 +668,7 @@ function Yi(e, t) {
|
|
|
668
668
|
});
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Ne(e, t) {
|
|
672
672
|
const s = e._chartjs;
|
|
673
673
|
if (!s)
|
|
674
674
|
return;
|
|
@@ -690,13 +690,13 @@ function js(e, t) {
|
|
|
690
690
|
}));
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Yi(e, t) {
|
|
694
694
|
let s;
|
|
695
695
|
return function(...i) {
|
|
696
696
|
return t ? (clearTimeout(s), s = setTimeout(e, t, i)) : e.apply(this, i), t;
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
|
-
const
|
|
699
|
+
const Xi = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", $e = (e, t, s) => e === "start" ? t : e === "end" ? s : (t + s) / 2, Bt = (e) => e === 0 || e === 1, Ye = (e, t, s) => -(Math.pow(2, 10 * (e -= 1)) * Math.sin((e - t) * T / s)), Xe = (e, t, s) => Math.pow(2, -10 * e) * Math.sin((e - t) * T / s) + 1, Ot = {
|
|
700
700
|
linear: (e) => e,
|
|
701
701
|
easeInQuad: (e) => e * e,
|
|
702
702
|
easeOutQuad: (e) => -e * (e - 2),
|
|
@@ -719,10 +719,10 @@ const Ki = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", Ne
|
|
|
719
719
|
easeInCirc: (e) => e >= 1 ? e : -(Math.sqrt(1 - e * e) - 1),
|
|
720
720
|
easeOutCirc: (e) => Math.sqrt(1 - (e -= 1) * e),
|
|
721
721
|
easeInOutCirc: (e) => (e /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1),
|
|
722
|
-
easeInElastic: (e) => Bt(e) ? e :
|
|
723
|
-
easeOutElastic: (e) => Bt(e) ? e :
|
|
722
|
+
easeInElastic: (e) => Bt(e) ? e : Ye(e, 0.075, 0.3),
|
|
723
|
+
easeOutElastic: (e) => Bt(e) ? e : Xe(e, 0.075, 0.3),
|
|
724
724
|
easeInOutElastic(e) {
|
|
725
|
-
return Bt(e) ? e : e < 0.5 ? 0.5 *
|
|
725
|
+
return Bt(e) ? e : e < 0.5 ? 0.5 * Ye(e * 2, 0.1125, 0.45) : 0.5 + 0.5 * Xe(e * 2 - 1, 0.1125, 0.45);
|
|
726
726
|
},
|
|
727
727
|
easeInBack(e) {
|
|
728
728
|
return e * e * ((1.70158 + 1) * e - 1.70158);
|
|
@@ -747,24 +747,24 @@ function Bs(e) {
|
|
|
747
747
|
}
|
|
748
748
|
return !1;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Ke(e) {
|
|
751
751
|
return Bs(e) ? e : new Ct(e);
|
|
752
752
|
}
|
|
753
753
|
function ce(e) {
|
|
754
754
|
return Bs(e) ? e : new Ct(e).saturate(0.5).darken(0.1).hexString();
|
|
755
755
|
}
|
|
756
|
-
const
|
|
756
|
+
const Ki = [
|
|
757
757
|
"x",
|
|
758
758
|
"y",
|
|
759
759
|
"borderWidth",
|
|
760
760
|
"radius",
|
|
761
761
|
"tension"
|
|
762
|
-
],
|
|
762
|
+
], Ui = [
|
|
763
763
|
"color",
|
|
764
764
|
"borderColor",
|
|
765
765
|
"backgroundColor"
|
|
766
766
|
];
|
|
767
|
-
function
|
|
767
|
+
function qi(e) {
|
|
768
768
|
e.set("animation", {
|
|
769
769
|
delay: void 0,
|
|
770
770
|
duration: 1e3,
|
|
@@ -781,11 +781,11 @@ function Zi(e) {
|
|
|
781
781
|
}), e.set("animations", {
|
|
782
782
|
colors: {
|
|
783
783
|
type: "color",
|
|
784
|
-
properties:
|
|
784
|
+
properties: Ui
|
|
785
785
|
},
|
|
786
786
|
numbers: {
|
|
787
787
|
type: "number",
|
|
788
|
-
properties:
|
|
788
|
+
properties: Ki
|
|
789
789
|
}
|
|
790
790
|
}), e.describe("animations", {
|
|
791
791
|
_fallback: "animation"
|
|
@@ -825,7 +825,7 @@ function Zi(e) {
|
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Zi(e) {
|
|
829
829
|
e.set("layout", {
|
|
830
830
|
autoPadding: !0,
|
|
831
831
|
padding: {
|
|
@@ -836,25 +836,25 @@ function Gi(e) {
|
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
839
|
+
const Ue = /* @__PURE__ */ new Map();
|
|
840
|
+
function Gi(e, t) {
|
|
841
841
|
t = t || {};
|
|
842
842
|
const s = e + JSON.stringify(t);
|
|
843
|
-
let i =
|
|
844
|
-
return i || (i = new Intl.NumberFormat(e, t),
|
|
843
|
+
let i = Ue.get(s);
|
|
844
|
+
return i || (i = new Intl.NumberFormat(e, t), Ue.set(s, i)), i;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
846
|
+
function Qi(e, t, s) {
|
|
847
|
+
return Gi(t, s).format(e);
|
|
848
848
|
}
|
|
849
|
-
const
|
|
849
|
+
const Ji = {
|
|
850
850
|
values(e) {
|
|
851
851
|
return B(e) ? e : "" + e;
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
var
|
|
855
|
-
formatters:
|
|
854
|
+
var tn = {
|
|
855
|
+
formatters: Ji
|
|
856
856
|
};
|
|
857
|
-
function
|
|
857
|
+
function en(e) {
|
|
858
858
|
e.set("scale", {
|
|
859
859
|
display: !0,
|
|
860
860
|
offset: !1,
|
|
@@ -898,7 +898,7 @@ function sn(e) {
|
|
|
898
898
|
autoSkip: !0,
|
|
899
899
|
autoSkipPadding: 3,
|
|
900
900
|
labelOffset: 0,
|
|
901
|
-
callback:
|
|
901
|
+
callback: tn.formatters.values,
|
|
902
902
|
minor: {},
|
|
903
903
|
major: {},
|
|
904
904
|
align: "center",
|
|
@@ -932,7 +932,7 @@ function Dt(e, t) {
|
|
|
932
932
|
function le(e, t, s) {
|
|
933
933
|
return typeof t == "string" ? At(Dt(e, t), s) : At(Dt(e, ""), t);
|
|
934
934
|
}
|
|
935
|
-
class
|
|
935
|
+
class sn {
|
|
936
936
|
constructor(t, s) {
|
|
937
937
|
this.animation = void 0, this.backgroundColor = "rgba(0,0,0,0.1)", this.borderColor = "rgba(0,0,0,0.1)", this.color = "#666", this.datasets = {}, this.devicePixelRatio = (i) => i.chart.platform.getDevicePixelRatio(), this.elements = {}, this.events = [
|
|
938
938
|
"mousemove",
|
|
@@ -987,7 +987,7 @@ class nn {
|
|
|
987
987
|
t.forEach((s) => s(this));
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
var R = /* @__PURE__ */ new
|
|
990
|
+
var R = /* @__PURE__ */ new sn({
|
|
991
991
|
_scriptable: (e) => !e.startsWith("on"),
|
|
992
992
|
_indexable: (e) => e !== "events",
|
|
993
993
|
hover: {
|
|
@@ -998,14 +998,14 @@ var R = /* @__PURE__ */ new nn({
|
|
|
998
998
|
_indexable: !1
|
|
999
999
|
}
|
|
1000
1000
|
}, [
|
|
1001
|
+
qi,
|
|
1001
1002
|
Zi,
|
|
1002
|
-
|
|
1003
|
-
sn
|
|
1003
|
+
en
|
|
1004
1004
|
]);
|
|
1005
|
-
function
|
|
1005
|
+
function nn(e) {
|
|
1006
1006
|
return !e || W(e.size) || W(e.family) ? null : (e.style ? e.style + " " : "") + (e.weight ? e.weight + " " : "") + e.size + "px " + e.family;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function qe(e, t, s, i, n) {
|
|
1009
1009
|
let o = t[n];
|
|
1010
1010
|
return o || (o = t[n] = e.measureText(n).width, s.push(n)), o > i && (i = o), i;
|
|
1011
1011
|
}
|
|
@@ -1013,7 +1013,7 @@ function ot(e, t, s) {
|
|
|
1013
1013
|
const i = e.currentDevicePixelRatio, n = s !== 0 ? Math.max(s / 2, 0.5) : 0;
|
|
1014
1014
|
return Math.round((t - n) * i) / i + n;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function Ze(e, t) {
|
|
1017
1017
|
!t && !e || (t = t || e.getContext("2d"), t.save(), t.resetTransform(), t.clearRect(0, 0, e.width, e.height), t.restore());
|
|
1018
1018
|
}
|
|
1019
1019
|
function Hs(e, t, s) {
|
|
@@ -1025,31 +1025,31 @@ function Ws(e, t) {
|
|
|
1025
1025
|
function Vs(e) {
|
|
1026
1026
|
e.restore();
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function on(e, t) {
|
|
1029
1029
|
t.translation && e.translate(t.translation[0], t.translation[1]), W(t.rotation) || e.rotate(t.rotation), t.color && (e.fillStyle = t.color), t.textAlign && (e.textAlign = t.textAlign), t.textBaseline && (e.textBaseline = t.textBaseline);
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function rn(e, t, s, i, n) {
|
|
1032
1032
|
if (n.strikethrough || n.underline) {
|
|
1033
1033
|
const o = e.measureText(i), r = t - o.actualBoundingBoxLeft, a = t + o.actualBoundingBoxRight, c = s - o.actualBoundingBoxAscent, l = s + o.actualBoundingBoxDescent, h = n.strikethrough ? (c + l) / 2 : l;
|
|
1034
1034
|
e.strokeStyle = e.fillStyle, e.beginPath(), e.lineWidth = n.decorationWidth || 2, e.moveTo(r, h), e.lineTo(a, h), e.stroke();
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function an(e, t) {
|
|
1038
1038
|
const s = e.fillStyle;
|
|
1039
1039
|
e.fillStyle = t.color, e.fillRect(t.left, t.top, t.width, t.height), e.fillStyle = s;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function Ge(e, t, s, i, n, o = {}) {
|
|
1042
1042
|
const r = B(t) ? t : [
|
|
1043
1043
|
t
|
|
1044
1044
|
], a = o.strokeWidth > 0 && o.strokeColor !== "";
|
|
1045
1045
|
let c, l;
|
|
1046
|
-
for (e.save(), e.font = n.string,
|
|
1047
|
-
l = r[c], o.backdrop &&
|
|
1046
|
+
for (e.save(), e.font = n.string, on(e, o), c = 0; c < r.length; ++c)
|
|
1047
|
+
l = r[c], o.backdrop && an(e, o.backdrop), a && (o.strokeColor && (e.strokeStyle = o.strokeColor), W(o.strokeWidth) || (e.lineWidth = o.strokeWidth), e.strokeText(l, s, i, o.maxWidth)), e.fillText(l, s, i, o.maxWidth), rn(e, s, i, l, o), i += Number(n.lineHeight);
|
|
1048
1048
|
e.restore();
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1052
|
-
const s = ("" + e).match(
|
|
1050
|
+
const cn = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, ln = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
|
|
1051
|
+
function hn(e, t) {
|
|
1052
|
+
const s = ("" + e).match(cn);
|
|
1053
1053
|
if (!s || s[1] === "normal")
|
|
1054
1054
|
return t * 1.2;
|
|
1055
1055
|
switch (e = +s[2], s[3]) {
|
|
@@ -1061,14 +1061,14 @@ function dn(e, t) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
return t * e;
|
|
1063
1063
|
}
|
|
1064
|
-
const
|
|
1064
|
+
const dn = (e) => +e || 0;
|
|
1065
1065
|
function Ns(e, t) {
|
|
1066
1066
|
const s = {}, i = w(t), n = i ? Object.keys(t) : t, o = w(e) ? i ? (r) => A(e[r], e[t[r]]) : (r) => e[r] : () => e;
|
|
1067
1067
|
for (const r of n)
|
|
1068
|
-
s[r] =
|
|
1068
|
+
s[r] = dn(o(r));
|
|
1069
1069
|
return s;
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function fn(e) {
|
|
1072
1072
|
return Ns(e, {
|
|
1073
1073
|
top: "y",
|
|
1074
1074
|
right: "x",
|
|
@@ -1077,7 +1077,7 @@ function un(e) {
|
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
1079
|
function Et(e) {
|
|
1080
|
-
const t =
|
|
1080
|
+
const t = fn(e);
|
|
1081
1081
|
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
|
|
1082
1082
|
}
|
|
1083
1083
|
function be(e, t) {
|
|
@@ -1085,16 +1085,16 @@ function be(e, t) {
|
|
|
1085
1085
|
let s = A(e.size, t.size);
|
|
1086
1086
|
typeof s == "string" && (s = parseInt(s, 10));
|
|
1087
1087
|
let i = A(e.style, t.style);
|
|
1088
|
-
i && !("" + i).match(
|
|
1088
|
+
i && !("" + i).match(ln) && (console.warn('Invalid font style specified: "' + i + '"'), i = void 0);
|
|
1089
1089
|
const n = {
|
|
1090
1090
|
family: A(e.family, t.family),
|
|
1091
|
-
lineHeight:
|
|
1091
|
+
lineHeight: hn(A(e.lineHeight, t.lineHeight), s),
|
|
1092
1092
|
size: s,
|
|
1093
1093
|
style: i,
|
|
1094
1094
|
weight: A(e.weight, t.weight),
|
|
1095
1095
|
string: ""
|
|
1096
1096
|
};
|
|
1097
|
-
return n.string =
|
|
1097
|
+
return n.string = nn(n), n;
|
|
1098
1098
|
}
|
|
1099
1099
|
function Ht(e, t, s, i) {
|
|
1100
1100
|
let n, o, r;
|
|
@@ -1102,7 +1102,7 @@ function Ht(e, t, s, i) {
|
|
|
1102
1102
|
if (r = e[n], r !== void 0 && r !== void 0)
|
|
1103
1103
|
return r;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function un(e, t, s) {
|
|
1106
1106
|
const { min: i, max: n } = e, o = Rs(t, (n - i) / 2), r = (a, c) => s && a === 0 ? 0 : a + c;
|
|
1107
1107
|
return {
|
|
1108
1108
|
min: r(i, -Math.abs(o)),
|
|
@@ -1112,7 +1112,7 @@ function gn(e, t, s) {
|
|
|
1112
1112
|
function Tt(e, t) {
|
|
1113
1113
|
return Object.assign(Object.create(e), t);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Oe(e, t = [
|
|
1116
1116
|
""
|
|
1117
1117
|
], s, i, n = () => e[0]) {
|
|
1118
1118
|
const o = s || e;
|
|
@@ -1124,7 +1124,7 @@ function Se(e, t = [
|
|
|
1124
1124
|
_rootScopes: o,
|
|
1125
1125
|
_fallback: i,
|
|
1126
1126
|
_getTarget: n,
|
|
1127
|
-
override: (a) =>
|
|
1127
|
+
override: (a) => Oe([
|
|
1128
1128
|
a,
|
|
1129
1129
|
...e
|
|
1130
1130
|
], t, o, i)
|
|
@@ -1140,7 +1140,7 @@ function Se(e, t = [
|
|
|
1140
1140
|
* A trap for getting property values.
|
|
1141
1141
|
*/
|
|
1142
1142
|
get(a, c) {
|
|
1143
|
-
return Ys(a, c, () =>
|
|
1143
|
+
return Ys(a, c, () => vn(c, t, e, a));
|
|
1144
1144
|
},
|
|
1145
1145
|
/**
|
|
1146
1146
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1159,13 +1159,13 @@ function Se(e, t = [
|
|
|
1159
1159
|
* A trap for the in operator.
|
|
1160
1160
|
*/
|
|
1161
1161
|
has(a, c) {
|
|
1162
|
-
return
|
|
1162
|
+
return Je(a).includes(c);
|
|
1163
1163
|
},
|
|
1164
1164
|
/**
|
|
1165
1165
|
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
|
|
1166
1166
|
*/
|
|
1167
1167
|
ownKeys(a) {
|
|
1168
|
-
return
|
|
1168
|
+
return Je(a);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* A trap for setting property values.
|
|
@@ -1198,7 +1198,7 @@ function mt(e, t, s, i) {
|
|
|
1198
1198
|
* A trap for getting property values.
|
|
1199
1199
|
*/
|
|
1200
1200
|
get(o, r, a) {
|
|
1201
|
-
return Ys(o, r, () =>
|
|
1201
|
+
return Ys(o, r, () => pn(o, r, a));
|
|
1202
1202
|
},
|
|
1203
1203
|
/**
|
|
1204
1204
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1249,27 +1249,27 @@ function $s(e, t = {
|
|
|
1249
1249
|
isIndexable: st(i) ? i : () => i
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const gn = (e, t) => e ? e + Se(t) : t, De = (e, t) => w(t) && e !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
|
|
1253
1253
|
function Ys(e, t, s) {
|
|
1254
1254
|
if (Object.prototype.hasOwnProperty.call(e, t) || t === "constructor")
|
|
1255
1255
|
return e[t];
|
|
1256
1256
|
const i = s();
|
|
1257
1257
|
return e[t] = i, i;
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function pn(e, t, s) {
|
|
1260
1260
|
const { _proxy: i, _context: n, _subProxy: o, _descriptors: r } = e;
|
|
1261
1261
|
let a = i[t];
|
|
1262
|
-
return st(a) && r.isScriptable(t) && (a =
|
|
1262
|
+
return st(a) && r.isScriptable(t) && (a = mn(t, a, e, s)), B(a) && a.length && (a = _n(t, a, e, r.isIndexable)), De(t, a) && (a = mt(a, n, o && o[t], r)), a;
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function mn(e, t, s, i) {
|
|
1265
1265
|
const { _proxy: n, _context: o, _subProxy: r, _stack: a } = s;
|
|
1266
1266
|
if (a.has(e))
|
|
1267
1267
|
throw new Error("Recursion detected: " + Array.from(a).join("->") + "->" + e);
|
|
1268
1268
|
a.add(e);
|
|
1269
1269
|
let c = t(o, r || i);
|
|
1270
|
-
return a.delete(e),
|
|
1270
|
+
return a.delete(e), De(e, c) && (c = Ce(n._scopes, n, e, c)), c;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function _n(e, t, s, i) {
|
|
1273
1273
|
const { _proxy: n, _context: o, _subProxy: r, _descriptors: a } = s;
|
|
1274
1274
|
if (typeof o.index < "u" && i(e))
|
|
1275
1275
|
return t[o.index % t.length];
|
|
@@ -1277,7 +1277,7 @@ function bn(e, t, s, i) {
|
|
|
1277
1277
|
const c = t, l = n._scopes.filter((h) => h !== c);
|
|
1278
1278
|
t = [];
|
|
1279
1279
|
for (const h of c) {
|
|
1280
|
-
const d =
|
|
1280
|
+
const d = Ce(l, n, e, h);
|
|
1281
1281
|
t.push(mt(d, o, r && r[e], a));
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
@@ -1286,10 +1286,10 @@ function bn(e, t, s, i) {
|
|
|
1286
1286
|
function Xs(e, t, s) {
|
|
1287
1287
|
return st(e) ? e(t, s) : e;
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1290
|
-
function
|
|
1289
|
+
const bn = (e, t) => e === !0 ? t : typeof e == "string" ? Pt(t, e) : void 0;
|
|
1290
|
+
function xn(e, t, s, i, n) {
|
|
1291
1291
|
for (const o of t) {
|
|
1292
|
-
const r =
|
|
1292
|
+
const r = bn(s, o);
|
|
1293
1293
|
if (r) {
|
|
1294
1294
|
e.add(r);
|
|
1295
1295
|
const a = Xs(r._fallback, s, n);
|
|
@@ -1300,33 +1300,33 @@ function yn(e, t, s, i, n) {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
return !1;
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Ce(e, t, s, i) {
|
|
1304
1304
|
const n = t._rootScopes, o = Xs(t._fallback, s, i), r = [
|
|
1305
1305
|
...e,
|
|
1306
1306
|
...n
|
|
1307
1307
|
], a = /* @__PURE__ */ new Set();
|
|
1308
1308
|
a.add(i);
|
|
1309
|
-
let c =
|
|
1310
|
-
return c === null || typeof o < "u" && o !== s && (c =
|
|
1309
|
+
let c = Qe(a, r, s, o || s, i);
|
|
1310
|
+
return c === null || typeof o < "u" && o !== s && (c = Qe(a, r, o, c, i), c === null) ? !1 : Oe(Array.from(a), [
|
|
1311
1311
|
""
|
|
1312
|
-
], n, o, () =>
|
|
1312
|
+
], n, o, () => yn(t, s, i));
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Qe(e, t, s, i, n) {
|
|
1315
1315
|
for (; s; )
|
|
1316
|
-
s =
|
|
1316
|
+
s = xn(e, t, s, i, n);
|
|
1317
1317
|
return s;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function yn(e, t, s) {
|
|
1320
1320
|
const i = e._getTarget();
|
|
1321
1321
|
t in i || (i[t] = {});
|
|
1322
1322
|
const n = i[t];
|
|
1323
1323
|
return B(n) && w(s) ? s : n || {};
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function vn(e, t, s, i) {
|
|
1326
1326
|
let n;
|
|
1327
1327
|
for (const o of t)
|
|
1328
|
-
if (n = Ks(
|
|
1329
|
-
return
|
|
1328
|
+
if (n = Ks(gn(o, e), s), typeof n < "u")
|
|
1329
|
+
return De(e, n) ? Ce(s, i, e, n) : n;
|
|
1330
1330
|
}
|
|
1331
1331
|
function Ks(e, t) {
|
|
1332
1332
|
for (const s of t) {
|
|
@@ -1337,21 +1337,21 @@ function Ks(e, t) {
|
|
|
1337
1337
|
return i;
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Je(e) {
|
|
1341
1341
|
let t = e._keys;
|
|
1342
|
-
return t || (t = e._keys =
|
|
1342
|
+
return t || (t = e._keys = wn(e._scopes)), t;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function wn(e) {
|
|
1345
1345
|
const t = /* @__PURE__ */ new Set();
|
|
1346
1346
|
for (const s of e)
|
|
1347
1347
|
for (const i of Object.keys(s).filter((n) => !n.startsWith("_")))
|
|
1348
1348
|
t.add(i);
|
|
1349
1349
|
return Array.from(t);
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function Ae() {
|
|
1352
1352
|
return typeof window < "u" && typeof document < "u";
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Pe(e) {
|
|
1355
1355
|
let t = e.parentNode;
|
|
1356
1356
|
return t && t.toString() === "[object ShadowRoot]" && (t = t.host), t;
|
|
1357
1357
|
}
|
|
@@ -1360,10 +1360,10 @@ function te(e, t, s) {
|
|
|
1360
1360
|
return typeof e == "string" ? (i = parseInt(e, 10), e.indexOf("%") !== -1 && (i = i / 100 * t.parentNode[s])) : i = e, i;
|
|
1361
1361
|
}
|
|
1362
1362
|
const ie = (e) => e.ownerDocument.defaultView.getComputedStyle(e, null);
|
|
1363
|
-
function
|
|
1363
|
+
function Mn(e, t) {
|
|
1364
1364
|
return ie(e).getPropertyValue(t);
|
|
1365
1365
|
}
|
|
1366
|
-
const
|
|
1366
|
+
const kn = [
|
|
1367
1367
|
"top",
|
|
1368
1368
|
"right",
|
|
1369
1369
|
"bottom",
|
|
@@ -1373,16 +1373,16 @@ function at(e, t, s) {
|
|
|
1373
1373
|
const i = {};
|
|
1374
1374
|
s = s ? "-" + s : "";
|
|
1375
1375
|
for (let n = 0; n < 4; n++) {
|
|
1376
|
-
const o =
|
|
1376
|
+
const o = kn[n];
|
|
1377
1377
|
i[o] = parseFloat(e[t + "-" + o + s]) || 0;
|
|
1378
1378
|
}
|
|
1379
1379
|
return i.width = i.left + i.right, i.height = i.top + i.bottom, i;
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1381
|
+
const Sn = (e, t, s) => (e > 0 || t > 0) && (!s || !s.shadowRoot);
|
|
1382
|
+
function On(e, t) {
|
|
1383
1383
|
const s = e.touches, i = s && s.length ? s[0] : e, { offsetX: n, offsetY: o } = i;
|
|
1384
1384
|
let r = !1, a, c;
|
|
1385
|
-
if (
|
|
1385
|
+
if (Sn(n, o, e.target))
|
|
1386
1386
|
a = n, c = o;
|
|
1387
1387
|
else {
|
|
1388
1388
|
const l = t.getBoundingClientRect();
|
|
@@ -1397,17 +1397,17 @@ function Dn(e, t) {
|
|
|
1397
1397
|
function rt(e, t) {
|
|
1398
1398
|
if ("native" in e)
|
|
1399
1399
|
return e;
|
|
1400
|
-
const { canvas: s, currentDevicePixelRatio: i } = t, n = ie(s), o = n.boxSizing === "border-box", r = at(n, "padding"), a = at(n, "border", "width"), { x: c, y: l, box: h } =
|
|
1400
|
+
const { canvas: s, currentDevicePixelRatio: i } = t, n = ie(s), o = n.boxSizing === "border-box", r = at(n, "padding"), a = at(n, "border", "width"), { x: c, y: l, box: h } = On(e, s), d = r.left + (h && a.left), f = r.top + (h && a.top);
|
|
1401
1401
|
let { width: u, height: g } = t;
|
|
1402
1402
|
return o && (u -= r.width + a.width, g -= r.height + a.height), {
|
|
1403
1403
|
x: Math.round((c - d) / u * s.width / i),
|
|
1404
1404
|
y: Math.round((l - f) / g * s.height / i)
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Dn(e, t, s) {
|
|
1408
1408
|
let i, n;
|
|
1409
1409
|
if (t === void 0 || s === void 0) {
|
|
1410
|
-
const o = e &&
|
|
1410
|
+
const o = e && Pe(e);
|
|
1411
1411
|
if (!o)
|
|
1412
1412
|
t = e.clientWidth, s = e.clientHeight;
|
|
1413
1413
|
else {
|
|
@@ -1423,8 +1423,8 @@ function Cn(e, t, s) {
|
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
1425
|
const tt = (e) => Math.round(e * 10) / 10;
|
|
1426
|
-
function
|
|
1427
|
-
const n = ie(e), o = at(n, "margin"), r = te(n.maxWidth, e, "clientWidth") || Qt, a = te(n.maxHeight, e, "clientHeight") || Qt, c =
|
|
1426
|
+
function Cn(e, t, s, i) {
|
|
1427
|
+
const n = ie(e), o = at(n, "margin"), r = te(n.maxWidth, e, "clientWidth") || Qt, a = te(n.maxHeight, e, "clientHeight") || Qt, c = Dn(e, t, s);
|
|
1428
1428
|
let { width: l, height: h } = c;
|
|
1429
1429
|
if (n.boxSizing === "content-box") {
|
|
1430
1430
|
const f = at(n, "border", "width"), u = at(n, "padding");
|
|
@@ -1435,13 +1435,13 @@ function An(e, t, s, i) {
|
|
|
1435
1435
|
height: h
|
|
1436
1436
|
};
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function ts(e, t, s) {
|
|
1439
1439
|
const i = t || 1, n = tt(e.height * i), o = tt(e.width * i);
|
|
1440
1440
|
e.height = tt(e.height), e.width = tt(e.width);
|
|
1441
1441
|
const r = e.canvas;
|
|
1442
1442
|
return r.style && (s || !r.style.height && !r.style.width) && (r.style.height = `${e.height}px`, r.style.width = `${e.width}px`), e.currentDevicePixelRatio !== i || r.height !== n || r.width !== o ? (e.currentDevicePixelRatio = i, r.height = n, r.width = o, e.ctx.setTransform(i, 0, 0, i, 0, 0), !0) : !1;
|
|
1443
1443
|
}
|
|
1444
|
-
const
|
|
1444
|
+
const An = function() {
|
|
1445
1445
|
let e = !1;
|
|
1446
1446
|
try {
|
|
1447
1447
|
const t = {
|
|
@@ -1449,19 +1449,19 @@ const Pn = function() {
|
|
|
1449
1449
|
return e = !0, !1;
|
|
1450
1450
|
}
|
|
1451
1451
|
};
|
|
1452
|
-
|
|
1452
|
+
Ae() && (window.addEventListener("test", null, t), window.removeEventListener("test", null, t));
|
|
1453
1453
|
} catch {
|
|
1454
1454
|
}
|
|
1455
1455
|
return e;
|
|
1456
1456
|
}();
|
|
1457
|
-
function
|
|
1458
|
-
const s =
|
|
1457
|
+
function es(e, t) {
|
|
1458
|
+
const s = Mn(e, t), i = s && s.match(/^(\d+)(\.\d+)?px$/);
|
|
1459
1459
|
return i ? +i[1] : void 0;
|
|
1460
1460
|
}
|
|
1461
1461
|
function Wt(e, t, s) {
|
|
1462
1462
|
return e.options.clip ? e[s] : t[s];
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function Pn(e, t) {
|
|
1465
1465
|
const { xScale: s, yScale: i } = e;
|
|
1466
1466
|
return s && i ? {
|
|
1467
1467
|
left: Wt(s, t, "left"),
|
|
@@ -1470,11 +1470,11 @@ function En(e, t) {
|
|
|
1470
1470
|
bottom: Wt(i, t, "bottom")
|
|
1471
1471
|
} : t;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function En(e, t) {
|
|
1474
1474
|
const s = t._clip;
|
|
1475
1475
|
if (s.disabled)
|
|
1476
1476
|
return !1;
|
|
1477
|
-
const i =
|
|
1477
|
+
const i = Pn(t, e.chartArea);
|
|
1478
1478
|
return {
|
|
1479
1479
|
left: s.left === !1 ? 0 : i.left - (s.left === !0 ? 0 : s.left),
|
|
1480
1480
|
right: s.right === !1 ? e.width : i.right + (s.right === !0 ? 0 : s.right),
|
|
@@ -1488,7 +1488,7 @@ function Rn(e, t) {
|
|
|
1488
1488
|
* (c) 2025 Chart.js Contributors
|
|
1489
1489
|
* Released under the MIT License
|
|
1490
1490
|
*/
|
|
1491
|
-
class
|
|
1491
|
+
class Rn {
|
|
1492
1492
|
constructor() {
|
|
1493
1493
|
this._request = null, this._charts = /* @__PURE__ */ new Map(), this._running = !1, this._lastDate = void 0;
|
|
1494
1494
|
}
|
|
@@ -1564,20 +1564,20 @@ class In {
|
|
|
1564
1564
|
return this._charts.delete(t);
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
|
-
var Z = /* @__PURE__ */ new
|
|
1568
|
-
const
|
|
1567
|
+
var Z = /* @__PURE__ */ new Rn();
|
|
1568
|
+
const ss = "transparent", In = {
|
|
1569
1569
|
boolean(e, t, s) {
|
|
1570
1570
|
return s > 0.5 ? t : e;
|
|
1571
1571
|
},
|
|
1572
1572
|
color(e, t, s) {
|
|
1573
|
-
const i =
|
|
1573
|
+
const i = Ke(e || ss), n = i.valid && Ke(t || ss);
|
|
1574
1574
|
return n && n.valid ? n.mix(i, s).hexString() : t;
|
|
1575
1575
|
},
|
|
1576
1576
|
number(e, t, s) {
|
|
1577
1577
|
return e + (t - e) * s;
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
1580
|
-
class
|
|
1580
|
+
class Tn {
|
|
1581
1581
|
constructor(t, s, i, n) {
|
|
1582
1582
|
const o = s[i];
|
|
1583
1583
|
n = Ht([
|
|
@@ -1591,7 +1591,7 @@ class Ln {
|
|
|
1591
1591
|
o,
|
|
1592
1592
|
n
|
|
1593
1593
|
]);
|
|
1594
|
-
this._active = !0, this._fn = t.fn ||
|
|
1594
|
+
this._active = !0, this._fn = t.fn || In[t.type || typeof r], this._easing = Ot[t.easing] || Ot.linear, this._start = Math.floor(Date.now() + (t.delay || 0)), this._duration = this._total = Math.floor(t.duration), this._loop = !!t.loop, this._target = s, this._prop = i, this._from = r, this._to = n, this._promises = void 0;
|
|
1595
1595
|
}
|
|
1596
1596
|
active() {
|
|
1597
1597
|
return this._active;
|
|
@@ -1643,7 +1643,7 @@ class Ln {
|
|
|
1643
1643
|
i[n][s]();
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
class
|
|
1646
|
+
class Ln {
|
|
1647
1647
|
constructor(t, s) {
|
|
1648
1648
|
this._chart = t, this._properties = /* @__PURE__ */ new Map(), this.configure(s);
|
|
1649
1649
|
}
|
|
@@ -1666,11 +1666,11 @@ class zn {
|
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
1668
|
_animateOptions(t, s) {
|
|
1669
|
-
const i = s.options, n =
|
|
1669
|
+
const i = s.options, n = Fn(t, i);
|
|
1670
1670
|
if (!n)
|
|
1671
1671
|
return [];
|
|
1672
1672
|
const o = this._createAnimations(n, i);
|
|
1673
|
-
return i.$shared &&
|
|
1673
|
+
return i.$shared && zn(t.options.$animations, i).then(() => {
|
|
1674
1674
|
t.options = i;
|
|
1675
1675
|
}, () => {
|
|
1676
1676
|
}), o;
|
|
@@ -1699,7 +1699,7 @@ class zn {
|
|
|
1699
1699
|
t[l] = h;
|
|
1700
1700
|
continue;
|
|
1701
1701
|
}
|
|
1702
|
-
o[l] = d = new
|
|
1702
|
+
o[l] = d = new Tn(f, t, l, h), n.push(d);
|
|
1703
1703
|
}
|
|
1704
1704
|
return n;
|
|
1705
1705
|
}
|
|
@@ -1713,7 +1713,7 @@ class zn {
|
|
|
1713
1713
|
return Z.add(this._chart, i), !0;
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function zn(e, t) {
|
|
1717
1717
|
const s = [], i = Object.keys(t);
|
|
1718
1718
|
for (let n = 0; n < i.length; n++) {
|
|
1719
1719
|
const o = e[i[n]];
|
|
@@ -1721,7 +1721,7 @@ function Fn(e, t) {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
return Promise.all(s);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Fn(e, t) {
|
|
1725
1725
|
if (!t)
|
|
1726
1726
|
return;
|
|
1727
1727
|
let s = e.options;
|
|
@@ -1734,17 +1734,17 @@ function jn(e, t) {
|
|
|
1734
1734
|
$animations: {}
|
|
1735
1735
|
})), s;
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function is(e, t) {
|
|
1738
1738
|
const s = e && e.options || {}, i = s.reverse, n = s.min === void 0 ? t : 0, o = s.max === void 0 ? t : 0;
|
|
1739
1739
|
return {
|
|
1740
1740
|
start: i ? o : n,
|
|
1741
1741
|
end: i ? n : o
|
|
1742
1742
|
};
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function jn(e, t, s) {
|
|
1745
1745
|
if (s === !1)
|
|
1746
1746
|
return !1;
|
|
1747
|
-
const i =
|
|
1747
|
+
const i = is(e, s), n = is(t, s);
|
|
1748
1748
|
return {
|
|
1749
1749
|
top: n.end,
|
|
1750
1750
|
right: i.end,
|
|
@@ -1752,7 +1752,7 @@ function Bn(e, t, s) {
|
|
|
1752
1752
|
left: i.start
|
|
1753
1753
|
};
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Bn(e) {
|
|
1756
1756
|
let t, s, i, n;
|
|
1757
1757
|
return w(e) ? (t = e.top, s = e.right, i = e.bottom, n = e.left) : t = s = i = n = e, {
|
|
1758
1758
|
top: t,
|
|
@@ -1769,7 +1769,7 @@ function Us(e, t) {
|
|
|
1769
1769
|
s.push(i[n].index);
|
|
1770
1770
|
return s;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function ns(e, t, s, i = {}) {
|
|
1773
1773
|
const n = e.keys, o = i.mode === "single";
|
|
1774
1774
|
let r, a, c, l;
|
|
1775
1775
|
if (t === null)
|
|
@@ -1781,11 +1781,11 @@ function is(e, t, s, i = {}) {
|
|
|
1781
1781
|
continue;
|
|
1782
1782
|
break;
|
|
1783
1783
|
}
|
|
1784
|
-
l = e.values[c], pt(l) && (o || t === 0 ||
|
|
1784
|
+
l = e.values[c], pt(l) && (o || t === 0 || We(t) === We(l)) && (t += l);
|
|
1785
1785
|
}
|
|
1786
1786
|
return !h && !i.all ? 0 : t;
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Hn(e, t) {
|
|
1789
1789
|
const { iScale: s, vScale: i } = t, n = s.axis === "x" ? "x" : "y", o = i.axis === "x" ? "x" : "y", r = Object.keys(e), a = new Array(r.length);
|
|
1790
1790
|
let c, l, h;
|
|
1791
1791
|
for (c = 0, l = r.length; c < l; ++c)
|
|
@@ -1799,21 +1799,21 @@ function he(e, t) {
|
|
|
1799
1799
|
const s = e && e.options.stacked;
|
|
1800
1800
|
return s || s === void 0 && t.stack !== void 0;
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function Wn(e, t, s) {
|
|
1803
1803
|
return `${e.id}.${t.id}.${s.stack || s.type}`;
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function Vn(e) {
|
|
1806
1806
|
const { min: t, max: s, minDefined: i, maxDefined: n } = e.getUserBounds();
|
|
1807
1807
|
return {
|
|
1808
1808
|
min: i ? t : Number.NEGATIVE_INFINITY,
|
|
1809
1809
|
max: n ? s : Number.POSITIVE_INFINITY
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function Nn(e, t, s) {
|
|
1813
1813
|
const i = e[t] || (e[t] = {});
|
|
1814
1814
|
return i[s] || (i[s] = {});
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function os(e, t, s, i) {
|
|
1817
1817
|
for (const n of t.getMatchingVisibleMetas(i).reverse()) {
|
|
1818
1818
|
const o = e[n.index];
|
|
1819
1819
|
if (s && o > 0 || !s && o < 0)
|
|
@@ -1821,12 +1821,12 @@ function ns(e, t, s, i) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
return null;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
const { chart: s, _cachedMeta: i } = e, n = s._stacks || (s._stacks = {}), { iScale: o, vScale: r, index: a } = i, c = o.axis, l = r.axis, h =
|
|
1824
|
+
function rs(e, t) {
|
|
1825
|
+
const { chart: s, _cachedMeta: i } = e, n = s._stacks || (s._stacks = {}), { iScale: o, vScale: r, index: a } = i, c = o.axis, l = r.axis, h = Wn(o, r, i), d = t.length;
|
|
1826
1826
|
let f;
|
|
1827
1827
|
for (let u = 0; u < d; ++u) {
|
|
1828
1828
|
const g = t[u], { [c]: m, [l]: b } = g, p = g._stacks || (g._stacks = {});
|
|
1829
|
-
f = p[l] =
|
|
1829
|
+
f = p[l] = Nn(n, h, m), f[a] = b, f._top = os(f, r, !0, i.type), f._bottom = os(f, r, !1, i.type);
|
|
1830
1830
|
const _ = f._visualValues || (f._visualValues = {});
|
|
1831
1831
|
_[a] = b;
|
|
1832
1832
|
}
|
|
@@ -1835,7 +1835,7 @@ function de(e, t) {
|
|
|
1835
1835
|
const s = e.scales;
|
|
1836
1836
|
return Object.keys(s).filter((i) => s[i].axis === t).shift();
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function $n(e, t) {
|
|
1839
1839
|
return Tt(e, {
|
|
1840
1840
|
active: !1,
|
|
1841
1841
|
dataset: void 0,
|
|
@@ -1845,7 +1845,7 @@ function Yn(e, t) {
|
|
|
1845
1845
|
type: "dataset"
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Yn(e, t, s) {
|
|
1849
1849
|
return Tt(e, {
|
|
1850
1850
|
active: !1,
|
|
1851
1851
|
dataIndex: t,
|
|
@@ -1869,7 +1869,7 @@ function xt(e, t) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
|
-
const fe = (e) => e === "reset" || e === "none",
|
|
1872
|
+
const fe = (e) => e === "reset" || e === "none", as = (e, t) => t ? e : Object.assign({}, e), Xn = (e, t, s) => e && !t.hidden && t._stacked && {
|
|
1873
1873
|
keys: Us(s, !0),
|
|
1874
1874
|
values: null
|
|
1875
1875
|
};
|
|
@@ -1909,20 +1909,20 @@ class qs {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
_destroy() {
|
|
1911
1911
|
const t = this._cachedMeta;
|
|
1912
|
-
this._data &&
|
|
1912
|
+
this._data && Ne(this._data, this), t._stacked && xt(t);
|
|
1913
1913
|
}
|
|
1914
1914
|
_dataCheck() {
|
|
1915
1915
|
const t = this.getDataset(), s = t.data || (t.data = []), i = this._data;
|
|
1916
1916
|
if (w(s)) {
|
|
1917
1917
|
const n = this._cachedMeta;
|
|
1918
|
-
this._data =
|
|
1918
|
+
this._data = Hn(s, n);
|
|
1919
1919
|
} else if (i !== s) {
|
|
1920
1920
|
if (i) {
|
|
1921
|
-
|
|
1921
|
+
Ne(i, this);
|
|
1922
1922
|
const n = this._cachedMeta;
|
|
1923
1923
|
xt(n), n._parsed = [];
|
|
1924
1924
|
}
|
|
1925
|
-
s && Object.isExtensible(s) &&
|
|
1925
|
+
s && Object.isExtensible(s) && $i(s, this), this._syncList = [], this._data = s;
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
addElements() {
|
|
@@ -1934,7 +1934,7 @@ class qs {
|
|
|
1934
1934
|
let n = !1;
|
|
1935
1935
|
this._dataCheck();
|
|
1936
1936
|
const o = s._stacked;
|
|
1937
|
-
s._stacked = he(s.vScale, s), s.stack !== i.stack && (n = !0, xt(s), s.stack = i.stack), this._resyncElements(t), (n || o !== s._stacked) && (
|
|
1937
|
+
s._stacked = he(s.vScale, s), s.stack !== i.stack && (n = !0, xt(s), s.stack = i.stack), this._resyncElements(t), (n || o !== s._stacked) && (rs(this, s._parsed), s._stacked = he(s.vScale, s));
|
|
1938
1938
|
}
|
|
1939
1939
|
configure() {
|
|
1940
1940
|
const t = this.chart.config, s = t.datasetScopeKeys(this._type), i = t.getOptionScopes(this.getDataset(), s, !0);
|
|
@@ -1952,7 +1952,7 @@ class qs {
|
|
|
1952
1952
|
i._parsed[h + t] = d = f[h], c && (u() && (c = !1), l = d);
|
|
1953
1953
|
i._sorted = c;
|
|
1954
1954
|
}
|
|
1955
|
-
r &&
|
|
1955
|
+
r && rs(this, f);
|
|
1956
1956
|
}
|
|
1957
1957
|
parsePrimitiveData(t, s, i, n) {
|
|
1958
1958
|
const { iScale: o, vScale: r } = t, a = o.axis, c = r.axis, l = o.getLabels(), h = o === r, d = new Array(n);
|
|
@@ -1995,7 +1995,7 @@ class qs {
|
|
|
1995
1995
|
keys: Us(n, !0),
|
|
1996
1996
|
values: s._stacks[t.axis]._visualValues
|
|
1997
1997
|
};
|
|
1998
|
-
return
|
|
1998
|
+
return ns(a, r, o.index, {
|
|
1999
1999
|
mode: i
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
@@ -2003,13 +2003,13 @@ class qs {
|
|
|
2003
2003
|
const o = i[s.axis];
|
|
2004
2004
|
let r = o === null ? NaN : o;
|
|
2005
2005
|
const a = n && i._stacks[s.axis];
|
|
2006
|
-
n && a && (n.values = a, r =
|
|
2006
|
+
n && a && (n.values = a, r = ns(n, o, this._cachedMeta.index)), t.min = Math.min(t.min, r), t.max = Math.max(t.max, r);
|
|
2007
2007
|
}
|
|
2008
2008
|
getMinMax(t, s) {
|
|
2009
|
-
const i = this._cachedMeta, n = i._parsed, o = i._sorted && t === i.iScale, r = n.length, a = this._getOtherScale(t), c =
|
|
2009
|
+
const i = this._cachedMeta, n = i._parsed, o = i._sorted && t === i.iScale, r = n.length, a = this._getOtherScale(t), c = Xn(s, i, this.chart), l = {
|
|
2010
2010
|
min: Number.POSITIVE_INFINITY,
|
|
2011
2011
|
max: Number.NEGATIVE_INFINITY
|
|
2012
|
-
}, { min: h, max: d } =
|
|
2012
|
+
}, { min: h, max: d } = Vn(a);
|
|
2013
2013
|
let f, u;
|
|
2014
2014
|
function g() {
|
|
2015
2015
|
u = n[f];
|
|
@@ -2046,7 +2046,7 @@ class qs {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
_update(t) {
|
|
2048
2048
|
const s = this._cachedMeta;
|
|
2049
|
-
this.update(t || "default"), s._clip =
|
|
2049
|
+
this.update(t || "default"), s._clip = Bn(A(this.options.clip, jn(s.xScale, s.yScale, this.getMaxOverflow())));
|
|
2050
2050
|
}
|
|
2051
2051
|
update(t) {
|
|
2052
2052
|
}
|
|
@@ -2069,9 +2069,9 @@ class qs {
|
|
|
2069
2069
|
let o;
|
|
2070
2070
|
if (t >= 0 && t < this._cachedMeta.data.length) {
|
|
2071
2071
|
const r = this._cachedMeta.data[t];
|
|
2072
|
-
o = r.$context || (r.$context =
|
|
2072
|
+
o = r.$context || (r.$context = Yn(this.getContext(), t, r)), o.parsed = this.getParsed(t), o.raw = n.data[t], o.index = o.dataIndex = t;
|
|
2073
2073
|
} else
|
|
2074
|
-
o = this.$context || (this.$context =
|
|
2074
|
+
o = this.$context || (this.$context = $n(this.chart.getContext(), this.index)), o.dataset = n, o.index = o.datasetIndex = this.index;
|
|
2075
2075
|
return o.active = !!s, o.mode = i, o;
|
|
2076
2076
|
}
|
|
2077
2077
|
resolveDatasetElementOptions(t) {
|
|
@@ -2083,7 +2083,7 @@ class qs {
|
|
|
2083
2083
|
_resolveElementOptions(t, s = "default", i) {
|
|
2084
2084
|
const n = s === "active", o = this._cachedDataOpts, r = t + "-" + s, a = o[r], c = this.enableOptionSharing && Gt(i);
|
|
2085
2085
|
if (a)
|
|
2086
|
-
return
|
|
2086
|
+
return as(a, c);
|
|
2087
2087
|
const l = this.chart.config, h = l.datasetElementScopeKeys(this._type, t), d = n ? [
|
|
2088
2088
|
`${t}Hover`,
|
|
2089
2089
|
"hover",
|
|
@@ -2093,7 +2093,7 @@ class qs {
|
|
|
2093
2093
|
t,
|
|
2094
2094
|
""
|
|
2095
2095
|
], f = l.getOptionScopes(this.getDataset(), h), u = Object.keys(R.elements[t]), g = () => this.getContext(i, n, s), m = l.resolveNamedOptions(f, u, g, d);
|
|
2096
|
-
return m.$shared && (m.$shared = c, o[r] = Object.freeze(
|
|
2096
|
+
return m.$shared && (m.$shared = c, o[r] = Object.freeze(as(m, c))), m;
|
|
2097
2097
|
}
|
|
2098
2098
|
_resolveAnimations(t, s, i) {
|
|
2099
2099
|
const n = this.chart, o = this._cachedDataOpts, r = `animation-${s}`, a = o[r];
|
|
@@ -2104,7 +2104,7 @@ class qs {
|
|
|
2104
2104
|
const h = this.chart.config, d = h.datasetAnimationScopeKeys(this._type, s), f = h.getOptionScopes(this.getDataset(), d);
|
|
2105
2105
|
c = h.createResolver(f, this.getContext(t, i, s));
|
|
2106
2106
|
}
|
|
2107
|
-
const l = new
|
|
2107
|
+
const l = new Ln(n, c && c.animations);
|
|
2108
2108
|
return c && c._cacheable && (o[r] = Object.freeze(l)), l;
|
|
2109
2109
|
}
|
|
2110
2110
|
getSharedOptions(t) {
|
|
@@ -2232,7 +2232,7 @@ class qs {
|
|
|
2232
2232
|
]);
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
|
-
function
|
|
2235
|
+
function Kn(e, t, s) {
|
|
2236
2236
|
let i = 1, n = 1, o = 0, r = 0;
|
|
2237
2237
|
if (t < T) {
|
|
2238
2238
|
const a = e, c = a + t, l = Math.cos(a), h = Math.sin(a), d = Math.cos(c), f = Math.sin(c), u = (x, v, y) => Jt(x, a, c, !0) ? 1 : Math.max(v, v * s, y, y * s), g = (x, v, y) => Jt(x, a, c, !0) ? -1 : Math.min(v, v * s, y, y * s), m = u(0, l, d), b = u($, h, f), p = g(z, l, d), _ = g(z + $, h, f);
|
|
@@ -2245,7 +2245,7 @@ function Un(e, t, s) {
|
|
|
2245
2245
|
offsetY: r
|
|
2246
2246
|
};
|
|
2247
2247
|
}
|
|
2248
|
-
class
|
|
2248
|
+
class Un extends qs {
|
|
2249
2249
|
static id = "doughnut";
|
|
2250
2250
|
static defaults = {
|
|
2251
2251
|
datasetElementType: !1,
|
|
@@ -2354,7 +2354,7 @@ class qn extends qs {
|
|
|
2354
2354
|
};
|
|
2355
2355
|
}
|
|
2356
2356
|
update(t) {
|
|
2357
|
-
const s = this.chart, { chartArea: i } = s, n = this._cachedMeta, o = n.data, r = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, a = Math.max((Math.min(i.width, i.height) - r) / 2, 0), c = Math.min(
|
|
2357
|
+
const s = this.chart, { chartArea: i } = s, n = this._cachedMeta, o = n.data, r = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, a = Math.max((Math.min(i.width, i.height) - r) / 2, 0), c = Math.min(Ei(this.options.cutout, a), 1), l = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: f, ratioY: u, offsetX: g, offsetY: m } = Kn(d, h, c), b = (i.width - r) / f, p = (i.height - r) / u, _ = Math.max(Math.min(b, p) / 2, 0), x = Rs(this.options.radius, _), v = Math.max(x * c, 0), y = (x - v) / this._getVisibleDatasetWeightTotal();
|
|
2358
2358
|
this.offsetX = g * x, this.offsetY = m * x, n.total = this.calculateTotal(), this.outerRadius = x - y * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - y * l, 0), this.updateElements(o, 0, o.length, t);
|
|
2359
2359
|
}
|
|
2360
2360
|
_circumference(t, s) {
|
|
@@ -2393,7 +2393,7 @@ class qn extends qs {
|
|
|
2393
2393
|
return s > 0 && !isNaN(t) ? T * (Math.abs(t) / s) : 0;
|
|
2394
2394
|
}
|
|
2395
2395
|
getLabelAndValue(t) {
|
|
2396
|
-
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o =
|
|
2396
|
+
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o = Qi(s._parsed[t], i.options.locale);
|
|
2397
2397
|
return {
|
|
2398
2398
|
label: n[t] || "",
|
|
2399
2399
|
value: o
|
|
@@ -2437,10 +2437,10 @@ class qn extends qs {
|
|
|
2437
2437
|
return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2440
|
+
function qn(e, t, s, i) {
|
|
2441
2441
|
const { controller: n, data: o, _sorted: r } = e, a = n._cachedMeta.iScale, c = e.dataset && e.dataset.options ? e.dataset.options.spanGaps : null;
|
|
2442
2442
|
if (a && t === a.axis && t !== "r" && r && o.length) {
|
|
2443
|
-
const l = a._reversePixels ?
|
|
2443
|
+
const l = a._reversePixels ? Ni : Vi;
|
|
2444
2444
|
if (i) {
|
|
2445
2445
|
if (n._sharedOptions) {
|
|
2446
2446
|
const h = o[0], d = typeof h.getRange == "function" && h.getRange(t);
|
|
@@ -2471,14 +2471,14 @@ function Zn(e, t, s, i) {
|
|
|
2471
2471
|
function ne(e, t, s, i, n) {
|
|
2472
2472
|
const o = e.getSortedVisibleDatasetMetas(), r = s[t];
|
|
2473
2473
|
for (let a = 0, c = o.length; a < c; ++a) {
|
|
2474
|
-
const { index: l, data: h } = o[a], { lo: d, hi: f } =
|
|
2474
|
+
const { index: l, data: h } = o[a], { lo: d, hi: f } = qn(o[a], t, r, n);
|
|
2475
2475
|
for (let u = d; u <= f; ++u) {
|
|
2476
2476
|
const g = h[u];
|
|
2477
2477
|
g.skip || i(g, l, u);
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function Zn(e) {
|
|
2482
2482
|
const t = e.indexOf("x") !== -1, s = e.indexOf("y") !== -1;
|
|
2483
2483
|
return function(i, n) {
|
|
2484
2484
|
const o = t ? Math.abs(i.x - n.x) : 0, r = s ? Math.abs(i.y - n.y) : 0;
|
|
@@ -2495,7 +2495,7 @@ function ue(e, t, s, i, n) {
|
|
|
2495
2495
|
});
|
|
2496
2496
|
}, !0), o;
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function Gn(e, t, s, i) {
|
|
2499
2499
|
let n = [];
|
|
2500
2500
|
function o(r, a, c) {
|
|
2501
2501
|
const { startAngle: l, endAngle: h } = r.getProps([
|
|
@@ -2513,9 +2513,9 @@ function Qn(e, t, s, i) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
return ne(e, s, t, o), n;
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function Qn(e, t, s, i, n, o) {
|
|
2517
2517
|
let r = [];
|
|
2518
|
-
const a =
|
|
2518
|
+
const a = Zn(s);
|
|
2519
2519
|
let c = Number.POSITIVE_INFINITY;
|
|
2520
2520
|
function l(h, d, f) {
|
|
2521
2521
|
const u = h.inRange(t.x, t.y, n);
|
|
@@ -2540,9 +2540,9 @@ function Jn(e, t, s, i, n, o) {
|
|
|
2540
2540
|
return ne(e, s, t, l), r;
|
|
2541
2541
|
}
|
|
2542
2542
|
function ge(e, t, s, i, n, o) {
|
|
2543
|
-
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ?
|
|
2543
|
+
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ? Gn(e, t, s, n) : Qn(e, t, s, i, n, o);
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function cs(e, t, s, i, n) {
|
|
2546
2546
|
const o = [], r = s === "x" ? "inXRange" : "inYRange";
|
|
2547
2547
|
let a = !1;
|
|
2548
2548
|
return ne(e, s, t, (c, l, h) => {
|
|
@@ -2553,7 +2553,7 @@ function as(e, t, s, i, n) {
|
|
|
2553
2553
|
}), a = a || c.inRange(t.x, t.y, n));
|
|
2554
2554
|
}), i && !a ? [] : o;
|
|
2555
2555
|
}
|
|
2556
|
-
var
|
|
2556
|
+
var Jn = {
|
|
2557
2557
|
modes: {
|
|
2558
2558
|
index(e, t, s, i) {
|
|
2559
2559
|
const n = rt(t, e), o = s.axis || "x", r = s.includeInvisible || !1, a = s.intersect ? ue(e, n, o, i, r) : ge(e, n, o, !1, i, r), c = [];
|
|
@@ -2591,11 +2591,11 @@ var to = {
|
|
|
2591
2591
|
},
|
|
2592
2592
|
x(e, t, s, i) {
|
|
2593
2593
|
const n = rt(t, e);
|
|
2594
|
-
return
|
|
2594
|
+
return cs(e, n, "x", s.intersect, i);
|
|
2595
2595
|
},
|
|
2596
2596
|
y(e, t, s, i) {
|
|
2597
2597
|
const n = rt(t, e);
|
|
2598
|
-
return
|
|
2598
|
+
return cs(e, n, "y", s.intersect, i);
|
|
2599
2599
|
}
|
|
2600
2600
|
}
|
|
2601
2601
|
};
|
|
@@ -2608,7 +2608,7 @@ const Zs = [
|
|
|
2608
2608
|
function yt(e, t) {
|
|
2609
2609
|
return e.filter((s) => s.pos === t);
|
|
2610
2610
|
}
|
|
2611
|
-
function
|
|
2611
|
+
function ls(e, t) {
|
|
2612
2612
|
return e.filter((s) => Zs.indexOf(s.pos) === -1 && s.box.axis === t);
|
|
2613
2613
|
}
|
|
2614
2614
|
function vt(e, t) {
|
|
@@ -2617,7 +2617,7 @@ function vt(e, t) {
|
|
|
2617
2617
|
return n.weight === o.weight ? n.index - o.index : n.weight - o.weight;
|
|
2618
2618
|
});
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function to(e) {
|
|
2621
2621
|
const t = [];
|
|
2622
2622
|
let s, i, n, o, r, a;
|
|
2623
2623
|
for (s = 0, i = (e || []).length; s < i; ++s)
|
|
@@ -2632,7 +2632,7 @@ function eo(e) {
|
|
|
2632
2632
|
});
|
|
2633
2633
|
return t;
|
|
2634
2634
|
}
|
|
2635
|
-
function
|
|
2635
|
+
function eo(e) {
|
|
2636
2636
|
const t = {};
|
|
2637
2637
|
for (const s of e) {
|
|
2638
2638
|
const { stack: i, pos: n, stackWeight: o } = s;
|
|
@@ -2648,8 +2648,8 @@ function so(e) {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
return t;
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2652
|
-
const s =
|
|
2651
|
+
function so(e, t) {
|
|
2652
|
+
const s = eo(e), { vBoxMaxWidth: i, hBoxMaxHeight: n } = t;
|
|
2653
2653
|
let o, r, a;
|
|
2654
2654
|
for (o = 0, r = e.length; o < r; ++o) {
|
|
2655
2655
|
a = e[o];
|
|
@@ -2658,8 +2658,8 @@ function io(e, t) {
|
|
|
2658
2658
|
}
|
|
2659
2659
|
return s;
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const t =
|
|
2661
|
+
function io(e) {
|
|
2662
|
+
const t = to(e), s = vt(t.filter((l) => l.box.fullSize), !0), i = vt(yt(t, "left"), !0), n = vt(yt(t, "right")), o = vt(yt(t, "top"), !0), r = vt(yt(t, "bottom")), a = ls(t, "x"), c = ls(t, "y");
|
|
2663
2663
|
return {
|
|
2664
2664
|
fullSize: s,
|
|
2665
2665
|
leftAndTop: i.concat(o),
|
|
@@ -2669,13 +2669,13 @@ function no(e) {
|
|
|
2669
2669
|
horizontal: o.concat(r).concat(a)
|
|
2670
2670
|
};
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function hs(e, t, s, i) {
|
|
2673
2673
|
return Math.max(e[s], t[s]) + Math.max(e[i], t[i]);
|
|
2674
2674
|
}
|
|
2675
2675
|
function Gs(e, t) {
|
|
2676
2676
|
e.top = Math.max(e.top, t.top), e.left = Math.max(e.left, t.left), e.bottom = Math.max(e.bottom, t.bottom), e.right = Math.max(e.right, t.right);
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function no(e, t, s, i) {
|
|
2679
2679
|
const { pos: n, box: o } = s, r = e.maxPadding;
|
|
2680
2680
|
if (!w(n)) {
|
|
2681
2681
|
s.size && (e[n] -= s.size);
|
|
@@ -2686,7 +2686,7 @@ function oo(e, t, s, i) {
|
|
|
2686
2686
|
d.size = Math.max(d.size, s.horizontal ? o.height : o.width), s.size = d.size / d.count, e[n] += s.size;
|
|
2687
2687
|
}
|
|
2688
2688
|
o.getPadding && Gs(r, o.getPadding());
|
|
2689
|
-
const a = Math.max(0, t.outerWidth -
|
|
2689
|
+
const a = Math.max(0, t.outerWidth - hs(r, e, "left", "right")), c = Math.max(0, t.outerHeight - hs(r, e, "top", "bottom")), l = a !== e.w, h = c !== e.h;
|
|
2690
2690
|
return e.w = a, e.h = c, s.horizontal ? {
|
|
2691
2691
|
same: l,
|
|
2692
2692
|
other: h
|
|
@@ -2695,7 +2695,7 @@ function oo(e, t, s, i) {
|
|
|
2695
2695
|
other: l
|
|
2696
2696
|
};
|
|
2697
2697
|
}
|
|
2698
|
-
function
|
|
2698
|
+
function oo(e) {
|
|
2699
2699
|
const t = e.maxPadding;
|
|
2700
2700
|
function s(i) {
|
|
2701
2701
|
const n = Math.max(t[i] - e[i], 0);
|
|
@@ -2703,7 +2703,7 @@ function ro(e) {
|
|
|
2703
2703
|
}
|
|
2704
2704
|
e.y += s("top"), e.x += s("left"), s("right"), s("bottom");
|
|
2705
2705
|
}
|
|
2706
|
-
function
|
|
2706
|
+
function ro(e, t) {
|
|
2707
2707
|
const s = t.maxPadding;
|
|
2708
2708
|
function i(n) {
|
|
2709
2709
|
const o = {
|
|
@@ -2728,8 +2728,8 @@ function St(e, t, s, i) {
|
|
|
2728
2728
|
const n = [];
|
|
2729
2729
|
let o, r, a, c, l, h;
|
|
2730
2730
|
for (o = 0, r = e.length, l = 0; o < r; ++o) {
|
|
2731
|
-
a = e[o], c = a.box, c.update(a.width || t.w, a.height || t.h,
|
|
2732
|
-
const { same: d, other: f } =
|
|
2731
|
+
a = e[o], c = a.box, c.update(a.width || t.w, a.height || t.h, ro(a.horizontal, t));
|
|
2732
|
+
const { same: d, other: f } = no(t, s, a, i);
|
|
2733
2733
|
l |= d && n.length, h = h || f, c.fullSize || n.push(a);
|
|
2734
2734
|
}
|
|
2735
2735
|
return l && St(n, t, s, i) || h;
|
|
@@ -2737,7 +2737,7 @@ function St(e, t, s, i) {
|
|
|
2737
2737
|
function Vt(e, t, s, i, n) {
|
|
2738
2738
|
e.top = s, e.left = t, e.right = t + i, e.bottom = s + n, e.width = i, e.height = n;
|
|
2739
2739
|
}
|
|
2740
|
-
function
|
|
2740
|
+
function ds(e, t, s, i) {
|
|
2741
2741
|
const n = s.padding;
|
|
2742
2742
|
let { x: o, y: r } = t;
|
|
2743
2743
|
for (const a of e) {
|
|
@@ -2778,7 +2778,7 @@ var Nt = {
|
|
|
2778
2778
|
update(e, t, s, i) {
|
|
2779
2779
|
if (!e)
|
|
2780
2780
|
return;
|
|
2781
|
-
const n = Et(e.options.layout.padding), o = Math.max(t - n.width, 0), r = Math.max(s - n.height, 0), a =
|
|
2781
|
+
const n = Et(e.options.layout.padding), o = Math.max(t - n.width, 0), r = Math.max(s - n.height, 0), a = io(e.boxes), c = a.vertical, l = a.horizontal;
|
|
2782
2782
|
j(e.boxes, (m) => {
|
|
2783
2783
|
typeof m.beforeLayout == "function" && m.beforeLayout();
|
|
2784
2784
|
});
|
|
@@ -2798,8 +2798,8 @@ var Nt = {
|
|
|
2798
2798
|
h: r,
|
|
2799
2799
|
x: n.left,
|
|
2800
2800
|
y: n.top
|
|
2801
|
-
}, n), g =
|
|
2802
|
-
St(a.fullSize, u, d, g), St(c, u, d, g), St(l, u, d, g) && St(c, u, d, g),
|
|
2801
|
+
}, n), g = so(c.concat(l), d);
|
|
2802
|
+
St(a.fullSize, u, d, g), St(c, u, d, g), St(l, u, d, g) && St(c, u, d, g), oo(u), ds(a.leftAndTop, u, d, g), u.x += u.w, u.y += u.h, ds(a.rightAndBottom, u, d, g), e.chartArea = {
|
|
2803
2803
|
left: u.left,
|
|
2804
2804
|
top: u.top,
|
|
2805
2805
|
right: u.left + u.w,
|
|
@@ -2842,7 +2842,7 @@ class Qs {
|
|
|
2842
2842
|
updateConfig(t) {
|
|
2843
2843
|
}
|
|
2844
2844
|
}
|
|
2845
|
-
class
|
|
2845
|
+
class ao extends Qs {
|
|
2846
2846
|
acquireContext(t) {
|
|
2847
2847
|
return t && t.getContext && t.getContext("2d") || null;
|
|
2848
2848
|
}
|
|
@@ -2850,7 +2850,7 @@ class co extends Qs {
|
|
|
2850
2850
|
t.options.animation = !1;
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
|
-
const Ut = "$chartjs",
|
|
2853
|
+
const Ut = "$chartjs", co = {
|
|
2854
2854
|
touchstart: "mousedown",
|
|
2855
2855
|
touchmove: "mousemove",
|
|
2856
2856
|
touchend: "mouseup",
|
|
@@ -2860,8 +2860,8 @@ const Ut = "$chartjs", lo = {
|
|
|
2860
2860
|
pointerup: "mouseup",
|
|
2861
2861
|
pointerleave: "mouseout",
|
|
2862
2862
|
pointerout: "mouseout"
|
|
2863
|
-
},
|
|
2864
|
-
function
|
|
2863
|
+
}, fs = (e) => e === null || e === "";
|
|
2864
|
+
function lo(e, t) {
|
|
2865
2865
|
const s = e.style, i = e.getAttribute("height"), n = e.getAttribute("width");
|
|
2866
2866
|
if (e[Ut] = {
|
|
2867
2867
|
initial: {
|
|
@@ -2873,30 +2873,30 @@ function ho(e, t) {
|
|
|
2873
2873
|
width: s.width
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box",
|
|
2877
|
-
const o =
|
|
2876
|
+
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box", fs(n)) {
|
|
2877
|
+
const o = es(e, "width");
|
|
2878
2878
|
o !== void 0 && (e.width = o);
|
|
2879
2879
|
}
|
|
2880
|
-
if (
|
|
2880
|
+
if (fs(i))
|
|
2881
2881
|
if (e.style.height === "")
|
|
2882
2882
|
e.height = e.width / (t || 2);
|
|
2883
2883
|
else {
|
|
2884
|
-
const o =
|
|
2884
|
+
const o = es(e, "height");
|
|
2885
2885
|
o !== void 0 && (e.height = o);
|
|
2886
2886
|
}
|
|
2887
2887
|
return e;
|
|
2888
2888
|
}
|
|
2889
|
-
const Js =
|
|
2889
|
+
const Js = An ? {
|
|
2890
2890
|
passive: !0
|
|
2891
2891
|
} : !1;
|
|
2892
|
-
function
|
|
2892
|
+
function ho(e, t, s) {
|
|
2893
2893
|
e && e.addEventListener(t, s, Js);
|
|
2894
2894
|
}
|
|
2895
|
-
function
|
|
2895
|
+
function fo(e, t, s) {
|
|
2896
2896
|
e && e.canvas && e.canvas.removeEventListener(t, s, Js);
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2899
|
-
const s =
|
|
2898
|
+
function uo(e, t) {
|
|
2899
|
+
const s = co[e.type] || e.type, { x: i, y: n } = rt(e, t);
|
|
2900
2900
|
return {
|
|
2901
2901
|
type: s,
|
|
2902
2902
|
chart: t,
|
|
@@ -2910,7 +2910,7 @@ function ee(e, t) {
|
|
|
2910
2910
|
if (s === t || s.contains(t))
|
|
2911
2911
|
return !0;
|
|
2912
2912
|
}
|
|
2913
|
-
function
|
|
2913
|
+
function go(e, t, s) {
|
|
2914
2914
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2915
2915
|
let r = !1;
|
|
2916
2916
|
for (const a of o)
|
|
@@ -2922,7 +2922,7 @@ function po(e, t, s) {
|
|
|
2922
2922
|
subtree: !0
|
|
2923
2923
|
}), n;
|
|
2924
2924
|
}
|
|
2925
|
-
function
|
|
2925
|
+
function po(e, t, s) {
|
|
2926
2926
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2927
2927
|
let r = !1;
|
|
2928
2928
|
for (const a of o)
|
|
@@ -2935,21 +2935,21 @@ function mo(e, t, s) {
|
|
|
2935
2935
|
}), n;
|
|
2936
2936
|
}
|
|
2937
2937
|
const Rt = /* @__PURE__ */ new Map();
|
|
2938
|
-
let
|
|
2938
|
+
let us = 0;
|
|
2939
2939
|
function ti() {
|
|
2940
2940
|
const e = window.devicePixelRatio;
|
|
2941
|
-
e !==
|
|
2941
|
+
e !== us && (us = e, Rt.forEach((t, s) => {
|
|
2942
2942
|
s.currentDevicePixelRatio !== e && t();
|
|
2943
2943
|
}));
|
|
2944
2944
|
}
|
|
2945
|
-
function
|
|
2945
|
+
function mo(e, t) {
|
|
2946
2946
|
Rt.size || window.addEventListener("resize", ti), Rt.set(e, t);
|
|
2947
2947
|
}
|
|
2948
|
-
function
|
|
2948
|
+
function _o(e) {
|
|
2949
2949
|
Rt.delete(e), Rt.size || window.removeEventListener("resize", ti);
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2952
|
-
const i = e.canvas, n = i &&
|
|
2951
|
+
function bo(e, t, s) {
|
|
2952
|
+
const i = e.canvas, n = i && Pe(i);
|
|
2953
2953
|
if (!n)
|
|
2954
2954
|
return;
|
|
2955
2955
|
const o = js((a, c) => {
|
|
@@ -2959,21 +2959,21 @@ function xo(e, t, s) {
|
|
|
2959
2959
|
const c = a[0], l = c.contentRect.width, h = c.contentRect.height;
|
|
2960
2960
|
l === 0 && h === 0 || o(l, h);
|
|
2961
2961
|
});
|
|
2962
|
-
return r.observe(n),
|
|
2962
|
+
return r.observe(n), mo(e, o), r;
|
|
2963
2963
|
}
|
|
2964
2964
|
function pe(e, t, s) {
|
|
2965
|
-
s && s.disconnect(), t === "resize" &&
|
|
2965
|
+
s && s.disconnect(), t === "resize" && _o(e);
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2967
|
+
function xo(e, t, s) {
|
|
2968
2968
|
const i = e.canvas, n = js((o) => {
|
|
2969
|
-
e.ctx !== null && s(
|
|
2969
|
+
e.ctx !== null && s(uo(o, e));
|
|
2970
2970
|
}, e);
|
|
2971
|
-
return
|
|
2971
|
+
return ho(i, t, n), n;
|
|
2972
2972
|
}
|
|
2973
|
-
class
|
|
2973
|
+
class yo extends Qs {
|
|
2974
2974
|
acquireContext(t, s) {
|
|
2975
2975
|
const i = t && t.getContext && t.getContext("2d");
|
|
2976
|
-
return i && i.canvas === t ? (
|
|
2976
|
+
return i && i.canvas === t ? (lo(t, s), i) : null;
|
|
2977
2977
|
}
|
|
2978
2978
|
releaseContext(t) {
|
|
2979
2979
|
const s = t.canvas;
|
|
@@ -2995,10 +2995,10 @@ class vo extends Qs {
|
|
|
2995
2995
|
addEventListener(t, s, i) {
|
|
2996
2996
|
this.removeEventListener(t, s);
|
|
2997
2997
|
const n = t.$proxies || (t.$proxies = {}), r = {
|
|
2998
|
-
attach:
|
|
2999
|
-
detach:
|
|
3000
|
-
resize:
|
|
3001
|
-
}[s] ||
|
|
2998
|
+
attach: go,
|
|
2999
|
+
detach: po,
|
|
3000
|
+
resize: bo
|
|
3001
|
+
}[s] || xo;
|
|
3002
3002
|
n[s] = r(t, s, i);
|
|
3003
3003
|
}
|
|
3004
3004
|
removeEventListener(t, s) {
|
|
@@ -3009,23 +3009,23 @@ class vo extends Qs {
|
|
|
3009
3009
|
attach: pe,
|
|
3010
3010
|
detach: pe,
|
|
3011
3011
|
resize: pe
|
|
3012
|
-
}[s] ||
|
|
3012
|
+
}[s] || fo)(t, s, n), i[s] = void 0;
|
|
3013
3013
|
}
|
|
3014
3014
|
getDevicePixelRatio() {
|
|
3015
3015
|
return window.devicePixelRatio;
|
|
3016
3016
|
}
|
|
3017
3017
|
getMaximumSize(t, s, i, n) {
|
|
3018
|
-
return
|
|
3018
|
+
return Cn(t, s, i, n);
|
|
3019
3019
|
}
|
|
3020
3020
|
isAttached(t) {
|
|
3021
|
-
const s = t &&
|
|
3021
|
+
const s = t && Pe(t);
|
|
3022
3022
|
return !!(s && s.isConnected);
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
|
-
function
|
|
3026
|
-
return !
|
|
3025
|
+
function vo(e) {
|
|
3026
|
+
return !Ae() || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas ? ao : yo;
|
|
3027
3027
|
}
|
|
3028
|
-
class
|
|
3028
|
+
class Ee {
|
|
3029
3029
|
static defaults = {};
|
|
3030
3030
|
static defaultRoutes = void 0;
|
|
3031
3031
|
x;
|
|
@@ -3044,7 +3044,7 @@ class Pe {
|
|
|
3044
3044
|
};
|
|
3045
3045
|
}
|
|
3046
3046
|
hasValue() {
|
|
3047
|
-
return
|
|
3047
|
+
return Ve(this.x) && Ve(this.y);
|
|
3048
3048
|
}
|
|
3049
3049
|
getProps(t, s) {
|
|
3050
3050
|
const i = this.$animations;
|
|
@@ -3056,11 +3056,11 @@ class Pe {
|
|
|
3056
3056
|
}), n;
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
|
-
function
|
|
3060
|
-
const s = e.options.ticks, i =
|
|
3059
|
+
function wo(e, t) {
|
|
3060
|
+
const s = e.options.ticks, i = Mo(e), n = Math.min(s.maxTicksLimit || i, i), o = s.major.enabled ? So(t) : [], r = o.length, a = o[0], c = o[r - 1], l = [];
|
|
3061
3061
|
if (r > n)
|
|
3062
|
-
return
|
|
3063
|
-
const h =
|
|
3062
|
+
return Oo(t, l, o, r / n), l;
|
|
3063
|
+
const h = ko(o, t, n);
|
|
3064
3064
|
if (r > 0) {
|
|
3065
3065
|
let d, f;
|
|
3066
3066
|
const u = r > 1 ? Math.round((c - a) / (r - 1)) : null;
|
|
@@ -3070,15 +3070,15 @@ function Mo(e, t) {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
return $t(t, l, h), l;
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
3073
|
+
function Mo(e) {
|
|
3074
3074
|
const t = e.options.offset, s = e._tickSize(), i = e._length / s + (t ? 0 : 1), n = e._maxLength / s;
|
|
3075
3075
|
return Math.floor(Math.min(i, n));
|
|
3076
3076
|
}
|
|
3077
|
-
function
|
|
3078
|
-
const i =
|
|
3077
|
+
function ko(e, t, s) {
|
|
3078
|
+
const i = Do(e), n = t.length / s;
|
|
3079
3079
|
if (!i)
|
|
3080
3080
|
return Math.max(n, 1);
|
|
3081
|
-
const o =
|
|
3081
|
+
const o = Fi(i);
|
|
3082
3082
|
for (let r = 0, a = o.length - 1; r < a; r++) {
|
|
3083
3083
|
const c = o[r];
|
|
3084
3084
|
if (c > n)
|
|
@@ -3086,14 +3086,14 @@ function So(e, t, s) {
|
|
|
3086
3086
|
}
|
|
3087
3087
|
return Math.max(n, 1);
|
|
3088
3088
|
}
|
|
3089
|
-
function
|
|
3089
|
+
function So(e) {
|
|
3090
3090
|
const t = [];
|
|
3091
3091
|
let s, i;
|
|
3092
3092
|
for (s = 0, i = e.length; s < i; s++)
|
|
3093
3093
|
e[s].major && t.push(s);
|
|
3094
3094
|
return t;
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function Oo(e, t, s, i) {
|
|
3097
3097
|
let n = 0, o = s[0], r;
|
|
3098
3098
|
for (i = Math.ceil(i), r = 0; r < e.length; r++)
|
|
3099
3099
|
r === o && (t.push(e[r]), n++, o = s[n * i]);
|
|
@@ -3106,7 +3106,7 @@ function $t(e, t, s, i, n) {
|
|
|
3106
3106
|
for (l = Math.max(o, 0); l < r; l++)
|
|
3107
3107
|
l === h && (t.push(e[l]), a++, h = Math.round(o + a * s));
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3109
|
+
function Do(e) {
|
|
3110
3110
|
const t = e.length;
|
|
3111
3111
|
let s, i;
|
|
3112
3112
|
if (t < 2)
|
|
@@ -3116,21 +3116,21 @@ function Co(e) {
|
|
|
3116
3116
|
return !1;
|
|
3117
3117
|
return i;
|
|
3118
3118
|
}
|
|
3119
|
-
const
|
|
3120
|
-
function
|
|
3119
|
+
const Co = (e) => e === "left" ? "right" : e === "right" ? "left" : e, gs = (e, t, s) => t === "top" || t === "left" ? e[t] + s : e[t] - s, ps = (e, t) => Math.min(t || e, e);
|
|
3120
|
+
function ms(e, t) {
|
|
3121
3121
|
const s = [], i = e.length / t, n = e.length;
|
|
3122
3122
|
let o = 0;
|
|
3123
3123
|
for (; o < n; o += i)
|
|
3124
3124
|
s.push(e[Math.floor(o)]);
|
|
3125
3125
|
return s;
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function Ao(e, t, s) {
|
|
3128
3128
|
const i = e.ticks.length, n = Math.min(t, i - 1), o = e._startPixel, r = e._endPixel, a = 1e-6;
|
|
3129
3129
|
let c = e.getPixelForTick(n), l;
|
|
3130
3130
|
if (!(s && (i === 1 ? l = Math.max(c - o, r - c) : t === 0 ? l = (e.getPixelForTick(1) - c) / 2 : l = (c - e.getPixelForTick(n - 1)) / 2, c += n < t ? l : -l, c < o - a || c > r + a)))
|
|
3131
3131
|
return c;
|
|
3132
3132
|
}
|
|
3133
|
-
function
|
|
3133
|
+
function Po(e, t) {
|
|
3134
3134
|
j(e, (s) => {
|
|
3135
3135
|
const i = s.gc, n = i.length / 2;
|
|
3136
3136
|
let o;
|
|
@@ -3144,45 +3144,45 @@ function Eo(e, t) {
|
|
|
3144
3144
|
function wt(e) {
|
|
3145
3145
|
return e.drawTicks ? e.tickLength : 0;
|
|
3146
3146
|
}
|
|
3147
|
-
function
|
|
3147
|
+
function _s(e, t) {
|
|
3148
3148
|
if (!e.display)
|
|
3149
3149
|
return 0;
|
|
3150
3150
|
const s = be(e.font, t), i = Et(e.padding);
|
|
3151
3151
|
return (B(e.text) ? e.text.length : 1) * s.lineHeight + i.height;
|
|
3152
3152
|
}
|
|
3153
|
-
function
|
|
3153
|
+
function Eo(e, t) {
|
|
3154
3154
|
return Tt(e, {
|
|
3155
3155
|
scale: t,
|
|
3156
3156
|
type: "scale"
|
|
3157
3157
|
});
|
|
3158
3158
|
}
|
|
3159
|
-
function
|
|
3159
|
+
function Ro(e, t, s) {
|
|
3160
3160
|
return Tt(e, {
|
|
3161
3161
|
tick: s,
|
|
3162
3162
|
index: t,
|
|
3163
3163
|
type: "tick"
|
|
3164
3164
|
});
|
|
3165
3165
|
}
|
|
3166
|
-
function
|
|
3167
|
-
let i =
|
|
3168
|
-
return (s && t !== "right" || !s && t === "right") && (i =
|
|
3166
|
+
function Io(e, t, s) {
|
|
3167
|
+
let i = Xi(e);
|
|
3168
|
+
return (s && t !== "right" || !s && t === "right") && (i = Co(i)), i;
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3170
|
+
function To(e, t, s, i) {
|
|
3171
3171
|
const { top: n, left: o, bottom: r, right: a, chart: c } = e, { chartArea: l, scales: h } = c;
|
|
3172
3172
|
let d = 0, f, u, g;
|
|
3173
3173
|
const m = r - n, b = a - o;
|
|
3174
3174
|
if (e.isHorizontal()) {
|
|
3175
|
-
if (u =
|
|
3175
|
+
if (u = $e(i, o, a), w(s)) {
|
|
3176
3176
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3177
3177
|
g = h[p].getPixelForValue(_) + m - t;
|
|
3178
|
-
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g =
|
|
3178
|
+
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g = gs(e, s, t);
|
|
3179
3179
|
f = a - o;
|
|
3180
3180
|
} else {
|
|
3181
3181
|
if (w(s)) {
|
|
3182
3182
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3183
3183
|
u = h[p].getPixelForValue(_) - b + t;
|
|
3184
|
-
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u =
|
|
3185
|
-
g =
|
|
3184
|
+
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u = gs(e, s, t);
|
|
3185
|
+
g = $e(i, r, n), d = s === "left" ? -$ : $;
|
|
3186
3186
|
}
|
|
3187
3187
|
return {
|
|
3188
3188
|
titleX: u,
|
|
@@ -3191,7 +3191,7 @@ function Lo(e, t, s, i) {
|
|
|
3191
3191
|
rotation: d
|
|
3192
3192
|
};
|
|
3193
3193
|
}
|
|
3194
|
-
class
|
|
3194
|
+
class Re extends Ee {
|
|
3195
3195
|
constructor(t) {
|
|
3196
3196
|
super(), this.id = t.id, this.type = t.type, this.options = void 0, this.ctx = t.ctx, this.chart = t.chart, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.width = void 0, this.height = void 0, this._margins = {
|
|
3197
3197
|
left: 0,
|
|
@@ -3263,9 +3263,9 @@ class Ee extends Pe {
|
|
|
3263
3263
|
right: 0,
|
|
3264
3264
|
top: 0,
|
|
3265
3265
|
bottom: 0
|
|
3266
|
-
}, i), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + i.left + i.right : this.height + i.top + i.bottom, this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range =
|
|
3266
|
+
}, i), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + i.left + i.right : this.height + i.top + i.bottom, this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = un(this, o, n), this._dataLimitsCached = !0), this.beforeBuildTicks(), this.ticks = this.buildTicks() || [], this.afterBuildTicks();
|
|
3267
3267
|
const c = a < this.ticks.length;
|
|
3268
|
-
this._convertTicksToLabels(c ?
|
|
3268
|
+
this._convertTicksToLabels(c ? ms(this.ticks, a) : this.ticks), this.configure(), this.beforeCalculateLabelRotation(), this.calculateLabelRotation(), this.afterCalculateLabelRotation(), r.display && (r.autoSkip || r.source === "auto") && (this.ticks = wo(this, this.ticks), this._labelSizes = null, this.afterAutoSkip()), c && this._convertTicksToLabels(this.ticks), this.beforeFit(), this.fit(), this.afterFit(), this.afterUpdate();
|
|
3269
3269
|
}
|
|
3270
3270
|
configure() {
|
|
3271
3271
|
let t = this.options.reverse, s, i;
|
|
@@ -3337,14 +3337,14 @@ class Ee extends Pe {
|
|
|
3337
3337
|
]);
|
|
3338
3338
|
}
|
|
3339
3339
|
calculateLabelRotation() {
|
|
3340
|
-
const t = this.options, s = t.ticks, i =
|
|
3340
|
+
const t = this.options, s = t.ticks, i = ps(this.ticks.length, t.ticks.maxTicksLimit), n = s.minRotation || 0, o = s.maxRotation;
|
|
3341
3341
|
let r = n, a, c, l;
|
|
3342
3342
|
if (!this._isVisible() || !s.display || n >= o || i <= 1 || !this.isHorizontal()) {
|
|
3343
3343
|
this.labelRotation = n;
|
|
3344
3344
|
return;
|
|
3345
3345
|
}
|
|
3346
3346
|
const h = this._getLabelSizes(), d = h.widest.width, f = h.highest.height, u = J(this.chart.width - d, 0, this.maxWidth);
|
|
3347
|
-
a = t.offset ? this.maxWidth / i : u / (i - 1), d + 6 > a && (a = u / (i - (t.offset ? 0.5 : 1)), c = this.maxHeight - wt(t.grid) - s.padding -
|
|
3347
|
+
a = t.offset ? this.maxWidth / i : u / (i - 1), d + 6 > a && (a = u / (i - (t.offset ? 0.5 : 1)), c = this.maxHeight - wt(t.grid) - s.padding - _s(t.title, this.chart.options.font), l = Math.sqrt(d * d + f * f), r = Bi(Math.min(Math.asin(J((h.highest.height + 6) / a, -1, 1)), Math.asin(J(c / l, -1, 1)) - Math.asin(J(f / l, -1, 1)))), r = Math.max(n, Math.min(o, r))), this.labelRotation = r;
|
|
3348
3348
|
}
|
|
3349
3349
|
afterCalculateLabelRotation() {
|
|
3350
3350
|
E(this.options.afterCalculateLabelRotation, [
|
|
@@ -3364,7 +3364,7 @@ class Ee extends Pe {
|
|
|
3364
3364
|
height: 0
|
|
3365
3365
|
}, { chart: s, options: { ticks: i, title: n, grid: o } } = this, r = this._isVisible(), a = this.isHorizontal();
|
|
3366
3366
|
if (r) {
|
|
3367
|
-
const c =
|
|
3367
|
+
const c = _s(n, s.options.font);
|
|
3368
3368
|
if (a ? (t.width = this.maxWidth, t.height = wt(o) + c) : (t.height = this.maxHeight, t.width = wt(o) + c), i.display && this.ticks.length) {
|
|
3369
3369
|
const { first: l, last: h, widest: d, highest: f } = this._getLabelSizes(), u = i.padding * 2, g = gt(this.labelRotation), m = Math.cos(g), b = Math.sin(g);
|
|
3370
3370
|
if (a) {
|
|
@@ -3417,25 +3417,25 @@ class Ee extends Pe {
|
|
|
3417
3417
|
if (!t) {
|
|
3418
3418
|
const s = this.options.ticks.sampleSize;
|
|
3419
3419
|
let i = this.ticks;
|
|
3420
|
-
s < i.length && (i =
|
|
3420
|
+
s < i.length && (i = ms(i, s)), this._labelSizes = t = this._computeLabelSizes(i, i.length, this.options.ticks.maxTicksLimit);
|
|
3421
3421
|
}
|
|
3422
3422
|
return t;
|
|
3423
3423
|
}
|
|
3424
3424
|
_computeLabelSizes(t, s, i) {
|
|
3425
|
-
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s /
|
|
3425
|
+
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s / ps(s, i));
|
|
3426
3426
|
let l = 0, h = 0, d, f, u, g, m, b, p, _, x, v, y;
|
|
3427
3427
|
for (d = 0; d < s; d += c) {
|
|
3428
3428
|
if (g = t[d].label, m = this._resolveTickFontOptions(d), n.font = b = m.string, p = o[b] = o[b] || {
|
|
3429
3429
|
data: {},
|
|
3430
3430
|
gc: []
|
|
3431
3431
|
}, _ = m.lineHeight, x = v = 0, !W(g) && !B(g))
|
|
3432
|
-
x =
|
|
3432
|
+
x = qe(n, p.data, p.gc, x, g), v = _;
|
|
3433
3433
|
else if (B(g))
|
|
3434
3434
|
for (f = 0, u = g.length; f < u; ++f)
|
|
3435
|
-
y = g[f], !W(y) && !B(y) && (x =
|
|
3435
|
+
y = g[f], !W(y) && !B(y) && (x = qe(n, p.data, p.gc, x, y), v += _);
|
|
3436
3436
|
r.push(x), a.push(v), l = Math.max(x, l), h = Math.max(v, h);
|
|
3437
3437
|
}
|
|
3438
|
-
|
|
3438
|
+
Po(o, s);
|
|
3439
3439
|
const O = r.indexOf(l), D = a.indexOf(h), L = (I) => ({
|
|
3440
3440
|
width: r[I] || 0,
|
|
3441
3441
|
height: a[I] || 0
|
|
@@ -3464,7 +3464,7 @@ class Ee extends Pe {
|
|
|
3464
3464
|
getPixelForDecimal(t) {
|
|
3465
3465
|
this._reversePixels && (t = 1 - t);
|
|
3466
3466
|
const s = this._startPixel + t * this._length;
|
|
3467
|
-
return
|
|
3467
|
+
return Hi(this._alignToPixels ? ot(this.chart, s, 0) : s);
|
|
3468
3468
|
}
|
|
3469
3469
|
getDecimalForPixel(t) {
|
|
3470
3470
|
const s = (t - this._startPixel) / this._length;
|
|
@@ -3481,9 +3481,9 @@ class Ee extends Pe {
|
|
|
3481
3481
|
const s = this.ticks || [];
|
|
3482
3482
|
if (t >= 0 && t < s.length) {
|
|
3483
3483
|
const i = s[t];
|
|
3484
|
-
return i.$context || (i.$context =
|
|
3484
|
+
return i.$context || (i.$context = Ro(this.getContext(), t, i));
|
|
3485
3485
|
}
|
|
3486
|
-
return this.$context || (this.$context =
|
|
3486
|
+
return this.$context || (this.$context = Eo(this.chart.getContext(), this));
|
|
3487
3487
|
}
|
|
3488
3488
|
_tickSize() {
|
|
3489
3489
|
const t = this.options.ticks, s = gt(this.labelRotation), i = Math.abs(Math.cos(s)), n = Math.abs(Math.sin(s)), o = this._getLabelSizes(), r = t.autoSkipPadding || 0, a = o ? o.widest.width + r : 0, c = o ? o.highest.height + r : 0;
|
|
@@ -3526,7 +3526,7 @@ class Ee extends Pe {
|
|
|
3526
3526
|
const Y = A(n.ticks.maxTicksLimit, d), M = Math.max(1, Math.ceil(d / Y));
|
|
3527
3527
|
for (x = 0; x < d; x += M) {
|
|
3528
3528
|
const S = this.getContext(x), C = o.setContext(S), X = a.setContext(S), F = C.lineWidth, lt = C.color, Lt = X.dash || [], ht = X.dashOffset, _t = C.tickWidth, it = C.tickColor, bt = C.tickBorderDash || [], nt = C.tickBorderDashOffset;
|
|
3529
|
-
v =
|
|
3529
|
+
v = Ao(this, x, c), v !== void 0 && (y = ot(i, v, F), l ? O = L = k = P = y : D = I = H = V = y, u.push({
|
|
3530
3530
|
tx1: O,
|
|
3531
3531
|
ty1: D,
|
|
3532
3532
|
tx2: L,
|
|
@@ -3728,7 +3728,7 @@ class Ee extends Pe {
|
|
|
3728
3728
|
const o = this.getLabelItems(t);
|
|
3729
3729
|
for (const r of o) {
|
|
3730
3730
|
const a = r.options, c = r.font, l = r.label, h = r.textOffset;
|
|
3731
|
-
|
|
3731
|
+
Ge(i, l, 0, h, c, a);
|
|
3732
3732
|
}
|
|
3733
3733
|
n && Vs(i);
|
|
3734
3734
|
}
|
|
@@ -3739,12 +3739,12 @@ class Ee extends Pe {
|
|
|
3739
3739
|
const o = be(i.font), r = Et(i.padding), a = i.align;
|
|
3740
3740
|
let c = o.lineHeight / 2;
|
|
3741
3741
|
s === "bottom" || s === "center" || w(s) ? (c += r.bottom, B(i.text) && (c += o.lineHeight * (i.text.length - 1))) : c += r.top;
|
|
3742
|
-
const { titleX: l, titleY: h, maxWidth: d, rotation: f } =
|
|
3743
|
-
|
|
3742
|
+
const { titleX: l, titleY: h, maxWidth: d, rotation: f } = To(this, c, s, a);
|
|
3743
|
+
Ge(t, i.text, 0, 0, o, {
|
|
3744
3744
|
color: i.color,
|
|
3745
3745
|
maxWidth: d,
|
|
3746
3746
|
rotation: f,
|
|
3747
|
-
textAlign:
|
|
3747
|
+
textAlign: Io(a, s, n),
|
|
3748
3748
|
textBaseline: "middle",
|
|
3749
3749
|
translation: [
|
|
3750
3750
|
l,
|
|
@@ -3757,7 +3757,7 @@ class Ee extends Pe {
|
|
|
3757
3757
|
}
|
|
3758
3758
|
_layers() {
|
|
3759
3759
|
const t = this.options, s = t.ticks && t.ticks.z || 0, i = A(t.grid && t.grid.z, -1), n = A(t.border && t.border.z, 0);
|
|
3760
|
-
return !this._isVisible() || this.draw !==
|
|
3760
|
+
return !this._isVisible() || this.draw !== Re.prototype.draw ? [
|
|
3761
3761
|
{
|
|
3762
3762
|
z: s,
|
|
3763
3763
|
draw: (o) => {
|
|
@@ -3813,11 +3813,11 @@ class Yt {
|
|
|
3813
3813
|
register(t) {
|
|
3814
3814
|
const s = Object.getPrototypeOf(t);
|
|
3815
3815
|
let i;
|
|
3816
|
-
|
|
3816
|
+
Fo(s) && (i = this.register(s));
|
|
3817
3817
|
const n = this.items, o = t.id, r = this.scope + "." + o;
|
|
3818
3818
|
if (!o)
|
|
3819
3819
|
throw new Error("class does not have id: " + t);
|
|
3820
|
-
return o in n || (n[o] = t,
|
|
3820
|
+
return o in n || (n[o] = t, Lo(t, r, i), this.override && R.override(t.id, t.overrides)), r;
|
|
3821
3821
|
}
|
|
3822
3822
|
get(t) {
|
|
3823
3823
|
return this.items[t];
|
|
@@ -3827,15 +3827,15 @@ class Yt {
|
|
|
3827
3827
|
i in s && delete s[i], n && i in R[n] && (delete R[n][i], this.override && delete ct[i]);
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
3830
|
-
function
|
|
3830
|
+
function Lo(e, t, s) {
|
|
3831
3831
|
const i = At(/* @__PURE__ */ Object.create(null), [
|
|
3832
3832
|
s ? R.get(s) : {},
|
|
3833
3833
|
R.get(t),
|
|
3834
3834
|
e.defaults
|
|
3835
3835
|
]);
|
|
3836
|
-
R.set(t, i), e.defaultRoutes &&
|
|
3836
|
+
R.set(t, i), e.defaultRoutes && zo(t, e.defaultRoutes), e.descriptors && R.describe(t, e.descriptors);
|
|
3837
3837
|
}
|
|
3838
|
-
function
|
|
3838
|
+
function zo(e, t) {
|
|
3839
3839
|
Object.keys(t).forEach((s) => {
|
|
3840
3840
|
const i = s.split("."), n = i.pop(), o = [
|
|
3841
3841
|
e
|
|
@@ -3843,12 +3843,12 @@ function Fo(e, t) {
|
|
|
3843
3843
|
R.route(o, n, c, a);
|
|
3844
3844
|
});
|
|
3845
3845
|
}
|
|
3846
|
-
function
|
|
3846
|
+
function Fo(e) {
|
|
3847
3847
|
return "id" in e && "defaults" in e;
|
|
3848
3848
|
}
|
|
3849
|
-
class
|
|
3849
|
+
class jo {
|
|
3850
3850
|
constructor() {
|
|
3851
|
-
this.controllers = new Yt(qs, "datasets", !0), this.elements = new Yt(
|
|
3851
|
+
this.controllers = new Yt(qs, "datasets", !0), this.elements = new Yt(Ee, "elements"), this.plugins = new Yt(Object, "plugins"), this.scales = new Yt(Re, "scales"), this._typedRegistries = [
|
|
3852
3852
|
this.controllers,
|
|
3853
3853
|
this.scales,
|
|
3854
3854
|
this.elements
|
|
@@ -3908,7 +3908,7 @@ class Bo {
|
|
|
3908
3908
|
});
|
|
3909
3909
|
}
|
|
3910
3910
|
_exec(t, s, i) {
|
|
3911
|
-
const n =
|
|
3911
|
+
const n = Se(t);
|
|
3912
3912
|
E(i["before" + n], [], i), s[t](i), E(i["after" + n], [], i);
|
|
3913
3913
|
}
|
|
3914
3914
|
_getRegistryForType(t) {
|
|
@@ -3926,8 +3926,8 @@ class Bo {
|
|
|
3926
3926
|
return n;
|
|
3927
3927
|
}
|
|
3928
3928
|
}
|
|
3929
|
-
var U = /* @__PURE__ */ new
|
|
3930
|
-
class
|
|
3929
|
+
var U = /* @__PURE__ */ new jo();
|
|
3930
|
+
class Bo {
|
|
3931
3931
|
constructor() {
|
|
3932
3932
|
this._init = void 0;
|
|
3933
3933
|
}
|
|
@@ -3960,15 +3960,15 @@ class Ho {
|
|
|
3960
3960
|
return this._notifyStateChanges(t), s;
|
|
3961
3961
|
}
|
|
3962
3962
|
_createDescriptors(t, s) {
|
|
3963
|
-
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o =
|
|
3964
|
-
return n === !1 && !s ? [] :
|
|
3963
|
+
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o = Ho(i);
|
|
3964
|
+
return n === !1 && !s ? [] : Vo(t, o, n, s);
|
|
3965
3965
|
}
|
|
3966
3966
|
_notifyStateChanges(t) {
|
|
3967
3967
|
const s = this._oldCache || [], i = this._cache, n = (o, r) => o.filter((a) => !r.some((c) => a.plugin.id === c.plugin.id));
|
|
3968
3968
|
this._notify(n(s, i), t, "stop"), this._notify(n(i, s), t, "start");
|
|
3969
3969
|
}
|
|
3970
3970
|
}
|
|
3971
|
-
function
|
|
3971
|
+
function Ho(e) {
|
|
3972
3972
|
const t = {}, s = [], i = Object.keys(U.plugins.items);
|
|
3973
3973
|
for (let o = 0; o < i.length; o++)
|
|
3974
3974
|
s.push(U.getPlugin(i[o]));
|
|
@@ -3982,16 +3982,16 @@ function Wo(e) {
|
|
|
3982
3982
|
localIds: t
|
|
3983
3983
|
};
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Wo(e, t) {
|
|
3986
3986
|
return !t && e === !1 ? null : e === !0 ? {} : e;
|
|
3987
3987
|
}
|
|
3988
|
-
function
|
|
3988
|
+
function Vo(e, { plugins: t, localIds: s }, i, n) {
|
|
3989
3989
|
const o = [], r = e.getContext();
|
|
3990
3990
|
for (const a of t) {
|
|
3991
|
-
const c = a.id, l =
|
|
3991
|
+
const c = a.id, l = Wo(i[c], n);
|
|
3992
3992
|
l !== null && o.push({
|
|
3993
3993
|
plugin: a,
|
|
3994
|
-
options:
|
|
3994
|
+
options: No(e.config, {
|
|
3995
3995
|
plugin: a,
|
|
3996
3996
|
local: s[c]
|
|
3997
3997
|
}, l, r)
|
|
@@ -3999,7 +3999,7 @@ function No(e, { plugins: t, localIds: s }, i, n) {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
return o;
|
|
4001
4001
|
}
|
|
4002
|
-
function
|
|
4002
|
+
function No(e, { plugin: t, local: s }, i, n) {
|
|
4003
4003
|
const o = e.pluginScopeKeys(t), r = e.getOptionScopes(i, o);
|
|
4004
4004
|
return s && t.defaults && r.push(t.defaults), e.createResolver(r, n, [
|
|
4005
4005
|
""
|
|
@@ -4013,48 +4013,48 @@ function xe(e, t) {
|
|
|
4013
4013
|
const s = R.datasets[e] || {};
|
|
4014
4014
|
return ((t.datasets || {})[e] || {}).indexAxis || t.indexAxis || s.indexAxis || "x";
|
|
4015
4015
|
}
|
|
4016
|
-
function
|
|
4016
|
+
function $o(e, t) {
|
|
4017
4017
|
let s = e;
|
|
4018
4018
|
return e === "_index_" ? s = t : e === "_value_" && (s = t === "x" ? "y" : "x"), s;
|
|
4019
4019
|
}
|
|
4020
|
-
function
|
|
4020
|
+
function Yo(e, t) {
|
|
4021
4021
|
return e === t ? "_index_" : "_value_";
|
|
4022
4022
|
}
|
|
4023
|
-
function
|
|
4023
|
+
function bs(e) {
|
|
4024
4024
|
if (e === "x" || e === "y" || e === "r")
|
|
4025
4025
|
return e;
|
|
4026
4026
|
}
|
|
4027
|
-
function
|
|
4027
|
+
function Xo(e) {
|
|
4028
4028
|
if (e === "top" || e === "bottom")
|
|
4029
4029
|
return "x";
|
|
4030
4030
|
if (e === "left" || e === "right")
|
|
4031
4031
|
return "y";
|
|
4032
4032
|
}
|
|
4033
4033
|
function ye(e, ...t) {
|
|
4034
|
-
if (
|
|
4034
|
+
if (bs(e))
|
|
4035
4035
|
return e;
|
|
4036
4036
|
for (const s of t) {
|
|
4037
|
-
const i = s.axis ||
|
|
4037
|
+
const i = s.axis || Xo(s.position) || e.length > 1 && bs(e[0].toLowerCase());
|
|
4038
4038
|
if (i)
|
|
4039
4039
|
return i;
|
|
4040
4040
|
}
|
|
4041
4041
|
throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`);
|
|
4042
4042
|
}
|
|
4043
|
-
function
|
|
4043
|
+
function xs(e, t, s) {
|
|
4044
4044
|
if (s[t + "AxisID"] === e)
|
|
4045
4045
|
return {
|
|
4046
4046
|
axis: t
|
|
4047
4047
|
};
|
|
4048
4048
|
}
|
|
4049
|
-
function
|
|
4049
|
+
function Ko(e, t) {
|
|
4050
4050
|
if (t.data && t.data.datasets) {
|
|
4051
4051
|
const s = t.data.datasets.filter((i) => i.xAxisID === e || i.yAxisID === e);
|
|
4052
4052
|
if (s.length)
|
|
4053
|
-
return
|
|
4053
|
+
return xs(e, "x", s[0]) || xs(e, "y", s[0]);
|
|
4054
4054
|
}
|
|
4055
4055
|
return {};
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function Uo(e, t) {
|
|
4058
4058
|
const s = ct[e.type] || {
|
|
4059
4059
|
scales: {}
|
|
4060
4060
|
}, i = t.scales || {}, n = xe(e.type, t), o = /* @__PURE__ */ Object.create(null);
|
|
@@ -4064,7 +4064,7 @@ function qo(e, t) {
|
|
|
4064
4064
|
return console.error(`Invalid scale configuration for scale: ${r}`);
|
|
4065
4065
|
if (a._proxy)
|
|
4066
4066
|
return console.warn(`Ignoring resolver passed as options for scale: ${r}`);
|
|
4067
|
-
const c = ye(r, a,
|
|
4067
|
+
const c = ye(r, a, Ko(r, e), R.scales[a.type]), l = Yo(c, n), h = s.scales || {};
|
|
4068
4068
|
o[r] = Kt(/* @__PURE__ */ Object.create(null), [
|
|
4069
4069
|
{
|
|
4070
4070
|
axis: c
|
|
@@ -4076,7 +4076,7 @@ function qo(e, t) {
|
|
|
4076
4076
|
}), e.data.datasets.forEach((r) => {
|
|
4077
4077
|
const a = r.type || e.type, c = r.indexAxis || xe(a, t), h = (ct[a] || {}).scales || {};
|
|
4078
4078
|
Object.keys(h).forEach((d) => {
|
|
4079
|
-
const f =
|
|
4079
|
+
const f = $o(d, c), u = r[f + "AxisID"] || f;
|
|
4080
4080
|
o[u] = o[u] || /* @__PURE__ */ Object.create(null), Kt(o[u], [
|
|
4081
4081
|
{
|
|
4082
4082
|
axis: f
|
|
@@ -4095,26 +4095,26 @@ function qo(e, t) {
|
|
|
4095
4095
|
}
|
|
4096
4096
|
function ei(e) {
|
|
4097
4097
|
const t = e.options || (e.options = {});
|
|
4098
|
-
t.plugins = A(t.plugins, {}), t.scales =
|
|
4098
|
+
t.plugins = A(t.plugins, {}), t.scales = Uo(e, t);
|
|
4099
4099
|
}
|
|
4100
4100
|
function si(e) {
|
|
4101
4101
|
return e = e || {}, e.datasets = e.datasets || [], e.labels = e.labels || [], e;
|
|
4102
4102
|
}
|
|
4103
|
-
function
|
|
4103
|
+
function qo(e) {
|
|
4104
4104
|
return e = e || {}, e.data = si(e.data), ei(e), e;
|
|
4105
4105
|
}
|
|
4106
|
-
const
|
|
4106
|
+
const ys = /* @__PURE__ */ new Map(), ii = /* @__PURE__ */ new Set();
|
|
4107
4107
|
function Xt(e, t) {
|
|
4108
|
-
let s =
|
|
4109
|
-
return s || (s = t(),
|
|
4108
|
+
let s = ys.get(e);
|
|
4109
|
+
return s || (s = t(), ys.set(e, s), ii.add(s)), s;
|
|
4110
4110
|
}
|
|
4111
4111
|
const Mt = (e, t, s) => {
|
|
4112
4112
|
const i = Pt(t, s);
|
|
4113
4113
|
i !== void 0 && e.add(i);
|
|
4114
4114
|
};
|
|
4115
|
-
class
|
|
4115
|
+
class Zo {
|
|
4116
4116
|
constructor(t) {
|
|
4117
|
-
this._config =
|
|
4117
|
+
this._config = qo(t), this._scopeCache = /* @__PURE__ */ new Map(), this._resolverCache = /* @__PURE__ */ new Map();
|
|
4118
4118
|
}
|
|
4119
4119
|
get platform() {
|
|
4120
4120
|
return this._config.platform;
|
|
@@ -4220,9 +4220,9 @@ class Go {
|
|
|
4220
4220
|
]) {
|
|
4221
4221
|
const o = {
|
|
4222
4222
|
$shared: !0
|
|
4223
|
-
}, { resolver: r, subPrefixes: a } =
|
|
4223
|
+
}, { resolver: r, subPrefixes: a } = vs(this._resolverCache, t, n);
|
|
4224
4224
|
let c = r;
|
|
4225
|
-
if (
|
|
4225
|
+
if (Qo(r, s)) {
|
|
4226
4226
|
o.$shared = !1, i = st(i) ? i() : i;
|
|
4227
4227
|
const l = this.createResolver(t, i, a);
|
|
4228
4228
|
c = mt(r, i, l);
|
|
@@ -4234,66 +4234,66 @@ class Go {
|
|
|
4234
4234
|
createResolver(t, s, i = [
|
|
4235
4235
|
""
|
|
4236
4236
|
], n) {
|
|
4237
|
-
const { resolver: o } =
|
|
4237
|
+
const { resolver: o } = vs(this._resolverCache, t, i);
|
|
4238
4238
|
return w(s) ? mt(o, s, void 0, n) : o;
|
|
4239
4239
|
}
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4241
|
+
function vs(e, t, s) {
|
|
4242
4242
|
let i = e.get(t);
|
|
4243
4243
|
i || (i = /* @__PURE__ */ new Map(), e.set(t, i));
|
|
4244
4244
|
const n = s.join();
|
|
4245
4245
|
let o = i.get(n);
|
|
4246
4246
|
return o || (o = {
|
|
4247
|
-
resolver:
|
|
4247
|
+
resolver: Oe(t, s),
|
|
4248
4248
|
subPrefixes: s.filter((a) => !a.toLowerCase().includes("hover"))
|
|
4249
4249
|
}, i.set(n, o)), o;
|
|
4250
4250
|
}
|
|
4251
|
-
const
|
|
4252
|
-
function
|
|
4251
|
+
const Go = (e) => w(e) && Object.getOwnPropertyNames(e).some((t) => st(e[t]));
|
|
4252
|
+
function Qo(e, t) {
|
|
4253
4253
|
const { isScriptable: s, isIndexable: i } = $s(e);
|
|
4254
4254
|
for (const n of t) {
|
|
4255
4255
|
const o = s(n), r = i(n), a = (r || o) && e[n];
|
|
4256
|
-
if (o && (st(a) ||
|
|
4256
|
+
if (o && (st(a) || Go(a)) || r && B(a))
|
|
4257
4257
|
return !0;
|
|
4258
4258
|
}
|
|
4259
4259
|
return !1;
|
|
4260
4260
|
}
|
|
4261
|
-
var
|
|
4262
|
-
const
|
|
4261
|
+
var Jo = "4.5.1";
|
|
4262
|
+
const tr = [
|
|
4263
4263
|
"top",
|
|
4264
4264
|
"bottom",
|
|
4265
4265
|
"left",
|
|
4266
4266
|
"right",
|
|
4267
4267
|
"chartArea"
|
|
4268
4268
|
];
|
|
4269
|
-
function vs(e, t) {
|
|
4270
|
-
return e === "top" || e === "bottom" || er.indexOf(e) === -1 && t === "x";
|
|
4271
|
-
}
|
|
4272
4269
|
function ws(e, t) {
|
|
4270
|
+
return e === "top" || e === "bottom" || tr.indexOf(e) === -1 && t === "x";
|
|
4271
|
+
}
|
|
4272
|
+
function Ms(e, t) {
|
|
4273
4273
|
return function(s, i) {
|
|
4274
4274
|
return s[e] === i[e] ? s[t] - i[t] : s[e] - i[e];
|
|
4275
4275
|
};
|
|
4276
4276
|
}
|
|
4277
|
-
function
|
|
4277
|
+
function ks(e) {
|
|
4278
4278
|
const t = e.chart, s = t.options.animation;
|
|
4279
4279
|
t.notifyPlugins("afterRender"), E(s && s.onComplete, [
|
|
4280
4280
|
e
|
|
4281
4281
|
], t);
|
|
4282
4282
|
}
|
|
4283
|
-
function
|
|
4283
|
+
function er(e) {
|
|
4284
4284
|
const t = e.chart, s = t.options.animation;
|
|
4285
4285
|
E(s && s.onProgress, [
|
|
4286
4286
|
e
|
|
4287
4287
|
], t);
|
|
4288
4288
|
}
|
|
4289
4289
|
function ni(e) {
|
|
4290
|
-
return
|
|
4290
|
+
return Ae() && typeof e == "string" ? e = document.getElementById(e) : e && e.length && (e = e[0]), e && e.canvas && (e = e.canvas), e;
|
|
4291
4291
|
}
|
|
4292
|
-
const qt = {},
|
|
4292
|
+
const qt = {}, Ss = (e) => {
|
|
4293
4293
|
const t = ni(e);
|
|
4294
4294
|
return Object.values(qt).filter((s) => s.canvas === t).pop();
|
|
4295
4295
|
};
|
|
4296
|
-
function
|
|
4296
|
+
function sr(e, t, s) {
|
|
4297
4297
|
const i = Object.keys(e);
|
|
4298
4298
|
for (const n of i) {
|
|
4299
4299
|
const o = +n;
|
|
@@ -4303,7 +4303,7 @@ function ir(e, t, s) {
|
|
|
4303
4303
|
}
|
|
4304
4304
|
}
|
|
4305
4305
|
}
|
|
4306
|
-
function
|
|
4306
|
+
function ir(e, t, s, i) {
|
|
4307
4307
|
return !s || e.type === "mouseout" ? null : i ? t : e;
|
|
4308
4308
|
}
|
|
4309
4309
|
let oe = class {
|
|
@@ -4311,26 +4311,26 @@ let oe = class {
|
|
|
4311
4311
|
static instances = qt;
|
|
4312
4312
|
static overrides = ct;
|
|
4313
4313
|
static registry = U;
|
|
4314
|
-
static version =
|
|
4315
|
-
static getChart =
|
|
4314
|
+
static version = Jo;
|
|
4315
|
+
static getChart = Ss;
|
|
4316
4316
|
static register(...t) {
|
|
4317
|
-
U.add(...t),
|
|
4317
|
+
U.add(...t), Os();
|
|
4318
4318
|
}
|
|
4319
4319
|
static unregister(...t) {
|
|
4320
|
-
U.remove(...t),
|
|
4320
|
+
U.remove(...t), Os();
|
|
4321
4321
|
}
|
|
4322
4322
|
constructor(t, s) {
|
|
4323
|
-
const i = this.config = new
|
|
4323
|
+
const i = this.config = new Zo(s), n = ni(t), o = Ss(n);
|
|
4324
4324
|
if (o)
|
|
4325
4325
|
throw new Error("Canvas is already in use. Chart with ID '" + o.id + "' must be destroyed before the canvas with ID '" + o.canvas.id + "' can be reused.");
|
|
4326
4326
|
const r = i.createResolver(i.chartOptionScopes(), this.getContext());
|
|
4327
|
-
this.platform = new (i.platform ||
|
|
4327
|
+
this.platform = new (i.platform || vo(n))(), this.platform.updateConfig(i);
|
|
4328
4328
|
const a = this.platform.acquireContext(n, r.aspectRatio), c = a && a.canvas, l = c && c.height, h = c && c.width;
|
|
4329
|
-
if (this.id =
|
|
4329
|
+
if (this.id = Pi(), this.ctx = a, this.canvas = c, this.width = h, this.height = l, this._options = r, this._aspectRatio = this.aspectRatio, this._layers = [], this._metasets = [], this._stacks = void 0, this.boxes = [], this.currentDevicePixelRatio = void 0, this.chartArea = void 0, this._active = [], this._lastEvent = void 0, this._listeners = {}, this._responsiveListeners = void 0, this._sortedMetasets = [], this.scales = {}, this._plugins = new Bo(), this.$proxies = {}, this._hiddenIndices = {}, this.attached = !1, this._animationsDisabled = void 0, this.$context = void 0, this._doResize = Yi((d) => this.update(d), r.resizeDelay || 0), this._dataChanges = [], qt[this.id] = this, !a || !c) {
|
|
4330
4330
|
console.error("Failed to create chart: can't acquire context from the given item");
|
|
4331
4331
|
return;
|
|
4332
4332
|
}
|
|
4333
|
-
Z.listen(this, "complete",
|
|
4333
|
+
Z.listen(this, "complete", ks), Z.listen(this, "progress", er), this._initialize(), this.attached && this.update();
|
|
4334
4334
|
}
|
|
4335
4335
|
get aspectRatio() {
|
|
4336
4336
|
const { options: { aspectRatio: t, maintainAspectRatio: s }, width: i, height: n, _aspectRatio: o } = this;
|
|
@@ -4352,10 +4352,10 @@ let oe = class {
|
|
|
4352
4352
|
return U;
|
|
4353
4353
|
}
|
|
4354
4354
|
_initialize() {
|
|
4355
|
-
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() :
|
|
4355
|
+
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : ts(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this;
|
|
4356
4356
|
}
|
|
4357
4357
|
clear() {
|
|
4358
|
-
return
|
|
4358
|
+
return Ze(this.canvas, this.ctx), this;
|
|
4359
4359
|
}
|
|
4360
4360
|
stop() {
|
|
4361
4361
|
return Z.stop(this), this;
|
|
@@ -4368,7 +4368,7 @@ let oe = class {
|
|
|
4368
4368
|
}
|
|
4369
4369
|
_resize(t, s) {
|
|
4370
4370
|
const i = this.options, n = this.canvas, o = i.maintainAspectRatio && this.aspectRatio, r = this.platform.getMaximumSize(n, t, s, o), a = i.devicePixelRatio || this.platform.getDevicePixelRatio(), c = this.width ? "resize" : "attach";
|
|
4371
|
-
this.width = r.width, this.height = r.height, this._aspectRatio = this.aspectRatio,
|
|
4371
|
+
this.width = r.width, this.height = r.height, this._aspectRatio = this.aspectRatio, ts(this, a, !0) && (this.notifyPlugins("resize", {
|
|
4372
4372
|
size: r
|
|
4373
4373
|
}), E(i.onResize, [
|
|
4374
4374
|
this,
|
|
@@ -4393,7 +4393,7 @@ let oe = class {
|
|
|
4393
4393
|
};
|
|
4394
4394
|
}))), j(o, (r) => {
|
|
4395
4395
|
const a = r.options, c = a.id, l = ye(c, a), h = A(a.type, r.dtype);
|
|
4396
|
-
(a.position === void 0 ||
|
|
4396
|
+
(a.position === void 0 || ws(a.position, l) !== ws(r.dposition)) && (a.position = r.dposition), n[c] = !0;
|
|
4397
4397
|
let d = null;
|
|
4398
4398
|
if (c in i && i[c].type === h)
|
|
4399
4399
|
d = i[c];
|
|
@@ -4420,7 +4420,7 @@ let oe = class {
|
|
|
4420
4420
|
this._destroyDatasetMeta(n);
|
|
4421
4421
|
t.splice(s, i - s);
|
|
4422
4422
|
}
|
|
4423
|
-
this._sortedMetasets = t.slice(0).sort(
|
|
4423
|
+
this._sortedMetasets = t.slice(0).sort(Ms("order", "index"));
|
|
4424
4424
|
}
|
|
4425
4425
|
_removeUnreferencedMetasets() {
|
|
4426
4426
|
const { _metasets: t, data: { datasets: s } } = this;
|
|
@@ -4475,7 +4475,7 @@ let oe = class {
|
|
|
4475
4475
|
l.reset();
|
|
4476
4476
|
}), this._updateDatasets(t), this.notifyPlugins("afterUpdate", {
|
|
4477
4477
|
mode: t
|
|
4478
|
-
}), this._layers.sort(
|
|
4478
|
+
}), this._layers.sort(Ms("z", "_idx"));
|
|
4479
4479
|
const { _active: a, _lastEvent: c } = this;
|
|
4480
4480
|
c ? this._eventHandler(c, !0) : a.length && this._updateHoverStyles(a, a, !0), this.render();
|
|
4481
4481
|
}
|
|
@@ -4486,13 +4486,13 @@ let oe = class {
|
|
|
4486
4486
|
}
|
|
4487
4487
|
_checkEventBindings() {
|
|
4488
4488
|
const t = this.options, s = new Set(Object.keys(this._listeners)), i = new Set(t.events);
|
|
4489
|
-
(!
|
|
4489
|
+
(!He(s, i) || !!this._responsiveListeners !== t.responsive) && (this.unbindEvents(), this.bindEvents());
|
|
4490
4490
|
}
|
|
4491
4491
|
_updateHiddenIndices() {
|
|
4492
4492
|
const { _hiddenIndices: t } = this, s = this._getUniformDataChanges() || [];
|
|
4493
4493
|
for (const { method: i, start: n, count: o } of s) {
|
|
4494
4494
|
const r = i === "_removeElements" ? -o : o;
|
|
4495
|
-
|
|
4495
|
+
sr(t, n, r);
|
|
4496
4496
|
}
|
|
4497
4497
|
}
|
|
4498
4498
|
_getUniformDataChanges() {
|
|
@@ -4502,7 +4502,7 @@ let oe = class {
|
|
|
4502
4502
|
this._dataChanges = [];
|
|
4503
4503
|
const s = this.data.datasets.length, i = (o) => new Set(t.filter((r) => r[0] === o).map((r, a) => a + "," + r.splice(1).join(","))), n = i(0);
|
|
4504
4504
|
for (let o = 1; o < s; o++)
|
|
4505
|
-
if (!
|
|
4505
|
+
if (!He(n, i(o)))
|
|
4506
4506
|
return;
|
|
4507
4507
|
return Array.from(n).map((o) => o.split(",")).map((o) => ({
|
|
4508
4508
|
method: o[1],
|
|
@@ -4551,7 +4551,7 @@ let oe = class {
|
|
|
4551
4551
|
render() {
|
|
4552
4552
|
this.notifyPlugins("beforeRender", {
|
|
4553
4553
|
cancelable: !0
|
|
4554
|
-
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(),
|
|
4554
|
+
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(), ks({
|
|
4555
4555
|
chart: this
|
|
4556
4556
|
})));
|
|
4557
4557
|
}
|
|
@@ -4599,14 +4599,14 @@ let oe = class {
|
|
|
4599
4599
|
meta: t,
|
|
4600
4600
|
index: t.index,
|
|
4601
4601
|
cancelable: !0
|
|
4602
|
-
}, n =
|
|
4602
|
+
}, n = En(this, t);
|
|
4603
4603
|
this.notifyPlugins("beforeDatasetDraw", i) !== !1 && (n && Ws(s, n), t.controller.draw(), n && Vs(s), i.cancelable = !1, this.notifyPlugins("afterDatasetDraw", i));
|
|
4604
4604
|
}
|
|
4605
4605
|
isPointInArea(t) {
|
|
4606
4606
|
return Hs(t, this.chartArea, this._minPadding);
|
|
4607
4607
|
}
|
|
4608
4608
|
getElementsAtEventForMode(t, s, i, n) {
|
|
4609
|
-
const o =
|
|
4609
|
+
const o = Jn.modes[s];
|
|
4610
4610
|
return typeof o == "function" ? o(this, t, i, n) : [];
|
|
4611
4611
|
}
|
|
4612
4612
|
getDatasetMeta(t) {
|
|
@@ -4677,7 +4677,7 @@ let oe = class {
|
|
|
4677
4677
|
destroy() {
|
|
4678
4678
|
this.notifyPlugins("beforeDestroy");
|
|
4679
4679
|
const { canvas: t, ctx: s } = this;
|
|
4680
|
-
this._stop(), this.config.clearCache(), t && (this.unbindEvents(),
|
|
4680
|
+
this._stop(), this.config.clearCache(), t && (this.unbindEvents(), Ze(t, s), this.platform.releaseContext(s), this.canvas = null, this.ctx = null), delete qt[this.id], this.notifyPlugins("afterDestroy");
|
|
4681
4681
|
}
|
|
4682
4682
|
toBase64Image(...t) {
|
|
4683
4683
|
return this.canvas.toDataURL(...t);
|
|
@@ -4740,7 +4740,7 @@ let oe = class {
|
|
|
4740
4740
|
index: r
|
|
4741
4741
|
};
|
|
4742
4742
|
});
|
|
4743
|
-
!
|
|
4743
|
+
!je(i, s) && (this._active = i, this._lastEvent = null, this._updateHoverStyles(i, s));
|
|
4744
4744
|
}
|
|
4745
4745
|
notifyPlugins(t, s, i) {
|
|
4746
4746
|
return this._plugins.notify(this, t, s, i);
|
|
@@ -4765,7 +4765,7 @@ let oe = class {
|
|
|
4765
4765
|
return i.cancelable = !1, this.notifyPlugins("afterEvent", i, n), (o || i.changed) && this.render(), this;
|
|
4766
4766
|
}
|
|
4767
4767
|
_handleEvent(t, s, i) {
|
|
4768
|
-
const { _active: n = [], options: o } = this, r = s, a = this._getActiveElements(t, n, i, r), c =
|
|
4768
|
+
const { _active: n = [], options: o } = this, r = s, a = this._getActiveElements(t, n, i, r), c = zi(t), l = ir(t, this._lastEvent, i, c);
|
|
4769
4769
|
i && (this._lastEvent = null, E(o.onHover, [
|
|
4770
4770
|
t,
|
|
4771
4771
|
a,
|
|
@@ -4775,7 +4775,7 @@ let oe = class {
|
|
|
4775
4775
|
a,
|
|
4776
4776
|
this
|
|
4777
4777
|
], this));
|
|
4778
|
-
const h = !
|
|
4778
|
+
const h = !je(a, n);
|
|
4779
4779
|
return (h || s) && (this._active = a, this._updateHoverStyles(a, n, s)), this._lastEvent = l, h;
|
|
4780
4780
|
}
|
|
4781
4781
|
_getActiveElements(t, s, i, n) {
|
|
@@ -4787,10 +4787,10 @@ let oe = class {
|
|
|
4787
4787
|
return this.getElementsAtEventForMode(t, o.mode, o, n);
|
|
4788
4788
|
}
|
|
4789
4789
|
};
|
|
4790
|
-
function
|
|
4790
|
+
function Os() {
|
|
4791
4791
|
return j(oe.instances, (e) => e._plugins.invalidate());
|
|
4792
4792
|
}
|
|
4793
|
-
function
|
|
4793
|
+
function nr(e, t, s) {
|
|
4794
4794
|
const { startAngle: i, x: n, y: o, outerRadius: r, innerRadius: a, options: c } = t, { borderWidth: l, borderJoinStyle: h } = c, d = Math.min(l / r, q(i - s));
|
|
4795
4795
|
if (e.beginPath(), e.arc(n, o, r - l / 2, i + d / 2, s - d / 2), a > 0) {
|
|
4796
4796
|
const f = Math.min(l / a, q(i - s));
|
|
@@ -4806,12 +4806,12 @@ function or(e, t, s) {
|
|
|
4806
4806
|
}
|
|
4807
4807
|
e.closePath(), e.moveTo(0, 0), e.rect(0, 0, e.canvas.width, e.canvas.height), e.clip("evenodd");
|
|
4808
4808
|
}
|
|
4809
|
-
function
|
|
4809
|
+
function or(e, t, s) {
|
|
4810
4810
|
const { startAngle: i, pixelMargin: n, x: o, y: r, outerRadius: a, innerRadius: c } = t;
|
|
4811
4811
|
let l = n / a;
|
|
4812
4812
|
e.beginPath(), e.arc(o, r, a, i - l, s + l), c > n ? (l = n / c, e.arc(o, r, c, s + l, i - l, !0)) : e.arc(o, r, n, s + $, i - $), e.closePath(), e.clip();
|
|
4813
4813
|
}
|
|
4814
|
-
function
|
|
4814
|
+
function rr(e) {
|
|
4815
4815
|
return Ns(e, [
|
|
4816
4816
|
"outerStart",
|
|
4817
4817
|
"outerEnd",
|
|
@@ -4819,8 +4819,8 @@ function ar(e) {
|
|
|
4819
4819
|
"innerEnd"
|
|
4820
4820
|
]);
|
|
4821
4821
|
}
|
|
4822
|
-
function
|
|
4823
|
-
const n =
|
|
4822
|
+
function ar(e, t, s, i) {
|
|
4823
|
+
const n = rr(e.options.borderRadius), o = (s - t) / 2, r = Math.min(o, i * t / 2), a = (c) => {
|
|
4824
4824
|
const l = (s - Math.min(o, c)) * i / 2;
|
|
4825
4825
|
return J(c, 0, Math.min(o, l));
|
|
4826
4826
|
};
|
|
@@ -4845,7 +4845,7 @@ function se(e, t, s, i, n, o) {
|
|
|
4845
4845
|
const M = h > 0 ? h - i : 0, S = d > 0 ? d - i : 0, C = (M + S) / 2, X = C !== 0 ? g * C / (C + i) : g;
|
|
4846
4846
|
u = (g - X) / 2;
|
|
4847
4847
|
}
|
|
4848
|
-
const m = Math.max(1e-3, g * d - s / z) / d, b = (g - m) / 2, p = c + b + u, _ = n - b - u, { outerStart: x, outerEnd: v, innerStart: y, innerEnd: O } =
|
|
4848
|
+
const m = Math.max(1e-3, g * d - s / z) / d, b = (g - m) / 2, p = c + b + u, _ = n - b - u, { outerStart: x, outerEnd: v, innerStart: y, innerEnd: O } = ar(t, f, d, _ - p), D = d - x, L = d - v, I = p + x / D, k = _ - v / L, H = f + y, P = f + O, V = p + y / H, Y = _ - O / P;
|
|
4849
4849
|
if (e.beginPath(), o) {
|
|
4850
4850
|
const M = (I + k) / 2;
|
|
4851
4851
|
if (e.arc(r, a, d, I, M), e.arc(r, a, d, M, k), v > 0) {
|
|
@@ -4876,7 +4876,7 @@ function se(e, t, s, i, n, o) {
|
|
|
4876
4876
|
}
|
|
4877
4877
|
e.closePath();
|
|
4878
4878
|
}
|
|
4879
|
-
function
|
|
4879
|
+
function cr(e, t, s, i, n) {
|
|
4880
4880
|
const { fullCircles: o, startAngle: r, circumference: a } = t;
|
|
4881
4881
|
let c = t.endAngle;
|
|
4882
4882
|
if (o) {
|
|
@@ -4887,7 +4887,7 @@ function lr(e, t, s, i, n) {
|
|
|
4887
4887
|
}
|
|
4888
4888
|
return se(e, t, s, i, c, n), e.fill(), c;
|
|
4889
4889
|
}
|
|
4890
|
-
function
|
|
4890
|
+
function lr(e, t, s, i, n) {
|
|
4891
4891
|
const { fullCircles: o, startAngle: r, circumference: a, options: c } = t, { borderWidth: l, borderJoinStyle: h, borderDash: d, borderDashOffset: f, borderRadius: u } = c, g = c.borderAlign === "inner";
|
|
4892
4892
|
if (!l)
|
|
4893
4893
|
return;
|
|
@@ -4899,9 +4899,9 @@ function hr(e, t, s, i, n) {
|
|
|
4899
4899
|
e.stroke();
|
|
4900
4900
|
isNaN(a) || (m = r + (a % T || T));
|
|
4901
4901
|
}
|
|
4902
|
-
g &&
|
|
4902
|
+
g && or(e, t, m), c.selfJoin && m - r >= z && u === 0 && h !== "miter" && nr(e, t, m), o || (se(e, t, s, i, m, n), e.stroke());
|
|
4903
4903
|
}
|
|
4904
|
-
class
|
|
4904
|
+
class hr extends Ee {
|
|
4905
4905
|
static id = "arc";
|
|
4906
4906
|
static defaults = {
|
|
4907
4907
|
borderAlign: "center",
|
|
@@ -4947,7 +4947,7 @@ class dr extends Pe {
|
|
|
4947
4947
|
"innerRadius",
|
|
4948
4948
|
"outerRadius",
|
|
4949
4949
|
"circumference"
|
|
4950
|
-
], i), f = (this.options.spacing + this.options.borderWidth) / 2, u = A(d, c - a), g = Jt(o, a, c) && a !== c, m = u >= T || g, b =
|
|
4950
|
+
], i), f = (this.options.spacing + this.options.borderWidth) / 2, u = A(d, c - a), g = Jt(o, a, c) && a !== c, m = u >= T || g, b = Wi(r, l + f, h + f);
|
|
4951
4951
|
return m && b;
|
|
4952
4952
|
}
|
|
4953
4953
|
getCenterPoint(t) {
|
|
@@ -4975,22 +4975,21 @@ class dr extends Pe {
|
|
|
4975
4975
|
const a = (this.startAngle + this.endAngle) / 2;
|
|
4976
4976
|
t.translate(Math.cos(a) * n, Math.sin(a) * n);
|
|
4977
4977
|
const c = 1 - Math.sin(Math.min(z, i || 0)), l = n * c;
|
|
4978
|
-
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor,
|
|
4978
|
+
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor, cr(t, this, l, o, r), lr(t, this, l, o, r), t.restore();
|
|
4979
4979
|
}
|
|
4980
4980
|
}
|
|
4981
4981
|
const oi = "label";
|
|
4982
|
-
function
|
|
4982
|
+
function Ds(e, t) {
|
|
4983
4983
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
4984
4984
|
}
|
|
4985
|
-
function
|
|
4985
|
+
function dr(e, t) {
|
|
4986
4986
|
const s = e.options;
|
|
4987
4987
|
s && t && Object.assign(s, t);
|
|
4988
4988
|
}
|
|
4989
4989
|
function ri(e, t) {
|
|
4990
4990
|
e.labels = t;
|
|
4991
4991
|
}
|
|
4992
|
-
function ai(e, t) {
|
|
4993
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : oi;
|
|
4992
|
+
function ai(e, t, s = oi) {
|
|
4994
4993
|
const i = [];
|
|
4995
4994
|
e.datasets = t.map((n) => {
|
|
4996
4995
|
const o = e.datasets.find((r) => r[s] === n[s]);
|
|
@@ -4999,29 +4998,28 @@ function ai(e, t) {
|
|
|
4999
4998
|
} : (i.push(o), Object.assign(o, n), o);
|
|
5000
4999
|
});
|
|
5001
5000
|
}
|
|
5002
|
-
function
|
|
5003
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : oi;
|
|
5001
|
+
function fr(e, t = oi) {
|
|
5004
5002
|
const s = {
|
|
5005
5003
|
labels: [],
|
|
5006
5004
|
datasets: []
|
|
5007
5005
|
};
|
|
5008
5006
|
return ri(s, e.labels), ai(s, e.datasets, t), s;
|
|
5009
5007
|
}
|
|
5010
|
-
function
|
|
5011
|
-
const { height: s = 150, width: i = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: c, plugins: l = [], fallbackContent: h, updateMode: d, ...f } = e, u =
|
|
5008
|
+
function ur(e, t) {
|
|
5009
|
+
const { height: s = 150, width: i = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: c, plugins: l = [], fallbackContent: h, updateMode: d, ...f } = e, u = Ie(null), g = Ie(null), m = () => {
|
|
5012
5010
|
u.current && (g.current = new oe(u.current, {
|
|
5013
5011
|
type: r,
|
|
5014
|
-
data:
|
|
5012
|
+
data: fr(a, o),
|
|
5015
5013
|
options: c && {
|
|
5016
5014
|
...c
|
|
5017
5015
|
},
|
|
5018
5016
|
plugins: l
|
|
5019
|
-
}),
|
|
5017
|
+
}), Ds(t, g.current));
|
|
5020
5018
|
}, b = () => {
|
|
5021
|
-
|
|
5019
|
+
Ds(t, null), g.current && (g.current.destroy(), g.current = null);
|
|
5022
5020
|
};
|
|
5023
5021
|
return dt(() => {
|
|
5024
|
-
!n && g.current && c &&
|
|
5022
|
+
!n && g.current && c && dr(g.current, c);
|
|
5025
5023
|
}, [
|
|
5026
5024
|
n,
|
|
5027
5025
|
c
|
|
@@ -5047,25 +5045,26 @@ function gr(e, t) {
|
|
|
5047
5045
|
g.current && (b(), setTimeout(m));
|
|
5048
5046
|
}, [
|
|
5049
5047
|
r
|
|
5050
|
-
]), dt(() => (m(), () => b()), []), /* @__PURE__ */
|
|
5048
|
+
]), dt(() => (m(), () => b()), []), /* @__PURE__ */ ve("canvas", {
|
|
5051
5049
|
ref: u,
|
|
5052
5050
|
role: "img",
|
|
5053
5051
|
height: s,
|
|
5054
5052
|
width: i,
|
|
5055
|
-
...f
|
|
5056
|
-
|
|
5053
|
+
...f,
|
|
5054
|
+
children: h
|
|
5055
|
+
});
|
|
5057
5056
|
}
|
|
5058
|
-
const
|
|
5059
|
-
function
|
|
5060
|
-
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */
|
|
5057
|
+
const gr = /* @__PURE__ */ Cs(ur);
|
|
5058
|
+
function pr(e, t) {
|
|
5059
|
+
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */ ve(gr, {
|
|
5061
5060
|
...s,
|
|
5062
5061
|
ref: i,
|
|
5063
5062
|
type: e
|
|
5064
5063
|
}));
|
|
5065
5064
|
}
|
|
5066
|
-
const
|
|
5067
|
-
oe.register(
|
|
5068
|
-
const
|
|
5065
|
+
const mr = /* @__PURE__ */ pr("doughnut", Un);
|
|
5066
|
+
oe.register(hr);
|
|
5067
|
+
const yr = ({
|
|
5069
5068
|
values: e,
|
|
5070
5069
|
colors: t = ["#525252", "#00D492"],
|
|
5071
5070
|
borderColors: s = ["#FFFFFF", "#FFFFFF"],
|
|
@@ -5133,8 +5132,8 @@ const vr = ({
|
|
|
5133
5132
|
a,
|
|
5134
5133
|
d
|
|
5135
5134
|
]);
|
|
5136
|
-
return /* @__PURE__ */
|
|
5135
|
+
return /* @__PURE__ */ ve(mr, { data: g, options: m, plugins: b, redraw: u });
|
|
5137
5136
|
};
|
|
5138
5137
|
export {
|
|
5139
|
-
|
|
5138
|
+
yr as PieChart
|
|
5140
5139
|
};
|