@silurus/ooxml 0.79.0 → 0.79.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 (36) hide show
  1. package/dist/{canvas-viewer-mechanics-D9tsuHnG.js → canvas-viewer-mechanics-DJ9yfiLN.js} +1 -1
  2. package/dist/{dash-Cyc-sevN.js → dash-CMzZIDz_.js} +87 -49
  3. package/dist/{document-pull-client-YiU8M4LO.js → document-pull-client-DYoybVCn.js} +3 -3
  4. package/dist/{docx-a1UpmRf8.js → docx-CSk_-kj_.js} +5 -5
  5. package/dist/docx.mjs +3 -3
  6. package/dist/docx_parser_bg.wasm +0 -0
  7. package/dist/index.mjs +3 -3
  8. package/dist/{line-distribute-pDqovJpT.js → line-distribute-CU7vu7XS.js} +1 -1
  9. package/dist/{line-metrics-DjKxiIUD.js → line-metrics-A77J_KRx.js} +2616 -2499
  10. package/dist/node.mjs +7 -7
  11. package/dist/{pptx-t5ABdzfd.js → pptx-CO1Ut97p.js} +6 -6
  12. package/dist/pptx.mjs +4 -4
  13. package/dist/pptx_parser_bg.wasm +0 -0
  14. package/dist/{render-BjIEuFIG.js → render-C5m7Ddwx.js} +1 -1
  15. package/dist/render-worker-host-BhMT5U73.js +27 -0
  16. package/dist/render-worker-host-DNMxGh5s.js +27 -0
  17. package/dist/render-worker-host-DWyg7wio.js +27 -0
  18. package/dist/{resource-measurement-D8EiTm_E.js → resource-measurement-COxqtfGk.js} +1 -1
  19. package/dist/{session-Bhe_eY-s.js → session-CJwZaquG.js} +2 -2
  20. package/dist/{slide-pull-client-BQ8gJPTq.js → slide-pull-client-CFHNk0ek.js} +4 -4
  21. package/dist/three-d.mjs +838 -570
  22. package/dist/types/docx.d.ts +72 -6
  23. package/dist/types/index.d.ts +80 -10
  24. package/dist/types/node.d.ts +70 -2
  25. package/dist/types/pptx.d.ts +72 -6
  26. package/dist/types/region-map.d.ts +68 -2
  27. package/dist/types/three-d.d.ts +68 -2
  28. package/dist/types/xlsx.d.ts +76 -6
  29. package/dist/{worksheet-pull-client-T0EzdEEQ.js → worksheet-pull-client-CziyJf24.js} +2 -2
  30. package/dist/{xlsx-CsDDMJIK.js → xlsx-DHQmjAfh.js} +944 -799
  31. package/dist/xlsx.mjs +4 -4
  32. package/dist/xlsx_parser_bg.wasm +0 -0
  33. package/package.json +1 -1
  34. package/dist/render-worker-host-BB320snY.js +0 -27
  35. package/dist/render-worker-host-BjEPZBwf.js +0 -27
  36. package/dist/render-worker-host-hZ0o4OD7.js +0 -27
package/dist/three-d.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { S as e, b as t, c as n, d as r, g as i, h as a, l as o, m as s, r as c, t as l, u, v as d, x as f } from "./chart-number-format-tjYUR9eS.js";
2
- import { T as p, b as m, c as h, d as g, f as _, h as v, l as y, n as b, s as x, u as S } from "./dash-Cyc-sevN.js";
2
+ import { A as p, S as m, T as h, b as g, c as _, d as v, f as y, l as b, n as x, p as S, s as C, u as w } from "./dash-CMzZIDz_.js";
3
3
  //#region packages/core/src/chart/three-d.ts
4
- function C(e, t, n, r, i) {
5
- let a = Number.isFinite(e) && e > 0 ? e : 0, o = Number.isFinite(t) ? D(t, 0, 500) : 150, s = Math.max(1, Math.trunc(r)), c = D(Math.trunc(n), 0, s - 1), l = i ? 1 : s, u = a / (l + o / 100);
4
+ function T(e, t, n, r, i) {
5
+ let a = Number.isFinite(e) && e > 0 ? e : 0, o = Number.isFinite(t) ? k(t, 0, 500) : 150, s = Math.max(1, Math.trunc(r)), c = k(Math.trunc(n), 0, s - 1), l = i ? 1 : s, u = a / (l + o / 100);
6
6
  return {
7
7
  offset: (a - u * l) / 2 + (i ? 0 : c * u),
8
8
  size: u
9
9
  };
10
10
  }
11
- function w(e, t, n) {
11
+ function E(e, t, n) {
12
12
  if (![
13
13
  e,
14
14
  t,
@@ -17,7 +17,7 @@ function w(e, t, n) {
17
17
  let r = e >= 0 ? n : t;
18
18
  return 1 - Math.min(1, Math.abs(e) / Math.max(Number.MIN_VALUE, Math.abs(r)));
19
19
  }
20
- function T(e, t, n, r = .06) {
20
+ function D(e, t, n, r = .06) {
21
21
  if (!t.length || t.length > 1e5 || ![
22
22
  n.x,
23
23
  n.y,
@@ -30,7 +30,7 @@ function T(e, t, n, r = .06) {
30
30
  for (let e of i) a = Math.min(a, e.x), o = Math.max(o, e.x), s = Math.min(s, e.y), c = Math.max(c, e.y);
31
31
  let l = o - a, u = c - s;
32
32
  if (!(l > 2 ** -52) || !(u > 2 ** -52)) return e;
33
- let d = D(E(r, .06), 0, .45), f = n.w * (1 - 2 * d), p = n.h * (1 - 2 * d), m = Math.min(f / l, p / u);
33
+ let d = k(O(r, .06), 0, .45), f = n.w * (1 - 2 * d), p = n.h * (1 - 2 * d), m = Math.min(f / l, p / u);
34
34
  if (!(m > 0) || !Number.isFinite(m)) return e;
35
35
  let h = {
36
36
  x: (a + o) / 2,
@@ -52,15 +52,15 @@ function T(e, t, n, r = .06) {
52
52
  depthY: e.depthY * m
53
53
  };
54
54
  }
55
- var E = (e, t) => typeof e == "number" && Number.isFinite(e) ? e : t, D = (e, t, n) => Math.min(n, Math.max(t, e));
56
- function O(e, t, n = {}) {
55
+ var O = (e, t) => typeof e == "number" && Number.isFinite(e) ? e : t, k = (e, t, n) => Math.min(n, Math.max(t, e));
56
+ function A(e, t, n = {}) {
57
57
  if (![
58
58
  t.x,
59
59
  t.y,
60
60
  t.w,
61
61
  t.h
62
62
  ].every(Number.isFinite) || t.w <= 0 || t.h <= 0) return null;
63
- let r = D(E(e.rotationX, 15), -90, 90), i = (D(E(e.rotationY, 20), 0, 360) + 180) % 360 - 180, a = D(E(e.depthPercent, 100), 20, 2e3), o = D(E(e.perspective, 30), 0, 240), s = D(E(e.gapDepthPercent, 150), 0, 500), c = e.heightPercent != null && Number.isFinite(e.heightPercent) ? D(e.heightPercent, 5, 500) : null, l = n.sceneHeightScale != null && Number.isFinite(n.sceneHeightScale) ? D(n.sceneHeightScale * 100, 5, 500) : null, u = c ?? l, d = t;
63
+ let r = k(O(e.rotationX, 15), -90, 90), i = (k(O(e.rotationY, 20), 0, 360) + 180) % 360 - 180, a = k(O(e.depthPercent, 100), 20, 2e3), o = k(O(e.perspective, 30), 0, 240), s = k(O(e.gapDepthPercent, 150), 0, 500), c = e.heightPercent != null && Number.isFinite(e.heightPercent) ? k(e.heightPercent, 5, 500) : null, l = n.sceneHeightScale != null && Number.isFinite(n.sceneHeightScale) ? k(n.sceneHeightScale * 100, 5, 500) : null, u = c ?? l, d = t;
64
64
  if (u != null) {
65
65
  let e = u / 100, n = Math.min(t.w, t.h / e), r = n * e;
66
66
  d = {
@@ -70,16 +70,16 @@ function O(e, t, n = {}) {
70
70
  h: r
71
71
  };
72
72
  }
73
- let f = Math.PI / 180, p = D(E(n.sceneDepthScale, .1), .01, 2), m = d.w * p * (a / 100), h = d.x + d.w / 2, g = d.y + d.h / 2, _ = -i * f, v = r * f, y = Math.cos(_), b = Math.sin(_), x = Math.cos(v), S = Math.sin(v), C = e.rightAngleAxes !== !0 && o > 0, w = D(o * .25, .25, 60) * f, T = Math.atan(2 * Math.tan(w)), O = Math.hypot(d.w, d.h, m), k = C ? O * .5 / Math.tan(T) : Infinity, A = (e, t, n) => {
74
- let r = e - h, i = g - t, a = (.5 - D(Number.isFinite(n) ? n : 0, 0, 1)) * m, o = y * r + b * a, s = -b * r + y * a;
73
+ let f = Math.PI / 180, p = k(O(n.sceneDepthScale, .1), .01, 2), m = d.w * p * (a / 100), h = d.x + d.w / 2, g = d.y + d.h / 2, _ = -i * f, v = r * f, y = Math.cos(_), b = Math.sin(_), x = Math.cos(v), S = Math.sin(v), C = e.rightAngleAxes !== !0 && o > 0, w = k(o * .25, .25, 60) * f, T = k(O(n.perspectiveTangentGain, 2), .25, 4), E = Math.atan(T * Math.tan(w)), D = Math.hypot(d.w, d.h, m), A = C ? D * .5 / Math.tan(E) : Infinity, j = (e, t, n) => {
74
+ let r = e - h, i = g - t, a = (.5 - k(Number.isFinite(n) ? n : 0, 0, 1)) * m, o = y * r + b * a, s = -b * r + y * a;
75
75
  return {
76
76
  x: o,
77
77
  y: x * i - S * s,
78
78
  z: S * i + x * s
79
79
  };
80
- }, j = (e) => {
80
+ }, M = (e) => {
81
81
  if (e.length < 3) return null;
82
- let t = e.map((e) => A(e.x, e.y, e.depth)), n = t[0], r = null;
82
+ let t = e.map((e) => j(e.x, e.y, e.depth)), n = t[0], r = null;
83
83
  for (let e = 1; e + 1 < t.length && !r; e++) for (let i = e + 1; i < t.length; i++) {
84
84
  let a = t[e], o = t[i], s = {
85
85
  x: a.x - n.x,
@@ -115,58 +115,58 @@ function O(e, t, n = {}) {
115
115
  z: 0
116
116
  })
117
117
  } : null;
118
- }, M = -Infinity;
119
- for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) M = Math.max(M, A(e, t, n).z);
120
- let N = C ? Math.max(k, M + O * .01) : Infinity, P = (e, t, n) => {
121
- let r = A(e, t, n);
118
+ }, N = -Infinity;
119
+ for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) N = Math.max(N, j(e, t, n).z);
120
+ let P = C ? Math.max(A, N + D * .01) : Infinity, F = (e, t, n) => {
121
+ let r = j(e, t, n);
122
122
  if (!C) return {
123
123
  x: r.x,
124
124
  y: -r.y
125
125
  };
126
- let i = N / Math.max(N * 1e-9, N - r.z);
126
+ let i = P / Math.max(P * 1e-9, P - r.z);
127
127
  return {
128
128
  x: r.x * i,
129
129
  y: -r.y * i
130
130
  };
131
- }, F = [];
132
- for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) F.push(P(e, t, n));
133
- let I = Math.min(...F.map((e) => e.x)), L = Math.max(...F.map((e) => e.x)), R = Math.min(...F.map((e) => e.y)), z = Math.max(...F.map((e) => e.y)), B = Math.max(Number.MIN_VALUE, L - I), V = Math.max(Number.MIN_VALUE, z - R), H = Math.min(t.w / B, t.h / V) * .94, U = t.x + (t.w - B * H) / 2 - I * H, W = t.y + (t.h - V * H) / 2 - R * H, G = (e, t, n) => {
134
- let r = P(e, t, n);
131
+ }, I = [];
132
+ for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) I.push(F(e, t, n));
133
+ let L = Math.min(...I.map((e) => e.x)), ee = Math.max(...I.map((e) => e.x)), R = Math.min(...I.map((e) => e.y)), z = Math.max(...I.map((e) => e.y)), B = Math.max(Number.MIN_VALUE, ee - L), V = Math.max(Number.MIN_VALUE, z - R), H = Math.min(t.w / B, t.h / V) * .94, U = t.x + (t.w - B * H) / 2 - L * H, W = t.y + (t.h - V * H) / 2 - R * H, G = (e, t, n) => {
134
+ let r = F(e, t, n);
135
135
  return {
136
136
  x: U + r.x * H,
137
137
  y: W + r.y * H
138
138
  };
139
- }, K = { ...d }, q = G(h, g, 0), J = G(h, g, 1), ee = J.x - q.x, te = J.y - q.y, Y = (e, t) => A(e === "x" ? t === "min" ? d.x : d.x + d.w : h, e === "y" ? t === "min" ? d.y : d.y + d.h : g, e === "depth" ? t === "min" ? 0 : 1 : .5).z, ne = Y("x", "min") <= Y("x", "max") ? "min" : "max", re = Y("y", "min") <= Y("y", "max") ? "min" : "max", X = Y("depth", "min") >= Y("depth", "max") ? 0 : 1, ie = +(X === 0), ae = (e) => {
140
- let t = e === "min" ? d.x : d.x + d.w, n = G(t, d.y, X), r = G(t, d.y + d.h, X);
139
+ }, K = { ...d }, te = G(h, g, 0), q = G(h, g, 1), J = q.x - te.x, ne = q.y - te.y, Y = (e, t) => j(e === "x" ? t === "min" ? d.x : d.x + d.w : h, e === "y" ? t === "min" ? d.y : d.y + d.h : g, e === "depth" ? t === "min" ? 0 : 1 : .5).z, re = Y("x", "min") <= Y("x", "max") ? "min" : "max", ie = Y("y", "min") <= Y("y", "max") ? "min" : "max", ae = Y("depth", "min") >= Y("depth", "max") ? 0 : 1, oe = +(ae === 0), se = (e) => {
140
+ let t = e === "min" ? d.x : d.x + d.w, n = G(t, d.y, ae), r = G(t, d.y + d.h, ae);
141
141
  return (n.x + r.x) / 2;
142
- }, oe = (e) => {
143
- let t = e === "min" ? d.y : d.y + d.h, n = G(d.x, t, X), r = G(d.x + d.w, t, X);
142
+ }, ce = (e) => {
143
+ let t = e === "min" ? d.y : d.y + d.h, n = G(d.x, t, ae), r = G(d.x + d.w, t, ae);
144
144
  return (n.y + r.y) / 2;
145
- }, se = ae("min") <= ae("max") ? "min" : "max", ce = oe("min") >= oe("max") ? "min" : "max", le = (e) => 1 / Math.max(1, Math.trunc(e)) / (1 + s / 100), Z = (e, t, n = !1) => n || t <= 1 ? .5 : (D(Math.trunc(e), 0, Math.max(0, t - 1)) + .5) / t;
145
+ }, le = se("min") <= se("max") ? "min" : "max", ue = ce("min") >= ce("max") ? "min" : "max", de = (e) => 1 / Math.max(1, Math.trunc(e)) / (1 + s / 100), fe = (e, t, n = !1) => n || t <= 1 ? .5 : (k(Math.trunc(e), 0, Math.max(0, t - 1)) + .5) / t;
146
146
  return {
147
147
  scene: d,
148
148
  front: K,
149
- depthX: ee,
150
- depthY: te,
149
+ depthX: J,
150
+ depthY: ne,
151
151
  modelDepth: m,
152
- pieScaleY: D(Math.sin(Math.max(1, Math.abs(r)) * f) ** 1.15, .2, 1),
152
+ pieScaleY: k(Math.sin(Math.max(1, Math.abs(r)) * f) ** 1.15, .2, 1),
153
153
  pieThicknessFraction: .3 * Math.max(0, Math.cos(Math.abs(r) * f)),
154
154
  project: G,
155
155
  cameraDepth(e, t, n) {
156
- return A(e, t, n).z;
156
+ return j(e, t, n).z;
157
157
  },
158
158
  cameraProjectionWeight(e, t, n) {
159
159
  if (!C) return 1;
160
- let r = A(e, t, n).z;
161
- return 1 / Math.max(N * 1e-9, N - r);
160
+ let r = j(e, t, n).z;
161
+ return 1 / Math.max(P * 1e-9, P - r);
162
162
  },
163
163
  cameraFacing(e) {
164
- let t = j(e);
164
+ let t = M(e);
165
165
  if (!t) return !1;
166
166
  let { normal: n, centroid: r } = t, i = C ? {
167
167
  x: -r.x,
168
168
  y: -r.y,
169
- z: N - r.z
169
+ z: P - r.z
170
170
  } : {
171
171
  x: 0,
172
172
  y: 0,
@@ -175,28 +175,28 @@ function O(e, t, n = {}) {
175
175
  return o > 0 && a > o * 1e-10;
176
176
  },
177
177
  cameraNormal(e) {
178
- return j(e)?.normal ?? null;
178
+ return M(e)?.normal ?? null;
179
179
  },
180
180
  topology: {
181
- farX: ne,
182
- farY: re,
183
- axisX: se,
184
- axisY: ce,
185
- nearDepth: X,
186
- farDepth: ie
181
+ farX: re,
182
+ farY: ie,
183
+ axisX: le,
184
+ axisY: ue,
185
+ nearDepth: ae,
186
+ farDepth: oe
187
187
  },
188
- seriesDepth: Z,
189
- prismDepth: le,
188
+ seriesDepth: fe,
189
+ prismDepth: de,
190
190
  prismInterval(e, t, n = !1) {
191
- let r = Z(e, t, n), i = le(n ? 1 : t) / 2;
191
+ let r = fe(e, t, n), i = de(n ? 1 : t) / 2;
192
192
  return {
193
- near: D(r - i, 0, 1),
194
- far: D(r + i, 0, 1)
193
+ near: k(r - i, 0, 1),
194
+ far: k(r + i, 0, 1)
195
195
  };
196
196
  }
197
197
  };
198
198
  }
199
- function k(e) {
199
+ function j(e) {
200
200
  switch (e) {
201
201
  case "cylinder":
202
202
  case "cone":
@@ -206,8 +206,8 @@ function k(e) {
206
206
  default: return "box";
207
207
  }
208
208
  }
209
- var A = (e) => Math.max(0, Math.min(1, e));
210
- function j(e, t) {
209
+ var M = (e) => Math.max(0, Math.min(1, e));
210
+ function N(e, t) {
211
211
  if (t.length < 3) return null;
212
212
  let n = e[t[0]];
213
213
  for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
@@ -232,7 +232,7 @@ function j(e, t) {
232
232
  }
233
233
  return null;
234
234
  }
235
- function M(e, t) {
235
+ function P(e, t) {
236
236
  let n = e.reduce((t, n) => ({
237
237
  x: t.x + n.x / e.length,
238
238
  y: t.y + n.y / e.length,
@@ -243,7 +243,7 @@ function M(e, t) {
243
243
  depth: 0
244
244
  });
245
245
  return t.map((t) => {
246
- let r = j(e, t.indices);
246
+ let r = N(e, t.indices);
247
247
  if (!r) return t;
248
248
  let i = t.indices.reduce((n, r) => ({
249
249
  x: n.x + e[r].x / t.indices.length,
@@ -264,7 +264,7 @@ function M(e, t) {
264
264
  };
265
265
  });
266
266
  }
267
- function N(e) {
267
+ function F(e) {
268
268
  let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
269
269
  if (![
270
270
  n,
@@ -274,7 +274,7 @@ function N(e) {
274
274
  o,
275
275
  s
276
276
  ].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
277
- let c = k(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? 32))) : 4, p = A(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = A(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
277
+ let c = j(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? 32))) : 4, p = M(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = M(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
278
278
  if (p === 0 && m === 0) return null;
279
279
  let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
280
280
  if (n === 0) {
@@ -341,11 +341,11 @@ function N(e) {
341
341
  return {
342
342
  shape: c,
343
343
  vertices: y,
344
- faces: M(y, w),
344
+ faces: P(y, w),
345
345
  silhouetteEdges: T
346
346
  };
347
347
  }
348
- function P(e) {
348
+ function I(e) {
349
349
  let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
350
350
  if (![
351
351
  t,
@@ -405,7 +405,7 @@ function P(e) {
405
405
  return {
406
406
  shape: "areaStrip",
407
407
  vertices: _,
408
- faces: M(_, [
408
+ faces: P(_, [
409
409
  {
410
410
  indices: [
411
411
  0,
@@ -470,17 +470,17 @@ function P(e) {
470
470
  silhouetteEdges: []
471
471
  };
472
472
  }
473
- function F(e) {
473
+ function L(e) {
474
474
  let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
475
475
  if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
476
476
  let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
477
- return [P({
477
+ return [I({
478
478
  ...e,
479
479
  x1: i,
480
480
  lower1: a,
481
481
  upper1: a,
482
482
  capEnd: !1
483
- }), P({
483
+ }), I({
484
484
  ...e,
485
485
  x0: i,
486
486
  lower0: a,
@@ -488,10 +488,10 @@ function F(e) {
488
488
  capStart: !1
489
489
  })].filter((e) => e != null);
490
490
  }
491
- let r = P(e);
491
+ let r = I(e);
492
492
  return r ? [r] : [];
493
493
  }
494
- function I(e) {
494
+ function ee(e) {
495
495
  let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
496
496
  if (![
497
497
  t,
@@ -503,7 +503,7 @@ function I(e) {
503
503
  s,
504
504
  c
505
505
  ].every(Number.isFinite) || !(i > 0) || !(a > 0) || !(o > 0) || !(c > s)) return null;
506
- let l = Math.min(Math.PI * 2, c - s), u = l >= Math.PI * 2 - 1e-9, d = Math.max(2, Math.min(64, Math.trunc(e.segments ?? Math.ceil(32 * l / (Math.PI * 2))))), f = n - o / 2, p = n + o / 2, m = [{
506
+ let l = Math.min(Math.PI * 2, c - s), u = l >= Math.PI * 2 - 1e-9, d = Math.max(2, Math.min(128, Math.trunc(e.segments ?? Math.ceil(32 * l / (Math.PI * 2))))), f = n - o / 2, p = n + o / 2, m = [{
507
507
  x: t,
508
508
  y: f,
509
509
  depth: r
@@ -583,13 +583,13 @@ function I(e) {
583
583
  return {
584
584
  shape: "pieSector",
585
585
  vertices: m,
586
- faces: M(m, v),
586
+ faces: P(m, v),
587
587
  silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
588
588
  };
589
589
  }
590
590
  //#endregion
591
591
  //#region packages/core/src/chart/three-d-scene.ts
592
- function L(e, t) {
592
+ function R(e, t) {
593
593
  if (![e, t].every(Number.isFinite)) return null;
594
594
  let n = t - e;
595
595
  if (n === 0) return e >= 0 && e <= 1 ? {
@@ -602,7 +602,7 @@ function L(e, t) {
602
602
  endT: o
603
603
  } : null;
604
604
  }
605
- function R(e, t, n, r) {
605
+ function z(e, t, n, r) {
606
606
  if (![
607
607
  e,
608
608
  t,
@@ -631,12 +631,12 @@ function R(e, t, n, r) {
631
631
  }
632
632
  return l;
633
633
  }
634
- var z = (e) => ({
634
+ var B = (e) => ({
635
635
  minX: Math.min(...e.map((e) => e.x)),
636
636
  maxX: Math.max(...e.map((e) => e.x)),
637
637
  minY: Math.min(...e.map((e) => e.y)),
638
638
  maxY: Math.max(...e.map((e) => e.y))
639
- }), B = (e, t) => {
639
+ }), V = (e, t) => {
640
640
  let n = !1;
641
641
  for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
642
642
  let a = e[r], o = e[i], s = (a.x - t.x) * (o.y - t.y) - (a.y - t.y) * (o.x - t.x), c = Math.max(1, Math.abs(a.x), Math.abs(a.y), Math.abs(o.x), Math.abs(o.y));
@@ -644,7 +644,7 @@ var z = (e) => ({
644
644
  a.y > t.y != o.y > t.y && t.x < (o.x - a.x) * (t.y - a.y) / (o.y - a.y) + a.x && (n = !n);
645
645
  }
646
646
  return n;
647
- }, V = (e, t, n, r) => {
647
+ }, H = (e, t, n, r) => {
648
648
  let i = {
649
649
  x: t.x - e.x,
650
650
  y: t.y - e.y
@@ -662,23 +662,23 @@ var z = (e) => ({
662
662
  y: e.y + i.y * c
663
663
  };
664
664
  };
665
- function H(e, t, n, r) {
665
+ function U(e, t, n, r) {
666
666
  let i = [], a = (e) => {
667
667
  i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
668
668
  }, o = {
669
669
  x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
670
670
  y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
671
671
  };
672
- B(e, o) && B(t, o) && a(o);
673
- for (let n of e) B(t, n) && a(n);
674
- for (let n of t) B(e, n) && a(n);
672
+ V(e, o) && V(t, o) && a(o);
673
+ for (let n of e) V(t, n) && a(n);
674
+ for (let n of t) V(e, n) && a(n);
675
675
  for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
676
- let i = V(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
676
+ let i = H(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
677
677
  i && a(i);
678
678
  }
679
679
  return i;
680
680
  }
681
- function U(e, t) {
681
+ function W(e, t) {
682
682
  let n = e.cameraDepths;
683
683
  if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
684
684
  let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
@@ -692,17 +692,17 @@ function U(e, t) {
692
692
  }
693
693
  return e.cameraDepth;
694
694
  }
695
- function W(e) {
695
+ function G(e) {
696
696
  if (e.length < 2) return [...e];
697
- let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => z(e.points)), r = [...e.keys()].sort((e, t) => n[e].minX - n[t].minX || e - t), i = e.map(() => /* @__PURE__ */ new Set()), a = e.map(() => 0), o = [], s = 0;
697
+ let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => B(e.points)), r = [...e.keys()].sort((e, t) => n[e].minX - n[t].minX || e - t), i = e.map(() => /* @__PURE__ */ new Set()), a = e.map(() => 0), o = [], s = 0;
698
698
  for (let c of r) {
699
699
  for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
700
700
  for (let r of o) {
701
701
  if (++s > 2e5) return t.map((t) => e[t]);
702
702
  if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
703
- let o = H(e[r].points, e[c].points, n[r], n[c]), l = 0;
703
+ let o = U(e[r].points, e[c].points, n[r], n[c]), l = 0;
704
704
  for (let t of o) {
705
- let n = U(e[r], t) - U(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
705
+ let n = W(e[r], t) - W(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
706
706
  if (Math.abs(n) <= i) continue;
707
707
  let a = n < 0 ? -1 : 1;
708
708
  if (l !== 0 && l !== a) {
@@ -728,29 +728,29 @@ function W(e) {
728
728
  }
729
729
  //#endregion
730
730
  //#region packages/core/src/chart/three-d-stroke.ts
731
- var G = 1e-9, K = 1e4, q = (e, t, n) => ({
731
+ var K = 1e-9, te = 1e4, q = (e, t, n) => ({
732
732
  x: e.x + (t.x - e.x) * n,
733
733
  y: e.y + (t.y - e.y) * n,
734
734
  cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
735
735
  cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
736
- }), J = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= G;
737
- function ee(e, t, n = 0) {
738
- let r = t.filter((e) => Number.isFinite(e) && e > G);
736
+ }), J = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= K;
737
+ function ne(e, t, n = 0) {
738
+ let r = t.filter((e) => Number.isFinite(e) && e > K);
739
739
  if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
740
740
  r.length % 2 == 1 && r.push(...r);
741
- let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > G && Number.isFinite(n) ? (n % c + c) % c : 0;
742
- for (; l > G;) {
741
+ let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > K && Number.isFinite(n) ? (n % c + c) % c : 0;
742
+ for (; l > K;) {
743
743
  let e = Math.min(l, o);
744
- l -= e, o -= e, o <= G && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
744
+ l -= e, o -= e, o <= K && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
745
745
  }
746
746
  let u = null;
747
747
  for (let t = 0; t + 1 < e.length; t++) {
748
748
  let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
749
- if (!(l > G)) continue;
749
+ if (!(l > K)) continue;
750
750
  let d = 0;
751
- for (; d < l - G;) {
751
+ for (; d < l - K;) {
752
752
  let e = Math.min(o, l - d), t = q(n, c, d / l), f = q(n, c, (d + e) / l);
753
- if (s && (u ??= [], (u.length === 0 || !J(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= G) {
753
+ if (s && (u ??= [], (u.length === 0 || !J(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= K) {
754
754
  if (s && u && u.length >= 2) {
755
755
  if (i.length >= 1e4) return null;
756
756
  i.push(u);
@@ -769,7 +769,7 @@ function ee(e, t, n = 0) {
769
769
  }
770
770
  return i;
771
771
  }
772
- var te = (e, t) => ({
772
+ var Y = (e, t) => ({
773
773
  kind: e,
774
774
  points: t.map(({ x: e, y: t }) => ({
775
775
  x: e,
@@ -778,7 +778,7 @@ var te = (e, t) => ({
778
778
  cameraDepths: t.map((e) => e.cameraDepth),
779
779
  cameraWeights: t.map((e) => e.cameraWeight ?? 1),
780
780
  cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
781
- }), Y = (e, t, n) => {
781
+ }), re = (e, t, n) => {
782
782
  let r = [];
783
783
  for (let n = 0; n < 12; n++) {
784
784
  let i = Math.PI * 2 * n / 12;
@@ -788,10 +788,46 @@ var te = (e, t) => ({
788
788
  y: e.y + Math.sin(i) * t
789
789
  });
790
790
  }
791
- return te(n, r);
792
- }, ne = (e, t, n, r) => {
791
+ return Y(n, r);
792
+ };
793
+ function ie(e, t, n) {
794
+ let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
795
+ if (!(r > K) || t.length < 3) return null;
796
+ let i = r / 2;
797
+ if ((n.lineJoin ?? "miter") === "round") return re(e, i, "join");
798
+ let a = [];
799
+ for (let n of t) {
800
+ let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
801
+ if (!(o > K)) continue;
802
+ let s = -r / o * i, c = t / o * i;
803
+ a.push({
804
+ ...e,
805
+ x: e.x + s,
806
+ y: e.y + c
807
+ }, {
808
+ ...e,
809
+ x: e.x - s,
810
+ y: e.y - c
811
+ });
812
+ }
813
+ if (a.length < 3) return null;
814
+ a.sort((e, t) => e.x - t.x || e.y - t.y);
815
+ let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
816
+ for (let e of a) {
817
+ for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= K;) s.pop();
818
+ s.push(e);
819
+ }
820
+ let c = [];
821
+ for (let e of [...a].reverse()) {
822
+ for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= K;) c.pop();
823
+ c.push(e);
824
+ }
825
+ let l = [...s.slice(0, -1), ...c.slice(0, -1)];
826
+ return l.length >= 3 ? Y("join", l) : null;
827
+ }
828
+ var ae = (e, t, n, r) => {
793
829
  let i = t.x * r.y - t.y * r.x;
794
- if (Math.abs(i) <= G) return null;
830
+ if (Math.abs(i) <= K) return null;
795
831
  let a = {
796
832
  x: n.x - e.x,
797
833
  y: n.y - e.y
@@ -801,65 +837,65 @@ var te = (e, t) => ({
801
837
  y: e.y + t.y * o
802
838
  };
803
839
  };
804
- function re(e, t) {
840
+ function oe(e, t) {
805
841
  let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
806
- if (!(n > G) || e.length < 2) return [];
807
- let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = ee(e, t.dash ?? [], t.dashOffset);
842
+ if (!(n > K) || e.length < 2) return [];
843
+ let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = ne(e, t.dash ?? [], t.dashOffset);
808
844
  if (c == null) return null;
809
845
  let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
810
846
  for (let n = 0; n < c.length; n++) {
811
847
  let s = c[n], u = s.length > 2 && J(s[0], s.at(-1)), d = n === 0 && J(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && J(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
812
848
  for (let e = 0; e + 1 < s.length; e++) {
813
849
  let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
814
- p.push(r > G ? {
850
+ p.push(r > K ? {
815
851
  x: (n.x - t.x) / r,
816
852
  y: (n.y - t.y) / r
817
853
  } : null);
818
854
  }
819
855
  for (let e = 0; e + 1 < s.length; e++) {
820
- let t = p[e];
821
- if (!t) continue;
822
- let n = {
823
- x: -t.y * r,
824
- y: t.x * r
825
- }, i = e === 0, a = e + 2 === s.length, o = !u && i && d === "square" ? r : 0, c = !u && a && f === "square" ? r : 0, m = {
856
+ let n = p[e];
857
+ if (!n) continue;
858
+ let i = {
859
+ x: -n.y * r,
860
+ y: n.x * r
861
+ }, a = e === 0, o = e + 2 === s.length, c = Math.min(.5, r / 2), m = u || !a || t.overlapStart === !0, h = u || !o || t.overlapEnd === !0, g = !u && a && d === "square" ? r : m ? c : 0, _ = !u && o && f === "square" ? r : h ? c : 0, v = {
826
862
  ...s[e],
827
- x: s[e].x - t.x * o,
828
- y: s[e].y - t.y * o
829
- }, h = {
863
+ x: s[e].x - n.x * g,
864
+ y: s[e].y - n.y * g
865
+ }, y = {
830
866
  ...s[e + 1],
831
- x: s[e + 1].x + t.x * c,
832
- y: s[e + 1].y + t.y * c
867
+ x: s[e + 1].x + n.x * _,
868
+ y: s[e + 1].y + n.y * _
833
869
  };
834
- if (!l(te("segment", [
870
+ if (!l(Y("segment", [
835
871
  {
836
- ...m,
837
- x: m.x + n.x,
838
- y: m.y + n.y
872
+ ...v,
873
+ x: v.x + i.x,
874
+ y: v.y + i.y
839
875
  },
840
876
  {
841
- ...h,
842
- x: h.x + n.x,
843
- y: h.y + n.y
877
+ ...y,
878
+ x: y.x + i.x,
879
+ y: y.y + i.y
844
880
  },
845
881
  {
846
- ...h,
847
- x: h.x - n.x,
848
- y: h.y - n.y
882
+ ...y,
883
+ x: y.x - i.x,
884
+ y: y.y - i.y
849
885
  },
850
886
  {
851
- ...m,
852
- x: m.x - n.x,
853
- y: m.y - n.y
887
+ ...v,
888
+ x: v.x - i.x,
889
+ y: v.y - i.y
854
890
  }
855
891
  ]))) return null;
856
892
  }
857
- if (!u && d === "round" && !l(Y(s[0], r, "cap")) || !u && f === "round" && !l(Y(s.at(-1), r, "cap"))) return null;
893
+ if (!u && d === "round" && !l(re(s[0], r, "cap")) || !u && f === "round" && !l(re(s.at(-1), r, "cap"))) return null;
858
894
  let m = (e, t, n) => {
859
895
  if (!t || !n) return !0;
860
896
  let i = t.x * n.y - t.y * n.x;
861
- if (Math.abs(i) <= G) return !0;
862
- if (a === "round") return l(Y(e, r, "join"));
897
+ if (Math.abs(i) <= K) return !0;
898
+ if (a === "round") return l(re(e, r, "join"));
863
899
  let s = i > 0 ? -1 : 1, c = {
864
900
  ...e,
865
901
  x: e.x + -t.y * r * s,
@@ -870,8 +906,8 @@ function re(e, t) {
870
906
  y: e.y + n.x * r * s
871
907
  };
872
908
  if (a === "miter") {
873
- let i = ne(c, t, u, n);
874
- if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(te("join", [
909
+ let i = ae(c, t, u, n);
910
+ if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Y("join", [
875
911
  c,
876
912
  {
877
913
  ...e,
@@ -880,7 +916,7 @@ function re(e, t) {
880
916
  u
881
917
  ]));
882
918
  }
883
- return l(te("join", [
919
+ return l(Y("join", [
884
920
  c,
885
921
  e,
886
922
  u
@@ -893,30 +929,30 @@ function re(e, t) {
893
929
  }
894
930
  //#endregion
895
931
  //#region packages/core/src/chart/three-d-outline.ts
896
- var X = 1e-9, ie = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= X, ae = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, oe = (e, t) => {
932
+ var se = 1e-9, ce = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= se, le = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, ue = (e, t) => {
897
933
  let n = Math.min(e.length, t.length);
898
934
  for (let r = 0; r < n; r++) {
899
- let n = ae(e[r], t[r]);
935
+ let n = le(e[r], t[r]);
900
936
  if (n !== 0) return n;
901
937
  }
902
938
  return e.length - t.length;
903
939
  };
904
- function se(e) {
940
+ function de(e) {
905
941
  let t = [...e].reverse();
906
- return oe(e, t) <= 0 ? e : t;
942
+ return ue(e, t) <= 0 ? e : t;
907
943
  }
908
- function ce(e) {
909
- let t = ie(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
944
+ function fe(e) {
945
+ let t = ce(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
910
946
  if (t.length === 0) return [];
911
947
  let n = 0;
912
- for (let e = 1; e < t.length; e++) ae(t[e], t[n]) < 0 && (n = e);
913
- let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = oe(r, i) <= 0 ? r : i;
948
+ for (let e = 1; e < t.length; e++) le(t[e], t[n]) < 0 && (n = e);
949
+ let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = ue(r, i) <= 0 ? r : i;
914
950
  return [...a, a[0]];
915
951
  }
916
- function le(e) {
952
+ function pe(e) {
917
953
  let t = [], n = (e) => {
918
- let n = t.find((t) => ie(t.point, e));
919
- if (n) return ae(e, n.point) < 0 && (n.point = e), n;
954
+ let n = t.find((t) => ce(t.point, e));
955
+ if (n) return le(e, n.point) < 0 && (n.point = e), n;
920
956
  let r = {
921
957
  point: e,
922
958
  edges: [],
@@ -925,11 +961,11 @@ function le(e) {
925
961
  return t.push(r), r;
926
962
  }, r = [];
927
963
  for (let [t, i] of e) {
928
- if (ie(t, i)) continue;
964
+ if (ce(t, i)) continue;
929
965
  let e = n(t), a = n(i);
930
966
  e !== a && r.push([e, a]);
931
967
  }
932
- t.sort((e, t) => ae(e.point, t.point)), t.forEach((e, t) => {
968
+ t.sort((e, t) => le(e.point, t.point)), t.forEach((e, t) => {
933
969
  e.order = t;
934
970
  });
935
971
  let i = [], a = /* @__PURE__ */ new Set();
@@ -957,24 +993,34 @@ function le(e) {
957
993
  }
958
994
  return n;
959
995
  }, c = [];
960
- for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(se(s(e, t)));
996
+ for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(de(s(e, t)));
961
997
  for (let e = 0; e < i.length; e++) {
962
998
  if (o.has(e)) continue;
963
999
  let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
964
- c.push(ce(s(n, e)));
1000
+ c.push(fe(s(n, e)));
965
1001
  }
966
- return c.sort(oe);
1002
+ let l = t.filter((e) => e.edges.length > 2).map((e) => ({
1003
+ point: e.point,
1004
+ neighbours: e.edges.map((t) => {
1005
+ let n = i[t];
1006
+ return n.first === e ? n.second.point : n.first.point;
1007
+ }).sort(le)
1008
+ }));
1009
+ return {
1010
+ paths: c.sort(ue),
1011
+ junctions: l
1012
+ };
967
1013
  }
968
1014
  //#endregion
969
1015
  //#region packages/core/src/chart/three-d-renderer.ts
970
- var Z = [
1016
+ var me = [
971
1017
  "4472C4",
972
1018
  "ED7D31",
973
1019
  "70AD47",
974
1020
  "A5A5A5",
975
1021
  "FFC000",
976
1022
  "5B9BD5"
977
- ], ue = new Set([
1023
+ ], he = new Set([
978
1024
  "line",
979
1025
  "stackedLine",
980
1026
  "stackedLinePct",
@@ -988,7 +1034,11 @@ var Z = [
988
1034
  "stackedBarPct",
989
1035
  "stackedBarHPct"
990
1036
  ]);
991
- function de(e, t) {
1037
+ function ge(e, t) {
1038
+ let n = Number.isFinite(t) && t > 0 ? t / m : 1, r = Number.isFinite(e) && e >= 0 ? e / g : 0;
1039
+ return Math.max(.25, r) * n;
1040
+ }
1041
+ function _e(e, t) {
992
1042
  let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
993
1043
  for (let t of e) {
994
1044
  let e = t.categoryIndex;
@@ -996,19 +1046,19 @@ function de(e, t) {
996
1046
  }
997
1047
  return r;
998
1048
  }
999
- var fe = (e, t) => `#${t?.color ?? Z[e % Z.length]}`;
1000
- function pe(e, t) {
1049
+ var ve = (e, t) => `#${t?.color ?? me[e % me.length]}`;
1050
+ function ye(e, t) {
1001
1051
  if (t?.lineHidden != null || t?.lineColor != null || t?.lineWidthEmu != null || t?.lineDash != null) return t.lineHidden !== !0;
1002
1052
  let n = e.chartexStyle;
1003
1053
  return (e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || n?.lineHidden != null || n?.lineNoStyle != null || n?.lineColors != null || n?.lineWidthEmu != null || n?.lineDash != null || n?.lineCap != null || n?.lineJoin != null) && e.lineHidden !== !0 && n?.lineHidden !== !0;
1004
1054
  }
1005
- function me(e, t) {
1055
+ function be(e, t) {
1006
1056
  let n = e.replace(/^#/, "");
1007
1057
  if (!/^[0-9a-f]{6}$/i.test(n)) return e;
1008
1058
  let r = (e) => Math.max(0, Math.min(255, Math.round(parseInt(n.slice(e, e + 2), 16) * t))).toString(16).padStart(2, "0");
1009
1059
  return `#${r(0)}${r(2)}${r(4)}`;
1010
1060
  }
1011
- function he(e, t) {
1061
+ function xe(e, t) {
1012
1062
  let n = e.cameraNormal(t);
1013
1063
  if (!n) return 1;
1014
1064
  let r = {
@@ -1018,20 +1068,20 @@ function he(e, t) {
1018
1068
  }, i = Math.hypot(r.x, r.y, r.z), a = Math.max(0, (n.x * r.x + n.y * r.y + n.z * r.z) / i);
1019
1069
  return Math.max(.78, Math.min(1, .78 + .24 * a));
1020
1070
  }
1021
- var ge = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Q = (e, t, n = "minor") => ge((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1022
- function _e(e, t) {
1071
+ var Se = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, X = (e, t, n = "minor") => Se((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1072
+ function Ce(e, t) {
1023
1073
  if (t.length) {
1024
1074
  e.beginPath(), e.moveTo(t[0].x, t[0].y);
1025
1075
  for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1026
1076
  e.closePath();
1027
1077
  }
1028
1078
  }
1029
- var ve = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1030
- function ye(e, t, n, r) {
1031
- ve(n) || (_e(e, t), e.fillStyle = n, e.fill(), r > 0 && (_e(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1079
+ var we = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1080
+ function Te(e, t, n, r) {
1081
+ we(n) || (Ce(e, t), e.fillStyle = n, e.fill(), r > 0 && (Ce(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1032
1082
  }
1033
- function be(e, t, n, r, i, a, o, s, c, l, u, d) {
1034
- return F({
1083
+ function Ee(e, t, n, r, i, a, o, s, c, l, u, d) {
1084
+ return L({
1035
1085
  x0: t,
1036
1086
  x1: n,
1037
1087
  lower0: r,
@@ -1042,13 +1092,13 @@ function be(e, t, n, r, i, a, o, s, c, l, u, d) {
1042
1092
  farDepth: c,
1043
1093
  capStart: u,
1044
1094
  capEnd: d
1045
- }).flatMap((t) => Se(e, t, l).map((e) => ({
1095
+ }).flatMap((t) => Oe(e, t, l).map((e) => ({
1046
1096
  ...e,
1047
1097
  outline: !1,
1048
1098
  outlineSegments: void 0
1049
1099
  })));
1050
1100
  }
1051
- function xe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1101
+ function De(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1052
1102
  if (![
1053
1103
  r,
1054
1104
  i,
@@ -1059,7 +1109,7 @@ function xe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1059
1109
  l,
1060
1110
  u
1061
1111
  ].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
1062
- let v = N({
1112
+ let v = F({
1063
1113
  shape: t,
1064
1114
  horizontal: n,
1065
1115
  crossStart: n ? i : r,
@@ -1073,11 +1123,11 @@ function xe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1073
1123
  omitBaseCap: m,
1074
1124
  omitEndCap: h
1075
1125
  });
1076
- return v ? Se(e, v, d, g, _) : [];
1126
+ return v ? Oe(e, v, d, g, _) : [];
1077
1127
  }
1078
- function Se(e, t, n, r, i) {
1128
+ function Oe(e, t, n, r, i, a = !1) {
1079
1129
  if (i?.exceeded) return [];
1080
- let a = t.faces.map((r) => {
1130
+ let o = t.faces.map((r) => {
1081
1131
  let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
1082
1132
  if (!a) return {
1083
1133
  meshFace: r,
@@ -1097,7 +1147,7 @@ function Se(e, t, n, r, i) {
1097
1147
  facing: a,
1098
1148
  face: {
1099
1149
  points: o,
1100
- color: me(n, he(e, i)),
1150
+ color: be(n, xe(e, i)),
1101
1151
  shade: 0,
1102
1152
  cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
1103
1153
  cameraDepths: i.map((t) => e.cameraDepth(t.x, t.y, t.depth)),
@@ -1105,85 +1155,211 @@ function Se(e, t, n, r, i) {
1105
1155
  outline: !1
1106
1156
  }
1107
1157
  };
1108
- }), o = a.map((e) => e.face).filter((e) => e != null);
1158
+ }), s = a ? [] : o.map((e) => e.face).filter((e) => e != null);
1109
1159
  if (i) {
1110
- if (o.length > i.remaining) return i.exceeded = !0, [];
1111
- i.remaining -= o.length;
1160
+ if (s.length > i.remaining) return i.exceeded = !0, [];
1161
+ i.remaining -= s.length;
1112
1162
  }
1113
- let s = /* @__PURE__ */ new Map(), c = (e, t) => {
1163
+ let c = /* @__PURE__ */ new Map(), l = (e, t) => {
1114
1164
  if (e === t) return;
1115
1165
  let n = e < t ? `${e}:${t}` : `${t}:${e}`;
1116
- s.has(n) || s.set(n, [e, t]);
1166
+ c.has(n) || c.set(n, [e, t]);
1117
1167
  };
1118
- for (let e of a) {
1168
+ for (let e of o) {
1119
1169
  if (!e.facing || !e.face) continue;
1120
1170
  let { indices: t, smoothSurface: n, role: r } = e.meshFace;
1121
- if (!(n && r === "side")) for (let e = 0; e < t.length; e++) c(t[e], t[(e + 1) % t.length]);
1171
+ if (!(n && r === "side")) for (let e = 0; e < t.length; e++) l(t[e], t[(e + 1) % t.length]);
1122
1172
  }
1123
- let l = a.filter((e) => e.meshFace.role === "side").sort((e, t) => (e.meshFace.segmentIndex ?? 0) - (t.meshFace.segmentIndex ?? 0));
1124
- if (t.silhouetteEdges.length === l.length && l.length > 0) for (let e = 0; e < l.length; e++) {
1125
- let n = l[(e + l.length - 1) % l.length], r = l[e];
1173
+ let u = o.filter((e) => e.meshFace.role === "side").sort((e, t) => (e.meshFace.segmentIndex ?? 0) - (t.meshFace.segmentIndex ?? 0));
1174
+ if (t.silhouetteEdges.length === u.length && u.length > 0) for (let e = 0; e < u.length; e++) {
1175
+ let n = u[(e + u.length - 1) % u.length], r = u[e];
1126
1176
  if (n.facing === r.facing || !(r.facing ? r.face : n.face)) continue;
1127
1177
  let [i, a] = t.silhouetteEdges[e];
1128
- c(i, a);
1178
+ l(i, a);
1129
1179
  }
1130
- let u = a.some((e) => e.meshFace.role === "baseCap" && e.facing && e.face != null), d = a.some((e) => e.meshFace.role === "endCap" && e.facing && e.face != null);
1131
- for (let e of l) {
1180
+ let d = o.some((e) => e.meshFace.role === "baseCap" && e.facing && e.face != null), f = o.some((e) => e.meshFace.role === "endCap" && e.facing && e.face != null);
1181
+ for (let e of u) {
1132
1182
  if (!e.facing || !e.face) continue;
1133
- let t = [u ? void 0 : e.meshFace.baseRimEdge, d ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
1134
- for (let [e, n] of t) c(e, n);
1183
+ let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
1184
+ for (let [e, n] of t) l(e, n);
1135
1185
  }
1136
- let f = le([...s.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1137
- if (!r) return o;
1138
- for (let t of f) {
1139
- let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), s = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = re(n.map((e, t) => ({
1186
+ let p = pe([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1187
+ if (!r) return s;
1188
+ let m = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= 1e-9, h = (e) => p.junctions.some((t) => m(t.point, e));
1189
+ for (let t of p.paths) {
1190
+ let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = oe(n.map((e, t) => ({
1140
1191
  ...e,
1141
1192
  cameraDepth: a[t],
1142
- cameraWeight: s[t]
1193
+ cameraWeight: o[t]
1143
1194
  })), {
1144
1195
  width: r.width,
1145
1196
  dash: r.dash,
1146
1197
  lineCap: r.cap,
1198
+ startCap: h(t[0]) ? "butt" : r.cap,
1199
+ endCap: h(t.at(-1)) ? "butt" : r.cap,
1200
+ overlapStart: h(t[0]),
1201
+ overlapEnd: h(t.at(-1)),
1147
1202
  lineJoin: r.join
1148
1203
  });
1149
1204
  if (!c || i && c.length > i.remaining) return i && (i.exceeded = !0), [];
1150
- i && (i.remaining -= c.length), o.push(...c.map((e) => ({
1151
- points: e.points,
1205
+ i && (i.remaining -= c.length), s.push(...c.map((e) => {
1206
+ let t = 1e-6 * Math.max(1, Math.abs(e.cameraDepth));
1207
+ return {
1208
+ points: e.points,
1209
+ color: r.color,
1210
+ shade: 0,
1211
+ cameraDepth: e.cameraDepth + t,
1212
+ cameraDepths: e.cameraDepths?.map((e) => e + t),
1213
+ cameraWeights: e.cameraWeights,
1214
+ outline: !1
1215
+ };
1216
+ }));
1217
+ }
1218
+ for (let t of p.junctions) {
1219
+ let n = ie({
1220
+ ...e.project(t.point.x, t.point.y, t.point.depth),
1221
+ cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
1222
+ cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
1223
+ }, t.neighbours.map((t) => ({
1224
+ ...e.project(t.x, t.y, t.depth),
1225
+ cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1226
+ cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
1227
+ })), {
1228
+ width: r.width,
1229
+ lineJoin: r.join
1230
+ });
1231
+ if (!n) continue;
1232
+ if (i && i.remaining < 1) return i.exceeded = !0, [];
1233
+ i && --i.remaining;
1234
+ let a = 1e-6 * Math.max(1, Math.abs(n.cameraDepth));
1235
+ s.push({
1236
+ points: n.points,
1152
1237
  color: r.color,
1153
1238
  shade: 0,
1154
- cameraDepth: e.cameraDepth,
1155
- cameraDepths: e.cameraDepths,
1156
- cameraWeights: e.cameraWeights,
1239
+ cameraDepth: n.cameraDepth + a,
1240
+ cameraDepths: n.cameraDepths?.map((e) => e + a),
1241
+ cameraWeights: n.cameraWeights,
1157
1242
  outline: !1
1158
- })));
1243
+ });
1159
1244
  }
1160
- return o;
1245
+ return s;
1161
1246
  }
1162
- function Ce(e, t) {
1163
- ye(e, t.points, t.color, t.shade), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(b(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (_e(e, t.points), e.stroke()), e.setLineDash([]));
1247
+ function ke(e, t, n, r, i, a, o) {
1248
+ if (!t.length || o.exceeded) return [];
1249
+ let s = [...t].sort((e, t) => e.start - t.start), c = n - i / 2, l = n + i / 2, u = s[0], d = e.cameraDepth(u.centerX, c, u.centerDepth) >= e.cameraDepth(u.centerX, l, u.centerDepth) ? c : l, f = d === c ? l : c, p = (t, n, i) => ({
1250
+ x: t.centerX + Math.cos(n) * r,
1251
+ y: i,
1252
+ depth: t.centerDepth + Math.sin(n) * r / e.modelDepth
1253
+ }), m = (e) => ({
1254
+ x: e.centerX,
1255
+ y: d,
1256
+ depth: e.centerDepth
1257
+ }), h = [], g = (t, n = !1) => {
1258
+ if (t.length < 2 || o.exceeded) return;
1259
+ let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c = oe((n && !s ? [...t, r] : [...t]).map((t) => ({
1260
+ ...e.project(t.x, t.y, t.depth),
1261
+ cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1262
+ cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
1263
+ })), {
1264
+ width: a.width,
1265
+ dash: a.dash,
1266
+ lineCap: a.cap,
1267
+ startCap: "butt",
1268
+ endCap: "butt",
1269
+ lineJoin: a.join
1270
+ });
1271
+ if (!c || c.length > o.remaining) {
1272
+ o.exceeded = !0;
1273
+ return;
1274
+ }
1275
+ o.remaining -= c.length;
1276
+ for (let e of c) {
1277
+ let t = 1e-6 * Math.max(1, Math.abs(e.cameraDepth));
1278
+ h.push({
1279
+ points: e.points,
1280
+ color: a.color,
1281
+ shade: 0,
1282
+ cameraDepth: e.cameraDepth + t,
1283
+ cameraDepths: e.cameraDepths?.map((e) => e + t),
1284
+ cameraWeights: e.cameraWeights,
1285
+ outline: !1
1286
+ });
1287
+ }
1288
+ }, _ = [], v = [], y = [], b = /* @__PURE__ */ new Set(), x = (e) => {
1289
+ let t = Math.PI * 2, n = (e % t + t) % t;
1290
+ return (n < 1e-8 || t - n < 1e-8 ? 0 : n).toFixed(8);
1291
+ }, S = /* @__PURE__ */ new Map();
1292
+ for (let t of s) {
1293
+ S.set(x(t.start), {
1294
+ slice: t,
1295
+ angle: t.start
1296
+ }), S.set(x(t.end), {
1297
+ slice: t,
1298
+ angle: t.end
1299
+ });
1300
+ for (let n = 0; n <= t.segments; n++) {
1301
+ let r = t.start + (t.end - t.start) * n / t.segments, i = p(t, r, d);
1302
+ if ((!_.length || Math.hypot(_.at(-1).x - i.x, _.at(-1).y - i.y, _.at(-1).depth - i.depth) > 1e-9) && _.push(i), n === t.segments) continue;
1303
+ let a = t.start + (t.end - t.start) * (n + 1) / t.segments, o = p(t, r, c), s = p(t, r, l), u = p(t, a, l), m = p(t, a, c);
1304
+ if (e.cameraFacing([
1305
+ o,
1306
+ s,
1307
+ u,
1308
+ m
1309
+ ])) {
1310
+ let e = p(t, r, f), n = p(t, a, f);
1311
+ y.length || y.push(e), y.push(n), b.add(x(r)), b.add(x(a));
1312
+ } else y.length && (v.push(y), y = []);
1313
+ }
1314
+ }
1315
+ if (y.length && v.push(y), v.length > 1) {
1316
+ let e = v[0], t = v.at(-1), n = e[0], r = t.at(-1);
1317
+ Math.hypot(n.x - r.x, n.y - r.y, n.depth - r.depth) <= 1e-9 && (v[0] = [...t, ...e.slice(1)], v.pop());
1318
+ }
1319
+ g(_, !0);
1320
+ let C = /* @__PURE__ */ new Map();
1321
+ for (let { slice: e, angle: t } of S.values()) g([m(e), p(e, t, d)]), b.has(x(t)) && C.set(x(t), {
1322
+ slice: e,
1323
+ angle: t
1324
+ });
1325
+ for (let t of v) {
1326
+ g(t);
1327
+ for (let n of [t[0], t.at(-1)]) {
1328
+ let t = Math.atan2((n.depth - u.centerDepth) * e.modelDepth, n.x - u.centerX);
1329
+ C.set(x(t), {
1330
+ slice: u,
1331
+ angle: t
1332
+ });
1333
+ }
1334
+ }
1335
+ for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
1336
+ return h;
1337
+ }
1338
+ function Ae(e, t) {
1339
+ Te(e, t.points, t.color, t.shade), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(x(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (Ce(e, t.points), e.stroke()), e.setLineDash([]));
1164
1340
  }
1165
- function we(e, t, n) {
1166
- t.points.length < 3 || ve(n) || (_e(e, t.points), e.fillStyle = n, e.fill());
1341
+ function je(e, t, n) {
1342
+ t.points.length < 3 || we(n) || (Ce(e, t.points), e.fillStyle = n, e.fill());
1167
1343
  }
1168
- function Te(e, t) {
1344
+ function Me(e, t) {
1169
1345
  e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(too many data points)", t.x + t.w / 2, t.y + t.h / 2);
1170
1346
  }
1171
- function $(e, t, n, r = !1) {
1347
+ function Z(e, t, n, r = !1) {
1172
1348
  let i = Math.max(0, t - 1), a = Number.isFinite(e) ? Math.max(0, Math.min(i, e)) : 0, o = n ? (a + .5) / Math.max(1, t) : t === 1 ? .5 : a / i;
1173
1349
  return r ? 1 - o : o;
1174
1350
  }
1175
- function Ee(e) {
1351
+ function Ne(e) {
1176
1352
  let t = e.catAxisLabelRotation;
1177
1353
  return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
1178
1354
  }
1179
- function De(e, t, n, r, i, a = 1) {
1355
+ function Pe(e, t, n, r, i, a = 1) {
1180
1356
  if (i || r === 0) {
1181
1357
  e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", e.fillText(t, n.x + (i ? -6 : 0), n.y + (i ? 0 : a * 6));
1182
1358
  return;
1183
1359
  }
1184
1360
  e.save(), e.translate(n.x, n.y + a * 6), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
1185
1361
  }
1186
- function Oe(e, t, n, r, i, a, o) {
1362
+ function Fe(e, t, n, r, i, a, o) {
1187
1363
  if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1188
1364
  let s = r / 2;
1189
1365
  switch (e.beginPath(), n) {
@@ -1224,65 +1400,66 @@ function Oe(e, t, n, r, i, a, o) {
1224
1400
  }
1225
1401
  i !== "transparent" && (e.fillStyle = i, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1226
1402
  }
1227
- function ke(e, t, n, r, i, a, o, s, c, l = 0, u, f, p = "t", m = o, _ = !0) {
1228
- let b = f;
1229
- if (b?.deleted) return;
1230
- let C = n.seriesDataLabels, w = b?.showVal ?? C?.showVal ?? t.showDataLabels, T = b?.showCatName ?? C?.showCatName ?? !1, E = b?.showSerName ?? C?.showSerName ?? !1, D = b?.showPercent ?? C?.showPercent ?? !1, O = b?.text, k = y({
1231
- customText: O,
1232
- showCategory: T,
1233
- showSeries: E,
1234
- showValue: w,
1235
- showPercent: D,
1403
+ function Ie(e, t, n, r, i, a, o, s, c, l = 0, u, f, p = "t", m = o, h = !0, b) {
1404
+ let x = f;
1405
+ if (x?.deleted) return;
1406
+ let S = n.seriesDataLabels, T = x?.showVal ?? S?.showVal ?? t.showDataLabels, E = x?.showCatName ?? S?.showCatName ?? !1, D = x?.showSerName ?? S?.showSerName ?? !1, O = x?.showPercent ?? S?.showPercent ?? !1, k = x?.text, A = w({
1407
+ customText: k,
1408
+ showCategory: E,
1409
+ showSeries: D,
1410
+ showValue: T,
1411
+ showPercent: O,
1236
1412
  category: n.categories?.[i] ?? t.categories[i] ?? `${i + 1}`,
1237
1413
  seriesName: n.name || `Series ${r + 1}`,
1238
1414
  sourceValue: a,
1415
+ valueDivisor: b?.divisor,
1239
1416
  percentRatio: u != null && Number.isFinite(u) ? u : void 0,
1240
- formatCode: b?.formatCode ?? C?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1241
- percentFormatCode: b?.formatCode ?? C?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1417
+ formatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1418
+ percentFormatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1242
1419
  date1904: t.date1904,
1243
- separator: b?.separator ?? C?.separator
1420
+ separator: x?.separator ?? S?.separator
1244
1421
  });
1245
- if (!k) return;
1246
- let A = d(b?.fontSizeHpt ?? C?.fontSizeHpt ?? t.dataLabelFontSizeHpt, c) ?? 9 * c, j = b?.fontBold ?? C?.fontBold ?? t.dataLabelFontBold ?? !1, M = Q(t, t.dataLabelFontFace);
1247
- e.font = `${j ? "bold " : ""}${A}px ${M}`;
1248
- let N = `#${b?.fontColor ?? C?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, P = O && b?.richRuns?.length ? g(e, {
1249
- runs: b.richRuns,
1422
+ if (!A) return;
1423
+ let j = d(x?.fontSizeHpt ?? S?.fontSizeHpt ?? t.dataLabelFontSizeHpt, c) ?? 9 * c, M = x?.fontBold ?? S?.fontBold ?? t.dataLabelFontBold ?? !1, N = X(t, x?.fontFace ?? S?.fontFace ?? t.dataLabelFontFace);
1424
+ e.font = `${M ? "bold " : ""}${j}px ${N}`;
1425
+ let P = `#${x?.fontColor ?? S?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, F = k && x?.richRuns?.length ? y(e, {
1426
+ runs: x.richRuns,
1250
1427
  ptToPx: c,
1251
- fontFamily: M,
1252
- fallbackBold: j,
1253
- fontFamilyForFace: (e) => Q(t, e)
1254
- }, A, N) : null, F = P ? [] : x(k, Math.max(A, s.w * .45), Math.max(A * 1.2, s.h * .35), A * 1.2, (t) => e.measureText(t).width);
1255
- if (!P && !F.length) return;
1256
- let I = P?.width ?? Math.max(...F.map((t) => e.measureText(t).width)), L = P?.height ?? F.length * A * 1.2, R = h({
1428
+ fontFamily: N,
1429
+ fallbackBold: M,
1430
+ fontFamilyForFace: (e) => X(t, e)
1431
+ }, j, P) : null, I = F ? [] : C(A, Math.max(j, s.w * .45), Math.max(j * 1.2, s.h * .35), j * 1.2, (t) => e.measureText(t).width);
1432
+ if (!F && !I.length) return;
1433
+ let L = F?.width ?? Math.max(...I.map((t) => e.measureText(t).width)), ee = F?.height ?? I.length * j * 1.2, R = _({
1257
1434
  kind: "point",
1258
1435
  x: o.x,
1259
1436
  y: o.y,
1260
- position: b?.position ?? C?.position ?? t.dataLabelPosition ?? p,
1437
+ position: x?.position ?? S?.position ?? t.dataLabelPosition ?? p,
1261
1438
  markerGap: l
1262
1439
  }, s, {
1263
- w: I,
1264
- h: L
1265
- }, A, b?.manualLayout, s);
1440
+ w: L,
1441
+ h: ee
1442
+ }, j, x?.manualLayout, s);
1266
1443
  if (!R) return;
1267
- let z = b?.labelBox ?? C?.labelBox;
1268
- if (C?.showLeaderLines && _ && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(R.rect.x, Math.min(m.x, R.rect.x + R.rect.w)), Math.max(R.rect.y, Math.min(m.y, R.rect.y + R.rect.h))), e.strokeStyle = `#${C.leaderLineColor ?? "808080"}`, e.lineWidth = C.leaderLineWidthEmu == null ? .75 * c : Math.max(.25, C.leaderLineWidthEmu / v * c), e.stroke()), z && (z.fill && (e.fillStyle = `#${z.fill}`, e.fillRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h)), z.borderColor && (e.strokeStyle = `#${z.borderColor}`, e.lineWidth = z.borderWidthEmu == null ? .75 * c : Math.max(.25, z.borderWidthEmu / v * c), e.strokeRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h))), e.save(), e.beginPath(), e.rect(R.clip.x, R.clip.y, R.clip.w, R.clip.h), e.clip(), P) {
1269
- S(e, P, R.x, R.y, R.textAlign, R.textBaseline), e.restore();
1444
+ let z = x?.labelBox ?? S?.labelBox;
1445
+ if (S?.showLeaderLines && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(R.rect.x, Math.min(m.x, R.rect.x + R.rect.w)), Math.max(R.rect.y, Math.min(m.y, R.rect.y + R.rect.h))), e.strokeStyle = `#${S.leaderLineColor ?? "808080"}`, e.lineWidth = S.leaderLineWidthEmu == null ? .75 * c : Math.max(.25, S.leaderLineWidthEmu / g * c), e.stroke()), z && (z.fill && (e.fillStyle = `#${z.fill}`, e.fillRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h)), z.borderColor && (e.strokeStyle = `#${z.borderColor}`, e.lineWidth = z.borderWidthEmu == null ? .75 * c : Math.max(.25, z.borderWidthEmu / g * c), e.strokeRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h))), e.save(), e.beginPath(), e.rect(R.clip.x, R.clip.y, R.clip.w, R.clip.h), e.clip(), F) {
1446
+ v(e, F, R.x, R.y, R.textAlign, R.textBaseline), e.restore();
1270
1447
  return;
1271
1448
  }
1272
- e.fillStyle = N, e.textAlign = R.textAlign, e.textBaseline = "middle";
1273
- let B = A * 1.2, V = R.y - (F.length - 1) * B / 2;
1274
- F.forEach((t, n) => e.fillText(t, R.x, V + n * B)), e.restore();
1449
+ e.fillStyle = P, e.textAlign = R.textAlign, e.textBaseline = "middle";
1450
+ let B = j * 1.2, V = R.y - (I.length - 1) * B / 2;
1451
+ I.forEach((t, n) => e.fillText(t, R.x, V + n * B)), e.restore();
1275
1452
  }
1276
- function Ae(e, t, n) {
1453
+ function Le(e, t, n) {
1277
1454
  if (n?.deleted) return !1;
1278
1455
  if (n?.text) return !0;
1279
1456
  let r = t.seriesDataLabels;
1280
1457
  return (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1281
1458
  }
1282
- function je(n, c, l, u, f) {
1459
+ function Re(n, c, l, u, f) {
1283
1460
  let p = r(c, l.h, u);
1284
1461
  if (c.title) {
1285
- n.font = `${c.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${ge(c.titleFontFace)}`, n.fillStyle = c.titleFontColor ? `#${c.titleFontColor}` : "#111111", n.textAlign = "center", n.textBaseline = "top";
1462
+ n.font = `${c.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${Se(c.titleFontFace)}`, n.fillStyle = c.titleFontColor ? `#${c.titleFontColor}` : "#111111", n.textAlign = "center", n.textBaseline = "top";
1286
1463
  let t = n.measureText(c.title).width, r = {
1287
1464
  x: l.x + (l.w - t) / 2,
1288
1465
  y: l.y + p.topPad,
@@ -1296,7 +1473,7 @@ function je(n, c, l, u, f) {
1296
1473
  n.fillText(c.title, i ? i.x + i.w / 2 : l.x + l.w / 2, i?.y ?? r.y);
1297
1474
  }
1298
1475
  let m = d(c.legendFontSizeHpt, u) ?? 9 * u;
1299
- n.save(), n.font = `${c.legendFontBold ? "bold " : ""}${m}px ${ge(c.legendFontFace)}`;
1476
+ n.save(), n.font = `${c.legendFontBold ? "bold " : ""}${m}px ${Se(c.legendFontFace)}`;
1300
1477
  let h = c.chartType === "pie" ? c.series[0]?.categories?.length ? c.series[0].categories : c.categories : c.series.map((e, t) => e.name || `Series ${t + 1}`), g = i(c, l.w, l.h, .23, {
1301
1478
  itemWidths: h.map((e) => 7 * u + 4 + n.measureText(e).width),
1302
1479
  rowHeight: Math.max(m * 1.45, 12),
@@ -1353,11 +1530,11 @@ function je(n, c, l, u, f) {
1353
1530
  legend: (C && c.legendManualLayout ? e(c.legendManualLayout, l, C) : null) ?? C
1354
1531
  };
1355
1532
  }
1356
- function Me(t, n, r, i, a, o, s, c, l, d, f, p, m, h) {
1533
+ function ze(t, n, r, i, a, o, s, c, l, d, f, p, m, h) {
1357
1534
  t.save(), t.font = `${d ? "italic " : ""}${l ? "bold " : ""}${o}px ${s}`, t.fillStyle = c ? `#${c}` : "#555";
1358
- let g = m ? n : _(t, n, h), v = u(a, f, p), y = i;
1535
+ let g = m ? n : S(t, n, h), _ = u(a, f, p), v = i;
1359
1536
  if (m) {
1360
- let n = t.measureText(g).width, a = Math.abs(Math.cos(v)), s = Math.abs(Math.sin(v)), c = {
1537
+ let n = t.measureText(g).width, a = Math.abs(Math.cos(_)), s = Math.abs(Math.sin(_)), c = {
1361
1538
  x: i.x - (n * a + o * s) / 2,
1362
1539
  y: i.y - (n * s + o * a) / 2,
1363
1540
  w: n * a + o * s,
@@ -1367,52 +1544,93 @@ function Me(t, n, r, i, a, o, s, c, l, d, f, p, m, h) {
1367
1544
  w: void 0,
1368
1545
  h: void 0
1369
1546
  }, r, c);
1370
- l && (y = {
1547
+ l && (v = {
1371
1548
  x: l.x + l.w / 2,
1372
1549
  y: l.y + l.h / 2
1373
1550
  });
1374
1551
  }
1375
- t.translate(y.x, y.y), v && t.rotate(v), t.textAlign = "center", t.textBaseline = "middle", t.fillText(g, 0, 0), t.restore();
1552
+ t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", t.fillText(g, 0, 0), t.restore();
1376
1553
  }
1377
- function Ne(e, t, r, i, a, s) {
1554
+ function Be(e, t, r, i, a, s) {
1378
1555
  if (t.valAxisTitle) {
1379
1556
  let c = n(t.valAxisTitleFontSizeHpt, s), l = a ? "horizontal" : "left";
1380
- Me(e, t.valAxisTitle, r, a ? {
1557
+ ze(e, t.valAxisTitle, r, a ? {
1381
1558
  x: i.x + i.w / 2,
1382
1559
  y: i.y + i.h + o(r.h) + c / 2
1383
1560
  } : {
1384
1561
  x: i.x - o(r.w) - c / 2,
1385
1562
  y: i.y + i.h / 2
1386
- }, l, c, Q(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, a ? i.w : i.h);
1563
+ }, l, c, X(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, a ? i.w : i.h);
1387
1564
  }
1388
1565
  if (t.catAxisTitle) {
1389
1566
  let c = n(t.catAxisTitleFontSizeHpt, s), l = a ? "left" : "horizontal";
1390
- Me(e, t.catAxisTitle, r, a ? {
1567
+ ze(e, t.catAxisTitle, r, a ? {
1391
1568
  x: i.x - o(r.w) - c / 2,
1392
1569
  y: i.y + i.h / 2
1393
1570
  } : {
1394
1571
  x: i.x + i.w / 2,
1395
1572
  y: i.y + i.h + o(r.h) + c / 2
1396
- }, l, c, Q(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, a ? i.h : i.w);
1573
+ }, l, c, X(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, a ? i.h : i.w);
1574
+ }
1575
+ }
1576
+ function Ve(e, t, r, i, a, o, s, c, l, u) {
1577
+ let f = t.threeD?.seriesAxis;
1578
+ if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1579
+ let p = Xe(t, i, a, o, s, c, l), m = Ge(i), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === i.front.y ? i.front.y + i.front.h : i.front.y : m.floorY, _ = i.project(h, g, i.topology.nearDepth), v = i.project(h, g, i.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
1580
+ if (!(y > 1e-6)) return;
1581
+ let b = {
1582
+ x: (v.x - _.x) / y,
1583
+ y: (v.y - _.y) / y
1584
+ }, x = {
1585
+ x: -b.y,
1586
+ y: b.x
1587
+ }, S = i.project(i.front.x + i.front.w / 2, i.front.y + i.front.h / 2, .5), C = {
1588
+ x: (_.x + v.x) / 2,
1589
+ y: (_.y + v.y) / 2
1590
+ };
1591
+ (C.x - S.x) * x.x + (C.y - S.y) * x.y < 0 && (x = {
1592
+ x: -x.x,
1593
+ y: -x.y
1594
+ }), (f.tickLabelPos === "low" && x.y < 0 || f.tickLabelPos === "high" && x.y > 0) && (x = {
1595
+ x: -x.x,
1596
+ y: -x.y
1597
+ }), f.lineHidden || ($(e, Q(f.lineColor, f.lineWidthEmu, null, u, "898989", 1)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
1598
+ let w = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), E = f.majorTickMark ?? "out", D = d(f.fontSizeHpt, u) ?? 9 * u;
1599
+ e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${X(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", e.textAlign = Math.abs(x.x) < .2 ? "center" : x.x < 0 ? "right" : "left", e.textBaseline = Math.abs(x.y) < .2 ? "middle" : x.y < 0 ? "bottom" : "top";
1600
+ for (let n = 0; n < t.series.length; n++) {
1601
+ let r = i.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - r : r, o = i.project(h, g, a);
1602
+ if (!f.lineHidden && n % w === 0 && E !== "none") {
1603
+ let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1604
+ e.beginPath(), e.moveTo(o.x + x.x * n, o.y + x.y * n), e.lineTo(o.x - x.x * r, o.y - x.y * r), e.stroke();
1605
+ }
1606
+ f.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * u + 3), o.y + x.y * (6 * u + 3));
1607
+ }
1608
+ if (e.setLineDash([]), f.title) {
1609
+ let a = n(f.titleFontSizeHpt, u);
1610
+ ze(e, f.title, r, {
1611
+ x: C.x + x.x * (D + a + 12),
1612
+ y: C.y + x.y * (D + a + 12)
1613
+ }, "horizontal", a, X(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(i.front.w, i.front.h));
1397
1614
  }
1398
1615
  }
1399
- function Pe(e, t, n, r, i = !1) {
1616
+ function He(e, t, n, r, i = !1) {
1400
1617
  if (!n) return;
1618
+ b(e, t, n, r);
1401
1619
  let a = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), o = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1402
1620
  let r = t.series[0]?.dataPointColors?.[n];
1403
1621
  return {
1404
1622
  label: e,
1405
- color: r === "00000000" ? "transparent" : r ? `#${r}` : fe(n),
1623
+ color: r === "00000000" ? "transparent" : r ? `#${r}` : ve(n),
1406
1624
  series: t.series[0],
1407
1625
  point: a.get(n)
1408
1626
  };
1409
1627
  }) : t.series.map((e, t) => ({
1410
1628
  label: e.name || `Series ${t + 1}`,
1411
- color: fe(t, e),
1629
+ color: ve(t, e),
1412
1630
  series: e,
1413
1631
  point: void 0
1414
1632
  })), s = d(t.legendFontSizeHpt, r) ?? 9 * r;
1415
- e.font = `${t.legendFontBold ? "bold " : ""}${s}px ${ge(t.legendFontFace)}`, e.textAlign = "left", e.textBaseline = "middle";
1633
+ e.font = `${t.legendFontBold ? "bold " : ""}${s}px ${Se(t.legendFontFace)}`, e.textAlign = "left", e.textBaseline = "middle";
1416
1634
  let c = Math.max(s * 1.45, 12), l = Math.min(7 * r, c * .7);
1417
1635
  if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1418
1636
  let a = o.map((t) => l + 4 + e.measureText(t.label).width), s = f(a, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / c))), u = n.y + 2 + c / 2;
@@ -1421,14 +1639,14 @@ function Pe(e, t, n, r, i = !1) {
1421
1639
  for (let n = 0; n < d.length; n++) {
1422
1640
  let a = o[d[n]], c = Math.max(0, s[n] - l - 4);
1423
1641
  if (!i && t.chartType.toLowerCase().includes("line") && a.series?.lineHidden !== !0) {
1424
- let t = a.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, a.series.lineWidthEmu / v * r);
1425
- e.beginPath(), e.moveTo(p, u), e.lineTo(p + l, u), e.strokeStyle = a.series?.lineColor ? `#${a.series.lineColor}` : me(a.color, .7), e.lineWidth = t, e.setLineDash(b(a.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]);
1642
+ let t = a.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, a.series.lineWidthEmu / g * r);
1643
+ e.beginPath(), e.moveTo(p, u), e.lineTo(p + l, u), e.strokeStyle = a.series?.lineColor ? `#${a.series.lineColor}` : be(a.color, .7), e.lineWidth = t, e.setLineDash(x(a.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]);
1426
1644
  } else {
1427
1645
  a.color !== "transparent" && (e.fillStyle = a.color, e.fillRect(p, u - l / 2, l, l));
1428
1646
  let t = a.point?.lineHidden ?? a.series?.lineHidden, n = a.point?.lineColor ?? a.series?.lineColor;
1429
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (a.point?.lineWidthEmu ?? a.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (a.point?.lineWidthEmu ?? a.series?.lineWidthEmu ?? 0) / v * r), e.setLineDash(b(a.point?.lineDash ?? a.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(p, u - l / 2, l, l), e.setLineDash([]));
1647
+ t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (a.point?.lineWidthEmu ?? a.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (a.point?.lineWidthEmu ?? a.series?.lineWidthEmu ?? 0) / g * r), e.setLineDash(x(a.point?.lineDash ?? a.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(p, u - l / 2, l, l), e.setLineDash([]));
1430
1648
  }
1431
- e.fillStyle = t.legendFontColor ? `#${t.legendFontColor}` : "#595959", e.fillText(_(e, a.label, c), p + l + 4, u), p += s[n] + 12;
1649
+ e.fillStyle = t.legendFontColor ? `#${t.legendFontColor}` : "#595959", e.fillText(S(e, a.label, c), p + l + 4, u), p += s[n] + 12;
1432
1650
  }
1433
1651
  u += c;
1434
1652
  }
@@ -1436,26 +1654,26 @@ function Pe(e, t, n, r, i = !1) {
1436
1654
  }
1437
1655
  let u = n.y;
1438
1656
  for (let a = 0; a < o.length; a++) {
1439
- let d = o[a], f = n.x + 8 + l, p = Math.max(0, n.x + n.w - 4 - f), m = Math.max(s * 1.2, 10), h = x(d.label, p, m * (i ? 1 : 2), m, (t) => e.measureText(t).width);
1657
+ let d = o[a], f = n.x + 8 + l, p = Math.max(0, n.x + n.w - 4 - f), m = Math.max(s * 1.2, 10), h = C(d.label, p, m * (i ? 1 : 2), m, (t) => e.measureText(t).width);
1440
1658
  if (h.length === 0) continue;
1441
- let g = Math.max(c, h.length * m + 2);
1442
- if (u + g > n.y + n.h + 1e-6) break;
1443
- let _ = u + g / 2;
1659
+ let _ = Math.max(c, h.length * m + 2);
1660
+ if (u + _ > n.y + n.h + 1e-6) break;
1661
+ let v = u + _ / 2;
1444
1662
  if (!i && t.chartType.toLowerCase().includes("line")) {
1445
- let t = d.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, d.series.lineWidthEmu / v * r);
1446
- d.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(n.x + 4, _), e.lineTo(n.x + 4 + l, _), e.strokeStyle = d.series?.lineColor ? `#${d.series.lineColor}` : me(d.color, .7), e.lineWidth = t, e.setLineDash(b(d.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]));
1663
+ let t = d.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, d.series.lineWidthEmu / g * r);
1664
+ d.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(n.x + 4, v), e.lineTo(n.x + 4 + l, v), e.strokeStyle = d.series?.lineColor ? `#${d.series.lineColor}` : be(d.color, .7), e.lineWidth = t, e.setLineDash(x(d.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]));
1447
1665
  } else {
1448
- d.color !== "transparent" && (e.fillStyle = d.color, e.fillRect(n.x + 4, _ - l / 2, l, l));
1666
+ d.color !== "transparent" && (e.fillStyle = d.color, e.fillRect(n.x + 4, v - l / 2, l, l));
1449
1667
  let t = d.point?.lineHidden ?? d.series?.lineHidden, i = d.point?.lineColor ?? d.series?.lineColor;
1450
- t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (d.point?.lineWidthEmu ?? d.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (d.point?.lineWidthEmu ?? d.series?.lineWidthEmu ?? 0) / v * r), e.setLineDash(b(d.point?.lineDash ?? d.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, _ - l / 2, l, l), e.setLineDash([]));
1668
+ t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (d.point?.lineWidthEmu ?? d.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (d.point?.lineWidthEmu ?? d.series?.lineWidthEmu ?? 0) / g * r), e.setLineDash(x(d.point?.lineDash ?? d.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, v - l / 2, l, l), e.setLineDash([]));
1451
1669
  }
1452
1670
  e.fillStyle = t.legendFontColor ? `#${t.legendFontColor}` : "#595959";
1453
- let y = _ - (h.length - 1) * m / 2;
1454
- h.forEach((t, n) => e.fillText(t, f, y + n * m)), u += g;
1671
+ let y = v - (h.length - 1) * m / 2;
1672
+ h.forEach((t, n) => e.fillText(t, f, y + n * m)), u += _;
1455
1673
  }
1456
1674
  }
1457
- function Fe(e, t, n, r, i, a) {
1458
- let o = i ? 100 : 1;
1675
+ function Ue(e, t, n, r, i, a) {
1676
+ let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "cross";
1459
1677
  return p({
1460
1678
  dataMin: t,
1461
1679
  dataMax: n,
@@ -1467,66 +1685,95 @@ function Fe(e, t, n, r, i, a) {
1467
1685
  axisOrientation: a,
1468
1686
  logBase: e.valAxisLogBase,
1469
1687
  reversed: e.valAxisOrientation === "maxMin",
1470
- needMinor: e.valAxisMinorGridlines === !0 || e.valAxisMinorTickMark != null && e.valAxisMinorTickMark !== "none"
1688
+ needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
1471
1689
  });
1472
1690
  }
1473
- function Ie(e, t, n, r, i = "A6A6A6", a = .75) {
1474
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / v * r) : a * r;
1691
+ function We(e, t, n) {
1692
+ let r = e != null && Number.isFinite(e) ? (e % 360 + 360) % 360 : 0, i = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0, a = Number.isFinite(n) ? Math.max(0, Math.min(1 - i, n)) : 0, o = Math.PI / 2 - (r * Math.PI / 180 + i * Math.PI * 2), s = o - a * Math.PI * 2;
1693
+ return {
1694
+ start: Math.min(o, s),
1695
+ end: Math.max(o, s),
1696
+ middle: (o + s) / 2,
1697
+ leading: o
1698
+ };
1699
+ }
1700
+ function Ge(e) {
1701
+ let { front: t } = e, n = t.x, r = t.x + t.w, i = e.topology.farX === "min" ? n : r, a = i === n ? r : n, o = e.topology.axisY === "min" ? t.y : t.y + t.h, s = o === t.y ? t.y + t.h : t.y, { nearDepth: c, farDepth: l } = e.topology, u = e.project(n, o, c), d = e.project(r, o, c), f = e.project(r, o, l), p = e.project(n, o, l), m = e.project(n, s, l), h = e.project(r, s, l), g = e.project(i, o, c), _ = e.project(i, o, l), v = e.project(i, s, l), y = e.project(i, s, c);
1702
+ return {
1703
+ floor: [
1704
+ u,
1705
+ d,
1706
+ f,
1707
+ p
1708
+ ],
1709
+ sideWall: [
1710
+ g,
1711
+ _,
1712
+ v,
1713
+ y
1714
+ ],
1715
+ backWall: [
1716
+ p,
1717
+ f,
1718
+ h,
1719
+ m
1720
+ ],
1721
+ sideX: i,
1722
+ seriesAxisX: a,
1723
+ floorY: o,
1724
+ oppositeFloorY: s,
1725
+ nearDepth: c,
1726
+ farDepth: l
1727
+ };
1728
+ }
1729
+ function Q(e, t, n, r, i = "A6A6A6", a = .75) {
1730
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / g * r) : a * r;
1475
1731
  return {
1476
1732
  color: `#${e ?? i}`,
1477
1733
  width: o,
1478
- dash: b(n ?? "solid", o)
1734
+ dash: x(n ?? "solid", o)
1479
1735
  };
1480
1736
  }
1481
- function Le(e, t) {
1737
+ function $(e, t) {
1482
1738
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1483
1739
  }
1484
- function Re(e, t, n, r, i, a, o, s, c) {
1485
- let { front: l } = n, u = n.topology.farX === "min" ? l.x : l.x + l.w, d = n.topology.axisY === "min" ? l.y : l.y + l.h, f = d === l.y ? l.y + l.h : l.y, p = l.x, m = l.x + l.w, h = n.topology.farDepth, g = n.topology.nearDepth, _ = n.project(p, d, g), v = n.project(m, d, g), y = n.project(m, d, h), b = n.project(p, d, h), x = n.project(p, f, h), S = n.project(m, f, h);
1486
- ye(e, [
1487
- _,
1488
- v,
1489
- y,
1490
- b
1491
- ], "#F2F2F2", 0), ye(e, [
1492
- b,
1493
- y,
1494
- S,
1495
- x
1496
- ], "#F7F7F7", 0);
1497
- let C = (t, a) => {
1498
- Le(e, a);
1740
+ function Ke(e, t, n, r, i, a, o, s, c) {
1741
+ let { front: l } = n, u = l.x, d = l.x + l.w, f = Ge(n), { sideX: p, floorY: m, oppositeFloorY: h, nearDepth: g, farDepth: _ } = f, v = (t, n) => {
1742
+ n?.fillHidden === !0 || !n?.fillColor || Te(e, t, `#${n.fillColor}`, 0);
1743
+ };
1744
+ v(f.floor, t.threeD?.floor), v(f.sideWall, t.threeD?.sideWall), v(f.backWall, t.threeD?.backWall);
1745
+ let y = (t, a) => {
1746
+ $(e, a);
1499
1747
  for (let a of t) if (i === "horizontal") {
1500
- let t = l.x + r.fraction(a) * l.w, i = n.project(t, d, h), o = n.project(t, f, h);
1748
+ let t = l.x + r.fraction(a) * l.w, i = n.project(t, m, _), o = n.project(t, h, _);
1501
1749
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke();
1502
1750
  } else {
1503
- let t = l.y + l.h - r.fraction(a) * l.h, i = n.project(u, t, g), o = n.project(u, t, h), s = n.project(u === p ? m : p, t, h);
1751
+ let t = l.y + l.h - r.fraction(a) * l.h, i = n.project(p, t, g), o = n.project(p, t, _), s = n.project(p === u ? d : u, t, _);
1504
1752
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke(), e.beginPath(), e.moveTo(o.x, o.y), e.lineTo(s.x, s.y), e.stroke();
1505
1753
  }
1506
1754
  };
1507
- t.valAxisMinorGridlines === !0 && C(r.minorTicks, Ie(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5)), t.valAxisMajorGridlines !== !1 && C(r.majorTicks, Ie(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1)), Le(e, Ie(null, null, null, c, "898989", 1));
1755
+ t.valAxisMinorGridlines === !0 && y(r.minorTicks, Q(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5)), t.valAxisMajorGridlines !== !1 && y(r.majorTicks, Q(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1)), $(e, Q(null, null, null, c, "898989", 1));
1508
1756
  for (let t = 0; t < a; t++) if (i === "vertical") {
1509
- let r = l.x + $(t, a, o, s) * l.w, i = n.project(r, d, g), c = n.project(r, d, h);
1757
+ let r = l.x + Z(t, a, o, s) * l.w, i = n.project(r, m, g), c = n.project(r, m, _);
1510
1758
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1511
1759
  } else {
1512
- let r = l.y + $(t, a, o, s) * l.h, i = n.project(u, r, g), c = n.project(u, r, h);
1760
+ let r = l.y + Z(t, a, o, s) * l.h, i = n.project(p, r, g), c = n.project(p, r, _);
1513
1761
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1514
1762
  }
1515
- for (let [t, n] of [
1516
- [_, v],
1517
- [v, y],
1518
- [y, S],
1519
- [S, x],
1520
- [x, b],
1521
- [b, _]
1522
- ]) e.beginPath(), e.moveTo(t.x, t.y), e.lineTo(n.x, n.y), e.stroke();
1523
- e.setLineDash([]);
1763
+ let b = (t, n) => {
1764
+ if (!(n?.lineHidden === !0 || t.length < 2)) {
1765
+ $(e, Q(n?.lineColor, n?.lineWidthEmu, n?.lineDash, c, "898989", 1)), e.beginPath(), e.moveTo(t[0].x, t[0].y);
1766
+ for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1767
+ e.lineTo(t[0].x, t[0].y), e.closePath(), e.stroke();
1768
+ }
1769
+ };
1770
+ b(f.floor, t.threeD?.floor), b(f.sideWall, t.threeD?.sideWall), b(f.backWall, t.threeD?.backWall), e.setLineDash([]);
1524
1771
  }
1525
- function ze(e, t, n, r, i, a, o, s, c) {
1526
- let l = He(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
1527
- u && (Le(e, Ie(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && (Le(e, Ie(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
1772
+ function qe(e, t, n, r, i, a, o, s, c) {
1773
+ let l = Xe(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
1774
+ u && ($(e, Q(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && ($(e, Q(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
1528
1775
  }
1529
- function Be(e, t, n, r) {
1776
+ function Je(e, t, n, r) {
1530
1777
  let i = {
1531
1778
  x: (e.x + t.x) / 2,
1532
1779
  y: (e.y + t.y) / 2
@@ -1539,12 +1786,12 @@ function Be(e, t, n, r) {
1539
1786
  y: i.y <= n.y ? -1 : 1
1540
1787
  };
1541
1788
  }
1542
- function Ve(e, t, n, r, i, a, o, s, c) {
1789
+ function Ye(e, t, n, r, i, a, o, s, c) {
1543
1790
  if (!t || t === "none") return;
1544
- let l = Be(r, i, a, o), u = (s === "minor" ? 4 : 6) * c, d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
1791
+ let l = Je(r, i, a, o), u = (s === "minor" ? 4 : 6) * c, d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
1545
1792
  e.beginPath(), e.moveTo(n.x + l.x * f, n.y + l.y * f), e.lineTo(n.x - l.x * p, n.y - l.y * p), e.stroke();
1546
1793
  }
1547
- function He(e, t, n, r, i, a, o) {
1794
+ function Xe(e, t, n, r, i, a, o) {
1548
1795
  let { front: s } = t, c = (e) => Math.max(0, Math.min(1, e)), l = t.topology.axisX === "min" ? s.x : s.x + s.w, u = t.topology.axisY === "min" ? s.y : s.y + s.h, d = () => {
1549
1796
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
1550
1797
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
@@ -1554,7 +1801,7 @@ function He(e, t, n, r, i, a, o) {
1554
1801
  return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
1555
1802
  }, f = () => {
1556
1803
  let t = e.valAxisCrossesAt;
1557
- if (t != null && Number.isFinite(t)) return $(t - 1, r, i, a);
1804
+ if (t != null && Number.isFinite(t)) return Z(t - 1, r, i, a);
1558
1805
  let n = e.valAxisCrosses;
1559
1806
  if (n !== "min" && n !== "max") return null;
1560
1807
  let o = +(n === "max");
@@ -1570,20 +1817,20 @@ function He(e, t, n, r, i, a, o) {
1570
1817
  verticalEnd: t.project(h, s.y, _)
1571
1818
  };
1572
1819
  }
1573
- function Ue(e, t, n, r, i, a, o, s, c) {
1574
- let { front: l } = n, u = He(t, n, r, i, a, o, s), { axisX: d, axisY: f, depth: p } = u, m = n.project(l.x + l.w / 2, l.y + l.h / 2, p);
1820
+ function Ze(e, t, n, r, i, a, o, s, c) {
1821
+ let { front: l } = n, u = Xe(t, n, r, i, a, o, s), { axisX: d, axisY: f, depth: p } = u, m = n.project(l.x + l.w / 2, l.y + l.h / 2, p), h = t.valAxisMinorTickMark ?? "cross";
1575
1822
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
1576
- Le(e, Ie(t.valAxisLineColor, t.valAxisLineWidthEmu, null, c, "898989", 1));
1823
+ $(e, Q(t.valAxisLineColor, t.valAxisLineWidthEmu, null, c, "898989", 1));
1577
1824
  let i = (e) => s === "horizontal" ? n.project(l.x + r.fraction(e) * l.w, f, p) : n.project(d, l.y + l.h - r.fraction(e) * l.h, p), a = s === "horizontal" ? u.horizontalStart : u.verticalStart, o = s === "horizontal" ? u.horizontalEnd : u.verticalEnd;
1578
- for (let n of r.majorTicks) Ve(e, t.valAxisMajorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "major", c);
1579
- for (let n of r.minorTicks) Ve(e, t.valAxisMinorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "minor", c);
1825
+ for (let n of r.majorTicks) Ye(e, t.valAxisMajorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "major", c);
1826
+ for (let t of r.minorTicks) Ye(e, h, i(t), a, o, m, s === "vertical" ? "horizontal" : "vertical", "minor", c);
1580
1827
  }
1581
1828
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
1582
- Le(e, Ie(t.catAxisLineColor, t.catAxisLineWidthEmu, null, c, "898989", 1));
1829
+ $(e, Q(t.catAxisLineColor, t.catAxisLineWidthEmu, null, c, "898989", 1));
1583
1830
  let r = s === "vertical" ? u.horizontalStart : u.verticalStart, h = s === "vertical" ? u.horizontalEnd : u.verticalEnd, g = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1));
1584
1831
  for (let u = 0; u < i; u += g) {
1585
- let g = $(u, i, a, o), _ = s === "vertical" ? n.project(l.x + g * l.w, f, p) : n.project(d, l.y + g * l.h, p);
1586
- Ve(e, t.catAxisMajorTickMark, _, r, h, m, s === "vertical" ? "vertical" : "horizontal", "major", c);
1832
+ let g = Z(u, i, a, o), _ = s === "vertical" ? n.project(l.x + g * l.w, f, p) : n.project(d, l.y + g * l.h, p);
1833
+ Ye(e, t.catAxisMajorTickMark, _, r, h, m, s === "vertical" ? "vertical" : "horizontal", "major", c);
1587
1834
  }
1588
1835
  let _ = t.catAxisMinorUnit;
1589
1836
  if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && _ != null && Number.isFinite(_) && _ > 0) {
@@ -1592,24 +1839,27 @@ function Ue(e, t, n, r, i, a, o, s, c) {
1592
1839
  let v = g * _;
1593
1840
  if (!(v < i)) break;
1594
1841
  if (Math.abs(v / u - Math.round(v / u)) < 1e-9) continue;
1595
- let y = $(v, i, a, o), b = s === "vertical" ? n.project(l.x + y * l.w, f, p) : n.project(d, l.y + y * l.h, p);
1596
- Ve(e, t.catAxisMinorTickMark, b, r, h, m, s === "vertical" ? "vertical" : "horizontal", "minor", c);
1842
+ let y = Z(v, i, a, o), b = s === "vertical" ? n.project(l.x + y * l.w, f, p) : n.project(d, l.y + y * l.h, p);
1843
+ Ye(e, t.catAxisMinorTickMark, b, r, h, m, s === "vertical" ? "vertical" : "horizontal", "minor", c);
1597
1844
  }
1598
1845
  }
1599
1846
  }
1600
1847
  e.setLineDash([]);
1601
1848
  }
1602
- function We(e, t, n, r) {
1849
+ function Qe(e, t, n, r) {
1603
1850
  if (!t.threeD) return !1;
1604
- let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), { plot: o, legend: s } = je(e, t, n, r, a ? "horizontal" : "vertical"), u = O(t.threeD, o, { sceneDepthScale: i ? .1 : .4 });
1605
- if (!u) return !0;
1606
- let f = t.chartType.startsWith("stacked"), p = t.chartType.endsWith("Pct"), h = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, g = Math.max(1, h.length, ...t.series.map((e) => e.values.length)), _ = t.catAxisOrientation === "maxMin", y = t.catAxisCrossBetween === "between", x = t.dispBlanksAs ?? "gap", S = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, T = (e, n) => {
1851
+ let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), o = t.chartType.startsWith("stacked"), s = i && !o && t.threeD.barGrouping === "standard", { plot: u, legend: f } = Re(e, t, n, r, a ? "horizontal" : "vertical"), p = A(t.threeD, u, {
1852
+ sceneDepthScale: i ? s ? .65 : .1 : .4,
1853
+ perspectiveTangentGain: s ? 1 : 2
1854
+ });
1855
+ if (!p) return !0;
1856
+ let _ = t.chartType.endsWith("Pct"), v = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, y = Math.max(1, v.length, ...t.series.map((e) => e.values.length)), b = t.catAxisOrientation === "maxMin", S = t.catAxisCrossBetween === "between", C = t.dispBlanksAs ?? "gap", w = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, D = (e, n) => {
1607
1857
  let r = t.series[e]?.values[n];
1608
- return r != null && Number.isFinite(r) && (!S || r > 0) || r == null && (f || x === "zero");
1609
- }, E = (e, n) => {
1858
+ return r != null && Number.isFinite(r) && (!w || r > 0) || r == null && (o || C === "zero");
1859
+ }, O = (e, n) => {
1610
1860
  let r = t.series[e]?.values[n] ?? 0;
1611
1861
  if (!Number.isFinite(r)) return 0;
1612
- if (!p) return r;
1862
+ if (!_) return r;
1613
1863
  let i = 0;
1614
1864
  for (let e of t.series) {
1615
1865
  let t = e.values[n];
@@ -1622,182 +1872,182 @@ function We(e, t, n, r) {
1622
1872
  t != null && Number.isFinite(t) && (a += Math.abs(t) / i);
1623
1873
  }
1624
1874
  return a > 0 ? r / i / a * 100 : 0;
1625
- }, D = (e, t) => {
1875
+ }, k = (e, t) => {
1626
1876
  let n = e + t;
1627
1877
  return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
1628
- }, k = 0, A = 0;
1629
- if (f) {
1630
- for (let e = 0; e < g; e++) {
1878
+ }, j = 0, M = 0;
1879
+ if (o) {
1880
+ for (let e = 0; e < y; e++) {
1631
1881
  let n = 0, r = 0;
1632
1882
  for (let i = 0; i < t.series.length; i++) {
1633
- let t = E(i, e);
1634
- t >= 0 ? n = D(n, t) : r = D(r, t);
1883
+ let t = O(i, e);
1884
+ t >= 0 ? n = k(n, t) : r = k(r, t);
1635
1885
  }
1636
- k = Math.min(k, r), A = Math.max(A, n);
1886
+ j = Math.min(j, r), M = Math.max(M, n);
1637
1887
  }
1638
- p && (k = k < 0 ? -100 : 0, A = A > 0 ? 100 : 0, k === 0 && A === 0 && (A = 1));
1888
+ _ && (j = j < 0 ? -100 : 0, M = M > 0 ? 100 : 0, j === 0 && M === 0 && (M = 1));
1639
1889
  } else {
1640
- let e = m(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!S || e > 0)), S ? {
1890
+ let e = h(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!w || e > 0)), w ? {
1641
1891
  min: 1,
1642
1892
  max: 10
1643
1893
  } : {
1644
1894
  min: 0,
1645
1895
  max: 1
1646
1896
  });
1647
- k = S ? e.min : Math.min(0, e.min), A = S ? e.max : Math.max(0, e.max);
1897
+ j = w ? e.min : Math.min(0, e.min), M = w ? e.max : Math.max(0, e.max);
1648
1898
  }
1649
- let j = Fe(t, k, A, (a ? u.front.w : u.front.h) / r, p, a ? "horizontal" : "vertical"), M = (e) => Number.isFinite(e) ? Math.max(j.min, Math.min(j.max, e)) : j.min;
1650
- Re(e, t, u, j, a ? "horizontal" : "vertical", g, y, _, r);
1651
- let { front: N } = u, P = Math.max(1, t.series.length), F = [], I = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), z = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
1899
+ let N = Ue(t, j, M, (a ? p.front.w : p.front.h) / r, _, a ? "horizontal" : "vertical"), P = (e) => Number.isFinite(e) ? Math.max(N.min, Math.min(N.max, e)) : N.min;
1900
+ Ke(e, t, p, N, a ? "horizontal" : "vertical", y, S, b, r);
1901
+ let { front: F } = p, I = Math.max(1, t.series.length), L = [], ee = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), B = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
1652
1902
  if (i) {
1653
- let i = u.prismInterval(0, 1, !0), o = [], s = Array(g).fill(0), c = Array(g).fill(0), l = (a ? N.h : N.w) / g, d = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
1903
+ let i = p.prismInterval(0, 1, !0), c = [], l = Array(y).fill(0), u = Array(y).fill(0), d = (a ? F.h : F.w) / y, f = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
1654
1904
  for (let e = 0; e < t.series.length; e++) {
1655
- let n = t.series[e], u = i, m = C(l, d, e, P, f);
1656
- for (let i = 0; i < g; i++) {
1657
- if (!T(e, i)) continue;
1658
- let d = E(e, i), h = I[e].get(i), y = h?.fillHidden === !0 ? "transparent" : h?.color ?? n.dataPointColors?.[i], b = y === "00000000" ? "transparent" : y ? `#${y}` : n.color === "00000000" ? "transparent" : fe(e, n), x = pe(n, h), C = h?.lineColor ?? n.lineColor, O = h?.lineWidthEmu ?? n.lineWidthEmu, k = h?.lineDash ?? n.chartexStyle?.lineDash ?? "solid", A = n.chartexStyle?.lineCap === "rnd" ? "round" : n.chartexStyle?.lineCap === "sq" ? "square" : "butt", P = n.chartexStyle?.lineJoin === "round" || n.chartexStyle?.lineJoin === "bevel" ? n.chartexStyle.lineJoin : "miter", F = f ? d >= 0 ? s[i] : c[i] : 0, L = D(F, d);
1659
- f && (d >= 0 ? s[i] = L : c[i] = L);
1660
- let R = M(F), z = M(L), B = n.threeDShape ?? t.threeD.shape ?? "box", V = B === "cone" || B === "pyramid", H = B === "coneToMax" || B === "pyramidToMax", U = (e) => {
1661
- if (!V) return 1;
1662
- let t = S && !(F > 0) ? j.min : F, n = j.fraction(t), r = j.fraction(L), i = j.fraction(e), a = r - n;
1905
+ let n = t.series[e], h = s ? p.prismInterval(e, I, !1) : i, g = T(d, f, s ? 0 : e, s ? 1 : I, o || s);
1906
+ for (let i = 0; i < y; i++) {
1907
+ if (!D(e, i)) continue;
1908
+ let s = O(e, i), f = ee[e].get(i), p = f?.fillHidden === !0 ? "transparent" : f?.color ?? n.dataPointColors?.[i], v = p === "00000000" ? "transparent" : p ? `#${p}` : n.color === "00000000" ? "transparent" : ve(e, n), x = ye(n, f), S = f?.lineColor ?? n.lineColor, C = f?.lineWidthEmu ?? n.lineWidthEmu, T = f?.lineDash ?? n.chartexStyle?.lineDash ?? "solid", A = n.chartexStyle?.lineCap === "rnd" ? "round" : n.chartexStyle?.lineCap === "sq" ? "square" : "butt", j = n.chartexStyle?.lineJoin === "round" || n.chartexStyle?.lineJoin === "bevel" ? n.chartexStyle.lineJoin : "miter", M = o ? s >= 0 ? l[i] : u[i] : 0, I = k(M, s);
1909
+ o && (s >= 0 ? l[i] = I : u[i] = I);
1910
+ let L = P(M), R = P(I), z = n.threeDShape ?? t.threeD.shape ?? "box", B = z === "cone" || z === "pyramid", V = z === "coneToMax" || z === "pyramidToMax", H = (e) => {
1911
+ if (!B) return 1;
1912
+ let t = w && !(M > 0) ? N.min : M, n = N.fraction(t), r = N.fraction(I), i = N.fraction(e), a = r - n;
1663
1913
  return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
1664
- }, W = (e) => {
1665
- if (!H) return 1;
1666
- let t = L >= F ? j.max : j.min, n = S ? j.min : 0, r = j.fraction(t), i = j.fraction(n), a = j.fraction(e), o = Math.abs(r - i);
1914
+ }, U = (e) => {
1915
+ if (!V) return 1;
1916
+ let t = I >= M ? N.max : N.min, n = w ? N.min : 0, r = N.fraction(t), i = N.fraction(n), a = N.fraction(e), o = Math.abs(r - i);
1667
1917
  return !(o > 0) || ![
1668
1918
  r,
1669
1919
  i,
1670
1920
  a
1671
- ].every(Number.isFinite) ? w(e, j.min, j.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
1672
- }, G = H ? W(R) : U(R), K = H ? W(z) : U(z);
1921
+ ].every(Number.isFinite) ? E(e, N.min, N.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
1922
+ }, W = V ? U(L) : H(L), G = V ? U(R) : H(R);
1673
1923
  if (a) {
1674
- let t = N.x + j.fraction(R) * N.w, n = N.x + j.fraction(z) * N.w, a = _ ? g - 1 - i : i, s = N.y + a * l + m.offset;
1675
- o.push({
1924
+ let t = F.x + N.fraction(L) * F.w, n = F.x + N.fraction(R) * F.w, a = b ? y - 1 - i : i, o = F.y + a * d + g.offset;
1925
+ c.push({
1676
1926
  x: Math.min(t, n),
1677
- y: s,
1927
+ y: o,
1678
1928
  width: Math.abs(n - t),
1679
- height: m.size,
1680
- nearDepth: u.near,
1681
- farDepth: u.far,
1929
+ height: g.size,
1930
+ nearDepth: h.near,
1931
+ farDepth: h.far,
1682
1932
  categoryIndex: i,
1683
1933
  seriesIndex: e,
1684
- color: b,
1685
- shape: B,
1934
+ color: v,
1935
+ shape: z,
1686
1936
  baseCoord: t,
1687
1937
  endCoord: n,
1688
- baseScale: G,
1689
- endScale: K,
1938
+ baseScale: W,
1939
+ endScale: G,
1690
1940
  omitBaseCap: !1,
1691
1941
  omitEndCap: !1,
1692
1942
  outline: x,
1693
- outlineColor: C ? `#${C}` : "rgba(0,0,0,0.42)",
1694
- outlineWidth: O == null ? .75 : Math.max(.25, O / v * r),
1695
- outlineDash: k,
1943
+ outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1944
+ outlineWidth: C == null ? .75 * r / m : ge(C, r),
1945
+ outlineDash: T,
1696
1946
  outlineCap: A,
1697
- outlineJoin: P,
1698
- labelValue: p ? d / 100 : d
1947
+ outlineJoin: j,
1948
+ labelValue: _ ? s / 100 : s
1699
1949
  });
1700
1950
  } else {
1701
- let t = N.y + N.h - j.fraction(R) * N.h, n = N.y + N.h - j.fraction(z) * N.h, a = _ ? g - 1 - i : i, s = N.x + a * l + m.offset;
1702
- o.push({
1703
- x: s,
1951
+ let t = F.y + F.h - N.fraction(L) * F.h, n = F.y + F.h - N.fraction(R) * F.h, a = b ? y - 1 - i : i, o = F.x + a * d + g.offset;
1952
+ c.push({
1953
+ x: o,
1704
1954
  y: Math.min(t, n),
1705
- width: m.size,
1955
+ width: g.size,
1706
1956
  height: Math.abs(n - t),
1707
- nearDepth: u.near,
1708
- farDepth: u.far,
1957
+ nearDepth: h.near,
1958
+ farDepth: h.far,
1709
1959
  categoryIndex: i,
1710
1960
  seriesIndex: e,
1711
- color: b,
1712
- shape: B,
1961
+ color: v,
1962
+ shape: z,
1713
1963
  baseCoord: t,
1714
1964
  endCoord: n,
1715
- baseScale: G,
1716
- endScale: K,
1965
+ baseScale: W,
1966
+ endScale: G,
1717
1967
  omitBaseCap: !1,
1718
1968
  omitEndCap: !1,
1719
1969
  outline: x,
1720
- outlineColor: C ? `#${C}` : "rgba(0,0,0,0.42)",
1721
- outlineWidth: O == null ? .75 : Math.max(.25, O / v * r),
1722
- outlineDash: k,
1970
+ outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1971
+ outlineWidth: C == null ? .75 * r / m : ge(C, r),
1972
+ outlineDash: T,
1723
1973
  outlineCap: A,
1724
- outlineJoin: P,
1725
- labelValue: p ? d / 100 : d
1974
+ outlineJoin: j,
1975
+ labelValue: _ ? s / 100 : s
1726
1976
  });
1727
1977
  }
1728
1978
  }
1729
1979
  }
1730
- if (f) {
1731
- let e = de(o, g);
1732
- for (let t = 0; t < g; t++) {
1980
+ if (o) {
1981
+ let e = _e(c, y);
1982
+ for (let t = 0; t < y; t++) {
1733
1983
  let n = e[t];
1734
1984
  for (let e of [-1, 1]) {
1735
- let t = n.filter((t) => Math.sign(t.labelValue) === e && !ve(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
1985
+ let t = n.filter((t) => Math.sign(t.labelValue) === e && !we(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
1736
1986
  for (let e = 0; e + 1 < t.length; e++) {
1737
1987
  let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
1738
1988
  n.shape !== r.shape || Math.abs(n.endCoord - r.baseCoord) > i || Math.abs(n.endScale - r.baseScale) > 1e-9 || n.nearDepth !== r.nearDepth || n.farDepth !== r.farDepth || (n.omitEndCap = !0, r.omitBaseCap = !0);
1739
1989
  }
1740
1990
  }
1741
- let r = n.find((e) => e.labelValue > 0 && !ve(e.color)), i = n.find((e) => e.labelValue < 0 && !ve(e.color));
1991
+ let r = n.find((e) => e.labelValue > 0 && !we(e.color)), i = n.find((e) => e.labelValue < 0 && !we(e.color));
1742
1992
  if (r && i) {
1743
1993
  let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
1744
1994
  r.shape === i.shape && Math.abs(r.baseCoord - i.baseCoord) <= e && Math.abs(r.baseScale - i.baseScale) <= 1e-9 && r.nearDepth === i.nearDepth && r.farDepth === i.farDepth && (r.omitBaseCap = !0, i.omitBaseCap = !0);
1745
1995
  }
1746
1996
  }
1747
1997
  }
1748
- let m = {
1749
- remaining: K,
1998
+ let h = {
1999
+ remaining: te,
1750
2000
  exceeded: !1
1751
- }, h = o.flatMap((e) => xe(u, e.shape, a, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
2001
+ }, g = c.flatMap((e) => De(p, e.shape, a, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
1752
2002
  color: e.outlineColor,
1753
2003
  width: e.outlineWidth,
1754
- dash: b(e.outlineDash, e.outlineWidth),
2004
+ dash: x(e.outlineDash, e.outlineWidth),
1755
2005
  cap: e.outlineCap,
1756
2006
  join: e.outlineJoin
1757
- } : void 0, m));
1758
- if (m.exceeded) return Te(e, n), !0;
1759
- for (let t of W(h)) Ce(e, t);
1760
- for (let i of o) {
1761
- let o = t.series[i.seriesIndex], s = a ? u.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : u.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), c = z[i.seriesIndex].get(i.categoryIndex);
1762
- Ae(t, o, c) && F.push(() => ke(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, s, n, r, 0, void 0, c));
2007
+ } : void 0, h));
2008
+ if (h.exceeded) return Me(e, n), !0;
2009
+ for (let t of G(g)) Ae(e, t);
2010
+ for (let i of c) {
2011
+ let o = t.series[i.seriesIndex], s = a ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), c = B[i.seriesIndex].get(i.categoryIndex);
2012
+ Le(t, o, c) && L.push(() => Ie(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, s, n, r, 0, void 0, c, "t", s, !0, t.valAxisDisplayUnits));
1763
2013
  }
1764
2014
  } else {
1765
- let i = t.series.map(() => Array(g).fill(0)), a = t.series.map(() => Array(g).fill(0));
1766
- if (f) {
1767
- let e = Array(g).fill(0), n = Array(g).fill(0);
1768
- for (let r = 0; r < t.series.length; r++) for (let t = 0; t < g; t++) {
1769
- let o = E(r, t), s = o >= 0 ? e[t] : n[t];
1770
- i[r][t] = s, a[r][t] = D(s, o), o >= 0 ? e[t] = D(e[t], o) : n[t] = D(n[t], o);
2015
+ let i = t.series.map(() => Array(y).fill(0)), a = t.series.map(() => Array(y).fill(0));
2016
+ if (o) {
2017
+ let e = Array(y).fill(0), n = Array(y).fill(0);
2018
+ for (let r = 0; r < t.series.length; r++) for (let t = 0; t < y; t++) {
2019
+ let o = O(r, t), s = o >= 0 ? e[t] : n[t];
2020
+ i[r][t] = s, a[r][t] = k(s, o), o >= 0 ? e[t] = k(e[t], o) : n[t] = k(n[t], o);
1771
2021
  }
1772
2022
  }
1773
- let o = (e) => {
1774
- let t = u.seriesDepth(e, P, f), n = 0, r = 0;
1775
- for (let i = 0; i < g; i++) {
1776
- if (!T(e, i)) continue;
1777
- let o = f ? a[e][i] : E(e, i), s = N.x + $(i, g, y, _) * N.w, c = N.y + N.h - j.fraction(M(o)) * N.h;
1778
- n += u.cameraDepth(s, c, t), r++;
2023
+ let s = (e) => {
2024
+ let t = p.seriesDepth(e, I, o), n = 0, r = 0;
2025
+ for (let i = 0; i < y; i++) {
2026
+ if (!D(e, i)) continue;
2027
+ let s = o ? a[e][i] : O(e, i), c = F.x + Z(i, y, S, b) * F.w, l = F.y + F.h - N.fraction(P(s)) * F.h;
2028
+ n += p.cameraDepth(c, l, t), r++;
1779
2029
  }
1780
2030
  return r > 0 ? n / r : -Infinity;
1781
- }, s = t.series.map((e, t) => t).sort((e, t) => o(e) - o(t) || t - e), c = [], l = [], d = !1;
1782
- for (let o of s) {
2031
+ }, c = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), l = [], u = [], d = !1;
2032
+ for (let s of c) {
1783
2033
  if (d) break;
1784
- let s = t.series[o], m = fe(o, s), h = f ? u.prismInterval(0, 1, !0) : u.prismInterval(o, P, !1), S = N.x + N.w / 2, C = N.y + N.h / 2, w = u.cameraDepth(S, C, h.near) >= u.cameraDepth(S, C, h.far) ? h.near : h.far, D = [], O = [], k = [], A = [], M = [], B = [], V = [], H = [], U = [], W = [];
1785
- for (let e = 0; e < g; e++) {
1786
- if (!T(o, e)) {
1787
- D.push(null), O.push(null), k.push(null), A.push(null), M.push(null), B.push(null), V.push(null), H.push(null), U.push(null), W.push(null);
2034
+ let c = t.series[s], f = ve(s, c), m = o ? p.prismInterval(0, 1, !0) : p.prismInterval(s, I, !1), h = F.x + F.w / 2, v = F.y + F.h / 2, w = p.cameraDepth(h, v, m.near) >= p.cameraDepth(h, v, m.far) ? m.near : m.far, T = [], E = [], k = [], A = [], j = [], M = [], P = [], V = [], H = [], U = [];
2035
+ for (let e = 0; e < y; e++) {
2036
+ if (!D(s, e)) {
2037
+ T.push(null), E.push(null), k.push(null), A.push(null), j.push(null), M.push(null), P.push(null), V.push(null), H.push(null), U.push(null);
1788
2038
  continue;
1789
2039
  }
1790
- let n = f ? a[o][e] : E(o, e), r = f ? i[o][e] : 0, s = N.x + $(e, g, y, _) * N.w, c = j.fraction(n), l = j.fraction(r), d = Number.isFinite(l) ? l : r <= j.min ? 0 : 1, p = Number.isFinite(c) && c >= 0 && c <= 1, m = Number.isFinite(c) ? Math.max(0, Math.min(1, c)) : n <= j.min ? 0 : 1, h = N.y + N.h - m * N.h, v = N.y + N.h - Math.max(0, Math.min(1, d)) * N.h;
1791
- D.push(t.chartType.toLowerCase().includes("area") || p ? u.project(s, h, w) : null), O.push(u.project(s, v, w)), k.push(p ? u.cameraDepth(s, h, w) : null), A.push(u.cameraDepth(s, v, w)), M.push(n), B.push(s), V.push(h), H.push(v), U.push(c), W.push(d);
2040
+ let n = o ? a[s][e] : O(s, e), r = o ? i[s][e] : 0, c = F.x + Z(e, y, S, b) * F.w, l = N.fraction(n), u = N.fraction(r), d = Number.isFinite(u) ? u : r <= N.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= N.min ? 0 : 1, h = F.y + F.h - m * F.h, g = F.y + F.h - Math.max(0, Math.min(1, d)) * F.h;
2041
+ T.push(t.chartType.toLowerCase().includes("area") || f ? p.project(c, h, w) : null), E.push(p.project(c, g, w)), k.push(f ? p.cameraDepth(c, h, w) : null), A.push(p.cameraDepth(c, g, w)), j.push(n), M.push(c), P.push(h), V.push(g), H.push(l), U.push(d);
1792
2042
  }
1793
- let G = [], K = null;
1794
- for (let e = 0; e < D.length; e++) {
1795
- let t = D[e], n = O[e];
2043
+ let W = [], G = null;
2044
+ for (let e = 0; e < T.length; e++) {
2045
+ let t = T[e], n = E[e];
1796
2046
  if (!t || !n) {
1797
- x === "gap" && (K && G.push(K), K = null);
2047
+ C === "gap" && (G && W.push(G), G = null);
1798
2048
  continue;
1799
2049
  }
1800
- K ??= {
2050
+ G ??= {
1801
2051
  upper: [],
1802
2052
  lower: [],
1803
2053
  upperDepths: [],
@@ -1808,81 +2058,81 @@ function We(e, t, n, r) {
1808
2058
  lowerYs: [],
1809
2059
  upperFractions: [],
1810
2060
  lowerFractions: []
1811
- }, K.upper.push(t), K.lower.push(n), K.upperDepths.push(k[e] ?? 0), K.lowerDepths.push(A[e] ?? 0), K.indices.push(e), K.sceneXs.push(B[e] ?? 0), K.upperYs.push(V[e] ?? 0), K.lowerYs.push(H[e] ?? 0), K.upperFractions.push(U[e] ?? 0), K.lowerFractions.push(W[e] ?? 0);
2061
+ }, G.upper.push(t), G.lower.push(n), G.upperDepths.push(k[e] ?? 0), G.lowerDepths.push(A[e] ?? 0), G.indices.push(e), G.sceneXs.push(M[e] ?? 0), G.upperYs.push(P[e] ?? 0), G.lowerYs.push(V[e] ?? 0), G.upperFractions.push(H[e] ?? 0), G.lowerFractions.push(U[e] ?? 0);
1812
2062
  }
1813
- K && G.push(K);
1814
- let q = [];
1815
- if (t.chartType.toLowerCase().includes("area")) for (let t of G) {
2063
+ G && W.push(G);
2064
+ let K = [];
2065
+ if (t.chartType.toLowerCase().includes("area")) for (let t of W) {
1816
2066
  let n = null;
1817
2067
  for (let r = 0; r + 1 < t.upper.length; r++) {
1818
- let i = R(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2068
+ let i = z(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
1819
2069
  for (let a = 0; a < i.length; a++) {
1820
- let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, l = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, f = N.y + N.h - o.lowerStart * N.h, p = N.y + N.h - o.lowerEnd * N.h, g = N.y + N.h - o.upperStart * N.h, _ = N.y + N.h - o.upperEnd * N.h, v = {
1821
- ...u.project(s, g, w),
1822
- cameraDepth: u.cameraDepth(s, g, w),
1823
- cameraWeight: u.cameraProjectionWeight(s, g, w)
2070
+ let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, u = F.y + F.h - o.lowerStart * F.h, h = F.y + F.h - o.lowerEnd * F.h, g = F.y + F.h - o.upperStart * F.h, _ = F.y + F.h - o.upperEnd * F.h, v = {
2071
+ ...p.project(s, g, w),
2072
+ cameraDepth: p.cameraDepth(s, g, w),
2073
+ cameraWeight: p.cameraProjectionWeight(s, g, w)
1824
2074
  }, y = {
1825
- ...u.project(l, _, w),
1826
- cameraDepth: u.cameraDepth(l, _, w),
1827
- cameraWeight: u.cameraProjectionWeight(l, _, w)
2075
+ ...p.project(c, _, w),
2076
+ cameraDepth: p.cameraDepth(c, _, w),
2077
+ cameraWeight: p.cameraProjectionWeight(c, _, w)
1828
2078
  };
1829
- n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 && q.push(n), n = [v, y]);
1830
- let b = be(u, s, l, f, p, g, _, h.near, h.far, m, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2079
+ n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 && K.push(n), n = [v, y]);
2080
+ let b = Ee(p, s, c, u, h, g, _, m.near, m.far, f, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
1831
2081
  for (let t of b) {
1832
- if (c.length >= 1e4) {
2082
+ if (l.length >= 1e4) {
1833
2083
  d = !0;
1834
2084
  break;
1835
2085
  }
1836
- c.push({
2086
+ l.push({
1837
2087
  points: t.points,
1838
2088
  cameraDepth: t.cameraDepth,
1839
2089
  cameraDepths: t.cameraDepths,
1840
2090
  cameraWeights: t.cameraWeights,
1841
2091
  layer: 0,
1842
- paint: () => Ce(e, t)
2092
+ paint: () => Ae(e, t)
1843
2093
  });
1844
2094
  }
1845
2095
  if (d) break;
1846
2096
  }
1847
2097
  if (d) break;
1848
2098
  }
1849
- if (n && n.length >= 2 && q.push(n), d) break;
2099
+ if (n && n.length >= 2 && K.push(n), d) break;
1850
2100
  }
1851
- let J = [];
2101
+ let te = [];
1852
2102
  if (!t.chartType.toLowerCase().includes("area")) {
1853
2103
  let e = [], t = null;
1854
- for (let n = 0; n < g; n++) {
1855
- let r = M[n], i = r == null ? NaN : j.fraction(r);
2104
+ for (let n = 0; n < y; n++) {
2105
+ let r = j[n], i = r == null ? NaN : N.fraction(r);
1856
2106
  if (r == null || !Number.isFinite(i)) {
1857
- x === "gap" && t && (e.push(t), t = null);
2107
+ C === "gap" && t && (e.push(t), t = null);
1858
2108
  continue;
1859
2109
  }
1860
2110
  t ??= [], t.push({
1861
- x: N.x + $(n, g, y, _) * N.w,
2111
+ x: F.x + Z(n, y, S, b) * F.w,
1862
2112
  fraction: i
1863
2113
  });
1864
2114
  }
1865
2115
  t && e.push(t);
1866
2116
  let n = (e) => {
1867
- let t = Math.max(0, Math.min(1, e.fraction)), n = N.y + N.h - t * N.h;
2117
+ let t = Math.max(0, Math.min(1, e.fraction)), n = F.y + F.h - t * F.h;
1868
2118
  return {
1869
- ...u.project(e.x, n, w),
1870
- cameraDepth: u.cameraDepth(e.x, n, w),
1871
- cameraWeight: u.cameraProjectionWeight(e.x, n, w)
2119
+ ...p.project(e.x, n, w),
2120
+ cameraDepth: p.cameraDepth(e.x, n, w),
2121
+ cameraWeight: p.cameraProjectionWeight(e.x, n, w)
1872
2122
  };
1873
2123
  }, r = (e) => {
1874
- e && e.path.length >= 2 && J.push(e);
2124
+ e && e.path.length >= 2 && te.push(e);
1875
2125
  };
1876
2126
  for (let t of e) {
1877
2127
  if (t.length < 2) continue;
1878
2128
  let e = [t[0]];
1879
2129
  for (let n = 0; n + 1 < t.length; n++) {
1880
2130
  let r = t[n - 1] ?? t[n], i = t[n], a = t[n + 1], o = t[n + 2] ?? a;
1881
- if (s.smooth !== !0 || t.length < 3) {
2131
+ if (c.smooth !== !0 || t.length < 3) {
1882
2132
  e.push(a);
1883
2133
  continue;
1884
2134
  }
1885
- let c = {
2135
+ let s = {
1886
2136
  x: i.x + (a.x - r.x) / 6,
1887
2137
  fraction: i.fraction + (a.fraction - r.fraction) / 6
1888
2138
  }, l = {
@@ -1892,16 +2142,16 @@ function We(e, t, n, r) {
1892
2142
  for (let t = 1; t <= 12; t++) {
1893
2143
  let n = t / 12, r = 1 - n;
1894
2144
  e.push({
1895
- x: r * r * r * i.x + 3 * r * r * n * c.x + 3 * r * n * n * l.x + n * n * n * a.x,
1896
- fraction: r * r * r * i.fraction + 3 * r * r * n * c.fraction + 3 * r * n * n * l.fraction + n * n * n * a.fraction
2145
+ x: r * r * r * i.x + 3 * r * r * n * s.x + 3 * r * n * n * l.x + n * n * n * a.x,
2146
+ fraction: r * r * r * i.fraction + 3 * r * r * n * s.fraction + 3 * r * n * n * l.fraction + n * n * n * a.fraction
1897
2147
  });
1898
2148
  }
1899
2149
  }
1900
2150
  let i = null, a = 0;
1901
2151
  for (let t = 0; t + 1 < e.length; t++) {
1902
- let o = e[t], s = e[t + 1], c = (e) => u.project(e.x, N.y + N.h - e.fraction * N.h, w), l = c(o), d = c(s), f = Math.hypot(d.x - l.x, d.y - l.y), p = Number.isFinite(f) ? f : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * N.h), m = L(o.fraction, s.fraction);
2152
+ let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, F.y + F.h - e.fraction * F.h, w), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * F.h), m = R(o.fraction, s.fraction);
1903
2153
  if (!m || m.endT - m.startT <= 1e-12) {
1904
- r(i), i = null, a += p;
2154
+ r(i), i = null, a += f;
1905
2155
  continue;
1906
2156
  }
1907
2157
  let h = (e) => ({
@@ -1912,121 +2162,122 @@ function We(e, t, n, r) {
1912
2162
  path: [v, y],
1913
2163
  startClipped: t > 0 || m.startT > 0,
1914
2164
  endClipped: t + 1 < e.length - 1 || m.endT < 1,
1915
- dashOffset: a + (Number.isFinite(_) ? _ : p * m.startT)
1916
- }), a += p;
2165
+ dashOffset: a + (Number.isFinite(_) ? _ : f * m.startT)
2166
+ }), a += f;
1917
2167
  }
1918
2168
  r(i);
1919
2169
  }
1920
2170
  }
1921
- let ee = t.chartType.toLowerCase().includes("area"), te = s.lineHidden != null || s.lineColor != null || s.lineWidthEmu != null || s.chartexStyle?.lineHidden != null || s.chartexStyle?.lineColors?.some(Boolean) || s.chartexStyle?.lineWidthEmu != null || s.chartexStyle?.lineDash != null || s.chartexStyle?.lineCap != null || s.chartexStyle?.lineJoin != null;
1922
- if (s.lineHidden !== !0 && (!ee || te)) {
1923
- let t = s.lineColor ? `#${s.lineColor}` : me(m, .7), n = s.lineWidthEmu ? Math.max(.5, s.lineWidthEmu / v) * r : ee ? .75 * r : Math.max(1, 2 * r), i = b(s.chartexStyle?.lineDash ?? "solid", n), a = s.chartexStyle?.lineCap === "rnd" ? "round" : s.chartexStyle?.lineCap === "sq" ? "square" : "butt", o = s.chartexStyle?.lineJoin === "round" || s.chartexStyle?.lineJoin === "bevel" ? s.chartexStyle.lineJoin : "miter", l = (r, s, l = s, u = 0) => {
1924
- let f = re(r, {
2171
+ let q = t.chartType.toLowerCase().includes("area"), J = c.lineHidden != null || c.lineColor != null || c.lineWidthEmu != null || c.chartexStyle?.lineHidden != null || c.chartexStyle?.lineColors?.some(Boolean) || c.chartexStyle?.lineWidthEmu != null || c.chartexStyle?.lineDash != null || c.chartexStyle?.lineCap != null || c.chartexStyle?.lineJoin != null;
2172
+ if (c.lineHidden !== !0 && (!q || J)) {
2173
+ let t = c.lineColor ? `#${c.lineColor}` : be(f, .7), n = c.lineWidthEmu ? Math.max(.5, c.lineWidthEmu / g) * r : q ? .75 * r : Math.max(1, 2 * r), i = x(c.chartexStyle?.lineDash ?? "solid", n), a = c.chartexStyle?.lineCap === "rnd" ? "round" : c.chartexStyle?.lineCap === "sq" ? "square" : "butt", o = c.chartexStyle?.lineJoin === "round" || c.chartexStyle?.lineJoin === "bevel" ? c.chartexStyle.lineJoin : "miter", s = (r, s, c = s, u = 0) => {
2174
+ let f = oe(r, {
1925
2175
  width: n,
1926
2176
  dash: i,
1927
2177
  dashOffset: u,
1928
2178
  lineCap: a,
1929
2179
  startCap: s,
1930
- endCap: l,
2180
+ endCap: c,
1931
2181
  lineJoin: o
1932
2182
  });
1933
2183
  if (f == null) {
1934
2184
  d = !0;
1935
2185
  return;
1936
2186
  }
1937
- if (c.length + f.length > 1e4) {
2187
+ if (l.length + f.length > 1e4) {
1938
2188
  d = !0;
1939
2189
  return;
1940
2190
  }
1941
- for (let n of f) c.push({
2191
+ for (let n of f) l.push({
1942
2192
  points: n.points,
1943
2193
  cameraDepth: n.cameraDepth,
1944
2194
  cameraDepths: n.cameraDepths,
1945
2195
  cameraWeights: n.cameraWeights,
1946
2196
  layer: 1,
1947
- paint: () => we(e, n, t)
2197
+ paint: () => je(e, n, t)
1948
2198
  });
1949
2199
  };
1950
- if (ee) for (let e of q) l(e, a);
1951
- else for (let e of J) l(e.path, e.startClipped ? "butt" : a, e.endClipped ? "butt" : a, e.dashOffset);
2200
+ if (q) for (let e of K) s(e, a);
2201
+ else for (let e of te) s(e.path, e.startClipped ? "butt" : a, e.endClipped ? "butt" : a, e.dashOffset);
1952
2202
  }
1953
- let Y = s.dataPointOverrides?.some((e) => e.markerSymbol != null && e.markerSymbol !== "none") === !0;
1954
- if (t.chartType.toLowerCase().includes("line") && (s.showMarker === !0 || Y)) for (let t = 0; t < D.length; t++) {
1955
- let n = D[t];
2203
+ let ne = c.dataPointOverrides?.some((e) => e.markerSymbol != null && e.markerSymbol !== "none") === !0;
2204
+ if (t.chartType.toLowerCase().includes("line") && (c.showMarker === !0 || ne)) for (let t = 0; t < T.length; t++) {
2205
+ let n = T[t];
1956
2206
  if (!n) continue;
1957
- let i = I[o].get(t), a = i?.markerSymbol ?? (s.showMarker === !0 ? s.markerSymbol ?? "circle" : "none");
2207
+ let i = ee[s].get(t), a = i?.markerSymbol ?? (c.showMarker === !0 ? c.markerSymbol ?? "circle" : "none");
1958
2208
  if (a === "none") continue;
1959
- let c = i?.markerSize ?? s.markerSize ?? 5, u = i?.markerFill ?? s.markerFill ?? s.color ?? Z[o % Z.length], d = i?.markerLine ?? s.markerLine ?? s.lineColor ?? s.color ?? Z[o % Z.length], f = (i?.markerLineWidthEmu ?? s.markerLineWidthEmu) == null ? Math.max(.75, s.lineWidthEmu == null ? r : s.lineWidthEmu / v * r) : Math.max(.25, (i?.markerLineWidthEmu ?? s.markerLineWidthEmu ?? 0) / v * r);
1960
- l.push(() => Oe(e, n, a, Math.max(2, c) * r, u === "00000000" ? "transparent" : `#${u}`, `#${d}`, f));
2209
+ let o = i?.markerSize ?? c.markerSize ?? 5, l = i?.markerFill ?? c.markerFill ?? c.color ?? me[s % me.length], d = i?.markerLine ?? c.markerLine ?? c.lineColor ?? c.color ?? me[s % me.length], f = (i?.markerLineWidthEmu ?? c.markerLineWidthEmu) == null ? Math.max(.75, c.lineWidthEmu == null ? r : c.lineWidthEmu / g * r) : Math.max(.25, (i?.markerLineWidthEmu ?? c.markerLineWidthEmu ?? 0) / g * r);
2210
+ u.push(() => Fe(e, n, a, Math.max(2, o) * r, l === "00000000" ? "transparent" : `#${l}`, `#${d}`, f));
1961
2211
  }
1962
- for (let i = 0; i < D.length; i++) {
1963
- let a = D[i];
2212
+ for (let i = 0; i < T.length; i++) {
2213
+ let a = T[i];
1964
2214
  if (!a) continue;
1965
- let c = E(o, i), l = I[o].get(i), u = l?.markerSize ?? s.markerSize ?? 5, d = z[o].get(i);
1966
- Ae(t, s, d) && F.push(() => ke(e, t, s, o, i, p ? c / 100 : c, a, n, r, s.showMarker === !0 || l?.markerSymbol != null ? u * r / 2 : 0, void 0, d));
2215
+ let o = O(s, i), l = ee[s].get(i), u = l?.markerSize ?? c.markerSize ?? 5, d = B[s].get(i);
2216
+ Le(t, c, d) && L.push(() => Ie(e, t, c, s, i, _ ? o / 100 : o, a, n, r, c.showMarker === !0 || l?.markerSymbol != null ? u * r / 2 : 0, void 0, d, "t", a, !0, t.valAxisDisplayUnits));
1967
2217
  }
1968
2218
  }
1969
- if (d) return Te(e, n), !0;
1970
- for (let e of W(c)) e.paint();
1971
- for (let e of l) e();
2219
+ if (d) return Me(e, n), !0;
2220
+ for (let e of G(l)) e.paint();
2221
+ for (let e of u) e();
1972
2222
  }
1973
- ze(e, t, u, j, g, y, _, r, a ? "horizontal" : "vertical"), Ue(e, t, u, j, g, y, _, a ? "horizontal" : "vertical", r);
1974
- let B = He(t, u, j, g, y, _, a ? "horizontal" : "vertical"), V = (e, t) => {
1975
- if (t !== "low" && t !== "high") return B;
1976
- let n = u.topology.nearDepth, r = B.axisX, i = B.axisY;
2223
+ qe(e, t, p, N, y, S, b, r, a ? "horizontal" : "vertical"), Ze(e, t, p, N, y, S, b, a ? "horizontal" : "vertical", r), Ve(e, t, n, p, N, y, S, b, a ? "horizontal" : "vertical", r);
2224
+ let V = Xe(t, p, N, y, S, b, a ? "horizontal" : "vertical"), H = (e, t) => {
2225
+ if (t !== "low" && t !== "high") return V;
2226
+ let n = p.topology.nearDepth, r = V.axisX, i = V.axisY;
1977
2227
  if (e === "value" === a) {
1978
- let e = N.y, r = N.y + N.h, a = u.project(N.x + N.w / 2, e, n), o = u.project(N.x + N.w / 2, r, n), s = a.y >= o.y ? e : r;
2228
+ let e = F.y, r = F.y + F.h, a = p.project(F.x + F.w / 2, e, n), o = p.project(F.x + F.w / 2, r, n), s = a.y >= o.y ? e : r;
1979
2229
  i = t === "low" ? s : s === e ? r : e;
1980
2230
  } else {
1981
- let e = N.x, i = N.x + N.w, a = u.project(e, N.y + N.h / 2, n), o = u.project(i, N.y + N.h / 2, n), s = a.x <= o.x ? e : i;
2231
+ let e = F.x, i = F.x + F.w, a = p.project(e, F.y + F.h / 2, n), o = p.project(i, F.y + F.h / 2, n), s = a.x <= o.x ? e : i;
1982
2232
  r = t === "low" ? s : s === e ? i : e;
1983
2233
  }
1984
2234
  return {
1985
2235
  axisX: r,
1986
2236
  axisY: i,
1987
2237
  depth: n,
1988
- horizontalStart: u.project(N.x, i, n),
1989
- horizontalEnd: u.project(N.x + N.w, i, n),
1990
- verticalStart: u.project(r, N.y + N.h, n),
1991
- verticalEnd: u.project(r, N.y, n)
2238
+ horizontalStart: p.project(F.x, i, n),
2239
+ horizontalEnd: p.project(F.x + F.w, i, n),
2240
+ verticalStart: p.project(r, F.y + F.h, n),
2241
+ verticalEnd: p.project(r, F.y, n)
1992
2242
  };
1993
- }, H = V("value", t.valAxisTickLabelPos), U = V("category", t.catAxisTickLabelPos), G = d(t.valAxisFontSizeHpt, r) ?? 9 * r;
1994
- if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${G}px ${ge(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = a ? "center" : "right", e.textBaseline = a ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
1995
- let { axisX: n, axisY: r, depth: i } = H, o = u.project(N.x + N.w / 2, N.y + N.h / 2, i), s = Be(a ? H.horizontalStart : H.verticalStart, a ? H.horizontalEnd : H.verticalEnd, o, a ? "vertical" : "horizontal");
2243
+ }, U = H("value", t.valAxisTickLabelPos), W = H("category", t.catAxisTickLabelPos), K = d(t.valAxisFontSizeHpt, r) ?? 9 * r;
2244
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${K}px ${Se(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = a ? "center" : "right", e.textBaseline = a ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2245
+ let { axisX: n, axisY: r, depth: i } = U, o = p.project(F.x + F.w / 2, F.y + F.h / 2, i), s = Je(a ? U.horizontalStart : U.verticalStart, a ? U.horizontalEnd : U.verticalEnd, o, a ? "vertical" : "horizontal");
1996
2246
  e.textAlign = Math.abs(s.x) < .2 ? "center" : s.x < 0 ? "right" : "left", e.textBaseline = Math.abs(s.y) < .2 ? "middle" : s.y < 0 ? "bottom" : "top";
1997
- for (let o of j.majorTicks) {
1998
- let l = a ? u.project(N.x + j.fraction(o) * N.w, r, i) : u.project(n, N.y + N.h - j.fraction(o) * N.h, i);
1999
- e.fillText(c(p ? o / 100 : o, p ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), l.x + s.x * 5, l.y + s.y * 5);
2247
+ let l = t.valAxisDisplayUnits?.divisor;
2248
+ for (let o of N.majorTicks) {
2249
+ let u = a ? p.project(F.x + N.fraction(o) * F.w, r, i) : p.project(n, F.y + F.h - N.fraction(o) * F.h, i);
2250
+ e.fillText(c(_ ? o / 100 : l != null && Number.isFinite(l) && l > 0 ? o / l : o, _ ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), u.x + s.x * 5, u.y + s.y * 5);
2000
2251
  }
2001
2252
  }
2002
2253
  let q = d(t.catAxisFontSizeHpt, r) ?? 9 * r;
2003
- if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${q}px ${ge(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2004
- let n = Array.from({ length: g }, (e, n) => l(String(h[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), r = Ee(t);
2005
- if (r == null && (r = 0, !a && g > 1)) {
2006
- let t = Infinity, i = null, a = U.axisY;
2007
- for (let e = 0; e < g; e++) {
2008
- let n = $(e, g, y, _), r = u.project(N.x + n * N.w, a, u.topology.nearDepth);
2254
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${q}px ${Se(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2255
+ let n = Array.from({ length: y }, (e, n) => l(String(v[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), r = Ne(t);
2256
+ if (r == null && (r = 0, !a && y > 1)) {
2257
+ let t = Infinity, i = null, a = W.axisY;
2258
+ for (let e = 0; e < y; e++) {
2259
+ let n = Z(e, y, S, b), r = p.project(F.x + n * F.w, a, p.topology.nearDepth);
2009
2260
  i && (t = Math.min(t, Math.hypot(r.x - i.x, r.y - i.y))), i = r;
2010
2261
  }
2011
2262
  Math.max(0, ...n.map((t) => e.measureText(t).width)) > t * .9 && (r = -Math.PI / 4);
2012
2263
  }
2013
2264
  let i = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2014
- for (let t = 0; t < g; t += i) {
2015
- let i = $(t, g, y, _), { axisX: o, axisY: s, depth: c } = U, l = a ? u.project(o, N.y + $(t, g, y, _) * N.h, c) : u.project(N.x + i * N.w, s, c);
2265
+ for (let t = 0; t < y; t += i) {
2266
+ let i = Z(t, y, S, b), { axisX: o, axisY: s, depth: c } = W, l = a ? p.project(o, F.y + Z(t, y, S, b) * F.h, c) : p.project(F.x + i * F.w, s, c);
2016
2267
  if (a) {
2017
- let r = u.project(o, N.y + N.h / 2, c), i = u.project(N.x + N.w / 2, N.y + N.h / 2, c), a = r.x <= i.x;
2268
+ let r = p.project(o, F.y + F.h / 2, c), i = p.project(F.x + F.w / 2, F.y + F.h / 2, c), a = r.x <= i.x;
2018
2269
  e.textAlign = a ? "right" : "left", e.textBaseline = "middle", e.fillText(n[t], l.x + (a ? -6 : 6), l.y);
2019
2270
  } else {
2020
- let i = u.project(N.x + N.w / 2, N.y + N.h / 2, c), o = Be(U.horizontalStart, U.horizontalEnd, i, "vertical");
2021
- De(e, n[t], l, r, a, o.y < 0 ? -1 : 1);
2271
+ let i = p.project(F.x + F.w / 2, F.y + F.h / 2, c), o = Je(W.horizontalStart, W.horizontalEnd, i, "vertical");
2272
+ Pe(e, n[t], l, r, a, o.y < 0 ? -1 : 1);
2022
2273
  }
2023
2274
  }
2024
2275
  }
2025
- Ne(e, t, n, o, a, r);
2026
- for (let e of F) e();
2027
- return Pe(e, t, s, r), !0;
2276
+ Be(e, t, n, u, a, r);
2277
+ for (let e of L) e();
2278
+ return He(e, t, f, r), !0;
2028
2279
  }
2029
- function Ge(e, t, n, r) {
2280
+ function $e(e, t, n, r) {
2030
2281
  if (!t.threeD || t.chartType !== "pie") return !1;
2031
2282
  let i = t.series[0];
2032
2283
  if (!i) return !0;
@@ -2038,8 +2289,9 @@ function Ge(e, t, n, r) {
2038
2289
  if (!(o > 0)) return !0;
2039
2290
  let s = a.reduce((e, t) => e + t.value / o, 0);
2040
2291
  if (!(s > 0) || !Number.isFinite(s)) return !0;
2041
- let { plot: c, legend: l } = je(e, t, n, r, "radial"), u = O({
2292
+ let { plot: c, legend: l } = Re(e, t, n, r, "radial"), u = A({
2042
2293
  ...t.threeD,
2294
+ rotationY: t.threeD.rotationY ?? 0,
2043
2295
  depthPercent: 100
2044
2296
  }, c, {
2045
2297
  sceneDepthScale: 1,
@@ -2050,62 +2302,78 @@ function Ge(e, t, n, r) {
2050
2302
  for (let e of f.values()) e.explosion != null && Number.isFinite(e.explosion) && (p = Math.max(p, Math.max(0, Math.min(100, e.explosion)) / 100));
2051
2303
  let { scene: m } = u, h = Math.min(m.w * .45 / (1 + p), u.modelDepth * .45 / (1 + p), m.h / .45);
2052
2304
  if (!(h > 0)) return !0;
2053
- let _ = m.x + m.w / 2, x = m.y + m.h / 2, S = h * .3, C = -Math.PI / 2 + ((t.firstSliceAngle != null && Number.isFinite(t.firstSliceAngle) ? t.firstSliceAngle : 0) % 360 + 360) % 360 * Math.PI / 180, w = [], E = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []);
2305
+ let _ = m.x + m.w / 2, v = m.y + m.h / 2, b = .5, S = h * .3, C = 0, T = [], E = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), O = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * h / 4)));
2054
2306
  for (let e of a) {
2055
- let t = e.value / o / s, n = C + t * Math.PI * 2, r = f.get(e.index), a = r?.fillHidden === !0 ? "00000000" : r?.color ?? i.dataPointColors?.[e.index] ?? i.color, c = (C + n) / 2, l = r?.explosion != null && Number.isFinite(r.explosion) ? Math.max(0, Math.min(100, r.explosion)) / 100 : 0, d = _ + Math.cos(c) * h * l, p = .5 + Math.sin(c) * h * l / u.modelDepth, m = I({
2056
- centerX: d,
2057
- centerY: x,
2058
- centerDepth: p,
2307
+ let n = e.value / o / s, r = We(t.firstSliceAngle, C, n), a = f.get(e.index), c = a?.fillHidden === !0 ? "00000000" : a?.color ?? i.dataPointColors?.[e.index] ?? i.color, l = r.middle, d = a?.explosion != null && Number.isFinite(a.explosion) ? Math.max(0, Math.min(100, a.explosion)) / 100 : 0, p = _ + Math.cos(l) * h * d, m = b + Math.sin(l) * h * d / u.modelDepth, g = Math.max(2, Math.ceil(O * n)), y = ee({
2308
+ centerX: p,
2309
+ centerY: v,
2310
+ centerDepth: m,
2059
2311
  radius: h,
2060
2312
  modelDepth: u.modelDepth,
2061
2313
  thickness: S,
2062
- startAngle: C,
2063
- endAngle: n
2314
+ startAngle: r.start,
2315
+ endAngle: r.end,
2316
+ segments: g
2064
2317
  });
2065
- if (!m) {
2066
- C = n;
2318
+ if (!y) {
2319
+ C += n;
2067
2320
  continue;
2068
2321
  }
2069
- w.push({
2322
+ T.push({
2070
2323
  index: e.index,
2071
- start: C,
2072
- end: n,
2073
- color: a === "00000000" ? "transparent" : a ? `#${a}` : fe(e.index),
2324
+ start: r.start,
2325
+ end: r.end,
2326
+ color: c === "00000000" ? "transparent" : c ? `#${c}` : ve(e.index),
2074
2327
  value: e.value,
2075
- percentValue: t,
2076
- centerX: d,
2077
- centerDepth: p,
2078
- mesh: m,
2079
- lineHidden: r?.lineHidden ?? i.lineHidden ?? !1,
2080
- lineColor: r?.lineColor ?? i.lineColor ?? null,
2081
- lineWidthEmu: r?.lineWidthEmu ?? i.lineWidthEmu ?? null,
2082
- lineDash: r?.lineDash ?? i.chartexStyle?.lineDash ?? "solid",
2328
+ percentValue: n,
2329
+ centerX: p,
2330
+ centerDepth: m,
2331
+ segments: g,
2332
+ mesh: y,
2333
+ lineHidden: a?.lineHidden ?? i.lineHidden ?? !1,
2334
+ lineColor: a?.lineColor ?? i.lineColor ?? null,
2335
+ lineWidthEmu: a?.lineWidthEmu ?? i.lineWidthEmu ?? null,
2336
+ lineDash: a?.lineDash ?? i.chartexStyle?.lineDash ?? "solid",
2083
2337
  lineCap: i.chartexStyle?.lineCap === "rnd" ? "round" : i.chartexStyle?.lineCap === "sq" ? "square" : "butt",
2084
2338
  lineJoin: i.chartexStyle?.lineJoin === "round" || i.chartexStyle?.lineJoin === "bevel" ? i.chartexStyle.lineJoin : "miter"
2085
- }), C = n;
2339
+ }), C += n;
2086
2340
  }
2087
- u = T(u, w.flatMap((e) => e.mesh.vertices), c, .08);
2088
- let D = [], k = {
2089
- remaining: K,
2341
+ u = D(u, T.flatMap((e) => e.mesh.vertices), c, .08);
2342
+ let k = [], j = {
2343
+ remaining: te,
2090
2344
  exceeded: !1
2091
- }, A = w.flatMap((e) => {
2092
- let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / v * r);
2093
- return Se(u, e.mesh, e.color, !e.lineHidden && e.lineColor ? {
2345
+ }, M = (e) => {
2346
+ let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / g * r);
2347
+ return !e.lineHidden && e.lineColor ? {
2094
2348
  color: `#${e.lineColor}`,
2095
2349
  width: t,
2096
- dash: b(e.lineDash, t),
2350
+ dash: x(e.lineDash, t),
2097
2351
  cap: e.lineCap,
2098
2352
  join: e.lineJoin
2099
- } : void 0, k);
2100
- });
2101
- if (k.exceeded) return Te(e, n), !0;
2102
- for (let t of W(A)) Ce(e, t);
2103
- for (let n of w) {
2353
+ } : void 0;
2354
+ }, N = T.flatMap((e) => Oe(u, e.mesh, e.color, void 0, j)), P = [], F = T.map(M), I = F[0], L = (e) => e == null ? null : [
2355
+ e.color,
2356
+ e.width,
2357
+ e.dash.join(","),
2358
+ e.cap,
2359
+ e.join
2360
+ ].join("|"), R = I != null && F.every((e) => L(e) === L(I)) && T.every((e) => Math.abs(e.centerX - _) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2361
+ if (R) P.push(...ke(u, T, v, h, S, I, j));
2362
+ else for (let e = 0; e < T.length; e++) {
2363
+ let t = F[e];
2364
+ t && P.push(...Oe(u, T[e].mesh, "transparent", t, j, !0));
2365
+ }
2366
+ if (j.exceeded) return Me(e, n), !0;
2367
+ if (R) {
2368
+ for (let t of G(N)) Ae(e, t);
2369
+ for (let t of G(P)) Ae(e, t);
2370
+ } else for (let t of G([...N, ...P])) Ae(e, t);
2371
+ for (let n of T) {
2104
2372
  let a = (n.start + n.end) / 2, o = E.get(n.index);
2105
- if (Ae(t, i, o)) {
2373
+ if (Le(t, i, o)) {
2106
2374
  let s = i.seriesDataLabels, l = d(o?.fontSizeHpt ?? s?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2107
- e.font = `${o?.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${Q(t, t.dataLabelFontFace)}`;
2108
- let f = y({
2375
+ e.font = `${o?.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${X(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace)}`;
2376
+ let f = w({
2109
2377
  customText: o?.text,
2110
2378
  showCategory: o?.showCatName ?? s?.showCatName ?? !1,
2111
2379
  showSeries: o?.showSerName ?? s?.showSerName ?? !1,
@@ -2118,41 +2386,41 @@ function Ge(e, t, n, r) {
2118
2386
  formatCode: o?.formatCode ?? s?.formatCode ?? t.dataLabelFormatCode ?? i.valFormatCode,
2119
2387
  separator: o?.separator ?? s?.separator,
2120
2388
  date1904: t.date1904
2121
- }), p = Q(t, t.dataLabelFontFace), m = o?.text && o.richRuns?.length ? g(e, {
2389
+ }), p = X(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace), m = o?.text && o.richRuns?.length ? y(e, {
2122
2390
  runs: o.richRuns,
2123
2391
  ptToPx: r,
2124
2392
  fontFamily: p,
2125
2393
  fallbackBold: o.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ?? !1,
2126
- fontFamilyForFace: (e) => Q(t, e)
2127
- }, l, `#${o.fontColor ?? s?.fontColor ?? i.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, _ = o?.position ?? s?.position ?? t.dataLabelPosition, v = x - S / 2, b = x + S / 2, C = u.cameraDepth(n.centerX, v, n.centerDepth) >= u.cameraDepth(n.centerX, b, n.centerDepth) ? v : b, w = 0, T = null;
2394
+ fontFamilyForFace: (e) => X(t, e)
2395
+ }, l, `#${o.fontColor ?? s?.fontColor ?? i.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = o?.position ?? s?.position ?? t.dataLabelPosition, _ = v - S / 2, b = v + S / 2, x = u.cameraDepth(n.centerX, _, n.centerDepth) >= u.cameraDepth(n.centerX, b, n.centerDepth) ? _ : b, C = 0, T = null;
2128
2396
  for (let e = 0; e <= 12; e++) {
2129
- let t = n.start + (n.end - n.start) * e / 12, r = u.project(n.centerX + Math.cos(t) * h * .64, C, n.centerDepth + Math.sin(t) * h * .64 / u.modelDepth);
2130
- T && (w += Math.hypot(r.x - T.x, r.y - T.y)), T = r;
2397
+ let t = n.start + (n.end - n.start) * e / 12, r = u.project(n.centerX + Math.cos(t) * h * .64, x, n.centerDepth + Math.sin(t) * h * .64 / u.modelDepth);
2398
+ T && (C += Math.hypot(r.x - T.x, r.y - T.y)), T = r;
2131
2399
  }
2132
- let E = (_ == null || _ === "bestFit") && (n.percentValue === 0 || w < (m?.width ?? e.measureText(f).width)) || _ === "outEnd", O = h * (E ? 1.12 : .64), k = u.project(n.centerX + Math.cos(a) * O, C, n.centerDepth + Math.sin(a) * O / u.modelDepth), A = u.project(n.centerX + Math.cos(a) * h, C, n.centerDepth + Math.sin(a) * h / u.modelDepth);
2133
- D.push(() => ke(e, t, i, 0, n.index, n.value, k, c, r, 0, n.percentValue, o, "ctr", A, E));
2400
+ let E = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (m?.width ?? e.measureText(f).width)) || g === "outEnd", D = h * (E ? 1.12 : .64), O = u.project(n.centerX + Math.cos(a) * D, x, n.centerDepth + Math.sin(a) * D / u.modelDepth), A = u.project(n.centerX + Math.cos(a) * h, x, n.centerDepth + Math.sin(a) * h / u.modelDepth);
2401
+ k.push(() => Ie(e, t, i, 0, n.index, n.value, O, c, r, 0, n.percentValue, o, "ctr", A, E));
2134
2402
  }
2135
2403
  }
2136
- for (let e of D) e();
2137
- let j = i.categories?.length ? i.categories : t.categories, M = Array.from({ length: j.length }, (e, t) => {
2404
+ for (let e of k) e();
2405
+ let z = i.categories?.length ? i.categories : t.categories, B = Array.from({ length: z.length }, (e, t) => {
2138
2406
  let n = f.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? i.dataPointColors?.[t] ?? i.color;
2139
- return r === "00000000" ? "00000000" : me(r ? `#${r}` : fe(t), .8).replace(/^#/, "");
2407
+ return r === "00000000" ? "00000000" : be(r ? `#${r}` : ve(t), .8).replace(/^#/, "");
2140
2408
  });
2141
- return Pe(e, {
2409
+ return He(e, {
2142
2410
  ...t,
2143
- categories: j,
2411
+ categories: z,
2144
2412
  series: [{
2145
2413
  ...i,
2146
- categories: j,
2147
- dataPointColors: M
2414
+ categories: z,
2415
+ dataPointColors: B
2148
2416
  }]
2149
2417
  }, l, r, !0), !0;
2150
2418
  }
2151
- function Ke(e, t, n, r) {
2152
- return t.threeD ? Ge(e, t, n, r) ? !0 : ue.has(t.chartType) ? We(e, t, n, r) : !1 : !1;
2419
+ function et(e, t, n, r) {
2420
+ return t.threeD ? $e(e, t, n, r) ? !0 : he.has(t.chartType) ? Qe(e, t, n, r) : !1 : !1;
2153
2421
  }
2154
2422
  //#endregion
2155
2423
  //#region src/three-d.ts
2156
- var qe = { render: Ke };
2424
+ var tt = { render: et };
2157
2425
  //#endregion
2158
- export { qe as threeD };
2426
+ export { tt as threeD };