@silurus/ooxml 0.79.0 → 0.80.0

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