@blueprint-chart/lib 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +806 -804
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -401,8 +401,8 @@ class Ws extends ct {
|
|
|
401
401
|
if (n === zt.Right ? e.selectAll(".tick text").attr("x", -x).attr("dy", "-0.4em").attr("text-anchor", "end") : e.selectAll(".tick text").attr("x", x).attr("dy", "-0.4em").attr("text-anchor", "start"), m ? e.selectAll(".tick line").attr("x2", n === zt.Right ? -6 : 6) : e.selectAll(".tick line").remove(), c > 0 && b) {
|
|
402
402
|
const A = e.select(".domain");
|
|
403
403
|
if (!A.empty()) {
|
|
404
|
-
const w = A.attr("d"),
|
|
405
|
-
|
|
404
|
+
const w = A.attr("d"), L = w.replace(/V[\d.]+/, `V${-c}`);
|
|
405
|
+
L !== w && A.attr("d", L);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
} else
|
|
@@ -469,17 +469,17 @@ function Sl() {
|
|
|
469
469
|
}, g = [/[+-]\d\d:?(\d\d)?|Z/, function(x) {
|
|
470
470
|
(this.zone || (this.zone = {})).offset = (function(A) {
|
|
471
471
|
if (!A || A === "Z") return 0;
|
|
472
|
-
var w = A.match(/([+-]|\d\d)/g),
|
|
473
|
-
return
|
|
472
|
+
var w = A.match(/([+-]|\d\d)/g), L = 60 * w[1] + (+w[2] || 0);
|
|
473
|
+
return L === 0 ? 0 : w[0] === "+" ? -L : L;
|
|
474
474
|
})(x);
|
|
475
475
|
}], b = function(x) {
|
|
476
476
|
var A = c[x];
|
|
477
477
|
return A && (A.indexOf ? A : A.s.concat(A.f));
|
|
478
478
|
}, m = function(x, A) {
|
|
479
|
-
var w,
|
|
480
|
-
if (
|
|
481
|
-
for (var
|
|
482
|
-
w =
|
|
479
|
+
var w, L = c.meridiem;
|
|
480
|
+
if (L) {
|
|
481
|
+
for (var O = 1; O <= 24; O += 1) if (x.indexOf(L(O, 0, A)) > -1) {
|
|
482
|
+
w = O > 12;
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
485
485
|
} else w = x === (A ? "pm" : "PM");
|
|
@@ -498,10 +498,10 @@ function Sl() {
|
|
|
498
498
|
this.milliseconds = +x;
|
|
499
499
|
}], s: [o, d("seconds")], ss: [o, d("seconds")], m: [o, d("minutes")], mm: [o, d("minutes")], H: [o, d("hours")], h: [o, d("hours")], HH: [o, d("hours")], hh: [o, d("hours")], D: [o, d("day")], DD: [s, d("day")], Do: [i, function(x) {
|
|
500
500
|
var A = c.ordinal, w = x.match(/\d+/);
|
|
501
|
-
if (this.day = w[0], A) for (var
|
|
501
|
+
if (this.day = w[0], A) for (var L = 1; L <= 31; L += 1) A(L).replace(/\[|\]/g, "") === x && (this.day = L);
|
|
502
502
|
}], w: [o, d("week")], ww: [s, d("week")], M: [o, d("month")], MM: [s, d("month")], MMM: [i, function(x) {
|
|
503
|
-
var A = b("months"), w = (b("monthsShort") || A.map((function(
|
|
504
|
-
return
|
|
503
|
+
var A = b("months"), w = (b("monthsShort") || A.map((function(L) {
|
|
504
|
+
return L.slice(0, 3);
|
|
505
505
|
}))).indexOf(x) + 1;
|
|
506
506
|
if (w < 1) throw new Error();
|
|
507
507
|
this.month = w % 12 || w;
|
|
@@ -515,22 +515,22 @@ function Sl() {
|
|
|
515
515
|
function y(x) {
|
|
516
516
|
var A, w;
|
|
517
517
|
A = x, w = c && c.formats;
|
|
518
|
-
for (var
|
|
519
|
-
var fe =
|
|
520
|
-
return
|
|
521
|
-
return
|
|
518
|
+
for (var L = (x = A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(j, q, ae) {
|
|
519
|
+
var fe = ae && ae.toUpperCase();
|
|
520
|
+
return q || w[ae] || e[ae] || w[fe].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ne, N, Y) {
|
|
521
|
+
return N || Y.slice(1);
|
|
522
522
|
}));
|
|
523
|
-
}))).match(r),
|
|
524
|
-
var
|
|
525
|
-
|
|
523
|
+
}))).match(r), O = L.length, F = 0; F < O; F += 1) {
|
|
524
|
+
var I = L[F], J = v[I], H = J && J[0], D = J && J[1];
|
|
525
|
+
L[F] = D ? { regex: H, parser: D } : I.replace(/^\[|\]$/g, "");
|
|
526
526
|
}
|
|
527
|
-
return function(
|
|
528
|
-
for (var
|
|
529
|
-
var
|
|
530
|
-
if (typeof
|
|
527
|
+
return function(j) {
|
|
528
|
+
for (var q = {}, ae = 0, fe = 0; ae < O; ae += 1) {
|
|
529
|
+
var ne = L[ae];
|
|
530
|
+
if (typeof ne == "string") fe += ne.length;
|
|
531
531
|
else {
|
|
532
|
-
var
|
|
533
|
-
Y.call(
|
|
532
|
+
var N = ne.regex, Y = ne.parser, R = j.slice(fe), ie = N.exec(R)[0];
|
|
533
|
+
Y.call(q, ie), j = j.replace(ie, "");
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
return (function(he) {
|
|
@@ -539,39 +539,39 @@ function Sl() {
|
|
|
539
539
|
var ce = he.hours;
|
|
540
540
|
ve ? ce < 12 && (he.hours += 12) : ce === 12 && (he.hours = 0), delete he.afternoon;
|
|
541
541
|
}
|
|
542
|
-
})(
|
|
542
|
+
})(q), q;
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
return function(x, A, w) {
|
|
546
546
|
w.p.customParseFormat = !0, x && x.parseTwoDigitYear && (f = x.parseTwoDigitYear);
|
|
547
|
-
var
|
|
548
|
-
|
|
549
|
-
var
|
|
550
|
-
this.$u =
|
|
551
|
-
var
|
|
552
|
-
if (typeof
|
|
553
|
-
var
|
|
554
|
-
|
|
547
|
+
var L = A.prototype, O = L.parse;
|
|
548
|
+
L.parse = function(F) {
|
|
549
|
+
var I = F.date, J = F.utc, H = F.args;
|
|
550
|
+
this.$u = J;
|
|
551
|
+
var D = H[1];
|
|
552
|
+
if (typeof D == "string") {
|
|
553
|
+
var j = H[2] === !0, q = H[3] === !0, ae = j || q, fe = H[2];
|
|
554
|
+
q && (fe = H[2]), c = this.$locale(), !j && fe && (c = w.Ls[fe]), this.$d = (function(R, ie, he, ve) {
|
|
555
555
|
try {
|
|
556
556
|
if (["x", "X"].indexOf(ie) > -1) return new Date((ie === "X" ? 1e3 : 1) * R);
|
|
557
|
-
var ce = y(ie)(R), ue = ce.year, Se = ce.month, ye = ce.day, ge = ce.hours, xe = ce.minutes, pe = ce.seconds, Me = ce.milliseconds,
|
|
557
|
+
var ce = y(ie)(R), ue = ce.year, Se = ce.month, ye = ce.day, ge = ce.hours, xe = ce.minutes, pe = ce.seconds, Me = ce.milliseconds, K = ce.zone, te = ce.week, ke = /* @__PURE__ */ new Date(), me = ye || (ue || Se ? 1 : ke.getDate()), Ce = ue || ke.getFullYear(), we = 0;
|
|
558
558
|
ue && !Se || (we = Se > 0 ? Se - 1 : ke.getMonth());
|
|
559
559
|
var Ne, Oe = ge || 0, Q = xe || 0, Z = pe || 0, S = Me || 0;
|
|
560
|
-
return
|
|
560
|
+
return K ? new Date(Date.UTC(Ce, we, me, Oe, Q, Z, S + 60 * K.offset * 1e3)) : he ? new Date(Date.UTC(Ce, we, me, Oe, Q, Z, S)) : (Ne = new Date(Ce, we, me, Oe, Q, Z, S), te && (Ne = ve(Ne).week(te).toDate()), Ne);
|
|
561
561
|
} catch {
|
|
562
562
|
return /* @__PURE__ */ new Date("");
|
|
563
563
|
}
|
|
564
|
-
})(
|
|
565
|
-
} else if (
|
|
566
|
-
|
|
567
|
-
var Y = w.apply(this,
|
|
564
|
+
})(I, D, J, w), this.init(), fe && fe !== !0 && (this.$L = this.locale(fe).$L), ae && I != this.format(D) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
565
|
+
} else if (D instanceof Array) for (var ne = D.length, N = 1; N <= ne; N += 1) {
|
|
566
|
+
H[1] = D[N - 1];
|
|
567
|
+
var Y = w.apply(this, H);
|
|
568
568
|
if (Y.isValid()) {
|
|
569
569
|
this.$d = Y.$d, this.$L = Y.$L, this.init();
|
|
570
570
|
break;
|
|
571
571
|
}
|
|
572
|
-
|
|
572
|
+
N === ne && (this.$d = /* @__PURE__ */ new Date(""));
|
|
573
573
|
}
|
|
574
|
-
else
|
|
574
|
+
else O.call(this, F);
|
|
575
575
|
};
|
|
576
576
|
};
|
|
577
577
|
}));
|
|
@@ -851,43 +851,43 @@ class Zs extends ct {
|
|
|
851
851
|
const v = b || Us(d, g);
|
|
852
852
|
v && m.tickFormat(v);
|
|
853
853
|
const y = Xs(n), x = y ? n.domain() : [], A = y && c !== "vertical" && kr(x) !== null;
|
|
854
|
-
let w = null,
|
|
854
|
+
let w = null, L = !1;
|
|
855
855
|
if (y && !A && x.length > 1 && f > 0) {
|
|
856
|
-
const
|
|
857
|
-
c === "vertical" ?
|
|
856
|
+
const q = f / x.length * nn, fe = Ja(x, v) > q;
|
|
857
|
+
c === "vertical" ? L = !0 : fe && (w = js(x, q, v), !w && c === "auto" && (L = !0));
|
|
858
858
|
}
|
|
859
|
-
let
|
|
860
|
-
if (!
|
|
859
|
+
let O = this.config("ticks");
|
|
860
|
+
if (!O && f > 0)
|
|
861
861
|
if (y) {
|
|
862
862
|
if (A) {
|
|
863
|
-
const
|
|
864
|
-
|
|
863
|
+
const j = Fl(x, f, v);
|
|
864
|
+
j.length < x.length && (O = j);
|
|
865
865
|
}
|
|
866
866
|
} else {
|
|
867
|
-
const
|
|
868
|
-
m.ticks(
|
|
867
|
+
const j = Math.max(2, Math.floor(f / Cl));
|
|
868
|
+
m.ticks(j);
|
|
869
869
|
}
|
|
870
|
-
|
|
871
|
-
const
|
|
870
|
+
O && m.tickValues(O);
|
|
871
|
+
const F = s === "above" ? 0 : o, I = a.node(), J = e === "merge" ? Ee() : 0;
|
|
872
872
|
if (e === "merge") {
|
|
873
|
-
if (!
|
|
873
|
+
if (!I)
|
|
874
874
|
return;
|
|
875
|
-
|
|
875
|
+
J > 0 ? (a.attr("transform", `translate(0,${F})`), a.duration(J).call(m)) : p.select(I).attr("transform", `translate(0,${F})`).call(m);
|
|
876
876
|
} else
|
|
877
|
-
a.attr("transform", `translate(0,${
|
|
878
|
-
const
|
|
877
|
+
a.attr("transform", `translate(0,${F})`), a.call(m);
|
|
878
|
+
const H = J > 0 ? a : I ? p.select(I) : a;
|
|
879
879
|
if (!this.config("showAxis"))
|
|
880
|
-
|
|
880
|
+
H.select(".domain").remove();
|
|
881
881
|
else if (e === "enter") {
|
|
882
|
-
const
|
|
883
|
-
if (
|
|
884
|
-
const
|
|
885
|
-
|
|
882
|
+
const j = this.config("zeroY");
|
|
883
|
+
if (j != null) {
|
|
884
|
+
const q = j - (s === "above" ? 0 : o);
|
|
885
|
+
H.select(".domain").attr("transform", `translate(0,${q})`);
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
this.config("showTicks") ||
|
|
889
|
-
const
|
|
890
|
-
|
|
888
|
+
this.config("showTicks") || H.selectAll(".tick line").remove();
|
|
889
|
+
const D = i === "auto" ? "outside" : i;
|
|
890
|
+
D === "off" ? H.selectAll(".tick text").remove() : D === "inside" && H.selectAll(".tick text").attr("y", 0).attr("dy", "-0.6em"), L && D !== "off" ? H.selectAll(".tick text").attr("transform", "rotate(-90)").attr("text-anchor", "end").attr("x", s === "above" ? 9 : -9).attr("y", 0).attr("dy", "0.32em") : H.selectAll(".tick text").attr("transform", null), w && D !== "off" && Vl(H, w);
|
|
891
891
|
}
|
|
892
892
|
postDraw() {
|
|
893
893
|
const a = this.config("gridStyle"), e = this.config("height"), r = this.base.select(".bc-axis-horizontal").node();
|
|
@@ -945,12 +945,12 @@ class Hl extends ct {
|
|
|
945
945
|
const n = this.config("colors"), s = this.config("layout"), o = this.config("valueSuffixes"), i = ((m = (b = this.base.node()) == null ? void 0 : b.ownerSVGElement) == null ? void 0 : m.parentElement) ?? document.documentElement, c = getComputedStyle(i).getPropertyValue("--bc-text-color").trim() || "#555", f = this.config("maxWidth");
|
|
946
946
|
let d = 0, g = 0;
|
|
947
947
|
r.each(function(v, y) {
|
|
948
|
-
const x = p.select(this), A = o[y],
|
|
949
|
-
s === "horizontal" && f > 0 && d > 0 && d +
|
|
950
|
-
let
|
|
951
|
-
|
|
952
|
-
let
|
|
953
|
-
|
|
948
|
+
const x = p.select(this), A = o[y], L = 16 + (A ? v.length + 1 + A.length : v.length) * 7 + 12;
|
|
949
|
+
s === "horizontal" && f > 0 && d > 0 && d + L > f && (d = 0, g += 20), x.attr("transform", `translate(${d},${g})`).attr("data-series", v).style("cursor", "default");
|
|
950
|
+
let O = x.select("rect");
|
|
951
|
+
O.empty() && (O = x.append("rect").attr("width", 12).attr("height", 12)), O.attr("fill", n[y % n.length]);
|
|
952
|
+
let F = x.select("text");
|
|
953
|
+
F.empty() && (F = x.append("text").attr("x", 16).attr("y", 10).attr("font-size", "12px")), F.attr("fill", c), F.selectAll("tspan").remove(), A ? (F.text(null), F.append("tspan").attr("font-weight", "bold").text(v), F.append("tspan").text(` ${A}`)) : F.text(v), s === "vertical" ? g += 20 : d += L;
|
|
954
954
|
});
|
|
955
955
|
};
|
|
956
956
|
this.layer("items", a, {
|
|
@@ -1004,21 +1004,21 @@ function ba(t, a, e = Qs, r = -10, n = "top", s = "start", o = 0, i = 0, c = 0,
|
|
|
1004
1004
|
const m = t.querySelector(".bc-legend");
|
|
1005
1005
|
if (m) {
|
|
1006
1006
|
let v = 0, y = 0;
|
|
1007
|
-
const x = a.map((
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1007
|
+
const x = a.map((F, I) => {
|
|
1008
|
+
const J = f[I];
|
|
1009
|
+
return J ? F.length + 1 + J.length : F.length;
|
|
1010
1010
|
});
|
|
1011
1011
|
if (g === "horizontal") {
|
|
1012
|
-
const
|
|
1013
|
-
let
|
|
1014
|
-
for (const
|
|
1015
|
-
o > 0 &&
|
|
1016
|
-
|
|
1012
|
+
const F = x.map((D) => 16 + D * 7 + 12);
|
|
1013
|
+
let I = 1, J = 0, H = 0;
|
|
1014
|
+
for (const D of F)
|
|
1015
|
+
o > 0 && J > 0 && J + D > o ? (H = Math.max(H, J), I++, J = D) : J += D;
|
|
1016
|
+
H = Math.max(H, J), v = H, y = I * 20;
|
|
1017
1017
|
} else
|
|
1018
1018
|
v = Math.max(...x) * 7 + 16 + 8, y = a.length * 20;
|
|
1019
1019
|
const A = d.left ?? 0, w = d.right ?? 0;
|
|
1020
|
-
let
|
|
1021
|
-
g === "horizontal" ? s === "middle" ?
|
|
1020
|
+
let L = c, O = r;
|
|
1021
|
+
g === "horizontal" ? s === "middle" ? L += -A + (o + A + w - v) / 2 : s === "end" ? L += o + w - v : L += -A : s === "middle" ? O += (i - y) / 2 : s === "end" && (O += i - y), m.setAttribute("transform", `translate(${L},${O})`);
|
|
1022
1022
|
}
|
|
1023
1023
|
return Yl(t), m;
|
|
1024
1024
|
}
|
|
@@ -1346,14 +1346,14 @@ function La(t) {
|
|
|
1346
1346
|
i.selectAll(".bc-dot, .bc-bar").each(function() {
|
|
1347
1347
|
const y = this, x = () => {
|
|
1348
1348
|
const w = p.select(y);
|
|
1349
|
-
let
|
|
1349
|
+
let L, O;
|
|
1350
1350
|
if (y.tagName === "circle")
|
|
1351
|
-
|
|
1351
|
+
L = parseFloat(w.attr("cx")), O = parseFloat(w.attr("cy"));
|
|
1352
1352
|
else {
|
|
1353
|
-
const
|
|
1354
|
-
n === st.Horizontal ? (
|
|
1353
|
+
const F = parseFloat(w.attr("x")), I = parseFloat(w.attr("width")), J = parseFloat(w.attr("y")), H = parseFloat(w.attr("height"));
|
|
1354
|
+
n === st.Horizontal ? (L = F + I, O = J + H / 2) : (L = F + I / 2, O = J);
|
|
1355
1355
|
}
|
|
1356
|
-
b && b.attr("x1",
|
|
1356
|
+
b && b.attr("x1", L).attr("x2", L).style("display", null), m && m.attr("y1", O).attr("y2", O).style("display", null);
|
|
1357
1357
|
}, A = () => {
|
|
1358
1358
|
b && b.style("display", "none"), m && m.style("display", "none");
|
|
1359
1359
|
};
|
|
@@ -1595,7 +1595,7 @@ function ai(t, a, e, r) {
|
|
|
1595
1595
|
const n = "target" in a ? a.target : void 0;
|
|
1596
1596
|
if (!n)
|
|
1597
1597
|
return;
|
|
1598
|
-
const s = e.data.find((
|
|
1598
|
+
const s = e.data.find((L) => L.label === n);
|
|
1599
1599
|
if (!s)
|
|
1600
1600
|
return;
|
|
1601
1601
|
const o = t.append("g").attr("data-annotation-index", String(r));
|
|
@@ -1604,55 +1604,57 @@ function ai(t, a, e, r) {
|
|
|
1604
1604
|
let d, g;
|
|
1605
1605
|
const b = a;
|
|
1606
1606
|
if (b.dx != null || b.dy != null) {
|
|
1607
|
-
const { x:
|
|
1608
|
-
d =
|
|
1607
|
+
const { x: L, y: O } = hs(s, e.scaleX, e.scaleY);
|
|
1608
|
+
d = L + (Number(b.dx) || 40), g = O + (Number(b.dy) || -40);
|
|
1609
1609
|
} else if (b.direction != null && b.textOffsetX == null) {
|
|
1610
|
-
const { x:
|
|
1611
|
-
d =
|
|
1610
|
+
const { x: L, y: O } = hs(s, e.scaleX, e.scaleY), F = b.direction, I = b.anchorDistance ?? 60, J = Ql(F, I);
|
|
1611
|
+
d = L + J.dx, g = O + J.dy;
|
|
1612
1612
|
} else
|
|
1613
1613
|
d = f.x + (i.textOffsetX ?? -42), g = f.y + (i.textOffsetY ?? -42);
|
|
1614
1614
|
const m = a.circleColor ?? "#666", v = a;
|
|
1615
|
-
|
|
1615
|
+
v.showCircle && tc(o, f.x, f.y, {
|
|
1616
1616
|
size: v.circleSize,
|
|
1617
1617
|
style: v.circleStyle,
|
|
1618
1618
|
color: m
|
|
1619
|
-
})
|
|
1620
|
-
|
|
1621
|
-
|
|
1619
|
+
});
|
|
1620
|
+
const y = Math.max(4, Math.min(d, e.width - 4)), x = Math.max(4, Math.min(g, e.height - 4));
|
|
1621
|
+
if (a.text) {
|
|
1622
|
+
const L = ic(d - f.x);
|
|
1623
|
+
fn(o, a.text, y, x - 4, {
|
|
1622
1624
|
textColor: a.textColor,
|
|
1623
1625
|
maxWidth: dn(a.maxWidth, e.width),
|
|
1624
|
-
textAnchor:
|
|
1626
|
+
textAnchor: L,
|
|
1625
1627
|
backgroundColor: e.backgroundColor,
|
|
1626
1628
|
textOutline: a.textOutline
|
|
1627
1629
|
});
|
|
1628
1630
|
}
|
|
1629
|
-
if (b.dx != null || b.dy != null ? i.showLine !== !1 : i.showLine === !0) {
|
|
1630
|
-
let
|
|
1631
|
-
const
|
|
1632
|
-
if (
|
|
1631
|
+
if (b.dx != null || b.dy != null ? i.showLine !== !1 : i.showLine === !0 || i.showArrow === !0) {
|
|
1632
|
+
let L = { x: y, y: x }, O = !1;
|
|
1633
|
+
const F = o.select(".bc-annotation-text").node();
|
|
1634
|
+
if (F)
|
|
1633
1635
|
try {
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1636
|
+
const D = F.getBBox();
|
|
1637
|
+
if (D.width > 0 && D.height > 0) {
|
|
1638
|
+
L = Kl(D, f.x, f.y);
|
|
1639
|
+
const j = D.x + D.width / 2;
|
|
1640
|
+
O = Math.abs(L.x - j) < 1;
|
|
1639
1641
|
}
|
|
1640
1642
|
} catch {
|
|
1641
1643
|
}
|
|
1642
|
-
const
|
|
1643
|
-
let
|
|
1644
|
-
if (
|
|
1645
|
-
const
|
|
1646
|
-
if (
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1644
|
+
const I = i.showCircle ? (i.circleSize ?? 4) + (i.lineTargetDistance ?? 5) : i.lineTargetDistance ?? 0;
|
|
1645
|
+
let J = f.x, H = f.y;
|
|
1646
|
+
if (I > 0) {
|
|
1647
|
+
const D = f.x - L.x, j = f.y - L.y, q = Math.sqrt(D * D + j * j);
|
|
1648
|
+
if (q > 0) {
|
|
1649
|
+
const ae = f.x - D / q * I, fe = f.y - j / q * I, ne = pa[c] ?? pa.N;
|
|
1650
|
+
J = Math.abs(ne.dx) > 0.01 ? ae : f.x, H = Math.abs(ne.dy) > 0.01 ? fe : f.y;
|
|
1649
1651
|
}
|
|
1650
1652
|
}
|
|
1651
|
-
nc(o,
|
|
1653
|
+
nc(o, L, { x: J, y: H }, i.lineStyle ?? gt.Direct, {
|
|
1652
1654
|
showArrow: i.showArrow,
|
|
1653
1655
|
lineWeight: i.lineWeight,
|
|
1654
1656
|
color: m,
|
|
1655
|
-
departVertical:
|
|
1657
|
+
departVertical: O
|
|
1656
1658
|
});
|
|
1657
1659
|
}
|
|
1658
1660
|
}
|
|
@@ -1680,22 +1682,22 @@ function ri(t, a, e, r, n) {
|
|
|
1680
1682
|
}
|
|
1681
1683
|
if (s.append("rect").attr("class", "bc-annotation-range").attr("x", i).attr("y", c).attr("width", f).attr("height", d).attr("fill", a.bgColor ?? "#ccc").attr("opacity", (a.bgOpacity ?? 20) / 100), a.text) {
|
|
1682
1684
|
const g = o === st.Vertical ? f : d, b = dn(a.maxWidth, e.width) ?? Math.max(g, 50), m = a.direction ?? "center", v = 4, y = pa[m] ?? pa.center, x = 0.5 + y.dx * 0.5, A = 0.5 + y.dy * 0.5, w = Math.max(v, Math.min(i + f * x, e.width - v));
|
|
1683
|
-
let
|
|
1684
|
-
x < 0.25 ?
|
|
1685
|
-
const
|
|
1686
|
-
if (fn(
|
|
1685
|
+
let L = "middle";
|
|
1686
|
+
x < 0.25 ? L = "start" : x > 0.75 && (L = "end");
|
|
1687
|
+
const F = c + v + 12, I = n ? n.append("g").attr("data-annotation-index", String(r)) : s;
|
|
1688
|
+
if (fn(I, a.text, w, F, {
|
|
1687
1689
|
textColor: a.textColor,
|
|
1688
1690
|
maxWidth: b,
|
|
1689
|
-
textAnchor:
|
|
1691
|
+
textAnchor: L,
|
|
1690
1692
|
backgroundColor: e.backgroundColor,
|
|
1691
1693
|
textOutline: a.textOutline
|
|
1692
1694
|
}), A > 0.25) {
|
|
1693
|
-
const
|
|
1694
|
-
if (
|
|
1695
|
+
const J = I.select(".bc-annotation-text").node();
|
|
1696
|
+
if (J)
|
|
1695
1697
|
try {
|
|
1696
|
-
const
|
|
1697
|
-
let
|
|
1698
|
-
A > 0.75 ?
|
|
1698
|
+
const H = J.getBBox();
|
|
1699
|
+
let D = 0;
|
|
1700
|
+
A > 0.75 ? D = c + d - v - (H.y + H.height) : D = c + d / 2 - (H.y + H.height / 2), Math.abs(D) > 0.5 && J.setAttribute("transform", `translate(0, ${D})`);
|
|
1699
1701
|
} catch {
|
|
1700
1702
|
}
|
|
1701
1703
|
}
|
|
@@ -1742,13 +1744,13 @@ function oc(t, a) {
|
|
|
1742
1744
|
};
|
|
1743
1745
|
});
|
|
1744
1746
|
} else if (r.style === gt.CurveLeft || r.style === gt.CurveRight) {
|
|
1745
|
-
const i = { x: r.fromX, y: r.fromY }, c = { x: r.toX, y: r.toY }, f = c.x - i.x, d = c.y - i.y, g = Math.sqrt(f * f + d * d), b = g * 0.8, m = r.style === gt.CurveRight ? 1 : 0, v = g / 2, y = v < b ? Math.sqrt(b * b - v * v) : 0, x = (i.x + c.x) / 2, A = (i.y + c.y) / 2, w = g > 0 ? -d / g : 0,
|
|
1746
|
-
let
|
|
1747
|
-
m === 1 &&
|
|
1748
|
-
if (
|
|
1747
|
+
const i = { x: r.fromX, y: r.fromY }, c = { x: r.toX, y: r.toY }, f = c.x - i.x, d = c.y - i.y, g = Math.sqrt(f * f + d * d), b = g * 0.8, m = r.style === gt.CurveRight ? 1 : 0, v = g / 2, y = v < b ? Math.sqrt(b * b - v * v) : 0, x = (i.x + c.x) / 2, A = (i.y + c.y) / 2, w = g > 0 ? -d / g : 0, L = g > 0 ? f / g : 0, O = m === 1 ? 1 : -1, F = x + O * y * w, I = A + O * y * L, J = Math.atan2(i.y - I, i.x - F);
|
|
1748
|
+
let D = Math.atan2(c.y - I, c.x - F) - J;
|
|
1749
|
+
m === 1 && D <= 0 && (D += 2 * Math.PI), m === 0 && D >= 0 && (D -= 2 * Math.PI), n.transition().duration(a).ease(p.easeCubicOut).attrTween("d", () => (j) => {
|
|
1750
|
+
if (j >= 0.98)
|
|
1749
1751
|
return s;
|
|
1750
|
-
const
|
|
1751
|
-
return `M ${i.x} ${i.y} A ${b} ${b} 0 0 ${m} ${
|
|
1752
|
+
const q = J + j * D, ae = F + b * Math.cos(q), fe = I + b * Math.sin(q);
|
|
1753
|
+
return `M ${i.x} ${i.y} A ${b} ${b} 0 0 ${m} ${ae} ${fe}`;
|
|
1752
1754
|
});
|
|
1753
1755
|
} else
|
|
1754
1756
|
n.transition().duration(a).ease(p.easeCubicOut).attrTween("d", () => {
|
|
@@ -1788,8 +1790,8 @@ function cc(t, a, e) {
|
|
|
1788
1790
|
const v = g(m), y = b(m);
|
|
1789
1791
|
if (r.style === gt.Direct || a.style === gt.Direct)
|
|
1790
1792
|
return `M ${v.x} ${v.y} L ${y.x} ${y.y}`;
|
|
1791
|
-
const x = y.x - v.x, A = y.y - v.y,
|
|
1792
|
-
return `M ${v.x} ${v.y} A ${
|
|
1793
|
+
const x = y.x - v.x, A = y.y - v.y, L = Math.sqrt(x * x + A * A) * 0.8, O = r.style === gt.CurveRight ? 1 : 0;
|
|
1794
|
+
return `M ${v.x} ${v.y} A ${L} ${L} 0 0 ${O} ${y.x} ${y.y}`;
|
|
1793
1795
|
};
|
|
1794
1796
|
});
|
|
1795
1797
|
}
|
|
@@ -2252,77 +2254,77 @@ class Sc extends ct {
|
|
|
2252
2254
|
}
|
|
2253
2255
|
}
|
|
2254
2256
|
function ui(t, a, e = {}, r = !1) {
|
|
2255
|
-
var Me,
|
|
2257
|
+
var Me, K, te, ke, me, Ce, we, Ne, Oe, Q, Z, S, T, P;
|
|
2256
2258
|
Ht(r);
|
|
2257
2259
|
let n = null, s, o;
|
|
2258
2260
|
const i = Vt.for(t);
|
|
2259
2261
|
if (r) {
|
|
2260
2262
|
const z = Yt(t);
|
|
2261
2263
|
o = z == null ? void 0 : z.margin, i.detach(), z && z.chartType !== "bar-vertical" && (n = Bt(t)), s = /* @__PURE__ */ new Map();
|
|
2262
|
-
for (const
|
|
2263
|
-
for (const [C, U] of Mt(
|
|
2264
|
+
for (const V of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
2265
|
+
for (const [C, U] of Mt(V))
|
|
2264
2266
|
s.set(C, U);
|
|
2265
2267
|
t.replaceChildren();
|
|
2266
2268
|
}
|
|
2267
|
-
const { body: c } = _t(t, e.frame), f = $t(c).width, d = e.categoryLabelLine === !0, g = wa(a.values, (Me = e.verticalAxis) == null ? void 0 : Me.range, (
|
|
2269
|
+
const { body: c } = _t(t, e.frame), f = $t(c).width, d = e.categoryLabelLine === !0, g = wa(a.values, (Me = e.verticalAxis) == null ? void 0 : Me.range, (K = e.verticalAxis) == null ? void 0 : K.numberFormat, (te = e.verticalAxis) == null ? void 0 : te.scaleType), b = d ? He.Off : (ke = e.horizontalAxis) == null ? void 0 : ke.labelPosition, m = ea(f, (me = e.verticalAxis) == null ? void 0 : me.labelPosition, b, (Ce = e.verticalAxis) == null ? void 0 : Ce.direction, g);
|
|
2268
2270
|
if (!d) {
|
|
2269
|
-
const z = Math.max(0, f - (m.left ?? 50) - (m.right ?? 20)),
|
|
2270
|
-
|
|
2271
|
+
const z = Math.max(0, f - (m.left ?? 50) - (m.right ?? 20)), V = sn(a.labels, z, e.horizontalAxis);
|
|
2272
|
+
V !== void 0 && (m.bottom = V);
|
|
2271
2273
|
}
|
|
2272
|
-
const { chartArea: v, width: y, height: x, margin: A } = Gt(c, m),
|
|
2274
|
+
const { chartArea: v, width: y, height: x, margin: A } = Gt(c, m), L = x - (d ? ys : 0), O = Kt(o, A), F = $c(a, e), I = F.map((z) => ({
|
|
2273
2275
|
label: z,
|
|
2274
2276
|
value: a.values[a.labels.indexOf(z)]
|
|
2275
|
-
})),
|
|
2276
|
-
if (
|
|
2277
|
+
})), J = e.swapLabelValue === !0, H = e.waterfall === !0, D = [];
|
|
2278
|
+
if (H) {
|
|
2277
2279
|
let z = 0;
|
|
2278
|
-
for (const
|
|
2280
|
+
for (const V of I) {
|
|
2279
2281
|
const C = z;
|
|
2280
|
-
z +=
|
|
2282
|
+
z += V.value, D.push({ label: V.label, value: V.value, y0: C, y1: z, isTotal: !1 });
|
|
2281
2283
|
}
|
|
2282
|
-
e.waterfallTotal &&
|
|
2283
|
-
}
|
|
2284
|
-
const
|
|
2285
|
-
let [
|
|
2286
|
-
if (e.valueLabels &&
|
|
2287
|
-
const z =
|
|
2288
|
-
|
|
2289
|
-
}
|
|
2290
|
-
const Y =
|
|
2291
|
-
i.attach(v,
|
|
2292
|
-
const R =
|
|
2293
|
-
const z = new Map(
|
|
2284
|
+
e.waterfallTotal && D.push({ label: "Total", value: z, y0: 0, y1: z, isTotal: !0 });
|
|
2285
|
+
}
|
|
2286
|
+
const j = H ? D.map((z) => z.label) : F, q = p.scaleBand().domain(j).range([0, y]).padding(ka(e.barGap)), ae = ((we = e.verticalAxis) == null ? void 0 : we.scaleType) === "log", fe = H ? D.flatMap((z) => [z.y0, z.y1]) : I.map((z) => z.value);
|
|
2287
|
+
let [ne, N] = Va(fe, (Ne = e.verticalAxis) == null ? void 0 : Ne.range, (Oe = e.verticalAxis) == null ? void 0 : Oe.scaleType);
|
|
2288
|
+
if (e.valueLabels && ne < 0 && ((Z = (Q = e.verticalAxis) == null ? void 0 : Q.range) == null ? void 0 : Z.min) == null) {
|
|
2289
|
+
const z = N - ne;
|
|
2290
|
+
ne -= z * 0.1;
|
|
2291
|
+
}
|
|
2292
|
+
const Y = ae ? p.scaleSymlog().domain([ne, N]).nice().range([L, 0]) : p.scaleLinear().domain([ne, N]).nice().range([L, 0]);
|
|
2293
|
+
i.attach(v, O);
|
|
2294
|
+
const R = J && e.valueLabels && !H ? (() => {
|
|
2295
|
+
const z = new Map(I.map((V) => [V.label, V.value]));
|
|
2294
2296
|
return {
|
|
2295
2297
|
...e.horizontalAxis,
|
|
2296
2298
|
width: y,
|
|
2297
|
-
tickFormat: (
|
|
2299
|
+
tickFormat: (V) => String(z.get(V) ?? V)
|
|
2298
2300
|
};
|
|
2299
2301
|
})() : { ...e.horizontalAxis, width: y }, ie = d ? { ...R, labelPosition: He.Off } : R;
|
|
2300
2302
|
i.update({
|
|
2301
2303
|
vertical: { scale: Y, height: x, options: { ...e.verticalAxis, gridWidth: y, topPadding: A.top } },
|
|
2302
|
-
horizontal: { scale:
|
|
2303
|
-
}), !
|
|
2304
|
+
horizontal: { scale: q, height: x, options: ie }
|
|
2305
|
+
}), !ae && ne < 0 && N > 0 && p.select(v).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", y).attr("y1", Y(0)).attr("y2", Y(0)).attr("stroke", "#666").attr("stroke-width", 1);
|
|
2304
2306
|
const he = new Map(
|
|
2305
2307
|
(e.colorizes ?? []).map((z) => [z.target, z.color])
|
|
2306
|
-
), ve = new Set((e.highlights ?? []).map((z) => z.target)), ce = v.ownerSVGElement, ue = ta(ce, t, "bars", { x: 0, y: 0, width: y, height:
|
|
2308
|
+
), ve = new Set((e.highlights ?? []).map((z) => z.target)), ce = v.ownerSVGElement, ue = ta(ce, t, "bars", { x: 0, y: 0, width: y, height: L }), Se = p.select(ce).select("defs"), ye = ue.replace(/^bc-clip-/, ""), ge = p.select(v).append("g").attr("clip-path", `url(#${ue})`);
|
|
2307
2309
|
if (e.barBackground) {
|
|
2308
|
-
const z = (e.colors ?? Ta)[0],
|
|
2309
|
-
ge.selectAll(".bc-bar-bg").data(
|
|
2310
|
+
const z = (e.colors ?? Ta)[0], V = H ? j : I.map((C) => C.label);
|
|
2311
|
+
ge.selectAll(".bc-bar-bg").data(V, (C) => C).enter().append("rect").attr("class", "bc-bar-bg").attr("x", (C) => q(C) ?? 0).attr("y", 0).attr("width", q.bandwidth()).attr("height", L).attr("fill", z).attr("opacity", 0.18);
|
|
2310
2312
|
}
|
|
2311
|
-
const xe =
|
|
2313
|
+
const xe = H ? j : I.map((z) => z.label);
|
|
2312
2314
|
if (e.barSeparators && xe.length > 1) {
|
|
2313
|
-
const z =
|
|
2314
|
-
for (let
|
|
2315
|
-
const C = (
|
|
2316
|
-
ge.append("line").attr("class", "bc-bar-separator").attr("x1", C).attr("x2", C).attr("y1", 0).attr("y2",
|
|
2315
|
+
const z = q.step();
|
|
2316
|
+
for (let V = 1; V < xe.length; V++) {
|
|
2317
|
+
const C = (q(xe[V - 1]) ?? 0) + q.bandwidth() + (z - q.bandwidth()) / 2;
|
|
2318
|
+
ge.append("line").attr("class", "bc-bar-separator").attr("x1", C).attr("x2", C).attr("y1", 0).attr("y2", L).attr("stroke", "currentColor").attr("opacity", 0.15);
|
|
2317
2319
|
}
|
|
2318
2320
|
}
|
|
2319
|
-
if (!
|
|
2320
|
-
const z = e.colors ?? Ta,
|
|
2321
|
-
for (let C = 0; C <
|
|
2322
|
-
const U =
|
|
2321
|
+
if (!H && e.connectedColumns && I.length > 1) {
|
|
2322
|
+
const z = e.colors ?? Ta, V = e.connectionsOpacity ?? 0.15;
|
|
2323
|
+
for (let C = 0; C < I.length - 1; C++) {
|
|
2324
|
+
const U = I[C], E = I[C + 1];
|
|
2323
2325
|
if (U.value == null || E.value == null || Number.isNaN(U.value) || Number.isNaN(E.value) || U.value === 0 || E.value === 0)
|
|
2324
2326
|
continue;
|
|
2325
|
-
const W = (
|
|
2327
|
+
const W = (q(U.label) ?? 0) + q.bandwidth(), Ae = q(E.label) ?? 0, Pe = Math.min(Y(0), Y(U.value)), Be = Math.min(Y(0), Y(E.value)), Ye = Y(0), We = he.get(U.label) ?? z[0], Xe = he.get(E.label) ?? z[0];
|
|
2326
2328
|
let Qe;
|
|
2327
2329
|
if (We === Xe)
|
|
2328
2330
|
Qe = We;
|
|
@@ -2330,19 +2332,19 @@ function ui(t, a, e = {}, r = !1) {
|
|
|
2330
2332
|
const Ue = `bc-conn-grad-${ye}-${C}`, Re = Se.append("linearGradient").attr("id", Ue).attr("x1", "0%").attr("x2", "100%").attr("y1", "0%").attr("y2", "0%");
|
|
2331
2333
|
Re.append("stop").attr("offset", "0%").attr("stop-color", We), Re.append("stop").attr("offset", "100%").attr("stop-color", Xe), Qe = `url(#${Ue})`;
|
|
2332
2334
|
}
|
|
2333
|
-
ge.append("polygon").attr("class", "bc-bar-connection").attr("points", `${W},${Pe} ${Ae},${Be} ${Ae},${Ye} ${W},${Ye}`).attr("fill", Qe).attr("opacity",
|
|
2335
|
+
ge.append("polygon").attr("class", "bc-bar-connection").attr("points", `${W},${Pe} ${Ae},${Be} ${Ae},${Ye} ${W},${Ye}`).attr("fill", Qe).attr("opacity", V).attr("pointer-events", "none");
|
|
2334
2336
|
}
|
|
2335
2337
|
}
|
|
2336
2338
|
const pe = p.select(v).append("g");
|
|
2337
|
-
if (
|
|
2338
|
-
const z = e.colors ?? Ta,
|
|
2339
|
-
if (e.connectedColumns &&
|
|
2339
|
+
if (H) {
|
|
2340
|
+
const z = e.colors ?? Ta, V = "#333";
|
|
2341
|
+
if (e.connectedColumns && D.length > 1) {
|
|
2340
2342
|
const C = e.colors ?? Ta, U = e.connectionsOpacity ?? 0.15;
|
|
2341
|
-
for (let E = 0; E <
|
|
2342
|
-
const W =
|
|
2343
|
+
for (let E = 0; E < D.length - 1; E++) {
|
|
2344
|
+
const W = D[E], Ae = D[E + 1];
|
|
2343
2345
|
if (Ae.isTotal || W.value == null || Ae.value == null || Number.isNaN(W.value) || Number.isNaN(Ae.value) || W.value === 0 || Ae.value === 0)
|
|
2344
2346
|
continue;
|
|
2345
|
-
const Pe = (
|
|
2347
|
+
const Pe = (q(W.label) ?? 0) + q.bandwidth(), Be = q(Ae.label) ?? 0, Ye = Y(W.y1), We = Y(Ae.y1), Xe = Y(W.y0), Qe = Y(Ae.y0), Ue = he.get(W.label) ?? C[0], Re = he.get(Ae.label) ?? C[0];
|
|
2346
2348
|
let ft;
|
|
2347
2349
|
if (Ue === Re)
|
|
2348
2350
|
ft = Ue;
|
|
@@ -2353,34 +2355,34 @@ function ui(t, a, e = {}, r = !1) {
|
|
|
2353
2355
|
ge.append("polygon").attr("class", "bc-bar-connection").attr("points", `${Pe},${Ye} ${Be},${We} ${Be},${Qe} ${Pe},${Xe}`).attr("fill", ft).attr("opacity", U).attr("pointer-events", "none");
|
|
2354
2356
|
}
|
|
2355
2357
|
}
|
|
2356
|
-
for (let C = 0; C <
|
|
2357
|
-
const U =
|
|
2358
|
+
for (let C = 0; C < D.length - 1; C++) {
|
|
2359
|
+
const U = D[C], E = D[C + 1];
|
|
2358
2360
|
if (E.isTotal)
|
|
2359
2361
|
break;
|
|
2360
|
-
ge.append("line").attr("class", "bc-waterfall-connector").attr("x1", (
|
|
2362
|
+
ge.append("line").attr("class", "bc-waterfall-connector").attr("x1", (q(U.label) ?? 0) + q.bandwidth()).attr("x2", q(E.label) ?? 0).attr("y1", Y(U.y1)).attr("y2", Y(U.y1)).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
|
|
2361
2363
|
}
|
|
2362
|
-
if (ge.selectAll(".bc-bar").data(
|
|
2364
|
+
if (ge.selectAll(".bc-bar").data(D, (C) => C.label).enter().append("rect").attr("class", "bc-bar").attr("x", (C) => q(C.label) ?? 0).attr("y", (C) => Math.min(Y(C.y0), Y(C.y1))).attr("width", q.bandwidth()).attr("height", (C) => Math.abs(Y(C.y0) - Y(C.y1))).attr("fill", (C) => C.isTotal ? V : he.get(C.label) ?? z[0]).attr("opacity", (C) => ve.size > 0 ? ve.has(C.label) ? 1 : 0.2 : null), e.valueLabels) {
|
|
2363
2365
|
const C = e.valueLabelPosition ?? ze.Auto, U = ga(((S = e.verticalAxis) == null ? void 0 : S.numberFormat) ?? ""), E = (W) => U ? U(W) : String(W);
|
|
2364
|
-
pe.selectAll(".bc-value-label").data(
|
|
2366
|
+
pe.selectAll(".bc-value-label").data(D, (W) => W.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("x", (W) => (q(W.label) ?? 0) + q.bandwidth() / 2).attr("y", (W) => {
|
|
2365
2367
|
const Ae = Math.min(Y(W.y0), Y(W.y1)), Pe = Math.abs(Y(W.y0) - Y(W.y1));
|
|
2366
2368
|
return C === ze.Inside ? Ae + Pe / 2 : Ae - 4;
|
|
2367
|
-
}).attr("text-anchor", "middle").attr("dominant-baseline", C === ze.Inside ? "central" : "auto").attr("fill", (W) => C === ze.Inside ? Et(W.isTotal ?
|
|
2369
|
+
}).attr("text-anchor", "middle").attr("dominant-baseline", C === ze.Inside ? "central" : "auto").attr("fill", (W) => C === ze.Inside ? Et(W.isTotal ? V : he.get(W.label) ?? z[0]) : "currentColor").text((W) => J ? W.label : E(W.isTotal ? W.y1 : W.value));
|
|
2368
2370
|
}
|
|
2369
2371
|
} else {
|
|
2370
|
-
const z = $a(t),
|
|
2372
|
+
const z = $a(t), V = ge.append("g").node();
|
|
2371
2373
|
Ga(z, {
|
|
2372
2374
|
role: "mark-per-category",
|
|
2373
|
-
parent:
|
|
2375
|
+
parent: V,
|
|
2374
2376
|
selector: ".bc-bar",
|
|
2375
|
-
data:
|
|
2377
|
+
data: I,
|
|
2376
2378
|
key: (U) => U.label,
|
|
2377
2379
|
insert: (U) => U.append("rect").attr("class", "bc-bar"),
|
|
2378
2380
|
attrs: (U) => {
|
|
2379
2381
|
const E = ve.size > 0;
|
|
2380
2382
|
return {
|
|
2381
|
-
x:
|
|
2383
|
+
x: q(U.label) ?? 0,
|
|
2382
2384
|
y: Math.min(Y(0), Y(U.value)),
|
|
2383
|
-
width:
|
|
2385
|
+
width: q.bandwidth(),
|
|
2384
2386
|
height: Math.abs(Y(U.value) - Y(0)),
|
|
2385
2387
|
fill: he.get(U.label) ?? (e.colors ?? Ta)[0],
|
|
2386
2388
|
opacity: E ? ve.has(U.label) ? 1 : 0.35 : 1
|
|
@@ -2390,30 +2392,30 @@ function ui(t, a, e = {}, r = !1) {
|
|
|
2390
2392
|
const C = new Sc(ge);
|
|
2391
2393
|
e.tooltips && C.use(ma({ numberFormat: (T = e.verticalAxis) == null ? void 0 : T.numberFormat })), e.crosshair && C.use(La({
|
|
2392
2394
|
width: y,
|
|
2393
|
-
height:
|
|
2395
|
+
height: L,
|
|
2394
2396
|
direction: e.crosshairDirection,
|
|
2395
2397
|
style: e.crosshairStyle,
|
|
2396
2398
|
color: e.crosshairColor
|
|
2397
|
-
})), (
|
|
2398
|
-
scaleX:
|
|
2399
|
+
})), (P = e.annotations) != null && P.length && C.use(_a(e.annotations, {
|
|
2400
|
+
scaleX: q,
|
|
2399
2401
|
scaleY: Y,
|
|
2400
|
-
data:
|
|
2402
|
+
data: I,
|
|
2401
2403
|
width: y,
|
|
2402
|
-
height:
|
|
2404
|
+
height: L,
|
|
2403
2405
|
backgroundColor: Ft(t),
|
|
2404
2406
|
transition: r,
|
|
2405
2407
|
priorAnnotations: s
|
|
2406
|
-
})), C.draw(
|
|
2408
|
+
})), C.draw(I), e.valueLabels && Lc(pe, I, q, Y, {
|
|
2407
2409
|
position: e.valueLabelPosition,
|
|
2408
2410
|
colorOverrides: he,
|
|
2409
2411
|
colors: e.colors ?? Ta,
|
|
2410
|
-
swapLabelValue:
|
|
2412
|
+
swapLabelValue: J
|
|
2411
2413
|
});
|
|
2412
2414
|
}
|
|
2413
2415
|
if (d) {
|
|
2414
2416
|
const z = p.select(v).append("g").attr("class", "bc-category-labels");
|
|
2415
|
-
for (const
|
|
2416
|
-
z.append("text").attr("class", "bc-category-label").attr("x", (
|
|
2417
|
+
for (const V of j)
|
|
2418
|
+
z.append("text").attr("class", "bc-category-label").attr("x", (q(V) ?? 0) + q.bandwidth() / 2).attr("y", L + ys / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(V);
|
|
2417
2419
|
}
|
|
2418
2420
|
Rt(t, { chartType: "bar-vertical", margin: A }), n && (Nt(ge.node()), It(t, n));
|
|
2419
2421
|
}
|
|
@@ -2465,7 +2467,7 @@ function jr(t) {
|
|
|
2465
2467
|
return t.length * 6.5;
|
|
2466
2468
|
}
|
|
2467
2469
|
function hi(t, a, e = {}, r = !1) {
|
|
2468
|
-
var Me,
|
|
2470
|
+
var Me, K, te, ke, me, Ce, we, Ne, Oe, Q, Z;
|
|
2469
2471
|
Ht(r);
|
|
2470
2472
|
let n = null, s, o;
|
|
2471
2473
|
const i = Vt.for(t);
|
|
@@ -2473,107 +2475,107 @@ function hi(t, a, e = {}, r = !1) {
|
|
|
2473
2475
|
const S = Yt(t);
|
|
2474
2476
|
o = S == null ? void 0 : S.margin, i.detach(), S && S.chartType !== "bar-horizontal" && (n = Bt(t)), s = /* @__PURE__ */ new Map();
|
|
2475
2477
|
for (const T of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
2476
|
-
for (const [
|
|
2477
|
-
s.set(
|
|
2478
|
+
for (const [P, z] of Mt(T))
|
|
2479
|
+
s.set(P, z);
|
|
2478
2480
|
t.replaceChildren();
|
|
2479
2481
|
}
|
|
2480
|
-
const { body: c } = _t(t, e.frame), f = $t(c).width, d = f > 0 && f < 400 && ((Me = e.verticalAxis) == null ? void 0 : Me.labelPosition) !== "outside", g = e.categoryLabelLine === !0 || d, b = Sr(a.labels), m = g ? He.Off : (
|
|
2482
|
+
const { body: c } = _t(t, e.frame), f = $t(c).width, d = f > 0 && f < 400 && ((Me = e.verticalAxis) == null ? void 0 : Me.labelPosition) !== "outside", g = e.categoryLabelLine === !0 || d, b = Sr(a.labels), m = g ? He.Off : (K = e.verticalAxis) == null ? void 0 : K.labelPosition, v = ea(f, m, (te = e.horizontalAxis) == null ? void 0 : te.labelPosition, (ke = e.verticalAxis) == null ? void 0 : ke.direction, b, (me = e.horizontalAxis) == null ? void 0 : me.showAxis), y = e.valueLabelPosition ?? ze.Auto, x = e.swapLabelValue === !0;
|
|
2481
2483
|
if (e.valueLabels && y !== ze.Inside)
|
|
2482
2484
|
if (x) {
|
|
2483
|
-
const S = a.labels.reduce((
|
|
2485
|
+
const S = a.labels.reduce((P, z) => P.length > z.length ? P : z, ""), T = jr(S) + Ur;
|
|
2484
2486
|
v.right = Math.max(v.right ?? 15, T);
|
|
2485
2487
|
} else {
|
|
2486
|
-
const S = Math.max(...a.values), T = Math.min(...a.values),
|
|
2487
|
-
v.right = Math.max(v.right ?? 15,
|
|
2488
|
+
const S = Math.max(...a.values), T = Math.min(...a.values), P = S > 0 ? jr(String(S)) + Ur : 0, z = T < 0 ? jr(String(T)) + Ur : 0;
|
|
2489
|
+
v.right = Math.max(v.right ?? 15, P), z > 0 && (v.left = (v.left ?? 50) + z);
|
|
2488
2490
|
}
|
|
2489
|
-
const { chartArea: A, width: w, height:
|
|
2491
|
+
const { chartArea: A, width: w, height: L, margin: O } = Gt(c, v), F = g ? vs : 0, I = Kt(o, O), J = Tc(a, e), H = J.map((S) => ({
|
|
2490
2492
|
label: S,
|
|
2491
2493
|
value: a.values[a.labels.indexOf(S)]
|
|
2492
|
-
})),
|
|
2493
|
-
if (
|
|
2494
|
+
})), D = e.waterfall === !0, j = [];
|
|
2495
|
+
if (D) {
|
|
2494
2496
|
let S = 0;
|
|
2495
|
-
for (const T of
|
|
2496
|
-
const
|
|
2497
|
-
S += T.value,
|
|
2497
|
+
for (const T of H) {
|
|
2498
|
+
const P = S;
|
|
2499
|
+
S += T.value, j.push({ label: T.label, value: T.value, x0: P, x1: S, isTotal: !1 });
|
|
2498
2500
|
}
|
|
2499
|
-
e.waterfallTotal &&
|
|
2501
|
+
e.waterfallTotal && j.push({ label: "Total", value: S, x0: 0, x1: S, isTotal: !0 });
|
|
2500
2502
|
}
|
|
2501
|
-
const
|
|
2502
|
-
const S = new Map(
|
|
2503
|
+
const q = ((Ce = e.horizontalAxis) == null ? void 0 : Ce.scaleType) === "log", ae = D ? j.flatMap((S) => [S.x0, S.x1]) : H.map((S) => S.value), [fe, ne] = Va(ae, (we = e.horizontalAxis) == null ? void 0 : we.range, (Ne = e.horizontalAxis) == null ? void 0 : Ne.scaleType), N = q ? p.scaleSymlog().domain([fe, ne]).nice().range([0, w]) : p.scaleLinear().domain([fe, ne]).nice().range([0, w]), Y = D ? j.map((S) => S.label) : J, R = p.scaleBand().domain(Y).range([0, L]).padding(ka(e.barGap)), ie = x && e.valueLabels && !D ? (() => {
|
|
2504
|
+
const S = new Map(H.map((T) => [T.label, T.value]));
|
|
2503
2505
|
return {
|
|
2504
2506
|
...e.verticalAxis,
|
|
2505
|
-
topPadding:
|
|
2507
|
+
topPadding: O.top,
|
|
2506
2508
|
tickFormat: (T) => String(S.get(T) ?? T)
|
|
2507
2509
|
};
|
|
2508
|
-
})() : { ...e.verticalAxis, topPadding:
|
|
2509
|
-
i.attach(A,
|
|
2510
|
-
horizontal: { scale:
|
|
2511
|
-
vertical: { scale: R, height:
|
|
2510
|
+
})() : { ...e.verticalAxis, topPadding: O.top }, he = g ? { ...ie, labelPosition: He.Off, ...d ? { showAxis: !1 } : {} } : ie;
|
|
2511
|
+
i.attach(A, I), i.update({
|
|
2512
|
+
horizontal: { scale: N, height: L, options: { ...e.horizontalAxis, width: w } },
|
|
2513
|
+
vertical: { scale: R, height: L, options: he },
|
|
2512
2514
|
order: "horizontal-first"
|
|
2513
|
-
}), !
|
|
2515
|
+
}), !q && fe < 0 && ne > 0 && p.select(A).append("line").attr("class", "bc-zero-baseline").attr("x1", N(0)).attr("x2", N(0)).attr("y1", 0).attr("y2", L).attr("stroke", "#666").attr("stroke-width", 1);
|
|
2514
2516
|
const ve = new Map(
|
|
2515
2517
|
(e.colorizes ?? []).map((S) => [S.target, S.color])
|
|
2516
|
-
), ce = new Set((e.highlights ?? []).map((S) => S.target)), ue = A.ownerSVGElement, Se = ta(ue, t, "bars", { x: 0, y: 0, width: w, height:
|
|
2518
|
+
), ce = new Set((e.highlights ?? []).map((S) => S.target)), ue = A.ownerSVGElement, Se = ta(ue, t, "bars", { x: 0, y: 0, width: w, height: L }), ye = p.select(ue).select("defs"), ge = Se.replace(/^bc-clip-/, ""), xe = p.select(A).append("g").attr("clip-path", `url(#${Se})`);
|
|
2517
2519
|
if (e.barBackground) {
|
|
2518
|
-
const S = (e.colors ?? za)[0], T =
|
|
2519
|
-
xe.selectAll(".bc-bar-bg").data(T, (
|
|
2520
|
+
const S = (e.colors ?? za)[0], T = D ? Y : H.map((P) => P.label);
|
|
2521
|
+
xe.selectAll(".bc-bar-bg").data(T, (P) => P).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (P) => (R(P) ?? 0) + F).attr("width", w).attr("height", R.bandwidth() - F).attr("fill", S).attr("opacity", 0.18);
|
|
2520
2522
|
}
|
|
2521
|
-
const pe =
|
|
2523
|
+
const pe = D ? Y : H.map((S) => S.label);
|
|
2522
2524
|
if (e.barSeparators && pe.length > 1) {
|
|
2523
2525
|
const S = R.step();
|
|
2524
2526
|
for (let T = 1; T < pe.length; T++) {
|
|
2525
|
-
const
|
|
2526
|
-
xe.append("line").attr("class", "bc-bar-separator").attr("x1", 0).attr("x2", w).attr("y1",
|
|
2527
|
+
const P = (R(pe[T - 1]) ?? 0) + R.bandwidth() + (S - R.bandwidth()) / 2;
|
|
2528
|
+
xe.append("line").attr("class", "bc-bar-separator").attr("x1", 0).attr("x2", w).attr("y1", P).attr("y2", P).attr("stroke", "currentColor").attr("opacity", 0.15);
|
|
2527
2529
|
}
|
|
2528
2530
|
}
|
|
2529
|
-
if (!
|
|
2531
|
+
if (!D && e.connectedColumns && H.length > 1) {
|
|
2530
2532
|
const S = e.colors ?? za, T = e.connectionsOpacity ?? 0.15;
|
|
2531
|
-
for (let
|
|
2532
|
-
const z =
|
|
2533
|
-
if (z.value == null ||
|
|
2533
|
+
for (let P = 0; P < H.length - 1; P++) {
|
|
2534
|
+
const z = H[P], V = H[P + 1];
|
|
2535
|
+
if (z.value == null || V.value == null || Number.isNaN(z.value) || Number.isNaN(V.value) || z.value === 0 || V.value === 0)
|
|
2534
2536
|
continue;
|
|
2535
|
-
const C = (R(z.label) ?? 0) + R.bandwidth(), U = (R(
|
|
2537
|
+
const C = (R(z.label) ?? 0) + R.bandwidth(), U = (R(V.label) ?? 0) + F, E = Math.max(N(0), N(z.value)), W = Math.max(N(0), N(V.value)), Ae = N(0), Pe = ve.get(z.label) ?? S[0], Be = ve.get(V.label) ?? S[0];
|
|
2536
2538
|
let Ye;
|
|
2537
2539
|
if (Pe === Be)
|
|
2538
2540
|
Ye = Pe;
|
|
2539
2541
|
else {
|
|
2540
|
-
const We = `bc-conn-grad-${ge}-${
|
|
2542
|
+
const We = `bc-conn-grad-${ge}-${P}`, Xe = ye.append("linearGradient").attr("id", We).attr("x1", "0%").attr("x2", "0%").attr("y1", "0%").attr("y2", "100%");
|
|
2541
2543
|
Xe.append("stop").attr("offset", "0%").attr("stop-color", Pe), Xe.append("stop").attr("offset", "100%").attr("stop-color", Be), Ye = `url(#${We})`;
|
|
2542
2544
|
}
|
|
2543
2545
|
xe.append("polygon").attr("class", "bc-bar-connection").attr("points", `${E},${C} ${W},${U} ${Ae},${U} ${Ae},${C}`).attr("fill", Ye).attr("opacity", T).attr("pointer-events", "none");
|
|
2544
2546
|
}
|
|
2545
2547
|
}
|
|
2546
|
-
if (
|
|
2548
|
+
if (D) {
|
|
2547
2549
|
const S = e.colors ?? za, T = "#333";
|
|
2548
|
-
if (e.connectedColumns &&
|
|
2549
|
-
const
|
|
2550
|
-
for (let
|
|
2551
|
-
const C =
|
|
2550
|
+
if (e.connectedColumns && j.length > 1) {
|
|
2551
|
+
const P = e.colors ?? za, z = e.connectionsOpacity ?? 0.15;
|
|
2552
|
+
for (let V = 0; V < j.length - 1; V++) {
|
|
2553
|
+
const C = j[V], U = j[V + 1];
|
|
2552
2554
|
if (U.isTotal || C.value == null || U.value == null || Number.isNaN(C.value) || Number.isNaN(U.value) || C.value === 0 || U.value === 0)
|
|
2553
2555
|
continue;
|
|
2554
|
-
const E = (R(C.label) ?? 0) + R.bandwidth(), W = (R(U.label) ?? 0) +
|
|
2556
|
+
const E = (R(C.label) ?? 0) + R.bandwidth(), W = (R(U.label) ?? 0) + F, Ae = N(C.x1), Pe = N(U.x1), Be = N(C.x0), Ye = N(U.x0), We = ve.get(C.label) ?? P[0], Xe = ve.get(U.label) ?? P[0];
|
|
2555
2557
|
let Qe;
|
|
2556
2558
|
if (We === Xe)
|
|
2557
2559
|
Qe = We;
|
|
2558
2560
|
else {
|
|
2559
|
-
const Ue = `bc-conn-grad-${ge}-${
|
|
2561
|
+
const Ue = `bc-conn-grad-${ge}-${V}`, Re = ye.append("linearGradient").attr("id", Ue).attr("x1", "0%").attr("x2", "0%").attr("y1", "0%").attr("y2", "100%");
|
|
2560
2562
|
Re.append("stop").attr("offset", "0%").attr("stop-color", We), Re.append("stop").attr("offset", "100%").attr("stop-color", Xe), Qe = `url(#${Ue})`;
|
|
2561
2563
|
}
|
|
2562
2564
|
xe.append("polygon").attr("class", "bc-bar-connection").attr("points", `${Ae},${E} ${Pe},${W} ${Ye},${W} ${Be},${E}`).attr("fill", Qe).attr("opacity", z).attr("pointer-events", "none");
|
|
2563
2565
|
}
|
|
2564
2566
|
}
|
|
2565
|
-
for (let
|
|
2566
|
-
const z =
|
|
2567
|
-
if (
|
|
2567
|
+
for (let P = 0; P < j.length - 1; P++) {
|
|
2568
|
+
const z = j[P], V = j[P + 1];
|
|
2569
|
+
if (V.isTotal)
|
|
2568
2570
|
break;
|
|
2569
|
-
xe.append("line").attr("class", "bc-waterfall-connector").attr("x1",
|
|
2571
|
+
xe.append("line").attr("class", "bc-waterfall-connector").attr("x1", N(z.x1)).attr("x2", N(z.x1)).attr("y1", (R(z.label) ?? 0) + R.bandwidth()).attr("y2", (R(V.label) ?? 0) + F).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
|
|
2570
2572
|
}
|
|
2571
|
-
if (xe.selectAll(".bc-bar").data(
|
|
2572
|
-
const
|
|
2573
|
-
p.select(A).append("g").selectAll(".bc-value-label").data(
|
|
2574
|
-
const E = Math.max(
|
|
2575
|
-
return
|
|
2576
|
-
}).attr("text-anchor",
|
|
2573
|
+
if (xe.selectAll(".bc-bar").data(j, (P) => P.label).enter().append("rect").attr("class", "bc-bar").attr("x", (P) => Math.min(N(P.x0), N(P.x1))).attr("y", (P) => (R(P.label) ?? 0) + F).attr("width", (P) => Math.abs(N(P.x1) - N(P.x0))).attr("height", R.bandwidth() - F).attr("fill", (P) => P.isTotal ? T : ve.get(P.label) ?? S[0]).attr("opacity", (P) => ce.size > 0 ? ce.has(P.label) ? 1 : 0.35 : null), e.valueLabels) {
|
|
2574
|
+
const P = y, z = ga(((Oe = e.horizontalAxis) == null ? void 0 : Oe.numberFormat) ?? ""), V = (U) => z ? z(U) : String(U);
|
|
2575
|
+
p.select(A).append("g").selectAll(".bc-value-label").data(j, (U) => U.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("dominant-baseline", "central").attr("y", (U) => (R(U.label) ?? 0) + F + (R.bandwidth() - F) / 2).attr("x", (U) => {
|
|
2576
|
+
const E = Math.max(N(U.x0), N(U.x1));
|
|
2577
|
+
return P === ze.Inside ? E - 4 : E + 4;
|
|
2578
|
+
}).attr("text-anchor", P === ze.Inside ? "end" : "start").attr("fill", (U) => P === ze.Inside ? Et(U.isTotal ? T : ve.get(U.label) ?? S[0]) : "currentColor").text((U) => x ? U.label : V(U.isTotal ? U.x1 : U.value));
|
|
2577
2579
|
}
|
|
2578
2580
|
} else {
|
|
2579
2581
|
const S = $a(t), T = xe.append("g").node();
|
|
@@ -2581,58 +2583,58 @@ function hi(t, a, e = {}, r = !1) {
|
|
|
2581
2583
|
role: "mark-per-category",
|
|
2582
2584
|
parent: T,
|
|
2583
2585
|
selector: ".bc-bar",
|
|
2584
|
-
data:
|
|
2586
|
+
data: H,
|
|
2585
2587
|
key: (z) => z.label,
|
|
2586
2588
|
insert: (z) => z.append("rect").attr("class", "bc-bar"),
|
|
2587
2589
|
attrs: (z) => {
|
|
2588
|
-
const
|
|
2590
|
+
const V = ce.size > 0;
|
|
2589
2591
|
return {
|
|
2590
|
-
x: Math.min(
|
|
2591
|
-
y: (R(z.label) ?? 0) +
|
|
2592
|
-
width: Math.abs(
|
|
2593
|
-
height: R.bandwidth() -
|
|
2592
|
+
x: Math.min(N(0), N(z.value)),
|
|
2593
|
+
y: (R(z.label) ?? 0) + F,
|
|
2594
|
+
width: Math.abs(N(z.value) - N(0)),
|
|
2595
|
+
height: R.bandwidth() - F,
|
|
2594
2596
|
fill: ve.get(z.label) ?? (e.colors ?? za)[0],
|
|
2595
|
-
opacity:
|
|
2597
|
+
opacity: V ? ce.has(z.label) ? 1 : 0.35 : 1
|
|
2596
2598
|
};
|
|
2597
2599
|
}
|
|
2598
2600
|
});
|
|
2599
|
-
const
|
|
2600
|
-
if (e.tooltips &&
|
|
2601
|
+
const P = new Cc(xe);
|
|
2602
|
+
if (e.tooltips && P.use(ma({ numberFormat: (Q = e.horizontalAxis) == null ? void 0 : Q.numberFormat })), e.crosshair && P.use(La({
|
|
2601
2603
|
width: w,
|
|
2602
|
-
height:
|
|
2604
|
+
height: L,
|
|
2603
2605
|
direction: e.crosshairDirection,
|
|
2604
2606
|
style: e.crosshairStyle,
|
|
2605
2607
|
color: e.crosshairColor,
|
|
2606
2608
|
orientation: st.Horizontal
|
|
2607
|
-
})), (Z = e.annotations) != null && Z.length &&
|
|
2609
|
+
})), (Z = e.annotations) != null && Z.length && P.use(_a(e.annotations, {
|
|
2608
2610
|
scaleX: R,
|
|
2609
|
-
scaleY:
|
|
2610
|
-
data:
|
|
2611
|
+
scaleY: N,
|
|
2612
|
+
data: H,
|
|
2611
2613
|
width: w,
|
|
2612
|
-
height:
|
|
2614
|
+
height: L,
|
|
2613
2615
|
backgroundColor: Ft(t),
|
|
2614
2616
|
orientation: st.Horizontal,
|
|
2615
2617
|
transition: r,
|
|
2616
2618
|
priorAnnotations: s
|
|
2617
|
-
})),
|
|
2619
|
+
})), P.draw(H), e.valueLabels) {
|
|
2618
2620
|
const z = p.select(A).append("g");
|
|
2619
|
-
Pc(z,
|
|
2621
|
+
Pc(z, H, N, R, {
|
|
2620
2622
|
position: y,
|
|
2621
2623
|
colorOverrides: ve,
|
|
2622
2624
|
colors: e.colors ?? za,
|
|
2623
2625
|
swapLabelValue: x,
|
|
2624
|
-
categoryLabelOffset:
|
|
2626
|
+
categoryLabelOffset: F
|
|
2625
2627
|
});
|
|
2626
2628
|
}
|
|
2627
2629
|
}
|
|
2628
2630
|
if (g) {
|
|
2629
2631
|
const S = p.select(A).append("g").attr("class", "bc-category-labels");
|
|
2630
2632
|
for (const T of Y) {
|
|
2631
|
-
const
|
|
2632
|
-
S.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y",
|
|
2633
|
+
const P = R(T) ?? 0;
|
|
2634
|
+
S.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", P + vs / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(T);
|
|
2633
2635
|
}
|
|
2634
2636
|
}
|
|
2635
|
-
Rt(t, { chartType: "bar-horizontal", margin:
|
|
2637
|
+
Rt(t, { chartType: "bar-horizontal", margin: O }), n && (Nt(xe.node()), It(t, n));
|
|
2636
2638
|
}
|
|
2637
2639
|
function Oc(t, a, e, r, n = 0) {
|
|
2638
2640
|
const s = r === ze.Inside, o = (e(t.label) ?? 0) + n + (e.bandwidth() - n) / 2;
|
|
@@ -2766,16 +2768,16 @@ function Bc(t, a, e = {}, r = !1) {
|
|
|
2766
2768
|
s.set(le, re);
|
|
2767
2769
|
t.replaceChildren();
|
|
2768
2770
|
}
|
|
2769
|
-
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((M) => !Ma(M.name, e.seriesOverrides)), g = d.map((M) => M.name), b = e.colors ?? Fc, m = e.seriesOverrides, v = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", y = v ? "direct" : e.legend !== !1 ? "legend" : "none", x = e.legend !== !1 && !v, A = $t(c).width, w = 350,
|
|
2770
|
-
|
|
2771
|
-
const
|
|
2772
|
-
if (x &&
|
|
2773
|
-
const M =
|
|
2774
|
-
|
|
2771
|
+
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((M) => !Ma(M.name, e.seriesOverrides)), g = d.map((M) => M.name), b = e.colors ?? Fc, m = e.seriesOverrides, v = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", y = v ? "direct" : e.legend !== !1 ? "legend" : "none", x = e.legend !== !1 && !v, A = $t(c).width, w = 350, L = e.legendPosition ?? "top", O = A > 0 && A < w && (L === "left" || L === "right") ? "top" : L, F = e.legendAnchor ?? "start", I = d.flatMap((M) => M.values), J = wa(I, (Ae = e.verticalAxis) == null ? void 0 : Ae.range, (Pe = e.verticalAxis) == null ? void 0 : Pe.numberFormat, (Be = e.verticalAxis) == null ? void 0 : Be.scaleType), H = ea(A, (Ye = e.verticalAxis) == null ? void 0 : Ye.labelPosition, (We = e.horizontalAxis) == null ? void 0 : We.labelPosition, (Xe = e.verticalAxis) == null ? void 0 : Xe.direction, J), D = Math.max(0, A - (H.left ?? 50) - (H.right ?? 20)), j = sn(a.labels, D, e.horizontalAxis);
|
|
2772
|
+
j !== void 0 && (H.bottom = j);
|
|
2773
|
+
const q = H.top != null, ae = Math.max(0, A - (H.left ?? 50) - (H.right ?? 20)), fe = x ? ya(g, O, ae) : { width: 0, height: 0 }, ne = x ? fe.height + 15 : 0, N = { ...H };
|
|
2774
|
+
if (x && O === "top") {
|
|
2775
|
+
const M = q ? 15 : 0;
|
|
2776
|
+
N.top = ne + M;
|
|
2775
2777
|
}
|
|
2776
|
-
x &&
|
|
2777
|
-
const { chartArea: Y, width: R, height: ie, margin: he } = Gt(c,
|
|
2778
|
-
let [ce, ue] = Va(
|
|
2778
|
+
x && O === "bottom" && (N.bottom = (N.bottom ?? 24) + ne), x && O === "left" && (N.left = (N.left ?? 50) + fe.width + 10), x && O === "right" && (N.right = (N.right ?? 20) + fe.width + 10);
|
|
2779
|
+
const { chartArea: Y, width: R, height: ie, margin: he } = Gt(c, N), ve = Kt(o, he);
|
|
2780
|
+
let [ce, ue] = Va(I, (Qe = e.verticalAxis) == null ? void 0 : Qe.range, (Ue = e.verticalAxis) == null ? void 0 : Ue.scaleType);
|
|
2779
2781
|
if (e.valueLabels && ce < 0 && ((ft = (Re = e.verticalAxis) == null ? void 0 : Re.range) == null ? void 0 : ft.min) == null) {
|
|
2780
2782
|
const M = ue - ce;
|
|
2781
2783
|
ce -= M * 0.1;
|
|
@@ -2801,19 +2803,19 @@ function Bc(t, a, e = {}, r = !1) {
|
|
|
2801
2803
|
Me.set(`${M}\0${re.name}`, g[Te]);
|
|
2802
2804
|
});
|
|
2803
2805
|
});
|
|
2804
|
-
const
|
|
2806
|
+
const K = [];
|
|
2805
2807
|
a.labels.forEach((M, oe) => {
|
|
2806
2808
|
d.forEach((le) => {
|
|
2807
2809
|
const re = f.findIndex((je) => je.name === le.name), Te = e.sortMode === "within-groups" ? Me.get(`${M}\0${le.name}`) ?? le.name : le.name;
|
|
2808
|
-
|
|
2810
|
+
K.push({ label: M, series: Te, seriesName: le.name, value: le.values[oe], seriesIndex: re });
|
|
2809
2811
|
});
|
|
2810
2812
|
});
|
|
2811
|
-
const
|
|
2813
|
+
const te = e.valueLabels ?? !1, ke = Y.ownerSVGElement, me = ta(ke, t, "bars", { x: 0, y: 0, width: R, height: ie }), Ce = p.select(Y).append("g").attr("clip-path", `url(#${me})`), we = $a(t), Ne = Ce.append("g").node();
|
|
2812
2814
|
Ga(we, {
|
|
2813
2815
|
role: "mark-per-cell",
|
|
2814
2816
|
parent: Ne,
|
|
2815
2817
|
selector: ".bc-bar-multi",
|
|
2816
|
-
data:
|
|
2818
|
+
data: K,
|
|
2817
2819
|
key: (M) => `${M.label}\0${M.seriesName}`,
|
|
2818
2820
|
insert: (M) => M.append("rect").attr("class", "bc-bar bc-bar-multi"),
|
|
2819
2821
|
attrs: (M) => {
|
|
@@ -2842,41 +2844,41 @@ function Bc(t, a, e = {}, r = !1) {
|
|
|
2842
2844
|
}));
|
|
2843
2845
|
Oe.use(_a(e.annotations, { scaleX: ye, scaleY: pe, data: M, width: R, height: ie, backgroundColor: Ft(t), transition: r, priorAnnotations: s }));
|
|
2844
2846
|
}
|
|
2845
|
-
Oe.draw(
|
|
2847
|
+
Oe.draw(K), Rt(t, { chartType: "bar-multi", margin: he }), n && (Nt(Ce.node()), It(t, n));
|
|
2846
2848
|
const Q = /* @__PURE__ */ new Set();
|
|
2847
2849
|
d.forEach((M) => {
|
|
2848
2850
|
ha(M.name, y, m) === "direct" && Q.add(M.name);
|
|
2849
2851
|
});
|
|
2850
|
-
const Z = Q.size > 0, S = Ft(t), T = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? bt.Auto : bt.Off,
|
|
2851
|
-
function
|
|
2852
|
+
const Z = Q.size > 0, S = Ft(t), T = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? bt.Auto : bt.Off, P = e.directLabelAnchor ?? "middle", z = e.valueLabelPosition ?? ze.Auto;
|
|
2853
|
+
function V() {
|
|
2852
2854
|
return z === ze.Inside ? ze.Inside : (z === ze.Outside, ze.Outside);
|
|
2853
2855
|
}
|
|
2854
2856
|
function C(M) {
|
|
2855
|
-
return T === bt.Inside ? ze.Inside : T === bt.Outside ? ze.Outside :
|
|
2857
|
+
return T === bt.Inside ? ze.Inside : T === bt.Outside ? ze.Outside : te ? V() : ze.Outside;
|
|
2856
2858
|
}
|
|
2857
2859
|
function U(M, oe, le) {
|
|
2858
2860
|
return le === "start" ? M + 12 : le === "end" ? M + oe - 4 : M + oe / 2;
|
|
2859
2861
|
}
|
|
2860
2862
|
const E = p.select(Y).append("g").attr("class", "bc-value-labels");
|
|
2861
|
-
|
|
2862
|
-
if (!Ha(M.seriesName,
|
|
2863
|
+
K.forEach((M) => {
|
|
2864
|
+
if (!Ha(M.seriesName, te, m))
|
|
2863
2865
|
return;
|
|
2864
|
-
const oe = (ye(M.label) ?? 0) + (ge(M.series) ?? 0) + ge.bandwidth() / 2, le = Math.min(pe(0), pe(M.value)), re = Math.abs(pe(M.value) - pe(0)), Te =
|
|
2866
|
+
const oe = (ye(M.label) ?? 0) + (ge(M.series) ?? 0) + ge.bandwidth() / 2, le = Math.min(pe(0), pe(M.value)), re = Math.abs(pe(M.value) - pe(0)), Te = V(), je = Z && Q.has(M.seriesName), Ot = M.value < 0, it = le + re;
|
|
2865
2867
|
let Je, Pt, na;
|
|
2866
2868
|
if (Te === ze.Inside) {
|
|
2867
2869
|
const fa = qe(M.seriesName, M.seriesIndex, b, m);
|
|
2868
|
-
Pt = Et(fa), na = "central", je && C() === ze.Inside ? Je = U(le, re,
|
|
2870
|
+
Pt = Et(fa), na = "central", je && C() === ze.Inside ? Je = U(le, re, P) + 14 : Je = le + re / 2;
|
|
2869
2871
|
} else
|
|
2870
2872
|
Pt = "currentColor", Ot ? (Je = je && C() === ze.Outside ? it + 16 : it + 4, na = "hanging") : (Je = je && C() === ze.Outside ? le - 16 : le - 4, na = "auto");
|
|
2871
2873
|
E.append("text").attr("class", "bc-value-label").attr("data-series", M.seriesName).attr("x", oe).attr("y", Je).attr("text-anchor", "middle").attr("dominant-baseline", na).attr("font-size", "11px").attr("fill", Pt).text(String(M.value));
|
|
2872
|
-
}),
|
|
2874
|
+
}), K.forEach((M) => {
|
|
2873
2875
|
var Je;
|
|
2874
2876
|
if (!Q.has(M.seriesName))
|
|
2875
2877
|
return;
|
|
2876
2878
|
const oe = (ye(M.label) ?? 0) + (ge(M.series) ?? 0) + ge.bandwidth() / 2, le = Math.min(pe(0), pe(M.value)), re = Math.abs(pe(M.value) - pe(0)), Te = ((Je = m == null ? void 0 : m.find((Pt) => Pt.name === M.seriesName)) == null ? void 0 : Je.labelText) || M.seriesName, je = C(), Ot = qe(M.seriesName, M.seriesIndex, b, m), it = p.select(Y).append("text").attr("class", "bc-direct-label").attr("data-series", M.seriesName).attr("x", oe).attr("text-anchor", "middle").attr("font-size", "10px").text(Te);
|
|
2877
2879
|
if (je === ze.Inside) {
|
|
2878
|
-
const Pt = U(le, re,
|
|
2879
|
-
it.attr("y", Pt).attr("fill", Et(Ot)),
|
|
2880
|
+
const Pt = U(le, re, P);
|
|
2881
|
+
it.attr("y", Pt).attr("fill", Et(Ot)), P === "middle" && it.attr("dominant-baseline", "central");
|
|
2880
2882
|
} else
|
|
2881
2883
|
it.attr("y", le - 4).attr("fill", li(Ot, S));
|
|
2882
2884
|
});
|
|
@@ -2887,11 +2889,11 @@ function Bc(t, a, e = {}, r = !1) {
|
|
|
2887
2889
|
return qe(re, Te, b, m);
|
|
2888
2890
|
});
|
|
2889
2891
|
let oe = 0, le = 0;
|
|
2890
|
-
if (
|
|
2891
|
-
const re =
|
|
2892
|
+
if (O === "top") {
|
|
2893
|
+
const re = q ? 15 : 0;
|
|
2892
2894
|
le = -(fe.height + 10 + re);
|
|
2893
|
-
} else
|
|
2894
|
-
ba(Y, W, M, le,
|
|
2895
|
+
} else O === "bottom" ? le = ie + 25 : O === "left" ? oe = -(fe.width + 10) : O === "right" && (oe = R + 10);
|
|
2896
|
+
ba(Y, W, M, le, O, F, R, ie, oe, [], { left: he.left, right: he.right });
|
|
2895
2897
|
}
|
|
2896
2898
|
}
|
|
2897
2899
|
const Ic = {
|
|
@@ -2922,13 +2924,13 @@ function bi(t) {
|
|
|
2922
2924
|
if (A = a === ze.Inside, v = f + g / 2, x = "central", b)
|
|
2923
2925
|
A ? (m = c + 4, y = "start") : (m = c - 4, y = "end");
|
|
2924
2926
|
else {
|
|
2925
|
-
const
|
|
2926
|
-
A ? (m =
|
|
2927
|
+
const F = c + d;
|
|
2928
|
+
A ? (m = F - 4, y = "end") : (m = F + 4, y = "start");
|
|
2927
2929
|
}
|
|
2928
2930
|
else
|
|
2929
2931
|
A = a === ze.Inside, m = c + d / 2, y = "middle", b ? A ? (v = f + g / 2, x = "central") : (v = f + g + 4, x = "hanging") : A ? (v = f + g / 2, x = "central") : (v = f - 4, x = "auto");
|
|
2930
|
-
const w = i.attr("fill") || "#ccc",
|
|
2931
|
-
p.select(this.parentNode).append("text").attr("class", "bc-value-label").attr("x", m).attr("y", v).attr("text-anchor", y).attr("dominant-baseline", x).attr("font-size", "11px").attr("fill",
|
|
2932
|
+
const w = i.attr("fill") || "#ccc", L = A ? Et(w) : "currentColor";
|
|
2933
|
+
p.select(this.parentNode).append("text").attr("class", "bc-value-label").attr("x", m).attr("y", v).attr("text-anchor", y).attr("dominant-baseline", x).attr("font-size", "11px").attr("fill", L).text(r(o.value));
|
|
2932
2934
|
}), s.selectAll(".bc-dot").each(function(o) {
|
|
2933
2935
|
const i = p.select(this), c = parseFloat(i.attr("cx")), f = parseFloat(i.attr("cy"));
|
|
2934
2936
|
p.select(this.parentNode).append("text").attr("class", "bc-value-label").attr("x", c).attr("y", f - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text(r(o.value));
|
|
@@ -2979,44 +2981,44 @@ function Cr(t, a) {
|
|
|
2979
2981
|
container: g
|
|
2980
2982
|
} = a;
|
|
2981
2983
|
if (n.length === 0) {
|
|
2982
|
-
const
|
|
2984
|
+
const ne = () => {
|
|
2983
2985
|
};
|
|
2984
|
-
return g && Fa.set(g,
|
|
2986
|
+
return g && Fa.set(g, ne), ne;
|
|
2985
2987
|
}
|
|
2986
|
-
const b = c === Qt.Solid ? "none" : c === Qt.Dotted ? "2,2" : "4,3", m = [...new Set(n.map((
|
|
2988
|
+
const b = c === Qt.Solid ? "none" : c === Qt.Dotted ? "2,2" : "4,3", m = [...new Set(n.map((ne) => ne.cx))].sort((ne, N) => ne - N), v = p.select(t);
|
|
2987
2989
|
let y = null;
|
|
2988
2990
|
s && (Vc(), y = document.createElement("div"), y.className = mi, document.body.appendChild(y));
|
|
2989
|
-
const x = ".bc-annotations", A = !v.select(x).empty(), w = (
|
|
2990
|
-
let
|
|
2991
|
-
|
|
2992
|
-
const
|
|
2993
|
-
function
|
|
2991
|
+
const x = ".bc-annotations", A = !v.select(x).empty(), w = (ne) => A ? v.insert(ne, x) : v.append(ne), L = o && (i === pt.Both || i === pt.Vertical), O = o && (i === pt.Both || i === pt.Horizontal);
|
|
2992
|
+
let F = null, I = null;
|
|
2993
|
+
L && (F = w("line").attr("class", "bc-crosshair bc-crosshair-v").attr("y1", 0).attr("y2", r).attr("stroke", f).attr("stroke-width", 1).style("stroke-dasharray", b).attr("pointer-events", "none").style("display", "none")), O && (I = w("line").attr("class", "bc-crosshair bc-crosshair-h").attr("x1", 0).attr("x2", e).attr("stroke", f).attr("stroke-width", 1).style("stroke-dasharray", b).attr("pointer-events", "none").style("display", "none"));
|
|
2994
|
+
const J = w("circle").attr("class", "bc-proximity-dot").attr("r", 6).attr("fill", "none").attr("stroke", "#333").attr("stroke-width", 1).attr("opacity", 0.45).attr("pointer-events", "none").style("display", "none"), H = w("rect").attr("class", "bc-proximity-overlay").attr("width", e).attr("height", r).attr("fill", "none").attr("pointer-events", "all");
|
|
2995
|
+
function D(ne, N) {
|
|
2994
2996
|
if (m.length === 0)
|
|
2995
2997
|
return null;
|
|
2996
|
-
const Y = p.bisectCenter(m,
|
|
2998
|
+
const Y = p.bisectCenter(m, ne), R = m[Y], ie = n.filter((ce) => ce.cx === R);
|
|
2997
2999
|
if (ie.length === 0)
|
|
2998
3000
|
return null;
|
|
2999
|
-
let he = ie[0], ve = Math.abs(ie[0].cy -
|
|
3001
|
+
let he = ie[0], ve = Math.abs(ie[0].cy - N);
|
|
3000
3002
|
for (let ce = 1; ce < ie.length; ce++) {
|
|
3001
|
-
const ue = Math.abs(ie[ce].cy -
|
|
3003
|
+
const ue = Math.abs(ie[ce].cy - N);
|
|
3002
3004
|
ue < ve && (he = ie[ce], ve = ue);
|
|
3003
3005
|
}
|
|
3004
3006
|
return he;
|
|
3005
3007
|
}
|
|
3006
|
-
const
|
|
3007
|
-
const [
|
|
3008
|
-
R && (
|
|
3008
|
+
const j = (ne) => {
|
|
3009
|
+
const [N, Y] = p.pointer(ne, t), R = D(N, Y);
|
|
3010
|
+
R && (J.attr("cx", R.cx).attr("cy", R.cy).attr("stroke", R.color).style("display", null), y && (y.textContent = d(R), y.style.display = "block", Ns(J.node(), y, {
|
|
3009
3011
|
placement: "top",
|
|
3010
3012
|
middleware: [Bs(8), Is(), Vs()]
|
|
3011
3013
|
}).then(({ x: ie, y: he }) => {
|
|
3012
3014
|
y && (y.style.left = `${ie}px`, y.style.top = `${he}px`);
|
|
3013
|
-
})),
|
|
3014
|
-
},
|
|
3015
|
-
|
|
3016
|
-
},
|
|
3017
|
-
|
|
3015
|
+
})), F && F.attr("x1", R.cx).attr("x2", R.cx).style("display", null), I && I.attr("y1", R.cy).attr("y2", R.cy).style("display", null));
|
|
3016
|
+
}, q = () => {
|
|
3017
|
+
J.style("display", "none"), y && (y.style.display = "none"), F && F.style("display", "none"), I && I.style("display", "none");
|
|
3018
|
+
}, ae = H.node();
|
|
3019
|
+
ae.addEventListener("mousemove", j), ae.addEventListener("mouseleave", q);
|
|
3018
3020
|
const fe = () => {
|
|
3019
|
-
|
|
3021
|
+
ae.removeEventListener("mousemove", j), ae.removeEventListener("mouseleave", q), H.remove(), J.remove(), y && (y.remove(), y = null), F && F.remove(), I && I.remove(), g && Fa.get(g) === fe && Fa.delete(g);
|
|
3020
3022
|
};
|
|
3021
3023
|
return g && Fa.set(g, fe), fe;
|
|
3022
3024
|
}
|
|
@@ -3056,7 +3058,7 @@ function hn(t, a, e, r, n = !1) {
|
|
|
3056
3058
|
const m = Hc[s] ?? p.symbolCircle, v = Math.PI * c * c, y = p.symbol().type(m).size(v);
|
|
3057
3059
|
t.selectAll("circle.bc-symbol").remove();
|
|
3058
3060
|
const x = t.selectAll("path.bc-symbol").data(g).join(
|
|
3059
|
-
(w) => w.append("path").attr("class", "bc-symbol").attr("transform", (
|
|
3061
|
+
(w) => w.append("path").attr("class", "bc-symbol").attr("transform", (L) => `translate(${L.cx},${L.cy})`).attr("d", y).attr("fill", (L) => i === yt.Filled ? L.color : d).attr("stroke", (L) => L.color).attr("stroke-width", i === yt.Hollow ? 1.5 : 0).attr("opacity", f),
|
|
3060
3062
|
(w) => w,
|
|
3061
3063
|
(w) => w.remove()
|
|
3062
3064
|
);
|
|
@@ -3129,7 +3131,7 @@ class Rc extends ct {
|
|
|
3129
3131
|
}
|
|
3130
3132
|
}
|
|
3131
3133
|
function Wc(t, a, e = {}, r = !1) {
|
|
3132
|
-
var xe, pe, Me,
|
|
3134
|
+
var xe, pe, Me, K, te, ke, me, Ce, we, Ne, Oe, Q, Z;
|
|
3133
3135
|
Ht(r), Mr(t);
|
|
3134
3136
|
let n = [], s = [], o = [], i = null, c = null, f, d;
|
|
3135
3137
|
const g = Vt.for(t);
|
|
@@ -3137,27 +3139,27 @@ function Wc(t, a, e = {}, r = !1) {
|
|
|
3137
3139
|
const S = Yt(t);
|
|
3138
3140
|
d = S == null ? void 0 : S.margin, g.detach(), (S == null ? void 0 : S.chartType) === "line" ? (n = Array.from(t.querySelectorAll(".bc-frame .bc-area")), s = Array.from(t.querySelectorAll(".bc-frame .bc-line")), o = Array.from(t.querySelectorAll(".bc-frame .bc-dot")), i = t.querySelector(".bc-frame .bc-symbols")) : S && (c = Bt(t)), f = /* @__PURE__ */ new Map();
|
|
3139
3141
|
for (const T of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3140
|
-
for (const [
|
|
3141
|
-
f.set(
|
|
3142
|
+
for (const [P, z] of Mt(T))
|
|
3143
|
+
f.set(P, z);
|
|
3142
3144
|
t.replaceChildren();
|
|
3143
3145
|
}
|
|
3144
|
-
const { body: b } = _t(t, e.frame), m = $t(b).width, v = wa(a.values, (xe = e.verticalAxis) == null ? void 0 : xe.range, (pe = e.verticalAxis) == null ? void 0 : pe.numberFormat, (Me = e.verticalAxis) == null ? void 0 : Me.scaleType), y = ea(m, (
|
|
3146
|
+
const { body: b } = _t(t, e.frame), m = $t(b).width, v = wa(a.values, (xe = e.verticalAxis) == null ? void 0 : xe.range, (pe = e.verticalAxis) == null ? void 0 : pe.numberFormat, (Me = e.verticalAxis) == null ? void 0 : Me.scaleType), y = ea(m, (K = e.verticalAxis) == null ? void 0 : K.labelPosition, (te = e.horizontalAxis) == null ? void 0 : te.labelPosition, (ke = e.verticalAxis) == null ? void 0 : ke.direction, v), { chartArea: x, width: A, height: w, margin: L } = Gt(b, y), O = Kt(d, L), F = Lr(a.labels, (me = e.horizontalAxis) == null ? void 0 : me.range), I = F.map((S) => a.labels[S]), J = F.map((S) => a.values[S]), H = I.map((S, T) => ({
|
|
3145
3147
|
label: S,
|
|
3146
|
-
value:
|
|
3147
|
-
})),
|
|
3148
|
-
g.attach(x,
|
|
3149
|
-
vertical: { scale:
|
|
3150
|
-
horizontal: { scale:
|
|
3148
|
+
value: J[T]
|
|
3149
|
+
})), D = p.scalePoint().domain(I).range([0, A]).padding(e.edgePadding ? 0.6 : 0), j = D, q = (S) => D(S.label) ?? 0, ae = ((Ce = e.verticalAxis) == null ? void 0 : Ce.scaleType) === "log", [fe, ne] = Va(J, (we = e.verticalAxis) == null ? void 0 : we.range, (Ne = e.verticalAxis) == null ? void 0 : Ne.scaleType), N = ae ? p.scaleSymlog().domain([fe, ne]).nice().range([w, 0]) : p.scaleLinear().domain([fe, ne]).nice().range([w, 0]), Y = N.domain(), R = Y[0] < 0 && Y[1] > 0 ? N(0) : void 0;
|
|
3150
|
+
g.attach(x, O), g.update({
|
|
3151
|
+
vertical: { scale: N, height: w, options: { ...e.verticalAxis, gridWidth: A, topPadding: L.top } },
|
|
3152
|
+
horizontal: { scale: j, height: w, options: { ...e.horizontalAxis, width: A, zeroY: R } }
|
|
3151
3153
|
});
|
|
3152
3154
|
const ie = x.ownerSVGElement, he = ta(ie, t, "plot", { x: -1, y: -1, width: A + 2, height: w + 2 }), ve = p.select(x).append("g").attr("clip-path", `url(#${he})`), ce = ve.node(), ue = ((Oe = e.colors) == null ? void 0 : Oe[0]) ?? yi, Se = Aa(e.interpolation), ye = e.lineSymbols, ge = new Rc(p.select(ce));
|
|
3153
|
-
if (ge.config({ xPos:
|
|
3154
|
-
const S = (
|
|
3155
|
-
|
|
3156
|
-
}
|
|
3157
|
-
if (e.valueLabels && ge.use(bi({ position: e.valueLabelPosition, orientation: st.Vertical })), ge.draw(
|
|
3158
|
-
const S =
|
|
3159
|
-
cx:
|
|
3160
|
-
cy:
|
|
3155
|
+
if (ge.config({ xPos: q, y: N, color: ue, curve: Se, areaFill: e.areaFill ?? !1, areaFillOpacity: e.areaFillOpacity ?? 0.2, height: w }), s.length > 0 || n.length > 0 || o.length > 0) {
|
|
3156
|
+
const S = (O == null ? void 0 : O.dx) ?? 0, T = (O == null ? void 0 : O.dy) ?? 0, P = ce.querySelectorAll(":scope > g");
|
|
3157
|
+
P[0] && vt(P[0], n, S, T), P[1] && vt(P[1], s, S, T), P[2] && vt(P[2], o, S, T);
|
|
3158
|
+
}
|
|
3159
|
+
if (e.valueLabels && ge.use(bi({ position: e.valueLabelPosition, orientation: st.Vertical })), ge.draw(H), (Q = e.annotations) != null && Q.length && $r(x, e.annotations, { scaleX: j, scaleY: N, data: H, width: A, height: w, backgroundColor: Ft(t), transition: r, priorAnnotations: f }), p.select(ce).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3160
|
+
const S = H.map((T) => ({
|
|
3161
|
+
cx: q(T),
|
|
3162
|
+
cy: N(T.value),
|
|
3161
3163
|
label: T.label,
|
|
3162
3164
|
value: T.value,
|
|
3163
3165
|
color: ue
|
|
@@ -3176,16 +3178,16 @@ function Wc(t, a, e = {}, r = !1) {
|
|
|
3176
3178
|
});
|
|
3177
3179
|
}
|
|
3178
3180
|
if (ye) {
|
|
3179
|
-
const S =
|
|
3180
|
-
cx:
|
|
3181
|
-
cy:
|
|
3181
|
+
const S = H.map((P, z) => ({
|
|
3182
|
+
cx: q(P),
|
|
3183
|
+
cy: N(P.value),
|
|
3182
3184
|
color: ue,
|
|
3183
3185
|
index: z
|
|
3184
3186
|
}));
|
|
3185
3187
|
let T;
|
|
3186
|
-
i ? (x.appendChild(i), T = p.select(i)) : T = p.select(x).append("g").attr("class", "bc-symbols"), hn(T, S,
|
|
3188
|
+
i ? (x.appendChild(i), T = p.select(i)) : T = p.select(x).append("g").attr("class", "bc-symbols"), hn(T, S, H.length, ye, r);
|
|
3187
3189
|
}
|
|
3188
|
-
Rt(t, { chartType: "line", margin:
|
|
3190
|
+
Rt(t, { chartType: "line", margin: L }), c && (Nt(ve.node()), It(t, c));
|
|
3189
3191
|
}
|
|
3190
3192
|
const gn = 28, vi = 18, xi = 20;
|
|
3191
3193
|
function pn(t, a, e, r = gn) {
|
|
@@ -3213,18 +3215,18 @@ function Ai(t, a, e) {
|
|
|
3213
3215
|
function g(b, m) {
|
|
3214
3216
|
if (b.length === 0)
|
|
3215
3217
|
return;
|
|
3216
|
-
b.sort((
|
|
3217
|
-
const v = m ? 0.05 : Math.PI + 0.05, y = m ? Math.PI - 0.05 : 2 * Math.PI - 0.05, x = b.map((
|
|
3218
|
-
b.forEach((
|
|
3219
|
-
const
|
|
3220
|
-
if (!
|
|
3218
|
+
b.sort((O, F) => O.midAngle - F.midAngle);
|
|
3219
|
+
const v = m ? 0.05 : Math.PI + 0.05, y = m ? Math.PI - 0.05 : 2 * Math.PI - 0.05, x = b.map((O) => O.midAngle), A = pn(x, v, y, c), w = m ? 1 : -1, L = t.append("g").attr("class", "bc-arc-labels");
|
|
3220
|
+
b.forEach((O, F) => {
|
|
3221
|
+
const I = O.showLabel !== !1, J = O.showValue !== !1;
|
|
3222
|
+
if (!I && !J)
|
|
3221
3223
|
return;
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3224
|
-
const
|
|
3225
|
-
if (
|
|
3226
|
-
const R =
|
|
3227
|
-
Y.append("tspan").attr("x",
|
|
3224
|
+
const D = A[F] - Math.PI / 2, j = Math.cos(D) * o, q = Math.sin(D) * o, ae = Math.cos(D) * i, fe = Math.sin(D) * i, ne = ae + w * xi;
|
|
3225
|
+
L.append("polyline").attr("class", "bc-arc-label-line").attr("points", `${j},${q} ${ae},${fe} ${ne},${fe}`).attr("fill", "none").attr("stroke", "var(--bc-text-color, #999)").attr("stroke-width", 1).attr("opacity", 0.5);
|
|
3226
|
+
const N = ne + w * 4, Y = L.append("text").attr("class", "bc-arc-direct-label").attr("x", N).attr("y", fe).attr("text-anchor", m ? "start" : "end").attr("font-size", `${n}px`);
|
|
3227
|
+
if (I && Y.append("tspan").attr("x", N).attr("dy", J ? "-0.1em" : "0.35em").attr("font-weight", "bold").attr("fill", li(O.color, s)).text(O.label), J) {
|
|
3228
|
+
const R = O.displayAsPercentage && O.percentage != null ? `${Math.round(O.percentage)}%` : String(O.value);
|
|
3229
|
+
Y.append("tspan").attr("x", N).attr("dy", I ? "1.2em" : "0.35em").attr("fill", "var(--bc-text-color, #666)").text(R);
|
|
3228
3230
|
}
|
|
3229
3231
|
});
|
|
3230
3232
|
}
|
|
@@ -3346,42 +3348,42 @@ function jc(t, a, e = {}, r = !1) {
|
|
|
3346
3348
|
let n = a, s = [], o = [], i = [], c = [], f = null, d, g;
|
|
3347
3349
|
const b = Vt.for(t);
|
|
3348
3350
|
if (r) {
|
|
3349
|
-
const
|
|
3350
|
-
g =
|
|
3351
|
+
const se = Yt(t);
|
|
3352
|
+
g = se == null ? void 0 : se.margin, b.detach(), (se == null ? void 0 : se.chartType) === "line-multi" ? (s = Array.from(t.querySelectorAll(".bc-frame .bc-area")), o = Array.from(t.querySelectorAll(".bc-frame .bc-line")), i = Array.from(t.querySelectorAll(".bc-frame .bc-dot")), c = Array.from(t.querySelectorAll(".bc-frame .bc-symbols"))) : se && (f = Bt(t)), d = /* @__PURE__ */ new Map();
|
|
3351
3353
|
for (const Le of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3352
3354
|
for (const [Fe, Ve] of Mt(Le))
|
|
3353
3355
|
d.set(Fe, Ve);
|
|
3354
3356
|
t.replaceChildren();
|
|
3355
3357
|
}
|
|
3356
3358
|
const { body: m } = _t(t, e.frame), v = n.series ?? [];
|
|
3357
|
-
let y = v.filter((
|
|
3358
|
-
(e.sortMode === "total" || e.sortMode === "within-groups") && (y = [...y].sort((
|
|
3359
|
-
const Fe =
|
|
3359
|
+
let y = v.filter((se) => !Ma(se.name, e.seriesOverrides));
|
|
3360
|
+
(e.sortMode === "total" || e.sortMode === "within-groups") && (y = [...y].sort((se, Le) => {
|
|
3361
|
+
const Fe = se.values.reduce((rt, nt) => rt + nt, 0);
|
|
3360
3362
|
return Le.values.reduce((rt, nt) => rt + nt, 0) - Fe;
|
|
3361
3363
|
}));
|
|
3362
|
-
const x = e.colors ?? ki, A = y.map((
|
|
3363
|
-
y = y.map((
|
|
3364
|
-
const
|
|
3365
|
-
if (
|
|
3366
|
-
const
|
|
3367
|
-
ue.top = ce +
|
|
3368
|
-
}
|
|
3369
|
-
|
|
3370
|
-
const { chartArea: Se, width: ye, height: ge, margin: xe } = Gt(m, ue), pe = Kt(g, xe), [Me,
|
|
3364
|
+
const x = e.colors ?? ki, A = y.map((se) => se.name), w = e.seriesOverrides, L = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", O = L ? "direct" : e.legend !== !1 ? "legend" : "none", F = A.filter((se) => ha(se, O, w) === "direct"), I = e.legend !== !1 && !L, J = $t(m).width, H = 350, D = e.legendPosition ?? "top", j = J > 0 && J < H && (D === "left" || D === "right") ? "top" : D, q = e.legendAnchor ?? "start", ae = Lr(n.labels, (M = e.horizontalAxis) == null ? void 0 : M.range), fe = ae.map((se) => n.labels[se]);
|
|
3365
|
+
y = y.map((se) => ({ ...se, values: ae.map((Le) => se.values[Le]) })), n = { ...n, labels: fe, series: y };
|
|
3366
|
+
const ne = y.flatMap((se) => se.values), N = wa(ne, (oe = e.verticalAxis) == null ? void 0 : oe.range, (le = e.verticalAxis) == null ? void 0 : le.numberFormat, (re = e.verticalAxis) == null ? void 0 : re.scaleType), Y = ea(J, (Te = e.verticalAxis) == null ? void 0 : Te.labelPosition, (je = e.horizontalAxis) == null ? void 0 : je.labelPosition, (Ot = e.verticalAxis) == null ? void 0 : Ot.direction, N), R = F.length > 0 ? gi(F) : 0, ie = Y.top != null, he = Math.max(0, J - (Y.left ?? 50) - (Y.right ?? 20) - R), ve = I ? ya(A, j, he) : { width: 0, height: 0 }, ce = I ? ve.height + 15 : 0, ue = { ...Y };
|
|
3367
|
+
if (I && j === "top") {
|
|
3368
|
+
const se = ie ? 15 : 0;
|
|
3369
|
+
ue.top = ce + se;
|
|
3370
|
+
}
|
|
3371
|
+
I && j === "bottom" && (ue.bottom = (ue.bottom ?? 24) + ce), I && j === "left" && (ue.left = (ue.left ?? 50) + ve.width + 10), I && j === "right" && (ue.right = (ue.right ?? 20) + ve.width + 10), R > 0 && (ue.right = (ue.right ?? 20) + R);
|
|
3372
|
+
const { chartArea: Se, width: ye, height: ge, margin: xe } = Gt(m, ue), pe = Kt(g, xe), [Me, K] = Va(ne, (it = e.verticalAxis) == null ? void 0 : it.range, (Je = e.verticalAxis) == null ? void 0 : Je.scaleType), te = p.scalePoint().domain(n.labels).range([0, ye]).padding(e.edgePadding ? 0.6 : 0), ke = te, me = (se) => te(n.labels[se]) ?? 0, we = ((Pt = e.verticalAxis) == null ? void 0 : Pt.scaleType) === "log" ? p.scaleSymlog().domain([Me, K]).nice().range([ge, 0]) : p.scaleLinear().domain([Me, K]).nice().range([ge, 0]), Ne = we.domain(), Oe = Ne[0] < 0 && Ne[1] > 0 ? we(0) : void 0;
|
|
3371
3373
|
b.attach(Se, pe), b.update({
|
|
3372
3374
|
vertical: { scale: we, height: ge, options: { ...e.verticalAxis, gridWidth: ye, topPadding: xe.top } },
|
|
3373
3375
|
horizontal: { scale: ke, height: ge, options: { ...e.horizontalAxis, width: ye, zeroY: Oe } }
|
|
3374
3376
|
});
|
|
3375
|
-
const Q = Se.ownerSVGElement, Z = ta(Q, t, "plot", { x: 0, y: 0, width: ye, height: ge }), S = p.select(Se).append("g").attr("clip-path", `url(#${Z})`), T = S.node(),
|
|
3376
|
-
name:
|
|
3377
|
-
values:
|
|
3378
|
-
colorIndex: v.findIndex((Le) => Le.name ===
|
|
3377
|
+
const Q = Se.ownerSVGElement, Z = ta(Q, t, "plot", { x: 0, y: 0, width: ye, height: ge }), S = p.select(Se).append("g").attr("clip-path", `url(#${Z})`), T = S.node(), P = y.map((se) => ({
|
|
3378
|
+
name: se.name,
|
|
3379
|
+
values: se.values,
|
|
3380
|
+
colorIndex: v.findIndex((Le) => Le.name === se.name)
|
|
3379
3381
|
})), z = Aa(e.interpolation);
|
|
3380
3382
|
(na = e.areaFills) != null && na.length && Zc(T, e.areaFills, y, me, n.labels.length, we, z);
|
|
3381
|
-
const
|
|
3382
|
-
y.forEach((
|
|
3383
|
+
const V = [];
|
|
3384
|
+
y.forEach((se, Le) => {
|
|
3383
3385
|
n.labels.forEach((Fe, Ve) => {
|
|
3384
|
-
|
|
3386
|
+
V.push({ label: Fe, value: se.values[Ve], series: se.name, colorIndex: Le });
|
|
3385
3387
|
});
|
|
3386
3388
|
});
|
|
3387
3389
|
const C = e.lineSymbols, U = {
|
|
@@ -3389,49 +3391,49 @@ function jc(t, a, e = {}, r = !1) {
|
|
|
3389
3391
|
dotted: "2,4",
|
|
3390
3392
|
dashed: "8,4",
|
|
3391
3393
|
"dash-dot": "8,4,2,4"
|
|
3392
|
-
}, E = e.valueLabels ?? !1, W = new Set((e.highlights ?? []).map((
|
|
3393
|
-
Pe.config({ xPos: me, y: we, colors: x, labels: n.labels, curve: z, areaFill: e.areaFill ?? !1, areaFillOpacity: e.areaFillOpacity ?? 0.2, height: ge, dots:
|
|
3394
|
-
const Be = new Set(
|
|
3394
|
+
}, E = e.valueLabels ?? !1, W = new Set((e.highlights ?? []).map((se) => se.target)), Ae = W.size > 0, Pe = new Uc(p.select(T));
|
|
3395
|
+
Pe.config({ xPos: me, y: we, colors: x, labels: n.labels, curve: z, areaFill: e.areaFill ?? !1, areaFillOpacity: e.areaFillOpacity ?? 0.2, height: ge, dots: V, highlightTargets: W });
|
|
3396
|
+
const Be = new Set(P.map((se) => se.name)), Ye = s.filter((se) => {
|
|
3395
3397
|
var Le;
|
|
3396
|
-
return Be.has(((Le =
|
|
3397
|
-
}), We = o.filter((
|
|
3398
|
+
return Be.has(((Le = se.__data__) == null ? void 0 : Le.name) ?? "");
|
|
3399
|
+
}), We = o.filter((se) => {
|
|
3398
3400
|
var Le;
|
|
3399
|
-
return Be.has(((Le =
|
|
3400
|
-
}), Xe = i.filter((
|
|
3401
|
+
return Be.has(((Le = se.__data__) == null ? void 0 : Le.name) ?? "");
|
|
3402
|
+
}), Xe = i.filter((se) => {
|
|
3401
3403
|
var Le;
|
|
3402
|
-
return Be.has(((Le =
|
|
3404
|
+
return Be.has(((Le = se.__data__) == null ? void 0 : Le.series) ?? "");
|
|
3403
3405
|
});
|
|
3404
3406
|
if (We.length > 0 || Ye.length > 0 || Xe.length > 0) {
|
|
3405
|
-
const
|
|
3406
|
-
Fe[0] && vt(Fe[0], Ye,
|
|
3407
|
+
const se = (pe == null ? void 0 : pe.dx) ?? 0, Le = (pe == null ? void 0 : pe.dy) ?? 0, Fe = T.querySelectorAll(":scope > g");
|
|
3408
|
+
Fe[0] && vt(Fe[0], Ye, se, Le), Fe[1] && vt(Fe[1], We, se, Le), Fe[2] && vt(Fe[2], Xe, se, Le);
|
|
3407
3409
|
}
|
|
3408
|
-
if (Pe.draw(
|
|
3409
|
-
const
|
|
3410
|
+
if (Pe.draw(P), (fa = e.annotations) != null && fa.length) {
|
|
3411
|
+
const se = n.labels.map((Le, Fe) => {
|
|
3410
3412
|
var Ve;
|
|
3411
3413
|
return {
|
|
3412
3414
|
label: Le,
|
|
3413
3415
|
value: ((Ve = y[0]) == null ? void 0 : Ve.values[Fe]) ?? 0
|
|
3414
3416
|
};
|
|
3415
3417
|
});
|
|
3416
|
-
$r(Se, e.annotations, { scaleX: ke, scaleY: we, data:
|
|
3418
|
+
$r(Se, e.annotations, { scaleX: ke, scaleY: we, data: se, width: ye, height: ge, backgroundColor: Ft(t), transition: r, priorAnnotations: d });
|
|
3417
3419
|
}
|
|
3418
3420
|
const Qe = p.select(T).append("g").attr("class", "bc-value-labels");
|
|
3419
|
-
if (
|
|
3420
|
-
if (!Ha(
|
|
3421
|
+
if (V.forEach((se) => {
|
|
3422
|
+
if (!Ha(se.series, E, w))
|
|
3421
3423
|
return;
|
|
3422
|
-
const Le = me(n.labels.indexOf(
|
|
3423
|
-
Qe.append("text").attr("class", "bc-value-label").attr("data-series",
|
|
3424
|
-
}), p.select(T).selectAll(".bc-line").each(function(
|
|
3425
|
-
const Le =
|
|
3424
|
+
const Le = me(n.labels.indexOf(se.label)), Fe = we(se.value);
|
|
3425
|
+
Qe.append("text").attr("class", "bc-value-label").attr("data-series", se.colorIndex).attr("x", Le).attr("y", Fe - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text(String(se.value));
|
|
3426
|
+
}), p.select(T).selectAll(".bc-line").each(function(se) {
|
|
3427
|
+
const Le = se, Fe = qe(Le.name, Le.colorIndex, x, w), Ve = Dc(Le.name, w), rt = zc(Le.name, w), nt = pi(Le.name, e.interpolation ?? "linear", w), Wt = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
3426
3428
|
if (Wt.attr("stroke", Fe).attr("stroke-width", Ve), Ae && Wt.attr("opacity", W.has(Le.name) ? 1 : 0.3), rt !== "solid" && p.select(this).attr("stroke-dasharray", U[rt] ?? ""), nt !== (e.interpolation ?? "linear")) {
|
|
3427
3429
|
const da = Aa(nt), Oa = p.line().curve(da).x((qt, qr) => me(qr)).y((qt) => we(qt));
|
|
3428
3430
|
Wt.attr("d", Oa(Le.values));
|
|
3429
3431
|
}
|
|
3430
|
-
}), p.select(T).selectAll(".bc-area").each(function(
|
|
3431
|
-
const Le =
|
|
3432
|
+
}), p.select(T).selectAll(".bc-area").each(function(se) {
|
|
3433
|
+
const Le = se, Fe = qe(Le.name, Le.colorIndex, x, w), Ve = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
3432
3434
|
Ve.attr("fill", Fe), Ae && Ve.attr("opacity", W.has(Le.name) ? e.areaFillOpacity ?? 0.2 : 0.1);
|
|
3433
3435
|
}), p.select(T).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3434
|
-
const
|
|
3436
|
+
const se = V.map((Le) => ({
|
|
3435
3437
|
cx: me(n.labels.indexOf(Le.label)),
|
|
3436
3438
|
cy: we(Le.value),
|
|
3437
3439
|
label: Le.label,
|
|
@@ -3442,7 +3444,7 @@ function jc(t, a, e = {}, r = !1) {
|
|
|
3442
3444
|
Cr(Se, {
|
|
3443
3445
|
width: ye,
|
|
3444
3446
|
height: ge,
|
|
3445
|
-
points:
|
|
3447
|
+
points: se,
|
|
3446
3448
|
tooltip: e.tooltips,
|
|
3447
3449
|
crosshair: e.crosshair,
|
|
3448
3450
|
crosshairDirection: e.crosshairDirection,
|
|
@@ -3459,8 +3461,8 @@ function jc(t, a, e = {}, r = !1) {
|
|
|
3459
3461
|
symbolSize: C.size,
|
|
3460
3462
|
symbolOpacity: C.opacity
|
|
3461
3463
|
} : void 0, Re = n.labels.length;
|
|
3462
|
-
y.forEach((
|
|
3463
|
-
const Fe = Ec(
|
|
3464
|
+
y.forEach((se, Le) => {
|
|
3465
|
+
const Fe = Ec(se.name, Ue, w);
|
|
3464
3466
|
if (!Fe)
|
|
3465
3467
|
return;
|
|
3466
3468
|
const Ve = {
|
|
@@ -3471,39 +3473,39 @@ function jc(t, a, e = {}, r = !1) {
|
|
|
3471
3473
|
opacity: Fe.symbolOpacity ?? (C == null ? void 0 : C.opacity) ?? 1
|
|
3472
3474
|
}, rt = n.labels.map((Oa, qt) => ({
|
|
3473
3475
|
cx: me(qt),
|
|
3474
|
-
cy: we(
|
|
3475
|
-
color: qe(
|
|
3476
|
+
cy: we(se.values[qt]),
|
|
3477
|
+
color: qe(se.name, Le, x, w),
|
|
3476
3478
|
index: qt
|
|
3477
|
-
})), nt = c.find((Oa) => Oa.getAttribute("data-series-name") ===
|
|
3479
|
+
})), nt = c.find((Oa) => Oa.getAttribute("data-series-name") === se.name);
|
|
3478
3480
|
let Wt, da = !1;
|
|
3479
|
-
nt ? (Se.appendChild(nt), Wt = p.select(nt), da = !0) : Wt = p.select(Se).append("g").attr("class", "bc-symbols").attr("data-series", Le).attr("data-series-name",
|
|
3481
|
+
nt ? (Se.appendChild(nt), Wt = p.select(nt), da = !0) : Wt = p.select(Se).append("g").attr("class", "bc-symbols").attr("data-series", Le).attr("data-series-name", se.name), hn(Wt, rt, Re, Ve, r && da);
|
|
3480
3482
|
});
|
|
3481
3483
|
const ft = n.labels.length - 1, mt = me(ft) + 6, at = [];
|
|
3482
|
-
if (y.forEach((
|
|
3484
|
+
if (y.forEach((se, Le) => {
|
|
3483
3485
|
var nt;
|
|
3484
|
-
if (ha(
|
|
3486
|
+
if (ha(se.name, O, w) !== "direct")
|
|
3485
3487
|
return;
|
|
3486
|
-
const Ve =
|
|
3487
|
-
at.push({ name:
|
|
3488
|
+
const Ve = se.values[ft], rt = ((nt = w == null ? void 0 : w.find((Wt) => Wt.name === se.name)) == null ? void 0 : nt.labelText) || se.name;
|
|
3489
|
+
at.push({ name: se.name, index: Le, naturalY: we(Ve), text: rt });
|
|
3488
3490
|
}), at.length > 0) {
|
|
3489
3491
|
at.sort((Ve, rt) => Ve.naturalY - rt.naturalY);
|
|
3490
|
-
const
|
|
3492
|
+
const se = at.map((Ve) => Ve.naturalY), Fe = pn(se, 0, ge, 14);
|
|
3491
3493
|
at.forEach((Ve, rt) => {
|
|
3492
3494
|
p.select(Se).append("text").attr("class", "bc-direct-label").attr("data-series", Ve.index).attr("x", mt).attr("y", Fe[rt]).attr("dy", "0.35em").attr("font-size", "11px").attr("fill", qe(Ve.name, Ve.index, x, w)).text(Ve.text);
|
|
3493
3495
|
});
|
|
3494
3496
|
}
|
|
3495
|
-
const Ct = A.filter((
|
|
3496
|
-
if (
|
|
3497
|
-
const
|
|
3497
|
+
const Ct = A.filter((se) => ha(se, O, w) === "legend");
|
|
3498
|
+
if (I && Ct.length > 0) {
|
|
3499
|
+
const se = Ct.map((Ve) => {
|
|
3498
3500
|
const rt = v.findIndex((nt) => nt.name === Ve);
|
|
3499
3501
|
return qe(Ve, rt, x, w);
|
|
3500
3502
|
});
|
|
3501
3503
|
let Le = 0, Fe = 0;
|
|
3502
|
-
if (
|
|
3504
|
+
if (j === "top") {
|
|
3503
3505
|
const Ve = ie ? 15 : 0;
|
|
3504
3506
|
Fe = -(ve.height + 10 + Ve);
|
|
3505
|
-
} else
|
|
3506
|
-
ba(Se, Ct,
|
|
3507
|
+
} else j === "bottom" ? Fe = ge + 25 : j === "left" ? Le = -(ve.width + 10) : j === "right" && (Le = ye + 10);
|
|
3508
|
+
ba(Se, Ct, se, Fe, j, q, ye, ge, Le, [], { left: xe.left, right: xe.right });
|
|
3507
3509
|
}
|
|
3508
3510
|
Rt(t, { chartType: "line-multi", margin: xe }), f && (Nt(S.node()), It(t, f));
|
|
3509
3511
|
}
|
|
@@ -3540,10 +3542,10 @@ function Jc(t, a, e, r, n, s, o, i, c) {
|
|
|
3540
3542
|
for (let v = 0; v < f; v++) {
|
|
3541
3543
|
const y = r(v), x = n(a[v]), A = n(e[v]);
|
|
3542
3544
|
if (d.push({ x: y, fromY: x, toY: A }), v < f - 1) {
|
|
3543
|
-
const w = n(a[v + 1]),
|
|
3544
|
-
if (
|
|
3545
|
-
const
|
|
3546
|
-
d.push({ x:
|
|
3545
|
+
const w = n(a[v + 1]), L = n(e[v + 1]), O = Qc(x, w, A, L);
|
|
3546
|
+
if (O !== null && O > 0 && O < 1) {
|
|
3547
|
+
const F = y + O * (r(v + 1) - y), I = x + O * (w - x), J = A + O * (L - A);
|
|
3548
|
+
d.push({ x: F, fromY: I, toY: J });
|
|
3547
3549
|
}
|
|
3548
3550
|
}
|
|
3549
3551
|
}
|
|
@@ -3586,8 +3588,8 @@ function Li(t, a, e, r, n = !1) {
|
|
|
3586
3588
|
Ht(n);
|
|
3587
3589
|
let s = null, o;
|
|
3588
3590
|
if (n) {
|
|
3589
|
-
const
|
|
3590
|
-
|
|
3591
|
+
const K = Yt(t), te = r > 0 ? "donut" : "pie";
|
|
3592
|
+
K && K.chartType !== te && (s = Bt(t)), o = /* @__PURE__ */ new Map();
|
|
3591
3593
|
for (const ke of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3592
3594
|
for (const [me, Ce] of Mt(ke))
|
|
3593
3595
|
o.set(me, Ce);
|
|
@@ -3596,51 +3598,51 @@ function Li(t, a, e, r, n = !1) {
|
|
|
3596
3598
|
const { body: i } = _t(t, e.frame);
|
|
3597
3599
|
let c = [...a.labels], f = [...a.values];
|
|
3598
3600
|
if (e.sort === lt.Ascending || e.sort === lt.Descending) {
|
|
3599
|
-
const
|
|
3600
|
-
|
|
3601
|
+
const K = c.map((te, ke) => ({ label: te, value: f[ke] }));
|
|
3602
|
+
K.sort((te, ke) => e.sort === lt.Ascending ? te.value - ke.value : ke.value - te.value), c = K.map((te) => te.label), f = K.map((te) => te.value);
|
|
3601
3603
|
}
|
|
3602
3604
|
if (e.sliceMax && e.sliceMax > 0 && c.length > e.sliceMax) {
|
|
3603
|
-
const
|
|
3604
|
-
|
|
3605
|
-
}
|
|
3606
|
-
const d = f.reduce((
|
|
3607
|
-
if (w &&
|
|
3608
|
-
const
|
|
3609
|
-
|
|
3610
|
-
}
|
|
3611
|
-
const { chartArea: fe, width:
|
|
3612
|
-
label: c[
|
|
3613
|
-
arc:
|
|
3614
|
-
color: he(c[
|
|
3605
|
+
const K = e.sliceMax - 1, te = c.slice(0, K), ke = f.slice(0, K), me = f.slice(K).reduce((Ce, we) => Ce + we, 0);
|
|
3606
|
+
te.push(e.sliceGroupLabel ?? "Others"), ke.push(me), c = te, f = ke;
|
|
3607
|
+
}
|
|
3608
|
+
const d = f.reduce((K, te) => K + te, 0), g = f.map((K) => d > 0 ? K / d * 100 : 0), b = e.colors ?? Kc, m = b.length < c.length && b.length >= 2 ? Ge.scale(b).mode("lch").colors(c.length) : b, v = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? bt.Auto : bt.Off, y = !!v && !(v === bt.Auto && e.legend === !0), A = (e.showValues ?? !0) && !y ? f.map((K, te) => `(${e.displayAsPercentage ? `${Math.round(g[te])}%` : String(K)})`) : [], w = e.legend !== !1 && !y, L = $t(i).width, O = 350, F = e.legendPosition ?? "top", I = L > 0 && L < O && (F === "left" || F === "right") ? "top" : F, J = e.legendAnchor ?? "start", H = A.length > 0 ? c.map((K, te) => `${K} ${A[te]}`) : c, D = Math.max(0, L - 50 - 20), j = w ? ya(H, I, D) : { width: 0, height: 0 }, q = w ? j.height + 15 : 0, ae = {};
|
|
3609
|
+
if (w && I === "top" && (ae.top = q), w && I === "bottom" && (ae.bottom = 24 + q), w && I === "left" && (ae.left = 50 + j.width + 10), w && I === "right" && (ae.right = 20 + j.width + 10), y) {
|
|
3610
|
+
const K = $t(i), te = 20, ke = K.width - 2 * te, me = (K.height > 0 ? K.height : 400) - 2 * te, Ce = Math.min(ke, me) / 2, we = Xc(c, Ce);
|
|
3611
|
+
ae.left = (ae.left ?? te) + we.left, ae.right = (ae.right ?? te) + we.right, ae.top = (ae.top ?? te) + we.top, ae.bottom = (ae.bottom ?? te) + we.bottom;
|
|
3612
|
+
}
|
|
3613
|
+
const { chartArea: fe, width: ne, height: N, margin: Y } = Gt(i, ae), R = Math.min(ne, N) / 2, ie = R * r, he = p.scaleOrdinal().domain(c).range(m), ve = p.pie().sort(null), ce = p.arc().innerRadius(ie).outerRadius(R), ue = p.select(fe).append("g").attr("transform", `translate(${ne / 2},${N / 2})`), Se = ve(f), ye = Se.map((K, te) => ({
|
|
3614
|
+
label: c[te],
|
|
3615
|
+
arc: K,
|
|
3616
|
+
color: he(c[te])
|
|
3615
3617
|
})), ge = $a(t), xe = ue.append("g").node();
|
|
3616
3618
|
Ga(ge, {
|
|
3617
3619
|
role: "mark-per-category",
|
|
3618
3620
|
parent: xe,
|
|
3619
3621
|
selector: ".bc-arc",
|
|
3620
3622
|
data: ye,
|
|
3621
|
-
key: (
|
|
3622
|
-
insert: (
|
|
3623
|
-
attrs: (
|
|
3624
|
-
d: ce(
|
|
3625
|
-
fill:
|
|
3623
|
+
key: (K) => K.label,
|
|
3624
|
+
insert: (K) => K.append("path").attr("class", "bc-arc"),
|
|
3625
|
+
attrs: (K) => ({
|
|
3626
|
+
d: ce(K.arc) ?? "",
|
|
3627
|
+
fill: K.color
|
|
3626
3628
|
})
|
|
3627
3629
|
});
|
|
3628
3630
|
const pe = new ef(ue);
|
|
3629
3631
|
if (e.tooltips && pe.use(ma()), pe.draw(ye), (Me = e.annotations) != null && Me.length) {
|
|
3630
|
-
const
|
|
3631
|
-
|
|
3632
|
-
scaleX: p.scaleBand().domain([]).range([0,
|
|
3633
|
-
scaleY: p.scaleLinear().domain([0, 1]).range([
|
|
3632
|
+
const K = e.annotations.filter((te) => te.kind === "free");
|
|
3633
|
+
K.length && _a(K, {
|
|
3634
|
+
scaleX: p.scaleBand().domain([]).range([0, ne]),
|
|
3635
|
+
scaleY: p.scaleLinear().domain([0, 1]).range([N, 0]),
|
|
3634
3636
|
data: [],
|
|
3635
|
-
width:
|
|
3636
|
-
height:
|
|
3637
|
+
width: ne,
|
|
3638
|
+
height: N,
|
|
3637
3639
|
backgroundColor: Ft(t),
|
|
3638
3640
|
transition: n,
|
|
3639
3641
|
priorAnnotations: o
|
|
3640
3642
|
}).postDraw({ base: p.select(fe) }, void 0);
|
|
3641
3643
|
}
|
|
3642
3644
|
if (y) {
|
|
3643
|
-
const
|
|
3645
|
+
const K = Se.map((Ce, we) => ({
|
|
3644
3646
|
label: c[we],
|
|
3645
3647
|
value: Ce.data,
|
|
3646
3648
|
startAngle: Ce.startAngle,
|
|
@@ -3650,16 +3652,16 @@ function Li(t, a, e, r, n = !1) {
|
|
|
3650
3652
|
displayAsPercentage: e.displayAsPercentage,
|
|
3651
3653
|
showLabel: e.showLabels ?? !0,
|
|
3652
3654
|
showValue: e.showValues ?? !0
|
|
3653
|
-
})),
|
|
3654
|
-
v === bt.Inside ? Si(
|
|
3655
|
+
})), te = ue, ke = Ft(t), me = { outerRadius: R, innerRadius: ie, bgColor: ke };
|
|
3656
|
+
v === bt.Inside ? Si(te, K, me) : v === bt.Auto ? qc(te, K, me) : Ai(te, K, me);
|
|
3655
3657
|
}
|
|
3656
3658
|
if (e.showTotal && r > 0 && !e.displayAsPercentage) {
|
|
3657
|
-
const
|
|
3658
|
-
ue.append("text").attr("class", "bc-arc-total-label").attr("text-anchor", "middle").attr("dy", "-0.3em").attr("font-size", "11px").attr("fill", "var(--bc-text-color, #555)").attr("opacity", 0.7).text("Total"), ue.append("text").attr("class", "bc-arc-total-value").attr("text-anchor", "middle").attr("dy", "1em").attr("font-size", "18px").attr("font-weight", "bold").attr("fill", "var(--bc-text-color, #555)").text(
|
|
3659
|
+
const K = String(d);
|
|
3660
|
+
ue.append("text").attr("class", "bc-arc-total-label").attr("text-anchor", "middle").attr("dy", "-0.3em").attr("font-size", "11px").attr("fill", "var(--bc-text-color, #555)").attr("opacity", 0.7).text("Total"), ue.append("text").attr("class", "bc-arc-total-value").attr("text-anchor", "middle").attr("dy", "1em").attr("font-size", "18px").attr("font-weight", "bold").attr("fill", "var(--bc-text-color, #555)").text(K);
|
|
3659
3661
|
}
|
|
3660
3662
|
if (w) {
|
|
3661
|
-
let
|
|
3662
|
-
|
|
3663
|
+
let K = 0, te = 0;
|
|
3664
|
+
I === "top" ? te = -(j.height + 10) : I === "bottom" ? te = N + 25 : I === "left" ? K = -(j.width + 10) : I === "right" && (K = ne + 10), ba(fe, c, m, te, I, J, ne, N, K, A, { left: Y.left, right: Y.right });
|
|
3663
3665
|
}
|
|
3664
3666
|
Rt(t, { chartType: r > 0 ? "donut" : "pie" }), s && (Nt(ue.node()), It(t, s));
|
|
3665
3667
|
}
|
|
@@ -3732,7 +3734,7 @@ class rf extends ct {
|
|
|
3732
3734
|
}
|
|
3733
3735
|
}
|
|
3734
3736
|
function nf(t, a, e = {}, r = !1) {
|
|
3735
|
-
var xe, pe, Me,
|
|
3737
|
+
var xe, pe, Me, K, te, ke, me, Ce, we, Ne, Oe, Q, Z;
|
|
3736
3738
|
Ht(r), Mr(t);
|
|
3737
3739
|
let n = [], s = [], o = [], i = null, c = null, f, d;
|
|
3738
3740
|
const g = Vt.for(t);
|
|
@@ -3740,27 +3742,27 @@ function nf(t, a, e = {}, r = !1) {
|
|
|
3740
3742
|
const S = Yt(t);
|
|
3741
3743
|
d = S == null ? void 0 : S.margin, g.detach(), (S == null ? void 0 : S.chartType) === "area" ? (n = Array.from(t.querySelectorAll(".bc-frame .bc-area")), s = Array.from(t.querySelectorAll(".bc-frame .bc-line")), o = Array.from(t.querySelectorAll(".bc-frame .bc-dot")), i = t.querySelector(".bc-frame .bc-symbols")) : S && (c = Bt(t)), f = /* @__PURE__ */ new Map();
|
|
3742
3744
|
for (const T of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3743
|
-
for (const [
|
|
3744
|
-
f.set(
|
|
3745
|
+
for (const [P, z] of Mt(T))
|
|
3746
|
+
f.set(P, z);
|
|
3745
3747
|
t.replaceChildren();
|
|
3746
3748
|
}
|
|
3747
|
-
const { body: b } = _t(t, e.frame), m = $t(b).width, v = wa(a.values, (xe = e.verticalAxis) == null ? void 0 : xe.range, (pe = e.verticalAxis) == null ? void 0 : pe.numberFormat, (Me = e.verticalAxis) == null ? void 0 : Me.scaleType), y = ea(m, (
|
|
3749
|
+
const { body: b } = _t(t, e.frame), m = $t(b).width, v = wa(a.values, (xe = e.verticalAxis) == null ? void 0 : xe.range, (pe = e.verticalAxis) == null ? void 0 : pe.numberFormat, (Me = e.verticalAxis) == null ? void 0 : Me.scaleType), y = ea(m, (K = e.verticalAxis) == null ? void 0 : K.labelPosition, (te = e.horizontalAxis) == null ? void 0 : te.labelPosition, (ke = e.verticalAxis) == null ? void 0 : ke.direction, v), { chartArea: x, width: A, height: w, margin: L } = Gt(b, y), O = Kt(d, L), F = Lr(a.labels, (me = e.horizontalAxis) == null ? void 0 : me.range), I = F.map((S) => a.labels[S]), J = F.map((S) => a.values[S]), H = I.map((S, T) => ({
|
|
3748
3750
|
label: S,
|
|
3749
|
-
value:
|
|
3750
|
-
})),
|
|
3751
|
-
g.attach(x,
|
|
3752
|
-
vertical: { scale:
|
|
3753
|
-
horizontal: { scale:
|
|
3751
|
+
value: J[T]
|
|
3752
|
+
})), D = p.scalePoint().domain(I).range([0, A]).padding(e.edgePadding ? 0.6 : 0), j = D, q = (S) => D(S.label) ?? 0, ae = ((Ce = e.verticalAxis) == null ? void 0 : Ce.scaleType) === "log", [fe, ne] = Va(J, (we = e.verticalAxis) == null ? void 0 : we.range, (Ne = e.verticalAxis) == null ? void 0 : Ne.scaleType), N = ae ? p.scaleSymlog().domain([fe, ne]).nice().range([w, 0]) : p.scaleLinear().domain([fe, ne]).nice().range([w, 0]), Y = N.domain(), R = Y[0] < 0 && Y[1] > 0 ? N(0) : void 0;
|
|
3753
|
+
g.attach(x, O), g.update({
|
|
3754
|
+
vertical: { scale: N, height: w, options: { ...e.verticalAxis, gridWidth: A, topPadding: L.top } },
|
|
3755
|
+
horizontal: { scale: j, height: w, options: { ...e.horizontalAxis, width: A, zeroY: R } }
|
|
3754
3756
|
});
|
|
3755
3757
|
const ie = x.ownerSVGElement, he = ta(ie, t, "plot", { x: 0, y: 0, width: A, height: w }), ve = p.select(x).append("g").attr("clip-path", `url(#${he})`), ce = ve.node(), ue = ((Oe = e.colors) == null ? void 0 : Oe[0]) ?? $i, Se = Aa(e.interpolation ?? "monotoneX"), ye = e.lineSymbols, ge = new rf(p.select(ce));
|
|
3756
|
-
if (ge.config({ xPos:
|
|
3757
|
-
const S = (
|
|
3758
|
-
|
|
3759
|
-
}
|
|
3760
|
-
if (e.valueLabels && ge.use(bi({ position: e.valueLabelPosition, orientation: st.Vertical })), ge.draw(
|
|
3761
|
-
const S =
|
|
3762
|
-
cx:
|
|
3763
|
-
cy:
|
|
3758
|
+
if (ge.config({ xPos: q, y: N, color: ue, curve: Se, areaFillOpacity: e.areaFillOpacity ?? 0.25, height: w }), s.length > 0 || n.length > 0 || o.length > 0) {
|
|
3759
|
+
const S = (O == null ? void 0 : O.dx) ?? 0, T = (O == null ? void 0 : O.dy) ?? 0, P = ce.querySelectorAll(":scope > g");
|
|
3760
|
+
P[0] && vt(P[0], n, S, T), P[1] && vt(P[1], s, S, T), P[2] && vt(P[2], o, S, T);
|
|
3761
|
+
}
|
|
3762
|
+
if (e.valueLabels && ge.use(bi({ position: e.valueLabelPosition, orientation: st.Vertical })), ge.draw(H), (Q = e.annotations) != null && Q.length && $r(x, e.annotations, { scaleX: j, scaleY: N, data: H, width: A, height: w, backgroundColor: Ft(t), transition: r, priorAnnotations: f }), p.select(ce).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3763
|
+
const S = H.map((T) => ({
|
|
3764
|
+
cx: q(T),
|
|
3765
|
+
cy: N(T.value),
|
|
3764
3766
|
label: T.label,
|
|
3765
3767
|
value: T.value,
|
|
3766
3768
|
color: ue
|
|
@@ -3779,16 +3781,16 @@ function nf(t, a, e = {}, r = !1) {
|
|
|
3779
3781
|
});
|
|
3780
3782
|
}
|
|
3781
3783
|
if (ye) {
|
|
3782
|
-
const S =
|
|
3783
|
-
cx:
|
|
3784
|
-
cy:
|
|
3784
|
+
const S = H.map((P, z) => ({
|
|
3785
|
+
cx: q(P),
|
|
3786
|
+
cy: N(P.value),
|
|
3785
3787
|
color: ue,
|
|
3786
3788
|
index: z
|
|
3787
3789
|
}));
|
|
3788
3790
|
let T;
|
|
3789
|
-
i ? (x.appendChild(i), T = p.select(i)) : T = p.select(x).append("g").attr("class", "bc-symbols"), hn(T, S,
|
|
3791
|
+
i ? (x.appendChild(i), T = p.select(i)) : T = p.select(x).append("g").attr("class", "bc-symbols"), hn(T, S, H.length, ye, r);
|
|
3790
3792
|
}
|
|
3791
|
-
Rt(t, { chartType: "area", margin:
|
|
3793
|
+
Rt(t, { chartType: "area", margin: L }), c && (Nt(ve.node()), It(t, c));
|
|
3792
3794
|
}
|
|
3793
3795
|
function bn(t) {
|
|
3794
3796
|
const a = t.series ?? [];
|
|
@@ -3893,47 +3895,47 @@ function of(t, a, e = {}, r = !1) {
|
|
|
3893
3895
|
const M = b.map((le) => n.labels[le]), oe = (n.series ?? []).map((le) => ({ ...le, values: b.map((re) => le.values[re]) }));
|
|
3894
3896
|
n = { labels: M, values: b.map((le) => n.values[le]), series: oe };
|
|
3895
3897
|
}
|
|
3896
|
-
const m = n.series ?? [], v = m.filter((M) => !Ma(M.name, e.seriesOverrides)), y = e.colors ?? Mi, x = v.map((M) => M.name), A = e.seriesOverrides, w = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto",
|
|
3898
|
+
const m = n.series ?? [], v = m.filter((M) => !Ma(M.name, e.seriesOverrides)), y = e.colors ?? Mi, x = v.map((M) => M.name), A = e.seriesOverrides, w = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", L = w ? "direct" : e.legend !== !1 ? "legend" : "none", O = x.filter((M) => ha(M, L, A) === "direct"), F = e.legend !== !1 && !w, I = $t(g).width, J = 350, H = e.legendPosition ?? "top", D = I > 0 && I < J && (H === "left" || H === "right") ? "top" : H, j = e.legendAnchor ?? "start", q = e.stacked !== !1, ae = e.stackPercent === !0 || e.stackMode === va.Percent, fe = e.areaSortMode ?? lt.None, ne = e.areaLines !== !1, N = [...v];
|
|
3897
3899
|
if (fe !== lt.None) {
|
|
3898
|
-
const M = new Map(
|
|
3899
|
-
|
|
3900
|
+
const M = new Map(N.map((oe) => [oe.name, oe.values.reduce((le, re) => le + re, 0)]));
|
|
3901
|
+
N.sort((oe, le) => {
|
|
3900
3902
|
const re = (M.get(oe.name) ?? 0) - (M.get(le.name) ?? 0);
|
|
3901
3903
|
return fe === lt.Ascending ? re : -re;
|
|
3902
3904
|
});
|
|
3903
3905
|
}
|
|
3904
|
-
const Y = { labels: n.labels, values: n.values, series:
|
|
3906
|
+
const Y = { labels: n.labels, values: n.values, series: N }, R = ae ? mn(Y) : bn(Y);
|
|
3905
3907
|
let ie = 0;
|
|
3906
|
-
if (
|
|
3908
|
+
if (q)
|
|
3907
3909
|
for (const M of R)
|
|
3908
3910
|
for (const oe of M)
|
|
3909
3911
|
oe[1] > ie && (ie = oe[1]);
|
|
3910
3912
|
else
|
|
3911
|
-
for (const M of
|
|
3913
|
+
for (const M of N)
|
|
3912
3914
|
for (const oe of M.values)
|
|
3913
3915
|
oe > ie && (ie = oe);
|
|
3914
|
-
|
|
3915
|
-
const he = [0, ie], ve = ((Xe = e.verticalAxis) == null ? void 0 : Xe.numberFormat) ?? (
|
|
3916
|
-
if (
|
|
3916
|
+
ae && (ie = 100);
|
|
3917
|
+
const he = [0, ie], ve = ((Xe = e.verticalAxis) == null ? void 0 : Xe.numberFormat) ?? (ae ? "|d|%" : void 0), ce = wa(he, (Qe = e.verticalAxis) == null ? void 0 : Qe.range, ve, (Ue = e.verticalAxis) == null ? void 0 : Ue.scaleType), ue = ea(I, (Re = e.verticalAxis) == null ? void 0 : Re.labelPosition, (ft = e.horizontalAxis) == null ? void 0 : ft.labelPosition, (mt = e.verticalAxis) == null ? void 0 : mt.direction, ce), Se = O.length > 0 ? gi(O) : 0, ye = ue.top != null, ge = Math.max(0, I - (ue.left ?? 50) - (ue.right ?? 20) - Se), xe = F ? ya(x, D, ge) : { width: 0, height: 0 }, pe = F ? xe.height + 15 : 0, Me = { ...ue };
|
|
3918
|
+
if (F && D === "top") {
|
|
3917
3919
|
const M = ye ? 15 : 0;
|
|
3918
3920
|
Me.top = pe + M;
|
|
3919
3921
|
}
|
|
3920
|
-
|
|
3921
|
-
const { chartArea:
|
|
3922
|
-
d.attach(
|
|
3922
|
+
F && D === "bottom" && (Me.bottom = (Me.bottom ?? 24) + pe), F && D === "left" && (Me.left = (Me.left ?? 50) + xe.width + 10), F && D === "right" && (Me.right = (Me.right ?? 20) + xe.width + 10), Se > 0 && (Me.right = (Me.right ?? 20) + Se);
|
|
3923
|
+
const { chartArea: K, width: te, height: ke, margin: me } = Gt(g, Me), Ce = Kt(f, me), we = p.scalePoint().domain(n.labels).range([0, te]).padding(e.edgePadding ? 0.6 : 0), Ne = we, Oe = (M) => we(n.labels[M]) ?? 0, Q = p.scaleLinear().domain([0, ie]).nice().range([ke, 0]);
|
|
3924
|
+
d.attach(K, Ce), d.update({
|
|
3923
3925
|
vertical: {
|
|
3924
3926
|
scale: Q,
|
|
3925
3927
|
height: ke,
|
|
3926
|
-
options: { ...e.verticalAxis, numberFormat: ve, gridWidth:
|
|
3928
|
+
options: { ...e.verticalAxis, numberFormat: ve, gridWidth: te, topPadding: me.top }
|
|
3927
3929
|
},
|
|
3928
|
-
horizontal: { scale: Ne, height: ke, options: { ...e.horizontalAxis, width:
|
|
3930
|
+
horizontal: { scale: Ne, height: ke, options: { ...e.horizontalAxis, width: te } }
|
|
3929
3931
|
});
|
|
3930
|
-
const Z =
|
|
3932
|
+
const Z = K.ownerSVGElement, S = ta(Z, t, "plot", { x: 0, y: 0, width: te, height: ke }), T = p.select(K).append("g").attr("clip-path", `url(#${S})`), P = T.node(), z = Aa(e.interpolation ?? "monotoneX"), V = R.map((M) => {
|
|
3931
3933
|
const oe = m.findIndex((re) => re.name === M.key);
|
|
3932
3934
|
let le;
|
|
3933
|
-
if (
|
|
3935
|
+
if (q)
|
|
3934
3936
|
le = Array.from(M).map((re) => [Q(re[0]), Q(re[1])]);
|
|
3935
3937
|
else {
|
|
3936
|
-
const re =
|
|
3938
|
+
const re = N.find((Te) => Te.name === M.key);
|
|
3937
3939
|
le = ((re == null ? void 0 : re.values) ?? []).map((Te) => [Q(0), Q(Te)]);
|
|
3938
3940
|
}
|
|
3939
3941
|
return {
|
|
@@ -3941,15 +3943,15 @@ function of(t, a, e = {}, r = !1) {
|
|
|
3941
3943
|
points: le,
|
|
3942
3944
|
colorIndex: oe >= 0 ? oe : 0
|
|
3943
3945
|
};
|
|
3944
|
-
}), C = new Set((e.highlights ?? []).map((M) => M.target)), U = C.size > 0, E = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, W = new sf(p.select(
|
|
3946
|
+
}), C = new Set((e.highlights ?? []).map((M) => M.target)), U = C.size > 0, E = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, W = new sf(p.select(P));
|
|
3945
3947
|
if (W.config({ xPos: Oe, colors: y, curve: z, areaFillOpacity: E, highlightTargets: C }), s.length > 0 || o.length > 0) {
|
|
3946
|
-
const M = (Ce == null ? void 0 : Ce.dx) ?? 0, oe = (Ce == null ? void 0 : Ce.dy) ?? 0, le =
|
|
3948
|
+
const M = (Ce == null ? void 0 : Ce.dx) ?? 0, oe = (Ce == null ? void 0 : Ce.dy) ?? 0, le = P.querySelectorAll(":scope > g");
|
|
3947
3949
|
le[0] && vt(le[0], s, M, oe), le[1] && vt(le[1], o, M, oe);
|
|
3948
3950
|
}
|
|
3949
|
-
if (W.draw(
|
|
3951
|
+
if (W.draw(V), p.select(P).selectAll(".bc-area").each(function(M) {
|
|
3950
3952
|
const oe = M, le = qe(oe.name, oe.colorIndex, y, A), re = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
3951
3953
|
re.attr("fill", le), U && re.attr("opacity", C.has(oe.name) ? E : 0.3);
|
|
3952
|
-
}),
|
|
3954
|
+
}), ne || p.select(P).selectAll(".bc-line").attr("display", "none"), p.select(P).selectAll(".bc-line").each(function(M) {
|
|
3953
3955
|
const oe = M, le = qe(oe.name, oe.colorIndex, y, A), re = pi(oe.name, e.interpolation ?? "monotoneX", A), Te = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
3954
3956
|
if (Te.attr("stroke", le), U && Te.attr("opacity", C.has(oe.name) ? 1 : 0.3), re !== (e.interpolation ?? "monotoneX")) {
|
|
3955
3957
|
const je = Aa(re), Ot = p.line().curve(je).x((it, Je) => Oe(Je)).y((it) => it[1]);
|
|
@@ -3963,7 +3965,7 @@ function of(t, a, e = {}, r = !1) {
|
|
|
3963
3965
|
value: ((re = v[0]) == null ? void 0 : re.values[le]) ?? 0
|
|
3964
3966
|
};
|
|
3965
3967
|
});
|
|
3966
|
-
$r(
|
|
3968
|
+
$r(K, e.annotations, { scaleX: Ne, scaleY: Q, data: M, width: te, height: ke, backgroundColor: Ft(t), transition: r, priorAnnotations: c });
|
|
3967
3969
|
}
|
|
3968
3970
|
if (e.tooltips || e.crosshair) {
|
|
3969
3971
|
const M = [];
|
|
@@ -3980,8 +3982,8 @@ function of(t, a, e = {}, r = !1) {
|
|
|
3980
3982
|
color: qe(oe.key, le, y, A)
|
|
3981
3983
|
});
|
|
3982
3984
|
});
|
|
3983
|
-
}), Cr(
|
|
3984
|
-
width:
|
|
3985
|
+
}), Cr(K, {
|
|
3986
|
+
width: te,
|
|
3985
3987
|
height: ke,
|
|
3986
3988
|
points: M,
|
|
3987
3989
|
tooltip: e.tooltips,
|
|
@@ -3996,7 +3998,7 @@ function of(t, a, e = {}, r = !1) {
|
|
|
3996
3998
|
const Ae = n.labels.length - 1, Pe = Oe(Ae) + 6, Be = [];
|
|
3997
3999
|
if (v.forEach((M, oe) => {
|
|
3998
4000
|
var it;
|
|
3999
|
-
if (ha(M.name,
|
|
4001
|
+
if (ha(M.name, L, A) !== "direct")
|
|
4000
4002
|
return;
|
|
4001
4003
|
const re = R.find((Je) => Je.key === M.name);
|
|
4002
4004
|
if (!re)
|
|
@@ -4007,21 +4009,21 @@ function of(t, a, e = {}, r = !1) {
|
|
|
4007
4009
|
Be.sort((re, Te) => re.naturalY - Te.naturalY);
|
|
4008
4010
|
const M = Be.map((re) => re.naturalY), le = pn(M, 0, ke, 14);
|
|
4009
4011
|
Be.forEach((re, Te) => {
|
|
4010
|
-
p.select(
|
|
4012
|
+
p.select(K).append("text").attr("class", "bc-direct-label").attr("data-series", re.index).attr("x", Pe).attr("y", le[Te]).attr("dy", "0.35em").attr("font-size", "11px").attr("fill", qe(re.name, re.index, y, A)).text(re.text);
|
|
4011
4013
|
});
|
|
4012
4014
|
}
|
|
4013
|
-
const Ye = x.filter((M) => ha(M,
|
|
4014
|
-
if (
|
|
4015
|
+
const Ye = x.filter((M) => ha(M, L, A) === "legend");
|
|
4016
|
+
if (F && Ye.length > 0) {
|
|
4015
4017
|
const M = Ye.map((re) => {
|
|
4016
4018
|
const Te = m.findIndex((je) => je.name === re);
|
|
4017
4019
|
return qe(re, Te, y, A);
|
|
4018
4020
|
});
|
|
4019
4021
|
let oe = 0, le = 0;
|
|
4020
|
-
if (
|
|
4022
|
+
if (D === "top") {
|
|
4021
4023
|
const re = ye ? 15 : 0;
|
|
4022
4024
|
le = -(xe.height + 10 + re);
|
|
4023
|
-
} else
|
|
4024
|
-
ba(
|
|
4025
|
+
} else D === "bottom" ? le = ke + 25 : D === "left" ? oe = -(xe.width + 10) : D === "right" && (oe = te + 10);
|
|
4026
|
+
ba(K, Ye, M, le, D, j, te, ke, oe, [], { left: me.left, right: me.right });
|
|
4025
4027
|
}
|
|
4026
4028
|
Rt(t, { chartType: "area-stacked", margin: me }), i && (Nt(T.node()), It(t, i));
|
|
4027
4029
|
}
|
|
@@ -4080,80 +4082,80 @@ function cf(t, a, e) {
|
|
|
4080
4082
|
return r;
|
|
4081
4083
|
}
|
|
4082
4084
|
function ff(t, a, e = {}, r = !1) {
|
|
4083
|
-
var Ne, Oe, Q, Z, S, T,
|
|
4085
|
+
var Ne, Oe, Q, Z, S, T, P, z;
|
|
4084
4086
|
Ht(r);
|
|
4085
4087
|
let n = [], s = null, o, i;
|
|
4086
4088
|
const c = Vt.for(t);
|
|
4087
4089
|
if (r) {
|
|
4088
|
-
const
|
|
4089
|
-
i =
|
|
4090
|
+
const V = Yt(t);
|
|
4091
|
+
i = V == null ? void 0 : V.margin, c.detach(), (V == null ? void 0 : V.chartType) === "column-stacked" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-stacked")) : V && (s = Bt(t)), o = /* @__PURE__ */ new Map();
|
|
4090
4092
|
for (const C of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
4091
4093
|
for (const [U, E] of Mt(C))
|
|
4092
4094
|
o.set(U, E);
|
|
4093
4095
|
t.replaceChildren();
|
|
4094
4096
|
}
|
|
4095
|
-
const { body: f } = _t(t, e.frame), d = a.series ?? [], g = d.filter((
|
|
4096
|
-
|
|
4097
|
-
const
|
|
4098
|
-
if (y &&
|
|
4099
|
-
const
|
|
4100
|
-
he.top = ie +
|
|
4097
|
+
const { body: f } = _t(t, e.frame), d = a.series ?? [], g = d.filter((V) => !Ma(V.name, e.seriesOverrides)), b = g.map((V) => V.name), m = e.colors ?? Ci, v = e.seriesOverrides, y = e.legend !== !1, x = $t(f).width, A = 350, w = e.legendPosition ?? "top", L = x > 0 && x < A && (w === "left" || w === "right") ? "top" : w, O = e.legendAnchor ?? "start", F = { labels: a.labels, values: a.values, series: g }, I = e.stackMode === va.Percent, J = I ? mn(F) : bn(F), H = cf(J, a.labels, d), D = I ? 100 : p.max(H, (V) => V.y1) ?? 0, q = wa([0, D], (Ne = e.verticalAxis) == null ? void 0 : Ne.range, (Oe = e.verticalAxis) == null ? void 0 : Oe.numberFormat, (Q = e.verticalAxis) == null ? void 0 : Q.scaleType), ae = ea(x, (Z = e.verticalAxis) == null ? void 0 : Z.labelPosition, (S = e.horizontalAxis) == null ? void 0 : S.labelPosition, (T = e.verticalAxis) == null ? void 0 : T.direction, q), fe = Math.max(0, x - (ae.left ?? 50) - (ae.right ?? 20)), ne = sn(a.labels, fe, e.horizontalAxis);
|
|
4098
|
+
ne !== void 0 && (ae.bottom = ne);
|
|
4099
|
+
const N = ae.top != null, Y = Math.max(0, x - (ae.left ?? 50) - (ae.right ?? 20)), R = y ? ya(b, L, Y) : { width: 0, height: 0 }, ie = y ? R.height + 15 : 0, he = { ...ae };
|
|
4100
|
+
if (y && L === "top") {
|
|
4101
|
+
const V = N ? 15 : 0;
|
|
4102
|
+
he.top = ie + V;
|
|
4101
4103
|
}
|
|
4102
|
-
y &&
|
|
4104
|
+
y && L === "bottom" && (he.bottom = (he.bottom ?? 24) + ie), y && L === "left" && (he.left = (he.left ?? 50) + R.width + 10), y && L === "right" && (he.right = (he.right ?? 20) + R.width + 10);
|
|
4103
4105
|
const { chartArea: ve, width: ce, height: ue, margin: Se } = Gt(f, he), ye = Kt(i, Se);
|
|
4104
4106
|
let ge = a.labels;
|
|
4105
4107
|
if (e.sortMode === "total") {
|
|
4106
|
-
const
|
|
4108
|
+
const V = a.labels.map((C, U) => ({
|
|
4107
4109
|
label: C,
|
|
4108
4110
|
index: U,
|
|
4109
4111
|
total: g.reduce((E, W) => E + (W.values[U] ?? 0), 0)
|
|
4110
4112
|
}));
|
|
4111
|
-
|
|
4113
|
+
V.sort((C, U) => U.total - C.total), ge = V.map((C) => C.label);
|
|
4112
4114
|
}
|
|
4113
|
-
const xe = p.scaleBand().domain(ge).range([0, ce]).padding(ka(e.barGap)), pe = p.scaleLinear().domain([0,
|
|
4115
|
+
const xe = p.scaleBand().domain(ge).range([0, ce]).padding(ka(e.barGap)), pe = p.scaleLinear().domain([0, D]).nice().range([ue, 0]);
|
|
4114
4116
|
c.attach(ve, ye), c.update({
|
|
4115
4117
|
vertical: { scale: pe, height: ue, options: { ...e.verticalAxis, gridWidth: ce, topPadding: Se.top } },
|
|
4116
4118
|
horizontal: { scale: xe, height: ue, options: { ...e.horizontalAxis, width: ce } }
|
|
4117
4119
|
});
|
|
4118
|
-
const Me = ve.ownerSVGElement,
|
|
4120
|
+
const Me = ve.ownerSVGElement, K = ta(Me, t, "bars", { x: 0, y: 0, width: ce, height: ue }), te = p.select(ve).append("g").attr("clip-path", `url(#${K})`), ke = ge === a.labels ? H : ge.flatMap((V) => H.filter((C) => C.label === V)), me = new lf(te);
|
|
4119
4121
|
if (me.config({ x: xe, y: pe, colors: m }), n.length > 0) {
|
|
4120
|
-
const
|
|
4121
|
-
vt(
|
|
4122
|
+
const V = te.node().querySelector("g");
|
|
4123
|
+
vt(V, n, (ye == null ? void 0 : ye.dx) ?? 0, (ye == null ? void 0 : ye.dy) ?? 0);
|
|
4122
4124
|
}
|
|
4123
|
-
if (e.tooltips && me.use(ma({ numberFormat: (
|
|
4125
|
+
if (e.tooltips && me.use(ma({ numberFormat: (P = e.verticalAxis) == null ? void 0 : P.numberFormat })), e.crosshair && me.use(La({
|
|
4124
4126
|
width: ce,
|
|
4125
4127
|
height: ue,
|
|
4126
4128
|
direction: e.crosshairDirection,
|
|
4127
4129
|
style: e.crosshairStyle,
|
|
4128
4130
|
color: e.crosshairColor
|
|
4129
4131
|
})), (z = e.annotations) != null && z.length) {
|
|
4130
|
-
const
|
|
4132
|
+
const V = a.labels.map((C, U) => ({
|
|
4131
4133
|
label: C,
|
|
4132
4134
|
value: g.reduce((E, W) => E + (W.values[U] ?? 0), 0)
|
|
4133
4135
|
}));
|
|
4134
|
-
me.use(_a(e.annotations, { scaleX: xe, scaleY: pe, data:
|
|
4136
|
+
me.use(_a(e.annotations, { scaleX: xe, scaleY: pe, data: V, width: ce, height: ue, backgroundColor: Ft(t), transition: r, priorAnnotations: o }));
|
|
4135
4137
|
}
|
|
4136
|
-
me.draw(ke), Rt(t, { chartType: "column-stacked", margin: Se }), s && (Nt(
|
|
4137
|
-
const C =
|
|
4138
|
+
me.draw(ke), Rt(t, { chartType: "column-stacked", margin: Se }), s && (Nt(te.node()), It(t, s)), p.select(ve).selectAll(".bc-bar-stacked").each(function(V) {
|
|
4139
|
+
const C = V, U = qe(C.seriesName, C.seriesIndex, m, v), E = Ka(C.seriesName, v), W = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
4138
4140
|
W.attr("fill", U), E < 1 && W.attr("fill-opacity", E);
|
|
4139
4141
|
});
|
|
4140
4142
|
const Ce = e.valueLabels ?? !1, we = p.select(ve).append("g").attr("class", "bc-value-labels");
|
|
4141
|
-
if (ke.forEach((
|
|
4142
|
-
if (!Ha(
|
|
4143
|
+
if (ke.forEach((V) => {
|
|
4144
|
+
if (!Ha(V.seriesName, Ce, v))
|
|
4143
4145
|
return;
|
|
4144
|
-
const C = (xe(
|
|
4145
|
-
we.append("text").attr("class", "bc-value-label").attr("data-series",
|
|
4146
|
+
const C = (xe(V.label) ?? 0) + xe.bandwidth() / 2, U = pe(V.y0) - (pe(V.y0) - pe(V.y1)) / 2;
|
|
4147
|
+
we.append("text").attr("class", "bc-value-label").attr("data-series", V.seriesName).attr("x", C).attr("y", U).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", "currentColor").text(I ? `${Math.round(V.value)}%` : String(Math.round(V.value * 100) / 100));
|
|
4146
4148
|
}), y && b.length > 0) {
|
|
4147
|
-
const
|
|
4149
|
+
const V = b.map((E) => {
|
|
4148
4150
|
const W = d.findIndex((Ae) => Ae.name === E);
|
|
4149
4151
|
return qe(E, W, m, v);
|
|
4150
4152
|
});
|
|
4151
4153
|
let C = 0, U = 0;
|
|
4152
|
-
if (
|
|
4153
|
-
const E =
|
|
4154
|
+
if (L === "top") {
|
|
4155
|
+
const E = N ? 15 : 0;
|
|
4154
4156
|
U = -(R.height + 10 + E);
|
|
4155
|
-
} else
|
|
4156
|
-
ba(ve, b,
|
|
4157
|
+
} else L === "bottom" ? U = ue + 25 : L === "left" ? C = -(R.width + 10) : L === "right" && (C = ce + 10);
|
|
4158
|
+
ba(ve, b, V, U, L, O, ce, ue, C, [], { left: Se.left, right: Se.right });
|
|
4157
4159
|
}
|
|
4158
4160
|
}
|
|
4159
4161
|
const Oi = [
|
|
@@ -4211,7 +4213,7 @@ function uf(t, a, e) {
|
|
|
4211
4213
|
return r;
|
|
4212
4214
|
}
|
|
4213
4215
|
function hf(t, a, e = {}, r = !1) {
|
|
4214
|
-
var S, T,
|
|
4216
|
+
var S, T, P, z, V, C, U;
|
|
4215
4217
|
Ht(r);
|
|
4216
4218
|
let n = [], s = null, o, i;
|
|
4217
4219
|
const c = Vt.for(t);
|
|
@@ -4223,12 +4225,12 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4223
4225
|
o.set(Ae, Pe);
|
|
4224
4226
|
t.replaceChildren();
|
|
4225
4227
|
}
|
|
4226
|
-
const { body: f } = _t(t, e.frame), d = a.series ?? [], g = d.filter((E) => !Ma(E.name, e.seriesOverrides)), b = g.map((E) => E.name), m = e.colors ?? Oi, v = e.seriesOverrides, y = e.legend !== !1, x = $t(f).width, A = 350, w = e.legendPosition ?? "top",
|
|
4227
|
-
if (y &&
|
|
4228
|
-
const E =
|
|
4228
|
+
const { body: f } = _t(t, e.frame), d = a.series ?? [], g = d.filter((E) => !Ma(E.name, e.seriesOverrides)), b = g.map((E) => E.name), m = e.colors ?? Oi, v = e.seriesOverrides, y = e.legend !== !1, x = $t(f).width, A = 350, w = e.legendPosition ?? "top", L = x > 0 && x < A && (w === "left" || w === "right") ? "top" : w, O = e.legendAnchor ?? "start", F = { labels: a.labels, values: a.values, series: g }, I = e.stackMode === va.Percent, J = I ? mn(F) : bn(F), H = uf(J, a.labels, d), D = I ? 100 : p.max(H, (E) => E.y1) ?? 0, j = e.categoryLabelLine === !0, q = Sr(a.labels), ae = j ? He.Off : (S = e.verticalAxis) == null ? void 0 : S.labelPosition, fe = ea(x, ae, (T = e.horizontalAxis) == null ? void 0 : T.labelPosition, (P = e.verticalAxis) == null ? void 0 : P.direction, q, (z = e.horizontalAxis) == null ? void 0 : z.showAxis), ne = fe.top != null, N = Math.max(0, x - (fe.left ?? 50) - (fe.right ?? 20)), Y = y ? ya(b, L, N) : { width: 0, height: 0 }, R = y ? Y.height + 15 : 0, ie = { ...fe };
|
|
4229
|
+
if (y && L === "top") {
|
|
4230
|
+
const E = ne ? 15 : 0;
|
|
4229
4231
|
ie.top = R + E;
|
|
4230
4232
|
}
|
|
4231
|
-
y &&
|
|
4233
|
+
y && L === "bottom" && (ie.bottom = (ie.bottom ?? 24) + R), y && L === "left" && (ie.left = (ie.left ?? 50) + Y.width + 10), y && L === "right" && (ie.right = (ie.right ?? 20) + Y.width + 10);
|
|
4232
4234
|
const { chartArea: he, width: ve, height: ce, margin: ue } = Gt(f, ie), Se = Kt(i, ue);
|
|
4233
4235
|
let ye = a.labels;
|
|
4234
4236
|
if (e.sortMode === "total") {
|
|
@@ -4239,7 +4241,7 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4239
4241
|
}));
|
|
4240
4242
|
E.sort((W, Ae) => Ae.total - W.total), ye = E.map((W) => W.label);
|
|
4241
4243
|
}
|
|
4242
|
-
const ge = p.scaleLinear().domain([0,
|
|
4244
|
+
const ge = p.scaleLinear().domain([0, D]).nice().range([0, ve]), xe = p.scaleBand().domain(ye).range([0, ce]).padding(ka(e.barGap));
|
|
4243
4245
|
c.attach(he, Se), c.update({
|
|
4244
4246
|
horizontal: { scale: ge, height: ce, options: { ...e.horizontalAxis, width: ve } },
|
|
4245
4247
|
vertical: {
|
|
@@ -4247,15 +4249,15 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4247
4249
|
height: ce,
|
|
4248
4250
|
options: {
|
|
4249
4251
|
...e.verticalAxis,
|
|
4250
|
-
labelPosition:
|
|
4252
|
+
labelPosition: j ? He.Off : (V = e.verticalAxis) == null ? void 0 : V.labelPosition,
|
|
4251
4253
|
topPadding: ue.top
|
|
4252
4254
|
}
|
|
4253
4255
|
},
|
|
4254
4256
|
order: "horizontal-first"
|
|
4255
4257
|
});
|
|
4256
|
-
const pe = he.ownerSVGElement, Me = ta(pe, t, "bars", { x: 0, y: 0, width: ve, height: ce }),
|
|
4258
|
+
const pe = he.ownerSVGElement, Me = ta(pe, t, "bars", { x: 0, y: 0, width: ve, height: ce }), K = p.select(he).append("g").attr("clip-path", `url(#${Me})`), te = ye === a.labels ? H : ye.flatMap((E) => H.filter((W) => W.label === E)), ke = j ? xs : 0, me = new df(K);
|
|
4257
4259
|
if (me.config({ x: ge, y: xe, colors: m, categoryLabelOffset: ke }), n.length > 0) {
|
|
4258
|
-
const E =
|
|
4260
|
+
const E = K.node().querySelector("g");
|
|
4259
4261
|
vt(E, n, (Se == null ? void 0 : Se.dx) ?? 0, (Se == null ? void 0 : Se.dy) ?? 0);
|
|
4260
4262
|
}
|
|
4261
4263
|
if (e.tooltips && me.use(ma({ numberFormat: (C = e.verticalAxis) == null ? void 0 : C.numberFormat })), e.crosshair && me.use(La({
|
|
@@ -4272,10 +4274,10 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4272
4274
|
}));
|
|
4273
4275
|
me.use(_a(e.annotations, { scaleX: xe, scaleY: ge, data: E, width: ve, height: ce, backgroundColor: Ft(t), orientation: st.Horizontal, transition: r, priorAnnotations: o }));
|
|
4274
4276
|
}
|
|
4275
|
-
if (me.draw(
|
|
4277
|
+
if (me.draw(te), Rt(t, { chartType: "bar-stacked", margin: ue }), s && (Nt(K.node()), It(t, s)), p.select(he).selectAll(".bc-bar-stacked").each(function(E) {
|
|
4276
4278
|
const W = E, Ae = qe(W.seriesName, W.seriesIndex, m, v), Pe = Ka(W.seriesName, v), Be = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
4277
4279
|
Be.attr("fill", Ae), Pe < 1 && Be.attr("fill-opacity", Pe);
|
|
4278
|
-
}),
|
|
4280
|
+
}), j) {
|
|
4279
4281
|
const E = p.select(he).append("g").attr("class", "bc-category-labels");
|
|
4280
4282
|
for (const W of ye) {
|
|
4281
4283
|
const Ae = xe(W) ?? 0;
|
|
@@ -4284,7 +4286,7 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4284
4286
|
}
|
|
4285
4287
|
const Ce = e.valueLabels ?? !1, we = e.valueLabelPosition ?? ze.Auto, Ne = /* @__PURE__ */ new Set(), Oe = /* @__PURE__ */ new Map();
|
|
4286
4288
|
for (const E of ye) {
|
|
4287
|
-
const W =
|
|
4289
|
+
const W = te.filter((Ae) => Ae.label === E).sort((Ae, Pe) => Ae.y1 - Pe.y1);
|
|
4288
4290
|
if (W.length > 0) {
|
|
4289
4291
|
const Ae = W[W.length - 1];
|
|
4290
4292
|
Ne.add(Ae.label + "\0" + Ae.seriesName);
|
|
@@ -4295,10 +4297,10 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4295
4297
|
}
|
|
4296
4298
|
}
|
|
4297
4299
|
const Q = /* @__PURE__ */ new Map(), Z = p.select(he).append("g").attr("class", "bc-value-labels");
|
|
4298
|
-
if (
|
|
4300
|
+
if (te.forEach((E) => {
|
|
4299
4301
|
if (!Ha(E.seriesName, Ce, v))
|
|
4300
4302
|
return;
|
|
4301
|
-
const W =
|
|
4303
|
+
const W = I ? `${Math.round(E.value)}%` : String(Math.round(E.value * 100) / 100), Ae = ge(E.y1) - ge(E.y0), Pe = W.length * 6.5 + 8, Be = Ae >= Pe, Ye = (xe(E.label) ?? 0) + ke + (xe.bandwidth() - ke) / 2, We = qe(E.seriesName, E.seriesIndex, m, v), Xe = Ne.has(E.label + "\0" + E.seriesName), Qe = we === ze.Outside || we === ze.Auto && !Be && Xe, Ue = () => {
|
|
4302
4304
|
const Re = ge(E.y0) + Ae / 2;
|
|
4303
4305
|
Z.append("text").attr("class", "bc-value-label").attr("data-series", E.seriesName).attr("opacity", 0).attr("x", Re).attr("y", Ye).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", Et(We)).text(W);
|
|
4304
4306
|
};
|
|
@@ -4321,11 +4323,11 @@ function hf(t, a, e = {}, r = !1) {
|
|
|
4321
4323
|
return qe(Pe, Be, m, v);
|
|
4322
4324
|
});
|
|
4323
4325
|
let W = 0, Ae = 0;
|
|
4324
|
-
if (
|
|
4325
|
-
const Pe =
|
|
4326
|
+
if (L === "top") {
|
|
4327
|
+
const Pe = ne ? 15 : 0;
|
|
4326
4328
|
Ae = -(Y.height + 10 + Pe);
|
|
4327
|
-
} else
|
|
4328
|
-
ba(he, b, E, Ae,
|
|
4329
|
+
} else L === "bottom" ? Ae = ce + 25 : L === "left" ? W = -(Y.width + 10) : L === "right" && (W = ve + 10);
|
|
4330
|
+
ba(he, b, E, Ae, L, O, ve, ce, W, [], { left: ue.left, right: ue.right });
|
|
4329
4331
|
}
|
|
4330
4332
|
}
|
|
4331
4333
|
const Pi = [
|
|
@@ -4408,40 +4410,40 @@ function mf(t, a, e = {}, r = !1) {
|
|
|
4408
4410
|
const Q = Yt(t);
|
|
4409
4411
|
o = Q == null ? void 0 : Q.margin, i.detach(), (Q == null ? void 0 : Q.chartType) === "bar-split" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-split")) : Q && (s = Bt(t)), t.replaceChildren();
|
|
4410
4412
|
}
|
|
4411
|
-
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((Q) => !Ma(Q.name, e.seriesOverrides)), g = d.map((Q) => Q.name), b = e.colors ?? Pi, m = e.seriesOverrides, v = e.legend !== !1, y = $t(c).width, x = 350, A = e.legendPosition ?? "top", w = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A,
|
|
4413
|
+
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((Q) => !Ma(Q.name, e.seriesOverrides)), g = d.map((Q) => Q.name), b = e.colors ?? Pi, m = e.seriesOverrides, v = e.legend !== !1, y = $t(c).width, x = 350, A = e.legendPosition ?? "top", w = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A, L = e.legendAnchor ?? "start", O = e.categoryLabelLine === !0, F = Sr(a.labels), I = O ? He.Off : (ke = e.verticalAxis) == null ? void 0 : ke.labelPosition, J = ea(
|
|
4412
4414
|
y,
|
|
4413
|
-
|
|
4415
|
+
I,
|
|
4414
4416
|
(me = e.horizontalAxis) == null ? void 0 : me.labelPosition,
|
|
4415
4417
|
(Ce = e.verticalAxis) == null ? void 0 : Ce.direction,
|
|
4416
|
-
|
|
4418
|
+
F,
|
|
4417
4419
|
(we = e.horizontalAxis) == null ? void 0 : we.showAxis
|
|
4418
4420
|
);
|
|
4419
|
-
|
|
4420
|
-
const
|
|
4421
|
-
v && w === "top" && (
|
|
4422
|
-
const { chartArea:
|
|
4421
|
+
J.top = (J.top ?? 12) + pr;
|
|
4422
|
+
const H = Math.max(0, y - (J.left ?? 50) - (J.right ?? 20)), D = v ? ya(g, w, H) : { width: 0, height: 0 }, j = v ? D.height + 15 : 0, q = { ...J };
|
|
4423
|
+
v && w === "top" && (q.top = j + pr), v && w === "bottom" && (q.bottom = (q.bottom ?? 24) + j), v && w === "left" && (q.left = (q.left ?? 50) + D.width + 10), v && w === "right" && (q.right = (q.right ?? 20) + D.width + 10);
|
|
4424
|
+
const { chartArea: ae, width: fe, height: ne, margin: N } = Gt(c, q), Y = Kt(o, N);
|
|
4423
4425
|
let R = a.labels;
|
|
4424
4426
|
if (e.sortMode === "total") {
|
|
4425
4427
|
const Q = a.labels.map((Z, S) => ({
|
|
4426
4428
|
label: Z,
|
|
4427
|
-
total: d.reduce((T,
|
|
4429
|
+
total: d.reduce((T, P) => T + (P.values[S] ?? 0), 0)
|
|
4428
4430
|
}));
|
|
4429
4431
|
Q.sort((Z, S) => S.total - Z.total), R = Q.map((Z) => Z.label);
|
|
4430
4432
|
}
|
|
4431
|
-
const ie = p.scaleBand().domain(R).range([0,
|
|
4432
|
-
i.attach(
|
|
4433
|
+
const ie = p.scaleBand().domain(R).range([0, ne]).padding(ka(e.barGap)), he = O ? ws : 0;
|
|
4434
|
+
i.attach(ae, Y), i.update({
|
|
4433
4435
|
vertical: {
|
|
4434
4436
|
scale: ie,
|
|
4435
|
-
height:
|
|
4437
|
+
height: ne,
|
|
4436
4438
|
options: {
|
|
4437
4439
|
...e.verticalAxis,
|
|
4438
|
-
labelPosition:
|
|
4439
|
-
topPadding:
|
|
4440
|
+
labelPosition: O ? He.Off : (Ne = e.verticalAxis) == null ? void 0 : Ne.labelPosition,
|
|
4441
|
+
topPadding: N.top
|
|
4440
4442
|
}
|
|
4441
4443
|
},
|
|
4442
4444
|
order: "horizontal-first"
|
|
4443
4445
|
});
|
|
4444
|
-
const ve = e.sharedScale === !0, ce = pf(d, f, fe, ve), ue =
|
|
4446
|
+
const ve = e.sharedScale === !0, ce = pf(d, f, fe, ve), ue = ae.ownerSVGElement, Se = ta(ue, t, "bars", { x: 0, y: 0, width: fe, height: ne }), ye = p.select(ae).append("g").attr("clip-path", `url(#${Se})`), ge = p.select(ae).append("g").attr("class", "bc-split-headers");
|
|
4445
4447
|
for (const Q of ce)
|
|
4446
4448
|
ge.append("text").attr("class", "bc-split-header").attr("x", Q.xOffset + Q.panelWidth / 2).attr("y", -pr / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "11px").attr("font-weight", "600").attr("fill", "currentColor").text(Q.seriesName);
|
|
4447
4449
|
const xe = bf(ce, R, a.labels, f), pe = new gf(ye);
|
|
@@ -4451,44 +4453,44 @@ function mf(t, a, e = {}, r = !1) {
|
|
|
4451
4453
|
}
|
|
4452
4454
|
if (e.tooltips && pe.use(ma({ numberFormat: (Oe = e.verticalAxis) == null ? void 0 : Oe.numberFormat })), e.crosshair && pe.use(La({
|
|
4453
4455
|
width: fe,
|
|
4454
|
-
height:
|
|
4456
|
+
height: ne,
|
|
4455
4457
|
direction: e.crosshairDirection,
|
|
4456
4458
|
style: e.crosshairStyle,
|
|
4457
4459
|
color: e.crosshairColor,
|
|
4458
4460
|
orientation: st.Horizontal
|
|
4459
|
-
})), pe.draw(xe), Rt(t, { chartType: "bar-split", margin:
|
|
4460
|
-
const Z = Q, S = qe(Z.seriesName, Z.seriesIndex, b, m), T = Ka(Z.seriesName, m),
|
|
4461
|
-
|
|
4462
|
-
}),
|
|
4463
|
-
const Q = p.select(
|
|
4461
|
+
})), pe.draw(xe), Rt(t, { chartType: "bar-split", margin: N }), s && (Nt(ye.node()), It(t, s)), p.select(ae).selectAll(".bc-bar-split").each(function(Q) {
|
|
4462
|
+
const Z = Q, S = qe(Z.seriesName, Z.seriesIndex, b, m), T = Ka(Z.seriesName, m), P = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
4463
|
+
P.attr("fill", S), T < 1 && P.attr("fill-opacity", T);
|
|
4464
|
+
}), O) {
|
|
4465
|
+
const Q = p.select(ae).append("g").attr("class", "bc-category-labels");
|
|
4464
4466
|
for (const Z of R) {
|
|
4465
4467
|
const S = ie(Z) ?? 0;
|
|
4466
4468
|
Q.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", S + ws / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(Z);
|
|
4467
4469
|
}
|
|
4468
4470
|
}
|
|
4469
|
-
const Me = e.valueLabels ?? !0,
|
|
4471
|
+
const Me = e.valueLabels ?? !0, K = e.valueLabelPosition ?? ze.Auto, te = p.select(ae).append("g").attr("class", "bc-value-labels");
|
|
4470
4472
|
if (xe.forEach((Q) => {
|
|
4471
4473
|
if (!Ha(Q.seriesName, Me, m))
|
|
4472
4474
|
return;
|
|
4473
4475
|
const Z = ce.find((W) => W.seriesName === Q.seriesName);
|
|
4474
4476
|
if (!Z)
|
|
4475
4477
|
return;
|
|
4476
|
-
const S = qe(Q.seriesName, Q.seriesIndex, b, m), T = Q.xPos + Q.barWidth,
|
|
4478
|
+
const S = qe(Q.seriesName, Q.seriesIndex, b, m), T = Q.xPos + Q.barWidth, P = Math.max(0, ie.bandwidth() - he), z = (ie(Q.label) ?? 0) + he + P / 2, V = K === ze.Inside || K === ze.Auto && Q.barWidth > 30;
|
|
4477
4479
|
let C, U, E;
|
|
4478
|
-
if (
|
|
4480
|
+
if (V)
|
|
4479
4481
|
C = T - 4, U = "end", E = Et(S);
|
|
4480
4482
|
else {
|
|
4481
4483
|
const W = T + 4, Ae = Z.xOffset + Z.panelWidth;
|
|
4482
4484
|
W + 20 > Ae ? (C = Q.xPos - 4, U = "end") : (C = W, U = "start"), E = "currentColor";
|
|
4483
4485
|
}
|
|
4484
|
-
|
|
4486
|
+
te.append("text").attr("class", "bc-value-label").attr("data-series", Q.seriesName).attr("x", C).attr("y", z).attr("text-anchor", U).attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", E).text(String(Q.value));
|
|
4485
4487
|
}), v && g.length > 0) {
|
|
4486
4488
|
const Q = g.map((T) => {
|
|
4487
|
-
const
|
|
4488
|
-
return qe(T,
|
|
4489
|
+
const P = f.findIndex((z) => z.name === T);
|
|
4490
|
+
return qe(T, P, b, m);
|
|
4489
4491
|
});
|
|
4490
4492
|
let Z = 0, S = 0;
|
|
4491
|
-
w === "top" ? S = -(
|
|
4493
|
+
w === "top" ? S = -(D.height + 10 + pr) : w === "bottom" ? S = ne + 25 : w === "left" ? Z = -(D.width + 10) : w === "right" && (Z = fe + 10), ba(ae, g, Q, S, w, L, fe, ne, Z, [], { left: N.left, right: N.right });
|
|
4492
4494
|
}
|
|
4493
4495
|
}
|
|
4494
4496
|
const an = [
|
|
@@ -4536,39 +4538,39 @@ function vf(t, a, e = {}, r = !1) {
|
|
|
4536
4538
|
const Z = Yt(t);
|
|
4537
4539
|
o = Z == null ? void 0 : Z.margin, i.detach(), (Z == null ? void 0 : Z.chartType) === "bar-grouped" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-grouped")) : Z && (s = Bt(t)), t.replaceChildren();
|
|
4538
4540
|
}
|
|
4539
|
-
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((Z) => !Ma(Z.name, e.seriesOverrides)), g = d.map((Z) => Z.name), b = e.colors ?? an, m = e.seriesOverrides, v = e.legend !== !1, y = $t(c).width, x = 350, A = e.legendPosition ?? "top", w = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A,
|
|
4541
|
+
const { body: c } = _t(t, e.frame), f = a.series ?? [], d = f.filter((Z) => !Ma(Z.name, e.seriesOverrides)), g = d.map((Z) => Z.name), b = e.colors ?? an, m = e.seriesOverrides, v = e.legend !== !1, y = $t(c).width, x = 350, A = e.legendPosition ?? "top", w = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A, L = e.legendAnchor ?? "start", O = e.categoryLabelLine === !0, F = Sr(a.labels), I = O ? He.Off : (me = e.verticalAxis) == null ? void 0 : me.labelPosition, J = ea(
|
|
4540
4542
|
y,
|
|
4541
|
-
|
|
4543
|
+
I,
|
|
4542
4544
|
(Ce = e.horizontalAxis) == null ? void 0 : Ce.labelPosition,
|
|
4543
4545
|
(we = e.verticalAxis) == null ? void 0 : we.direction,
|
|
4544
|
-
|
|
4546
|
+
F,
|
|
4545
4547
|
(Ne = e.horizontalAxis) == null ? void 0 : Ne.showAxis
|
|
4546
|
-
),
|
|
4547
|
-
v && w === "top" && (
|
|
4548
|
-
const { chartArea:
|
|
4548
|
+
), H = Math.max(0, y - (J.left ?? 50) - (J.right ?? 20)), D = v ? ya(g, w, H) : { width: 0, height: 0 }, j = v ? D.height + 15 : 0, q = { ...J };
|
|
4549
|
+
v && w === "top" && (q.top = j), v && w === "bottom" && (q.bottom = (q.bottom ?? 24) + j), v && w === "left" && (q.left = (q.left ?? 50) + D.width + 10), v && w === "right" && (q.right = (q.right ?? 20) + D.width + 10);
|
|
4550
|
+
const { chartArea: ae, width: fe, height: ne, margin: N } = Gt(c, q), Y = Kt(o, N);
|
|
4549
4551
|
let R = a.labels;
|
|
4550
4552
|
if (e.sortMode === "total") {
|
|
4551
4553
|
const Z = a.labels.map((S, T) => ({
|
|
4552
4554
|
label: S,
|
|
4553
|
-
total: d.reduce((
|
|
4555
|
+
total: d.reduce((P, z) => P + (z.values[T] ?? 0), 0)
|
|
4554
4556
|
}));
|
|
4555
4557
|
Z.sort((S, T) => T.total - S.total), R = Z.map((S) => S.label);
|
|
4556
4558
|
}
|
|
4557
|
-
const ie = p.scaleBand().domain(R).range([0,
|
|
4558
|
-
i.attach(
|
|
4559
|
+
const ie = p.scaleBand().domain(R).range([0, ne]).paddingInner(ka(e.barGap)).paddingOuter(0.05), he = O ? Ss : 0, ve = Math.max(0, ie.bandwidth() - he), ce = p.scaleBand().domain(g).range([0, ve]).padding(0.05), ue = p.max(d.flatMap((Z) => Z.values)) ?? 0, Se = p.scaleLinear().domain([0, ue]).nice().range([0, fe]);
|
|
4560
|
+
i.attach(ae, Y), i.update({
|
|
4559
4561
|
vertical: {
|
|
4560
4562
|
scale: ie,
|
|
4561
|
-
height:
|
|
4563
|
+
height: ne,
|
|
4562
4564
|
options: {
|
|
4563
4565
|
...e.verticalAxis,
|
|
4564
|
-
labelPosition:
|
|
4565
|
-
topPadding:
|
|
4566
|
+
labelPosition: O ? He.Off : (Oe = e.verticalAxis) == null ? void 0 : Oe.labelPosition,
|
|
4567
|
+
topPadding: N.top
|
|
4566
4568
|
}
|
|
4567
4569
|
},
|
|
4568
|
-
horizontal: { scale: Se, height:
|
|
4570
|
+
horizontal: { scale: Se, height: ne, options: { ...e.horizontalAxis, width: fe } },
|
|
4569
4571
|
order: "horizontal-first"
|
|
4570
4572
|
});
|
|
4571
|
-
const ye =
|
|
4573
|
+
const ye = ae.ownerSVGElement, ge = ta(ye, t, "bars", { x: 0, y: 0, width: fe, height: ne }), xe = p.select(ae).append("g").attr("clip-path", `url(#${ge})`);
|
|
4572
4574
|
if (e.barBackground) {
|
|
4573
4575
|
const Z = (e.colors ?? an)[0];
|
|
4574
4576
|
xe.selectAll(".bc-bar-bg").data(R, (S) => S).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (S) => (ie(S) ?? 0) + he).attr("width", fe).attr("height", ie.bandwidth() - he).attr("fill", Z).attr("opacity", 0.18);
|
|
@@ -4584,11 +4586,11 @@ function vf(t, a, e = {}, r = !1) {
|
|
|
4584
4586
|
for (const Z of R) {
|
|
4585
4587
|
const S = a.labels.indexOf(Z);
|
|
4586
4588
|
for (const T of d) {
|
|
4587
|
-
const
|
|
4589
|
+
const P = f.findIndex((z) => z.name === T.name);
|
|
4588
4590
|
pe.push({
|
|
4589
4591
|
label: Z,
|
|
4590
4592
|
seriesName: T.name,
|
|
4591
|
-
seriesIndex:
|
|
4593
|
+
seriesIndex: P,
|
|
4592
4594
|
value: S >= 0 ? T.values[S] ?? 0 : 0
|
|
4593
4595
|
});
|
|
4594
4596
|
}
|
|
@@ -4600,35 +4602,35 @@ function vf(t, a, e = {}, r = !1) {
|
|
|
4600
4602
|
}
|
|
4601
4603
|
if (e.tooltips && Me.use(ma({ numberFormat: (Q = e.verticalAxis) == null ? void 0 : Q.numberFormat })), e.crosshair && Me.use(La({
|
|
4602
4604
|
width: fe,
|
|
4603
|
-
height:
|
|
4605
|
+
height: ne,
|
|
4604
4606
|
direction: e.crosshairDirection,
|
|
4605
4607
|
style: e.crosshairStyle,
|
|
4606
4608
|
color: e.crosshairColor,
|
|
4607
4609
|
orientation: st.Horizontal
|
|
4608
|
-
})), Me.draw(pe), Rt(t, { chartType: "bar-grouped", margin:
|
|
4609
|
-
const S = Z, T = qe(S.seriesName, S.seriesIndex, b, m),
|
|
4610
|
-
z.attr("fill", T),
|
|
4611
|
-
}),
|
|
4612
|
-
const Z = p.select(
|
|
4610
|
+
})), Me.draw(pe), Rt(t, { chartType: "bar-grouped", margin: N }), s && (Nt(xe.node()), It(t, s)), p.select(ae).selectAll(".bc-bar-grouped").each(function(Z) {
|
|
4611
|
+
const S = Z, T = qe(S.seriesName, S.seriesIndex, b, m), P = Ka(S.seriesName, m), z = r ? p.select(this).transition().duration(Ee()) : p.select(this);
|
|
4612
|
+
z.attr("fill", T), P < 1 && z.attr("fill-opacity", P);
|
|
4613
|
+
}), O) {
|
|
4614
|
+
const Z = p.select(ae).append("g").attr("class", "bc-category-labels");
|
|
4613
4615
|
for (const S of R) {
|
|
4614
4616
|
const T = ie(S) ?? 0;
|
|
4615
4617
|
Z.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", T + Ss / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(S);
|
|
4616
4618
|
}
|
|
4617
4619
|
}
|
|
4618
|
-
const
|
|
4620
|
+
const K = e.valueLabels ?? !0, te = e.valueLabelPosition ?? ze.Auto, ke = p.select(ae).append("g").attr("class", "bc-value-labels");
|
|
4619
4621
|
if (pe.forEach((Z) => {
|
|
4620
|
-
if (!Ha(Z.seriesName,
|
|
4622
|
+
if (!Ha(Z.seriesName, K, m))
|
|
4621
4623
|
return;
|
|
4622
|
-
const S = qe(Z.seriesName, Z.seriesIndex, b, m), T = Math.max(0, Se(Z.value) - Se(0)),
|
|
4624
|
+
const S = qe(Z.seriesName, Z.seriesIndex, b, m), T = Math.max(0, Se(Z.value) - Se(0)), P = Se(0) + T, z = (ie(Z.label) ?? 0) + he + (ce(Z.seriesName) ?? 0) + ce.bandwidth() / 2, V = te === ze.Inside || te === ze.Auto && T > 30;
|
|
4623
4625
|
let C, U, E;
|
|
4624
|
-
|
|
4626
|
+
V ? (C = P - 4, U = "end", E = Et(S)) : (C = P + 4, U = "start", E = "currentColor"), ke.append("text").attr("class", "bc-value-label").attr("data-series", Z.seriesName).attr("x", C).attr("y", z).attr("text-anchor", U).attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", E).text(String(Z.value));
|
|
4625
4627
|
}), v && g.length > 0) {
|
|
4626
|
-
const Z = g.map((
|
|
4627
|
-
const z = f.findIndex((
|
|
4628
|
-
return qe(
|
|
4628
|
+
const Z = g.map((P) => {
|
|
4629
|
+
const z = f.findIndex((V) => V.name === P);
|
|
4630
|
+
return qe(P, z, b, m);
|
|
4629
4631
|
});
|
|
4630
4632
|
let S = 0, T = 0;
|
|
4631
|
-
w === "top" ? T = -(
|
|
4633
|
+
w === "top" ? T = -(D.height + 10) : w === "bottom" ? T = ne + 25 : w === "left" ? S = -(D.width + 10) : w === "right" && (S = fe + 10), ba(ae, g, Z, T, w, L, fe, ne, S, [], { left: N.left, right: N.right });
|
|
4632
4634
|
}
|
|
4633
4635
|
}
|
|
4634
4636
|
const Or = /* @__PURE__ */ new Map();
|
|
@@ -5293,34 +5295,34 @@ xa.buildMessage = function(t, a) {
|
|
|
5293
5295
|
};
|
|
5294
5296
|
function nd(t, a) {
|
|
5295
5297
|
a = a !== void 0 ? a : {};
|
|
5296
|
-
var e = {}, r = a.grammarSource, n = { Chart: Fn }, s = Fn, o = "chart", i = "{", c = "}", f = "data", d = "=", g = ",", b = " ", m = "colorize", v = "highlight", y = "areafill", x = "annotation", A = "range", w = "note",
|
|
5297
|
-
`, "\r", "{", "}", "="], !0, !1),
|
|
5298
|
+
var e = {}, r = a.grammarSource, n = { Chart: Fn }, s = Fn, o = "chart", i = "{", c = "}", f = "data", d = "=", g = ",", b = " ", m = "colorize", v = "highlight", y = "areafill", x = "annotation", A = "range", w = "note", L = "series", O = "scene", F = "step", I = "transform", J = "hide_annotation", H = "hide_range", D = "hide_note", j = "show_annotation", q = "show_range", ae = "show_note", fe = "%", ne = "-", N = ".", Y = '"', R = "\\", ie = "n", he = "r", ve = "t", ce = "u", ue = "//", Se = "/*", ye = "*/", ge = /^[^\t\n\r{}=]/, xe = /^[a-zA-Z_#]/, pe = /^[a-zA-Z0-9_#\-]/, Me = /^[0-9]/, K = /^[eE]/, te = /^[+\-]/, ke = /^[^"\\]/, me = /^[0-9a-fA-F]/, Ce = /^[^\n]/, we = /^[ \t\n\r]/, Ne = Ie("chart", !1), Oe = Ie("{", !1), Q = Ie("}", !1), Z = Ie("data", !1), S = Ie("=", !1), T = Ie(",", !1), P = Ie(" ", !1), z = aa([" ", `
|
|
5299
|
+
`, "\r", "{", "}", "="], !0, !1), V = Ie("colorize", !1), C = Ie("highlight", !1), U = Ie("areafill", !1), E = Ie("annotation", !1), W = Ie("range", !1), Ae = Ie("note", !1), Pe = Ie("series", !1), Be = Ie("scene", !1), Ye = Ie("step", !1), We = Ie("transform", !1), Xe = Ie("hide_annotation", !1), Qe = Ie("hide_range", !1), Ue = Ie("hide_note", !1), Re = Ie("show_annotation", !1), ft = Ie("show_range", !1), mt = Ie("show_note", !1), at = Ie("%", !1), Ct = ir("identifier"), M = aa([["a", "z"], ["A", "Z"], "_", "#"], !1, !1), oe = aa([["a", "z"], ["A", "Z"], ["0", "9"], "_", "#", "-"], !1, !1), le = Ie("-", !1), re = Ie(".", !1), Te = aa([["0", "9"]], !1, !1), je = aa(["e", "E"], !1, !1), Ot = aa(["+", "-"], !1, !1), it = ir("string"), Je = Ie('"', !1), Pt = Ie("\\", !1), na = aa(['"', "\\"], !0, !1), fa = Ie("n", !1), Ra = Ie("r", !1), se = Ie("t", !1), Le = Ie("u", !1), Fe = aa([["0", "9"], ["a", "f"], ["A", "F"]], !1, !1), Ve = Zo(), rt = Ie("//", !1), nt = aa([`
|
|
5298
5300
|
`], !0, !1), Wt = Ie("/*", !1), da = Ie("*/", !1), Oa = ir("whitespace"), qt = aa([" ", " ", `
|
|
5299
5301
|
`, "\r"], !1, !1), qr = ir("optional whitespace"), lo = function(l, h) {
|
|
5300
|
-
const
|
|
5302
|
+
const $ = td(h);
|
|
5301
5303
|
return {
|
|
5302
5304
|
type: "chart",
|
|
5303
5305
|
chartType: l,
|
|
5304
|
-
properties:
|
|
5305
|
-
data:
|
|
5306
|
-
colorizes:
|
|
5307
|
-
highlights:
|
|
5308
|
-
areaFills:
|
|
5309
|
-
annotations:
|
|
5310
|
-
annotationVisibility:
|
|
5311
|
-
series:
|
|
5312
|
-
scenes:
|
|
5313
|
-
transforms:
|
|
5306
|
+
properties: $.properties,
|
|
5307
|
+
data: $.data,
|
|
5308
|
+
colorizes: $.colorizes,
|
|
5309
|
+
highlights: $.highlights,
|
|
5310
|
+
areaFills: $.areaFills,
|
|
5311
|
+
annotations: $.annotations,
|
|
5312
|
+
annotationVisibility: $.annotationVisibility,
|
|
5313
|
+
series: $.series,
|
|
5314
|
+
scenes: $.scenes,
|
|
5315
|
+
transforms: $.transforms
|
|
5314
5316
|
};
|
|
5315
5317
|
}, co = function(l) {
|
|
5316
5318
|
return l;
|
|
5317
5319
|
}, fo = function(l) {
|
|
5318
5320
|
return { type: "data", entries: l };
|
|
5319
|
-
}, Dn = function(l, h,
|
|
5320
|
-
return
|
|
5321
|
-
}, uo = function(l, h,
|
|
5322
|
-
const k = [h,
|
|
5323
|
-
return { type: "property", key: l, value: k[0].value, isPercentage: !1, values: k.map((
|
|
5321
|
+
}, Dn = function(l, h, $) {
|
|
5322
|
+
return $;
|
|
5323
|
+
}, uo = function(l, h, $) {
|
|
5324
|
+
const k = [h, ...$];
|
|
5325
|
+
return { type: "property", key: l, value: k[0].value, isPercentage: !1, values: k.map((B) => B.value) };
|
|
5324
5326
|
}, ho = function(l) {
|
|
5325
5327
|
return l;
|
|
5326
5328
|
}, go = function(l, h) {
|
|
@@ -5333,8 +5335,8 @@ function nd(t, a) {
|
|
|
5333
5335
|
return { type: "colorize", target: l, properties: h, fromHighlight: !0 };
|
|
5334
5336
|
}, yo = function(l) {
|
|
5335
5337
|
return { type: "highlight", target: l, properties: [] };
|
|
5336
|
-
}, vo = function(l, h,
|
|
5337
|
-
return { type: "areafill", from: l, to: h, properties:
|
|
5338
|
+
}, vo = function(l, h, $) {
|
|
5339
|
+
return { type: "areafill", from: l, to: h, properties: $ };
|
|
5338
5340
|
}, xo = function(l, h) {
|
|
5339
5341
|
return { type: "annotation", kind: "point", target: l, properties: h };
|
|
5340
5342
|
}, Ao = function(l) {
|
|
@@ -5344,19 +5346,19 @@ function nd(t, a) {
|
|
|
5344
5346
|
}, So = function(l, h) {
|
|
5345
5347
|
return { type: "series", name: l, properties: h };
|
|
5346
5348
|
}, ko = function(l, h) {
|
|
5347
|
-
const
|
|
5349
|
+
const $ = ad(h);
|
|
5348
5350
|
return {
|
|
5349
5351
|
type: "scene",
|
|
5350
5352
|
name: l ?? null,
|
|
5351
|
-
properties:
|
|
5352
|
-
data:
|
|
5353
|
-
colorizes:
|
|
5354
|
-
highlights:
|
|
5355
|
-
areaFills:
|
|
5356
|
-
annotations:
|
|
5357
|
-
annotationVisibility:
|
|
5358
|
-
series:
|
|
5359
|
-
transforms:
|
|
5353
|
+
properties: $.properties,
|
|
5354
|
+
data: $.data,
|
|
5355
|
+
colorizes: $.colorizes,
|
|
5356
|
+
highlights: $.highlights,
|
|
5357
|
+
areaFills: $.areaFills,
|
|
5358
|
+
annotations: $.annotations,
|
|
5359
|
+
annotationVisibility: $.annotationVisibility,
|
|
5360
|
+
series: $.series,
|
|
5361
|
+
transforms: $.transforms
|
|
5360
5362
|
};
|
|
5361
5363
|
}, Lo = function(l, h) {
|
|
5362
5364
|
return { type: "transform", transformType: l, properties: h };
|
|
@@ -5407,7 +5409,7 @@ function nd(t, a) {
|
|
|
5407
5409
|
return String.fromCharCode(parseInt(l, 16));
|
|
5408
5410
|
}, Uo = function(l) {
|
|
5409
5411
|
jo("Unknown escape sequence \\" + l);
|
|
5410
|
-
}, u = a.peg$currPos | 0, De = u, Pa = [{ line: 1, column: 1 }], Xt = u, sr = a.peg$maxFailExpected || [],
|
|
5412
|
+
}, u = a.peg$currPos | 0, De = u, Pa = [{ line: 1, column: 1 }], Xt = u, sr = a.peg$maxFailExpected || [], _ = a.peg$silentFails | 0, Wa;
|
|
5411
5413
|
if (a.startRule) {
|
|
5412
5414
|
if (!(a.startRule in n))
|
|
5413
5415
|
throw new Error(`Can't start parsing from rule "` + a.startRule + '".');
|
|
@@ -5419,8 +5421,8 @@ function nd(t, a) {
|
|
|
5419
5421
|
function Ie(l, h) {
|
|
5420
5422
|
return { type: "literal", text: l, ignoreCase: h };
|
|
5421
5423
|
}
|
|
5422
|
-
function aa(l, h,
|
|
5423
|
-
return { type: "class", parts: l, inverted: h, ignoreCase:
|
|
5424
|
+
function aa(l, h, $) {
|
|
5425
|
+
return { type: "class", parts: l, inverted: h, ignoreCase: $ };
|
|
5424
5426
|
}
|
|
5425
5427
|
function Zo() {
|
|
5426
5428
|
return { type: "any" };
|
|
@@ -5432,23 +5434,23 @@ function nd(t, a) {
|
|
|
5432
5434
|
return { type: "other", description: l };
|
|
5433
5435
|
}
|
|
5434
5436
|
function En(l) {
|
|
5435
|
-
var h = Pa[l],
|
|
5437
|
+
var h = Pa[l], $;
|
|
5436
5438
|
if (h)
|
|
5437
5439
|
return h;
|
|
5438
5440
|
if (l >= Pa.length)
|
|
5439
|
-
|
|
5441
|
+
$ = Pa.length - 1;
|
|
5440
5442
|
else
|
|
5441
|
-
for (
|
|
5443
|
+
for ($ = l; !Pa[--$]; )
|
|
5442
5444
|
;
|
|
5443
|
-
for (h = Pa[
|
|
5445
|
+
for (h = Pa[$], h = {
|
|
5444
5446
|
line: h.line,
|
|
5445
5447
|
column: h.column
|
|
5446
|
-
};
|
|
5447
|
-
t.charCodeAt(
|
|
5448
|
+
}; $ < l; )
|
|
5449
|
+
t.charCodeAt($) === 10 ? (h.line++, h.column = 1) : h.column++, $++;
|
|
5448
5450
|
return Pa[l] = h, h;
|
|
5449
5451
|
}
|
|
5450
|
-
function Xr(l, h,
|
|
5451
|
-
var k = En(l),
|
|
5452
|
+
function Xr(l, h, $) {
|
|
5453
|
+
var k = En(l), B = En(h), G = {
|
|
5452
5454
|
source: r,
|
|
5453
5455
|
start: {
|
|
5454
5456
|
offset: l,
|
|
@@ -5457,35 +5459,35 @@ function nd(t, a) {
|
|
|
5457
5459
|
},
|
|
5458
5460
|
end: {
|
|
5459
5461
|
offset: h,
|
|
5460
|
-
line:
|
|
5461
|
-
column:
|
|
5462
|
+
line: B.line,
|
|
5463
|
+
column: B.column
|
|
5462
5464
|
}
|
|
5463
5465
|
};
|
|
5464
5466
|
return G;
|
|
5465
5467
|
}
|
|
5466
|
-
function
|
|
5468
|
+
function X(l) {
|
|
5467
5469
|
u < Xt || (u > Xt && (Xt = u, sr = []), sr.push(l));
|
|
5468
5470
|
}
|
|
5469
5471
|
function Jo(l, h) {
|
|
5470
5472
|
return new xa(l, null, null, h);
|
|
5471
5473
|
}
|
|
5472
|
-
function Ko(l, h,
|
|
5474
|
+
function Ko(l, h, $) {
|
|
5473
5475
|
return new xa(
|
|
5474
5476
|
xa.buildMessage(l, h),
|
|
5475
5477
|
l,
|
|
5476
5478
|
h,
|
|
5477
|
-
|
|
5479
|
+
$
|
|
5478
5480
|
);
|
|
5479
5481
|
}
|
|
5480
5482
|
function Fn() {
|
|
5481
|
-
var l, h,
|
|
5482
|
-
if (l = u, $e(), t.substr(u, 5) === o ? (h = o, u += 5) : (h = e,
|
|
5483
|
-
if (
|
|
5483
|
+
var l, h, $, k, B, G, ee, be;
|
|
5484
|
+
if (l = u, $e(), t.substr(u, 5) === o ? (h = o, u += 5) : (h = e, _ === 0 && X(Ne)), h !== e)
|
|
5485
|
+
if ($ = ht(), $ !== e)
|
|
5484
5486
|
if (k = lr(), k !== e)
|
|
5485
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5487
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5486
5488
|
for ($e(), G = [], ee = Nn(); ee !== e; )
|
|
5487
5489
|
G.push(ee), ee = Nn();
|
|
5488
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5490
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? ($e(), De = l, l = lo(k, G)) : (u = l, l = e);
|
|
5489
5491
|
} else
|
|
5490
5492
|
u = l, l = e;
|
|
5491
5493
|
else
|
|
@@ -5501,12 +5503,12 @@ function nd(t, a) {
|
|
|
5501
5503
|
return l = u, $e(), h = Bn(), h === e && (h = _n(), h === e && (h = Gn(), h === e && (h = Hn(), h === e && (h = Rn(), h === e && (h = Wn(), h === e && (h = Yn(), h === e && (h = Un(), h === e && (h = jn(), h === e && (h = Zn(), h === e && (h = Qn(), h === e && (h = Jn(), h === e && (h = Kn(), h === e && (h = qn(), h === e && (h = tl(), h === e && (h = Xn(), h === e && (h = or())))))))))))))))), h !== e ? ($e(), De = l, l = co(h)) : (u = l, l = e), l;
|
|
5502
5504
|
}
|
|
5503
5505
|
function Bn() {
|
|
5504
|
-
var l, h,
|
|
5505
|
-
if (l = u, t.substr(u, 4) === f ? (h = f, u += 4) : (h = e,
|
|
5506
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5507
|
-
for ($e(), k = [],
|
|
5508
|
-
k.push(
|
|
5509
|
-
|
|
5506
|
+
var l, h, $, k, B, G;
|
|
5507
|
+
if (l = u, t.substr(u, 4) === f ? (h = f, u += 4) : (h = e, _ === 0 && X(Z)), h !== e)
|
|
5508
|
+
if ($e(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, _ === 0 && X(Oe)), $ !== e) {
|
|
5509
|
+
for ($e(), k = [], B = Vn(), B === e && (B = In()); B !== e; )
|
|
5510
|
+
k.push(B), B = Vn(), B === e && (B = In());
|
|
5511
|
+
B = $e(), t.charCodeAt(u) === 125 ? (G = c, u++) : (G = e, _ === 0 && X(Q)), G !== e ? (De = l, l = fo(k)) : (u = l, l = e);
|
|
5510
5512
|
} else
|
|
5511
5513
|
u = l, l = e;
|
|
5512
5514
|
else
|
|
@@ -5514,16 +5516,16 @@ function nd(t, a) {
|
|
|
5514
5516
|
return l;
|
|
5515
5517
|
}
|
|
5516
5518
|
function In() {
|
|
5517
|
-
var l, h,
|
|
5519
|
+
var l, h, $, k, B, G, ee, be;
|
|
5518
5520
|
if (l = u, $e(), h = ts(), h !== e)
|
|
5519
|
-
if ($e(), t.charCodeAt(u) === 61 ? (
|
|
5521
|
+
if ($e(), t.charCodeAt(u) === 61 ? ($ = d, u++) : ($ = e, _ === 0 && X(S)), $ !== e)
|
|
5520
5522
|
if ($e(), k = qa(), k !== e) {
|
|
5521
|
-
if (
|
|
5523
|
+
if (B = [], G = u, t.charCodeAt(u) === 44 ? (ee = g, u++) : (ee = e, _ === 0 && X(T)), ee !== e ? ($e(), be = qa(), be !== e ? (De = G, G = Dn(h, k, be)) : (u = G, G = e)) : (u = G, G = e), G !== e)
|
|
5522
5524
|
for (; G !== e; )
|
|
5523
|
-
|
|
5525
|
+
B.push(G), G = u, t.charCodeAt(u) === 44 ? (ee = g, u++) : (ee = e, _ === 0 && X(T)), ee !== e ? ($e(), be = qa(), be !== e ? (De = G, G = Dn(h, k, be)) : (u = G, G = e)) : (u = G, G = e);
|
|
5524
5526
|
else
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
+
B = e;
|
|
5528
|
+
B !== e ? (G = $e(), De = l, l = uo(h, k, B)) : (u = l, l = e);
|
|
5527
5529
|
} else
|
|
5528
5530
|
u = l, l = e;
|
|
5529
5531
|
else
|
|
@@ -5533,27 +5535,27 @@ function nd(t, a) {
|
|
|
5533
5535
|
return l === e && (l = u, $e(), h = or(), h !== e ? ($e(), De = l, l = ho(h)) : (u = l, l = e)), l;
|
|
5534
5536
|
}
|
|
5535
5537
|
function Vn() {
|
|
5536
|
-
var l, h,
|
|
5537
|
-
return l = u, $e(), h = el(), h !== e ? (t.charCodeAt(u) === 9 ? (
|
|
5538
|
+
var l, h, $, k;
|
|
5539
|
+
return l = u, $e(), h = el(), h !== e ? (t.charCodeAt(u) === 9 ? ($ = b, u++) : ($ = e, _ === 0 && X(P)), $ !== e ? ($e(), k = qa(), k !== e ? ($e(), De = l, l = go(h, k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5538
5540
|
}
|
|
5539
5541
|
function el() {
|
|
5540
|
-
var l, h,
|
|
5541
|
-
if (l = u, h = u,
|
|
5542
|
+
var l, h, $, k;
|
|
5543
|
+
if (l = u, h = u, $ = [], k = t.charAt(u), ge.test(k) ? u++ : (k = e, _ === 0 && X(z)), k !== e)
|
|
5542
5544
|
for (; k !== e; )
|
|
5543
|
-
|
|
5545
|
+
$.push(k), k = t.charAt(u), ge.test(k) ? u++ : (k = e, _ === 0 && X(z));
|
|
5544
5546
|
else
|
|
5545
|
-
|
|
5546
|
-
return
|
|
5547
|
+
$ = e;
|
|
5548
|
+
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (De = l, h = po(h)), l = h, l;
|
|
5547
5549
|
}
|
|
5548
5550
|
function _n() {
|
|
5549
|
-
var l, h,
|
|
5550
|
-
if (l = u, t.substr(u, 8) === m ? (h = m, u += 8) : (h = e,
|
|
5551
|
-
if (
|
|
5551
|
+
var l, h, $, k, B, G, ee, be;
|
|
5552
|
+
if (l = u, t.substr(u, 8) === m ? (h = m, u += 8) : (h = e, _ === 0 && X(V)), h !== e)
|
|
5553
|
+
if ($ = ht(), $ !== e)
|
|
5552
5554
|
if (k = ut(), k !== e)
|
|
5553
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5555
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5554
5556
|
for ($e(), G = [], ee = dt(); ee !== e; )
|
|
5555
5557
|
G.push(ee), ee = dt();
|
|
5556
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5558
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = bo(k, G)) : (u = l, l = e);
|
|
5557
5559
|
} else
|
|
5558
5560
|
u = l, l = e;
|
|
5559
5561
|
else
|
|
@@ -5565,14 +5567,14 @@ function nd(t, a) {
|
|
|
5565
5567
|
return l;
|
|
5566
5568
|
}
|
|
5567
5569
|
function Gn() {
|
|
5568
|
-
var l, h,
|
|
5569
|
-
if (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e,
|
|
5570
|
-
if (
|
|
5570
|
+
var l, h, $, k, B, G, ee, be;
|
|
5571
|
+
if (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e, _ === 0 && X(C)), h !== e)
|
|
5572
|
+
if ($ = ht(), $ !== e)
|
|
5571
5573
|
if (k = ut(), k !== e)
|
|
5572
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5574
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5573
5575
|
for ($e(), G = [], ee = dt(); ee !== e; )
|
|
5574
5576
|
G.push(ee), ee = dt();
|
|
5575
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5577
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = mo(k, G)) : (u = l, l = e);
|
|
5576
5578
|
} else
|
|
5577
5579
|
u = l, l = e;
|
|
5578
5580
|
else
|
|
@@ -5581,19 +5583,19 @@ function nd(t, a) {
|
|
|
5581
5583
|
u = l, l = e;
|
|
5582
5584
|
else
|
|
5583
5585
|
u = l, l = e;
|
|
5584
|
-
return l === e && (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e,
|
|
5586
|
+
return l === e && (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e, _ === 0 && X(C)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = yo(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e)), l;
|
|
5585
5587
|
}
|
|
5586
5588
|
function Hn() {
|
|
5587
|
-
var l, h,
|
|
5588
|
-
if (l = u, t.substr(u, 8) === y ? (h = y, u += 8) : (h = e,
|
|
5589
|
-
if (
|
|
5589
|
+
var l, h, $, k, B, G, ee, be, Lt, Ke;
|
|
5590
|
+
if (l = u, t.substr(u, 8) === y ? (h = y, u += 8) : (h = e, _ === 0 && X(U)), h !== e)
|
|
5591
|
+
if ($ = ht(), $ !== e)
|
|
5590
5592
|
if (k = ut(), k !== e)
|
|
5591
|
-
if (
|
|
5593
|
+
if (B = ht(), B !== e)
|
|
5592
5594
|
if (G = ut(), G !== e)
|
|
5593
|
-
if ($e(), t.charCodeAt(u) === 123 ? (ee = i, u++) : (ee = e,
|
|
5595
|
+
if ($e(), t.charCodeAt(u) === 123 ? (ee = i, u++) : (ee = e, _ === 0 && X(Oe)), ee !== e) {
|
|
5594
5596
|
for ($e(), be = [], Lt = dt(); Lt !== e; )
|
|
5595
5597
|
be.push(Lt), Lt = dt();
|
|
5596
|
-
Lt = $e(), t.charCodeAt(u) === 125 ? (Ke = c, u++) : (Ke = e,
|
|
5598
|
+
Lt = $e(), t.charCodeAt(u) === 125 ? (Ke = c, u++) : (Ke = e, _ === 0 && X(Q)), Ke !== e ? (De = l, l = vo(k, G, be)) : (u = l, l = e);
|
|
5597
5599
|
} else
|
|
5598
5600
|
u = l, l = e;
|
|
5599
5601
|
else
|
|
@@ -5609,14 +5611,14 @@ function nd(t, a) {
|
|
|
5609
5611
|
return l;
|
|
5610
5612
|
}
|
|
5611
5613
|
function Yn() {
|
|
5612
|
-
var l, h,
|
|
5613
|
-
if (l = u, t.substr(u, 10) === x ? (h = x, u += 10) : (h = e,
|
|
5614
|
-
if (
|
|
5614
|
+
var l, h, $, k, B, G, ee, be;
|
|
5615
|
+
if (l = u, t.substr(u, 10) === x ? (h = x, u += 10) : (h = e, _ === 0 && X(E)), h !== e)
|
|
5616
|
+
if ($ = ht(), $ !== e)
|
|
5615
5617
|
if (k = ut(), k !== e)
|
|
5616
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5618
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5617
5619
|
for ($e(), G = [], ee = dt(); ee !== e; )
|
|
5618
5620
|
G.push(ee), ee = dt();
|
|
5619
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5621
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = xo(k, G)) : (u = l, l = e);
|
|
5620
5622
|
} else
|
|
5621
5623
|
u = l, l = e;
|
|
5622
5624
|
else
|
|
@@ -5628,12 +5630,12 @@ function nd(t, a) {
|
|
|
5628
5630
|
return l;
|
|
5629
5631
|
}
|
|
5630
5632
|
function Rn() {
|
|
5631
|
-
var l, h,
|
|
5632
|
-
if (l = u, t.substr(u, 5) === A ? (h = A, u += 5) : (h = e,
|
|
5633
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5634
|
-
for ($e(), k = [],
|
|
5635
|
-
k.push(
|
|
5636
|
-
|
|
5633
|
+
var l, h, $, k, B, G;
|
|
5634
|
+
if (l = u, t.substr(u, 5) === A ? (h = A, u += 5) : (h = e, _ === 0 && X(W)), h !== e)
|
|
5635
|
+
if ($e(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, _ === 0 && X(Oe)), $ !== e) {
|
|
5636
|
+
for ($e(), k = [], B = dt(); B !== e; )
|
|
5637
|
+
k.push(B), B = dt();
|
|
5638
|
+
B = $e(), t.charCodeAt(u) === 125 ? (G = c, u++) : (G = e, _ === 0 && X(Q)), G !== e ? (De = l, l = Ao(k)) : (u = l, l = e);
|
|
5637
5639
|
} else
|
|
5638
5640
|
u = l, l = e;
|
|
5639
5641
|
else
|
|
@@ -5641,12 +5643,12 @@ function nd(t, a) {
|
|
|
5641
5643
|
return l;
|
|
5642
5644
|
}
|
|
5643
5645
|
function Wn() {
|
|
5644
|
-
var l, h,
|
|
5645
|
-
if (l = u, t.substr(u, 4) === w ? (h = w, u += 4) : (h = e,
|
|
5646
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5647
|
-
for ($e(), k = [],
|
|
5648
|
-
k.push(
|
|
5649
|
-
|
|
5646
|
+
var l, h, $, k, B, G;
|
|
5647
|
+
if (l = u, t.substr(u, 4) === w ? (h = w, u += 4) : (h = e, _ === 0 && X(Ae)), h !== e)
|
|
5648
|
+
if ($e(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, _ === 0 && X(Oe)), $ !== e) {
|
|
5649
|
+
for ($e(), k = [], B = dt(); B !== e; )
|
|
5650
|
+
k.push(B), B = dt();
|
|
5651
|
+
B = $e(), t.charCodeAt(u) === 125 ? (G = c, u++) : (G = e, _ === 0 && X(Q)), G !== e ? (De = l, l = wo(k)) : (u = l, l = e);
|
|
5650
5652
|
} else
|
|
5651
5653
|
u = l, l = e;
|
|
5652
5654
|
else
|
|
@@ -5654,14 +5656,14 @@ function nd(t, a) {
|
|
|
5654
5656
|
return l;
|
|
5655
5657
|
}
|
|
5656
5658
|
function qn() {
|
|
5657
|
-
var l, h,
|
|
5658
|
-
if (l = u, t.substr(u, 6) ===
|
|
5659
|
-
if (
|
|
5659
|
+
var l, h, $, k, B, G, ee, be;
|
|
5660
|
+
if (l = u, t.substr(u, 6) === L ? (h = L, u += 6) : (h = e, _ === 0 && X(Pe)), h !== e)
|
|
5661
|
+
if ($ = ht(), $ !== e)
|
|
5660
5662
|
if (k = ut(), k !== e)
|
|
5661
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5663
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5662
5664
|
for ($e(), G = [], ee = dt(); ee !== e; )
|
|
5663
5665
|
G.push(ee), ee = dt();
|
|
5664
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5666
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = So(k, G)) : (u = l, l = e);
|
|
5665
5667
|
} else
|
|
5666
5668
|
u = l, l = e;
|
|
5667
5669
|
else
|
|
@@ -5673,13 +5675,13 @@ function nd(t, a) {
|
|
|
5673
5675
|
return l;
|
|
5674
5676
|
}
|
|
5675
5677
|
function tl() {
|
|
5676
|
-
var l, h,
|
|
5677
|
-
if (l = u, t.substr(u, 5) ===
|
|
5678
|
-
if (
|
|
5679
|
-
if (k = ut(), k === e && (k = null), $e(), t.charCodeAt(u) === 123 ? (
|
|
5678
|
+
var l, h, $, k, B, G, ee, be;
|
|
5679
|
+
if (l = u, t.substr(u, 5) === O ? (h = O, u += 5) : (h = e, _ === 0 && X(Be)), h === e && (t.substr(u, 4) === F ? (h = F, u += 4) : (h = e, _ === 0 && X(Ye))), h !== e)
|
|
5680
|
+
if ($ = ht(), $ !== e)
|
|
5681
|
+
if (k = ut(), k === e && (k = null), $e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5680
5682
|
for ($e(), G = [], ee = es(); ee !== e; )
|
|
5681
5683
|
G.push(ee), ee = es();
|
|
5682
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5684
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = ko(k, G)) : (u = l, l = e);
|
|
5683
5685
|
} else
|
|
5684
5686
|
u = l, l = e;
|
|
5685
5687
|
else
|
|
@@ -5689,14 +5691,14 @@ function nd(t, a) {
|
|
|
5689
5691
|
return l;
|
|
5690
5692
|
}
|
|
5691
5693
|
function Xn() {
|
|
5692
|
-
var l, h,
|
|
5693
|
-
if (l = u, t.substr(u, 9) ===
|
|
5694
|
-
if (
|
|
5694
|
+
var l, h, $, k, B, G, ee, be;
|
|
5695
|
+
if (l = u, t.substr(u, 9) === I ? (h = I, u += 9) : (h = e, _ === 0 && X(We)), h !== e)
|
|
5696
|
+
if ($ = ht(), $ !== e)
|
|
5695
5697
|
if (k = lr(), k !== e)
|
|
5696
|
-
if ($e(), t.charCodeAt(u) === 123 ? (
|
|
5698
|
+
if ($e(), t.charCodeAt(u) === 123 ? (B = i, u++) : (B = e, _ === 0 && X(Oe)), B !== e) {
|
|
5697
5699
|
for ($e(), G = [], ee = dt(); ee !== e; )
|
|
5698
5700
|
G.push(ee), ee = dt();
|
|
5699
|
-
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e,
|
|
5701
|
+
ee = $e(), t.charCodeAt(u) === 125 ? (be = c, u++) : (be = e, _ === 0 && X(Q)), be !== e ? (De = l, l = Lo(k, G)) : (u = l, l = e);
|
|
5700
5702
|
} else
|
|
5701
5703
|
u = l, l = e;
|
|
5702
5704
|
else
|
|
@@ -5708,28 +5710,28 @@ function nd(t, a) {
|
|
|
5708
5710
|
return l;
|
|
5709
5711
|
}
|
|
5710
5712
|
function Un() {
|
|
5711
|
-
var l, h,
|
|
5712
|
-
return l = u, t.substr(u, 15) ===
|
|
5713
|
+
var l, h, $, k;
|
|
5714
|
+
return l = u, t.substr(u, 15) === J ? (h = J, u += 15) : (h = e, _ === 0 && X(Xe)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = $o(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5713
5715
|
}
|
|
5714
5716
|
function jn() {
|
|
5715
|
-
var l, h,
|
|
5716
|
-
return l = u, t.substr(u, 10) ===
|
|
5717
|
+
var l, h, $, k;
|
|
5718
|
+
return l = u, t.substr(u, 10) === H ? (h = H, u += 10) : (h = e, _ === 0 && X(Qe)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = Mo(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5717
5719
|
}
|
|
5718
5720
|
function Zn() {
|
|
5719
|
-
var l, h,
|
|
5720
|
-
return l = u, t.substr(u, 9) ===
|
|
5721
|
+
var l, h, $, k;
|
|
5722
|
+
return l = u, t.substr(u, 9) === D ? (h = D, u += 9) : (h = e, _ === 0 && X(Ue)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = Co(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5721
5723
|
}
|
|
5722
5724
|
function Qn() {
|
|
5723
|
-
var l, h,
|
|
5724
|
-
return l = u, t.substr(u, 15) ===
|
|
5725
|
+
var l, h, $, k;
|
|
5726
|
+
return l = u, t.substr(u, 15) === j ? (h = j, u += 15) : (h = e, _ === 0 && X(Re)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = Oo(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5725
5727
|
}
|
|
5726
5728
|
function Jn() {
|
|
5727
|
-
var l, h,
|
|
5728
|
-
return l = u, t.substr(u, 10) ===
|
|
5729
|
+
var l, h, $, k;
|
|
5730
|
+
return l = u, t.substr(u, 10) === q ? (h = q, u += 10) : (h = e, _ === 0 && X(ft)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = Po(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5729
5731
|
}
|
|
5730
5732
|
function Kn() {
|
|
5731
|
-
var l, h,
|
|
5732
|
-
return l = u, t.substr(u, 9) ===
|
|
5733
|
+
var l, h, $, k;
|
|
5734
|
+
return l = u, t.substr(u, 9) === ae ? (h = ae, u += 9) : (h = e, _ === 0 && X(mt)), h !== e ? ($ = ht(), $ !== e ? (k = ut(), k !== e ? (De = l, l = To(k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5733
5735
|
}
|
|
5734
5736
|
function es() {
|
|
5735
5737
|
var l, h;
|
|
@@ -5740,126 +5742,126 @@ function nd(t, a) {
|
|
|
5740
5742
|
return l = u, $e(), h = or(), h !== e ? ($e(), De = l, l = Do(h)) : (u = l, l = e), l;
|
|
5741
5743
|
}
|
|
5742
5744
|
function or() {
|
|
5743
|
-
var l, h,
|
|
5744
|
-
return l = u, h = ts(), h !== e ? ($e(), t.charCodeAt(u) === 61 ? (
|
|
5745
|
+
var l, h, $, k;
|
|
5746
|
+
return l = u, h = ts(), h !== e ? ($e(), t.charCodeAt(u) === 61 ? ($ = d, u++) : ($ = e, _ === 0 && X(S)), $ !== e ? ($e(), k = qa(), k !== e ? (De = l, l = Eo(h, k)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5745
5747
|
}
|
|
5746
5748
|
function ts() {
|
|
5747
5749
|
var l;
|
|
5748
5750
|
return l = ut(), l === e && (l = lr()), l;
|
|
5749
5751
|
}
|
|
5750
5752
|
function qa() {
|
|
5751
|
-
var l, h,
|
|
5752
|
-
return l = u, h = as(), h !== e ? (t.charCodeAt(u) === 37 ? (
|
|
5753
|
+
var l, h, $;
|
|
5754
|
+
return l = u, h = as(), h !== e ? (t.charCodeAt(u) === 37 ? ($ = fe, u++) : ($ = e, _ === 0 && X(at)), $ !== e ? (De = l, l = Fo(h)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = u, h = as(), h !== e && (De = l, h = No(h)), l = h, l === e && (l = u, h = ut(), h !== e && (De = l, h = Bo(h)), l = h, l === e && (l = u, h = lr(), h !== e && (De = l, h = Io(h)), l = h))), l;
|
|
5753
5755
|
}
|
|
5754
5756
|
function lr() {
|
|
5755
|
-
var l, h,
|
|
5756
|
-
if (
|
|
5757
|
-
for (k = [],
|
|
5758
|
-
k.push(
|
|
5759
|
-
|
|
5757
|
+
var l, h, $, k, B;
|
|
5758
|
+
if (_++, l = u, h = u, $ = t.charAt(u), xe.test($) ? u++ : ($ = e, _ === 0 && X(M)), $ !== e) {
|
|
5759
|
+
for (k = [], B = t.charAt(u), pe.test(B) ? u++ : (B = e, _ === 0 && X(oe)); B !== e; )
|
|
5760
|
+
k.push(B), B = t.charAt(u), pe.test(B) ? u++ : (B = e, _ === 0 && X(oe));
|
|
5761
|
+
$ = [$, k], h = $;
|
|
5760
5762
|
} else
|
|
5761
5763
|
u = h, h = e;
|
|
5762
|
-
return h !== e ? l = t.substring(l, u) : l = h,
|
|
5764
|
+
return h !== e ? l = t.substring(l, u) : l = h, _--, l === e && (h = e, _ === 0 && X(Ct)), l;
|
|
5763
5765
|
}
|
|
5764
5766
|
function as() {
|
|
5765
|
-
var l, h,
|
|
5766
|
-
if (l = u, h = u,
|
|
5767
|
-
if (ee = [], be = t.charAt(u), Me.test(be) ? u++ : (be = e,
|
|
5767
|
+
var l, h, $, k, B, G, ee, be, Lt, Ke;
|
|
5768
|
+
if (l = u, h = u, $ = u, t.charCodeAt(u) === 45 ? (k = ne, u++) : (k = e, _ === 0 && X(le)), k === e && (k = null), B = u, t.charCodeAt(u) === 46 ? (G = N, u++) : (G = e, _ === 0 && X(re)), G !== e) {
|
|
5769
|
+
if (ee = [], be = t.charAt(u), Me.test(be) ? u++ : (be = e, _ === 0 && X(Te)), be !== e)
|
|
5768
5770
|
for (; be !== e; )
|
|
5769
|
-
ee.push(be), be = t.charAt(u), Me.test(be) ? u++ : (be = e,
|
|
5771
|
+
ee.push(be), be = t.charAt(u), Me.test(be) ? u++ : (be = e, _ === 0 && X(Te));
|
|
5770
5772
|
else
|
|
5771
5773
|
ee = e;
|
|
5772
|
-
ee !== e ? (G = [G, ee],
|
|
5774
|
+
ee !== e ? (G = [G, ee], B = G) : (u = B, B = e);
|
|
5773
5775
|
} else
|
|
5774
|
-
u =
|
|
5775
|
-
if (
|
|
5776
|
-
if (
|
|
5776
|
+
u = B, B = e;
|
|
5777
|
+
if (B === e) {
|
|
5778
|
+
if (B = u, G = [], ee = t.charAt(u), Me.test(ee) ? u++ : (ee = e, _ === 0 && X(Te)), ee !== e)
|
|
5777
5779
|
for (; ee !== e; )
|
|
5778
|
-
G.push(ee), ee = t.charAt(u), Me.test(ee) ? u++ : (ee = e,
|
|
5780
|
+
G.push(ee), ee = t.charAt(u), Me.test(ee) ? u++ : (ee = e, _ === 0 && X(Te));
|
|
5779
5781
|
else
|
|
5780
5782
|
G = e;
|
|
5781
5783
|
if (G !== e) {
|
|
5782
|
-
if (ee = u, t.charCodeAt(u) === 46 ? (be =
|
|
5783
|
-
for (Lt = [], Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e,
|
|
5784
|
-
Lt.push(Ke), Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e,
|
|
5784
|
+
if (ee = u, t.charCodeAt(u) === 46 ? (be = N, u++) : (be = e, _ === 0 && X(re)), be !== e) {
|
|
5785
|
+
for (Lt = [], Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e, _ === 0 && X(Te)); Ke !== e; )
|
|
5786
|
+
Lt.push(Ke), Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e, _ === 0 && X(Te));
|
|
5785
5787
|
be = [be, Lt], ee = be;
|
|
5786
5788
|
} else
|
|
5787
5789
|
u = ee, ee = e;
|
|
5788
|
-
ee === e && (ee = null), G = [G, ee],
|
|
5790
|
+
ee === e && (ee = null), G = [G, ee], B = G;
|
|
5789
5791
|
} else
|
|
5790
|
-
u =
|
|
5792
|
+
u = B, B = e;
|
|
5791
5793
|
}
|
|
5792
|
-
if (
|
|
5793
|
-
if (G = u, ee = t.charAt(u),
|
|
5794
|
-
if (be = t.charAt(u),
|
|
5794
|
+
if (B !== e) {
|
|
5795
|
+
if (G = u, ee = t.charAt(u), K.test(ee) ? u++ : (ee = e, _ === 0 && X(je)), ee !== e) {
|
|
5796
|
+
if (be = t.charAt(u), te.test(be) ? u++ : (be = e, _ === 0 && X(Ot)), be === e && (be = null), Lt = [], Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e, _ === 0 && X(Te)), Ke !== e)
|
|
5795
5797
|
for (; Ke !== e; )
|
|
5796
|
-
Lt.push(Ke), Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e,
|
|
5798
|
+
Lt.push(Ke), Ke = t.charAt(u), Me.test(Ke) ? u++ : (Ke = e, _ === 0 && X(Te));
|
|
5797
5799
|
else
|
|
5798
5800
|
Lt = e;
|
|
5799
5801
|
Lt !== e ? (ee = [ee, be, Lt], G = ee) : (u = G, G = e);
|
|
5800
5802
|
} else
|
|
5801
5803
|
u = G, G = e;
|
|
5802
|
-
G === e && (G = null), k = [k,
|
|
5804
|
+
G === e && (G = null), k = [k, B, G], $ = k;
|
|
5803
5805
|
} else
|
|
5804
|
-
u =
|
|
5805
|
-
return
|
|
5806
|
+
u = $, $ = e;
|
|
5807
|
+
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (De = l, h = Vo(h)), l = h, l;
|
|
5806
5808
|
}
|
|
5807
5809
|
function ut() {
|
|
5808
|
-
var l, h,
|
|
5809
|
-
if (
|
|
5810
|
-
for (
|
|
5811
|
-
|
|
5812
|
-
t.charCodeAt(u) === 34 ? (k = Y, u++) : (k = e,
|
|
5810
|
+
var l, h, $, k;
|
|
5811
|
+
if (_++, l = u, t.charCodeAt(u) === 34 ? (h = Y, u++) : (h = e, _ === 0 && X(Je)), h !== e) {
|
|
5812
|
+
for ($ = [], k = rs(); k !== e; )
|
|
5813
|
+
$.push(k), k = rs();
|
|
5814
|
+
t.charCodeAt(u) === 34 ? (k = Y, u++) : (k = e, _ === 0 && X(Je)), k !== e ? (De = l, l = _o($)) : (u = l, l = e);
|
|
5813
5815
|
} else
|
|
5814
5816
|
u = l, l = e;
|
|
5815
|
-
return
|
|
5817
|
+
return _--, l === e && (h = e, _ === 0 && X(it)), l;
|
|
5816
5818
|
}
|
|
5817
5819
|
function rs() {
|
|
5818
|
-
var l, h,
|
|
5819
|
-
return l = u, t.charCodeAt(u) === 92 ? (h = R, u++) : (h = e,
|
|
5820
|
+
var l, h, $;
|
|
5821
|
+
return l = u, t.charCodeAt(u) === 92 ? (h = R, u++) : (h = e, _ === 0 && X(Pt)), h !== e ? ($ = al(), $ !== e ? (De = l, l = Go($)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = t.charAt(u), ke.test(l) ? u++ : (l = e, _ === 0 && X(na))), l;
|
|
5820
5822
|
}
|
|
5821
5823
|
function al() {
|
|
5822
|
-
var l, h,
|
|
5823
|
-
return l = u, t.charCodeAt(u) === 34 ? (h = Y, u++) : (h = e,
|
|
5824
|
+
var l, h, $, k, B, G, ee, be;
|
|
5825
|
+
return l = u, t.charCodeAt(u) === 34 ? (h = Y, u++) : (h = e, _ === 0 && X(Je)), h !== e && (De = l, h = Ho()), l = h, l === e && (l = u, t.charCodeAt(u) === 92 ? (h = R, u++) : (h = e, _ === 0 && X(Pt)), h !== e && (De = l, h = Yo()), l = h, l === e && (l = u, t.charCodeAt(u) === 110 ? (h = ie, u++) : (h = e, _ === 0 && X(fa)), h !== e && (De = l, h = Ro()), l = h, l === e && (l = u, t.charCodeAt(u) === 114 ? (h = he, u++) : (h = e, _ === 0 && X(Ra)), h !== e && (De = l, h = Wo()), l = h, l === e && (l = u, t.charCodeAt(u) === 116 ? (h = ve, u++) : (h = e, _ === 0 && X(se)), h !== e && (De = l, h = qo()), l = h, l === e && (l = u, t.charCodeAt(u) === 117 ? (h = ce, u++) : (h = e, _ === 0 && X(Le)), h !== e ? ($ = u, k = u, B = t.charAt(u), me.test(B) ? u++ : (B = e, _ === 0 && X(Fe)), B !== e ? (G = t.charAt(u), me.test(G) ? u++ : (G = e, _ === 0 && X(Fe)), G !== e ? (ee = t.charAt(u), me.test(ee) ? u++ : (ee = e, _ === 0 && X(Fe)), ee !== e ? (be = t.charAt(u), me.test(be) ? u++ : (be = e, _ === 0 && X(Fe)), be !== e ? (B = [B, G, ee, be], k = B) : (u = k, k = e)) : (u = k, k = e)) : (u = k, k = e)) : (u = k, k = e), k !== e ? $ = t.substring($, u) : $ = k, $ !== e ? (De = l, l = Xo($)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = u, t.length > u ? (h = t.charAt(u), u++) : (h = e, _ === 0 && X(Ve)), h !== e && (De = l, h = Uo(h)), l = h)))))), l;
|
|
5824
5826
|
}
|
|
5825
5827
|
function cr() {
|
|
5826
5828
|
var l;
|
|
5827
5829
|
return l = rl(), l === e && (l = nl()), l;
|
|
5828
5830
|
}
|
|
5829
5831
|
function rl() {
|
|
5830
|
-
var l, h,
|
|
5831
|
-
if (l = u, t.substr(u, 2) === ue ? (h = ue, u += 2) : (h = e,
|
|
5832
|
-
for (
|
|
5833
|
-
|
|
5834
|
-
h = [h,
|
|
5832
|
+
var l, h, $, k;
|
|
5833
|
+
if (l = u, t.substr(u, 2) === ue ? (h = ue, u += 2) : (h = e, _ === 0 && X(rt)), h !== e) {
|
|
5834
|
+
for ($ = [], k = t.charAt(u), Ce.test(k) ? u++ : (k = e, _ === 0 && X(nt)); k !== e; )
|
|
5835
|
+
$.push(k), k = t.charAt(u), Ce.test(k) ? u++ : (k = e, _ === 0 && X(nt));
|
|
5836
|
+
h = [h, $], l = h;
|
|
5835
5837
|
} else
|
|
5836
5838
|
u = l, l = e;
|
|
5837
5839
|
return l;
|
|
5838
5840
|
}
|
|
5839
5841
|
function nl() {
|
|
5840
|
-
var l, h,
|
|
5841
|
-
if (l = u, t.substr(u, 2) === Se ? (h = Se, u += 2) : (h = e,
|
|
5842
|
-
for (
|
|
5843
|
-
|
|
5844
|
-
t.substr(u, 2) === ye ? (k = ye, u += 2) : (k = e,
|
|
5842
|
+
var l, h, $, k, B, G;
|
|
5843
|
+
if (l = u, t.substr(u, 2) === Se ? (h = Se, u += 2) : (h = e, _ === 0 && X(Wt)), h !== e) {
|
|
5844
|
+
for ($ = [], k = u, B = u, _++, t.substr(u, 2) === ye ? (G = ye, u += 2) : (G = e, _ === 0 && X(da)), _--, G === e ? B = void 0 : (u = B, B = e), B !== e ? (t.length > u ? (G = t.charAt(u), u++) : (G = e, _ === 0 && X(Ve)), G !== e ? (B = [B, G], k = B) : (u = k, k = e)) : (u = k, k = e); k !== e; )
|
|
5845
|
+
$.push(k), k = u, B = u, _++, t.substr(u, 2) === ye ? (G = ye, u += 2) : (G = e, _ === 0 && X(da)), _--, G === e ? B = void 0 : (u = B, B = e), B !== e ? (t.length > u ? (G = t.charAt(u), u++) : (G = e, _ === 0 && X(Ve)), G !== e ? (B = [B, G], k = B) : (u = k, k = e)) : (u = k, k = e);
|
|
5846
|
+
t.substr(u, 2) === ye ? (k = ye, u += 2) : (k = e, _ === 0 && X(da)), k !== e ? (h = [h, $, k], l = h) : (u = l, l = e);
|
|
5845
5847
|
} else
|
|
5846
5848
|
u = l, l = e;
|
|
5847
5849
|
return l;
|
|
5848
5850
|
}
|
|
5849
5851
|
function ht() {
|
|
5850
5852
|
var l, h;
|
|
5851
|
-
if (
|
|
5853
|
+
if (_++, l = [], h = t.charAt(u), we.test(h) ? u++ : (h = e, _ === 0 && X(qt)), h === e && (h = cr()), h !== e)
|
|
5852
5854
|
for (; h !== e; )
|
|
5853
|
-
l.push(h), h = t.charAt(u), we.test(h) ? u++ : (h = e,
|
|
5855
|
+
l.push(h), h = t.charAt(u), we.test(h) ? u++ : (h = e, _ === 0 && X(qt)), h === e && (h = cr());
|
|
5854
5856
|
else
|
|
5855
5857
|
l = e;
|
|
5856
|
-
return
|
|
5858
|
+
return _--, l === e && (h = e, _ === 0 && X(Oa)), l;
|
|
5857
5859
|
}
|
|
5858
5860
|
function $e() {
|
|
5859
5861
|
var l, h;
|
|
5860
|
-
for (
|
|
5861
|
-
l.push(h), h = t.charAt(u), we.test(h) ? u++ : (h = e,
|
|
5862
|
-
return
|
|
5862
|
+
for (_++, l = [], h = t.charAt(u), we.test(h) ? u++ : (h = e, _ === 0 && X(qt)), h === e && (h = cr()); h !== e; )
|
|
5863
|
+
l.push(h), h = t.charAt(u), we.test(h) ? u++ : (h = e, _ === 0 && X(qt)), h === e && (h = cr());
|
|
5864
|
+
return _--, h = e, _ === 0 && X(qr), l;
|
|
5863
5865
|
}
|
|
5864
5866
|
if (Wa = s(), a.peg$library)
|
|
5865
5867
|
return (
|
|
@@ -5874,7 +5876,7 @@ function nd(t, a) {
|
|
|
5874
5876
|
);
|
|
5875
5877
|
if (Wa !== e && u === t.length)
|
|
5876
5878
|
return Wa;
|
|
5877
|
-
throw Wa !== e && u < t.length &&
|
|
5879
|
+
throw Wa !== e && u < t.length && X(Qo()), Ko(
|
|
5878
5880
|
sr,
|
|
5879
5881
|
Xt < t.length ? t.charAt(Xt) : null,
|
|
5880
5882
|
Xt < t.length ? Xr(Xt, Xt + 1) : Xr(Xt, Xt)
|
|
@@ -6896,10 +6898,10 @@ function Ed(t, a) {
|
|
|
6896
6898
|
};
|
|
6897
6899
|
if (a == null || !t.scenes || a < 0 || a >= t.scenes.length)
|
|
6898
6900
|
return r;
|
|
6899
|
-
const n = Dd(t.scenes, a, t.chartType), s = n.chartType ?? t.chartType, o = n.data ? Qi(to(n.data)) : r.data, i = Object.keys(n.chartTypeOptions).length > 0 ? Cs(s, { ...e, ...n.chartTypeOptions }) : e, c = n.colorizes.length > 0 ? ao(n.colorizes) : n.data ? [] : r.colorizes, f = a != null ? ro(n.highlights) : r.highlights, d = n.areaFills.length > 0 ? no(n.areaFills) : r.areaFills, g = n.annotations.length > 0 ? so(n.annotations) : [], b = [...r.annotations, ...g], m = n.hiddenAnnotationIds.size > 0 ? b.filter((
|
|
6900
|
-
for (const
|
|
6901
|
-
const
|
|
6902
|
-
typeof
|
|
6901
|
+
const n = Dd(t.scenes, a, t.chartType), s = n.chartType ?? t.chartType, o = n.data ? Qi(to(n.data)) : r.data, i = Object.keys(n.chartTypeOptions).length > 0 ? Cs(s, { ...e, ...n.chartTypeOptions }) : e, c = n.colorizes.length > 0 ? ao(n.colorizes) : n.data ? [] : r.colorizes, f = a != null ? ro(n.highlights) : r.highlights, d = n.areaFills.length > 0 ? no(n.areaFills) : r.areaFills, g = n.annotations.length > 0 ? so(n.annotations) : [], b = [...r.annotations, ...g], m = n.hiddenAnnotationIds.size > 0 ? b.filter((L) => !L.id || !n.hiddenAnnotationIds.has(L.id)) : b, v = n.seriesOverrides.length > 0 ? io(n.seriesOverrides) : r.seriesOverrides, y = Td(n.transforms, r.sortMode, `scene ${a}`), x = ["title", "description", "source", "sourceUrl", "byline", "note"], A = {};
|
|
6902
|
+
for (const L of x) {
|
|
6903
|
+
const O = n.properties.get(L);
|
|
6904
|
+
typeof O == "string" && (A[L] = O);
|
|
6903
6905
|
}
|
|
6904
6906
|
const w = Object.keys(A).length > 0 ? { ...r.frame, ...A } : r.frame;
|
|
6905
6907
|
return {
|