@silurus/ooxml 0.89.0 → 0.89.1

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.
Files changed (65) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/assets/render-worker-C5G_Nr_A.js +35 -0
  3. package/dist/assets/render-worker-DQfWdNsm.js +16 -0
  4. package/dist/assets/render-worker-Ds7LjwU-.js +15 -0
  5. package/dist/bounded-raw-part-cache-CsnNptAy.js +33925 -0
  6. package/dist/{canvas-viewer-mechanics-DfQqRKkD.js → canvas-viewer-mechanics-BZ8QCrRi.js} +2 -2
  7. package/dist/{cfb-guard-9QTRTg7f.js → cfb-guard-dNeUiANF.js} +1 -1
  8. package/dist/chart-ex.mjs +477 -477
  9. package/dist/{comment-overlay-controller-B5_zGgG5.js → comment-overlay-controller-CBvQx-En.js} +16 -16
  10. package/dist/{comment-ui-runtime-D_sb2K6s.js → comment-ui-runtime-BKidRH36.js} +3 -3
  11. package/dist/{comment-ui-runtime-Jy-3goA9.js → comment-ui-runtime-C47QoDUy.js} +3 -3
  12. package/dist/{document-model-source-BKNrXjAL.js → document-model-source-MzFPrxt0.js} +44 -44
  13. package/dist/{document-pull-client-CxONDGbk.js → document-pull-client-BoJeuURD.js} +6102 -7994
  14. package/dist/{document-pull-worker-AMyXYpPq.js → document-pull-worker-CaP8XESP.js} +18 -18
  15. package/dist/{docx-D91ER1_S.js → docx-BN70UhvX.js} +24 -24
  16. package/dist/{docx-DhDnKEI6.js → docx-BRRtSvk3.js} +556 -556
  17. package/dist/{docx-model-source-CdrSt3hF.js → docx-model-source-CTO9iw_W.js} +12 -12
  18. package/dist/docx.mjs +4 -4
  19. package/dist/{drawingml-shape-ChcGZNd8.js → drawingml-shape-CHmq8kpM.js} +55 -55
  20. package/dist/{duotone-ekYik4ix.js → duotone-DN8P4aXe.js} +1 -1
  21. package/dist/{emf-UT6I8rVi.js → emf-CGFQIz6c.js} +60 -60
  22. package/dist/{font-preload-demand-CdJZUMCT.js → font-preload-demand-Dmy31xt-.js} +2 -2
  23. package/dist/{grid-geometry-uQOgViJU.js → grid-geometry-C3IG20ut.js} +1 -1
  24. package/dist/{host-layout-measure-CCEgaC_v.js → host-layout-measure-DsuQ2UJs.js} +1 -1
  25. package/dist/index.mjs +3 -3
  26. package/dist/internal-companion.mjs +2 -2
  27. package/dist/{line-distribute-CPOV6csk.js → line-distribute-Bu8psjGd.js} +153 -70
  28. package/dist/{model-source-DJGzDtGb.js → model-source-s5hRpk4w.js} +4 -4
  29. package/dist/{model-source-session-Bu9CHFHc.js → model-source-session-6fuaqbGs.js} +18 -18
  30. package/dist/{model-source-session-CDuijwv1.js → model-source-session-DqrR4XHR.js} +2 -2
  31. package/dist/{model-source-session-sKpNiIJI.js → model-source-session-cPJSF_Ak.js} +10 -10
  32. package/dist/node.mjs +5 -5
  33. package/dist/{bounded-raw-part-cache-B7JoC1CD.js → plot-area-frame-Bs_j4uu7.js} +15189 -37964
  34. package/dist/{pptx-C_uxLVKB.js → pptx-CaJ6ILnw.js} +9 -9
  35. package/dist/{pptx-CDP9dZHe.js → pptx-_BOGcBym.js} +58 -58
  36. package/dist/{pptx-model-source-O7LhpOjz.js → pptx-model-source-B_9afw9R.js} +5 -5
  37. package/dist/pptx.mjs +5 -5
  38. package/dist/{presentation-model-source-tmROzteR.js → presentation-model-source-CGHLyX32.js} +5 -5
  39. package/dist/region-map.mjs +53 -53
  40. package/dist/{render-CJVglUHl.js → render-CzbDzRKa.js} +2 -2
  41. package/dist/{render-worker-host-BseIaVvm.js → render-worker-host-B1u6BOUd.js} +1 -1
  42. package/dist/{render-worker-host-CyxPU4JU.js → render-worker-host-C-EECo68.js} +1 -1
  43. package/dist/{render-worker-host-aF6aWkC0.js → render-worker-host-DDqZTCVf.js} +1 -1
  44. package/dist/renderer-CD2cvVAF.js +5823 -0
  45. package/dist/{renderer-CkGLj0CC.js → renderer-DRoeb14O.js} +696 -696
  46. package/dist/{resource-measurement-mXw-WjMF.js → resource-measurement-Dhhm7P_l.js} +162 -161
  47. package/dist/{session-Csv9maad.js → session-XPmC0CUd.js} +176 -176
  48. package/dist/{slide-pull-client-DRZYwBTu.js → slide-pull-client-tq7U_fYg.js} +1454 -1484
  49. package/dist/{three-d-BK5siJgJ.js → three-d-BKwNPAP4.js} +107 -107
  50. package/dist/three-d.mjs +625 -625
  51. package/dist/{wasm-runtime-generation-DX4y0Ecl.js → wasm-runtime-generation-D6TKZdNb.js} +4 -4
  52. package/dist/{workbook-model-source-BTC4ISTS.js → workbook-model-source-BIGrfZy6.js} +6 -6
  53. package/dist/worker-source-DrwhR9fw.js +22 -0
  54. package/dist/{worksheet-pull-client-CkHgbtyM.js → worksheet-pull-client-ClvPO_Jf.js} +74 -74
  55. package/dist/{xlsx-CpSDPAEU.js → xlsx-CsmREBaZ.js} +430 -420
  56. package/dist/{xlsx-D5569TPf.js → xlsx-DmHfeNNp.js} +24 -24
  57. package/dist/{xlsx-model-source-DPSkjFic.js → xlsx-model-source-D1flORqy.js} +55 -55
  58. package/dist/xlsx.mjs +5 -5
  59. package/package.json +1 -1
  60. package/dist/assets/render-worker-CUOU6mL2.js +0 -16
  61. package/dist/assets/render-worker-DOqrFhSU.js +0 -15
  62. package/dist/assets/render-worker-DvWUdZUN.js +0 -35
  63. package/dist/plot-area-frame-CaJFvZ7p.js +0 -8502
  64. package/dist/renderer-Czw1cCC7.js +0 -5823
  65. package/dist/worker-source-I1cIYBel.js +0 -22
package/dist/chart-ex.mjs CHANGED
@@ -1,24 +1,24 @@
1
- import { $ as e, $n as t, Aa as n, Ba as r, Fn as i, Gi as a, Ia as o, Ii as s, In as c, J as l, Ki as u, Ln as d, Ma as f, Mt as p, Nn as m, Pn as h, Qn as g, R as _, Rn as ee, Rt as v, S as y, Ui as b, Ut as x, Wi as S, Wt as C, Y as w, Yi as T, Yt as E, Zi as te, Zn as D, Zt as O, _n as k, aa as A, b as j, bt as M, ca as ne, ct as N, er as P, fn as F, ga as I, gn as L, hn as re, in as R, it as z, jt as ie, li as B, mn as ae, na as oe, nt as se, oa as ce, on as le, ot as ue, pn as de, qa as fe, rt as pe, s as me, st as he, t as ge, ta as V, tt as _e, x as H, xn as ve, yt as ye, zt as be } from "./plot-area-frame-CaJFvZ7p.js";
2
- import { A as xe, C as Se, D as Ce, E as we, O as Te, S as Ee, T as De, _ as U, a as Oe, b as ke, c as Ae, d as je, f as Me, g as Ne, i as Pe, j as Fe, k as Ie, l as Le, m as Re, o as ze, p as Be, s as Ve, u as He, v as Ue, w as We, x as Ge, y as W } from "./renderer-Czw1cCC7.js";
1
+ import { $ as e, $i as t, $n as n, Fn as r, Ga as i, Gi as a, In as o, J as s, Ln as c, Mt as l, Nn as u, Pn as d, Qi as f, Qn as p, R as m, Rn as h, Rt as g, S as _, Ta as v, Ut as y, Va as b, Wt as x, Y as S, Ya as C, Yt as w, Zn as T, Zt as E, _a as D, _n as O, b as k, bt as A, ct as j, da as M, ea as N, er as P, fn as F, gn as I, ha as ee, hn as te, ia as ne, in as L, it as R, jt as re, ma as ie, mn as ae, no as z, nt as oe, oa as se, on as ce, ot as le, pn as ue, rt as de, s as fe, st as pe, t as me, ta as he, tt as ge, ua as _e, vi as ve, x as B, xn as V, yt as ye, za as be, zt as H } from "./plot-area-frame-Bs_j4uu7.js";
2
+ import { A as xe, C as Se, D as Ce, E as we, O as Te, S as Ee, T as De, _ as U, a as Oe, b as ke, c as Ae, d as je, f as Me, g as Ne, i as Pe, j as Fe, k as Ie, l as Le, m as Re, o as ze, p as Be, s as Ve, u as He, v as Ue, w as We, x as Ge, y as W } from "./renderer-CD2cvVAF.js";
3
3
  import { t as G } from "./renderer-module-contract-CWM7jv6d.js";
4
4
  //#region packages/core/src/chart/chart-ex-renderer.ts
5
- function Ke(e, t, r, i = 1) {
6
- let a = 0, s = Math.max(1, r?.w ?? 32 * i), c = Math.max(1, r?.h ?? 16 * i), l = ae(e, ({ label: r, linkedStyleIndex: l }) => {
7
- let u = r.labelBox, d = L(u), p = d ? e.chartStyleRoles?.dataLabelCallout ?? e.chartStyleRoles?.dataLabel : e.chartStyleRoles?.dataLabel, m = d ? fe(e, "dataLabelCallout") ?? fe(e, "dataLabel") : fe(e, "dataLabel"), h = k(u, p, m, p != null, 0, l)?.fillPaint, g = n(u?.style, m, 0), _ = u?.borderHidden === !0 ? f(m) : void 0, ee = u?.borderColor != null || u?.borderFill != null || g !== void 0 || _ !== void 0 || u?.borderPaintAuthored === !0 && u?.borderHidden !== !0, v = g === void 0 ? _ === void 0 ? u?.borderFill ?? (u?.borderColor ? {
5
+ function Ke(e, t, n, r = 1) {
6
+ let a = 0, o = Math.max(1, n?.w ?? 32 * r), s = Math.max(1, n?.h ?? 16 * r), c = ae(e, ({ label: n, linkedStyleIndex: c }) => {
7
+ let l = n.labelBox, u = I(l), d = u ? e.chartStyleRoles?.dataLabelCallout ?? e.chartStyleRoles?.dataLabel : e.chartStyleRoles?.dataLabel, f = u ? z(e, "dataLabelCallout") ?? z(e, "dataLabel") : z(e, "dataLabel"), p = O(l, d, f, d != null, 0, c)?.fillPaint, m = be(l?.style, f, 0), h = l?.borderHidden === !0 ? b(f) : void 0, g = l?.borderColor != null || l?.borderFill != null || m !== void 0 || h !== void 0 || l?.borderPaintAuthored === !0 && l?.borderHidden !== !0, _ = m === void 0 ? h === void 0 ? l?.borderFill ?? (l?.borderColor ? {
8
8
  fillType: "solid",
9
- color: u.borderColor
10
- } : ee ? null : o(p, l)) : _ : g;
11
- for (let e of [h, v]) {
9
+ color: l.borderColor
10
+ } : g ? null : i(d, c)) : h : m;
11
+ for (let e of [p, _]) {
12
12
  if (!e) continue;
13
- let n = e.fillType === "image" ? me(e, t, s, c, i) ?? 1048577 : B(e);
13
+ let n = e.fillType === "image" ? fe(e, t, o, s, r) ?? 1048577 : ve(e);
14
14
  if (e.fillType === "gradient" && n > 4096 || n > 1048576 - a) {
15
- a = le + 1;
15
+ a = ce + 1;
16
16
  return;
17
17
  }
18
18
  a += n;
19
19
  }
20
20
  });
21
- return l === "not-hierarchy" ? null : l === "too-large" ? le + 1 : a;
21
+ return c === "not-hierarchy" ? null : c === "too-large" ? ce + 1 : a;
22
22
  }
23
23
  function K(e, t, n, r) {
24
24
  if (!e.chartexParetoOutlineOwner) return t;
@@ -49,8 +49,8 @@ function qe(e, t, n = 1) {
49
49
  ].includes(e.chartType)) return null;
50
50
  let r = 0, i = (e) => {
51
51
  if (!e || r > 1048576) return;
52
- let i = e.fillType === "image" ? me(e, void 0, Math.max(1, t.w), Math.max(1, t.h), n) : B(e);
53
- e.fillType === "gradient" && i > 4096 || i > 1048576 - r ? r = le + 1 : r += i;
52
+ let i = e.fillType === "image" ? fe(e, void 0, Math.max(1, t.w), Math.max(1, t.h), n) : ve(e);
53
+ e.fillType === "gradient" && i > 4096 || i > 1048576 - r ? r = ce + 1 : r += i;
54
54
  }, a = (t, n, r, a) => {
55
55
  let o = Fe(e, t, n, r, a, "#000000", { linkedNoStyleFallback: !0 });
56
56
  o.visible && i(o.paint ?? {
@@ -70,19 +70,19 @@ function qe(e, t, n = 1) {
70
70
  fillType: "solid",
71
71
  color: "000000"
72
72
  });
73
- }, c = j(e, (t, n, r) => n === 0 ? K(e, t, n, r) : t);
73
+ }, c = k(e, (t, n, r) => n === 0 ? K(e, t, n, r) : t);
74
74
  if (c) {
75
- if (c.kind === "tooManyInputPoints") return le + 1;
76
- if (y(c, o), r > 1048576 || (H(c, o), r > 1048576)) return r;
75
+ if (c.kind === "tooManyInputPoints") return ce + 1;
76
+ if (_(c, o), r > 1048576 || (B(c, o), r > 1048576)) return r;
77
77
  if (e.chartType === "pareto" && c.series.length > 0) {
78
78
  let t = e.chartexParetoOwnerIndex ?? 0, n = c.series[t], r = e.series.find((e) => e.seriesType === "line");
79
79
  s(r ?? n, r?.chartexFormatIdx ?? n?.chartexFormatIdx ?? 0);
80
80
  }
81
81
  } else if (e.chartType === "paretoLine") {
82
82
  let t = e.series[0];
83
- t && x(t, e.categories, { sortDescending: e.chartexParetoSortDescending ?? !1 }).points.length > 0 && s(t, v(t, 0));
83
+ t && y(t, e.categories, { sortDescending: e.chartexParetoSortDescending ?? !1 }).points.length > 0 && s(t, g(t, 0));
84
84
  } else if (e.chartType === "waterfall") {
85
- let t = e.series[0], n = t?.values ?? [], r = be(t?.dataPointOverrides), a = F(n, e.categories.length, e.subtotalIndices);
85
+ let t = e.series[0], n = t?.values ?? [], r = H(t?.dataPointOverrides), a = F(n, e.categories.length, e.subtotalIndices);
86
86
  if (a.cumulativeOverflow || a.rawMax <= a.rawMin) return 0;
87
87
  for (let n = 0; n < a.bars.length; n++) {
88
88
  let o = a.bars[n];
@@ -98,7 +98,7 @@ function qe(e, t, n = 1) {
98
98
  } else if (e.chartType === "funnel") {
99
99
  let t = e.series[0], n = t?.values ?? [], r = Math.max(n.length, e.categories.length);
100
100
  if (n.some((e) => e != null && e > 0)) {
101
- let a = be(t?.dataPointOverrides);
101
+ let a = H(t?.dataPointOverrides);
102
102
  for (let o = 0; o < r; o++) {
103
103
  if (!((n[o] ?? 0) > 0)) continue;
104
104
  let r = a.get(o);
@@ -118,11 +118,11 @@ function qe(e, t, n = 1) {
118
118
  }
119
119
  } else {
120
120
  let t = e.series[0], n = 1;
121
- de(e, ({ node: e }) => {
121
+ ue(e, ({ node: e }) => {
122
122
  n = Math.max(n, e.branchIndex + 1);
123
123
  });
124
- let r = be(t?.dataPointOverrides);
125
- if (de(e, ({ node: a, paintsBody: o }) => {
124
+ let r = H(t?.dataPointOverrides);
125
+ if (ue(e, ({ node: a, paintsBody: o }) => {
126
126
  if (!o) return;
127
127
  let s = r.get(a.labelIndex);
128
128
  i(Ie(e, t, s, a.branchIndex, n));
@@ -131,158 +131,158 @@ function qe(e, t, n = 1) {
131
131
  fillType: "solid",
132
132
  color: "000000"
133
133
  });
134
- }) === "too-large") return le + 1;
134
+ }) === "too-large") return ce + 1;
135
135
  }
136
136
  return r;
137
137
  }
138
- function Je(e, t, n, i, a = 0) {
139
- let o = t.series[0];
140
- if (!o) return;
141
- let s = C(o.values, t.chartexHistogramBinning ?? {}, o.valFormatCode, t.date1904 === !0);
142
- if (s.kind === "tooManyInputPoints") {
143
- Le(e, n, R + 1);
138
+ function Je(e, t, n, r, i = 0) {
139
+ let a = t.series[0];
140
+ if (!a) return;
141
+ let o = x(a.values, t.chartexHistogramBinning ?? {}, a.valFormatCode, t.date1904 === !0);
142
+ if (o.kind === "tooManyInputPoints") {
143
+ Le(e, n, L + 1);
144
144
  return;
145
145
  }
146
- ze(e, r(t, {
146
+ ze(e, C(t, {
147
147
  chartType: "clusteredBar",
148
- categories: s.categories,
148
+ categories: o.categories,
149
149
  series: [{
150
- ...o,
150
+ ...a,
151
151
  categories: void 0,
152
- values: s.counts,
152
+ values: o.counts,
153
153
  valFormatCode: null
154
154
  }]
155
- }), n, i, { gapPolicy: "chartex" }, a);
155
+ }), n, r, { gapPolicy: "chartex" }, i);
156
156
  }
157
- function Ye(t, n, i, o, s) {
158
- let { x: c, y: f, w: p, h: m } = i, h = n.series[0]?.values ?? [], g = n.categories, v = Math.max(h.length, g.length);
159
- if (v === 0 || Le(t, i, v)) return;
160
- let { bars: y, rawMax: b, rawMin: x, cumulativeOverflow: S } = F(h, g.length, n.subtotalIndices);
161
- if (S) {
162
- t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)", c + p / 2, f + m / 2);
157
+ function Ye(t, n, r, i, a) {
158
+ let { x: o, y: l, w: u, h: d } = r, f = n.series[0]?.values ?? [], p = n.categories, g = Math.max(f.length, p.length);
159
+ if (g === 0 || Le(t, r, g)) return;
160
+ let { bars: _, rawMax: y, rawMin: b, cumulativeOverflow: x } = F(f, p.length, n.subtotalIndices);
161
+ if (x) {
162
+ t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)", o + u / 2, l + d / 2);
163
163
  return;
164
164
  }
165
- if (b <= x) return;
166
- let C = n.subtotalIndices.length === 0 && y.every((e, t) => !e.hasValue || h[t] >= 0), E = !n.valAxisHidden && n.valAxisTickLabelPos !== "none" && !C, D = Ae(t, n, p, m, o), k = a(n, p, m, o), j = _(n.valAxisFontSizeHpt, m, o), P = _(n.catAxisFontSizeHpt, m, o), L = M(n, n.valAxisFontFace, "minor"), R = M(n, n.catAxisFontFace, "minor"), ie = se(n, x, b, m / o);
165
+ if (y <= b) return;
166
+ let w = n.subtotalIndices.length === 0 && _.every((e, t) => !e.hasValue || f[t] >= 0), T = !n.valAxisHidden && n.valAxisTickLabelPos !== "none" && !w, O = Ae(t, n, u, d, i), k = N(n, u, d, i), P = m(n.valAxisFontSizeHpt, d, i), I = m(n.catAxisFontSizeHpt, d, i), L = A(n, n.valAxisFontFace, "minor"), re = A(n, n.catAxisFontFace, "minor"), ae = oe(n, b, y, d / i);
167
167
  t.save();
168
- let B = 0;
169
- if (E) {
170
- t.font = ye(j, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1);
168
+ let z = 0;
169
+ if (T) {
170
+ t.font = ye(P, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1);
171
171
  let e = 0;
172
- for (let r of ie.majorLines) e = Math.max(e, ne(t, _e(n, r, !1)));
173
- B = e + 8;
172
+ for (let r of ae.majorLines) e = Math.max(e, D(t, ge(n, r, !1)));
173
+ z = e + 8;
174
174
  }
175
- let ae = E ? oe(ie.majorLines.map((e) => _e(n, e, !1)), A(j)) / 2 : 0, le = Math.max(1, p - k.valBandW - B - p * .02) / v;
176
- t.font = ye(P, R, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
177
- let de = g.slice(0, v).map((e) => N(t, ve(e, n.catAxisFormatCode, n.date1904), Math.max(1, le - 8))), fe = 0;
178
- for (let e of de) e.some(Boolean) && (fe = Math.max(fe, e.length));
179
- let me = n.catAxisHidden || fe === 0 ? 0 : fe * (P + 2) + 4, V = n.series[0], H = be(V?.dataLabelOverrides), Ce = be(V?.dataPointOverrides), Ee = V?.chartexStyle, De = `#${V?.color ?? U(n, 0, 3, Ee)}`, Oe = `#${U(n, 1, 3, Ee)}`, Pe = `#${U(n, 2, 3, Ee)}`, Fe = Ue(n, 0, 3, Ee, V?.color), Re = Ue(n, 1, 3, Ee), ze = Ue(n, 2, 3, Ee), W = r(n, {
175
+ let ce = T ? M(ae.majorLines.map((e) => ge(n, e, !1)), ie(P)) / 2 : 0, ue = Math.max(1, u - k.valBandW - z - u * .02) / g;
176
+ t.font = ye(I, re, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
177
+ let fe = p.slice(0, g).map((e) => j(t, V(e, n.catAxisFormatCode, n.date1904), Math.max(1, ue - 8))), _e = 0;
178
+ for (let e of fe) e.some(Boolean) && (_e = Math.max(_e, e.length));
179
+ let ve = n.catAxisHidden || _e === 0 ? 0 : _e * (I + 2) + 4, B = n.series[0], be = H(B?.dataLabelOverrides), Ce = H(B?.dataPointOverrides), Ee = B?.chartexStyle, De = `#${B?.color ?? U(n, 0, 3, Ee)}`, Oe = `#${U(n, 1, 3, Ee)}`, Pe = `#${U(n, 2, 3, Ee)}`, Fe = Ue(n, 0, 3, Ee, B?.color), Re = Ue(n, 1, 3, Ee), ze = Ue(n, 2, 3, Ee), W = C(n, {
180
180
  chartType: "clusteredBar",
181
181
  series: [
182
- ke(n, "Increase", V, n.chartexDataPointStyle, 0, 3, De, !1, !0, !0),
183
- ke(n, "Decrease", V, n.chartexDataPointStyle, 1, 3, Oe, !1, !0, !0),
184
- ke(n, "Total", V, n.chartexDataPointStyle, 2, 3, Pe, !1, !0, !0)
182
+ ke(n, "Increase", B, n.chartexDataPointStyle, 0, 3, De, !1, !0, !0),
183
+ ke(n, "Decrease", B, n.chartexDataPointStyle, 1, 3, Oe, !1, !0, !0),
184
+ ke(n, "Total", B, n.chartexDataPointStyle, 2, 3, Pe, !1, !0, !0)
185
185
  ]
186
- }), G = Be(t, W, p, m, o), { legRightW: Ke, legLeftW: K, legTopH: qe, legBottomH: Je } = u(G, n.legendOverlay === !0), Ye = te(n, c, f, p, m, o, {
187
- titleBand: D,
186
+ }), G = Be(t, W, u, d, i), { legRightW: Ke, legLeftW: K, legTopH: qe, legBottomH: Je } = he(G, n.legendOverlay === !0), Ye = se(n, o, l, u, d, i, {
187
+ titleBand: O,
188
188
  legendReserve: G,
189
189
  pad: {
190
- t: D.bandH + qe + j / 2 + 2 + ae,
191
- r: Ke + p * .02,
192
- b: Je + k.catBandH + me,
193
- l: K + k.valBandW + (n.valAxisHidden ? p * .02 : Math.max(p * .03, B))
190
+ t: O.bandH + qe + P / 2 + 2 + ce,
191
+ r: Ke + u * .02,
192
+ b: Je + k.catBandH + ve,
193
+ l: K + k.valBandW + (n.valAxisHidden ? u * .02 : Math.max(u * .03, z))
194
194
  },
195
195
  honorPlotAreaManualLayout: !0
196
196
  });
197
- Ve(t, n, c, f, p, m, f + Ye.title.topPad, Ye.title.fontPx);
197
+ Ve(t, n, o, l, u, d, l + Ye.title.topPad, Ye.title.fontPx);
198
198
  let { px0: q, py0: J, pw: Y, ph: X } = Ye.plotRect;
199
199
  if (Y <= 0 || X <= 0) return;
200
- ge(t, n, q, J, Y, X, o, s);
201
- let Xe = se(n, x, b, X / o), Z = (e) => J + X - Xe.frac(e) * X, Q = O(n.valAxisLineColor, n.valAxisLineWidthEmu, o), Ze = O(n.catAxisLineColor, n.catAxisLineWidthEmu, o), Qe = ue(n, o);
200
+ me(t, n, q, J, Y, X, i, a);
201
+ let Xe = oe(n, b, y, X / i), Z = (e) => J + X - Xe.frac(e) * X, Q = E(n.valAxisLineColor, n.valAxisLineWidthEmu, i), Ze = E(n.catAxisLineColor, n.catAxisLineWidthEmu, i), Qe = le(n, i);
202
202
  if (!n.valAxisHidden) {
203
- t.font = ye(j, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1), t.fillStyle = n.valAxisFontColor ? `#${n.valAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle";
204
- let r = he(n, o);
205
- for (let e of Xe.minorLines) z(t, q, Y, Z(e), !1, r);
203
+ t.font = ye(P, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1), t.fillStyle = n.valAxisFontColor ? `#${n.valAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle";
204
+ let r = pe(n, i);
205
+ for (let e of Xe.minorLines) R(t, q, Y, Z(e), !1, r);
206
206
  for (let r of Xe.majorLines) {
207
- let i = Z(r);
207
+ let a = Z(r);
208
208
  if (e(n)) {
209
209
  t.strokeStyle = Qe.color, t.lineWidth = Qe.width;
210
210
  let e = Qe.dash.length > 0 && t.getLineDash ? t.getLineDash() : [];
211
- Qe.dash.length > 0 && t.setLineDash(Qe.dash), t.beginPath(), t.moveTo(q, i), t.lineTo(q + Y, i), t.stroke(), Qe.dash.length > 0 && t.setLineDash(e);
211
+ Qe.dash.length > 0 && t.setLineDash(Qe.dash), t.beginPath(), t.moveTo(q, a), t.lineTo(q + Y, a), t.stroke(), Qe.dash.length > 0 && t.setLineDash(e);
212
212
  }
213
- E && ce(t, _e(n, r, !1), q - 4, i, A(j)), l(t, n.valAxisMajorTickMark, "val", q, i, Q.color, Q.width, !1, n.valAxisLineHidden, "major", o, n.valAxisLineDash);
213
+ T && ee(t, ge(n, r, !1), q - 4, a, ie(P)), s(t, n.valAxisMajorTickMark, "val", q, a, Q.color, Q.width, !1, n.valAxisLineHidden, "major", i, n.valAxisLineDash);
214
214
  }
215
- for (let e of Xe.minorTicks) l(t, n.valAxisMinorTickMark, "val", q, Z(e), Q.color, Q.width, !1, n.valAxisLineHidden, "minor", o, n.valAxisLineDash);
215
+ for (let e of Xe.minorTicks) s(t, n.valAxisMinorTickMark, "val", q, Z(e), Q.color, Q.width, !1, n.valAxisLineHidden, "minor", i, n.valAxisLineDash);
216
216
  }
217
217
  let $e = !n.valAxisHidden && !n.valAxisLineHidden, et = !n.catAxisHidden && !n.catAxisLineHidden;
218
- $e && pe(t, q, J, q, J + X, Q.color, Q.width, n.valAxisLineDash), et && pe(t, q, J + X, q + Y, J + X, Ze.color, Ze.width, n.catAxisLineDash);
219
- let tt = Y / v, $ = tt / (1 + I(n.barGapWidth, "chartex") / 100);
220
- y.forEach((e, r) => {
221
- let i = q + tt * r + (tt - $) / 2, a = Math.min(Z(e.start), Z(e.end)), l = Math.max(Z(e.start), Z(e.end)), u = Math.max(1, l - a), b = e.semanticIndex, x = Ce.get(r), S = Ie(n, V, x, b, 3), C = x?.color ? `#${x.color}` : e.isSub ? Pe : e.isPos ? De : Oe, w = We(n, n.chartexDataPointStyle, "line", b, 3), E = xe(n, V, x, b, 3, w ? `#${w}` : C);
222
- if (e.paintSlot && ee(t, d(x?.chartexStyle, V?.chartexStyle), n.chartexDataPointStyle, b, {
223
- x: i,
224
- y: a,
218
+ $e && de(t, q, J, q, J + X, Q.color, Q.width, n.valAxisLineDash), et && de(t, q, J + X, q + Y, J + X, Ze.color, Ze.width, n.catAxisLineDash);
219
+ let tt = Y / g, $ = tt / (1 + v(n.barGapWidth, "chartex") / 100);
220
+ _.forEach((e, r) => {
221
+ let s = q + tt * r + (tt - $) / 2, v = Math.min(Z(e.start), Z(e.end)), y = Math.max(Z(e.start), Z(e.end)), b = Math.max(1, y - v), x = e.semanticIndex, S = Ce.get(r), C = Ie(n, B, S, x, 3), w = S?.color ? `#${S.color}` : e.isSub ? Pe : e.isPos ? De : Oe, T = We(n, n.chartexDataPointStyle, "line", x, 3), E = xe(n, B, S, x, 3, T ? `#${T}` : w);
222
+ if (e.paintSlot && h(t, c(S?.chartexStyle, B?.chartexStyle), n.chartexDataPointStyle, x, {
223
+ x: s,
224
+ y: v,
225
225
  w: $,
226
- h: u
227
- }, o, (e) => {
228
- S && we(e, S, {
229
- x: i,
230
- y: a,
226
+ h: b
227
+ }, i, (e) => {
228
+ C && we(e, C, {
229
+ x: s,
230
+ y: v,
231
231
  w: $,
232
- h: u
233
- }, C, o, s), !Ge(E) && Ne(e, E, o, {
234
- x: i,
235
- y: a,
232
+ h: b
233
+ }, w, i, a), !Ge(E) && Ne(e, E, i, {
234
+ x: s,
235
+ y: v,
236
236
  w: $,
237
- h: u
238
- }, s) && e.strokeRect(i, a, $, u);
239
- }), e.paintSlot && y[r + 1]?.paintSlot && r < v - 1 && n.chartexConnectorLines !== !1) {
240
- let s = q + tt * (r + 1) + (tt - $) / 2, c = e.isPos ? a : l;
237
+ h: b
238
+ }, a) && e.strokeRect(s, v, $, b);
239
+ }), e.paintSlot && _[r + 1]?.paintSlot && r < g - 1 && n.chartexConnectorLines !== !1) {
240
+ let a = q + tt * (r + 1) + (tt - $) / 2, o = e.isPos ? v : y;
241
241
  t.save();
242
- let u = [n.chartexSeriesLineStyle, n.chartexDataPointLineStyle], d = Te(n, Se(V, b), u, u, b, 3, "#000000", { linkedNoStyleFallback: !0 });
243
- Ne(t, d, o) && (d.widthEmu ?? (t.lineWidth = .75 * o), t.beginPath(), t.moveTo(i + $, c), t.lineTo(s, c), t.stroke()), t.restore();
242
+ let c = [n.chartexSeriesLineStyle, n.chartexDataPointLineStyle], l = Te(n, Se(B, x), c, c, x, 3, "#000000", { linkedNoStyleFallback: !0 });
243
+ Ne(t, l, i) && (l.widthEmu ?? (t.lineWidth = .75 * i), t.beginPath(), t.moveTo(s + $, o), t.lineTo(a, o), t.stroke()), t.restore();
244
244
  }
245
- let te = e.hasValue ? h[r] : 0, D = re(n, V, r, g[r] ?? "", te, {
245
+ let D = e.hasValue ? f[r] : 0, O = te(n, B, r, p[r] ?? "", D, {
246
246
  visible: n.showDataLabels,
247
247
  showVal: !0,
248
248
  showCatName: !1
249
- }, H, !e.hasValue);
250
- if (D) {
251
- let e = V?.dataLabelColors?.[r] ?? D.fontColor ?? null, l = e ? `#${e}` : n.dataLabelFontColor ? `#${n.dataLabelFontColor}` : "#595959", d = T(D.fontSizeHpt, o) ?? _(n.dataLabelFontSizeHpt, m, o), h = D.fontBold ?? n.dataLabelFontBold ?? !1, g = M(n, D.fontFace ?? n.dataLabelFontFace, "minor");
252
- t.font = `${D.textStyle.fontItalic ? "italic " : ""}${h ? "bold " : ""}${d}px ${g}`, He(t, D.text, {
249
+ }, be, !e.hasValue);
250
+ if (O) {
251
+ let e = B?.dataLabelColors?.[r] ?? O.fontColor ?? null, c = e ? `#${e}` : n.dataLabelFontColor ? `#${n.dataLabelFontColor}` : "#595959", f = ne(O.fontSizeHpt, i) ?? m(n.dataLabelFontSizeHpt, d, i), p = O.fontBold ?? n.dataLabelFontBold ?? !1, h = A(n, O.fontFace ?? n.dataLabelFontFace, "minor");
252
+ t.font = `${O.textStyle.fontItalic ? "italic " : ""}${p ? "bold " : ""}${f}px ${h}`, He(t, O.text, {
253
253
  kind: "bar",
254
254
  rect: {
255
- x: i,
256
- y: a,
255
+ x: s,
256
+ y: v,
257
257
  w: $,
258
- h: u
258
+ h: b
259
259
  },
260
260
  orientation: "vertical",
261
- negative: te < 0,
262
- position: D.position ?? "outEnd"
261
+ negative: D < 0,
262
+ position: O.position ?? "outEnd"
263
263
  }, {
264
264
  x: q,
265
265
  y: J,
266
266
  w: Y,
267
267
  h: X
268
- }, d, l, D.manualLayout, {
269
- x: c,
270
- y: f,
271
- w: p,
272
- h: m
273
- }, je(n, D.richRuns, o, g, h, D.textStyle), void 0, D.textStyle, o, D.labelBox, s);
268
+ }, f, c, O.manualLayout, {
269
+ x: o,
270
+ y: l,
271
+ w: u,
272
+ h: d
273
+ }, je(n, O.richRuns, i, h, p, O.textStyle), void 0, O.textStyle, i, O.labelBox, a);
274
274
  }
275
- }), t.textAlign = "center", t.textBaseline = "top", t.fillStyle = n.catAxisFontColor ? `#${n.catAxisFontColor}` : "#595959", t.font = ye(P, R, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
275
+ }), t.textAlign = "center", t.textBaseline = "top", t.fillStyle = n.catAxisFontColor ? `#${n.catAxisFontColor}` : "#595959", t.font = ye(I, re, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
276
276
  let nt = J + X + 4;
277
- for (let e = 0; e < v && !n.catAxisHidden; e++) {
277
+ for (let e = 0; e < g && !n.catAxisHidden; e++) {
278
278
  let n = q + tt * e + tt / 2;
279
- (de[e] ?? []).forEach((e, r) => e && t.fillText(e, n, nt + r * (P + 2)));
279
+ (fe[e] ?? []).forEach((e, r) => e && t.fillText(e, n, nt + r * (I + 2)));
280
280
  }
281
- w(t, n, c, f, p, m, q, J, Y, X, K, Je, k.catFontPx, k.valFontPx), Me(t, W, G, c, f, p, m, q, J, Y, X, D.bandH + 2, o, [
281
+ S(t, n, o, l, u, d, q, J, Y, X, K, Je, k.catFontPx, k.valFontPx), Me(t, W, G, o, l, u, d, q, J, Y, X, O.bandH + 2, i, [
282
282
  Fe,
283
283
  Re,
284
284
  ze
285
- ], s), t.restore();
285
+ ], a), t.restore();
286
286
  }
287
287
  function q(e, t, n, r, i) {
288
288
  let a = t.series[0]?.values ?? [], o = Math.max(a.length, t.categories.length);
@@ -290,68 +290,68 @@ function q(e, t, n, r, i) {
290
290
  let s = 0;
291
291
  for (let e = 0; e < o; e++) s = Math.max(s, a[e] ?? 0);
292
292
  if (!(s > 0)) return;
293
- let { x: c, y: l, w: f, h: p } = n, m = Ae(e, t, f, p, r), h = t.series[0], g = be(h?.dataLabelOverrides), v = `#${h?.color ?? U(t, 0, 1, h?.chartexStyle)}`, y = Ue(t, 0, 1, h?.chartexStyle, h?.color), b = {
293
+ let { x: l, y: u, w: d, h: f } = n, p = Ae(e, t, d, f, r), g = t.series[0], _ = H(g?.dataLabelOverrides), y = `#${g?.color ?? U(t, 0, 1, g?.chartexStyle)}`, b = Ue(t, 0, 1, g?.chartexStyle, g?.color), x = {
294
294
  ...t,
295
- series: [ke(t, h?.name ?? "", h, t.chartexDataPointStyle, 0, 1, v)]
296
- }, x = Be(e, b, f, p, r), { legRightW: S, legLeftW: C, legTopH: w, legBottomH: E } = u(x, t.legendOverlay === !0), D = _(t.catAxisFontSizeHpt, p, r);
297
- e.save(), e.font = ye(D, M(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
298
- let k = 0;
295
+ series: [ke(t, g?.name ?? "", g, t.chartexDataPointStyle, 0, 1, y)]
296
+ }, S = Be(e, x, d, f, r), { legRightW: C, legLeftW: w, legTopH: T, legBottomH: O } = he(S, t.legendOverlay === !0), k = m(t.catAxisFontSizeHpt, f, r);
297
+ e.save(), e.font = ye(k, A(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
298
+ let j = 0;
299
299
  if (!t.catAxisHidden) {
300
- for (let n = 0; n < Math.min(o, t.categories.length); n++) k = Math.max(k, ne(e, t.categories[n]));
301
- t.categories.length > 0 && (k += 10);
300
+ for (let n = 0; n < Math.min(o, t.categories.length); n++) j = Math.max(j, D(e, t.categories[n]));
301
+ t.categories.length > 0 && (j += 10);
302
302
  }
303
- let j = te(t, c, l, f, p, r, {
304
- titleBand: m,
305
- legendReserve: x,
303
+ let M = se(t, l, u, d, f, r, {
304
+ titleBand: p,
305
+ legendReserve: S,
306
306
  pad: {
307
- t: m.bandH + w + 2,
308
- r: S + f * .02,
309
- b: E + p * .02,
310
- l: C + k + f * .02
307
+ t: p.bandH + T + 2,
308
+ r: C + d * .02,
309
+ b: O + f * .02,
310
+ l: w + j + d * .02
311
311
  },
312
312
  honorPlotAreaManualLayout: !0
313
313
  });
314
- Ve(e, t, c, l, f, p, l + j.title.topPad, j.title.fontPx);
315
- let { px0: N, py0: P, pw: F, ph: L } = j.plotRect;
316
- if (F <= 0 || L <= 0) return;
317
- ge(e, t, N, P, F, L, r, i);
318
- let R = L / o, z = R / (1 + I(t.barGapWidth, "chartex") / 100), ie = be(h?.dataPointOverrides);
314
+ Ve(e, t, l, u, d, f, u + M.title.topPad, M.title.fontPx);
315
+ let { px0: N, py0: P, pw: F, ph: I } = M.plotRect;
316
+ if (F <= 0 || I <= 0) return;
317
+ me(e, t, N, P, F, I, r, i);
318
+ let L = I / o, R = L / (1 + v(t.barGapWidth, "chartex") / 100), re = H(g?.dataPointOverrides);
319
319
  for (let n = 0; n < o; n++) {
320
- let o = Math.max(0, a[n] ?? 0), u = F * o / s, m = N + (F - u) / 2, y = P + R * n + (R - z) / 2, b = ie.get(n), x = Ie(t, h, b, 0, 1), S = xe(t, h, b, 0, 1, v), C = (e) => {
321
- x && u > 0 ? we(e, x, {
322
- x: m,
323
- y,
324
- w: u,
325
- h: z
326
- }, v, r, i) : x && (e.fillStyle = W(e, x, m, y, u, z, v, i), e.fillRect(m, y, u, z)), Ne(e, S, r, u > 0 ? {
327
- x: m,
328
- y,
329
- w: u,
330
- h: z
331
- } : void 0, i) && e.strokeRect(m, y, u, z);
320
+ let o = Math.max(0, a[n] ?? 0), p = F * o / s, v = N + (F - p) / 2, b = P + L * n + (L - R) / 2, x = re.get(n), S = Ie(t, g, x, 0, 1), C = xe(t, g, x, 0, 1, y), w = (e) => {
321
+ S && p > 0 ? we(e, S, {
322
+ x: v,
323
+ y: b,
324
+ w: p,
325
+ h: R
326
+ }, y, r, i) : S && (e.fillStyle = W(e, S, v, b, p, R, y, i), e.fillRect(v, b, p, R)), Ne(e, C, r, p > 0 ? {
327
+ x: v,
328
+ y: b,
329
+ w: p,
330
+ h: R
331
+ } : void 0, i) && e.strokeRect(v, b, p, R);
332
332
  };
333
- u > 0 ? ee(e, d(b?.chartexStyle, h?.chartexStyle), t.chartexDataPointStyle, 0, {
334
- x: m,
335
- y,
336
- w: u,
337
- h: z
338
- }, r, C) : C(e);
339
- let w = t.categories[n];
340
- !t.catAxisHidden && w != null && (e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", e.textAlign = "right", e.textBaseline = "middle", ce(e, w, N - 6, y + z / 2, A(D)));
341
- let E = re(t, h, n, w ?? "", o, {
333
+ p > 0 ? h(e, c(x?.chartexStyle, g?.chartexStyle), t.chartexDataPointStyle, 0, {
334
+ x: v,
335
+ y: b,
336
+ w: p,
337
+ h: R
338
+ }, r, w) : w(e);
339
+ let T = t.categories[n];
340
+ !t.catAxisHidden && T != null && (e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", e.textAlign = "right", e.textBaseline = "middle", ee(e, T, N - 6, b + R / 2, ie(k)));
341
+ let E = te(t, g, n, T ?? "", o, {
342
342
  visible: !1,
343
343
  showVal: !1,
344
344
  showCatName: !1
345
- }, g);
345
+ }, _);
346
346
  if (E) {
347
- let n = T(E.fontSizeHpt, r) ?? _(t.dataLabelFontSizeHpt, p, r), a = M(t, E.fontFace ?? t.dataLabelFontFace, "minor");
347
+ let n = ne(E.fontSizeHpt, r) ?? m(t.dataLabelFontSizeHpt, f, r), a = A(t, E.fontFace ?? t.dataLabelFontFace, "minor");
348
348
  e.font = `${E.textStyle.fontItalic ? "italic " : ""}${E.fontBold ? "bold " : ""}${n}px ${a}`, He(e, E.text, {
349
349
  kind: "bar",
350
350
  rect: {
351
- x: m,
352
- y,
353
- w: u,
354
- h: z
351
+ x: v,
352
+ y: b,
353
+ w: p,
354
+ h: R
355
355
  },
356
356
  orientation: "horizontal",
357
357
  negative: !1,
@@ -360,50 +360,50 @@ function q(e, t, n, r, i) {
360
360
  x: N,
361
361
  y: P,
362
362
  w: F,
363
- h: L
363
+ h: I
364
364
  }, n, E.fontColor ? `#${E.fontColor}` : "#ffffff", E.manualLayout, {
365
- x: c,
366
- y: l,
367
- w: f,
368
- h: p
365
+ x: l,
366
+ y: u,
367
+ w: d,
368
+ h: f
369
369
  }, je(t, E.richRuns, r, a, E.fontBold ?? !1, E.textStyle), void 0, E.textStyle, r, E.labelBox, i);
370
370
  }
371
371
  }
372
372
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
373
- let n = O(t.catAxisLineColor, t.catAxisLineWidthEmu, r);
374
- e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(N, P), e.lineTo(N, P + L), e.stroke();
373
+ let n = E(t.catAxisLineColor, t.catAxisLineWidthEmu, r);
374
+ e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(N, P), e.lineTo(N, P + I), e.stroke();
375
375
  }
376
- Me(e, b, x, c, l, f, p, N, P, F, L, m.bandH + 2, r, [y], i), e.restore();
376
+ Me(e, x, S, l, u, d, f, N, P, F, I, p.bandH + 2, r, [b], i), e.restore();
377
377
  }
378
- function J(e, t, n, i, a = 0) {
379
- let o = t.series[0];
380
- if (!o || Le(e, n, Math.max(t.categories.length, o.categories?.length ?? 0, o.values.length))) return;
381
- let s = x(o, t.categories, { sortDescending: t.chartexParetoSortDescending ?? !1 });
382
- if (s.points.length === 0) return;
383
- let c = v(o, 0), l = [t.chartexDataPointStyle, t.chartexDataPointLineStyle], u = Te(t, Se(o, c), l, l, c, 1, `#${U(t, c, 1, o.chartexStyle)}`, { linkedNoStyleFallback: !0 });
384
- Pe(e, r(t, {
378
+ function J(e, t, n, r, i = 0) {
379
+ let a = t.series[0];
380
+ if (!a || Le(e, n, Math.max(t.categories.length, a.categories?.length ?? 0, a.values.length))) return;
381
+ let o = y(a, t.categories, { sortDescending: t.chartexParetoSortDescending ?? !1 });
382
+ if (o.points.length === 0) return;
383
+ let s = g(a, 0), c = [t.chartexDataPointStyle, t.chartexDataPointLineStyle], l = Te(t, Se(a, s), c, c, s, 1, `#${U(t, s, 1, a.chartexStyle)}`, { linkedNoStyleFallback: !0 });
384
+ Pe(e, C(t, {
385
385
  chartType: "line",
386
- categories: t.chartexParetoFlatEndpoint ? [...s.categories, ""] : s.categories,
386
+ categories: t.chartexParetoFlatEndpoint ? [...o.categories, ""] : o.categories,
387
387
  series: [{
388
- ...s.series,
389
- values: t.chartexParetoFlatEndpoint ? [...s.series.values, 1] : s.series.values,
388
+ ...o.series,
389
+ values: t.chartexParetoFlatEndpoint ? [...o.series.values, 1] : o.series.values,
390
390
  showMarker: !1,
391
- lineHidden: !u.visible,
392
- lineColor: u.color.replace(/^#/, ""),
393
- lineWidthEmu: u.widthEmu ?? 9525,
391
+ lineHidden: !l.visible,
392
+ lineColor: l.color.replace(/^#/, ""),
393
+ lineWidthEmu: l.widthEmu ?? 9525,
394
394
  chartexStyle: {
395
- lineDash: u.dash,
396
- lineCap: u.cap,
397
- lineJoin: u.join
395
+ lineDash: l.dash,
396
+ lineCap: l.cap,
397
+ lineJoin: l.join
398
398
  }
399
399
  }],
400
400
  catAxisHidden: !1,
401
- catAxisTickLabelPos: t.chartexParetoSortDescending == null || !(o.categories ?? t.categories).some((e) => e != null && e !== "") ? "none" : "nextTo",
401
+ catAxisTickLabelPos: t.chartexParetoSortDescending == null || !(a.categories ?? t.categories).some((e) => e != null && e !== "") ? "none" : "nextTo",
402
402
  showLegend: !1,
403
403
  valMin: t.valMin ?? 0,
404
404
  valMax: t.valMax ?? (t.valAxisFormatCode === "0%" ? 1 : 1.2),
405
405
  valAxisMajorUnit: t.valAxisMajorUnit ?? (t.valAxisFormatCode === "0%" ? .1 : .2)
406
- }), n, i, a);
406
+ }), n, r, i);
407
407
  }
408
408
  function Y(e) {
409
409
  return {
@@ -428,47 +428,47 @@ function Y(e) {
428
428
  titleFontFace: e.secondaryValAxis?.titleFontFace ?? null
429
429
  };
430
430
  }
431
- function X(e, t, n, i, a = 0) {
432
- let o = t.series.filter((e) => e.seriesType !== "line"), s = t.chartexParetoOwnerIndex ?? 0, c = o[s];
433
- if (!c || o.length === 0 || Le(e, n, Math.max(t.categories.length, ...o.map((e) => e.values.length)))) return;
434
- let l = o.map((e, n) => x(n === 0 ? K(t, e, n, o.length) : e, t.categories, {
431
+ function X(e, t, n, r, i = 0) {
432
+ let a = t.series.filter((e) => e.seriesType !== "line"), o = t.chartexParetoOwnerIndex ?? 0, s = a[o];
433
+ if (!s || a.length === 0 || Le(e, n, Math.max(t.categories.length, ...a.map((e) => e.values.length)))) return;
434
+ let c = a.map((e, n) => y(n === 0 ? K(t, e, n, a.length) : e, t.categories, {
435
435
  sortDescending: t.chartexParetoSortDescending ?? !0,
436
436
  keepUnvaluedCategories: !0
437
- })), u = l[s], d = l[0];
438
- if (u.points.length === 0 || d.points.length === 0) return;
439
- let f = t.chartexParetoFlatEndpoint === !0 && d.categories.length === d.points.length, p = t.series.find((e) => e.seriesType === "line"), m = p?.chartexFormatIdx ?? c.chartexFormatIdx ?? 0, h = {
440
- ...p ?? u.series,
441
- name: p?.name || "Cumulative %",
442
- values: u.series.values,
443
- categories: d.categories,
444
- color: p?.color ?? We(t, t.chartexDataPointLineStyle, "line", m, 1) ?? c.lineColor ?? c.color,
437
+ })), l = c[o], u = c[0];
438
+ if (l.points.length === 0 || u.points.length === 0) return;
439
+ let d = t.chartexParetoFlatEndpoint === !0 && u.categories.length === u.points.length, f = t.series.find((e) => e.seriesType === "line"), p = f?.chartexFormatIdx ?? s.chartexFormatIdx ?? 0, m = {
440
+ ...f ?? l.series,
441
+ name: f?.name || "Cumulative %",
442
+ values: l.series.values,
443
+ categories: u.categories,
444
+ color: f?.color ?? We(t, t.chartexDataPointLineStyle, "line", p, 1) ?? s.lineColor ?? s.color,
445
445
  seriesType: "line",
446
446
  useSecondaryAxis: !0,
447
447
  showMarker: !1
448
- }, g = Y(t);
449
- ze(e, r(t, {
448
+ }, h = Y(t);
449
+ ze(e, C(t, {
450
450
  chartType: "clusteredBar",
451
- categories: f ? [...d.categories, ""] : d.categories,
452
- series: [...l.map((e) => ({
451
+ categories: d ? [...u.categories, ""] : u.categories,
452
+ series: [...c.map((e) => ({
453
453
  ...e.orderedSeries,
454
- values: f ? [...e.orderedSeries.values, null] : e.orderedSeries.values,
454
+ values: d ? [...e.orderedSeries.values, null] : e.orderedSeries.values,
455
455
  seriesType: null,
456
456
  useSecondaryAxis: !1
457
- })), f ? {
458
- ...h,
459
- values: [...h.values, 1]
460
- } : h],
461
- secondaryValAxis: g
462
- }), n, i, {
457
+ })), d ? {
458
+ ...m,
459
+ values: [...m.values, 1]
460
+ } : m],
461
+ secondaryValAxis: h
462
+ }), n, r, {
463
463
  gapPolicy: "chartex",
464
464
  semanticLineNoStyleFallback: !0
465
- }, a);
465
+ }, i);
466
466
  }
467
467
  var Xe = 7, Z = .05, Q = 1.2;
468
468
  function Ze(e, t, n, r) {
469
469
  let i = (r ?? t) - (n ?? e);
470
470
  if (!(i > 0) || !Number.isFinite(i)) return null;
471
- let a = ie(i, Xe);
471
+ let a = re(i, Xe);
472
472
  if (!(a > 0) || !Number.isFinite(a)) return null;
473
473
  let o = e - i * Z, s = t + i * Z;
474
474
  e >= 0 && (e === 0 || t > Q * e) && (o = 0), t <= 0 && (t === 0 || Math.abs(e) > Q * Math.abs(t)) && (s = 0);
@@ -479,108 +479,108 @@ function Ze(e, t, n, r) {
479
479
  majorUnit: a
480
480
  };
481
481
  }
482
- function Qe(e, n, r, i, o) {
483
- let c = 3 * i, f = n.chartexBox;
484
- if (!f || f.categories.length === 0 || f.series.length === 0) return;
485
- let { x: m, y: h, w: y, h: x } = r;
486
- if (Le(e, r, t(f.series.map((e) => e.valuesByCategory), 1e4))) return;
487
- let C = () => {
488
- e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(chart values out of range)", m + y / 2, h + x / 2);
489
- }, T = (e) => {
482
+ function Qe(e, r, i, o, u) {
483
+ let d = 3 * o, _ = r.chartexBox;
484
+ if (!_ || _.categories.length === 0 || _.series.length === 0) return;
485
+ let { x: y, y: b, w: x, h: C } = i;
486
+ if (Le(e, i, n(_.series.map((e) => e.valuesByCategory), 1e4))) return;
487
+ let O = () => {
488
+ e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(chart values out of range)", y + x / 2, b + C / 2);
489
+ }, k = (e) => {
490
490
  let t = e.max - e.min, n = t / e.step;
491
491
  return Number.isFinite(e.min) && Number.isFinite(e.max) && Number.isFinite(e.step) && Number.isFinite(t) && Number.isFinite(n) && e.max > e.min && e.step > 0 && n <= 1e3 && e.min + e.step > e.min;
492
- }, k = Infinity, j = -Infinity;
493
- for (let e of f.series) for (let t of e.valuesByCategory) for (let e of t) Number.isFinite(e) && (e < k && (k = e), e > j && (j = e));
494
- if (!isFinite(k) || !isFinite(j)) return;
495
- if (!Number.isFinite(j - k)) {
496
- C();
492
+ }, j = Infinity, F = -Infinity;
493
+ for (let e of _.series) for (let t of e.valuesByCategory) for (let e of t) Number.isFinite(e) && (e < j && (j = e), e > F && (F = e));
494
+ if (!isFinite(j) || !isFinite(F)) return;
495
+ if (!Number.isFinite(F - j)) {
496
+ O();
497
497
  return;
498
498
  }
499
- let N = n.valAxisMajorUnit == null ? Ze(k, j, n.valMin, n.valMax) : null, F = N ? {
500
- ...n,
501
- valMin: N.min,
502
- valMax: N.max,
503
- valAxisMajorUnit: N.majorUnit
504
- } : n, L = M(n, n.valAxisFontFace, "minor"), re = _(n.valAxisFontSizeHpt, x, i), R = V(re), ie = Oe(i), B = p({
505
- dataMin: k,
506
- dataMax: j,
507
- explicitMin: F.valMin,
508
- explicitMax: F.valMax,
509
- axisLenPt: x / i,
510
- majorUnit: F.valAxisMajorUnit
499
+ let I = r.valAxisMajorUnit == null ? Ze(j, F, r.valMin, r.valMax) : null, te = I ? {
500
+ ...r,
501
+ valMin: I.min,
502
+ valMax: I.max,
503
+ valAxisMajorUnit: I.majorUnit
504
+ } : r, ne = A(r, r.valAxisFontFace, "minor"), L = m(r.valAxisFontSizeHpt, C, o), re = _e(L), ae = Oe(o), z = l({
505
+ dataMin: j,
506
+ dataMax: F,
507
+ explicitMin: te.valMin,
508
+ explicitMax: te.valMax,
509
+ axisLenPt: C / o,
510
+ majorUnit: te.valAxisMajorUnit
511
511
  });
512
- if (!T({
513
- min: B.min,
514
- max: B.max,
515
- step: B.majorUnit
512
+ if (!k({
513
+ min: z.min,
514
+ max: z.max,
515
+ step: z.majorUnit
516
516
  })) {
517
- C();
517
+ O();
518
518
  return;
519
519
  }
520
- let ae = 0;
521
- if (!n.valAxisHidden) {
520
+ let ce = 0;
521
+ if (!r.valAxisHidden) {
522
522
  let t = e.font;
523
- e.font = ye(re, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1);
524
- let r = 0;
525
- for (let t of B.majorTicks) {
526
- let i = _e(n, t, !1);
527
- r = Math.max(r, ne(e, i));
523
+ e.font = ye(L, ne, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1);
524
+ let n = 0;
525
+ for (let t of z.majorTicks) {
526
+ let i = ge(r, t, !1);
527
+ n = Math.max(n, D(e, i));
528
528
  }
529
- e.font = t, ae = r + R + s * i;
529
+ e.font = t, ce = n + re + a * o;
530
530
  }
531
- let le = Ae(e, n, y, x, i), de = _(n.catAxisFontSizeHpt, x, i), fe = _(n.valAxisFontSizeHpt, x, i), me = a(n, y, x, i), H = f.series.length, ve = f.series.map((e, t) => v(e, t)), be = f.series.map((e, t) => {
532
- let r = ve[t], i = e.color ?? U(n, r, H, e.chartexStyle), a = ke(n, e.name, Se(e, r) ?? e, n.chartexDataPointStyle, r, H, i, !0), o = Ce(n, e, r, H, i);
531
+ let ue = Ae(e, r, x, C, o), fe = m(r.catAxisFontSizeHpt, C, o), ve = m(r.valAxisFontSizeHpt, C, o), B = N(r, x, C, o), V = _.series.length, be = _.series.map((e, t) => g(e, t)), H = _.series.map((e, t) => {
532
+ let n = be[t], i = e.color ?? U(r, n, V, e.chartexStyle), a = ke(r, e.name, Se(e, n) ?? e, r.chartexDataPointStyle, n, V, i, !0), o = Ce(r, e, n, V, i);
533
533
  return o.darkened && a.lineColor != null ? {
534
534
  ...a,
535
535
  lineColor: o.line.color.replace(/^#/, "")
536
536
  } : a;
537
537
  }), xe = {
538
- ...n,
539
- series: be
540
- }, Te = Be(e, xe, y, x, i), { legRightW: De, legLeftW: je, legTopH: Pe, legBottomH: Ie } = u(Te, n.legendOverlay === !0), ze = n.valAxisHidden ? 0 : oe(B.majorTicks.map((e) => _e(n, e, !1)), A(re)) / 2, He = n.catAxisHidden ? 0 : oe(f.categories, A(de)), Ge = te(n, m, h, y, x, i, {
541
- titleBand: le,
538
+ ...r,
539
+ series: H
540
+ }, Te = Be(e, xe, x, C, o), { legRightW: De, legLeftW: je, legTopH: Pe, legBottomH: Ie } = he(Te, r.legendOverlay === !0), ze = r.valAxisHidden ? 0 : M(z.majorTicks.map((e) => ge(r, e, !1)), ie(L)) / 2, He = r.catAxisHidden ? 0 : M(_.categories, ie(fe)), Ge = se(r, y, b, x, C, o, {
541
+ titleBand: ue,
542
542
  legendReserve: Te,
543
543
  pad: {
544
- t: le.bandH + Pe + fe / 2 + 2 + ze,
545
- r: De + y * .02,
546
- b: Ie + me.catBandH + (n.catAxisHidden ? x * .02 : b(de) + He),
547
- l: je + me.valBandW + (n.valAxisHidden ? y * .02 : ae)
544
+ t: ue.bandH + Pe + ve / 2 + 2 + ze,
545
+ r: De + x * .02,
546
+ b: Ie + B.catBandH + (r.catAxisHidden ? C * .02 : f(fe) + He),
547
+ l: je + B.valBandW + (r.valAxisHidden ? x * .02 : ce)
548
548
  },
549
549
  honorPlotAreaManualLayout: !0
550
550
  }), { px0: W, py0: G, pw: Ke, ph: K } = Ge.plotRect;
551
551
  if (Ke <= 0 || K <= 0) {
552
- Ve(e, n, m, h, y, x, h + Ge.title.topPad, Ge.title.fontPx);
552
+ Ve(e, r, y, b, x, C, b + Ge.title.topPad, Ge.title.fontPx);
553
553
  return;
554
554
  }
555
- ge(e, n, W, G, Ke, K, i, o);
556
- let qe = f.categories, Je = qe.length, Ye = se(F, k, j, K / i);
557
- if (!T(Ye)) {
558
- C();
555
+ me(e, r, W, G, Ke, K, o, u);
556
+ let qe = _.categories, Je = qe.length, Ye = oe(te, j, F, K / o);
557
+ if (!k(Ye)) {
558
+ O();
559
559
  return;
560
560
  }
561
- Ve(e, n, m, h, y, x, h + Ge.title.topPad, Ge.title.fontPx);
562
- let { min: q, max: J } = Ye, Y = J - q, X = (e) => G + K * (1 - (e - q) / Y), Xe = O(n.valAxisLineColor, n.valAxisLineWidthEmu, i), Z = ue(n, i);
563
- if (e.save(), !n.valAxisHidden) {
564
- if (e.font = ye(re, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1), e.textAlign = "right", e.textBaseline = "middle", n.valAxisMinorGridlines) {
565
- let t = he(n, i);
566
- for (let n of Ye.minorLines) z(e, W, Ke, X(n), !1, t);
561
+ Ve(e, r, y, b, x, C, b + Ge.title.topPad, Ge.title.fontPx);
562
+ let { min: q, max: J } = Ye, Y = J - q, X = (e) => G + K * (1 - (e - q) / Y), Xe = E(r.valAxisLineColor, r.valAxisLineWidthEmu, o), Z = le(r, o);
563
+ if (e.save(), !r.valAxisHidden) {
564
+ if (e.font = ye(L, ne, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1), e.textAlign = "right", e.textBaseline = "middle", r.valAxisMinorGridlines) {
565
+ let t = pe(r, o);
566
+ for (let n of Ye.minorLines) R(e, W, Ke, X(n), !1, t);
567
567
  }
568
568
  for (let t of Ye.majorLines) {
569
- let r = X(t);
570
- if (n.valAxisMajorGridlines !== !1) {
569
+ let n = X(t);
570
+ if (r.valAxisMajorGridlines !== !1) {
571
571
  e.strokeStyle = Z.color, e.lineWidth = Z.width;
572
572
  let t = Z.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
573
- Z.dash.length > 0 && e.setLineDash(Z.dash), e.beginPath(), e.moveTo(W, r), e.lineTo(W + Ke, r), e.stroke(), Z.dash.length > 0 && e.setLineDash(t);
573
+ Z.dash.length > 0 && e.setLineDash(Z.dash), e.beginPath(), e.moveTo(W, n), e.lineTo(W + Ke, n), e.stroke(), Z.dash.length > 0 && e.setLineDash(t);
574
574
  }
575
- e.fillStyle = n.valAxisFontColor ? `#${n.valAxisFontColor}` : "#595959", ce(e, _e(n, t, !1), W - ie, r, A(re)), l(e, n.valAxisMajorTickMark, "val", W, r, Xe.color, Xe.width, !1, n.valAxisLineHidden, "major", i, n.valAxisLineDash);
575
+ e.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", ee(e, ge(r, t, !1), W - ae, n, ie(L)), s(e, r.valAxisMajorTickMark, "val", W, n, Xe.color, Xe.width, !1, r.valAxisLineHidden, "major", o, r.valAxisLineDash);
576
576
  }
577
- for (let t of Ye.minorTicks) l(e, n.valAxisMinorTickMark, "val", W, X(t), Xe.color, Xe.width, !1, n.valAxisLineHidden, "minor", i, n.valAxisLineDash);
578
- n.valAxisLineHidden || pe(e, W, G, W, G + K, Xe.color, Xe.width, n.valAxisLineDash);
577
+ for (let t of Ye.minorTicks) s(e, r.valAxisMinorTickMark, "val", W, X(t), Xe.color, Xe.width, !1, r.valAxisLineHidden, "minor", o, r.valAxisLineDash);
578
+ r.valAxisLineHidden || de(e, W, G, W, G + K, Xe.color, Xe.width, r.valAxisLineDash);
579
579
  }
580
- let Q = O(n.catAxisLineColor, n.catAxisLineWidthEmu, i);
581
- !n.catAxisHidden && !n.catAxisLineHidden && pe(e, W, G + K, W + Ke, G + K, Q.color, Q.width, n.catAxisLineDash);
582
- let Qe = Ke / Je, $e = I(n.barGapWidth, "chartex"), et = (e) => `#${f.series[e].color ?? U(n, ve[e], H, f.series[e].chartexStyle)}`, tt = (e) => Ue(n, ve[e], H, f.series[e].chartexStyle, f.series[e].color), $ = f.series.map((e) => e.valuesByCategory.map((t) => P(t, e.quartileMethod))), nt = n.chartStyleMarkerSymbol ?? n.chartexMarkerSymbol ?? "circle", rt = f.series.map((e, t) => nt === "none" ? $[t].map(() => []) : g($[t], e.showNonoutliers, e.showOutliers, X, 3 * i)), it = (e, t) => {
583
- let n = D(W, Ke, f.oneBoxPerSeries ? 1 : Je, H, f.oneBoxPerSeries ? 0 : e, t, $e);
580
+ let Q = E(r.catAxisLineColor, r.catAxisLineWidthEmu, o);
581
+ !r.catAxisHidden && !r.catAxisLineHidden && de(e, W, G + K, W + Ke, G + K, Q.color, Q.width, r.catAxisLineDash);
582
+ let Qe = Ke / Je, $e = v(r.barGapWidth, "chartex"), et = (e) => `#${_.series[e].color ?? U(r, be[e], V, _.series[e].chartexStyle)}`, tt = (e) => Ue(r, be[e], V, _.series[e].chartexStyle, _.series[e].color), $ = _.series.map((e) => e.valuesByCategory.map((t) => P(t, e.quartileMethod))), nt = r.chartStyleMarkerSymbol ?? r.chartexMarkerSymbol ?? "circle", rt = _.series.map((e, t) => nt === "none" ? $[t].map(() => []) : p($[t], e.showNonoutliers, e.showOutliers, X, 3 * o)), it = (e, t) => {
583
+ let n = T(W, Ke, _.oneBoxPerSeries ? 1 : Je, V, _.oneBoxPerSeries ? 0 : e, t, $e);
584
584
  return n ? {
585
585
  bx: n.boxX,
586
586
  boxW: n.boxWidth,
@@ -590,47 +590,47 @@ function Qe(e, n, r, i, o) {
590
590
  boxW: 0,
591
591
  cx: W
592
592
  };
593
- }, at = (t, r) => {
594
- let a = f.series[t], s = $[t][r];
595
- if (!s) return;
596
- let { bx: l, boxW: u, cx: p } = it(r, t), m = et(t), h = tt(t), g = n.chartexDataPointStyle, _ = n.chartexDataPointMarkerStyle ?? g, v = ve[t], y = Se(a, v) ?? a, b = We(n, g, "line", v, H), x = y.lineColor ? `#${y.lineColor}` : b ? `#${b}` : m, S = Ce(n, a, v, H, x).line, C = We(n, _, "fill", v, H), w = Ee(n, v, H, a.chartexStyle, a.color, _), T = Fe(n, _, y, v, H, We(n, _, "line", v, H) ?? x, { linkedNoStyleFallback: !0 }), te = d(a.chartexStyle), D = X(s.q1), O = X(s.q3), k = Math.min(D, O), A = Math.max(1, Math.abs(D - O)), j = u * .4;
597
- if (Ne(e, S, i)) {
598
- let t = X(s.whiskerHi), n = X(s.whiskerLo);
599
- e.beginPath(), s.whiskerHi > s.q3 && (e.moveTo(p, t), e.lineTo(p, O)), s.whiskerLo < s.q1 && (e.moveTo(p, D), e.lineTo(p, n)), s.whiskerHi >= s.q3 && (e.moveTo(p - j / 2, t), e.lineTo(p + j / 2, t)), s.whiskerLo <= s.q1 && (e.moveTo(p - j / 2, n), e.lineTo(p + j / 2, n)), e.stroke();
593
+ }, at = (t, n) => {
594
+ let i = _.series[t], a = $[t][n];
595
+ if (!a) return;
596
+ let { bx: s, boxW: l, cx: f } = it(n, t), p = et(t), m = tt(t), g = r.chartexDataPointStyle, v = r.chartexDataPointMarkerStyle ?? g, y = be[t], b = Se(i, y) ?? i, x = We(r, g, "line", y, V), S = b.lineColor ? `#${b.lineColor}` : x ? `#${x}` : p, C = Ce(r, i, y, V, S).line, T = We(r, v, "fill", y, V), E = Ee(r, y, V, i.chartexStyle, i.color, v), D = Fe(r, v, b, y, V, We(r, v, "line", y, V) ?? S, { linkedNoStyleFallback: !0 }), O = c(i.chartexStyle), k = X(a.q1), A = X(a.q3), j = Math.min(k, A), M = Math.max(1, Math.abs(k - A)), N = l * .4;
597
+ if (Ne(e, C, o)) {
598
+ let t = X(a.whiskerHi), n = X(a.whiskerLo);
599
+ e.beginPath(), a.whiskerHi > a.q3 && (e.moveTo(f, t), e.lineTo(f, A)), a.whiskerLo < a.q1 && (e.moveTo(f, k), e.lineTo(f, n)), a.whiskerHi >= a.q3 && (e.moveTo(f - N / 2, t), e.lineTo(f + N / 2, t)), a.whiskerLo <= a.q1 && (e.moveTo(f - N / 2, n), e.lineTo(f + N / 2, n)), e.stroke();
600
600
  }
601
- ee(e, a.chartexStyle, g, v, {
602
- x: l,
603
- y: k,
604
- w: u,
605
- h: A
606
- }, i, (e) => {
607
- if (h && we(e, h, {
608
- x: l,
609
- y: k,
610
- w: u,
611
- h: A
612
- }, m, i, o), Ne(e, S, i, {
613
- x: l,
614
- y: k,
615
- w: u,
616
- h: A
617
- }, o)) {
601
+ h(e, i.chartexStyle, g, y, {
602
+ x: s,
603
+ y: j,
604
+ w: l,
605
+ h: M
606
+ }, o, (e) => {
607
+ if (m && we(e, m, {
608
+ x: s,
609
+ y: j,
610
+ w: l,
611
+ h: M
612
+ }, p, o, u), Ne(e, C, o, {
613
+ x: s,
614
+ y: j,
615
+ w: l,
616
+ h: M
617
+ }, u)) {
618
618
  let t = e.lineWidth;
619
- e.strokeRect(l + t / 2, k + t / 2, u - t, A - t);
619
+ e.strokeRect(s + t / 2, j + t / 2, l - t, M - t);
620
620
  }
621
621
  });
622
- let M = X(s.median);
623
- Ne(e, S, i) && (e.beginPath(), e.moveTo(l, M), e.lineTo(l + u, M), e.stroke());
624
- for (let n of rt[t][r]) Re(e, p, X(n), nt, 3, w ? C ? `#${C}` : m : "transparent", T.visible ? T.color : null, i, T.widthEmu == null ? 1 : E(T.widthEmu, i), w, o, T.visible ? T.paint : null, T.dash, T.customDash, T.cap, T.join, !1, te, _, v, v);
625
- if (a.meanMarker) {
626
- let t = X(s.mean), n = c;
627
- Ne(e, S, i) && (e.beginPath(), e.moveTo(p - n, t - n), e.lineTo(p + n, t + n), e.moveTo(p + n, t - n), e.lineTo(p - n, t + n), e.stroke());
622
+ let P = X(a.median);
623
+ Ne(e, C, o) && (e.beginPath(), e.moveTo(s, P), e.lineTo(s + l, P), e.stroke());
624
+ for (let r of rt[t][n]) Re(e, f, X(r), nt, 3, E ? T ? `#${T}` : p : "transparent", D.visible ? D.color : null, o, D.widthEmu == null ? 1 : w(D.widthEmu, o), E, u, D.visible ? D.paint : null, D.dash, D.customDash, D.cap, D.join, !1, O, v, y, y);
625
+ if (i.meanMarker) {
626
+ let t = X(a.mean), n = d;
627
+ Ne(e, C, o) && (e.beginPath(), e.moveTo(f - n, t - n), e.lineTo(f + n, t + n), e.moveTo(f + n, t - n), e.lineTo(f - n, t + n), e.stroke());
628
628
  }
629
629
  }, ot = (t) => {
630
- let r = f.series[t];
631
- if (!r.meanLine) return;
632
- let a = Ce(n, r, ve[t], H, et(t)).line;
633
- if (e.save(), Ne(e, a, i)) {
630
+ let n = _.series[t];
631
+ if (!n.meanLine) return;
632
+ let i = Ce(r, n, be[t], V, et(t)).line;
633
+ if (e.save(), Ne(e, i, o)) {
634
634
  let n = !1;
635
635
  e.beginPath();
636
636
  for (let r = 0; r < Je; r++) {
@@ -646,121 +646,121 @@ function Qe(e, n, r, i, o) {
646
646
  }
647
647
  e.restore();
648
648
  };
649
- for (let e = 0; e < H; e++) {
649
+ for (let e = 0; e < V; e++) {
650
650
  for (let t = 0; t < Je; t++) at(e, t);
651
651
  ot(e);
652
652
  }
653
- let st = _(n.catAxisFontSizeHpt, x, i), ct = S(st);
653
+ let st = m(r.catAxisFontSizeHpt, C, o), ct = t(st);
654
654
  for (let t = 0; t < Je; t++) {
655
- let r = W + Qe * (t + .5);
656
- if (n.catAxisHidden || l(e, n.catAxisMajorTickMark, "cat", G + K, r, Q.color, Q.width, !1, n.catAxisLineHidden, "major", i, n.catAxisLineDash), !n.catAxisHidden) {
657
- e.font = ye(st, M(n, n.catAxisFontFace, "minor"), n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1), e.fillStyle = n.catAxisFontColor ? `#${n.catAxisFontColor}` : "#595959", e.textAlign = "center", e.textBaseline = "top";
655
+ let n = W + Qe * (t + .5);
656
+ if (r.catAxisHidden || s(e, r.catAxisMajorTickMark, "cat", G + K, n, Q.color, Q.width, !1, r.catAxisLineHidden, "major", o, r.catAxisLineDash), !r.catAxisHidden) {
657
+ e.font = ye(st, A(r, r.catAxisFontFace, "minor"), r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1), e.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", e.textAlign = "center", e.textBaseline = "top";
658
658
  let i = qe[t];
659
- ce(e, i, r, G + K + ct, A(st));
659
+ ee(e, i, n, G + K + ct, ie(st));
660
660
  }
661
661
  }
662
- e.restore(), w(e, n, m, h, y, x, W, G, Ke, K, je, Ie, me.catFontPx, me.valFontPx), Me(e, xe, Te, m, h, y, x, W, G, Ke, K, le.bandH + 2, i, f.series.map((e, t) => tt(t)), o);
662
+ e.restore(), S(e, r, y, b, x, C, W, G, Ke, K, je, Ie, B.catFontPx, B.valFontPx), Me(e, xe, Te, y, b, x, C, W, G, Ke, K, ue.bandH + 2, o, _.series.map((e, t) => tt(t)), u);
663
663
  }
664
664
  var $e = .18;
665
- function et(e, t, n, a, o) {
665
+ function et(e, t, n, i, a) {
666
666
  let s = t.chartexSunburst;
667
667
  if (!s || s.rows.length === 0) return;
668
- let { x: l, y: u, w: f, h: p } = n;
669
- if (h(s.rows)) {
670
- Le(e, n, R + 1);
668
+ let { x: l, y: f, w: p, h: m } = n;
669
+ if (d(s.rows)) {
670
+ Le(e, n, L + 1);
671
671
  return;
672
672
  }
673
- let g = m(s.rows);
673
+ let g = u(s.rows);
674
674
  if (g.layoutWeight <= 0 || g.children.length === 0) return;
675
- let _ = t.series[0], v = be(_?.dataLabelOverrides), y = g.children.map((e, n) => Ue(t, n, g.children.length, _?.chartexStyle, _?.color)), b = r(t, {
675
+ let _ = t.series[0], v = H(_?.dataLabelOverrides), y = g.children.map((e, n) => Ue(t, n, g.children.length, _?.chartexStyle, _?.color)), b = C(t, {
676
676
  chartType: "clusteredBar",
677
677
  series: g.children.map((e) => {
678
678
  let n = U(t, e.branchIndex, g.children.length, _?.chartexStyle);
679
679
  return ke(t, e.label, _, t.chartexDataPointStyle, e.branchIndex, g.children.length, n, !1, !1);
680
680
  })
681
- }), x = Be(e, b, f, p, a), S = te(t, l, u, f, p, a, {
681
+ }), x = Be(e, b, p, m, i), S = se(t, l, f, p, m, i, {
682
682
  titleTopPadFrac: .035,
683
683
  titleBottomPadFrac: .035,
684
684
  legendReserve: x,
685
685
  radialGapFrac: .02,
686
686
  honorPlotAreaManualLayout: !0
687
687
  });
688
- Ve(e, t, l, u, f, p, u + S.title.topPad, S.title.fontPx);
689
- let { px0: C, py0: w, pw: E, ph: D } = S.plotRect;
688
+ Ve(e, t, l, f, p, m, f + S.title.topPad, S.title.fontPx);
689
+ let { px0: w, py0: T, pw: E, ph: D } = S.plotRect;
690
690
  if (!(E > 0) || !(D > 0)) return;
691
- ge(e, t, C, w, E, D, a, o);
692
- let O = C + E / 2, k = w + D / 2, A = Math.min(E, D) * .46;
693
- g.a0 = -Math.PI / 2, g.a1 = -Math.PI / 2 + Math.PI * 2, i(g);
694
- let j = c(g) + 1, ne = A * $e, N = (A - ne) / j, P = (e) => `#${U(t, e, g.children.length, _?.chartexStyle)}`, F = be(_?.dataPointOverrides), I = _?.seriesDataLabels, L = M(t, I?.fontFace ?? t.dataLabelFontFace, "minor"), z = T(I?.fontSizeHpt, a) ?? Math.max(7, Math.min(13, A * .075)), ie = I?.fontColor ? `#${I.fontColor}` : "#ffffff", B = Array.from({ length: j }, () => []), ae = [g];
695
- for (; ae.length > 0;) {
696
- let e = ae.pop();
697
- e.depth >= 0 && B[e.depth].push(e);
698
- for (let t = e.children.length - 1; t >= 0; t--) ae.push(e.children[t]);
691
+ me(e, t, w, T, E, D, i, a);
692
+ let O = w + E / 2, k = T + D / 2, j = Math.min(E, D) * .46;
693
+ g.a0 = -Math.PI / 2, g.a1 = -Math.PI / 2 + Math.PI * 2, r(g);
694
+ let M = o(g) + 1, N = j * $e, P = (j - N) / M, F = (e) => `#${U(t, e, g.children.length, _?.chartexStyle)}`, I = H(_?.dataPointOverrides), ee = _?.seriesDataLabels, R = A(t, ee?.fontFace ?? t.dataLabelFontFace, "minor"), re = ne(ee?.fontSizeHpt, i) ?? Math.max(7, Math.min(13, j * .075)), ie = ee?.fontColor ? `#${ee.fontColor}` : "#ffffff", ae = Array.from({ length: M }, () => []), z = [g];
695
+ for (; z.length > 0;) {
696
+ let e = z.pop();
697
+ e.depth >= 0 && ae[e.depth].push(e);
698
+ for (let t = e.children.length - 1; t >= 0; t--) z.push(e.children[t]);
699
699
  }
700
700
  e.save();
701
- for (let n = 0; n < j; n++) {
702
- let r = ne + n * N, i = r + N;
703
- for (let s of B[n]) {
701
+ for (let n = 0; n < M; n++) {
702
+ let r = N + n * P, o = r + P;
703
+ for (let s of ae[n]) {
704
704
  let n = s.a1 - s.a0;
705
705
  if (n <= 1e-4) continue;
706
- let c = F.get(s.labelIndex), m = Ie(t, _, c, s.branchIndex, g.children.length), h = xe(t, _, c, s.branchIndex, g.children.length, "#ffffff"), y = {
707
- x: O - i,
708
- y: k - i,
709
- w: i * 2,
710
- h: i * 2
706
+ let u = I.get(s.labelIndex), d = Ie(t, _, u, s.branchIndex, g.children.length), y = xe(t, _, u, s.branchIndex, g.children.length, "#ffffff"), b = {
707
+ x: O - o,
708
+ y: k - o,
709
+ w: o * 2,
710
+ h: o * 2
711
711
  };
712
- ee(e, d(c?.chartexStyle, _?.chartexStyle), t.chartexDataPointStyle, _?.chartexFormatIdx ?? 0, y, a, (e) => {
713
- e.beginPath(), e.arc(O, k, i, s.a0, s.a1), e.arc(O, k, r, s.a1, s.a0, !0), e.closePath(), m && De(e, m, y, P(s.branchIndex), a, o), Ne(e, h, a, y, o) && e.stroke();
712
+ h(e, c(u?.chartexStyle, _?.chartexStyle), t.chartexDataPointStyle, _?.chartexFormatIdx ?? 0, b, i, (e) => {
713
+ e.beginPath(), e.arc(O, k, o, s.a0, s.a1), e.arc(O, k, r, s.a1, s.a0, !0), e.closePath(), d && De(e, d, b, F(s.branchIndex), i, a), Ne(e, y, i, b, a) && e.stroke();
714
714
  }, s.branchIndex);
715
- let b = re(t, _, s.labelIndex, s.label, s.value, {
715
+ let x = te(t, _, s.labelIndex, s.label, s.value, {
716
716
  visible: !1,
717
717
  showVal: !1,
718
718
  showCatName: !1
719
719
  }, v);
720
- if (!b) continue;
721
- let x = b.text, S = T(b.fontSizeHpt, a) ?? z, te = b.fontColor ? `#${b.fontColor}` : ie, A = b.fontFace ? M(t, b.fontFace, "minor") : L, j = (s.a0 + s.a1) / 2, ne = (r + i) / 2, I = N - 4, R = n * ne;
722
- if (!b.manualLayout && I < S * .9 && R < S * .9) continue;
723
- let B = O + Math.cos(j) * ne, ae = k + Math.sin(j) * ne;
724
- if (e.font = `${b.textStyle.fontItalic ? "italic " : ""}${b.fontBold ? "bold " : ""}${S}px ${A}`, b.manualLayout) {
725
- He(e, x, {
720
+ if (!x) continue;
721
+ let S = x.text, C = ne(x.fontSizeHpt, i) ?? re, j = x.fontColor ? `#${x.fontColor}` : ie, M = x.fontFace ? A(t, x.fontFace, "minor") : R, N = (s.a0 + s.a1) / 2, ee = (r + o) / 2, L = P - 4, ae = n * ee;
722
+ if (!x.manualLayout && L < C * .9 && ae < C * .9) continue;
723
+ let z = O + Math.cos(N) * ee, oe = k + Math.sin(N) * ee;
724
+ if (e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${C}px ${M}`, x.manualLayout) {
725
+ He(e, S, {
726
726
  kind: "point",
727
- x: B,
728
- y: ae,
729
- position: b.position ?? "ctr"
727
+ x: z,
728
+ y: oe,
729
+ position: x.position ?? "ctr"
730
730
  }, {
731
- x: C,
732
- y: w,
731
+ x: w,
732
+ y: T,
733
733
  w: E,
734
734
  h: D
735
- }, S, te, b.manualLayout, {
735
+ }, C, j, x.manualLayout, {
736
736
  x: l,
737
- y: u,
738
- w: f,
739
- h: p
740
- }, je(t, b.richRuns, a, A, b.fontBold ?? !1, b.textStyle), void 0, b.textStyle, a, b.labelBox, o);
737
+ y: f,
738
+ w: p,
739
+ h: m
740
+ }, je(t, x.richRuns, i, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, i, x.labelBox, a);
741
741
  continue;
742
742
  }
743
- e.save(), e.translate(B, ae);
744
- let oe = j, se = oe * 180 / Math.PI % 360;
745
- (se > 90 || se < -90) && (oe += Math.PI), e.rotate(oe), e.font = `${b.textStyle.fontItalic ? "italic " : ""}${b.fontBold ? "bold " : ""}${S}px ${A}`, He(e, x, {
743
+ e.save(), e.translate(z, oe);
744
+ let se = N, ce = se * 180 / Math.PI % 360;
745
+ (ce > 90 || ce < -90) && (se += Math.PI), e.rotate(se), e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${C}px ${M}`, He(e, S, {
746
746
  kind: "point",
747
747
  x: 0,
748
748
  y: 0,
749
- position: b.position ?? "ctr"
749
+ position: x.position ?? "ctr"
750
750
  }, {
751
- x: -I / 2,
752
- y: -R / 2,
753
- w: I,
754
- h: R
755
- }, S, te, void 0, {
756
- x: -I / 2,
757
- y: -R / 2,
758
- w: I,
759
- h: R
760
- }, je(t, b.richRuns, a, A, b.fontBold ?? !1, b.textStyle), void 0, b.textStyle, a, b.labelBox, o), e.restore();
751
+ x: -L / 2,
752
+ y: -ae / 2,
753
+ w: L,
754
+ h: ae
755
+ }, C, j, void 0, {
756
+ x: -L / 2,
757
+ y: -ae / 2,
758
+ w: L,
759
+ h: ae
760
+ }, je(t, x.richRuns, i, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, i, x.labelBox, a), e.restore();
761
761
  }
762
762
  }
763
- e.restore(), Me(e, b, x, l, u, f, p, C, w, E, D, S.title.bandH + 2, a, y, o);
763
+ e.restore(), Me(e, b, x, l, f, p, m, w, T, E, D, S.title.bandH + 2, i, y, a);
764
764
  }
765
765
  function tt(e, t) {
766
766
  let n = e.map((e, t) => ({
@@ -825,136 +825,136 @@ function tt(e, t) {
825
825
  }
826
826
  return p(c, l), o;
827
827
  }
828
- function $(e, t, n, i, a) {
829
- let o = t.chartexTreemap;
830
- if (!o || o.rows.length === 0) return;
831
- if (h(o.rows)) {
832
- Le(e, n, R + 1);
828
+ function $(e, t, n, r, i) {
829
+ let a = t.chartexTreemap;
830
+ if (!a || a.rows.length === 0) return;
831
+ if (d(a.rows)) {
832
+ Le(e, n, L + 1);
833
833
  return;
834
834
  }
835
- let s = m(o.rows, !0);
836
- if (s.layoutWeight <= 0 || s.children.length === 0) return;
837
- let c = t.series[0], l = s.children.map((e) => Ue(t, e.branchIndex, s.children.length, c?.chartexStyle, c?.color)), u = r(t, {
835
+ let o = u(a.rows, !0);
836
+ if (o.layoutWeight <= 0 || o.children.length === 0) return;
837
+ let s = t.series[0], l = o.children.map((e) => Ue(t, e.branchIndex, o.children.length, s?.chartexStyle, s?.color)), f = C(t, {
838
838
  chartType: "clusteredBar",
839
- series: s.children.map((e) => {
840
- let n = U(t, e.branchIndex, s.children.length, c?.chartexStyle);
841
- return ke(t, e.label, c, t.chartexDataPointStyle, e.branchIndex, s.children.length, n);
839
+ series: o.children.map((e) => {
840
+ let n = U(t, e.branchIndex, o.children.length, s?.chartexStyle);
841
+ return ke(t, e.label, s, t.chartexDataPointStyle, e.branchIndex, o.children.length, n);
842
842
  })
843
- }), f = Be(e, u, n.w, n.h, i), p = te(t, n.x, n.y, n.w, n.h, i, {
843
+ }), p = Be(e, f, n.w, n.h, r), m = se(t, n.x, n.y, n.w, n.h, r, {
844
844
  titleTopPadFrac: .035,
845
845
  titleBottomPadFrac: .035,
846
- legendReserve: f,
846
+ legendReserve: p,
847
847
  radialGapFrac: .015,
848
848
  honorPlotAreaManualLayout: !0
849
849
  });
850
- Ve(e, t, n.x, n.y, n.w, n.h, n.y + p.title.topPad, p.title.fontPx);
851
- let { px0: g, py0: _, pw: v, ph: y } = p.plotRect;
850
+ Ve(e, t, n.x, n.y, n.w, n.h, n.y + m.title.topPad, m.title.fontPx);
851
+ let { px0: g, py0: _, pw: v, ph: y } = m.plotRect;
852
852
  if (!(v > 0) || !(y > 0)) return;
853
- ge(e, t, g, _, v, y, i, a);
853
+ me(e, t, g, _, v, y, r, i);
854
854
  let b = {
855
855
  x: g,
856
856
  y: _,
857
857
  w: v,
858
858
  h: y
859
- }, x = o.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels, C = M(t, S?.fontFace ?? t.dataLabelFontFace, "minor"), w = T(S?.fontSizeHpt, i) ?? Math.max(8, Math.min(13, p.plotRect.ph * .025)), E = S?.fontColor ? `#${S.fontColor}` : "#ffffff", D = new Map((t.series[0]?.dataLabelOverrides ?? []).map((e) => [e.idx, e])), O = t.chartBg ? t.chartBg.startsWith("#") ? t.chartBg : `#${t.chartBg}` : "#ffffff", k = be(c?.dataPointOverrides), A = (r, o) => {
860
- if (o.w < .5 || o.h < .5) return;
861
- let l = `#${U(t, r.branchIndex, s.children.length, c?.chartexStyle)}`, u = k.get(r.labelIndex), f = Ie(t, c, u, r.branchIndex, s.children.length), p = d(u?.chartexStyle, c?.chartexStyle), m = D.get(r.labelIndex), h = m?.fontColor ? `#${m.fontColor}` : E, g = T(m?.fontSizeHpt, i) ?? w, _ = m?.fontBold ?? S?.fontBold ?? !1;
862
- if (r.children.length > 0) {
863
- let s = re(t, c, r.labelIndex, r.label, r.value, {
859
+ }, x = a.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels, w = A(t, S?.fontFace ?? t.dataLabelFontFace, "minor"), T = ne(S?.fontSizeHpt, r) ?? Math.max(8, Math.min(13, m.plotRect.ph * .025)), E = S?.fontColor ? `#${S.fontColor}` : "#ffffff", D = new Map((t.series[0]?.dataLabelOverrides ?? []).map((e) => [e.idx, e])), O = t.chartBg ? t.chartBg.startsWith("#") ? t.chartBg : `#${t.chartBg}` : "#ffffff", k = H(s?.dataPointOverrides), j = (a, l) => {
860
+ if (l.w < .5 || l.h < .5) return;
861
+ let u = `#${U(t, a.branchIndex, o.children.length, s?.chartexStyle)}`, d = k.get(a.labelIndex), f = Ie(t, s, d, a.branchIndex, o.children.length), p = c(d?.chartexStyle, s?.chartexStyle), m = D.get(a.labelIndex), g = m?.fontColor ? `#${m.fontColor}` : E, _ = ne(m?.fontSizeHpt, r) ?? T, v = m?.fontBold ?? S?.fontBold ?? !1;
862
+ if (a.children.length > 0) {
863
+ let o = te(t, s, a.labelIndex, a.label, a.value, {
864
864
  visible: x !== "none",
865
865
  showVal: !1,
866
866
  showCatName: !0
867
- }, D, !0), u = s != null && (x !== "overlapping" || r.depth === 0), d = g, v = s?.fontFace ? M(t, s.fontFace, "minor") : C, y = x === "banner" && u ? Math.min(o.h * .28, d + 7) : 0;
868
- y > 0 && ee(e, p, t.chartexDataPointStyle, c?.chartexFormatIdx ?? 0, {
869
- x: o.x,
870
- y: o.y,
871
- w: o.w,
872
- h: y
873
- }, i, (e) => {
867
+ }, D, !0), c = o != null && (x !== "overlapping" || a.depth === 0), d = _, y = o?.fontFace ? A(t, o.fontFace, "minor") : w, S = x === "banner" && c ? Math.min(l.h * .28, d + 7) : 0;
868
+ S > 0 && h(e, p, t.chartexDataPointStyle, s?.chartexFormatIdx ?? 0, {
869
+ x: l.x,
870
+ y: l.y,
871
+ w: l.w,
872
+ h: S
873
+ }, r, (e) => {
874
874
  f && we(e, f, {
875
- x: o.x,
876
- y: o.y,
877
- w: o.w,
878
- h: y
879
- }, l, i, a);
880
- }, r.branchIndex);
881
- let S = {
882
- x: o.x,
883
- y: o.y + y,
884
- w: o.w,
885
- h: Math.max(0, o.h - y)
875
+ x: l.x,
876
+ y: l.y,
877
+ w: l.w,
878
+ h: S
879
+ }, u, r, i);
880
+ }, a.branchIndex);
881
+ let C = {
882
+ x: l.x,
883
+ y: l.y + S,
884
+ w: l.w,
885
+ h: Math.max(0, l.h - S)
886
886
  };
887
- for (let e of tt(r.children, S)) A(e.node, e.rect);
888
- if (u && (s.manualLayout || o.w > d * 2 && o.h > d + 4)) {
889
- e.font = `${_ ? "bold " : ""}${d}px ${v}`;
890
- let r = y > 0 ? {
891
- x: o.x,
892
- y: o.y,
893
- w: o.w,
894
- h: y
895
- } : o, c = m?.position ?? "inBase";
896
- He(e, s.text, s.manualLayout ? {
887
+ for (let e of tt(a.children, C)) j(e.node, e.rect);
888
+ if (c && (o.manualLayout || l.w > d * 2 && l.h > d + 4)) {
889
+ e.font = `${v ? "bold " : ""}${d}px ${y}`;
890
+ let a = S > 0 ? {
891
+ x: l.x,
892
+ y: l.y,
893
+ w: l.w,
894
+ h: S
895
+ } : l, s = m?.position ?? "inBase";
896
+ He(e, o.text, o.manualLayout ? {
897
897
  kind: "point",
898
- x: o.x + o.w / 2,
899
- y: o.y + o.h / 2,
900
- position: c
898
+ x: l.x + l.w / 2,
899
+ y: l.y + l.h / 2,
900
+ position: s
901
901
  } : {
902
902
  kind: "box",
903
- rect: r,
904
- position: c
905
- }, s.manualLayout ? b : r, d, h, s.manualLayout, n, je(t, s.richRuns, i, v, _, s.textStyle), void 0, s.textStyle, i, s.labelBox, a);
903
+ rect: a,
904
+ position: s
905
+ }, o.manualLayout ? b : a, d, g, o.manualLayout, n, je(t, o.richRuns, r, y, v, o.textStyle), void 0, o.textStyle, r, o.labelBox, i);
906
906
  }
907
907
  return;
908
908
  }
909
- ee(e, p, t.chartexDataPointStyle, c?.chartexFormatIdx ?? 0, o, i, (e) => {
910
- f && we(e, f, o, l, i, a), Ne(e, xe(t, c, u, r.branchIndex, s.children.length, O, t.chartexDataPointStyle, { linkedNoStyleFallback: !0 }), i, o, a) && e.strokeRect(o.x, o.y, o.w, o.h);
911
- }, r.branchIndex);
912
- let v = re(t, c, r.labelIndex, r.label, r.value, {
909
+ h(e, p, t.chartexDataPointStyle, s?.chartexFormatIdx ?? 0, l, r, (e) => {
910
+ f && we(e, f, l, u, r, i), Ne(e, xe(t, s, d, a.branchIndex, o.children.length, O, t.chartexDataPointStyle, { linkedNoStyleFallback: !0 }), r, l, i) && e.strokeRect(l.x, l.y, l.w, l.h);
911
+ }, a.branchIndex);
912
+ let y = te(t, s, a.labelIndex, a.label, a.value, {
913
913
  visible: !1,
914
914
  showVal: !1,
915
915
  showCatName: !1
916
916
  }, D);
917
- if (!v) return;
918
- let y = T(v.fontSizeHpt, i) ?? g;
919
- if (!v.manualLayout && (o.w <= y * 1.2 || o.h <= y * 1.2)) return;
920
- let te = v.fontFace ? M(t, v.fontFace, "minor") : C;
921
- e.font = `${v.fontBold ? "bold " : ""}${y}px ${te}`;
922
- let j = o, ne = v.position === "outEnd" ? "inEnd" : v.position ?? "ctr";
923
- He(e, v.text, v.manualLayout ? {
917
+ if (!y) return;
918
+ let C = ne(y.fontSizeHpt, r) ?? _;
919
+ if (!y.manualLayout && (l.w <= C * 1.2 || l.h <= C * 1.2)) return;
920
+ let M = y.fontFace ? A(t, y.fontFace, "minor") : w;
921
+ e.font = `${y.fontBold ? "bold " : ""}${C}px ${M}`;
922
+ let N = l, P = y.position === "outEnd" ? "inEnd" : y.position ?? "ctr";
923
+ He(e, y.text, y.manualLayout ? {
924
924
  kind: "point",
925
- x: o.x + o.w / 2,
926
- y: o.y + o.h / 2,
927
- position: ne
925
+ x: l.x + l.w / 2,
926
+ y: l.y + l.h / 2,
927
+ position: P
928
928
  } : {
929
929
  kind: "box",
930
- rect: j,
931
- position: ne
932
- }, v.manualLayout ? b : j, y, v.fontColor ? `#${v.fontColor}` : h, v.manualLayout, n, je(t, v.richRuns, i, te, v.fontBold ?? !1, v.textStyle), void 0, v.textStyle, i, v.labelBox, a);
930
+ rect: N,
931
+ position: P
932
+ }, y.manualLayout ? b : N, C, y.fontColor ? `#${y.fontColor}` : g, y.manualLayout, n, je(t, y.richRuns, r, M, y.fontBold ?? !1, y.textStyle), void 0, y.textStyle, r, y.labelBox, i);
933
933
  };
934
934
  e.save(), e.beginPath(), e.rect(g, _, v, y), e.clip();
935
- for (let e of tt(s.children, {
935
+ for (let e of tt(o.children, {
936
936
  x: g,
937
937
  y: _,
938
938
  w: v,
939
939
  h: y
940
- })) A(e.node, e.rect);
941
- e.restore(), Me(e, u, f, n.x, n.y, n.w, n.h, g, _, v, y, p.title.bandH + 2, i, l, a);
940
+ })) j(e.node, e.rect);
941
+ e.restore(), Me(e, f, p, n.x, n.y, n.w, n.h, g, _, v, y, m.title.bandH + 2, r, l, i);
942
942
  }
943
- function nt(e, t, n, i, a = 0) {
944
- let o = Ke(t, void 0, n, i), s = qe(t, n, i);
945
- if (o != null && o > 1048576 || s != null && s > 1048576 || o != null && s != null && o > 1048576 - s) return Le(e, n, R + 1), !0;
943
+ function nt(e, t, n, r, i = 0) {
944
+ let a = Ke(t, void 0, n, r), o = qe(t, n, r);
945
+ if (a != null && a > 1048576 || o != null && o > 1048576 || a != null && o != null && a > 1048576 - o) return Le(e, n, L + 1), !0;
946
946
  if (t.chartexSuppressGeometry) {
947
- let r = Ae(e, t, n.w, n.h, i);
948
- return Ve(e, t, n.x, n.y, n.w, n.h, n.y + r.topPad, r.fontPx), !0;
947
+ let i = Ae(e, t, n.w, n.h, r);
948
+ return Ve(e, t, n.x, n.y, n.w, n.h, n.y + i.topPad, i.fontPx), !0;
949
949
  }
950
950
  switch (t.chartType) {
951
- case "waterfall": return Ye(e, t, n, i, a), !0;
951
+ case "waterfall": return Ye(e, t, n, r, i), !0;
952
952
  case "clusteredColumn": {
953
- let o = t.series.map((e, n) => n === 0 ? K(t, e, n, t.series.length) : e), s = t.chartexParetoSortDescending ? o.map((e) => x(e, t.categories, {
953
+ let a = t.series.map((e, n) => n === 0 ? K(t, e, n, t.series.length) : e), o = t.chartexParetoSortDescending ? a.map((e) => y(e, t.categories, {
954
954
  sortDescending: !0,
955
955
  keepUnvaluedCategories: !0
956
- }).orderedSeries) : o, c = t.chartexShowUnpairedPercentageAxis && s[0] ? [{
957
- ...s[0],
956
+ }).orderedSeries) : a, s = t.chartexShowUnpairedPercentageAxis && o[0] ? [{
957
+ ...o[0],
958
958
  name: "",
959
959
  values: [],
960
960
  seriesType: "line",
@@ -962,20 +962,20 @@ function nt(e, t, n, i, a = 0) {
962
962
  lineHidden: !0,
963
963
  showMarker: !1
964
964
  }] : [];
965
- return ze(e, r(t, {
965
+ return ze(e, C(t, {
966
966
  chartType: "clusteredBar",
967
- categories: s[0]?.categories ?? t.categories,
968
- series: [...s, ...c],
969
- secondaryValAxis: c.length > 0 ? Y(t) : t.secondaryValAxis
970
- }), n, i, { gapPolicy: "chartex" }, a), !0;
967
+ categories: o[0]?.categories ?? t.categories,
968
+ series: [...o, ...s],
969
+ secondaryValAxis: s.length > 0 ? Y(t) : t.secondaryValAxis
970
+ }), n, r, { gapPolicy: "chartex" }, i), !0;
971
971
  }
972
- case "histogram": return Je(e, t, n, i, a), !0;
973
- case "funnel": return q(e, t, n, i, a), !0;
974
- case "paretoLine": return J(e, t, n, i, a), !0;
975
- case "pareto": return X(e, t, n, i, a), !0;
976
- case "boxWhisker": return Qe(e, t, n, i, a), !0;
977
- case "sunburst": return et(e, t, n, i, a), !0;
978
- case "treemap": return $(e, t, n, i, a), !0;
972
+ case "histogram": return Je(e, t, n, r, i), !0;
973
+ case "funnel": return q(e, t, n, r, i), !0;
974
+ case "paretoLine": return J(e, t, n, r, i), !0;
975
+ case "pareto": return X(e, t, n, r, i), !0;
976
+ case "boxWhisker": return Qe(e, t, n, r, i), !0;
977
+ case "sunburst": return et(e, t, n, r, i), !0;
978
+ case "treemap": return $(e, t, n, r, i), !0;
979
979
  default: return !1;
980
980
  }
981
981
  }