@orbcharts/core 3.0.0-alpha.64 → 3.0.0-alpha.65
Sign up to get free protection for your applications and to get access to all the features.
@@ -49,7 +49,7 @@ const $e = {
|
|
49
49
|
scaleDomain: [0, "max"],
|
50
50
|
scalePadding: 0.5,
|
51
51
|
label: ""
|
52
|
-
},
|
52
|
+
}, je = {
|
53
53
|
gap: 120,
|
54
54
|
rowAmount: 1,
|
55
55
|
columnAmount: 1
|
@@ -59,7 +59,7 @@ const $e = {
|
|
59
59
|
sort: null,
|
60
60
|
seriesLabels: [],
|
61
61
|
container: {
|
62
|
-
...
|
62
|
+
...je
|
63
63
|
},
|
64
64
|
separateSeries: !1,
|
65
65
|
sumSeries: !1
|
@@ -94,7 +94,7 @@ const Kn = {
|
|
94
94
|
...Kn
|
95
95
|
},
|
96
96
|
container: {
|
97
|
-
...
|
97
|
+
...je
|
98
98
|
}
|
99
99
|
};
|
100
100
|
Zn.visibleFilter.toString = () => "(datum, context) => true";
|
@@ -110,7 +110,7 @@ const de = {
|
|
110
110
|
],
|
111
111
|
separateGrid: !1,
|
112
112
|
container: {
|
113
|
-
...
|
113
|
+
...je
|
114
114
|
}
|
115
115
|
};
|
116
116
|
Qn.visibleFilter.toString = () => "(datum, context) => true";
|
@@ -144,17 +144,17 @@ const nr = {
|
|
144
144
|
// },
|
145
145
|
};
|
146
146
|
nr.visibleFilter.toString = () => "(datum, context) => true";
|
147
|
-
function
|
147
|
+
function j(t) {
|
148
148
|
return Object.prototype.toString.call(t) === "[object Object]";
|
149
149
|
}
|
150
150
|
function Ci(t) {
|
151
|
-
return
|
151
|
+
return Object.prototype.toString.call(t) === "[object Function]";
|
152
152
|
}
|
153
153
|
function Mi(t) {
|
154
154
|
return !!(t && t.nodeType);
|
155
155
|
}
|
156
156
|
function pt(t, e) {
|
157
|
-
if (
|
157
|
+
if (j(t) === !1 || j(e) === !1)
|
158
158
|
return Object.assign({}, e);
|
159
159
|
const n = (r, i) => {
|
160
160
|
const o = Object.assign({}, i);
|
@@ -162,7 +162,7 @@ function pt(t, e) {
|
|
162
162
|
if (!(a in i))
|
163
163
|
continue;
|
164
164
|
let s;
|
165
|
-
|
165
|
+
j(r[a]) && j(i[a]) ? (s = n(r[a], i[a]), o[a] = s) : o[a] = r[a];
|
166
166
|
}
|
167
167
|
return o;
|
168
168
|
};
|
@@ -181,9 +181,9 @@ function Ei(t, e) {
|
|
181
181
|
string: (o) => typeof o == "string",
|
182
182
|
number: (o) => typeof o == "number",
|
183
183
|
boolean: (o) => typeof o == "boolean",
|
184
|
-
object: (o) =>
|
184
|
+
object: (o) => j(o),
|
185
185
|
// 嚴格判斷是否為純物件
|
186
|
-
"object[]": (o) => Array.isArray(o) && o.every((a) =>
|
186
|
+
"object[]": (o) => Array.isArray(o) && o.every((a) => j(a)),
|
187
187
|
"string[]": (o) => Array.isArray(o) && o.every((a) => typeof a == "string"),
|
188
188
|
"number[]": (o) => Array.isArray(o) && o.every((a) => typeof a == "number"),
|
189
189
|
Function: (o) => Ci(o),
|
@@ -378,7 +378,7 @@ function Hi(t, e, n) {
|
|
378
378
|
o[r] = t + r * n;
|
379
379
|
return o;
|
380
380
|
}
|
381
|
-
var
|
381
|
+
var ji = { value: () => {
|
382
382
|
} };
|
383
383
|
function or() {
|
384
384
|
for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
|
@@ -390,7 +390,7 @@ function or() {
|
|
390
390
|
function Qt(t) {
|
391
391
|
this._ = t;
|
392
392
|
}
|
393
|
-
function
|
393
|
+
function Xi(t, e) {
|
394
394
|
return t.trim().split(/^|\s+/).map(function(n) {
|
395
395
|
var r = "", i = n.indexOf(".");
|
396
396
|
if (i >= 0 && (r = n.slice(i + 1), n = n.slice(0, i)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
|
@@ -400,7 +400,7 @@ function ji(t, e) {
|
|
400
400
|
Qt.prototype = or.prototype = {
|
401
401
|
constructor: Qt,
|
402
402
|
on: function(t, e) {
|
403
|
-
var n = this._, r =
|
403
|
+
var n = this._, r = Xi(t + "", n), i, o = -1, a = r.length;
|
404
404
|
if (arguments.length < 2) {
|
405
405
|
for (; ++o < a; ) if ((i = (t = r[o]).type) && (i = qi(n[i], t.name))) return i;
|
406
406
|
return;
|
@@ -434,7 +434,7 @@ function qi(t, e) {
|
|
434
434
|
function mn(t, e, n) {
|
435
435
|
for (var r = 0, i = t.length; r < i; ++r)
|
436
436
|
if (t[r].name === e) {
|
437
|
-
t[r] =
|
437
|
+
t[r] = ji, t = t.slice(0, r).concat(t.slice(r + 1));
|
438
438
|
break;
|
439
439
|
}
|
440
440
|
return n != null && t.push({ name: e, value: n }), t;
|
@@ -468,13 +468,13 @@ function ar(t) {
|
|
468
468
|
}
|
469
469
|
function Ji() {
|
470
470
|
}
|
471
|
-
function
|
471
|
+
function Xe(t) {
|
472
472
|
return t == null ? Ji : function() {
|
473
473
|
return this.querySelector(t);
|
474
474
|
};
|
475
475
|
}
|
476
476
|
function Ki(t) {
|
477
|
-
typeof t != "function" && (t =
|
477
|
+
typeof t != "function" && (t = Xe(t));
|
478
478
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
479
479
|
for (var o = e[i], a = o.length, s = r[i] = new Array(a), u, l, f = 0; f < a; ++f)
|
480
480
|
(u = o[f]) && (l = t.call(u, u.__data__, f, o)) && ("__data__" in u && (l.__data__ = u.__data__), s[f] = l);
|
@@ -755,7 +755,7 @@ function Ho(t, e) {
|
|
755
755
|
n == null ? delete this[t] : this[t] = n;
|
756
756
|
};
|
757
757
|
}
|
758
|
-
function
|
758
|
+
function jo(t, e) {
|
759
759
|
return arguments.length > 1 ? this.each((e == null ? Uo : typeof e == "function" ? Ho : zo)(t, e)) : this.node()[t];
|
760
760
|
}
|
761
761
|
function hr(t) {
|
@@ -786,7 +786,7 @@ function dr(t, e) {
|
|
786
786
|
function mr(t, e) {
|
787
787
|
for (var n = qe(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
788
788
|
}
|
789
|
-
function
|
789
|
+
function Xo(t) {
|
790
790
|
return function() {
|
791
791
|
dr(this, t);
|
792
792
|
};
|
@@ -807,7 +807,7 @@ function Wo(t, e) {
|
|
807
807
|
for (var r = qe(this.node()), i = -1, o = n.length; ++i < o; ) if (!r.contains(n[i])) return !1;
|
808
808
|
return !0;
|
809
809
|
}
|
810
|
-
return this.each((typeof e == "function" ? Yo : e ?
|
810
|
+
return this.each((typeof e == "function" ? Yo : e ? Xo : qo)(n, e));
|
811
811
|
}
|
812
812
|
function Jo() {
|
813
813
|
this.textContent = "";
|
@@ -865,7 +865,7 @@ function la() {
|
|
865
865
|
return null;
|
866
866
|
}
|
867
867
|
function ca(t, e) {
|
868
|
-
var n = typeof t == "function" ? t : ar(t), r = e == null ? la : typeof e == "function" ? e :
|
868
|
+
var n = typeof t == "function" ? t : ar(t), r = e == null ? la : typeof e == "function" ? e : Xe(e);
|
869
869
|
return this.select(function() {
|
870
870
|
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
871
871
|
});
|
@@ -995,7 +995,7 @@ z.prototype = Gt.prototype = {
|
|
995
995
|
each: Eo,
|
996
996
|
attr: Io,
|
997
997
|
style: Go,
|
998
|
-
property:
|
998
|
+
property: jo,
|
999
999
|
classed: Wo,
|
1000
1000
|
text: Qo,
|
1001
1001
|
html: ra,
|
@@ -1010,7 +1010,7 @@ z.prototype = Gt.prototype = {
|
|
1010
1010
|
dispatch: Da,
|
1011
1011
|
[Symbol.iterator]: Aa
|
1012
1012
|
};
|
1013
|
-
function
|
1013
|
+
function Xt(t) {
|
1014
1014
|
return typeof t == "string" ? new z([[document.querySelector(t)]], [document.documentElement]) : new z([[t]], yr);
|
1015
1015
|
}
|
1016
1016
|
function Ye(t, e, n) {
|
@@ -1364,18 +1364,18 @@ function Ha(t, e) {
|
|
1364
1364
|
return o;
|
1365
1365
|
};
|
1366
1366
|
}
|
1367
|
-
function
|
1367
|
+
function ja(t, e) {
|
1368
1368
|
var n = /* @__PURE__ */ new Date();
|
1369
1369
|
return t = +t, e = +e, function(r) {
|
1370
1370
|
return n.setTime(t * (1 - r) + e * r), n;
|
1371
1371
|
};
|
1372
1372
|
}
|
1373
|
-
function
|
1373
|
+
function X(t, e) {
|
1374
1374
|
return t = +t, e = +e, function(n) {
|
1375
1375
|
return t * (1 - n) + e * n;
|
1376
1376
|
};
|
1377
1377
|
}
|
1378
|
-
function
|
1378
|
+
function Xa(t, e) {
|
1379
1379
|
var n = {}, r = {}, i;
|
1380
1380
|
(t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
|
1381
1381
|
for (i in e)
|
@@ -1399,7 +1399,7 @@ function Ya(t) {
|
|
1399
1399
|
function xr(t, e) {
|
1400
1400
|
var n = Pe.lastIndex = Ae.lastIndex = 0, r, i, o, a = -1, s = [], u = [];
|
1401
1401
|
for (t = t + "", e = e + ""; (r = Pe.exec(t)) && (i = Ae.exec(e)); )
|
1402
|
-
(o = i.index) > n && (o = e.slice(n, o), s[a] ? s[a] += o : s[++a] = o), (r = r[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, u.push({ i: a, x:
|
1402
|
+
(o = i.index) > n && (o = e.slice(n, o), s[a] ? s[a] += o : s[++a] = o), (r = r[0]) === (i = i[0]) ? s[a] ? s[a] += i : s[++a] = i : (s[++a] = null, u.push({ i: a, x: X(r, i) })), n = Ae.lastIndex;
|
1403
1403
|
return n < e.length && (o = e.slice(n), s[a] ? s[a] += o : s[++a] = o), s.length < 2 ? u[0] ? Ya(u[0].x) : qa(e) : (e = u.length, function(l) {
|
1404
1404
|
for (var f = 0, c; f < e; ++f) s[(c = u[f]).i] = c.x(l);
|
1405
1405
|
return s.join("");
|
@@ -1407,7 +1407,7 @@ function xr(t, e) {
|
|
1407
1407
|
}
|
1408
1408
|
function Je(t, e) {
|
1409
1409
|
var n = typeof e, r;
|
1410
|
-
return e == null || n === "boolean" ? We(e) : (n === "number" ?
|
1410
|
+
return e == null || n === "boolean" ? We(e) : (n === "number" ? X : n === "string" ? (r = mt(e)) ? (e = r, se) : xr : e instanceof mt ? se : e instanceof Date ? ja : za(e) ? Ua : Array.isArray(e) ? Ha : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Xa : X)(t, e);
|
1411
1411
|
}
|
1412
1412
|
function Wa(t, e) {
|
1413
1413
|
return t = +t, e = +e, function(n) {
|
@@ -1448,19 +1448,19 @@ function $r(t, e, n, r) {
|
|
1448
1448
|
function o(l, f, c, h, p, d) {
|
1449
1449
|
if (l !== c || f !== h) {
|
1450
1450
|
var m = p.push("translate(", null, e, null, n);
|
1451
|
-
d.push({ i: m - 4, x:
|
1451
|
+
d.push({ i: m - 4, x: X(l, c) }, { i: m - 2, x: X(f, h) });
|
1452
1452
|
} else (c || h) && p.push("translate(" + c + e + h + n);
|
1453
1453
|
}
|
1454
1454
|
function a(l, f, c, h) {
|
1455
|
-
l !== f ? (l - f > 180 ? f += 360 : f - l > 180 && (l += 360), h.push({ i: c.push(i(c) + "rotate(", null, r) - 2, x:
|
1455
|
+
l !== f ? (l - f > 180 ? f += 360 : f - l > 180 && (l += 360), h.push({ i: c.push(i(c) + "rotate(", null, r) - 2, x: X(l, f) })) : f && c.push(i(c) + "rotate(" + f + r);
|
1456
1456
|
}
|
1457
1457
|
function s(l, f, c, h) {
|
1458
|
-
l !== f ? h.push({ i: c.push(i(c) + "skewX(", null, r) - 2, x:
|
1458
|
+
l !== f ? h.push({ i: c.push(i(c) + "skewX(", null, r) - 2, x: X(l, f) }) : f && c.push(i(c) + "skewX(" + f + r);
|
1459
1459
|
}
|
1460
1460
|
function u(l, f, c, h, p, d) {
|
1461
1461
|
if (l !== c || f !== h) {
|
1462
1462
|
var m = p.push(i(p) + "scale(", null, ",", null, ")");
|
1463
|
-
d.push({ i: m - 4, x:
|
1463
|
+
d.push({ i: m - 4, x: X(l, c) }, { i: m - 2, x: X(f, h) });
|
1464
1464
|
} else (c !== 1 || h !== 1) && p.push(i(p) + "scale(" + c + "," + h + ")");
|
1465
1465
|
}
|
1466
1466
|
return function(l, f) {
|
@@ -1674,7 +1674,7 @@ function Qe(t, e, n) {
|
|
1674
1674
|
}
|
1675
1675
|
function Cr(t, e) {
|
1676
1676
|
var n;
|
1677
|
-
return (typeof e == "number" ?
|
1677
|
+
return (typeof e == "number" ? X : e instanceof mt ? se : (n = mt(e)) ? (e = n, se) : xr)(t, e);
|
1678
1678
|
}
|
1679
1679
|
function hs(t) {
|
1680
1680
|
return function() {
|
@@ -1846,7 +1846,7 @@ function Vs() {
|
|
1846
1846
|
}
|
1847
1847
|
function Gs(t) {
|
1848
1848
|
var e = this._name, n = this._id;
|
1849
|
-
typeof t != "function" && (t =
|
1849
|
+
typeof t != "function" && (t = Xe(t));
|
1850
1850
|
for (var r = this._groups, i = r.length, o = new Array(i), a = 0; a < i; ++a)
|
1851
1851
|
for (var s = r[a], u = s.length, l = o[a] = new Array(u), f, c, h = 0; h < u; ++h)
|
1852
1852
|
(f = s[h]) && (c = t.call(f, f.__data__, h, s)) && ("__data__" in f && (c.__data__ = f.__data__), l[h] = c, ye(l[h], e, n, h, l, Y(f, n)));
|
@@ -1868,7 +1868,7 @@ var zs = Gt.prototype.constructor;
|
|
1868
1868
|
function Hs() {
|
1869
1869
|
return new zs(this._groups, this._parents);
|
1870
1870
|
}
|
1871
|
-
function
|
1871
|
+
function js(t, e) {
|
1872
1872
|
var n, r, i;
|
1873
1873
|
return function() {
|
1874
1874
|
var o = _t(this, t), a = (this.style.removeProperty(t), _t(this, t));
|
@@ -1880,7 +1880,7 @@ function Mr(t) {
|
|
1880
1880
|
this.style.removeProperty(t);
|
1881
1881
|
};
|
1882
1882
|
}
|
1883
|
-
function
|
1883
|
+
function Xs(t, e, n) {
|
1884
1884
|
var r, i = n + "", o;
|
1885
1885
|
return function() {
|
1886
1886
|
var a = _t(this, t);
|
@@ -1903,7 +1903,7 @@ function Ys(t, e) {
|
|
1903
1903
|
}
|
1904
1904
|
function Ws(t, e, n) {
|
1905
1905
|
var r = (t += "") == "transform" ? Za : Cr;
|
1906
|
-
return e == null ? this.styleTween(t,
|
1906
|
+
return e == null ? this.styleTween(t, js(t, r)).on("end.style." + t, Mr(t)) : typeof e == "function" ? this.styleTween(t, qs(t, r, Qe(this, "style." + t, e))).each(Ys(this._id, t)) : this.styleTween(t, Xs(t, r, e), n).on("end.style." + t, null);
|
1907
1907
|
}
|
1908
1908
|
function Js(t, e, n) {
|
1909
1909
|
return function(r) {
|
@@ -2175,7 +2175,7 @@ function vu(t) {
|
|
2175
2175
|
}
|
2176
2176
|
}
|
2177
2177
|
_ && !w && (g = e(g, 1 / 0));
|
2178
|
-
var
|
2178
|
+
var jt = T.length + g.length + E.length, et = jt < x ? new Array(x - jt + 1).join(h) : "";
|
2179
2179
|
switch (_ && w && (g = e(et + g, et.length ? x - E.length : 1 / 0), et = ""), p) {
|
2180
2180
|
case "<":
|
2181
2181
|
g = T + g + E + et;
|
@@ -2184,7 +2184,7 @@ function vu(t) {
|
|
2184
2184
|
g = T + et + g + E;
|
2185
2185
|
break;
|
2186
2186
|
case "^":
|
2187
|
-
g = et.slice(0,
|
2187
|
+
g = et.slice(0, jt = et.length >> 1) + T + g + E + et.slice(jt);
|
2188
2188
|
break;
|
2189
2189
|
default:
|
2190
2190
|
g = et + T + g + E;
|
@@ -2358,7 +2358,7 @@ function Eu() {
|
|
2358
2358
|
return h == null || isNaN(h = +h) ? o : (u || (u = s(t.map(r), e, n)))(r(a(h)));
|
2359
2359
|
}
|
2360
2360
|
return c.invert = function(h) {
|
2361
|
-
return a(i((l || (l = s(e, t.map(r),
|
2361
|
+
return a(i((l || (l = s(e, t.map(r), X)))(h)));
|
2362
2362
|
}, c.domain = function(h) {
|
2363
2363
|
return arguments.length ? (t = Array.from(h, Au), f()) : t.slice();
|
2364
2364
|
}, c.range = function(h) {
|
@@ -2542,19 +2542,19 @@ function Re(t) {
|
|
2542
2542
|
return zt(e);
|
2543
2543
|
}
|
2544
2544
|
function Vc(t) {
|
2545
|
-
const n = (t[0] && Array.isArray(t[0]) ? t.flat() : t).filter((r) => (r == null ||
|
2545
|
+
const n = (t[0] && Array.isArray(t[0]) ? t.flat() : t).filter((r) => (r == null || j(r) && r.value == null) === !1).map((r) => typeof r == "number" ? r : r.value);
|
2546
2546
|
return zt(n);
|
2547
2547
|
}
|
2548
2548
|
function In(t) {
|
2549
|
-
const n = t.flat().filter((r) => (r == null ||
|
2549
|
+
const n = t.flat().filter((r) => (r == null || j(r) && r.value == null) === !1).map((r) => typeof r == "number" ? r : r.value);
|
2550
2550
|
return zt(n);
|
2551
2551
|
}
|
2552
2552
|
function Gc(t) {
|
2553
|
-
const n = t.flat().flat().filter((r) => (r == null ||
|
2553
|
+
const n = t.flat().flat().filter((r) => (r == null || j(r) && r.value == null) === !1).map((r) => typeof r == "number" ? r : r.value);
|
2554
2554
|
return zt(n);
|
2555
2555
|
}
|
2556
2556
|
function Uc(t, e = 2) {
|
2557
|
-
const r = t.flat().filter((i, o) => o == e).filter((i) => (i == null ||
|
2557
|
+
const r = t.flat().filter((i, o) => o == e).filter((i) => (i == null || j(i) && i.value == null) === !1).map((i) => typeof i == "number" ? i : i.value);
|
2558
2558
|
return zt(r);
|
2559
2559
|
}
|
2560
2560
|
function ku(t, e) {
|
@@ -2972,26 +2972,26 @@ function Hr(t) {
|
|
2972
2972
|
function Rn(t) {
|
2973
2973
|
k(t) ? t() : t.unsubscribe();
|
2974
2974
|
}
|
2975
|
-
var
|
2975
|
+
var jr = {
|
2976
2976
|
onUnhandledError: null,
|
2977
2977
|
onStoppedNotification: null,
|
2978
2978
|
Promise: void 0,
|
2979
2979
|
useDeprecatedSynchronousErrorHandling: !1,
|
2980
2980
|
useDeprecatedNextContext: !1
|
2981
|
-
},
|
2981
|
+
}, Xr = {
|
2982
2982
|
setTimeout: function(t, e) {
|
2983
2983
|
for (var n = [], r = 2; r < arguments.length; r++)
|
2984
2984
|
n[r - 2] = arguments[r];
|
2985
2985
|
return setTimeout.apply(void 0, st([t, e], at(n)));
|
2986
2986
|
},
|
2987
2987
|
clearTimeout: function(t) {
|
2988
|
-
var e =
|
2988
|
+
var e = Xr.delegate;
|
2989
2989
|
return ((e == null ? void 0 : e.clearTimeout) || clearTimeout)(t);
|
2990
2990
|
},
|
2991
2991
|
delegate: void 0
|
2992
2992
|
};
|
2993
2993
|
function qr(t) {
|
2994
|
-
|
2994
|
+
Xr.setTimeout(function() {
|
2995
2995
|
throw t;
|
2996
2996
|
});
|
2997
2997
|
}
|
@@ -3004,7 +3004,7 @@ var on = function(t) {
|
|
3004
3004
|
Q(e, t);
|
3005
3005
|
function e(n) {
|
3006
3006
|
var r = t.call(this) || this;
|
3007
|
-
return r.isStopped = !1, n ? (r.destination = n, Hr(n) && n.add(r)) : r.destination =
|
3007
|
+
return r.isStopped = !1, n ? (r.destination = n, Hr(n) && n.add(r)) : r.destination = ju, r;
|
3008
3008
|
}
|
3009
3009
|
return e.create = function(n, r, i) {
|
3010
3010
|
return new Vt(n, r, i);
|
@@ -3078,7 +3078,7 @@ var zu = function() {
|
|
3078
3078
|
};
|
3079
3079
|
else {
|
3080
3080
|
var s;
|
3081
|
-
o &&
|
3081
|
+
o && jr.useDeprecatedNextContext ? (s = Object.create(n), s.unsubscribe = function() {
|
3082
3082
|
return o.unsubscribe();
|
3083
3083
|
}, a = {
|
3084
3084
|
next: n.next && Te(n.next, s),
|
@@ -3096,7 +3096,7 @@ function Kt(t) {
|
|
3096
3096
|
function Hu(t) {
|
3097
3097
|
throw t;
|
3098
3098
|
}
|
3099
|
-
var
|
3099
|
+
var ju = {
|
3100
3100
|
closed: !0,
|
3101
3101
|
next: Ue,
|
3102
3102
|
error: Hu,
|
@@ -3107,7 +3107,7 @@ var Xu = {
|
|
3107
3107
|
function Tt(t) {
|
3108
3108
|
return t;
|
3109
3109
|
}
|
3110
|
-
function
|
3110
|
+
function Xu(t) {
|
3111
3111
|
return t.length === 0 ? Tt : t.length === 1 ? t[0] : function(n) {
|
3112
3112
|
return t.reduce(function(r, i) {
|
3113
3113
|
return i(r);
|
@@ -3157,7 +3157,7 @@ var L = function() {
|
|
3157
3157
|
}, t.prototype.pipe = function() {
|
3158
3158
|
for (var e = [], n = 0; n < arguments.length; n++)
|
3159
3159
|
e[n] = arguments[n];
|
3160
|
-
return
|
3160
|
+
return Xu(e)(this);
|
3161
3161
|
}, t.prototype.toPromise = function(e) {
|
3162
3162
|
var n = this;
|
3163
3163
|
return e = Vn(e), new e(function(r, i) {
|
@@ -3176,7 +3176,7 @@ var L = function() {
|
|
3176
3176
|
}();
|
3177
3177
|
function Vn(t) {
|
3178
3178
|
var e;
|
3179
|
-
return (e = t ??
|
3179
|
+
return (e = t ?? jr.Promise) !== null && e !== void 0 ? e : Promise;
|
3180
3180
|
}
|
3181
3181
|
function qu(t) {
|
3182
3182
|
return t && k(t.next) && k(t.error) && k(t.complete);
|
@@ -3907,7 +3907,7 @@ function cn(t) {
|
|
3907
3907
|
function El() {
|
3908
3908
|
return cn(1);
|
3909
3909
|
}
|
3910
|
-
function
|
3910
|
+
function jn() {
|
3911
3911
|
for (var t = [], e = 0; e < arguments.length; e++)
|
3912
3912
|
t[e] = arguments[e];
|
3913
3913
|
return El()(Mt(t, Ct(t)));
|
@@ -3944,7 +3944,7 @@ var Nl = Array.isArray;
|
|
3944
3944
|
function Ol(t) {
|
3945
3945
|
return t.length === 1 && Nl(t[0]) ? t[0] : t;
|
3946
3946
|
}
|
3947
|
-
function
|
3947
|
+
function Xn(t, e) {
|
3948
3948
|
return R(function(n, r) {
|
3949
3949
|
var i = 0;
|
3950
3950
|
n.subscribe(B(r, function(o) {
|
@@ -4117,7 +4117,7 @@ function Me() {
|
|
4117
4117
|
t[e] = arguments[e];
|
4118
4118
|
var n = Ct(t);
|
4119
4119
|
return R(function(r, i) {
|
4120
|
-
(n ?
|
4120
|
+
(n ? jn(t, r, n) : jn(t, r)).subscribe(i);
|
4121
4121
|
});
|
4122
4122
|
}
|
4123
4123
|
function O(t, e) {
|
@@ -4145,7 +4145,7 @@ function C(t) {
|
|
4145
4145
|
}, Ue)), !n.closed && e.subscribe(n);
|
4146
4146
|
});
|
4147
4147
|
}
|
4148
|
-
function
|
4148
|
+
function jl(t, e) {
|
4149
4149
|
return R(function(n, r) {
|
4150
4150
|
var i = e ?? {}, o = i.leading, a = o === void 0 ? !0 : o, s = i.trailing, u = s === void 0 ? !1 : s, l = !1, f = null, c = null, h = !1, p = function() {
|
4151
4151
|
c == null || c.unsubscribe(), c = null, u && (w(), h && r.complete());
|
@@ -4167,10 +4167,10 @@ function Xl(t, e) {
|
|
4167
4167
|
}));
|
4168
4168
|
});
|
4169
4169
|
}
|
4170
|
-
function
|
4170
|
+
function Xl(t, e, n) {
|
4171
4171
|
e === void 0 && (e = un);
|
4172
4172
|
var r = Ll(t, e);
|
4173
|
-
return
|
4173
|
+
return jl(function() {
|
4174
4174
|
return r;
|
4175
4175
|
}, n);
|
4176
4176
|
}
|
@@ -4199,7 +4199,7 @@ const xe = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4199
4199
|
), o = n.pipe(
|
4200
4200
|
C(r),
|
4201
4201
|
// filter(d => d.eventName === 'mouseover' || d.eventName === 'mousemove'),
|
4202
|
-
|
4202
|
+
Xn((c) => c.eventName === "mouseover"),
|
4203
4203
|
// distinctUntilChanged((prev, current) => prev.eventName === current.eventName)
|
4204
4204
|
D((c) => c.datum ? {
|
4205
4205
|
id: c.datum.id,
|
@@ -4216,7 +4216,7 @@ const xe = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
|
|
4216
4216
|
})
|
4217
4217
|
), a = n.pipe(
|
4218
4218
|
C(r),
|
4219
|
-
|
4219
|
+
Xn((c) => c.eventName === "mouseout"),
|
4220
4220
|
// distinctUntilChanged((prev, current) => prev.eventName === current.eventName)
|
4221
4221
|
// map(d => {
|
4222
4222
|
// return { id: '', label: '' }
|
@@ -5037,8 +5037,8 @@ const cc = ({
|
|
5037
5037
|
} catch (y) {
|
5038
5038
|
throw new Error(y);
|
5039
5039
|
}
|
5040
|
-
|
5041
|
-
const f =
|
5040
|
+
Xt(u).selectAll("svg").remove();
|
5041
|
+
const f = Xt(u).append("svg");
|
5042
5042
|
f.attr("xmlns:xlink", "http://www.w3.org/1999/xlink").attr("xmls", "http://www.w3.org/2000/svg").attr("version", "1.1").style("position", "absolute").classed("orbcharts__root", !0);
|
5043
5043
|
const c = f.append("g");
|
5044
5044
|
c.classed("orbcharts__layout", !0);
|
@@ -5141,7 +5141,7 @@ const cc = ({
|
|
5141
5141
|
kl(250)
|
5142
5142
|
),
|
5143
5143
|
$.pipe(
|
5144
|
-
|
5144
|
+
Xl(250)
|
5145
5145
|
)
|
5146
5146
|
),
|
5147
5147
|
K((y, v) => JSON.stringify(y) === JSON.stringify(v)),
|
@@ -5231,7 +5231,7 @@ const cc = ({
|
|
5231
5231
|
observer: V,
|
5232
5232
|
subject: p
|
5233
5233
|
}), W = {
|
5234
|
-
selection:
|
5234
|
+
selection: Xt(E[T]),
|
5235
5235
|
rootSelection: f,
|
5236
5236
|
name: g.name,
|
5237
5237
|
chartType: a,
|
@@ -5249,7 +5249,7 @@ const cc = ({
|
|
5249
5249
|
...p,
|
5250
5250
|
selection: f,
|
5251
5251
|
destroy() {
|
5252
|
-
|
5252
|
+
Xt(u).selectAll("svg").remove(), o.next(void 0), S.unsubscribe();
|
5253
5253
|
}
|
5254
5254
|
};
|
5255
5255
|
};
|
@@ -5265,7 +5265,7 @@ class Et {
|
|
5265
5265
|
}
|
5266
5266
|
}
|
5267
5267
|
}
|
5268
|
-
class
|
5268
|
+
class jc extends Et {
|
5269
5269
|
constructor(e, n) {
|
5270
5270
|
super(
|
5271
5271
|
{
|
@@ -5551,7 +5551,7 @@ const hc = (t) => {
|
|
5551
5551
|
computedStackedData$: _
|
5552
5552
|
};
|
5553
5553
|
};
|
5554
|
-
class
|
5554
|
+
class Xc extends Et {
|
5555
5555
|
constructor(e, n) {
|
5556
5556
|
super(
|
5557
5557
|
{
|
@@ -6024,7 +6024,7 @@ const Tc = (t) => M(t, {
|
|
6024
6024
|
};
|
6025
6025
|
try {
|
6026
6026
|
const a = function() {
|
6027
|
-
if (
|
6027
|
+
if (j(e) === !0)
|
6028
6028
|
return JSON.parse(JSON.stringify(e));
|
6029
6029
|
if (Array.isArray(e) === !1)
|
6030
6030
|
return {
|
@@ -6088,7 +6088,7 @@ const Tc = (t) => M(t, {
|
|
6088
6088
|
data: {
|
6089
6089
|
toBe: "DataTreeObj | DataTreeDatum[]",
|
6090
6090
|
// 畢免資料量過大檢查不完,不深度檢查
|
6091
|
-
test: (n) =>
|
6091
|
+
test: (n) => j(n) && n.id !== void 0
|
6092
6092
|
}
|
6093
6093
|
}), Ec = ({ subject: t, observer: e }) => {
|
6094
6094
|
const n = _e(e.fullChartParams$).pipe(
|
@@ -6216,7 +6216,7 @@ export {
|
|
6216
6216
|
$e as CHART_OPTIONS_DEFAULT,
|
6217
6217
|
hn as CHART_PARAMS_DEFAULT,
|
6218
6218
|
Ai as CHART_WIDTH_DEFAULT,
|
6219
|
-
|
6219
|
+
je as DATA_FORMATTER_CONTAINER_DEFAULT,
|
6220
6220
|
Zn as DATA_FORMATTER_GRID_DEFAULT,
|
6221
6221
|
Kn as DATA_FORMATTER_GRID_GRID_DEFAULT,
|
6222
6222
|
Ti as DATA_FORMATTER_GROUP_AXIS_DEFAULT,
|
@@ -6233,12 +6233,12 @@ export {
|
|
6233
6233
|
Ic as DATA_RELATIONA_DEFAULTL,
|
6234
6234
|
Lc as DATA_SERIES_DEFAULT,
|
6235
6235
|
kc as DATA_TREE_DEFAULT,
|
6236
|
-
|
6236
|
+
Xc as GridChart,
|
6237
6237
|
qc as MultiGridChart,
|
6238
6238
|
Yc as MultiValueChart,
|
6239
6239
|
Wn as PADDING_DEFAULT,
|
6240
6240
|
Wc as RelationshipChart,
|
6241
|
-
|
6241
|
+
jc as SeriesChart,
|
6242
6242
|
Jc as TreeChart,
|
6243
6243
|
Ve as calcGridContainerLayout,
|
6244
6244
|
Bn as calcSeriesContainerLayout,
|
@@ -6284,7 +6284,7 @@ export {
|
|
6284
6284
|
xe as highlightObservable,
|
6285
6285
|
Mi as isDom,
|
6286
6286
|
Ci as isFunction,
|
6287
|
-
|
6287
|
+
j as isPlainObject,
|
6288
6288
|
pt as mergeOptionsWithDefault,
|
6289
6289
|
$i as multiGridContainerObservable,
|
6290
6290
|
nc as multiGridEachDetailObservable,
|
@@ -1,7 +1,7 @@
|
|
1
|
-
(function(m,at){typeof exports=="object"&&typeof module<"u"?at(exports):typeof define=="function"&&define.amd?define(["exports"],at):(m=typeof globalThis<"u"?globalThis:m||self,at(m["orbcharts-core"]={}))})(this,function(m){"use strict";const at={width:"auto",height:"auto"},Me={top:60,right:60,bottom:60,left:60},Fe={padding:Me,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{series:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#1b1e23",secondary:"#e1e1e1",white:"#ffffff",background:"#ffffff"},dark:{series:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#f0f0f0",secondary:"#e1e1e1",white:"#ffffff",background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Bn=800,Gn=500,qi=[],Yi=[],Wi=[],Ji=[],Ki=[],Zi={nodes:[],edges:[]},J={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Vn={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Zt={gap:120,rowAmount:1,columnAmount:1},Le={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Zt},separateSeries:!1,sumSeries:!1};Le.visibleFilter.toString=()=>"(datum, context) => true";const Oe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...J},groupAxis:{...Vn},separateSeries:!1},Pe={type:"grid",visibleFilter:(t,e)=>!0,grid:{...Oe},container:{...Zt}};Pe.visibleFilter.toString=()=>"(datum, context) => true";const Pt={...Oe},Re={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Pt}],separateGrid:!1,container:{...Zt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],multiValue:[],xAxis:{...J},yAxis:{...J}};Ne.visibleFilter.toString=()=>"(datum, context) => true";const Ie={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};ke.visibleFilter.toString=()=>"(datum, context) => true";function H(t){return Object.prototype.toString.call(t)==="[object Object]"}function Un(t){return!!t&&!t.nodename&&t.constructor!=String&&t.constructor!=RegExp&&t.constructor!=Array&&/function/i.test(t+"")}function zn(t){return!!(t&&t.nodeType)}function st(t,e){if(H(t)===!1||H(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;H(r[a])&&H(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}function Qi(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function to(t,e){const n={string:o=>typeof o=="string",number:o=>typeof o=="number",boolean:o=>typeof o=="boolean",object:o=>H(o),"object[]":o=>Array.isArray(o)&&o.every(a=>H(a)),"string[]":o=>Array.isArray(o)&&o.every(a=>typeof a=="string"),"number[]":o=>Array.isArray(o)&&o.every(a=>typeof a=="number"),Function:o=>Un(o),null:o=>o===null,undefined:o=>o===void 0},r={ColorType:o=>o==="none"||o==="series"||o==="primary"||o==="secondary"||o==="white"||o==="background"};return Object.keys(t).find(o=>{if(e[o]){const a=e[o],s=t[o];if(a.toBeTypes){if(a.toBeTypes.some(f=>n[f](s))===!1)return!0}else if(a.toBe){const{toBe:u,test:l}=a;if(l(s)===!1)return!0}else if(a.toBeOption){const u=a.toBeOption;if(r[u](s)===!1)return!0}}return!1})}function M(t,e){const n=to(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const eo=t=>{const e=M(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=M(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function Qt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function no(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hn(t){let e,n,r;t.length!==2?(e=Qt,n=(s,u)=>Qt(t(s),u),r=(s,u)=>t(s)-u):(e=t===Qt||t===no?t:ro,n=t,r=t);function i(s,u,l=0,f=s.length){if(l<f){if(e(u,u)!==0)return f;do{const c=l+f>>>1;n(s[c],u)<0?l=c+1:f=c}while(l<f)}return l}function o(s,u,l=0,f=s.length){if(l<f){if(e(u,u)!==0)return f;do{const c=l+f>>>1;n(s[c],u)<=0?l=c+1:f=c}while(l<f)}return l}function a(s,u,l=0,f=s.length){const c=i(s,u,l,f-1);return c>l&&r(s[c-1],u)>-r(s[c],u)?c-1:c}return{left:i,center:a,right:o}}function ro(){return 0}function io(t){return t===null?NaN:+t}const Xn=Hn(Qt).right;Hn(io).center;class jn extends Map{constructor(e,n=so){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(qn(this,e))}has(e){return super.has(qn(this,e))}set(e,n){return super.set(oo(this,e),n)}delete(e){return super.delete(ao(this,e))}}function qn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function oo({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function ao({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function so(t){return t!==null&&typeof t=="object"?t.valueOf():t}const uo=Math.sqrt(50),lo=Math.sqrt(10),co=Math.sqrt(2);function te(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=uo?10:o>=lo?5:o>=co?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?te(t,e,n*2):[s,u,l]}function fo(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?te(e,t,n):te(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function Be(t,e,n){return e=+e,t=+t,n=+n,te(t,e,n)[2]}function ho(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Be(e,t,n):Be(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function po(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var mo={value:()=>{}};function Yn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ee(n)}function ee(t){this._=t}function go(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ee.prototype=Yn.prototype={constructor:ee,on:function(t,e){var n=this._,r=go(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=yo(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Wn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Wn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ee(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function yo(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Wn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mo,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ge="http://www.w3.org/1999/xhtml";const Jn={svg:"http://www.w3.org/2000/svg",xhtml:Ge,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Jn.hasOwnProperty(e)?{space:Jn[e],local:t}:t}function vo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ge&&e.documentElement.namespaceURI===Ge?e.createElement(t):e.createElementNS(n,t)}}function bo(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kn(t){var e=ne(t);return(e.local?bo:vo)(e)}function wo(){}function Ve(t){return t==null?wo:function(){return this.querySelector(t)}}function _o(t){typeof t!="function"&&(t=Ve(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,l,f=0;f<a;++f)(u=o[f])&&(l=t.call(u,u.__data__,f,o))&&("__data__"in u&&(l.__data__=u.__data__),s[f]=l);return new X(r,this._parents)}function xo(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ao(){return[]}function Zn(t){return t==null?Ao:function(){return this.querySelectorAll(t)}}function Do(t){return function(){return xo(t.apply(this,arguments))}}function $o(t){typeof t=="function"?t=Do(t):t=Zn(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new X(r,i)}function Qn(t){return function(){return this.matches(t)}}function tr(t){return function(e){return e.matches(t)}}var To=Array.prototype.find;function So(t){return function(){return To.call(this.children,t)}}function Co(){return this.firstElementChild}function Eo(t){return this.select(t==null?Co:So(typeof t=="function"?t:tr(t)))}var Mo=Array.prototype.filter;function Fo(){return Array.from(this.children)}function Lo(t){return function(){return Mo.call(this.children,t)}}function Oo(t){return this.selectAll(t==null?Fo:Lo(typeof t=="function"?t:tr(t)))}function Po(t){typeof t!="function"&&(t=Qn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new X(r,this._parents)}function er(t){return new Array(t.length)}function Ro(){return new X(this._enter||this._groups.map(er),this._parents)}function re(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}re.prototype={constructor:re,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function No(t){return function(){return t}}function Io(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new re(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function ko(t,e,n,r,i,o,a){var s,u,l=new Map,f=e.length,c=o.length,h=new Array(f),d;for(s=0;s<f;++s)(u=e[s])&&(h[s]=d=a.call(u,u.__data__,s,e)+"",l.has(d)?i[s]=u:l.set(d,u));for(s=0;s<c;++s)d=a.call(t,o[s],s,o)+"",(u=l.get(d))?(r[s]=u,u.__data__=o[s],l.delete(d)):n[s]=new re(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function Bo(t){return t.__data__}function Go(t,e){if(!arguments.length)return Array.from(this,Bo);var n=e?ko:Io,r=this._parents,i=this._groups;typeof t!="function"&&(t=No(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var f=r[l],c=i[l],h=c.length,d=Vo(t.call(f,f&&f.__data__,l,r)),p=d.length,g=s[l]=new Array(p),_=a[l]=new Array(p),x=u[l]=new Array(h);n(f,c,g,_,x,d,e);for(var A=0,$=0,T,S;A<p;++A)if(T=g[A]){for(A>=$&&($=A+1);!(S=_[$])&&++$<p;);T._next=S||null}}return a=new X(a,r),a._enter=s,a._exit=u,a}function Vo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Uo(){return new X(this._exit||this._groups.map(er),this._parents)}function zo(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Ho(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],f=r[u],c=l.length,h=s[u]=new Array(c),d,p=0;p<c;++p)(d=l[p]||f[p])&&(h[p]=d);for(;u<i;++u)s[u]=n[u];return new X(s,this._parents)}function Xo(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function jo(t){t||(t=qo);function e(c,h){return c&&h?t(c.__data__,h.__data__):!c-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,f=0;f<s;++f)(l=a[f])&&(u[f]=l);u.sort(e)}return new X(i,this._parents).order()}function qo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Yo(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Wo(){return Array.from(this)}function Jo(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Ko(){let t=0;for(const e of this)++t;return t}function Zo(){return!this.node()}function Qo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function ta(t){return function(){this.removeAttribute(t)}}function ea(t){return function(){this.removeAttributeNS(t.space,t.local)}}function na(t,e){return function(){this.setAttribute(t,e)}}function ra(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ia(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function oa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function aa(t,e){var n=ne(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ea:ta:typeof e=="function"?n.local?oa:ia:n.local?ra:na)(n,e))}function nr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sa(t){return function(){this.style.removeProperty(t)}}function ua(t,e,n){return function(){this.style.setProperty(t,e,n)}}function la(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ca(t,e,n){return arguments.length>1?this.each((e==null?sa:typeof e=="function"?la:ua)(t,e,n??"")):_t(this.node(),t)}function _t(t,e){return t.style.getPropertyValue(e)||nr(t).getComputedStyle(t,null).getPropertyValue(e)}function fa(t){return function(){delete this[t]}}function ha(t,e){return function(){this[t]=e}}function da(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function pa(t,e){return arguments.length>1?this.each((e==null?fa:typeof e=="function"?da:ha)(t,e)):this.node()[t]}function rr(t){return t.trim().split(/^|\s+/)}function Ue(t){return t.classList||new ir(t)}function ir(t){this._node=t,this._names=rr(t.getAttribute("class")||"")}ir.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function or(t,e){for(var n=Ue(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ar(t,e){for(var n=Ue(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ma(t){return function(){or(this,t)}}function ga(t){return function(){ar(this,t)}}function ya(t,e){return function(){(e.apply(this,arguments)?or:ar)(this,t)}}function va(t,e){var n=rr(t+"");if(arguments.length<2){for(var r=Ue(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?ya:e?ma:ga)(n,e))}function ba(){this.textContent=""}function wa(t){return function(){this.textContent=t}}function _a(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function xa(t){return arguments.length?this.each(t==null?ba:(typeof t=="function"?_a:wa)(t)):this.node().textContent}function Aa(){this.innerHTML=""}function Da(t){return function(){this.innerHTML=t}}function $a(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ta(t){return arguments.length?this.each(t==null?Aa:(typeof t=="function"?$a:Da)(t)):this.node().innerHTML}function Sa(){this.nextSibling&&this.parentNode.appendChild(this)}function Ca(){return this.each(Sa)}function Ea(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ma(){return this.each(Ea)}function Fa(t){var e=typeof t=="function"?t:Kn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function La(){return null}function Oa(t,e){var n=typeof t=="function"?t:Kn(t),r=e==null?La:typeof e=="function"?e:Ve(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Pa(){var t=this.parentNode;t&&t.removeChild(this)}function Ra(){return this.each(Pa)}function Na(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ia(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ka(t){return this.select(t?Ia:Na)}function Ba(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ga(t){return function(e){t.call(this,e,this.__data__)}}function Va(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Ua(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function za(t,e,n){return function(){var r=this.__on,i,o=Ga(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Ha(t,e,n){var r=Va(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,f;u<l;++u)for(i=0,f=s[u];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?za:Ua,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function sr(t,e,n){var r=nr(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xa(t,e){return function(){return sr(this,t,e)}}function ja(t,e){return function(){return sr(this,t,e.apply(this,arguments))}}function qa(t,e){return this.each((typeof e=="function"?ja:Xa)(t,e))}function*Ya(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var ur=[null];function X(t,e){this._groups=t,this._parents=e}function Rt(){return new X([[document.documentElement]],ur)}function Wa(){return this}X.prototype=Rt.prototype={constructor:X,select:_o,selectAll:$o,selectChild:Eo,selectChildren:Oo,filter:Po,data:Go,enter:Ro,exit:Uo,join:zo,merge:Ho,selection:Wa,order:Xo,sort:jo,call:Yo,nodes:Wo,node:Jo,size:Ko,empty:Zo,each:Qo,attr:aa,style:ca,property:pa,classed:va,text:xa,html:Ta,raise:Ca,lower:Ma,append:Fa,insert:Oa,remove:Ra,clone:ka,datum:Ba,on:Ha,dispatch:qa,[Symbol.iterator]:Ya};function ie(t){return typeof t=="string"?new X([[document.querySelector(t)]],[document.documentElement]):new X([[t]],ur)}function ze(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function lr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nt(){}var It=.7,oe=1/It,xt="\\s*([+-]?\\d+)\\s*",kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",K="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ja=/^#([0-9a-f]{3,8})$/,Ka=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Za=new RegExp(`^rgb\\(${K},${K},${K}\\)$`),Qa=new RegExp(`^rgba\\(${xt},${xt},${xt},${kt}\\)$`),ts=new RegExp(`^rgba\\(${K},${K},${K},${kt}\\)$`),es=new RegExp(`^hsl\\(${kt},${K},${K}\\)$`),ns=new RegExp(`^hsla\\(${kt},${K},${K},${kt}\\)$`),cr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ze(Nt,ft,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:rs,formatHsl:is,formatRgb:hr,toString:hr});function fr(){return this.rgb().formatHex()}function rs(){return this.rgb().formatHex8()}function is(){return yr(this).formatHsl()}function hr(){return this.rgb().formatRgb()}function ft(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ja.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?dr(e):n===3?new z(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ae(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ae(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ka.exec(t))?new z(e[1],e[2],e[3],1):(e=Za.exec(t))?new z(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qa.exec(t))?ae(e[1],e[2],e[3],e[4]):(e=ts.exec(t))?ae(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=es.exec(t))?gr(e[1],e[2]/100,e[3]/100,1):(e=ns.exec(t))?gr(e[1],e[2]/100,e[3]/100,e[4]):cr.hasOwnProperty(t)?dr(cr[t]):t==="transparent"?new z(NaN,NaN,NaN,0):null}function dr(t){return new z(t>>16&255,t>>8&255,t&255,1)}function ae(t,e,n,r){return r<=0&&(t=e=n=NaN),new z(t,e,n,r)}function os(t){return t instanceof Nt||(t=ft(t)),t?(t=t.rgb(),new z(t.r,t.g,t.b,t.opacity)):new z}function He(t,e,n,r){return arguments.length===1?os(t):new z(t,e,n,r??1)}function z(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ze(z,He,lr(Nt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new z(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?It:Math.pow(It,t),new z(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new z(ht(this.r),ht(this.g),ht(this.b),se(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pr,formatHex:pr,formatHex8:as,formatRgb:mr,toString:mr}));function pr(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}`}function as(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}${dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function mr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${ht(this.r)}, ${ht(this.g)}, ${ht(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ht(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dt(t){return t=ht(t),(t<16?"0":"")+t.toString(16)}function gr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new q(t,e,n,r)}function yr(t){if(t instanceof q)return new q(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=ft(t)),!t)return new q;if(t instanceof q)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new q(a,s,u,t.opacity)}function ss(t,e,n,r){return arguments.length===1?yr(t):new q(t,e,n,r??1)}function q(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ze(q,ss,lr(Nt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new q(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?It:Math.pow(It,t),new q(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new z(Xe(t>=240?t-240:t+120,i,r),Xe(t,i,r),Xe(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new q(vr(this.h),ue(this.s),ue(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${vr(this.h)}, ${ue(this.s)*100}%, ${ue(this.l)*100}%${t===1?")":`, ${t})`}`}}));function vr(t){return t=(t||0)%360,t<0?t+360:t}function ue(t){return Math.max(0,Math.min(1,t||0))}function Xe(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const je=t=>()=>t;function us(t,e){return function(n){return t+n*e}}function ls(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function cs(t){return(t=+t)==1?br:function(e,n){return n-e?ls(e,n,t):je(isNaN(e)?n:e)}}function br(t,e){var n=e-t;return n?us(t,n):je(isNaN(t)?e:t)}const le=function t(e){var n=cs(e);function r(i,o){var a=n((i=He(i)).r,(o=He(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=br(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function fs(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function hs(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ds(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=We(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function ps(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Y(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ms(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=We(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var qe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ye=new RegExp(qe.source,"g");function gs(t){return function(){return t}}function ys(t){return function(e){return t(e)+""}}function wr(t,e){var n=qe.lastIndex=Ye.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=qe.exec(t))&&(i=Ye.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Y(r,i)})),n=Ye.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?ys(u[0].x):gs(e):(e=u.length,function(l){for(var f=0,c;f<e;++f)s[(c=u[f]).i]=c.x(l);return s.join("")})}function We(t,e){var n=typeof e,r;return e==null||n==="boolean"?je(e):(n==="number"?Y:n==="string"?(r=ft(e))?(e=r,le):wr:e instanceof ft?le:e instanceof Date?ps:hs(e)?fs:Array.isArray(e)?ds:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ms:Y)(t,e)}function vs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _r=180/Math.PI,Je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xr(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*_r,skewX:Math.atan(u)*_r,scaleX:a,scaleY:s}}var ce;function bs(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Je:xr(e.a,e.b,e.c,e.d,e.e,e.f)}function ws(t){return t==null||(ce||(ce=document.createElementNS("http://www.w3.org/2000/svg","g")),ce.setAttribute("transform",t),!(t=ce.transform.baseVal.consolidate()))?Je:(t=t.matrix,xr(t.a,t.b,t.c,t.d,t.e,t.f))}function Ar(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,f,c,h,d,p){if(l!==c||f!==h){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:Y(l,c)},{i:g-2,x:Y(f,h)})}else(c||h)&&d.push("translate("+c+e+h+n)}function a(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Y(l,f)})):f&&c.push(i(c)+"rotate("+f+r)}function s(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Y(l,f)}):f&&c.push(i(c)+"skewX("+f+r)}function u(l,f,c,h,d,p){if(l!==c||f!==h){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:Y(l,c)},{i:g-2,x:Y(f,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=t(l),f=t(f),o(l.translateX,l.translateY,f.translateX,f.translateY,c,h),a(l.rotate,f.rotate,c,h),s(l.skewX,f.skewX,c,h),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(d){for(var p=-1,g=h.length,_;++p<g;)c[(_=h[p]).i]=_.x(d);return c.join("")}}}var _s=Ar(bs,"px, ","px)","deg)"),xs=Ar(ws,", ",")",")"),At=0,Bt=0,Gt=0,Dr=1e3,fe,Vt,he=0,pt=0,de=0,Ut=typeof performance=="object"&&performance.now?performance:Date,$r=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ke(){return pt||($r(As),pt=Ut.now()+de)}function As(){pt=0}function pe(){this._call=this._time=this._next=null}pe.prototype=Tr.prototype={constructor:pe,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ke():+n)+(e==null?0:+e),!this._next&&Vt!==this&&(Vt?Vt._next=this:fe=this,Vt=this),this._call=t,this._time=n,Ze()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ze())}};function Tr(t,e,n){var r=new pe;return r.restart(t,e,n),r}function Ds(){Ke(),++At;for(var t=fe,e;t;)(e=pt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--At}function Sr(){pt=(he=Ut.now())+de,At=Bt=0;try{Ds()}finally{At=0,Ts(),pt=0}}function $s(){var t=Ut.now(),e=t-he;e>Dr&&(de-=e,he=t)}function Ts(){for(var t,e=fe,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fe=n);Vt=t,Ze(r)}function Ze(t){if(!At){Bt&&(Bt=clearTimeout(Bt));var e=t-pt;e>24?(t<1/0&&(Bt=setTimeout(Sr,t-Ut.now()-de)),Gt&&(Gt=clearInterval(Gt))):(Gt||(he=Ut.now(),Gt=setInterval($s,Dr)),At=1,$r(Sr))}}function Cr(t,e,n){var r=new pe;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Ss=Yn("start","end","cancel","interrupt"),Cs=[],Er=0,Mr=1,Qe=2,me=3,Fr=4,tn=5,ge=6;function ye(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Es(t,n,{name:e,index:r,group:i,on:Ss,tween:Cs,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Er})}function en(t,e){var n=W(t,e);if(n.state>Er)throw new Error("too late; already scheduled");return n}function Z(t,e){var n=W(t,e);if(n.state>me)throw new Error("too late; already running");return n}function W(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Es(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Tr(o,0,n.time);function o(l){n.state=Mr,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var f,c,h,d;if(n.state!==Mr)return u();for(f in r)if(d=r[f],d.name===n.name){if(d.state===me)return Cr(a);d.state===Fr?(d.state=ge,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[f]):+f<e&&(d.state=ge,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[f])}if(Cr(function(){n.state===me&&(n.state=Fr,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=Qe,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qe){for(n.state=me,i=new Array(h=n.tween.length),f=0,c=-1;f<h;++f)(d=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=d);i.length=c+1}}function s(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=tn,1),c=-1,h=i.length;++c<h;)i[c].call(t,f);n.state===tn&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ge,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Ms(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Qe&&r.state<tn,r.state=ge,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Fs(t){return this.each(function(){Ms(this,t)})}function Ls(t,e){var n,r;return function(){var i=Z(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Os(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Z(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Ps(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=W(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Ls:Os)(n,t,e))}function nn(t,e,n){var r=t._id;return t.each(function(){var i=Z(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return W(i,r).value[e]}}function Lr(t,e){var n;return(typeof e=="number"?Y:e instanceof ft?le:(n=ft(e))?(e=n,le):wr)(t,e)}function Rs(t){return function(){this.removeAttribute(t)}}function Ns(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Is(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ks(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Bs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Gs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Vs(t,e){var n=ne(t),r=n==="transform"?xs:Lr;return this.attrTween(t,typeof e=="function"?(n.local?Gs:Bs)(n,r,nn(this,"attr."+t,e)):e==null?(n.local?Ns:Rs)(n):(n.local?ks:Is)(n,r,e))}function Us(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zs(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Hs(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zs(t,o)),n}return i._value=e,i}function Xs(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Us(t,o)),n}return i._value=e,i}function js(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ne(t);return this.tween(n,(r.local?Hs:Xs)(r,e))}function qs(t,e){return function(){en(this,t).delay=+e.apply(this,arguments)}}function Ys(t,e){return e=+e,function(){en(this,t).delay=e}}function Ws(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qs:Ys)(e,t)):W(this.node(),e).delay}function Js(t,e){return function(){Z(this,t).duration=+e.apply(this,arguments)}}function Ks(t,e){return e=+e,function(){Z(this,t).duration=e}}function Zs(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Js:Ks)(e,t)):W(this.node(),e).duration}function Qs(t,e){if(typeof e!="function")throw new Error;return function(){Z(this,t).ease=e}}function tu(t){var e=this._id;return arguments.length?this.each(Qs(e,t)):W(this.node(),e).ease}function eu(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Z(this,t).ease=n}}function nu(t){if(typeof t!="function")throw new Error;return this.each(eu(this._id,t))}function ru(t){typeof t!="function"&&(t=Qn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new nt(r,this._parents,this._name,this._id)}function iu(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],l=n[s],f=u.length,c=a[s]=new Array(f),h,d=0;d<f;++d)(h=u[d]||l[d])&&(c[d]=h);for(;s<r;++s)a[s]=e[s];return new nt(a,this._parents,this._name,this._id)}function ou(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function au(t,e,n){var r,i,o=ou(e)?en:Z;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function su(t,e){var n=this._id;return arguments.length<2?W(this.node(),n).on.on(t):this.each(au(n,t,e))}function uu(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function lu(){return this.on("end.remove",uu(this._id))}function cu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ve(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,l=o[a]=new Array(u),f,c,h=0;h<u;++h)(f=s[h])&&(c=t.call(f,f.__data__,h,s))&&("__data__"in f&&(c.__data__=f.__data__),l[h]=c,ye(l[h],e,n,h,l,W(f,n)));return new nt(o,this._parents,e,n)}function fu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Zn(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,f,c=0;c<l;++c)if(f=u[c]){for(var h=t.call(f,f.__data__,c,u),d,p=W(f,n),g=0,_=h.length;g<_;++g)(d=h[g])&&ye(d,e,n,g,h,p);o.push(h),a.push(f)}return new nt(o,a,e,n)}var hu=Rt.prototype.constructor;function du(){return new hu(this._groups,this._parents)}function pu(t,e){var n,r,i;return function(){var o=_t(this,t),a=(this.style.removeProperty(t),_t(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Or(t){return function(){this.style.removeProperty(t)}}function mu(t,e,n){var r,i=n+"",o;return function(){var a=_t(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function gu(t,e,n){var r,i,o;return function(){var a=_t(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),_t(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function yu(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Z(this,t),l=u.on,f=u.value[o]==null?s||(s=Or(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(a,i=f),u.on=r}}function vu(t,e,n){var r=(t+="")=="transform"?_s:Lr;return e==null?this.styleTween(t,pu(t,r)).on("end.style."+t,Or(t)):typeof e=="function"?this.styleTween(t,gu(t,r,nn(this,"style."+t,e))).each(yu(this._id,t)):this.styleTween(t,mu(t,r,e),n).on("end.style."+t,null)}function bu(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wu(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&bu(t,a,n)),r}return o._value=e,o}function _u(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,wu(t,e,n??""))}function xu(t){return function(){this.textContent=t}}function Au(t){return function(){var e=t(this);this.textContent=e??""}}function Du(t){return this.tween("text",typeof t=="function"?Au(nn(this,"text",t)):xu(t==null?"":t+""))}function $u(t){return function(e){this.textContent=t.call(this,e)}}function Tu(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&$u(i)),e}return r._value=t,r}function Su(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Tu(t))}function Cu(){for(var t=this._name,e=this._id,n=Pr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var f=W(u,e);ye(u,t,n,l,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nt(r,this._parents,t,n)}function Eu(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var l=Z(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var Mu=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Pr(){return++Mu}var rt=Rt.prototype;nt.prototype={constructor:nt,select:cu,selectAll:fu,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:ru,merge:iu,selection:du,transition:Cu,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:su,attr:Vs,attrTween:js,style:vu,styleTween:_u,text:Du,textTween:Su,remove:lu,tween:Ps,delay:Ws,duration:Zs,ease:tu,easeVarying:nu,end:Eu,[Symbol.iterator]:rt[Symbol.iterator]};function Fu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Lu={time:null,delay:0,duration:250,ease:Fu};function Ou(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Pu(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=Pr(),(n=Lu).time=Ke(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&ye(u,t,e,l,a,n||Ou(u,e));return new nt(r,this._parents,t,e)}Rt.prototype.interrupt=Fs,Rt.prototype.transition=Pu;function Ru(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ve(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Dt(t){return t=ve(Math.abs(t)),t?t[1]:NaN}function Nu(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function Iu(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var ku=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function be(t){if(!(e=ku.exec(t)))throw new Error("invalid format: "+t);var e;return new rn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}be.prototype=rn.prototype;function rn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}rn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Bu(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Rr;function Gu(t,e){var n=ve(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Rr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ve(t,Math.max(0,e+o-1))[0]}function Nr(t,e){var n=ve(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Ir={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ru,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nr(t*100,e),r:Nr,s:Gu,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function kr(t){return t}var Br=Array.prototype.map,Gr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vu(t){var e=t.grouping===void 0||t.thousands===void 0?kr:Nu(Br.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?kr:Iu(Br.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(c){c=be(c);var h=c.fill,d=c.align,p=c.sign,g=c.symbol,_=c.zero,x=c.width,A=c.comma,$=c.precision,T=c.trim,S=c.type;S==="n"?(A=!0,S="g"):Ir[S]||($===void 0&&($=12),T=!0,S="g"),(_||h==="0"&&d==="=")&&(_=!0,h="0",d="=");var k=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",N=g==="$"?r:/[%p]/.test(S)?a:"",I=Ir[S],v=/[defgprs%]/.test(S);$=$===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function b(y){var C=k,F=N,V,it,wt;if(S==="c")F=I(y)+F,y="";else{y=+y;var et=y<0||1/y<0;if(y=isNaN(y)?u:I(Math.abs(y),$),T&&(y=Bu(y)),et&&+y==0&&p!=="+"&&(et=!1),C=(et?p==="("?p:s:p==="-"||p==="("?"":p)+C,F=(S==="s"?Gr[8+Rr/3]:"")+F+(et&&p==="("?")":""),v){for(V=-1,it=y.length;++V<it;)if(wt=y.charCodeAt(V),48>wt||wt>57){F=(wt===46?i+y.slice(V+1):y.slice(V))+F,y=y.slice(0,V);break}}}A&&!_&&(y=e(y,1/0));var Ee=C.length+y.length+F.length,ot=Ee<x?new Array(x-Ee+1).join(h):"";switch(A&&_&&(y=e(ot+y,ot.length?x-F.length:1/0),ot=""),d){case"<":y=C+y+F+ot;break;case"=":y=C+ot+y+F;break;case"^":y=ot.slice(0,Ee=ot.length>>1)+C+y+F+ot.slice(Ee);break;default:y=ot+C+y+F;break}return o(y)}return b.toString=function(){return c+""},b}function f(c,h){var d=l((c=be(c),c.type="f",c)),p=Math.max(-8,Math.min(8,Math.floor(Dt(h)/3)))*3,g=Math.pow(10,-p),_=Gr[8+p/3];return function(x){return d(g*x)+_}}return{format:l,formatPrefix:f}}var we,on,Vr;Uu({thousands:",",grouping:[3],currency:["$",""]});function Uu(t){return we=Vu(t),on=we.format,Vr=we.formatPrefix,we}function zu(t){return Math.max(0,-Dt(Math.abs(t)))}function Hu(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dt(e)/3)))*3-Dt(Math.abs(t)))}function Xu(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Dt(e)-Dt(t))+1}function _e(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ur=Symbol("implicit");function zr(){var t=new jn,e=[],n=[],r=Ur;function i(o){let a=t.get(o);if(a===void 0){if(r!==Ur)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new jn;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return zr(e,n).unknown(r)},_e.apply(i,arguments),i}function Hr(){var t=zr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,f=.5;delete t.unknown;function c(){var h=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),p+=(g-p-o*(h-u))*f,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var _=po(h).map(function(x){return p+o*x});return n(d?_.reverse():_)}return t.domain=function(h){return arguments.length?(e(h),c()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,c()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,c()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,c()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),c()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),c()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,c()):l},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),c()):f},t.copy=function(){return Hr(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(f)},_e.apply(c(),arguments)}function Xr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Xr(e())},t}function ju(){return Xr(Hr.apply(null,arguments).paddingInner(1))}function qu(t){return function(){return t}}function Yu(t){return+t}var jr=[0,1];function $t(t){return t}function an(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:qu(isNaN(e)?NaN:.5)}function Wu(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Ju(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=an(i,r),o=n(a,o)):(r=an(r,i),o=n(o,a)),function(s){return o(r(s))}}function Ku(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=an(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Xn(t,s,1,r)-1;return o[u](i[u](s))}}function Zu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qu(){var t=jr,e=jr,n=We,r,i,o,a=$t,s,u,l;function f(){var h=Math.min(t.length,e.length);return a!==$t&&(a=Wu(t[0],t[h-1])),s=h>2?Ku:Ju,u=l=null,c}function c(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return c.invert=function(h){return a(i((l||(l=s(e,t.map(r),Y)))(h)))},c.domain=function(h){return arguments.length?(t=Array.from(h,Yu),f()):t.slice()},c.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},c.rangeRound=function(h){return e=Array.from(h),n=vs,f()},c.clamp=function(h){return arguments.length?(a=h?!0:$t,f()):a!==$t},c.interpolate=function(h){return arguments.length?(n=h,f()):n},c.unknown=function(h){return arguments.length?(o=h,c):o},function(h,d){return r=h,i=d,f()}}function tl(){return Qu()($t,$t)}function el(t,e,n,r){var i=ho(t,e,n),o;switch(r=be(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Hu(i,a))&&(r.precision=o),Vr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Xu(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=zu(i))&&(r.precision=o-(r.type==="%")*2);break}}return on(r)}function qr(t){var e=t.domain;return t.ticks=function(n){var r=e();return fo(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return el(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,f=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);f-- >0;){if(l=Be(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Yr(){var t=tl();return t.copy=function(){return Zu(t,Yr())},_e.apply(t,arguments),qr(t)}function Wr(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Xn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Wr().domain([t,e]).range(i).unknown(o)},_e.apply(qr(a),arguments)}function zt(t,e,n){this.k=t,this.x=e,this.y=n}zt.prototype={constructor:zt,scale:function(t){return t===1?this:new zt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new zt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},zt.prototype;function nl(t,e){return e instanceof Function?e(t):on(e)(t)}function Ht(t,e,n,r){let i=`${t}_${e}_${n}`;return r!=null&&(i+=`_${r}`),i}function xe(t,e){return`${t}_series${e}`}function sn(t,e){return`${t}_group${e}`}function un({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,o)=>r[o]!=null?r[o]:xe(n,o))}function Jr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((o,a)=>i[a]!=null?i[a]:xe(`${n}_grid${r}`,a))}function Kr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,o)=>r[o]!=null?r[o]:sn(n,o))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((o,a)=>i[a]!=null?i[a]:sn(`${n}_grid${r}`,a))}function Tt(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function Ae(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return Tt(e)}function rl(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function ln(t){const n=t.flat().filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function il(t){const n=t.flat().flat().filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function ol(t,e=2){const r=t.flat().filter((i,o)=>o==e).filter(i=>(i==null||H(i)&&i.value==null)===!1).map(i=>typeof i=="number"?i:i.value);return Tt(r)}function Qr(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((o,a)=>Math.max(o,a.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let o=0;o<n;o++)for(let a=0;a<r;a++)i[a][o]=e[o][a];return i}function Xt(t,e){return t<e.colors[e.colorScheme].series.length?e.colors[e.colorScheme].series[t]:e.colors[e.colorScheme].series[t%e.colors[e.colorScheme].series.length]}function ti(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function cn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:ti(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),f=(t.width-r*(o-1))/o,c=(t.height-r*(i-1))/i,h=u*f+u*r,d=l*c+l*r;return{slotIndex:s,rowIndex:l,columnIndex:u,startX:h,startY:d,centerX:h+f/2,centerY:d+c/2,width:f,height:c}})}function De(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:ti(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),f=(t.width-r*(o-1))/o,c=(t.height-r*(i-1))/i,h=u*f+u*r,d=l*c+l*r,p=[h,d],g=[f/t.width,c/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:p,scale:g}})}const al=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const o=(a,s,u,l)=>{const f=Ht(n.type,s,u),c=n.seriesLabels[s]||xe("series",s),h=Xt(s,r);return typeof a=="number"?{id:f,index:l,seq:0,label:f,description:"",data:{},value:a,seriesIndex:s,seriesLabel:c,color:h,visible:!0}:{id:a.id?a.id:f,index:l,seq:0,label:a.label?a.label:f,description:a.description,data:a.data??{},value:a.value,seriesIndex:s,seriesLabel:c,color:h,visible:!0}};i=e.map((a,s)=>Array.isArray(a)?a.map((u,l)=>o(u,s,l,i.length+l)):o(a,s,0,i.length)).flat().sort(n.sort??void 0).map((a,s)=>(a.seq=s,a)).map(a=>(a.visible=n.visibleFilter(a,t),a)).sort((a,s)=>a.index-s.index).reduce((a,s)=>(a[s.seriesIndex]||(a[s.seriesIndex]=[]),a[s.seriesIndex].push(s),a),[])}catch(o){throw Error(o)}return i},sl=t=>M({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var fn=function(t,e){return fn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},fn(t,e)};function Q(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function ul(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{l(r.next(f))}catch(c){a(c)}}function u(f){try{l(r.throw(f))}catch(c){a(c)}}function l(f){f.done?o(f.value):i(f.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function ei(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(f){return u([l,f])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function St(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ut(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function lt(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Ct(t){return this instanceof Ct?(this.v=t,this):new Ct(t)}function ll(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,c)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(_,x){o.push([d,g,_,x])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{l(r[d](p))}catch(g){h(o[0][3],g)}}function l(d){d.value instanceof Ct?Promise.resolve(d.value.v).then(f,c):h(o[0][2],d)}function f(d){u("next",d)}function c(d){u("throw",d)}function h(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function cl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof St=="function"?St(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function P(t){return typeof t=="function"}function hn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var dn=hn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
1
|
+
(function(m,at){typeof exports=="object"&&typeof module<"u"?at(exports):typeof define=="function"&&define.amd?define(["exports"],at):(m=typeof globalThis<"u"?globalThis:m||self,at(m["orbcharts-core"]={}))})(this,function(m){"use strict";const at={width:"auto",height:"auto"},Ee={top:60,right:60,bottom:60,left:60},Fe={padding:Ee,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{series:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#1b1e23",secondary:"#e1e1e1",white:"#ffffff",background:"#ffffff"},dark:{series:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#f0f0f0",secondary:"#e1e1e1",white:"#ffffff",background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Bn=800,Gn=500,qi=[],Yi=[],Wi=[],Ji=[],Ki=[],Zi={nodes:[],edges:[]},J={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Vn={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Zt={gap:120,rowAmount:1,columnAmount:1},Le={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Zt},separateSeries:!1,sumSeries:!1};Le.visibleFilter.toString=()=>"(datum, context) => true";const Oe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...J},groupAxis:{...Vn},separateSeries:!1},Pe={type:"grid",visibleFilter:(t,e)=>!0,grid:{...Oe},container:{...Zt}};Pe.visibleFilter.toString=()=>"(datum, context) => true";const Pt={...Oe},Re={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Pt}],separateGrid:!1,container:{...Zt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],multiValue:[],xAxis:{...J},yAxis:{...J}};Ne.visibleFilter.toString=()=>"(datum, context) => true";const Ie={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};ke.visibleFilter.toString=()=>"(datum, context) => true";function H(t){return Object.prototype.toString.call(t)==="[object Object]"}function Un(t){return Object.prototype.toString.call(t)==="[object Function]"}function zn(t){return!!(t&&t.nodeType)}function st(t,e){if(H(t)===!1||H(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;H(r[a])&&H(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}function Qi(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function to(t,e){const n={string:o=>typeof o=="string",number:o=>typeof o=="number",boolean:o=>typeof o=="boolean",object:o=>H(o),"object[]":o=>Array.isArray(o)&&o.every(a=>H(a)),"string[]":o=>Array.isArray(o)&&o.every(a=>typeof a=="string"),"number[]":o=>Array.isArray(o)&&o.every(a=>typeof a=="number"),Function:o=>Un(o),null:o=>o===null,undefined:o=>o===void 0},r={ColorType:o=>o==="none"||o==="series"||o==="primary"||o==="secondary"||o==="white"||o==="background"};return Object.keys(t).find(o=>{if(e[o]){const a=e[o],s=t[o];if(a.toBeTypes){if(a.toBeTypes.some(f=>n[f](s))===!1)return!0}else if(a.toBe){const{toBe:u,test:l}=a;if(l(s)===!1)return!0}else if(a.toBeOption){const u=a.toBeOption;if(r[u](s)===!1)return!0}}return!1})}function E(t,e){const n=to(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const eo=t=>{const e=E(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=E(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function Qt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function no(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hn(t){let e,n,r;t.length!==2?(e=Qt,n=(s,u)=>Qt(t(s),u),r=(s,u)=>t(s)-u):(e=t===Qt||t===no?t:ro,n=t,r=t);function i(s,u,l=0,f=s.length){if(l<f){if(e(u,u)!==0)return f;do{const c=l+f>>>1;n(s[c],u)<0?l=c+1:f=c}while(l<f)}return l}function o(s,u,l=0,f=s.length){if(l<f){if(e(u,u)!==0)return f;do{const c=l+f>>>1;n(s[c],u)<=0?l=c+1:f=c}while(l<f)}return l}function a(s,u,l=0,f=s.length){const c=i(s,u,l,f-1);return c>l&&r(s[c-1],u)>-r(s[c],u)?c-1:c}return{left:i,center:a,right:o}}function ro(){return 0}function io(t){return t===null?NaN:+t}const jn=Hn(Qt).right;Hn(io).center;class Xn extends Map{constructor(e,n=so){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(qn(this,e))}has(e){return super.has(qn(this,e))}set(e,n){return super.set(oo(this,e),n)}delete(e){return super.delete(ao(this,e))}}function qn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function oo({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function ao({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function so(t){return t!==null&&typeof t=="object"?t.valueOf():t}const uo=Math.sqrt(50),lo=Math.sqrt(10),co=Math.sqrt(2);function te(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=uo?10:o>=lo?5:o>=co?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?te(t,e,n*2):[s,u,l]}function fo(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?te(e,t,n):te(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function Be(t,e,n){return e=+e,t=+t,n=+n,te(t,e,n)[2]}function ho(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Be(e,t,n):Be(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function po(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var mo={value:()=>{}};function Yn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ee(n)}function ee(t){this._=t}function go(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ee.prototype=Yn.prototype={constructor:ee,on:function(t,e){var n=this._,r=go(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=yo(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Wn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Wn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ee(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function yo(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Wn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mo,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ge="http://www.w3.org/1999/xhtml";const Jn={svg:"http://www.w3.org/2000/svg",xhtml:Ge,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Jn.hasOwnProperty(e)?{space:Jn[e],local:t}:t}function vo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ge&&e.documentElement.namespaceURI===Ge?e.createElement(t):e.createElementNS(n,t)}}function bo(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kn(t){var e=ne(t);return(e.local?bo:vo)(e)}function wo(){}function Ve(t){return t==null?wo:function(){return this.querySelector(t)}}function _o(t){typeof t!="function"&&(t=Ve(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,l,f=0;f<a;++f)(u=o[f])&&(l=t.call(u,u.__data__,f,o))&&("__data__"in u&&(l.__data__=u.__data__),s[f]=l);return new j(r,this._parents)}function xo(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ao(){return[]}function Zn(t){return t==null?Ao:function(){return this.querySelectorAll(t)}}function Do(t){return function(){return xo(t.apply(this,arguments))}}function $o(t){typeof t=="function"?t=Do(t):t=Zn(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new j(r,i)}function Qn(t){return function(){return this.matches(t)}}function tr(t){return function(e){return e.matches(t)}}var To=Array.prototype.find;function So(t){return function(){return To.call(this.children,t)}}function Co(){return this.firstElementChild}function Mo(t){return this.select(t==null?Co:So(typeof t=="function"?t:tr(t)))}var Eo=Array.prototype.filter;function Fo(){return Array.from(this.children)}function Lo(t){return function(){return Eo.call(this.children,t)}}function Oo(t){return this.selectAll(t==null?Fo:Lo(typeof t=="function"?t:tr(t)))}function Po(t){typeof t!="function"&&(t=Qn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new j(r,this._parents)}function er(t){return new Array(t.length)}function Ro(){return new j(this._enter||this._groups.map(er),this._parents)}function re(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}re.prototype={constructor:re,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function No(t){return function(){return t}}function Io(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new re(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function ko(t,e,n,r,i,o,a){var s,u,l=new Map,f=e.length,c=o.length,h=new Array(f),d;for(s=0;s<f;++s)(u=e[s])&&(h[s]=d=a.call(u,u.__data__,s,e)+"",l.has(d)?i[s]=u:l.set(d,u));for(s=0;s<c;++s)d=a.call(t,o[s],s,o)+"",(u=l.get(d))?(r[s]=u,u.__data__=o[s],l.delete(d)):n[s]=new re(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function Bo(t){return t.__data__}function Go(t,e){if(!arguments.length)return Array.from(this,Bo);var n=e?ko:Io,r=this._parents,i=this._groups;typeof t!="function"&&(t=No(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var f=r[l],c=i[l],h=c.length,d=Vo(t.call(f,f&&f.__data__,l,r)),p=d.length,g=s[l]=new Array(p),_=a[l]=new Array(p),x=u[l]=new Array(h);n(f,c,g,_,x,d,e);for(var A=0,$=0,T,S;A<p;++A)if(T=g[A]){for(A>=$&&($=A+1);!(S=_[$])&&++$<p;);T._next=S||null}}return a=new j(a,r),a._enter=s,a._exit=u,a}function Vo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Uo(){return new j(this._exit||this._groups.map(er),this._parents)}function zo(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Ho(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],f=r[u],c=l.length,h=s[u]=new Array(c),d,p=0;p<c;++p)(d=l[p]||f[p])&&(h[p]=d);for(;u<i;++u)s[u]=n[u];return new j(s,this._parents)}function jo(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Xo(t){t||(t=qo);function e(c,h){return c&&h?t(c.__data__,h.__data__):!c-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,f=0;f<s;++f)(l=a[f])&&(u[f]=l);u.sort(e)}return new j(i,this._parents).order()}function qo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Yo(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Wo(){return Array.from(this)}function Jo(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Ko(){let t=0;for(const e of this)++t;return t}function Zo(){return!this.node()}function Qo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function ta(t){return function(){this.removeAttribute(t)}}function ea(t){return function(){this.removeAttributeNS(t.space,t.local)}}function na(t,e){return function(){this.setAttribute(t,e)}}function ra(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ia(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function oa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function aa(t,e){var n=ne(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ea:ta:typeof e=="function"?n.local?oa:ia:n.local?ra:na)(n,e))}function nr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sa(t){return function(){this.style.removeProperty(t)}}function ua(t,e,n){return function(){this.style.setProperty(t,e,n)}}function la(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ca(t,e,n){return arguments.length>1?this.each((e==null?sa:typeof e=="function"?la:ua)(t,e,n??"")):_t(this.node(),t)}function _t(t,e){return t.style.getPropertyValue(e)||nr(t).getComputedStyle(t,null).getPropertyValue(e)}function fa(t){return function(){delete this[t]}}function ha(t,e){return function(){this[t]=e}}function da(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function pa(t,e){return arguments.length>1?this.each((e==null?fa:typeof e=="function"?da:ha)(t,e)):this.node()[t]}function rr(t){return t.trim().split(/^|\s+/)}function Ue(t){return t.classList||new ir(t)}function ir(t){this._node=t,this._names=rr(t.getAttribute("class")||"")}ir.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function or(t,e){for(var n=Ue(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ar(t,e){for(var n=Ue(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ma(t){return function(){or(this,t)}}function ga(t){return function(){ar(this,t)}}function ya(t,e){return function(){(e.apply(this,arguments)?or:ar)(this,t)}}function va(t,e){var n=rr(t+"");if(arguments.length<2){for(var r=Ue(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?ya:e?ma:ga)(n,e))}function ba(){this.textContent=""}function wa(t){return function(){this.textContent=t}}function _a(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function xa(t){return arguments.length?this.each(t==null?ba:(typeof t=="function"?_a:wa)(t)):this.node().textContent}function Aa(){this.innerHTML=""}function Da(t){return function(){this.innerHTML=t}}function $a(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ta(t){return arguments.length?this.each(t==null?Aa:(typeof t=="function"?$a:Da)(t)):this.node().innerHTML}function Sa(){this.nextSibling&&this.parentNode.appendChild(this)}function Ca(){return this.each(Sa)}function Ma(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ea(){return this.each(Ma)}function Fa(t){var e=typeof t=="function"?t:Kn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function La(){return null}function Oa(t,e){var n=typeof t=="function"?t:Kn(t),r=e==null?La:typeof e=="function"?e:Ve(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Pa(){var t=this.parentNode;t&&t.removeChild(this)}function Ra(){return this.each(Pa)}function Na(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ia(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ka(t){return this.select(t?Ia:Na)}function Ba(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ga(t){return function(e){t.call(this,e,this.__data__)}}function Va(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Ua(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function za(t,e,n){return function(){var r=this.__on,i,o=Ga(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Ha(t,e,n){var r=Va(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,f;u<l;++u)for(i=0,f=s[u];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?za:Ua,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function sr(t,e,n){var r=nr(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ja(t,e){return function(){return sr(this,t,e)}}function Xa(t,e){return function(){return sr(this,t,e.apply(this,arguments))}}function qa(t,e){return this.each((typeof e=="function"?Xa:ja)(t,e))}function*Ya(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var ur=[null];function j(t,e){this._groups=t,this._parents=e}function Rt(){return new j([[document.documentElement]],ur)}function Wa(){return this}j.prototype=Rt.prototype={constructor:j,select:_o,selectAll:$o,selectChild:Mo,selectChildren:Oo,filter:Po,data:Go,enter:Ro,exit:Uo,join:zo,merge:Ho,selection:Wa,order:jo,sort:Xo,call:Yo,nodes:Wo,node:Jo,size:Ko,empty:Zo,each:Qo,attr:aa,style:ca,property:pa,classed:va,text:xa,html:Ta,raise:Ca,lower:Ea,append:Fa,insert:Oa,remove:Ra,clone:ka,datum:Ba,on:Ha,dispatch:qa,[Symbol.iterator]:Ya};function ie(t){return typeof t=="string"?new j([[document.querySelector(t)]],[document.documentElement]):new j([[t]],ur)}function ze(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function lr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nt(){}var It=.7,oe=1/It,xt="\\s*([+-]?\\d+)\\s*",kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",K="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ja=/^#([0-9a-f]{3,8})$/,Ka=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Za=new RegExp(`^rgb\\(${K},${K},${K}\\)$`),Qa=new RegExp(`^rgba\\(${xt},${xt},${xt},${kt}\\)$`),ts=new RegExp(`^rgba\\(${K},${K},${K},${kt}\\)$`),es=new RegExp(`^hsl\\(${kt},${K},${K}\\)$`),ns=new RegExp(`^hsla\\(${kt},${K},${K},${kt}\\)$`),cr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ze(Nt,ft,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:rs,formatHsl:is,formatRgb:hr,toString:hr});function fr(){return this.rgb().formatHex()}function rs(){return this.rgb().formatHex8()}function is(){return yr(this).formatHsl()}function hr(){return this.rgb().formatRgb()}function ft(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ja.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?dr(e):n===3?new z(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ae(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ae(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ka.exec(t))?new z(e[1],e[2],e[3],1):(e=Za.exec(t))?new z(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qa.exec(t))?ae(e[1],e[2],e[3],e[4]):(e=ts.exec(t))?ae(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=es.exec(t))?gr(e[1],e[2]/100,e[3]/100,1):(e=ns.exec(t))?gr(e[1],e[2]/100,e[3]/100,e[4]):cr.hasOwnProperty(t)?dr(cr[t]):t==="transparent"?new z(NaN,NaN,NaN,0):null}function dr(t){return new z(t>>16&255,t>>8&255,t&255,1)}function ae(t,e,n,r){return r<=0&&(t=e=n=NaN),new z(t,e,n,r)}function os(t){return t instanceof Nt||(t=ft(t)),t?(t=t.rgb(),new z(t.r,t.g,t.b,t.opacity)):new z}function He(t,e,n,r){return arguments.length===1?os(t):new z(t,e,n,r??1)}function z(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ze(z,He,lr(Nt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new z(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?It:Math.pow(It,t),new z(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new z(ht(this.r),ht(this.g),ht(this.b),se(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pr,formatHex:pr,formatHex8:as,formatRgb:mr,toString:mr}));function pr(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}`}function as(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}${dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function mr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${ht(this.r)}, ${ht(this.g)}, ${ht(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ht(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dt(t){return t=ht(t),(t<16?"0":"")+t.toString(16)}function gr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new q(t,e,n,r)}function yr(t){if(t instanceof q)return new q(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=ft(t)),!t)return new q;if(t instanceof q)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new q(a,s,u,t.opacity)}function ss(t,e,n,r){return arguments.length===1?yr(t):new q(t,e,n,r??1)}function q(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ze(q,ss,lr(Nt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new q(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?It:Math.pow(It,t),new q(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new z(je(t>=240?t-240:t+120,i,r),je(t,i,r),je(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new q(vr(this.h),ue(this.s),ue(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${vr(this.h)}, ${ue(this.s)*100}%, ${ue(this.l)*100}%${t===1?")":`, ${t})`}`}}));function vr(t){return t=(t||0)%360,t<0?t+360:t}function ue(t){return Math.max(0,Math.min(1,t||0))}function je(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Xe=t=>()=>t;function us(t,e){return function(n){return t+n*e}}function ls(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function cs(t){return(t=+t)==1?br:function(e,n){return n-e?ls(e,n,t):Xe(isNaN(e)?n:e)}}function br(t,e){var n=e-t;return n?us(t,n):Xe(isNaN(t)?e:t)}const le=function t(e){var n=cs(e);function r(i,o){var a=n((i=He(i)).r,(o=He(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=br(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function fs(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function hs(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ds(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=We(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function ps(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Y(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ms(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=We(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var qe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ye=new RegExp(qe.source,"g");function gs(t){return function(){return t}}function ys(t){return function(e){return t(e)+""}}function wr(t,e){var n=qe.lastIndex=Ye.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=qe.exec(t))&&(i=Ye.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Y(r,i)})),n=Ye.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?ys(u[0].x):gs(e):(e=u.length,function(l){for(var f=0,c;f<e;++f)s[(c=u[f]).i]=c.x(l);return s.join("")})}function We(t,e){var n=typeof e,r;return e==null||n==="boolean"?Xe(e):(n==="number"?Y:n==="string"?(r=ft(e))?(e=r,le):wr:e instanceof ft?le:e instanceof Date?ps:hs(e)?fs:Array.isArray(e)?ds:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ms:Y)(t,e)}function vs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _r=180/Math.PI,Je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xr(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*_r,skewX:Math.atan(u)*_r,scaleX:a,scaleY:s}}var ce;function bs(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Je:xr(e.a,e.b,e.c,e.d,e.e,e.f)}function ws(t){return t==null||(ce||(ce=document.createElementNS("http://www.w3.org/2000/svg","g")),ce.setAttribute("transform",t),!(t=ce.transform.baseVal.consolidate()))?Je:(t=t.matrix,xr(t.a,t.b,t.c,t.d,t.e,t.f))}function Ar(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,f,c,h,d,p){if(l!==c||f!==h){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:Y(l,c)},{i:g-2,x:Y(f,h)})}else(c||h)&&d.push("translate("+c+e+h+n)}function a(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Y(l,f)})):f&&c.push(i(c)+"rotate("+f+r)}function s(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Y(l,f)}):f&&c.push(i(c)+"skewX("+f+r)}function u(l,f,c,h,d,p){if(l!==c||f!==h){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:Y(l,c)},{i:g-2,x:Y(f,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=t(l),f=t(f),o(l.translateX,l.translateY,f.translateX,f.translateY,c,h),a(l.rotate,f.rotate,c,h),s(l.skewX,f.skewX,c,h),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(d){for(var p=-1,g=h.length,_;++p<g;)c[(_=h[p]).i]=_.x(d);return c.join("")}}}var _s=Ar(bs,"px, ","px)","deg)"),xs=Ar(ws,", ",")",")"),At=0,Bt=0,Gt=0,Dr=1e3,fe,Vt,he=0,pt=0,de=0,Ut=typeof performance=="object"&&performance.now?performance:Date,$r=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ke(){return pt||($r(As),pt=Ut.now()+de)}function As(){pt=0}function pe(){this._call=this._time=this._next=null}pe.prototype=Tr.prototype={constructor:pe,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ke():+n)+(e==null?0:+e),!this._next&&Vt!==this&&(Vt?Vt._next=this:fe=this,Vt=this),this._call=t,this._time=n,Ze()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ze())}};function Tr(t,e,n){var r=new pe;return r.restart(t,e,n),r}function Ds(){Ke(),++At;for(var t=fe,e;t;)(e=pt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--At}function Sr(){pt=(he=Ut.now())+de,At=Bt=0;try{Ds()}finally{At=0,Ts(),pt=0}}function $s(){var t=Ut.now(),e=t-he;e>Dr&&(de-=e,he=t)}function Ts(){for(var t,e=fe,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fe=n);Vt=t,Ze(r)}function Ze(t){if(!At){Bt&&(Bt=clearTimeout(Bt));var e=t-pt;e>24?(t<1/0&&(Bt=setTimeout(Sr,t-Ut.now()-de)),Gt&&(Gt=clearInterval(Gt))):(Gt||(he=Ut.now(),Gt=setInterval($s,Dr)),At=1,$r(Sr))}}function Cr(t,e,n){var r=new pe;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Ss=Yn("start","end","cancel","interrupt"),Cs=[],Mr=0,Er=1,Qe=2,me=3,Fr=4,tn=5,ge=6;function ye(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Ms(t,n,{name:e,index:r,group:i,on:Ss,tween:Cs,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Mr})}function en(t,e){var n=W(t,e);if(n.state>Mr)throw new Error("too late; already scheduled");return n}function Z(t,e){var n=W(t,e);if(n.state>me)throw new Error("too late; already running");return n}function W(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ms(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Tr(o,0,n.time);function o(l){n.state=Er,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var f,c,h,d;if(n.state!==Er)return u();for(f in r)if(d=r[f],d.name===n.name){if(d.state===me)return Cr(a);d.state===Fr?(d.state=ge,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[f]):+f<e&&(d.state=ge,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[f])}if(Cr(function(){n.state===me&&(n.state=Fr,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=Qe,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qe){for(n.state=me,i=new Array(h=n.tween.length),f=0,c=-1;f<h;++f)(d=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=d);i.length=c+1}}function s(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=tn,1),c=-1,h=i.length;++c<h;)i[c].call(t,f);n.state===tn&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ge,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Es(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Qe&&r.state<tn,r.state=ge,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Fs(t){return this.each(function(){Es(this,t)})}function Ls(t,e){var n,r;return function(){var i=Z(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Os(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Z(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Ps(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=W(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Ls:Os)(n,t,e))}function nn(t,e,n){var r=t._id;return t.each(function(){var i=Z(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return W(i,r).value[e]}}function Lr(t,e){var n;return(typeof e=="number"?Y:e instanceof ft?le:(n=ft(e))?(e=n,le):wr)(t,e)}function Rs(t){return function(){this.removeAttribute(t)}}function Ns(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Is(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ks(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Bs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Gs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function Vs(t,e){var n=ne(t),r=n==="transform"?xs:Lr;return this.attrTween(t,typeof e=="function"?(n.local?Gs:Bs)(n,r,nn(this,"attr."+t,e)):e==null?(n.local?Ns:Rs)(n):(n.local?ks:Is)(n,r,e))}function Us(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zs(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Hs(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zs(t,o)),n}return i._value=e,i}function js(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Us(t,o)),n}return i._value=e,i}function Xs(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ne(t);return this.tween(n,(r.local?Hs:js)(r,e))}function qs(t,e){return function(){en(this,t).delay=+e.apply(this,arguments)}}function Ys(t,e){return e=+e,function(){en(this,t).delay=e}}function Ws(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qs:Ys)(e,t)):W(this.node(),e).delay}function Js(t,e){return function(){Z(this,t).duration=+e.apply(this,arguments)}}function Ks(t,e){return e=+e,function(){Z(this,t).duration=e}}function Zs(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Js:Ks)(e,t)):W(this.node(),e).duration}function Qs(t,e){if(typeof e!="function")throw new Error;return function(){Z(this,t).ease=e}}function tu(t){var e=this._id;return arguments.length?this.each(Qs(e,t)):W(this.node(),e).ease}function eu(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Z(this,t).ease=n}}function nu(t){if(typeof t!="function")throw new Error;return this.each(eu(this._id,t))}function ru(t){typeof t!="function"&&(t=Qn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new nt(r,this._parents,this._name,this._id)}function iu(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],l=n[s],f=u.length,c=a[s]=new Array(f),h,d=0;d<f;++d)(h=u[d]||l[d])&&(c[d]=h);for(;s<r;++s)a[s]=e[s];return new nt(a,this._parents,this._name,this._id)}function ou(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function au(t,e,n){var r,i,o=ou(e)?en:Z;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function su(t,e){var n=this._id;return arguments.length<2?W(this.node(),n).on.on(t):this.each(au(n,t,e))}function uu(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function lu(){return this.on("end.remove",uu(this._id))}function cu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ve(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,l=o[a]=new Array(u),f,c,h=0;h<u;++h)(f=s[h])&&(c=t.call(f,f.__data__,h,s))&&("__data__"in f&&(c.__data__=f.__data__),l[h]=c,ye(l[h],e,n,h,l,W(f,n)));return new nt(o,this._parents,e,n)}function fu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Zn(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,f,c=0;c<l;++c)if(f=u[c]){for(var h=t.call(f,f.__data__,c,u),d,p=W(f,n),g=0,_=h.length;g<_;++g)(d=h[g])&&ye(d,e,n,g,h,p);o.push(h),a.push(f)}return new nt(o,a,e,n)}var hu=Rt.prototype.constructor;function du(){return new hu(this._groups,this._parents)}function pu(t,e){var n,r,i;return function(){var o=_t(this,t),a=(this.style.removeProperty(t),_t(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Or(t){return function(){this.style.removeProperty(t)}}function mu(t,e,n){var r,i=n+"",o;return function(){var a=_t(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function gu(t,e,n){var r,i,o;return function(){var a=_t(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),_t(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function yu(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Z(this,t),l=u.on,f=u.value[o]==null?s||(s=Or(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(a,i=f),u.on=r}}function vu(t,e,n){var r=(t+="")=="transform"?_s:Lr;return e==null?this.styleTween(t,pu(t,r)).on("end.style."+t,Or(t)):typeof e=="function"?this.styleTween(t,gu(t,r,nn(this,"style."+t,e))).each(yu(this._id,t)):this.styleTween(t,mu(t,r,e),n).on("end.style."+t,null)}function bu(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wu(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&bu(t,a,n)),r}return o._value=e,o}function _u(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,wu(t,e,n??""))}function xu(t){return function(){this.textContent=t}}function Au(t){return function(){var e=t(this);this.textContent=e??""}}function Du(t){return this.tween("text",typeof t=="function"?Au(nn(this,"text",t)):xu(t==null?"":t+""))}function $u(t){return function(e){this.textContent=t.call(this,e)}}function Tu(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&$u(i)),e}return r._value=t,r}function Su(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Tu(t))}function Cu(){for(var t=this._name,e=this._id,n=Pr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var f=W(u,e);ye(u,t,n,l,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nt(r,this._parents,t,n)}function Mu(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var l=Z(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var Eu=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Pr(){return++Eu}var rt=Rt.prototype;nt.prototype={constructor:nt,select:cu,selectAll:fu,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:ru,merge:iu,selection:du,transition:Cu,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:su,attr:Vs,attrTween:Xs,style:vu,styleTween:_u,text:Du,textTween:Su,remove:lu,tween:Ps,delay:Ws,duration:Zs,ease:tu,easeVarying:nu,end:Mu,[Symbol.iterator]:rt[Symbol.iterator]};function Fu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Lu={time:null,delay:0,duration:250,ease:Fu};function Ou(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Pu(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=Pr(),(n=Lu).time=Ke(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&ye(u,t,e,l,a,n||Ou(u,e));return new nt(r,this._parents,t,e)}Rt.prototype.interrupt=Fs,Rt.prototype.transition=Pu;function Ru(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ve(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Dt(t){return t=ve(Math.abs(t)),t?t[1]:NaN}function Nu(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function Iu(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var ku=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function be(t){if(!(e=ku.exec(t)))throw new Error("invalid format: "+t);var e;return new rn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}be.prototype=rn.prototype;function rn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}rn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Bu(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Rr;function Gu(t,e){var n=ve(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Rr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ve(t,Math.max(0,e+o-1))[0]}function Nr(t,e){var n=ve(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Ir={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ru,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nr(t*100,e),r:Nr,s:Gu,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function kr(t){return t}var Br=Array.prototype.map,Gr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vu(t){var e=t.grouping===void 0||t.thousands===void 0?kr:Nu(Br.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?kr:Iu(Br.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(c){c=be(c);var h=c.fill,d=c.align,p=c.sign,g=c.symbol,_=c.zero,x=c.width,A=c.comma,$=c.precision,T=c.trim,S=c.type;S==="n"?(A=!0,S="g"):Ir[S]||($===void 0&&($=12),T=!0,S="g"),(_||h==="0"&&d==="=")&&(_=!0,h="0",d="=");var k=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",N=g==="$"?r:/[%p]/.test(S)?a:"",I=Ir[S],v=/[defgprs%]/.test(S);$=$===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function b(y){var C=k,F=N,V,it,wt;if(S==="c")F=I(y)+F,y="";else{y=+y;var et=y<0||1/y<0;if(y=isNaN(y)?u:I(Math.abs(y),$),T&&(y=Bu(y)),et&&+y==0&&p!=="+"&&(et=!1),C=(et?p==="("?p:s:p==="-"||p==="("?"":p)+C,F=(S==="s"?Gr[8+Rr/3]:"")+F+(et&&p==="("?")":""),v){for(V=-1,it=y.length;++V<it;)if(wt=y.charCodeAt(V),48>wt||wt>57){F=(wt===46?i+y.slice(V+1):y.slice(V))+F,y=y.slice(0,V);break}}}A&&!_&&(y=e(y,1/0));var Me=C.length+y.length+F.length,ot=Me<x?new Array(x-Me+1).join(h):"";switch(A&&_&&(y=e(ot+y,ot.length?x-F.length:1/0),ot=""),d){case"<":y=C+y+F+ot;break;case"=":y=C+ot+y+F;break;case"^":y=ot.slice(0,Me=ot.length>>1)+C+y+F+ot.slice(Me);break;default:y=ot+C+y+F;break}return o(y)}return b.toString=function(){return c+""},b}function f(c,h){var d=l((c=be(c),c.type="f",c)),p=Math.max(-8,Math.min(8,Math.floor(Dt(h)/3)))*3,g=Math.pow(10,-p),_=Gr[8+p/3];return function(x){return d(g*x)+_}}return{format:l,formatPrefix:f}}var we,on,Vr;Uu({thousands:",",grouping:[3],currency:["$",""]});function Uu(t){return we=Vu(t),on=we.format,Vr=we.formatPrefix,we}function zu(t){return Math.max(0,-Dt(Math.abs(t)))}function Hu(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dt(e)/3)))*3-Dt(Math.abs(t)))}function ju(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Dt(e)-Dt(t))+1}function _e(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ur=Symbol("implicit");function zr(){var t=new Xn,e=[],n=[],r=Ur;function i(o){let a=t.get(o);if(a===void 0){if(r!==Ur)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Xn;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return zr(e,n).unknown(r)},_e.apply(i,arguments),i}function Hr(){var t=zr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,f=.5;delete t.unknown;function c(){var h=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),p+=(g-p-o*(h-u))*f,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var _=po(h).map(function(x){return p+o*x});return n(d?_.reverse():_)}return t.domain=function(h){return arguments.length?(e(h),c()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,c()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,c()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,c()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),c()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),c()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,c()):l},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),c()):f},t.copy=function(){return Hr(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(f)},_e.apply(c(),arguments)}function jr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return jr(e())},t}function Xu(){return jr(Hr.apply(null,arguments).paddingInner(1))}function qu(t){return function(){return t}}function Yu(t){return+t}var Xr=[0,1];function $t(t){return t}function an(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:qu(isNaN(e)?NaN:.5)}function Wu(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Ju(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=an(i,r),o=n(a,o)):(r=an(r,i),o=n(o,a)),function(s){return o(r(s))}}function Ku(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=an(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=jn(t,s,1,r)-1;return o[u](i[u](s))}}function Zu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qu(){var t=Xr,e=Xr,n=We,r,i,o,a=$t,s,u,l;function f(){var h=Math.min(t.length,e.length);return a!==$t&&(a=Wu(t[0],t[h-1])),s=h>2?Ku:Ju,u=l=null,c}function c(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return c.invert=function(h){return a(i((l||(l=s(e,t.map(r),Y)))(h)))},c.domain=function(h){return arguments.length?(t=Array.from(h,Yu),f()):t.slice()},c.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},c.rangeRound=function(h){return e=Array.from(h),n=vs,f()},c.clamp=function(h){return arguments.length?(a=h?!0:$t,f()):a!==$t},c.interpolate=function(h){return arguments.length?(n=h,f()):n},c.unknown=function(h){return arguments.length?(o=h,c):o},function(h,d){return r=h,i=d,f()}}function tl(){return Qu()($t,$t)}function el(t,e,n,r){var i=ho(t,e,n),o;switch(r=be(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Hu(i,a))&&(r.precision=o),Vr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=ju(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=zu(i))&&(r.precision=o-(r.type==="%")*2);break}}return on(r)}function qr(t){var e=t.domain;return t.ticks=function(n){var r=e();return fo(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return el(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,f=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);f-- >0;){if(l=Be(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Yr(){var t=tl();return t.copy=function(){return Zu(t,Yr())},_e.apply(t,arguments),qr(t)}function Wr(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[jn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Wr().domain([t,e]).range(i).unknown(o)},_e.apply(qr(a),arguments)}function zt(t,e,n){this.k=t,this.x=e,this.y=n}zt.prototype={constructor:zt,scale:function(t){return t===1?this:new zt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new zt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},zt.prototype;function nl(t,e){return e instanceof Function?e(t):on(e)(t)}function Ht(t,e,n,r){let i=`${t}_${e}_${n}`;return r!=null&&(i+=`_${r}`),i}function xe(t,e){return`${t}_series${e}`}function sn(t,e){return`${t}_group${e}`}function un({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,o)=>r[o]!=null?r[o]:xe(n,o))}function Jr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((o,a)=>i[a]!=null?i[a]:xe(`${n}_grid${r}`,a))}function Kr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,o)=>r[o]!=null?r[o]:sn(n,o))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((o,a)=>i[a]!=null?i[a]:sn(`${n}_grid${r}`,a))}function Tt(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function Ae(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return Tt(e)}function rl(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function ln(t){const n=t.flat().filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function il(t){const n=t.flat().flat().filter(r=>(r==null||H(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return Tt(n)}function ol(t,e=2){const r=t.flat().filter((i,o)=>o==e).filter(i=>(i==null||H(i)&&i.value==null)===!1).map(i=>typeof i=="number"?i:i.value);return Tt(r)}function Qr(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((o,a)=>Math.max(o,a.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let o=0;o<n;o++)for(let a=0;a<r;a++)i[a][o]=e[o][a];return i}function jt(t,e){return t<e.colors[e.colorScheme].series.length?e.colors[e.colorScheme].series[t]:e.colors[e.colorScheme].series[t%e.colors[e.colorScheme].series.length]}function ti(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function cn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:ti(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),f=(t.width-r*(o-1))/o,c=(t.height-r*(i-1))/i,h=u*f+u*r,d=l*c+l*r;return{slotIndex:s,rowIndex:l,columnIndex:u,startX:h,startY:d,centerX:h+f/2,centerY:d+c/2,width:f,height:c}})}function De(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:ti(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),f=(t.width-r*(o-1))/o,c=(t.height-r*(i-1))/i,h=u*f+u*r,d=l*c+l*r,p=[h,d],g=[f/t.width,c/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:p,scale:g}})}const al=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const o=(a,s,u,l)=>{const f=Ht(n.type,s,u),c=n.seriesLabels[s]||xe("series",s),h=jt(s,r);return typeof a=="number"?{id:f,index:l,seq:0,label:f,description:"",data:{},value:a,seriesIndex:s,seriesLabel:c,color:h,visible:!0}:{id:a.id?a.id:f,index:l,seq:0,label:a.label?a.label:f,description:a.description,data:a.data??{},value:a.value,seriesIndex:s,seriesLabel:c,color:h,visible:!0}};i=e.map((a,s)=>Array.isArray(a)?a.map((u,l)=>o(u,s,l,i.length+l)):o(a,s,0,i.length)).flat().sort(n.sort??void 0).map((a,s)=>(a.seq=s,a)).map(a=>(a.visible=n.visibleFilter(a,t),a)).sort((a,s)=>a.index-s.index).reduce((a,s)=>(a[s.seriesIndex]||(a[s.seriesIndex]=[]),a[s.seriesIndex].push(s),a),[])}catch(o){throw Error(o)}return i},sl=t=>E({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var fn=function(t,e){return fn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},fn(t,e)};function Q(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function ul(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{l(r.next(f))}catch(c){a(c)}}function u(f){try{l(r.throw(f))}catch(c){a(c)}}function l(f){f.done?o(f.value):i(f.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function ei(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(f){return u([l,f])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function St(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ut(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function lt(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Ct(t){return this instanceof Ct?(this.v=t,this):new Ct(t)}function ll(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,c)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(_,x){o.push([d,g,_,x])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{l(r[d](p))}catch(g){h(o[0][3],g)}}function l(d){d.value instanceof Ct?Promise.resolve(d.value.v).then(f,c):h(o[0][2],d)}function f(d){u("next",d)}function c(d){u("throw",d)}function h(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function cl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof St=="function"?St(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function P(t){return typeof t=="function"}function hn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var dn=hn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function $e(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var jt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=St(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(P(f))try{f()}catch(g){o=g instanceof dn?g.errors:[g]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var h=St(c),d=h.next();!d.done;d=h.next()){var p=d.value;try{ii(p)}catch(g){o=o??[],g instanceof dn?o=lt(lt([],ut(o)),ut(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new dn(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ii(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&$e(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&$e(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ni=jt.EMPTY;function ri(t){return t instanceof jt||t&&"closed"in t&&P(t.remove)&&P(t.add)&&P(t.unsubscribe)}function ii(t){P(t)?t():t.unsubscribe()}var oi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ai={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,lt([t,e],ut(n)))},clearTimeout:function(t){var e=ai.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function si(t){ai.setTimeout(function(){throw t})}function pn(){}function Te(t){t()}var mn=function(t){Q(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ri(n)&&n.add(r)):r.destination=pl,r}return e.create=function(n,r,i){return new qt(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(jt),fl=Function.prototype.bind;function gn(t,e){return fl.call(t,e)}var hl=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Se(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Se(r)}else Se(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Se(n)}},t}(),qt=function(t){Q(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(P(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&oi.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&gn(n.next,s),error:n.error&&gn(n.error,s),complete:n.complete&&gn(n.complete,s)}):a=n}return o.destination=new hl(a),o}return e}(mn);function Se(t){si(t)}function dl(t){throw t}var pl={closed:!0,next:pn,error:dl,complete:pn},yn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Et(t){return t}function ml(t){return t.length===0?Et:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var L=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=yl(e)?e:new qt(e,n,r);return Te(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ui(n),new n(function(i,o){var a=new qt({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[yn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return ml(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ui(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function ui(t){var e;return(e=t??oi.Promise)!==null&&e!==void 0?e:Promise}function gl(t){return t&&P(t.next)&&P(t.error)&&P(t.complete)}function yl(t){return t&&t instanceof mn||gl(t)&&ri(t)}function vl(t){return P(t==null?void 0:t.lift)}function B(t){return function(e){if(vl(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function G(t,e,n,r,i){return new bl(t,e,n,r,i)}var bl=function(t){Q(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(f){n.error(f)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mn),wl=hn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),O=function(t){Q(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new li(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new wl},e.prototype.next=function(n){var r=this;Te(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=St(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Te(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Te(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ni:(this.currentObservers=null,s.push(n),new jt(function(){r.currentObservers=null,$e(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new L;return n.source=this,n},e.create=function(n,r){return new li(n,r)},e}(L),li=function(t){Q(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ni},e}(O),ci=function(t){Q(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(O),vn={now:function(){return(vn.delegate||Date).now()},delegate:void 0},_l=function(t){Q(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vn);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),l=0,f=1;f<o.length&&o[f]<=u;f+=2)l=f;l&&o.splice(0,l+1)}},e}(O),xl=function(t){Q(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(jt),bn={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,lt([t,e],ut(n)))},clearInterval:function(t){var e=bn.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},Al=function(t){Q(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),bn.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&bn.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,$e(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(xl),fi=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vn.now,t}(),Dl=function(t){Q(e,t);function e(n,r){r===void 0&&(r=fi.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(fi),wn=new Dl(Al),$l=wn,Mt=new L(function(t){return t.complete()});function hi(t){return t&&P(t.schedule)}function _n(t){return t[t.length-1]}function Tl(t){return P(_n(t))?t.pop():void 0}function Ft(t){return hi(_n(t))?t.pop():void 0}function di(t,e){return typeof _n(t)=="number"?t.pop():e}var pi=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function mi(t){return P(t==null?void 0:t.then)}function gi(t){return P(t[yn])}function yi(t){return Symbol.asyncIterator&&P(t==null?void 0:t[Symbol.asyncIterator])}function vi(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Sl(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var bi=Sl();function wi(t){return P(t==null?void 0:t[bi])}function _i(t){return ll(this,arguments,function(){var n,r,i,o;return ei(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Ct(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Ct(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ct(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function xi(t){return P(t==null?void 0:t.getReader)}function j(t){if(t instanceof L)return t;if(t!=null){if(gi(t))return Cl(t);if(pi(t))return El(t);if(mi(t))return Ml(t);if(yi(t))return Ai(t);if(wi(t))return Fl(t);if(xi(t))return Ll(t)}throw vi(t)}function Cl(t){return new L(function(e){var n=t[yn]();if(P(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function El(t){return new L(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ml(t){return new L(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,si)})}function Fl(t){return new L(function(e){var n,r;try{for(var i=St(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Ai(t){return new L(function(e){Ol(t,e).catch(function(n){return e.error(n)})})}function Ll(t){return Ai(_i(t))}function Ol(t,e){var n,r,i,o;return ul(this,void 0,void 0,function(){var a,s;return ei(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=cl(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ct(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Di(t,e){return e===void 0&&(e=0),B(function(n,r){n.subscribe(G(r,function(i){return ct(r,t,function(){return r.next(i)},e)},function(){return ct(r,t,function(){return r.complete()},e)},function(i){return ct(r,t,function(){return r.error(i)},e)}))})}function $i(t,e){return e===void 0&&(e=0),B(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Pl(t,e){return j(t).pipe($i(e),Di(e))}function Rl(t,e){return j(t).pipe($i(e),Di(e))}function Nl(t,e){return new L(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Il(t,e){return new L(function(n){var r;return ct(n,e,function(){r=t[bi](),ct(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return P(r==null?void 0:r.return)&&r.return()}})}function Ti(t,e){if(!t)throw new Error("Iterable cannot be null");return new L(function(n){ct(n,e,function(){var r=t[Symbol.asyncIterator]();ct(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function kl(t,e){return Ti(_i(t),e)}function Bl(t,e){if(t!=null){if(gi(t))return Pl(t,e);if(pi(t))return Nl(t,e);if(mi(t))return Rl(t,e);if(yi(t))return Ti(t,e);if(wi(t))return Il(t,e);if(xi(t))return kl(t,e)}throw vi(t)}function Lt(t,e){return e?Bl(t,e):j(t)}function mt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t);return Lt(t,n)}var Si=hn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Gl(t){return t instanceof Date&&!isNaN(t)}function D(t,e){return B(function(n,r){var i=0;n.subscribe(G(r,function(o){r.next(t.call(e,o,i++))}))})}var Vl=Array.isArray;function Ul(t,e){return Vl(e)?t.apply(void 0,lt([],ut(e))):t(e)}function zl(t){return D(function(e){return Ul(t,e)})}var Hl=Array.isArray,Xl=Object.getPrototypeOf,jl=Object.prototype,ql=Object.keys;function Yl(t){if(t.length===1){var e=t[0];if(Hl(e))return{args:e,keys:null};if(Wl(e)){var n=ql(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Wl(t){return t&&typeof t=="object"&&Xl(t)===jl}function Jl(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function U(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=Tl(t),i=Yl(t),o=i.args,a=i.keys;if(o.length===0)return Lt([],n);var s=new L(Kl(o,n,a?function(u){return Jl(a,u)}:Et));return r?s.pipe(zl(r)):s}function Kl(t,e,n){return n===void 0&&(n=Et),function(r){Ci(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(f){Ci(e,function(){var c=Lt(t[f],e),h=!1;c.subscribe(G(r,function(d){o[f]=d,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Ci(t,e,n){t?ct(n,t,e):e()}function Zl(t,e,n,r,i,o,a,s){var u=[],l=0,f=0,c=!1,h=function(){c&&!u.length&&!l&&e.complete()},d=function(g){return l<r?p(g):u.push(g)},p=function(g){l++;var _=!1;j(n(g,f++)).subscribe(G(e,function(x){e.next(x)},function(){_=!0},void 0,function(){if(_)try{l--;for(var x=function(){var A=u.shift();a||p(A)};u.length&&l<r;)x();h()}catch(A){e.error(A)}}))};return t.subscribe(G(e,d,function(){c=!0,h()})),function(){}}function Ei(t,e,n){return n===void 0&&(n=1/0),P(e)?Ei(function(r,i){return D(function(o,a){return e(r,o,i,a)})(j(t(r,i)))},n):(typeof e=="number"&&(n=e),B(function(r,i){return Zl(r,i,t,n)}))}function xn(t){return t===void 0&&(t=1/0),Ei(Et,t)}function Ql(){return xn(1)}function Mi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ql()(Lt(t,Ft(t)))}function tc(t){return new L(function(e){j(t()).subscribe(e)})}function Fi(t,e,n){return tc(function(){return t()?e:n})}function ec(t,e,n){n===void 0&&(n=$l);var r=-1;return e!=null&&(hi(e)?n=e:r=e),new L(function(i){var o=Gl(t)?+t-n.now():t;o<0&&(o=0);var a=0;return n.schedule(function(){i.closed||(i.next(a++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function nc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=di(t,1/0),i=t;return i.length?i.length===1?j(i[0]):xn(r)(Lt(i,n)):Mt}var rc=Array.isArray;function ic(t){return t.length===1&&rc(t[0])?t[0]:t}function Li(t,e){return B(function(n,r){var i=0;n.subscribe(G(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function Yt(t){return B(function(e,n){var r=null,i=!1,o;r=e.subscribe(G(n,void 0,void 0,function(a){o=j(t(a,Yt(t)(e))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function oc(t,e){return e===void 0&&(e=wn),B(function(n,r){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var l=o;o=null,r.next(l)}};function u(){var l=a+t,f=e.now();if(f<l){i=this.schedule(void 0,l-f),r.add(i);return}s()}n.subscribe(G(r,function(l){o=l,a=e.now(),i||(i=e.schedule(u,t),r.add(i))},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function ac(t){return B(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function sc(t){return t<=0?function(){return Mt}:B(function(e,n){var r=0;e.subscribe(G(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=Et),t=t??uc,B(function(n,r){var i,o=!0;n.subscribe(G(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function uc(t,e){return t===e}function lc(t){return t===void 0&&(t=cc),B(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function cc(){return new Si}function fc(t,e){var n=arguments.length>=2;return function(r){return r.pipe(Et,sc(1),n?ac(e):lc(function(){return new Si}))}}function hc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=di(t,1/0);return t=ic(t),B(function(i,o){xn(r)(Lt(lt([i],ut(t)),n)).subscribe(o)})}function dc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return hc.apply(void 0,lt([],ut(t)))}function An(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new O}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(l){var f,c,h,d=0,p=!1,g=!1,_=function(){c==null||c.unsubscribe(),c=void 0},x=function(){_(),f=h=void 0,p=g=!1},A=function(){var $=f;x(),$==null||$.unsubscribe()};return B(function($,T){d++,!g&&!p&&_();var S=h=h??n();T.add(function(){d--,d===0&&!g&&!p&&(c=Dn(A,u))}),S.subscribe(T),!f&&d>0&&(f=new qt({next:function(k){return S.next(k)},error:function(k){g=!0,_(),c=Dn(x,i,k),S.error(k)},complete:function(){p=!0,_(),c=Dn(x,a),S.complete()}}),j($).subscribe(f))})(l)}}function Dn(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new qt({next:function(){i.unsubscribe(),t()}});return j(e.apply(void 0,lt([],ut(n)))).subscribe(i)}}function w(t,e,n){var r,i=!1;return r=t,An({connector:function(){return new _l(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function $n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t);return B(function(r,i){(n?Mi(t,r,n):Mi(t,r)).subscribe(i)})}function R(t,e){return B(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(G(r,function(u){i==null||i.unsubscribe();var l=0,f=o++;j(t(u,f)).subscribe(i=G(r,function(c){return r.next(e?e(u,c,f,l++):c)},function(){i=null,s()}))},function(){a=!0,s()}))})}function E(t){return B(function(e,n){j(t).subscribe(G(n,function(){return n.complete()},pn)),!n.closed&&e.subscribe(n)})}function pc(t,e){return B(function(n,r){var i=e??{},o=i.leading,a=o===void 0?!0:o,s=i.trailing,u=s===void 0?!1:s,l=!1,f=null,c=null,h=!1,d=function(){c==null||c.unsubscribe(),c=null,u&&(_(),h&&r.complete())},p=function(){c=null,h&&r.complete()},g=function(x){return c=j(t(x)).subscribe(G(r,d,p))},_=function(){if(l){l=!1;var x=f;f=null,r.next(x),!h&&g(x)}};n.subscribe(G(r,function(x){l=!0,f=x,!(c&&!c.closed)&&(a?_():g(x))},function(){h=!0,!(u&&l&&c&&!c.closed)&&r.complete()}))})}function mc(t,e,n){e===void 0&&(e=wn);var r=ec(t,e);return pc(function(){return r},n)}function Oi(t){return new L(e=>{const n=new ResizeObserver(r=>{const i=r[0];i&&i.contentRect&&e.next(i.contentRect)});return n.observe(t),function(){n.unobserve(t)}})}const Wt=({datumList$:t,fullChartParams$:e,event$:n})=>{const r=new O,i=e.pipe(E(r),D(c=>({id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:c.highlightDefault})),tt()),o=n.pipe(E(r),Li(c=>c.eventName==="mouseover"),D(c=>c.datum?{id:c.datum.id,seriesLabel:c.datum.seriesLabel,groupLabel:c.datum.groupLabel,categoryLabel:c.datum.categoryLabel,highlightDefault:null}:{id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:null})),a=n.pipe(E(r),Li(c=>c.eventName==="mouseout"),R(c=>i));function s(c,h){const d=c.find(p=>p.id===h);return d?[d]:[]}function u(c,h){return h==null?[]:c.filter(d=>d.seriesLabel===h)}function l(c,h){return h==null?[]:c.filter(d=>d.groupLabel===h)}function f(c,h){return h==null?[]:c.filter(d=>d.categoryLabel===h)}return new L(c=>(U({target:nc(o,a,i),datumList:t,fullChartParams:e}).pipe(E(r),R(async h=>h)).subscribe(h=>{let d=[];h.fullChartParams.highlightTarget==="datum"?d=s(h.datumList,h.target.id):h.fullChartParams.highlightTarget==="series"?d=u(h.datumList,h.target.seriesLabel):h.fullChartParams.highlightTarget==="group"?d=l(h.datumList,h.target.groupLabel):h.fullChartParams.highlightTarget==="category"&&(d=f(h.datumList,h.target.categoryLabel)),c.next(d)}),function(){r.next(void 0)}))},Ce=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.seriesLabel)??[];i.push(r),n.set(r.seriesLabel,i)}),n})),Tn=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.groupLabel)??[];i.push(r),n.set(r.groupLabel,i)}),n})),Pi=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.filter(r=>r.categoryLabel!=null).forEach(r=>{const i=n.get(r.categoryLabel)??[];i.push(r),n.set(r.categoryLabel,i)}),n})),Jt=t=>t.pipe(D(e=>e.styles.textSize),tt(),D(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),Ri=({fullDataFormatter$:t})=>t.pipe(D(e=>e.separateSeries),tt()),Ni=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),tt((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Sn=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible!=!1)))),Ii=({computedData$:t,fullDataFormatter$:e})=>U({computedData:t,fullDataFormatter:e}).pipe(R(async n=>n),D(n=>{const r=n.fullDataFormatter.sumSeries==!0?n.computedData.map(i=>[i.reduce((o,a)=>o==null?a:(o.value=o.value+a.value,o),null)]):n.computedData;return n.fullDataFormatter.separateSeries==!0?r.map(i=>i.sort((o,a)=>o.seq-a.seq)):[r.flat().sort((i,o)=>i.seq-o.seq)]})),ki=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async i=>i),D(i=>i.fullDataFormatter.separateSeries?cn(i.layout,i.fullDataFormatter.container,i.computedData.length):cn(i.layout,i.fullDataFormatter.container,1))),Bi=({seriesContainerPosition$:t,seriesLabels$:e,separateSeries$:n})=>U({seriesContainerPosition:t,seriesLabels:e,separateSeries:n}).pipe(R(async r=>r),D(r=>r.separateSeries?new Map(r.seriesLabels.map((i,o)=>[i,r.seriesContainerPosition[o]??r.seriesContainerPosition[0]])):new Map(r.seriesLabels.map((i,o)=>[i,r.seriesContainerPosition[0]])))),gc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Ri({fullDataFormatter$:e.fullDataFormatter$}),i=Sn({computedData$:e.computedData$}),o=Ii({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(w(1)),a=Sn({computedData$:o}),s=e.computedData$.pipe(D(d=>d.flat())).pipe(w(1)),u=Wt({datumList$:s,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),l=Ni({computedData$:e.computedData$}),f=Ce({datumList$:s}).pipe(w(1)),c=ki({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),h=Bi({seriesContainerPosition$:c,seriesLabels$:l,separateSeries$:r}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,visibleComputedData$:i,visibleComputedLayoutData$:a,separateSeries$:r,computedLayoutData$:o,seriesHighlight$:u,seriesLabels$:l,SeriesDataMap$:f,seriesContainerPosition$:c,SeriesContainerPositionMap$:h}},gt=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=J.scaleDomain,scaleRange:i=J.scaleRange})=>{const o=r[0]??J.scaleDomain[0],a=r[1]??J.scaleDomain[1],s=i[0]??J.scaleRange[0],u=i[1]??J.scaleRange[1];let l=o==="auto"?e<0?e:0:o==="min"?e:o,f=a==="auto"?t>=0?t:0:a==="max"?t:a;const c=t-(t-l)/(1-s),h=f/u;return Yr().domain([c,h]).range([0,n])},yc=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return ju().domain(t).range(r).padding(n)},vc=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((u,l)=>l);r&&i.reverse();const o=i.length-1+n*2,a=e/o,s=a*n-a*.5;return Wr().domain([s,e-s]).range(i)},Cn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{function r(o,a,s){const u=a.grid.groupAxis.position==="top"||a.grid.groupAxis.position==="bottom"?s.width:s.height,l=o[0]?o[0].length-1:0;return gt({maxValue:l,minValue:0,axisWidth:u,scaleDomain:[0,l],scaleRange:[0,1]})}function i(o,a,s){const u=a.grid.valueAxis.position==="left"||a.grid.valueAxis.position==="right"?s.height:s.width,l=o.flat(),[f,c]=Ae(l);return gt({maxValue:c,minValue:f,axisWidth:u,scaleDomain:[f,c],scaleRange:[0,1]})}return U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async o=>o),D(o=>{const a=r(o.computedData,o.fullDataFormatter,o.layout),s=i(o.computedData,o.fullDataFormatter,o.layout),u=s(0);return o.computedData.map((l,f)=>l.map((c,h)=>{const d=a(h),p=s(c.value??0);return{...c,axisX:d,axisY:p,axisYFromZero:p-u}}))}))},En=({fullDataFormatter$:t,layout$:e})=>{const n=new O;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,l=0,f=0,c=0,h=0;return i.position==="bottom"?o.position==="left"?(c=180,l=s):o.position==="right"?(c=180,h=180,u=a,l=s):(c=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(c=180,l=s)):i.position==="left"?o.position==="bottom"?(f=-90,l=s):o.position==="top"?(f=-90,h=180):(c=180,l=s):i.position==="right"?o.position==="bottom"?(f=-90,c=180,l=s,u=a):o.position==="top"?(f=-90,c=180,h=180,u=a):(c=180,l=s):(c=180,l=s),{translate:[u,l],scale:[1,1],rotate:f,rotateX:c,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${f}deg) rotateX(${c}deg) rotateY(${h}deg)`}}return new L(i=>(U({fullDataFormatter:t,layout:e}).pipe(E(n),R(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},Mn=({gridAxesTransform$:t})=>t.pipe(D(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}})),Fn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{const r=new O;function i({data:o,groupAxis:a,valueAxis:s,width:u,height:l}){let f=0,c=0,h=0,d=0;const p=a.position==="top"||a.position==="bottom"?u:l,g=0,_=o[0]?o[0].length-1:0,x=a.scaleDomain[0]-a.scalePadding,A=a.scaleDomain[1]==="max"?_+a.scalePadding:a.scaleDomain[1]+a.scalePadding,$=gt({maxValue:_,minValue:g,axisWidth:p,scaleDomain:[x,A],scaleRange:[0,1]}),T=$(g),S=$(_);g==_?(f=0,h=1):(f=T,h=(S-T)/p);const k=o.map((V,it)=>V.filter((wt,et)=>et>=x&&et<=A&&wt.visible==!0)),N=ln(k);N[0]===N[1]&&(N[0]=N[1]-1);const I=s.position==="left"||s.position==="right"?l:u,v=gt({maxValue:N[1],minValue:N[0],axisWidth:I,scaleDomain:s.scaleDomain,scaleRange:s.scaleRange}),b=ln(o);b[0]===b[1]&&(b[0]=b[1]-1);const y=v(b[0]),C=v(b[1]);return c=y,d=(C-y)/I,{translate:[f,c],scale:[h,d],rotate:0,rotateX:0,rotateY:0,value:`translate(${f}px, ${c}px) scale(${h}, ${d})`}}return new L(o=>(U({computedData:t,fullDataFormatter:e,layout:n}).pipe(E(r),R(async a=>a)).subscribe(a=>{const s=i({data:a.computedData,groupAxis:a.fullDataFormatter.grid.groupAxis,valueAxis:a.fullDataFormatter.grid.valueAxis,width:a.layout.width,height:a.layout.height});o.next(s)}),function(){r.next(void 0)}))},Ln=({gridContainerPosition$:t,gridAxesTransform$:e,gridGraphicTransform$:n})=>U({gridContainerPosition:t,gridAxesTransform:e,gridGraphicTransform:n}).pipe(R(async r=>r),D(r=>r.gridAxesTransform.rotate==0||r.gridAxesTransform.rotate==180?r.gridContainerPosition.map((i,o)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[o].scale[0],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[o].scale[1]]):r.gridContainerPosition.map((i,o)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[o].scale[1],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[o].scale[0]]))),On=({fullDataFormatter$:t,layout$:e})=>{const n=new O;function r({xAxisPosition:i,yAxisPosition:o,width:a,height:s}){return(i==="bottom"||i==="top")&&(o==="left"||o==="right")?{width:a,height:s}:(i==="left"||i==="right")&&(o==="bottom"||o==="top")?{width:s,height:a}:{width:a,height:s}}return new L(i=>{U({fullDataFormatter:t,layout:e}).pipe(E(n),R(async o=>o)).subscribe(o=>{const a=r({xAxisPosition:o.fullDataFormatter.grid.groupAxis.position,yAxisPosition:o.fullDataFormatter.grid.valueAxis.position,width:o.layout.width,height:o.layout.height});return i.next(a),function(){n.next(void 0)}})})},Pn=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),tt((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Rn=({computedData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Nn=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Gi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async i=>i),D(i=>{if(i.fullDataFormatter.grid.separateSeries)return De(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=De(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),In=({isSeriesSeprate$:t,computedData$:e})=>{const n=e.pipe(D(r=>{const i=new Array(r[0]?r[0].length:0).fill(null).map((a,s)=>r.reduce((u,l)=>{if(l&&l[s]){const f=l[s].value==null||l[s].visible==!1?0:l[s].value;return u+f}return u},0));return r.map((a,s)=>a.map((u,l)=>({...u,value:i[l]})))}));return t.pipe(R(r=>Fi(()=>r,e,n)))},Vi=({fullDataFormatter$:t,computedData$:e,layout$:n,fullChartParams$:r,event$:i})=>{const o=new O,a=Wt({datumList$:e.pipe(D(u=>u.flat().flat()),w(1)),fullChartParams$:r,event$:i}).pipe(w(1)),s=kn({computedData$:e,fullDataFormatter$:t,layout$:n}).pipe(w(1));return U({fullDataFormatter:t,computedData:e,multiGridContainer:s}).pipe(R(async u=>u),D(u=>{o.next(void 0);const l=u.fullDataFormatter.gridList[0]??Pt;return u.computedData.map((f,c)=>{const h=u.fullDataFormatter.gridList[c]??l,d={type:"grid",visibleFilter:u.fullDataFormatter.visibleFilter,grid:{...h},container:{...u.fullDataFormatter.container}},p=mt(d).pipe(E(o),w(1)),g=mt(f).pipe(E(o),w(1)),_=p.pipe(D(it=>it.grid.separateSeries),tt(),w(1)),x=mt(u.multiGridContainer[c]).pipe(E(o),w(1)),A=En({fullDataFormatter$:p,layout$:n}).pipe(E(o),w(1)),$=Mn({gridAxesTransform$:A}).pipe(E(o),w(1)),T=Fn({computedData$:g,fullDataFormatter$:p,layout$:n}).pipe(E(o),w(1)),S=Ln({gridContainerPosition$:x,gridAxesTransform$:A,gridGraphicTransform$:T}),k=On({fullDataFormatter$:p,layout$:n}).pipe(E(o),w(1)),N=g.pipe(D(it=>it.flat())).pipe(E(o),w(1)),I=Pn({computedData$:g}).pipe(E(o),w(1)),v=Ce({datumList$:N}).pipe(E(o),w(1)),b=Tn({datumList$:N}).pipe(E(o),w(1)),y=Rn({computedData$:g}).pipe(E(o),w(1)),C=Cn({computedData$:g,fullDataFormatter$:p,layout$:n}).pipe(E(o),w(1)),F=Nn({computedLayoutData$:C}).pipe(E(o),w(1)),V=In({computedData$:g,isSeriesSeprate$:_}).pipe(w(1));return{isSeriesSeprate$:_,gridContainerPosition$:x,gridAxesTransform$:A,gridAxesReverseTransform$:$,gridGraphicTransform$:T,gridGraphicReverseScale$:S,gridAxesSize$:k,gridHighlight$:a,seriesLabels$:I,SeriesDataMap$:v,GroupDataMap$:b,dataFormatter$:p,computedData$:g,computedLayoutData$:C,visibleComputedData$:y,visibleComputedLayoutData$:F,computedStackedData$:V}})}))},kn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async r=>r),D(r=>{const i=r.fullDataFormatter.gridList[0]??Pt,o=r.computedData.reduce((l,f,c)=>{const d=(r.fullDataFormatter.gridList[c]??i).separateSeries?f.length:r.fullDataFormatter.separateGrid?1:0;return l+d},0)||1,a=De(r.layout,r.fullDataFormatter.container,o);let s=0;return r.computedData.map((l,f)=>{const c=r.fullDataFormatter.gridList[f]??i,h=l.map((d,p)=>{const g=a[s];return c.separateSeries&&(s+=1),g});return!c.separateSeries&&r.fullDataFormatter.separateGrid&&(s+=1),h})})),Ui=({computedData$:t})=>t.pipe(D(e=>{function n(r,i){return r.push(i),i.children&&i.children.forEach(o=>{r=n(r,o)}),r}return n([],e)})),zi=({nodeList$:t,fullDataFormatter$:e})=>{const n=e.pipe(D(r=>r.categoryLabels),tt((r,i)=>JSON.stringify(r).length===JSON.stringify(i).length));return U({nodeList:t,categoryLabels:n}).pipe(R(async r=>r),D(r=>{const i=new Set(r.categoryLabels),o=new Set(r.nodeList.filter(a=>a.visible).map(a=>a.categoryLabel));return Array.from(o).forEach(a=>{i.has(a)||i.add(a)}),Array.from(i).forEach(a=>{o.has(a)||o.delete(a)}),Array.from(i)}),tt((r,i)=>JSON.stringify(r).length===JSON.stringify(i).length))},Hi=({computedData$:t})=>t.pipe(D(e=>{function n(r){return r.children&&(r.children=r.children.filter(i=>i.visible).map(i=>n(i))),r}return n(e)}));function Kt(t){return`[OrbCharts warn]: ${t.message}`}function yt({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function $e(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Xt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=St(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(P(f))try{f()}catch(g){o=g instanceof dn?g.errors:[g]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var h=St(c),d=h.next();!d.done;d=h.next()){var p=d.value;try{ii(p)}catch(g){o=o??[],g instanceof dn?o=lt(lt([],ut(o)),ut(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new dn(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ii(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&$e(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&$e(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ni=Xt.EMPTY;function ri(t){return t instanceof Xt||t&&"closed"in t&&P(t.remove)&&P(t.add)&&P(t.unsubscribe)}function ii(t){P(t)?t():t.unsubscribe()}var oi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ai={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,lt([t,e],ut(n)))},clearTimeout:function(t){var e=ai.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function si(t){ai.setTimeout(function(){throw t})}function pn(){}function Te(t){t()}var mn=function(t){Q(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ri(n)&&n.add(r)):r.destination=pl,r}return e.create=function(n,r,i){return new qt(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Xt),fl=Function.prototype.bind;function gn(t,e){return fl.call(t,e)}var hl=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Se(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Se(r)}else Se(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Se(n)}},t}(),qt=function(t){Q(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(P(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&oi.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&gn(n.next,s),error:n.error&&gn(n.error,s),complete:n.complete&&gn(n.complete,s)}):a=n}return o.destination=new hl(a),o}return e}(mn);function Se(t){si(t)}function dl(t){throw t}var pl={closed:!0,next:pn,error:dl,complete:pn},yn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Mt(t){return t}function ml(t){return t.length===0?Mt:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var L=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=yl(e)?e:new qt(e,n,r);return Te(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ui(n),new n(function(i,o){var a=new qt({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[yn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return ml(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ui(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function ui(t){var e;return(e=t??oi.Promise)!==null&&e!==void 0?e:Promise}function gl(t){return t&&P(t.next)&&P(t.error)&&P(t.complete)}function yl(t){return t&&t instanceof mn||gl(t)&&ri(t)}function vl(t){return P(t==null?void 0:t.lift)}function B(t){return function(e){if(vl(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function G(t,e,n,r,i){return new bl(t,e,n,r,i)}var bl=function(t){Q(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(f){n.error(f)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mn),wl=hn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),O=function(t){Q(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new li(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new wl},e.prototype.next=function(n){var r=this;Te(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=St(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Te(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Te(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ni:(this.currentObservers=null,s.push(n),new Xt(function(){r.currentObservers=null,$e(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new L;return n.source=this,n},e.create=function(n,r){return new li(n,r)},e}(L),li=function(t){Q(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ni},e}(O),ci=function(t){Q(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(O),vn={now:function(){return(vn.delegate||Date).now()},delegate:void 0},_l=function(t){Q(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vn);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),l=0,f=1;f<o.length&&o[f]<=u;f+=2)l=f;l&&o.splice(0,l+1)}},e}(O),xl=function(t){Q(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Xt),bn={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,lt([t,e],ut(n)))},clearInterval:function(t){var e=bn.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},Al=function(t){Q(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),bn.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&bn.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,$e(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(xl),fi=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vn.now,t}(),Dl=function(t){Q(e,t);function e(n,r){r===void 0&&(r=fi.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(fi),wn=new Dl(Al),$l=wn,Et=new L(function(t){return t.complete()});function hi(t){return t&&P(t.schedule)}function _n(t){return t[t.length-1]}function Tl(t){return P(_n(t))?t.pop():void 0}function Ft(t){return hi(_n(t))?t.pop():void 0}function di(t,e){return typeof _n(t)=="number"?t.pop():e}var pi=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function mi(t){return P(t==null?void 0:t.then)}function gi(t){return P(t[yn])}function yi(t){return Symbol.asyncIterator&&P(t==null?void 0:t[Symbol.asyncIterator])}function vi(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Sl(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var bi=Sl();function wi(t){return P(t==null?void 0:t[bi])}function _i(t){return ll(this,arguments,function(){var n,r,i,o;return ei(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Ct(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Ct(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ct(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function xi(t){return P(t==null?void 0:t.getReader)}function X(t){if(t instanceof L)return t;if(t!=null){if(gi(t))return Cl(t);if(pi(t))return Ml(t);if(mi(t))return El(t);if(yi(t))return Ai(t);if(wi(t))return Fl(t);if(xi(t))return Ll(t)}throw vi(t)}function Cl(t){return new L(function(e){var n=t[yn]();if(P(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ml(t){return new L(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function El(t){return new L(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,si)})}function Fl(t){return new L(function(e){var n,r;try{for(var i=St(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Ai(t){return new L(function(e){Ol(t,e).catch(function(n){return e.error(n)})})}function Ll(t){return Ai(_i(t))}function Ol(t,e){var n,r,i,o;return ul(this,void 0,void 0,function(){var a,s;return ei(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=cl(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ct(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Di(t,e){return e===void 0&&(e=0),B(function(n,r){n.subscribe(G(r,function(i){return ct(r,t,function(){return r.next(i)},e)},function(){return ct(r,t,function(){return r.complete()},e)},function(i){return ct(r,t,function(){return r.error(i)},e)}))})}function $i(t,e){return e===void 0&&(e=0),B(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Pl(t,e){return X(t).pipe($i(e),Di(e))}function Rl(t,e){return X(t).pipe($i(e),Di(e))}function Nl(t,e){return new L(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Il(t,e){return new L(function(n){var r;return ct(n,e,function(){r=t[bi](),ct(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return P(r==null?void 0:r.return)&&r.return()}})}function Ti(t,e){if(!t)throw new Error("Iterable cannot be null");return new L(function(n){ct(n,e,function(){var r=t[Symbol.asyncIterator]();ct(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function kl(t,e){return Ti(_i(t),e)}function Bl(t,e){if(t!=null){if(gi(t))return Pl(t,e);if(pi(t))return Nl(t,e);if(mi(t))return Rl(t,e);if(yi(t))return Ti(t,e);if(wi(t))return Il(t,e);if(xi(t))return kl(t,e)}throw vi(t)}function Lt(t,e){return e?Bl(t,e):X(t)}function mt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t);return Lt(t,n)}var Si=hn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Gl(t){return t instanceof Date&&!isNaN(t)}function D(t,e){return B(function(n,r){var i=0;n.subscribe(G(r,function(o){r.next(t.call(e,o,i++))}))})}var Vl=Array.isArray;function Ul(t,e){return Vl(e)?t.apply(void 0,lt([],ut(e))):t(e)}function zl(t){return D(function(e){return Ul(t,e)})}var Hl=Array.isArray,jl=Object.getPrototypeOf,Xl=Object.prototype,ql=Object.keys;function Yl(t){if(t.length===1){var e=t[0];if(Hl(e))return{args:e,keys:null};if(Wl(e)){var n=ql(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Wl(t){return t&&typeof t=="object"&&jl(t)===Xl}function Jl(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function U(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=Tl(t),i=Yl(t),o=i.args,a=i.keys;if(o.length===0)return Lt([],n);var s=new L(Kl(o,n,a?function(u){return Jl(a,u)}:Mt));return r?s.pipe(zl(r)):s}function Kl(t,e,n){return n===void 0&&(n=Mt),function(r){Ci(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(f){Ci(e,function(){var c=Lt(t[f],e),h=!1;c.subscribe(G(r,function(d){o[f]=d,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Ci(t,e,n){t?ct(n,t,e):e()}function Zl(t,e,n,r,i,o,a,s){var u=[],l=0,f=0,c=!1,h=function(){c&&!u.length&&!l&&e.complete()},d=function(g){return l<r?p(g):u.push(g)},p=function(g){l++;var _=!1;X(n(g,f++)).subscribe(G(e,function(x){e.next(x)},function(){_=!0},void 0,function(){if(_)try{l--;for(var x=function(){var A=u.shift();a||p(A)};u.length&&l<r;)x();h()}catch(A){e.error(A)}}))};return t.subscribe(G(e,d,function(){c=!0,h()})),function(){}}function Mi(t,e,n){return n===void 0&&(n=1/0),P(e)?Mi(function(r,i){return D(function(o,a){return e(r,o,i,a)})(X(t(r,i)))},n):(typeof e=="number"&&(n=e),B(function(r,i){return Zl(r,i,t,n)}))}function xn(t){return t===void 0&&(t=1/0),Mi(Mt,t)}function Ql(){return xn(1)}function Ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ql()(Lt(t,Ft(t)))}function tc(t){return new L(function(e){X(t()).subscribe(e)})}function Fi(t,e,n){return tc(function(){return t()?e:n})}function ec(t,e,n){n===void 0&&(n=$l);var r=-1;return e!=null&&(hi(e)?n=e:r=e),new L(function(i){var o=Gl(t)?+t-n.now():t;o<0&&(o=0);var a=0;return n.schedule(function(){i.closed||(i.next(a++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function nc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=di(t,1/0),i=t;return i.length?i.length===1?X(i[0]):xn(r)(Lt(i,n)):Et}var rc=Array.isArray;function ic(t){return t.length===1&&rc(t[0])?t[0]:t}function Li(t,e){return B(function(n,r){var i=0;n.subscribe(G(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function Yt(t){return B(function(e,n){var r=null,i=!1,o;r=e.subscribe(G(n,void 0,void 0,function(a){o=X(t(a,Yt(t)(e))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function oc(t,e){return e===void 0&&(e=wn),B(function(n,r){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var l=o;o=null,r.next(l)}};function u(){var l=a+t,f=e.now();if(f<l){i=this.schedule(void 0,l-f),r.add(i);return}s()}n.subscribe(G(r,function(l){o=l,a=e.now(),i||(i=e.schedule(u,t),r.add(i))},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function ac(t){return B(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function sc(t){return t<=0?function(){return Et}:B(function(e,n){var r=0;e.subscribe(G(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=Mt),t=t??uc,B(function(n,r){var i,o=!0;n.subscribe(G(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function uc(t,e){return t===e}function lc(t){return t===void 0&&(t=cc),B(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function cc(){return new Si}function fc(t,e){var n=arguments.length>=2;return function(r){return r.pipe(Mt,sc(1),n?ac(e):lc(function(){return new Si}))}}function hc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t),r=di(t,1/0);return t=ic(t),B(function(i,o){xn(r)(Lt(lt([i],ut(t)),n)).subscribe(o)})}function dc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return hc.apply(void 0,lt([],ut(t)))}function An(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new O}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(l){var f,c,h,d=0,p=!1,g=!1,_=function(){c==null||c.unsubscribe(),c=void 0},x=function(){_(),f=h=void 0,p=g=!1},A=function(){var $=f;x(),$==null||$.unsubscribe()};return B(function($,T){d++,!g&&!p&&_();var S=h=h??n();T.add(function(){d--,d===0&&!g&&!p&&(c=Dn(A,u))}),S.subscribe(T),!f&&d>0&&(f=new qt({next:function(k){return S.next(k)},error:function(k){g=!0,_(),c=Dn(x,i,k),S.error(k)},complete:function(){p=!0,_(),c=Dn(x,a),S.complete()}}),X($).subscribe(f))})(l)}}function Dn(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new qt({next:function(){i.unsubscribe(),t()}});return X(e.apply(void 0,lt([],ut(n)))).subscribe(i)}}function w(t,e,n){var r,i=!1;return r=t,An({connector:function(){return new _l(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function $n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ft(t);return B(function(r,i){(n?Ei(t,r,n):Ei(t,r)).subscribe(i)})}function R(t,e){return B(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(G(r,function(u){i==null||i.unsubscribe();var l=0,f=o++;X(t(u,f)).subscribe(i=G(r,function(c){return r.next(e?e(u,c,f,l++):c)},function(){i=null,s()}))},function(){a=!0,s()}))})}function M(t){return B(function(e,n){X(t).subscribe(G(n,function(){return n.complete()},pn)),!n.closed&&e.subscribe(n)})}function pc(t,e){return B(function(n,r){var i=e??{},o=i.leading,a=o===void 0?!0:o,s=i.trailing,u=s===void 0?!1:s,l=!1,f=null,c=null,h=!1,d=function(){c==null||c.unsubscribe(),c=null,u&&(_(),h&&r.complete())},p=function(){c=null,h&&r.complete()},g=function(x){return c=X(t(x)).subscribe(G(r,d,p))},_=function(){if(l){l=!1;var x=f;f=null,r.next(x),!h&&g(x)}};n.subscribe(G(r,function(x){l=!0,f=x,!(c&&!c.closed)&&(a?_():g(x))},function(){h=!0,!(u&&l&&c&&!c.closed)&&r.complete()}))})}function mc(t,e,n){e===void 0&&(e=wn);var r=ec(t,e);return pc(function(){return r},n)}function Oi(t){return new L(e=>{const n=new ResizeObserver(r=>{const i=r[0];i&&i.contentRect&&e.next(i.contentRect)});return n.observe(t),function(){n.unobserve(t)}})}const Wt=({datumList$:t,fullChartParams$:e,event$:n})=>{const r=new O,i=e.pipe(M(r),D(c=>({id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:c.highlightDefault})),tt()),o=n.pipe(M(r),Li(c=>c.eventName==="mouseover"),D(c=>c.datum?{id:c.datum.id,seriesLabel:c.datum.seriesLabel,groupLabel:c.datum.groupLabel,categoryLabel:c.datum.categoryLabel,highlightDefault:null}:{id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:null})),a=n.pipe(M(r),Li(c=>c.eventName==="mouseout"),R(c=>i));function s(c,h){const d=c.find(p=>p.id===h);return d?[d]:[]}function u(c,h){return h==null?[]:c.filter(d=>d.seriesLabel===h)}function l(c,h){return h==null?[]:c.filter(d=>d.groupLabel===h)}function f(c,h){return h==null?[]:c.filter(d=>d.categoryLabel===h)}return new L(c=>(U({target:nc(o,a,i),datumList:t,fullChartParams:e}).pipe(M(r),R(async h=>h)).subscribe(h=>{let d=[];h.fullChartParams.highlightTarget==="datum"?d=s(h.datumList,h.target.id):h.fullChartParams.highlightTarget==="series"?d=u(h.datumList,h.target.seriesLabel):h.fullChartParams.highlightTarget==="group"?d=l(h.datumList,h.target.groupLabel):h.fullChartParams.highlightTarget==="category"&&(d=f(h.datumList,h.target.categoryLabel)),c.next(d)}),function(){r.next(void 0)}))},Ce=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.seriesLabel)??[];i.push(r),n.set(r.seriesLabel,i)}),n})),Tn=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.groupLabel)??[];i.push(r),n.set(r.groupLabel,i)}),n})),Pi=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.filter(r=>r.categoryLabel!=null).forEach(r=>{const i=n.get(r.categoryLabel)??[];i.push(r),n.set(r.categoryLabel,i)}),n})),Jt=t=>t.pipe(D(e=>e.styles.textSize),tt(),D(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),Ri=({fullDataFormatter$:t})=>t.pipe(D(e=>e.separateSeries),tt()),Ni=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),tt((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Sn=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible!=!1)))),Ii=({computedData$:t,fullDataFormatter$:e})=>U({computedData:t,fullDataFormatter:e}).pipe(R(async n=>n),D(n=>{const r=n.fullDataFormatter.sumSeries==!0?n.computedData.map(i=>[i.reduce((o,a)=>o==null?a:(o.value=o.value+a.value,o),null)]):n.computedData;return n.fullDataFormatter.separateSeries==!0?r.map(i=>i.sort((o,a)=>o.seq-a.seq)):[r.flat().sort((i,o)=>i.seq-o.seq)]})),ki=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async i=>i),D(i=>i.fullDataFormatter.separateSeries?cn(i.layout,i.fullDataFormatter.container,i.computedData.length):cn(i.layout,i.fullDataFormatter.container,1))),Bi=({seriesContainerPosition$:t,seriesLabels$:e,separateSeries$:n})=>U({seriesContainerPosition:t,seriesLabels:e,separateSeries:n}).pipe(R(async r=>r),D(r=>r.separateSeries?new Map(r.seriesLabels.map((i,o)=>[i,r.seriesContainerPosition[o]??r.seriesContainerPosition[0]])):new Map(r.seriesLabels.map((i,o)=>[i,r.seriesContainerPosition[0]])))),gc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Ri({fullDataFormatter$:e.fullDataFormatter$}),i=Sn({computedData$:e.computedData$}),o=Ii({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(w(1)),a=Sn({computedData$:o}),s=e.computedData$.pipe(D(d=>d.flat())).pipe(w(1)),u=Wt({datumList$:s,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),l=Ni({computedData$:e.computedData$}),f=Ce({datumList$:s}).pipe(w(1)),c=ki({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),h=Bi({seriesContainerPosition$:c,seriesLabels$:l,separateSeries$:r}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,visibleComputedData$:i,visibleComputedLayoutData$:a,separateSeries$:r,computedLayoutData$:o,seriesHighlight$:u,seriesLabels$:l,SeriesDataMap$:f,seriesContainerPosition$:c,SeriesContainerPositionMap$:h}},gt=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=J.scaleDomain,scaleRange:i=J.scaleRange})=>{const o=r[0]??J.scaleDomain[0],a=r[1]??J.scaleDomain[1],s=i[0]??J.scaleRange[0],u=i[1]??J.scaleRange[1];let l=o==="auto"?e<0?e:0:o==="min"?e:o,f=a==="auto"?t>=0?t:0:a==="max"?t:a;const c=t-(t-l)/(1-s),h=f/u;return Yr().domain([c,h]).range([0,n])},yc=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return Xu().domain(t).range(r).padding(n)},vc=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((u,l)=>l);r&&i.reverse();const o=i.length-1+n*2,a=e/o,s=a*n-a*.5;return Wr().domain([s,e-s]).range(i)},Cn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{function r(o,a,s){const u=a.grid.groupAxis.position==="top"||a.grid.groupAxis.position==="bottom"?s.width:s.height,l=o[0]?o[0].length-1:0;return gt({maxValue:l,minValue:0,axisWidth:u,scaleDomain:[0,l],scaleRange:[0,1]})}function i(o,a,s){const u=a.grid.valueAxis.position==="left"||a.grid.valueAxis.position==="right"?s.height:s.width,l=o.flat(),[f,c]=Ae(l);return gt({maxValue:c,minValue:f,axisWidth:u,scaleDomain:[f,c],scaleRange:[0,1]})}return U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async o=>o),D(o=>{const a=r(o.computedData,o.fullDataFormatter,o.layout),s=i(o.computedData,o.fullDataFormatter,o.layout),u=s(0);return o.computedData.map((l,f)=>l.map((c,h)=>{const d=a(h),p=s(c.value??0);return{...c,axisX:d,axisY:p,axisYFromZero:p-u}}))}))},Mn=({fullDataFormatter$:t,layout$:e})=>{const n=new O;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,l=0,f=0,c=0,h=0;return i.position==="bottom"?o.position==="left"?(c=180,l=s):o.position==="right"?(c=180,h=180,u=a,l=s):(c=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(c=180,l=s)):i.position==="left"?o.position==="bottom"?(f=-90,l=s):o.position==="top"?(f=-90,h=180):(c=180,l=s):i.position==="right"?o.position==="bottom"?(f=-90,c=180,l=s,u=a):o.position==="top"?(f=-90,c=180,h=180,u=a):(c=180,l=s):(c=180,l=s),{translate:[u,l],scale:[1,1],rotate:f,rotateX:c,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${f}deg) rotateX(${c}deg) rotateY(${h}deg)`}}return new L(i=>(U({fullDataFormatter:t,layout:e}).pipe(M(n),R(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},En=({gridAxesTransform$:t})=>t.pipe(D(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}})),Fn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{const r=new O;function i({data:o,groupAxis:a,valueAxis:s,width:u,height:l}){let f=0,c=0,h=0,d=0;const p=a.position==="top"||a.position==="bottom"?u:l,g=0,_=o[0]?o[0].length-1:0,x=a.scaleDomain[0]-a.scalePadding,A=a.scaleDomain[1]==="max"?_+a.scalePadding:a.scaleDomain[1]+a.scalePadding,$=gt({maxValue:_,minValue:g,axisWidth:p,scaleDomain:[x,A],scaleRange:[0,1]}),T=$(g),S=$(_);g==_?(f=0,h=1):(f=T,h=(S-T)/p);const k=o.map((V,it)=>V.filter((wt,et)=>et>=x&&et<=A&&wt.visible==!0)),N=ln(k);N[0]===N[1]&&(N[0]=N[1]-1);const I=s.position==="left"||s.position==="right"?l:u,v=gt({maxValue:N[1],minValue:N[0],axisWidth:I,scaleDomain:s.scaleDomain,scaleRange:s.scaleRange}),b=ln(o);b[0]===b[1]&&(b[0]=b[1]-1);const y=v(b[0]),C=v(b[1]);return c=y,d=(C-y)/I,{translate:[f,c],scale:[h,d],rotate:0,rotateX:0,rotateY:0,value:`translate(${f}px, ${c}px) scale(${h}, ${d})`}}return new L(o=>(U({computedData:t,fullDataFormatter:e,layout:n}).pipe(M(r),R(async a=>a)).subscribe(a=>{const s=i({data:a.computedData,groupAxis:a.fullDataFormatter.grid.groupAxis,valueAxis:a.fullDataFormatter.grid.valueAxis,width:a.layout.width,height:a.layout.height});o.next(s)}),function(){r.next(void 0)}))},Ln=({gridContainerPosition$:t,gridAxesTransform$:e,gridGraphicTransform$:n})=>U({gridContainerPosition:t,gridAxesTransform:e,gridGraphicTransform:n}).pipe(R(async r=>r),D(r=>r.gridAxesTransform.rotate==0||r.gridAxesTransform.rotate==180?r.gridContainerPosition.map((i,o)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[o].scale[0],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[o].scale[1]]):r.gridContainerPosition.map((i,o)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[o].scale[1],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[o].scale[0]]))),On=({fullDataFormatter$:t,layout$:e})=>{const n=new O;function r({xAxisPosition:i,yAxisPosition:o,width:a,height:s}){return(i==="bottom"||i==="top")&&(o==="left"||o==="right")?{width:a,height:s}:(i==="left"||i==="right")&&(o==="bottom"||o==="top")?{width:s,height:a}:{width:a,height:s}}return new L(i=>{U({fullDataFormatter:t,layout:e}).pipe(M(n),R(async o=>o)).subscribe(o=>{const a=r({xAxisPosition:o.fullDataFormatter.grid.groupAxis.position,yAxisPosition:o.fullDataFormatter.grid.valueAxis.position,width:o.layout.width,height:o.layout.height});return i.next(a),function(){n.next(void 0)}})})},Pn=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),tt((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Rn=({computedData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Nn=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Gi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async i=>i),D(i=>{if(i.fullDataFormatter.grid.separateSeries)return De(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=De(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),In=({isSeriesSeprate$:t,computedData$:e})=>{const n=e.pipe(D(r=>{const i=new Array(r[0]?r[0].length:0).fill(null).map((a,s)=>r.reduce((u,l)=>{if(l&&l[s]){const f=l[s].value==null||l[s].visible==!1?0:l[s].value;return u+f}return u},0));return r.map((a,s)=>a.map((u,l)=>({...u,value:i[l]})))}));return t.pipe(R(r=>Fi(()=>r,e,n)))},Vi=({fullDataFormatter$:t,computedData$:e,layout$:n,fullChartParams$:r,event$:i})=>{const o=new O,a=Wt({datumList$:e.pipe(D(u=>u.flat().flat()),w(1)),fullChartParams$:r,event$:i}).pipe(w(1)),s=kn({computedData$:e,fullDataFormatter$:t,layout$:n}).pipe(w(1));return U({fullDataFormatter:t,computedData:e,multiGridContainer:s}).pipe(R(async u=>u),D(u=>{o.next(void 0);const l=u.fullDataFormatter.gridList[0]??Pt;return u.computedData.map((f,c)=>{const h=u.fullDataFormatter.gridList[c]??l,d={type:"grid",visibleFilter:u.fullDataFormatter.visibleFilter,grid:{...h},container:{...u.fullDataFormatter.container}},p=mt(d).pipe(M(o),w(1)),g=mt(f).pipe(M(o),w(1)),_=p.pipe(D(it=>it.grid.separateSeries),tt(),w(1)),x=mt(u.multiGridContainer[c]).pipe(M(o),w(1)),A=Mn({fullDataFormatter$:p,layout$:n}).pipe(M(o),w(1)),$=En({gridAxesTransform$:A}).pipe(M(o),w(1)),T=Fn({computedData$:g,fullDataFormatter$:p,layout$:n}).pipe(M(o),w(1)),S=Ln({gridContainerPosition$:x,gridAxesTransform$:A,gridGraphicTransform$:T}),k=On({fullDataFormatter$:p,layout$:n}).pipe(M(o),w(1)),N=g.pipe(D(it=>it.flat())).pipe(M(o),w(1)),I=Pn({computedData$:g}).pipe(M(o),w(1)),v=Ce({datumList$:N}).pipe(M(o),w(1)),b=Tn({datumList$:N}).pipe(M(o),w(1)),y=Rn({computedData$:g}).pipe(M(o),w(1)),C=Cn({computedData$:g,fullDataFormatter$:p,layout$:n}).pipe(M(o),w(1)),F=Nn({computedLayoutData$:C}).pipe(M(o),w(1)),V=In({computedData$:g,isSeriesSeprate$:_}).pipe(w(1));return{isSeriesSeprate$:_,gridContainerPosition$:x,gridAxesTransform$:A,gridAxesReverseTransform$:$,gridGraphicTransform$:T,gridGraphicReverseScale$:S,gridAxesSize$:k,gridHighlight$:a,seriesLabels$:I,SeriesDataMap$:v,GroupDataMap$:b,dataFormatter$:p,computedData$:g,computedLayoutData$:C,visibleComputedData$:y,visibleComputedLayoutData$:F,computedStackedData$:V}})}))},kn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>U({computedData:t,fullDataFormatter:e,layout:n}).pipe(R(async r=>r),D(r=>{const i=r.fullDataFormatter.gridList[0]??Pt,o=r.computedData.reduce((l,f,c)=>{const d=(r.fullDataFormatter.gridList[c]??i).separateSeries?f.length:r.fullDataFormatter.separateGrid?1:0;return l+d},0)||1,a=De(r.layout,r.fullDataFormatter.container,o);let s=0;return r.computedData.map((l,f)=>{const c=r.fullDataFormatter.gridList[f]??i,h=l.map((d,p)=>{const g=a[s];return c.separateSeries&&(s+=1),g});return!c.separateSeries&&r.fullDataFormatter.separateGrid&&(s+=1),h})})),Ui=({computedData$:t})=>t.pipe(D(e=>{function n(r,i){return r.push(i),i.children&&i.children.forEach(o=>{r=n(r,o)}),r}return n([],e)})),zi=({nodeList$:t,fullDataFormatter$:e})=>{const n=e.pipe(D(r=>r.categoryLabels),tt((r,i)=>JSON.stringify(r).length===JSON.stringify(i).length));return U({nodeList:t,categoryLabels:n}).pipe(R(async r=>r),D(r=>{const i=new Set(r.categoryLabels),o=new Set(r.nodeList.filter(a=>a.visible).map(a=>a.categoryLabel));return Array.from(o).forEach(a=>{i.has(a)||i.add(a)}),Array.from(i).forEach(a=>{o.has(a)||o.delete(a)}),Array.from(i)}),tt((r,i)=>JSON.stringify(r).length===JSON.stringify(i).length))},Hi=({computedData$:t})=>t.pipe(D(e=>{function n(r){return r.children&&(r.children=r.children.filter(i=>i.visible).map(i=>n(i))),r}return n(e)}));function Kt(t){return`[OrbCharts warn]: ${t.message}`}function yt({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
|
4
4
|
|
5
5
|
----> find in '${n}'`}function vt({columnName:t,expectToBe:e,from:n}){return`Value is not correct: '${t}' suppose to be '${e}', it may cause unexpected errors.'
|
6
6
|
|
7
|
-
----> find in '${n}'`}function bc(t){return t?M(t,{width:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},height:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},preset:{toBeTypes:["object"]}}):{status:"success",columnName:"",expectToBe:""}}function wc(t){return M({element:t},{element:{toBe:"Dom",test:n=>zn(n)}})}function _c(t,e){const n={series:["series","datum","none"],grid:["series","group","datum","none"],multiGrid:["series","group","datum","none"],multiValue:["category","datum","none"],relationship:["category","datum","none"],tree:["category","datum","none"],noneData:["none"]},r=M(e,{padding:{toBeTypes:["object"]},highlightTarget:{toBe:n[t].map(i=>`"${i}"`).join(" | "),test:i=>n[t].includes(i)},highlightDefault:{toBeTypes:["string","null"]},colorScheme:{toBe:'"dark" | "light"',test:i=>i==="dark"||i==="light"},colors:{toBeTypes:["object"],test:i=>i.light&&i.dark},styles:{toBeTypes:["object"]},transitionDuration:{toBeTypes:["number"]},transitionEase:{toBeTypes:["string"]}});if(e&&e.padding){const i=M(e.padding,{top:{toBeTypes:["number"]},right:{toBeTypes:["number"]},bottom:{toBeTypes:["number"]},left:{toBeTypes:["number"]}});if(i.status==="error")return i}if(e&&e.colors){const i=M(e.colors,{light:{toBeTypes:["object"]},dark:{toBeTypes:["object"]}});if(i.status==="error")return i;if(e.colors.light){const o=M(e.colors.light,{series:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(o.status==="error")return o}if(e.colors.dark){const o=M(e.colors.dark,{series:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(o.status==="error")return o}}return r}function xc(t,e){return M({pluginEntities:e},{pluginEntities:{toBe:`PluginEntity<'${t}'>[]`,test:r=>Array.isArray(r)&&r.every(i=>i.chartType===t||i.chartType==="noneData")}})}function Xi(t,e,n){const r=st(t,e);return n==="multiGrid"&&t.gridList!=null&&(r.gridList=t.gridList.map((i,o)=>{const a=e.gridList[o]||e.gridList[0];return st(i,a)})),r}const Ac=({defaultDataFormatter:t,dataFormatterValidator:e,computedDataFn:n,dataValidator:r,contextObserverCallback:i})=>{const o=new O,a=t.type;return function(u,l){try{const{status:v,columnName:b,expectToBe:y}=bc(l);if(v==="error")throw new Error(yt({columnName:b,expectToBe:y,from:"Chart.constructor"}));if(v==="warning")console.warn(vt({columnName:b,expectToBe:y,from:"Chart.constructor"}));else{const{status:C,columnName:F,expectToBe:V}=wc(u);if(C==="error")throw new Error(yt({columnName:F,expectToBe:V,from:"Chart.constructor"}));C==="warning"&&console.warn(vt({columnName:F,expectToBe:V,from:"Chart.constructor"}))}}catch(v){throw new Error(v)}ie(u).selectAll("svg").remove();const f=ie(u).append("svg");f.attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("xmls","http://www.w3.org/2000/svg").attr("version","1.1").style("position","absolute").classed("orbcharts__root",!0);const c=f.append("g");c.classed("orbcharts__layout",!0);const h=c.append("g");h.classed("orbcharts__plugins",!0);const d={data$:new O,dataFormatter$:new O,plugins$:new O,chartParams$:new O,event$:new O},p=(v=>{const b=v||at,y=b.preset?b.preset:{};return{name:y.name??"",description:y.description??"",chartParams:y.chartParams?st(y.chartParams,Fe):Fe,dataFormatter:y.dataFormatter?Xi(y.dataFormatter,t,a):t,allPluginParams:y.allPluginParams?y.allPluginParams:{}}})(l),g=d.data$.pipe(w(1)),_=d.dataFormatter$.pipe(E(o),$n({}),D(v=>{try{const{status:b,columnName:y,expectToBe:C}=e(v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.constructor"}));return b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.constructor"})),Xi(v,p.dataFormatter,a)}catch(b){throw new Error(b)}}),Yt(v=>(console.error(Kt(v)),Mt)),w(1)),x=d.chartParams$.pipe(E(o),$n({}),D(v=>{try{const{status:b,columnName:y,expectToBe:C}=_c(a,v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.constructor"}));return b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.constructor"})),st(v,p.chartParams)}catch(b){throw new Error(b)}}),Yt(v=>(console.error(Kt(v)),Mt)),w(1)),A=x.pipe(E(o),$n({}),D(v=>st(v.padding??{},Me)));A.pipe(E(o),fc()).subscribe(v=>{c.attr("transform",`translate(${v.left}, ${v.top})`)}),A.subscribe(v=>{c.transition().attr("transform",`translate(${v.left}, ${v.top})`)});const $=mt({width:(l==null?void 0:l.width)??at.width,height:(l==null?void 0:l.height)??at.height}).pipe(R(v=>Fi(()=>v.width==="auto"||v.height==="auto",Oi(u).pipe(D(b=>({width:v.width==="auto"?b.width:v.width,height:v.height==="auto"?b.height:v.height}))),mt(v))),E(o),An()),T=mt().pipe(dc($.pipe(oc(250)),$.pipe(mc(250))),tt((v,b)=>JSON.stringify(v)===JSON.stringify(b)),An()),S=T.subscribe(),k=U({rootSize:T,mergedPadding:A}).pipe(E(o),R(async v=>{const b=v.rootSize.width>0?v.rootSize.width:Bn,y=v.rootSize.height>0?v.rootSize.height:Gn;return{width:b-v.mergedPadding.left-v.mergedPadding.right,height:y-v.mergedPadding.top-v.mergedPadding.bottom,top:v.mergedPadding.top,right:v.mergedPadding.right,bottom:v.mergedPadding.bottom,left:v.mergedPadding.left,rootWidth:b,rootHeight:y}}),w(1));k.subscribe(v=>{f.attr("width",v.rootWidth).attr("height",v.rootHeight)});const N=U({data:g,dataFormatter:_,chartParams:x}).pipe(E(o),R(async v=>v),R(v=>mt(v).pipe(D(b=>{try{const{status:y,columnName:C,expectToBe:F}=r(b.data);if(y==="error")throw new Error(yt({columnName:C,expectToBe:F,from:"Chart.constructor"}));return y==="warning"&&console.warn(vt({columnName:C,expectToBe:F,from:"Chart.constructor"})),n({data:b.data,dataFormatter:b.dataFormatter,chartParams:b.chartParams})}catch(y){throw new Error(y)}}),Yt(b=>(console.error(Kt(b)),Mt)))),w(1));N.subscribe();const I={};return d.plugins$.subscribe(v=>{try{const{status:b,columnName:y,expectToBe:C}=xc(a,v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.plugins$"}));b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.plugins$"}))}catch(b){throw new Error(b)}h.selectAll("g.orbcharts__plugin").data(v,b=>b.name).join(b=>b.append("g").attr("class",y=>`orbcharts__plugin orbcharts__${y.name}`).each((y,C,F)=>{const V={fullParams$:new L,fullChartParams$:x,fullDataFormatter$:_,computedData$:N,layout$:k},it=i({observer:V,subject:d}),et={selection:ie(F[C]),rootSelection:f,name:y.name,chartType:a,subject:d,observer:it};y.setPresetParams(p.allPluginParams[y.name]??{}),y.setContext(et),I[et.name]=y,y.init()}),b=>b,b=>b.each((y,C,F)=>{I[y.name]&&(I[y.name].destroy(),I[y.name]=void 0)}).remove()).sort((b,y)=>b.layerIndex-y.layerIndex)}),{...d,selection:f,destroy(){ie(u).selectAll("svg").remove(),o.next(void 0),S.unsubscribe()}}}};class Ot{constructor({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:o},a,s){this.data$=new O,this.dataFormatter$=new O,this.plugins$=new O,this.chartParams$=new O,this.event$=new O;try{const l=Ac({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:o})(a,s);this.selection=l.selection,this.destroy=l.destroy,this.data$=l.data$,this.dataFormatter$=l.dataFormatter$,this.plugins$=l.plugins$,this.chartParams$=l.chartParams$,this.event$=l.event$}catch(u){console.error(Kt(u))}}}class Dc extends Ot{constructor(e,n){super({defaultDataFormatter:Le,dataFormatterValidator:eo,computedDataFn:al,dataValidator:sl,contextObserverCallback:gc},e,n)}}const $c=t=>{const e=M(t,{visibleFilter:{toBeTypes:["Function"]},grid:{toBeTypes:["object"]},container:{toBeTypes:["object"]}});if(t.grid){const n=M(t.grid,{seriesDirection:{toBe:'"row" | "column"',test:r=>r==="row"||r==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(n.status==="error")return n;if(t.grid.valueAxis){const r=M(t.grid.valueAxis,{position:{toBe:'"left" | "right"',test:i=>i==="left"||i==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:i=>Array.isArray(i)&&i.length===2&&(typeof i[0]=="number"||i[0]==="min"||i[0]==="auto")&&(typeof i[1]=="number"||i[1]==="max"||i[1]==="auto")},scaleRange:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.grid.groupAxis){const r=M(t.grid.groupAxis,{position:{toBe:'"top" | "bottom"',test:i=>i==="top"||i==="bottom"},scaleDomain:{toBe:'[number, number | "max"]',test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&(typeof i[1]=="number"||i[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(r.status==="error")return r}}if(t.container){const n=M(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function ji(t,e){if(!t.length)return[];try{const n=t.reduce((a,s)=>s.length>a?s.length:a,0),i=t.map((a,s)=>{if(a.length===n)return a;const u=Object.assign([],a);for(let l=u.length;l<n;l++)u[l]=null;return u}).map((a,s)=>a.map((u,l)=>u==null?{id:"",label:"",data:{},value:null}:typeof u=="number"?{id:"",label:"",data:{},value:u}:{id:u.id??"",label:u.label??"",data:u.data??{},value:u.value}));return Qr(e.seriesDirection,i)}catch{return[]}}const Tc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i;try{const o=ji(e,n.grid),a=un({transposedDataGrid:o,dataFormatterGrid:n.grid,chartType:"grid"}),s=Kr({transposedDataGrid:o,dataFormatterGrid:n.grid,chartType:"grid"});let u=0;i=o.map((l,f)=>l.map((c,h)=>{const d=Ht("grid",0,f,h),p=s[h],g={id:c.id?c.id:d,index:u,label:c.label?c.label:d,description:c.description??"",data:c.data,value:c.value,gridIndex:0,seriesIndex:f,seriesLabel:a[f],groupIndex:h,groupLabel:p,color:Xt(f,r),visible:!0};return g.visible=n.visibleFilter(g,t),u++,g}))}catch(o){throw Error(o)}return i},Sc=t=>M({data:t},{data:{toBe:"(DataGridDatum | DataGridValue)[][]",test:n=>Array.isArray(n)}}),Cc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=e.fullDataFormatter$.pipe(D($=>$.grid.separateSeries),tt(),w(1)),i=Gi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),o=En({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),a=Mn({gridAxesTransform$:o}).pipe(w(1)),s=Fn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),u=Ln({gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:s}),l=On({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),f=e.computedData$.pipe(D($=>$.flat())).pipe(w(1)),c=Wt({datumList$:f,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),h=Pn({computedData$:e.computedData$}),d=Ce({datumList$:f}).pipe(w(1)),p=Tn({datumList$:f}).pipe(w(1)),g=Cn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),_=Rn({computedData$:e.computedData$}).pipe(w(1)),x=Nn({computedLayoutData$:g}).pipe(w(1)),A=In({computedData$:e.computedData$,isSeriesSeprate$:r}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isSeriesSeprate$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridAxesReverseTransform$:a,gridGraphicTransform$:s,gridGraphicReverseScale$:u,gridAxesSize$:l,gridHighlight$:c,seriesLabels$:h,SeriesDataMap$:d,GroupDataMap$:p,computedLayoutData$:g,visibleComputedData$:_,visibleComputedLayoutData$:x,computedStackedData$:A}};class Ec extends Ot{constructor(e,n){super({defaultDataFormatter:Pe,dataFormatterValidator:$c,computedDataFn:Tc,dataValidator:Sc,contextObserverCallback:Cc},e,n)}}const Mc=t=>{const e=M(t,{visibleFilter:{toBeTypes:["Function"]},gridList:{toBeTypes:["object[]"]},container:{toBeTypes:["object"]},separateGrid:{toBeTypes:["boolean"]}});if(t.gridList){const r=t.gridList.map((i,o)=>{const a=M(i,{seriesDirection:{toBe:'"row" | "column"',test:s=>s==="row"||s==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(a.status==="error")return a;if(i.valueAxis){const s=M(i.valueAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:u=>u==="top"||u==="bottom"||u==="left"||u==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:u=>Array.isArray(u)&&u.length===2&&(typeof u[0]=="number"||u[0]==="min"||u[0]==="auto")&&(typeof u[1]=="number"||u[1]==="max"||u[1]==="auto")},scaleRange:{toBe:"[number, number]",test:u=>Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"},label:{toBeTypes:["string"]}});if(s.status==="error")return s}else if(i.groupAxis){const s=M(i.groupAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:u=>u==="top"||u==="bottom"||u==="left"||u==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:u=>Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&(typeof u[1]=="number"||u[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(s.status==="error")return s}return{status:"success",columnName:"",expectToBe:""}}).find(i=>i.status==="error");if(r.status==="error")return r}if(t.container){const n=M(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e},Fc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const o=n.gridList[0]||Pt,a=e.map((c,h)=>n.gridList[h]||o),s=e.map((c,h)=>ji(c,a[h])),u=n.separateGrid?s.map((c,h)=>un({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid"})):s.map((c,h)=>Jr({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid",gridIndex:h})),l=new Map;let f=0;u.flat().forEach((c,h)=>{if(!l.has(c)){const d=Xt(f,r);l.set(c,d),f++}}),i=s.map((c,h)=>{const d=u[h],p=Zr({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid",gridIndex:h});let g=0;return c.map((x,A)=>x.map(($,T)=>{const S=Ht("multiGrid",h,A,T),k=p[T],N=d[A],I={id:$.id?$.id:S,index:g,label:$.label?$.label:S,description:$.description??"",data:$.data,value:$.value,gridIndex:h,seriesIndex:A,seriesLabel:N,groupIndex:T,groupLabel:k,color:l.get(N),visible:!0};return I.visible=n.visibleFilter(I,t),g++,I}))})}catch(o){throw Error(o)}return i},Lc=t=>M({data:t},{data:{toBe:"DataGrid[]",test:n=>Array.isArray(n)}}),Oc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Vi({fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),i=kn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,multiGridContainerPosition$:i,multiGridEachDetail$:r}};class Pc extends Ot{constructor(e,n){super({defaultDataFormatter:Re,dataFormatterValidator:Mc,computedDataFn:Fc,dataValidator:Lc,contextObserverCallback:Oc},e,n)}}const Rc=t=>({status:"success",columnName:"",expectToBe:""}),Nc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;if(!e.length)return[];const i={width:1e3,height:1e3};let o=[];try{const a=e.map((A,$)=>A.map((T,S)=>typeof T=="number"?{id:"",label:"",description:"",data:{},categoryLabel:"",value:T}:{id:T.id??"",label:T.label??"",description:T.description??"",data:T.data??{},categoryLabel:T.categoryLabel??"",value:T.value})),[s,u]=Ae(a.map(A=>A[0])),[l,f]=Ae(a.map(A=>A[1])),c=n.xAxis.position==="top"||n.xAxis.position==="bottom"?i.width:i.height,h=n.yAxis.position==="left"||n.yAxis.position==="right"?i.height:i.width,d=gt({maxValue:u,minValue:s,axisWidth:c,scaleDomain:[s,u],scaleRange:[0,1]}),p=gt({maxValue:f,minValue:l,axisWidth:h,scaleDomain:[l,f],scaleRange:[0,1]}),g=[n.xAxis.scaleDomain[0]==="auto"?s<0?s:0:n.xAxis.scaleDomain[0]==="min"?s:n.xAxis.scaleDomain[0],n.xAxis.scaleDomain[1]==="auto"?u>=0?u:0:n.xAxis.scaleDomain[1]==="max"?u:n.xAxis.scaleDomain[1]],_=[n.yAxis.scaleDomain[0]==="auto"?s<0?s:0:n.yAxis.scaleDomain[0]==="min"?s:n.yAxis.scaleDomain[0],n.yAxis.scaleDomain[1]==="auto"?u>=0?u:0:n.yAxis.scaleDomain[1]==="max"?u:n.yAxis.scaleDomain[1]];let x=0;o=a.map((A,$)=>A.map((T,S)=>{const k=x;x++;const N=Ht(n.type,$,S),I={id:T.id?T.id:N,index:k,label:T.label?T.label:N,description:T.description??"",data:T.data,value:T.value,categoryIndex:0,categoryLabel:"",axis:S==0?d(T.value):p(T.value),visible:!0,color:""};return I.visible=n.visibleFilter(I,t),I}))}catch(a){throw Error(a)}return o},Ic=t=>({status:"success",columnName:"",expectToBe:""}),kc=({subject:t,observer:e})=>({fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$});class Bc extends Ot{constructor(e,n){super({defaultDataFormatter:Ne,dataFormatterValidator:Rc,computedDataFn:Nc,dataValidator:Ic,contextObserverCallback:kc},e,n)}}const Gc=t=>({status:"success",columnName:"",expectToBe:""}),Vc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;let i=[],o=[];try{let a=[],s=[];if(e.nodes)a=e.nodes,s=e.edges;else if(e[0])a=e[0],s=e[1];else return{nodes:[],edges:[]};i=a.map((c,h)=>({id:c.id,index:h,label:c.label??"",description:c.description??"",data:c.data??{},value:c.value??0,categoryIndex:0,categoryLabel:"",color:"",startNodes:[],startNodeIds:[],endNodes:[],endNodeIds:[],visible:!0}));const u=new Map(i.map(c=>[c.id,c]));o=s.map((c,h)=>({id:c.id,index:h,label:c.label??"",description:c.description??"",data:c.data??{},value:c.value??0,startNode:u.get(c.start),startNodeId:c.start,endNode:u.get(c.end),endNodeId:c.end,visible:!0}));const l=function(){const c=new Map;return o.forEach(h=>{const d=c.get(h.endNodeId)??[];d.push(h.startNode),c.set(h.endNodeId,d)}),c}(),f=function(){const c=new Map;return o.forEach(h=>{const d=c.get(h.startNodeId)??[];d.push(h.endNode),c.set(h.startNodeId,d)}),c}();Array.from(u).forEach(([c,h])=>{h.startNodes=l.get(c),h.startNodeIds=h.startNodes.map(d=>d.id),h.endNodes=f.get(c),h.endNodeIds=h.endNodes.map(d=>d.id),h.visible=n.visibleFilter(h,t)}),o=o.map(c=>(c.visible=!!(c.startNode.visible&&c.endNode.visible),c))}catch(a){throw Error(a)}return{nodes:i,edges:o}},Uc=t=>({status:"success",columnName:"",expectToBe:""}),zc=({subject:t,observer:e})=>({fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$});class Hc extends Ot{constructor(e,n){super({defaultDataFormatter:ke,dataFormatterValidator:Gc,computedDataFn:Vc,dataValidator:Uc,contextObserverCallback:zc},e,n)}}const Xc=t=>M(t,{visibleFilter:{toBeTypes:["Function"]},categoryLabels:{toBeTypes:["string[]"]}}),jc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t,i=new Map(n.categoryLabels.map((a,s)=>[a,s]));let o={id:"",index:0,label:"",description:"",categoryIndex:0,categoryLabel:"",color:"",visible:!0,data:{},value:0,level:0,seq:0,children:[]};try{const a=function(){if(H(e)===!0)return JSON.parse(JSON.stringify(e));if(Array.isArray(e)===!1)return{id:""};let l;const f=new Map;e.forEach(h=>{if(!h.parent)l=h;else{const d=f.get(h.parent)??[];d.push(h),f.set(h.parent,d)}});const c=h=>({id:h.id,label:h.label,data:h.data,value:h.value,categoryLabel:h.categoryLabel,children:(f.get(h.id)??[]).map(d=>c(d))});return l?c(l):{id:""}}();let s=0;const u=(l,f,c)=>{const h=f+1,d=l.categoryLabel??null;let p=0;d!=null&&(i.has(d)||i.set(d,i.size),p=i.get(d)??0);const g=s;s++;const _={id:l.id,index:g,level:f,seq:c,label:l.label??"",description:l.description??"",categoryIndex:p,categoryLabel:d,color:Xt(p,r),data:l.data??{},value:l.value,visible:!0,children:(l.children??[]).map((x,A)=>u(x,h,A))};return _.visible=n.visibleFilter(_,t),_};o=u(a,0,0)}catch(a){throw Error(a)}return o},qc=t=>M({data:t},{data:{toBe:"DataTreeObj | DataTreeDatum[]",test:n=>H(n)&&n.id!==void 0}}),Yc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Ui({computedData$:e.computedData$}).pipe(w(1)),i=Wt({datumList$:r,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),o=zi({nodeList$:r,fullDataFormatter$:e.fullDataFormatter$}).pipe(w(1)),a=Pi({datumList$:r}).pipe(w(1)),s=Hi({computedData$:e.computedData$}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,treeHighlight$:i,existCategoryLabels$:o,CategoryDataMap$:a,visibleComputedData$:s}};class Wc extends Ot{constructor(e,n){super({defaultDataFormatter:Ie,dataFormatterValidator:Xc,computedDataFn:jc,dataValidator:qc,contextObserverCallback:Yc},e,n)}}function Jc({chartType:t,config:e,initFn:n}){const r=new O,i=new WeakMap;let o=()=>{},a;const s=new ci(e.defaultParams),u=new ci({}),l=s.pipe(R(f=>u.pipe(E(r),D(c=>{try{const{status:h,columnName:d,expectToBe:p}=e.validator(c,{validateColumns:M});if(h==="error")throw new Error(yt({columnName:d,expectToBe:p,from:"Chart.constructor"}));return h==="warning"&&console.warn(vt({columnName:d,expectToBe:p,from:"Chart.constructor"})),st(c,f)}catch(h){throw new Error(h.message)}}),Yt(c=>(console.error(Kt(c)),Mt)))),w(1));return{params$:u,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:f=>{s.next(st(f,e.defaultParams))},setContext:f=>{a=f,a.observer.fullParams$=l}}}const bt=t=>function(n){return function(i){return class{constructor(){const a=Jc({chartType:t,config:n,initFn:i});this.params$=a.params$,this.name=a.name,this.chartType=a.chartType,this.defaultParams=a.defaultParams,this.layerIndex=a.layerIndex,this.init=a.init,this.destroy=a.destroy,this.setPresetParams=a.setPresetParams,this.setContext=a.setContext}}}},Kc=bt("series"),Zc=bt("grid"),Qc=bt("multiGrid"),tf=bt("multiValue"),ef=bt("noneData"),nf=bt("relationship"),rf=bt("tree");m.CHART_HEIGHT_DEFAULT=Gn,m.CHART_OPTIONS_DEFAULT=at,m.CHART_PARAMS_DEFAULT=Fe,m.CHART_WIDTH_DEFAULT=Bn,m.DATA_FORMATTER_CONTAINER_DEFAULT=Zt,m.DATA_FORMATTER_GRID_DEFAULT=Pe,m.DATA_FORMATTER_GRID_GRID_DEFAULT=Oe,m.DATA_FORMATTER_GROUP_AXIS_DEFAULT=Vn,m.DATA_FORMATTER_MULTI_GRID_DEFAULT=Re,m.DATA_FORMATTER_MULTI_GRID_GRID_DEFAULT=Pt,m.DATA_FORMATTER_MULTI_VALUE_DEFAULT=Ne,m.DATA_FORMATTER_RELATIONAL_DEFAULT=ke,m.DATA_FORMATTER_SERIES_DEFAULT=Le,m.DATA_FORMATTER_TREE_DEFAULT=Ie,m.DATA_FORMATTER_VALUE_AXIS_DEFAULT=J,m.DATA_GRID_DEFAULT=Yi,m.DATA_MULTI_GRID_DEFAULT=Wi,m.DATA_MULTI_VALUE_DEFAULT=Ji,m.DATA_RELATIONA_DEFAULTL=Zi,m.DATA_SERIES_DEFAULT=qi,m.DATA_TREE_DEFAULT=Ki,m.GridChart=Ec,m.MultiGridChart=Pc,m.MultiValueChart=Bc,m.PADDING_DEFAULT=Me,m.RelationshipChart=Hc,m.SeriesChart=Dc,m.TreeChart=Wc,m.calcGridContainerLayout=De,m.calcSeriesContainerLayout=cn,m.categoryDataMapObservable=Pi,m.computedStackedDataObservables=In,m.createAxisLinearScale=gt,m.createAxisPointScale=yc,m.createAxisQuantizeScale=vc,m.createDefaultDatumId=Ht,m.createDefaultGroupLabel=sn,m.createDefaultSeriesLabel=xe,m.createGridGroupLabels=Kr,m.createGridSeriesLabels=un,m.createMultiGridGroupLabels=Zr,m.createMultiGridSeriesLabels=Jr,m.defineGridPlugin=Zc,m.defineMultiGridPlugin=Qc,m.defineMultiValuePlugin=tf,m.defineNoneDataPlugin=ef,m.defineRelationshipPlugin=nf,m.defineSeriesPlugin=Kc,m.defineTreePlugin=rf,m.existCategoryLabelsObservable=zi,m.formatCommaNumber=Qi,m.formatValueToLabel=nl,m.getMinAndMax=Tt,m.getMinAndMaxGrid=ln,m.getMinAndMaxMultiGrid=il,m.getMinAndMaxMultiValue=ol,m.getMinAndMaxSeries=rl,m.getMinAndMaxValue=Ae,m.gridAxesReverseTransformObservable=Mn,m.gridAxesSizeObservable=On,m.gridAxesTransformObservable=En,m.gridComputedLayoutDataObservable=Cn,m.gridContainerPositionObservable=Gi,m.gridGraphicReverseScaleObservable=Ln,m.gridGraphicTransformObservable=Fn,m.gridSeriesLabelsObservable=Pn,m.gridVisibleComputedDataObservable=Rn,m.gridVisibleComputedLayoutDataObservable=Nn,m.groupDataMapObservable=Tn,m.highlightObservable=Wt,m.isDom=zn,m.isFunction=Un,m.isPlainObject=H,m.mergeOptionsWithDefault=st,m.multiGridContainerObservable=kn,m.multiGridEachDetailObservable=Vi,m.nodeListObservable=Ui,m.resizeObservable=Oi,m.separateSeriesObservable=Ri,m.seriesColorPredicate=Xt,m.seriesComputedLayoutDataObservable=Ii,m.seriesContainerPositionMapObservable=Bi,m.seriesContainerPositionObservable=ki,m.seriesDataMapObservable=Ce,m.seriesLabelsObservable=Ni,m.seriesVisibleComputedDataObservable=Sn,m.textSizePxObservable=Jt,m.transposeData=Qr,m.treeVisibleComputedDataObservable=Hi,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
7
|
+
----> find in '${n}'`}function bc(t){return t?E(t,{width:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},height:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},preset:{toBeTypes:["object"]}}):{status:"success",columnName:"",expectToBe:""}}function wc(t){return E({element:t},{element:{toBe:"Dom",test:n=>zn(n)}})}function _c(t,e){const n={series:["series","datum","none"],grid:["series","group","datum","none"],multiGrid:["series","group","datum","none"],multiValue:["category","datum","none"],relationship:["category","datum","none"],tree:["category","datum","none"],noneData:["none"]},r=E(e,{padding:{toBeTypes:["object"]},highlightTarget:{toBe:n[t].map(i=>`"${i}"`).join(" | "),test:i=>n[t].includes(i)},highlightDefault:{toBeTypes:["string","null"]},colorScheme:{toBe:'"dark" | "light"',test:i=>i==="dark"||i==="light"},colors:{toBeTypes:["object"],test:i=>i.light&&i.dark},styles:{toBeTypes:["object"]},transitionDuration:{toBeTypes:["number"]},transitionEase:{toBeTypes:["string"]}});if(e&&e.padding){const i=E(e.padding,{top:{toBeTypes:["number"]},right:{toBeTypes:["number"]},bottom:{toBeTypes:["number"]},left:{toBeTypes:["number"]}});if(i.status==="error")return i}if(e&&e.colors){const i=E(e.colors,{light:{toBeTypes:["object"]},dark:{toBeTypes:["object"]}});if(i.status==="error")return i;if(e.colors.light){const o=E(e.colors.light,{series:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(o.status==="error")return o}if(e.colors.dark){const o=E(e.colors.dark,{series:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(o.status==="error")return o}}return r}function xc(t,e){return E({pluginEntities:e},{pluginEntities:{toBe:`PluginEntity<'${t}'>[]`,test:r=>Array.isArray(r)&&r.every(i=>i.chartType===t||i.chartType==="noneData")}})}function ji(t,e,n){const r=st(t,e);return n==="multiGrid"&&t.gridList!=null&&(r.gridList=t.gridList.map((i,o)=>{const a=e.gridList[o]||e.gridList[0];return st(i,a)})),r}const Ac=({defaultDataFormatter:t,dataFormatterValidator:e,computedDataFn:n,dataValidator:r,contextObserverCallback:i})=>{const o=new O,a=t.type;return function(u,l){try{const{status:v,columnName:b,expectToBe:y}=bc(l);if(v==="error")throw new Error(yt({columnName:b,expectToBe:y,from:"Chart.constructor"}));if(v==="warning")console.warn(vt({columnName:b,expectToBe:y,from:"Chart.constructor"}));else{const{status:C,columnName:F,expectToBe:V}=wc(u);if(C==="error")throw new Error(yt({columnName:F,expectToBe:V,from:"Chart.constructor"}));C==="warning"&&console.warn(vt({columnName:F,expectToBe:V,from:"Chart.constructor"}))}}catch(v){throw new Error(v)}ie(u).selectAll("svg").remove();const f=ie(u).append("svg");f.attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("xmls","http://www.w3.org/2000/svg").attr("version","1.1").style("position","absolute").classed("orbcharts__root",!0);const c=f.append("g");c.classed("orbcharts__layout",!0);const h=c.append("g");h.classed("orbcharts__plugins",!0);const d={data$:new O,dataFormatter$:new O,plugins$:new O,chartParams$:new O,event$:new O},p=(v=>{const b=v||at,y=b.preset?b.preset:{};return{name:y.name??"",description:y.description??"",chartParams:y.chartParams?st(y.chartParams,Fe):Fe,dataFormatter:y.dataFormatter?ji(y.dataFormatter,t,a):t,allPluginParams:y.allPluginParams?y.allPluginParams:{}}})(l),g=d.data$.pipe(w(1)),_=d.dataFormatter$.pipe(M(o),$n({}),D(v=>{try{const{status:b,columnName:y,expectToBe:C}=e(v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.constructor"}));return b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.constructor"})),ji(v,p.dataFormatter,a)}catch(b){throw new Error(b)}}),Yt(v=>(console.error(Kt(v)),Et)),w(1)),x=d.chartParams$.pipe(M(o),$n({}),D(v=>{try{const{status:b,columnName:y,expectToBe:C}=_c(a,v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.constructor"}));return b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.constructor"})),st(v,p.chartParams)}catch(b){throw new Error(b)}}),Yt(v=>(console.error(Kt(v)),Et)),w(1)),A=x.pipe(M(o),$n({}),D(v=>st(v.padding??{},Ee)));A.pipe(M(o),fc()).subscribe(v=>{c.attr("transform",`translate(${v.left}, ${v.top})`)}),A.subscribe(v=>{c.transition().attr("transform",`translate(${v.left}, ${v.top})`)});const $=mt({width:(l==null?void 0:l.width)??at.width,height:(l==null?void 0:l.height)??at.height}).pipe(R(v=>Fi(()=>v.width==="auto"||v.height==="auto",Oi(u).pipe(D(b=>({width:v.width==="auto"?b.width:v.width,height:v.height==="auto"?b.height:v.height}))),mt(v))),M(o),An()),T=mt().pipe(dc($.pipe(oc(250)),$.pipe(mc(250))),tt((v,b)=>JSON.stringify(v)===JSON.stringify(b)),An()),S=T.subscribe(),k=U({rootSize:T,mergedPadding:A}).pipe(M(o),R(async v=>{const b=v.rootSize.width>0?v.rootSize.width:Bn,y=v.rootSize.height>0?v.rootSize.height:Gn;return{width:b-v.mergedPadding.left-v.mergedPadding.right,height:y-v.mergedPadding.top-v.mergedPadding.bottom,top:v.mergedPadding.top,right:v.mergedPadding.right,bottom:v.mergedPadding.bottom,left:v.mergedPadding.left,rootWidth:b,rootHeight:y}}),w(1));k.subscribe(v=>{f.attr("width",v.rootWidth).attr("height",v.rootHeight)});const N=U({data:g,dataFormatter:_,chartParams:x}).pipe(M(o),R(async v=>v),R(v=>mt(v).pipe(D(b=>{try{const{status:y,columnName:C,expectToBe:F}=r(b.data);if(y==="error")throw new Error(yt({columnName:C,expectToBe:F,from:"Chart.constructor"}));return y==="warning"&&console.warn(vt({columnName:C,expectToBe:F,from:"Chart.constructor"})),n({data:b.data,dataFormatter:b.dataFormatter,chartParams:b.chartParams})}catch(y){throw new Error(y)}}),Yt(b=>(console.error(Kt(b)),Et)))),w(1));N.subscribe();const I={};return d.plugins$.subscribe(v=>{try{const{status:b,columnName:y,expectToBe:C}=xc(a,v);if(b==="error")throw new Error(yt({columnName:y,expectToBe:C,from:"Chart.plugins$"}));b==="warning"&&console.warn(vt({columnName:y,expectToBe:C,from:"Chart.plugins$"}))}catch(b){throw new Error(b)}h.selectAll("g.orbcharts__plugin").data(v,b=>b.name).join(b=>b.append("g").attr("class",y=>`orbcharts__plugin orbcharts__${y.name}`).each((y,C,F)=>{const V={fullParams$:new L,fullChartParams$:x,fullDataFormatter$:_,computedData$:N,layout$:k},it=i({observer:V,subject:d}),et={selection:ie(F[C]),rootSelection:f,name:y.name,chartType:a,subject:d,observer:it};y.setPresetParams(p.allPluginParams[y.name]??{}),y.setContext(et),I[et.name]=y,y.init()}),b=>b,b=>b.each((y,C,F)=>{I[y.name]&&(I[y.name].destroy(),I[y.name]=void 0)}).remove()).sort((b,y)=>b.layerIndex-y.layerIndex)}),{...d,selection:f,destroy(){ie(u).selectAll("svg").remove(),o.next(void 0),S.unsubscribe()}}}};class Ot{constructor({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:o},a,s){this.data$=new O,this.dataFormatter$=new O,this.plugins$=new O,this.chartParams$=new O,this.event$=new O;try{const l=Ac({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:o})(a,s);this.selection=l.selection,this.destroy=l.destroy,this.data$=l.data$,this.dataFormatter$=l.dataFormatter$,this.plugins$=l.plugins$,this.chartParams$=l.chartParams$,this.event$=l.event$}catch(u){console.error(Kt(u))}}}class Dc extends Ot{constructor(e,n){super({defaultDataFormatter:Le,dataFormatterValidator:eo,computedDataFn:al,dataValidator:sl,contextObserverCallback:gc},e,n)}}const $c=t=>{const e=E(t,{visibleFilter:{toBeTypes:["Function"]},grid:{toBeTypes:["object"]},container:{toBeTypes:["object"]}});if(t.grid){const n=E(t.grid,{seriesDirection:{toBe:'"row" | "column"',test:r=>r==="row"||r==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(n.status==="error")return n;if(t.grid.valueAxis){const r=E(t.grid.valueAxis,{position:{toBe:'"left" | "right"',test:i=>i==="left"||i==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:i=>Array.isArray(i)&&i.length===2&&(typeof i[0]=="number"||i[0]==="min"||i[0]==="auto")&&(typeof i[1]=="number"||i[1]==="max"||i[1]==="auto")},scaleRange:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.grid.groupAxis){const r=E(t.grid.groupAxis,{position:{toBe:'"top" | "bottom"',test:i=>i==="top"||i==="bottom"},scaleDomain:{toBe:'[number, number | "max"]',test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&(typeof i[1]=="number"||i[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(r.status==="error")return r}}if(t.container){const n=E(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function Xi(t,e){if(!t.length)return[];try{const n=t.reduce((a,s)=>s.length>a?s.length:a,0),i=t.map((a,s)=>{if(a.length===n)return a;const u=Object.assign([],a);for(let l=u.length;l<n;l++)u[l]=null;return u}).map((a,s)=>a.map((u,l)=>u==null?{id:"",label:"",data:{},value:null}:typeof u=="number"?{id:"",label:"",data:{},value:u}:{id:u.id??"",label:u.label??"",data:u.data??{},value:u.value}));return Qr(e.seriesDirection,i)}catch{return[]}}const Tc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i;try{const o=Xi(e,n.grid),a=un({transposedDataGrid:o,dataFormatterGrid:n.grid,chartType:"grid"}),s=Kr({transposedDataGrid:o,dataFormatterGrid:n.grid,chartType:"grid"});let u=0;i=o.map((l,f)=>l.map((c,h)=>{const d=Ht("grid",0,f,h),p=s[h],g={id:c.id?c.id:d,index:u,label:c.label?c.label:d,description:c.description??"",data:c.data,value:c.value,gridIndex:0,seriesIndex:f,seriesLabel:a[f],groupIndex:h,groupLabel:p,color:jt(f,r),visible:!0};return g.visible=n.visibleFilter(g,t),u++,g}))}catch(o){throw Error(o)}return i},Sc=t=>E({data:t},{data:{toBe:"(DataGridDatum | DataGridValue)[][]",test:n=>Array.isArray(n)}}),Cc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=e.fullDataFormatter$.pipe(D($=>$.grid.separateSeries),tt(),w(1)),i=Gi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),o=Mn({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),a=En({gridAxesTransform$:o}).pipe(w(1)),s=Fn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),u=Ln({gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:s}),l=On({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),f=e.computedData$.pipe(D($=>$.flat())).pipe(w(1)),c=Wt({datumList$:f,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),h=Pn({computedData$:e.computedData$}),d=Ce({datumList$:f}).pipe(w(1)),p=Tn({datumList$:f}).pipe(w(1)),g=Cn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(w(1)),_=Rn({computedData$:e.computedData$}).pipe(w(1)),x=Nn({computedLayoutData$:g}).pipe(w(1)),A=In({computedData$:e.computedData$,isSeriesSeprate$:r}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isSeriesSeprate$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridAxesReverseTransform$:a,gridGraphicTransform$:s,gridGraphicReverseScale$:u,gridAxesSize$:l,gridHighlight$:c,seriesLabels$:h,SeriesDataMap$:d,GroupDataMap$:p,computedLayoutData$:g,visibleComputedData$:_,visibleComputedLayoutData$:x,computedStackedData$:A}};class Mc extends Ot{constructor(e,n){super({defaultDataFormatter:Pe,dataFormatterValidator:$c,computedDataFn:Tc,dataValidator:Sc,contextObserverCallback:Cc},e,n)}}const Ec=t=>{const e=E(t,{visibleFilter:{toBeTypes:["Function"]},gridList:{toBeTypes:["object[]"]},container:{toBeTypes:["object"]},separateGrid:{toBeTypes:["boolean"]}});if(t.gridList){const r=t.gridList.map((i,o)=>{const a=E(i,{seriesDirection:{toBe:'"row" | "column"',test:s=>s==="row"||s==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(a.status==="error")return a;if(i.valueAxis){const s=E(i.valueAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:u=>u==="top"||u==="bottom"||u==="left"||u==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:u=>Array.isArray(u)&&u.length===2&&(typeof u[0]=="number"||u[0]==="min"||u[0]==="auto")&&(typeof u[1]=="number"||u[1]==="max"||u[1]==="auto")},scaleRange:{toBe:"[number, number]",test:u=>Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"},label:{toBeTypes:["string"]}});if(s.status==="error")return s}else if(i.groupAxis){const s=E(i.groupAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:u=>u==="top"||u==="bottom"||u==="left"||u==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:u=>Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&(typeof u[1]=="number"||u[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(s.status==="error")return s}return{status:"success",columnName:"",expectToBe:""}}).find(i=>i.status==="error");if(r.status==="error")return r}if(t.container){const n=E(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e},Fc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const o=n.gridList[0]||Pt,a=e.map((c,h)=>n.gridList[h]||o),s=e.map((c,h)=>Xi(c,a[h])),u=n.separateGrid?s.map((c,h)=>un({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid"})):s.map((c,h)=>Jr({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid",gridIndex:h})),l=new Map;let f=0;u.flat().forEach((c,h)=>{if(!l.has(c)){const d=jt(f,r);l.set(c,d),f++}}),i=s.map((c,h)=>{const d=u[h],p=Zr({transposedDataGrid:c,dataFormatterGrid:a[h],chartType:"multiGrid",gridIndex:h});let g=0;return c.map((x,A)=>x.map(($,T)=>{const S=Ht("multiGrid",h,A,T),k=p[T],N=d[A],I={id:$.id?$.id:S,index:g,label:$.label?$.label:S,description:$.description??"",data:$.data,value:$.value,gridIndex:h,seriesIndex:A,seriesLabel:N,groupIndex:T,groupLabel:k,color:l.get(N),visible:!0};return I.visible=n.visibleFilter(I,t),g++,I}))})}catch(o){throw Error(o)}return i},Lc=t=>E({data:t},{data:{toBe:"DataGrid[]",test:n=>Array.isArray(n)}}),Oc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Vi({fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),i=kn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,multiGridContainerPosition$:i,multiGridEachDetail$:r}};class Pc extends Ot{constructor(e,n){super({defaultDataFormatter:Re,dataFormatterValidator:Ec,computedDataFn:Fc,dataValidator:Lc,contextObserverCallback:Oc},e,n)}}const Rc=t=>({status:"success",columnName:"",expectToBe:""}),Nc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;if(!e.length)return[];const i={width:1e3,height:1e3};let o=[];try{const a=e.map((A,$)=>A.map((T,S)=>typeof T=="number"?{id:"",label:"",description:"",data:{},categoryLabel:"",value:T}:{id:T.id??"",label:T.label??"",description:T.description??"",data:T.data??{},categoryLabel:T.categoryLabel??"",value:T.value})),[s,u]=Ae(a.map(A=>A[0])),[l,f]=Ae(a.map(A=>A[1])),c=n.xAxis.position==="top"||n.xAxis.position==="bottom"?i.width:i.height,h=n.yAxis.position==="left"||n.yAxis.position==="right"?i.height:i.width,d=gt({maxValue:u,minValue:s,axisWidth:c,scaleDomain:[s,u],scaleRange:[0,1]}),p=gt({maxValue:f,minValue:l,axisWidth:h,scaleDomain:[l,f],scaleRange:[0,1]}),g=[n.xAxis.scaleDomain[0]==="auto"?s<0?s:0:n.xAxis.scaleDomain[0]==="min"?s:n.xAxis.scaleDomain[0],n.xAxis.scaleDomain[1]==="auto"?u>=0?u:0:n.xAxis.scaleDomain[1]==="max"?u:n.xAxis.scaleDomain[1]],_=[n.yAxis.scaleDomain[0]==="auto"?s<0?s:0:n.yAxis.scaleDomain[0]==="min"?s:n.yAxis.scaleDomain[0],n.yAxis.scaleDomain[1]==="auto"?u>=0?u:0:n.yAxis.scaleDomain[1]==="max"?u:n.yAxis.scaleDomain[1]];let x=0;o=a.map((A,$)=>A.map((T,S)=>{const k=x;x++;const N=Ht(n.type,$,S),I={id:T.id?T.id:N,index:k,label:T.label?T.label:N,description:T.description??"",data:T.data,value:T.value,categoryIndex:0,categoryLabel:"",axis:S==0?d(T.value):p(T.value),visible:!0,color:""};return I.visible=n.visibleFilter(I,t),I}))}catch(a){throw Error(a)}return o},Ic=t=>({status:"success",columnName:"",expectToBe:""}),kc=({subject:t,observer:e})=>({fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$});class Bc extends Ot{constructor(e,n){super({defaultDataFormatter:Ne,dataFormatterValidator:Rc,computedDataFn:Nc,dataValidator:Ic,contextObserverCallback:kc},e,n)}}const Gc=t=>({status:"success",columnName:"",expectToBe:""}),Vc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;let i=[],o=[];try{let a=[],s=[];if(e.nodes)a=e.nodes,s=e.edges;else if(e[0])a=e[0],s=e[1];else return{nodes:[],edges:[]};i=a.map((c,h)=>({id:c.id,index:h,label:c.label??"",description:c.description??"",data:c.data??{},value:c.value??0,categoryIndex:0,categoryLabel:"",color:"",startNodes:[],startNodeIds:[],endNodes:[],endNodeIds:[],visible:!0}));const u=new Map(i.map(c=>[c.id,c]));o=s.map((c,h)=>({id:c.id,index:h,label:c.label??"",description:c.description??"",data:c.data??{},value:c.value??0,startNode:u.get(c.start),startNodeId:c.start,endNode:u.get(c.end),endNodeId:c.end,visible:!0}));const l=function(){const c=new Map;return o.forEach(h=>{const d=c.get(h.endNodeId)??[];d.push(h.startNode),c.set(h.endNodeId,d)}),c}(),f=function(){const c=new Map;return o.forEach(h=>{const d=c.get(h.startNodeId)??[];d.push(h.endNode),c.set(h.startNodeId,d)}),c}();Array.from(u).forEach(([c,h])=>{h.startNodes=l.get(c),h.startNodeIds=h.startNodes.map(d=>d.id),h.endNodes=f.get(c),h.endNodeIds=h.endNodes.map(d=>d.id),h.visible=n.visibleFilter(h,t)}),o=o.map(c=>(c.visible=!!(c.startNode.visible&&c.endNode.visible),c))}catch(a){throw Error(a)}return{nodes:i,edges:o}},Uc=t=>({status:"success",columnName:"",expectToBe:""}),zc=({subject:t,observer:e})=>({fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$});class Hc extends Ot{constructor(e,n){super({defaultDataFormatter:ke,dataFormatterValidator:Gc,computedDataFn:Vc,dataValidator:Uc,contextObserverCallback:zc},e,n)}}const jc=t=>E(t,{visibleFilter:{toBeTypes:["Function"]},categoryLabels:{toBeTypes:["string[]"]}}),Xc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t,i=new Map(n.categoryLabels.map((a,s)=>[a,s]));let o={id:"",index:0,label:"",description:"",categoryIndex:0,categoryLabel:"",color:"",visible:!0,data:{},value:0,level:0,seq:0,children:[]};try{const a=function(){if(H(e)===!0)return JSON.parse(JSON.stringify(e));if(Array.isArray(e)===!1)return{id:""};let l;const f=new Map;e.forEach(h=>{if(!h.parent)l=h;else{const d=f.get(h.parent)??[];d.push(h),f.set(h.parent,d)}});const c=h=>({id:h.id,label:h.label,data:h.data,value:h.value,categoryLabel:h.categoryLabel,children:(f.get(h.id)??[]).map(d=>c(d))});return l?c(l):{id:""}}();let s=0;const u=(l,f,c)=>{const h=f+1,d=l.categoryLabel??null;let p=0;d!=null&&(i.has(d)||i.set(d,i.size),p=i.get(d)??0);const g=s;s++;const _={id:l.id,index:g,level:f,seq:c,label:l.label??"",description:l.description??"",categoryIndex:p,categoryLabel:d,color:jt(p,r),data:l.data??{},value:l.value,visible:!0,children:(l.children??[]).map((x,A)=>u(x,h,A))};return _.visible=n.visibleFilter(_,t),_};o=u(a,0,0)}catch(a){throw Error(a)}return o},qc=t=>E({data:t},{data:{toBe:"DataTreeObj | DataTreeDatum[]",test:n=>H(n)&&n.id!==void 0}}),Yc=({subject:t,observer:e})=>{const n=Jt(e.fullChartParams$).pipe(w(1)),r=Ui({computedData$:e.computedData$}).pipe(w(1)),i=Wt({datumList$:r,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(w(1)),o=zi({nodeList$:r,fullDataFormatter$:e.fullDataFormatter$}).pipe(w(1)),a=Pi({datumList$:r}).pipe(w(1)),s=Hi({computedData$:e.computedData$}).pipe(w(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,treeHighlight$:i,existCategoryLabels$:o,CategoryDataMap$:a,visibleComputedData$:s}};class Wc extends Ot{constructor(e,n){super({defaultDataFormatter:Ie,dataFormatterValidator:jc,computedDataFn:Xc,dataValidator:qc,contextObserverCallback:Yc},e,n)}}function Jc({chartType:t,config:e,initFn:n}){const r=new O,i=new WeakMap;let o=()=>{},a;const s=new ci(e.defaultParams),u=new ci({}),l=s.pipe(R(f=>u.pipe(M(r),D(c=>{try{const{status:h,columnName:d,expectToBe:p}=e.validator(c,{validateColumns:E});if(h==="error")throw new Error(yt({columnName:d,expectToBe:p,from:"Chart.constructor"}));return h==="warning"&&console.warn(vt({columnName:d,expectToBe:p,from:"Chart.constructor"})),st(c,f)}catch(h){throw new Error(h.message)}}),Yt(c=>(console.error(Kt(c)),Et)))),w(1));return{params$:u,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:f=>{s.next(st(f,e.defaultParams))},setContext:f=>{a=f,a.observer.fullParams$=l}}}const bt=t=>function(n){return function(i){return class{constructor(){const a=Jc({chartType:t,config:n,initFn:i});this.params$=a.params$,this.name=a.name,this.chartType=a.chartType,this.defaultParams=a.defaultParams,this.layerIndex=a.layerIndex,this.init=a.init,this.destroy=a.destroy,this.setPresetParams=a.setPresetParams,this.setContext=a.setContext}}}},Kc=bt("series"),Zc=bt("grid"),Qc=bt("multiGrid"),tf=bt("multiValue"),ef=bt("noneData"),nf=bt("relationship"),rf=bt("tree");m.CHART_HEIGHT_DEFAULT=Gn,m.CHART_OPTIONS_DEFAULT=at,m.CHART_PARAMS_DEFAULT=Fe,m.CHART_WIDTH_DEFAULT=Bn,m.DATA_FORMATTER_CONTAINER_DEFAULT=Zt,m.DATA_FORMATTER_GRID_DEFAULT=Pe,m.DATA_FORMATTER_GRID_GRID_DEFAULT=Oe,m.DATA_FORMATTER_GROUP_AXIS_DEFAULT=Vn,m.DATA_FORMATTER_MULTI_GRID_DEFAULT=Re,m.DATA_FORMATTER_MULTI_GRID_GRID_DEFAULT=Pt,m.DATA_FORMATTER_MULTI_VALUE_DEFAULT=Ne,m.DATA_FORMATTER_RELATIONAL_DEFAULT=ke,m.DATA_FORMATTER_SERIES_DEFAULT=Le,m.DATA_FORMATTER_TREE_DEFAULT=Ie,m.DATA_FORMATTER_VALUE_AXIS_DEFAULT=J,m.DATA_GRID_DEFAULT=Yi,m.DATA_MULTI_GRID_DEFAULT=Wi,m.DATA_MULTI_VALUE_DEFAULT=Ji,m.DATA_RELATIONA_DEFAULTL=Zi,m.DATA_SERIES_DEFAULT=qi,m.DATA_TREE_DEFAULT=Ki,m.GridChart=Mc,m.MultiGridChart=Pc,m.MultiValueChart=Bc,m.PADDING_DEFAULT=Ee,m.RelationshipChart=Hc,m.SeriesChart=Dc,m.TreeChart=Wc,m.calcGridContainerLayout=De,m.calcSeriesContainerLayout=cn,m.categoryDataMapObservable=Pi,m.computedStackedDataObservables=In,m.createAxisLinearScale=gt,m.createAxisPointScale=yc,m.createAxisQuantizeScale=vc,m.createDefaultDatumId=Ht,m.createDefaultGroupLabel=sn,m.createDefaultSeriesLabel=xe,m.createGridGroupLabels=Kr,m.createGridSeriesLabels=un,m.createMultiGridGroupLabels=Zr,m.createMultiGridSeriesLabels=Jr,m.defineGridPlugin=Zc,m.defineMultiGridPlugin=Qc,m.defineMultiValuePlugin=tf,m.defineNoneDataPlugin=ef,m.defineRelationshipPlugin=nf,m.defineSeriesPlugin=Kc,m.defineTreePlugin=rf,m.existCategoryLabelsObservable=zi,m.formatCommaNumber=Qi,m.formatValueToLabel=nl,m.getMinAndMax=Tt,m.getMinAndMaxGrid=ln,m.getMinAndMaxMultiGrid=il,m.getMinAndMaxMultiValue=ol,m.getMinAndMaxSeries=rl,m.getMinAndMaxValue=Ae,m.gridAxesReverseTransformObservable=En,m.gridAxesSizeObservable=On,m.gridAxesTransformObservable=Mn,m.gridComputedLayoutDataObservable=Cn,m.gridContainerPositionObservable=Gi,m.gridGraphicReverseScaleObservable=Ln,m.gridGraphicTransformObservable=Fn,m.gridSeriesLabelsObservable=Pn,m.gridVisibleComputedDataObservable=Rn,m.gridVisibleComputedLayoutDataObservable=Nn,m.groupDataMapObservable=Tn,m.highlightObservable=Wt,m.isDom=zn,m.isFunction=Un,m.isPlainObject=H,m.mergeOptionsWithDefault=st,m.multiGridContainerObservable=kn,m.multiGridEachDetailObservable=Vi,m.nodeListObservable=Ui,m.resizeObservable=Oi,m.separateSeriesObservable=Ri,m.seriesColorPredicate=jt,m.seriesComputedLayoutDataObservable=Ii,m.seriesContainerPositionMapObservable=Bi,m.seriesContainerPositionObservable=ki,m.seriesDataMapObservable=Ce,m.seriesLabelsObservable=Ni,m.seriesVisibleComputedDataObservable=Sn,m.textSizePxObservable=Jt,m.transposeData=Qr,m.treeVisibleComputedDataObservable=Hi,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/src/utils/commonUtils.ts
CHANGED
@@ -6,7 +6,8 @@ export function isPlainObject(variable: any) {
|
|
6
6
|
|
7
7
|
// 是否為function
|
8
8
|
export function isFunction(fn: any) {
|
9
|
-
return !!fn && !fn.nodename && fn.constructor != String && fn.constructor != RegExp && fn.constructor != Array && /function/i.test(fn + "");
|
9
|
+
// return !!fn && !fn.nodename && fn.constructor != String && fn.constructor != RegExp && fn.constructor != Array && /function/i.test(fn + "");
|
10
|
+
return Object.prototype.toString.call(fn) === '[object Function]'
|
10
11
|
}
|
11
12
|
|
12
13
|
// 是否為dom
|