@silurus/ooxml 0.88.0 → 0.89.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +118 -23
  2. package/THIRD_PARTY_NOTICES.md +8 -7
  3. package/dist/abort-VrnK7mdP.js +10 -0
  4. package/dist/assets/render-worker-C5G_Nr_A.js +35 -0
  5. package/dist/assets/render-worker-DQfWdNsm.js +16 -0
  6. package/dist/assets/render-worker-Ds7LjwU-.js +15 -0
  7. package/dist/{hyperlink-Cxzhet30.js → bounded-raw-part-cache-CsnNptAy.js} +4937 -7458
  8. package/dist/bundled-asset-url-E2nXURF9.js +15 -0
  9. package/dist/canvas-viewer-mechanics-BZ8QCrRi.js +675 -0
  10. package/dist/cfb-guard-dNeUiANF.js +528 -0
  11. package/dist/chart-ex.mjs +667 -663
  12. package/dist/comment-overlay-controller-CBvQx-En.js +994 -0
  13. package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
  14. package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-BKidRH36.js} +5 -5
  15. package/dist/{comment-ui-runtime-CWGqn5Vr.js → comment-ui-runtime-C47QoDUy.js} +5 -5
  16. package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
  17. package/dist/document-model-source-MzFPrxt0.js +249 -0
  18. package/dist/document-pull-client-BoJeuURD.js +35941 -0
  19. package/dist/document-pull-worker-CaP8XESP.js +104 -0
  20. package/dist/docx-BN70UhvX.js +495 -0
  21. package/dist/docx-BRRtSvk3.js +3563 -0
  22. package/dist/docx-model-source-CTO9iw_W.js +98 -0
  23. package/dist/docx-source-worker.mjs +455 -0
  24. package/dist/docx.mjs +7 -7
  25. package/dist/docx_parser_bg.wasm +0 -0
  26. package/dist/drawingml-shape-CHmq8kpM.js +310 -0
  27. package/dist/duotone-DN8P4aXe.js +126 -0
  28. package/dist/emf-CGFQIz6c.js +1790 -0
  29. package/dist/font-preload-demand-Dmy31xt-.js +2058 -0
  30. package/dist/grid-geometry-C3IG20ut.js +384 -0
  31. package/dist/host-layout-DVMw8hDY.js +56 -0
  32. package/dist/host-layout-measure-DsuQ2UJs.js +7 -0
  33. package/dist/in-process-pull-transport-DuXcPZng.js +29 -0
  34. package/dist/index.mjs +4 -4
  35. package/dist/internal-companion.mjs +12 -0
  36. package/dist/line-distribute-Bu8psjGd.js +2799 -0
  37. package/dist/math.mjs +2 -2
  38. package/dist/mathjax-stix2.js +10 -10
  39. package/dist/model-source-kz_NkZqT.js +179 -0
  40. package/dist/model-source-s5hRpk4w.js +61 -0
  41. package/dist/model-source-session-6fuaqbGs.js +71 -0
  42. package/dist/model-source-session-DqrR4XHR.js +85 -0
  43. package/dist/model-source-session-cPJSF_Ak.js +58 -0
  44. package/dist/node.mjs +7 -1327
  45. package/dist/{pixel-budget-9P63Bsk5.js → pixel-budget-BpTYrepD.js} +13 -10
  46. package/dist/plot-area-frame-Bs_j4uu7.js +41811 -0
  47. package/dist/pptx-CaJ6ILnw.js +183 -0
  48. package/dist/pptx-_BOGcBym.js +2936 -0
  49. package/dist/pptx-model-source-B_9afw9R.js +37 -0
  50. package/dist/pptx-source-worker.mjs +446 -0
  51. package/dist/pptx.mjs +8 -7
  52. package/dist/pptx_parser_bg.wasm +0 -0
  53. package/dist/presentation-model-source-CGHLyX32.js +77 -0
  54. package/dist/raster-target-YQ4G6rxo.js +42 -0
  55. package/dist/region-map.mjs +117 -153
  56. package/dist/{render-D3iqVKCo.js → render-CzbDzRKa.js} +3 -3
  57. package/dist/{render-worker-host-B5wQfB7U.js → render-worker-host-B1u6BOUd.js} +1 -1
  58. package/dist/{render-worker-host-D4123J27.js → render-worker-host-C-EECo68.js} +1 -1
  59. package/dist/{render-worker-host-Di3LxLc0.js → render-worker-host-DDqZTCVf.js} +1 -1
  60. package/dist/renderer-CD2cvVAF.js +5823 -0
  61. package/dist/renderer-DRoeb14O.js +5170 -0
  62. package/dist/resource-measurement-Dhhm7P_l.js +772 -0
  63. package/dist/session-XPmC0CUd.js +656 -0
  64. package/dist/slide-pull-client-tq7U_fYg.js +6485 -0
  65. package/dist/three-d-BKwNPAP4.js +878 -0
  66. package/dist/three-d.mjs +925 -910
  67. package/dist/{raster-target-ojDdQizC.js → tiff-contract-C6M3QcPp.js} +1 -42
  68. package/dist/tiff.mjs +401 -248
  69. package/dist/types/chart-ex.d.ts +149 -2
  70. package/dist/types/docx.d.ts +333 -96
  71. package/dist/types/index.d.ts +566 -301
  72. package/dist/types/internal-companion.d.ts +11 -0
  73. package/dist/types/math.d.ts +1 -1
  74. package/dist/types/node.d.ts +422 -9
  75. package/dist/types/pptx.d.ts +302 -95
  76. package/dist/types/region-map.d.ts +149 -2
  77. package/dist/types/three-d.d.ts +149 -2
  78. package/dist/types/tiff.d.ts +1 -1
  79. package/dist/types/xlsx.d.ts +343 -132
  80. package/dist/wasm-loader-rlgHmcSv.js +35 -0
  81. package/dist/wasm-runtime-generation-D6TKZdNb.js +97 -0
  82. package/dist/workbook-model-source-BIGrfZy6.js +94 -0
  83. package/dist/worker-source-DrwhR9fw.js +22 -0
  84. package/dist/worker-source-SbudzjYL.js +22 -0
  85. package/dist/worker-source-UAi3GNcM.js +22 -0
  86. package/dist/worksheet-pull-client-ClvPO_Jf.js +579 -0
  87. package/dist/xlsx-CsmREBaZ.js +5819 -0
  88. package/dist/xlsx-DmHfeNNp.js +534 -0
  89. package/dist/xlsx-model-source-D1flORqy.js +309 -0
  90. package/dist/xlsx-source-worker.mjs +525 -0
  91. package/dist/xlsx.mjs +8 -7
  92. package/dist/xlsx_parser_bg.wasm +0 -0
  93. package/package.json +42 -16
  94. package/dist/assets/render-worker-1uPAxMZr.js +0 -31
  95. package/dist/assets/render-worker-BlvJybji.js +0 -10
  96. package/dist/assets/render-worker-CzmiJfFL.js +0 -11
  97. package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +0 -119
  98. package/dist/canvas-viewer-mechanics-DbLz0rYW.js +0 -1384
  99. package/dist/cjk-fallback-bLI3z70h.js +0 -46
  100. package/dist/comment-occurrence-C8Y2uoVr.js +0 -6
  101. package/dist/comment-ui-runtime-BsK8pmUT.js +0 -2
  102. package/dist/comments-Diid5ujN.js +0 -246
  103. package/dist/delimited-text-worker-host-BVY-Ecni.js +0 -27
  104. package/dist/document-pull-client-B9PTM-pL.js +0 -27280
  105. package/dist/docx-BF9WXrYH.js +0 -3103
  106. package/dist/dom-interaction-boundary-Cnm8DSBN.js +0 -223
  107. package/dist/highlight-rect-C5hkRqUr.js +0 -13
  108. package/dist/line-distribute-D1WNHKz_.js +0 -1023
  109. package/dist/line-metrics-B60C86uh.js +0 -60
  110. package/dist/plot-area-frame-DLTYKHNP.js +0 -4354
  111. package/dist/pptx-DkyYBYoL.js +0 -3065
  112. package/dist/renderer-B4GZb5We.js +0 -6492
  113. package/dist/resource-measurement-SHQCbkh2.js +0 -150
  114. package/dist/session-BGq81gRQ.js +0 -743
  115. package/dist/slide-pull-client-DiPnm240.js +0 -6253
  116. package/dist/source-key-DIJG8BA0.js +0 -42
  117. package/dist/three-d-DJBl8g8M.js +0 -1162
  118. package/dist/transfer-p6iCC2R7.js +0 -6
  119. package/dist/units-BzZ0gAxs.js +0 -4
  120. package/dist/worksheet-pull-client-BM8ywvbu.js +0 -458
  121. package/dist/xlsx-C9NVjgaV.js +0 -8484
  122. /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
  123. /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
  124. /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
  125. /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
  126. /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
  127. /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
package/dist/three-d.mjs CHANGED
@@ -1,27 +1,29 @@
1
- import { $ as e, $n as t, $t as n, An as r, B as i, Bn as a, Cn as o, D as s, Dn as c, En as l, Gt as u, H as d, Hn as f, In as p, Kt as m, Ln as h, Mn as g, O as _, Pn as v, Qn as y, Rn as b, Tn as x, Un as S, V as C, W as w, Wn as T, Xn as E, Yt as D, Zn as O, _n as k, ar as A, bn as j, dn as M, dr as N, er as P, et as F, fn as I, gn as L, gt as R, hn as z, i as B, ir as V, jn as H, m as ee, mn as U, pn as te, pr as W, qt as G, rr as K, sr as q, t as J, tt as ne, u as Y, ur as re, vn as ie, vt as ae, wn as oe, xn as se, yt as ce, z as le } from "./plot-area-frame-DLTYKHNP.js";
2
- import { a as ue, r as X } from "./units-BzZ0gAxs.js";
3
- import { T as de, a as fe, c as pe, h as me, i as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, t as Se, u as Ce, w as we, y as Te } from "./three-d-DJBl8g8M.js";
4
- import { t as Ee } from "./renderer-module-contract-D91rkYHH.js";
1
+ import { $a as e, Ba as t, Bi as n, Ca as r, Cn as i, Fi as a, Ga as o, Ha as s, Ii as c, Ja as l, Ji as u, Ka as d, Ki as f, Li as p, Ln as m, Nt as h, Ot as g, Pi as _, Ra as v, Ri as y, Rn as b, Rr as x, Sa as S, Si as C, Ui as w, Va as T, Vi as E, Wa as D, Wi as O, Xi as k, Yi as A, Zi as j, _a as M, bn as N, ca as P, da as F, ea as I, eo as L, fa as R, gi as z, ha as B, hi as V, ia as H, ja as U, ka as W, l as ee, la as G, ma as K, mi as te, n as q, na as ne, no as J, oa as Y, on as X, pa as re, qi as Z, qt as ie, sa as ae, sn as oe, sr as se, t as ce, ta as le, v as ue, va as de, vi as fe, vn as pe, xa as me, xn as he, xt as ge, ya as _e, yn as ve, za as ye, zi as be, zn as xe, zr as Se } from "./plot-area-frame-Bs_j4uu7.js";
2
+ import { a as Ce, c as we, i as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, y as Fe } from "./three-d-BKwNPAP4.js";
3
+ import { t as Ie } from "./renderer-module-contract-CWM7jv6d.js";
5
4
  //#region packages/core/src/chart/three-d-datum-style.ts
6
- function De(e, t, n, r) {
7
- return re(e, r) ? n : t.chartexFormatIdx ?? r;
8
- }
9
- function Oe(e, t, n, r, i) {
10
- let a = De(e, t, r, i), o = q(e, "dataPoint3D", i), s = W(e, "dataPoint3D"), c = E(n?.chartexStyle, s, r);
11
- if (c !== void 0) return c;
12
- if (n?.fillHidden === !0) {
13
- let e = y(s);
5
+ function Le(t, n, r, i) {
6
+ return e(t, i) ? r : n.chartexFormatIdx ?? i;
7
+ }
8
+ function Re(e, n, r, i, a) {
9
+ let o = Le(e, n, i, a), c = l(e, "dataPoint3D", a), u = J(e, "dataPoint3D"), d = v(r?.chartexStyle, u, i);
10
+ if (d !== void 0) return d;
11
+ if (r?.fillHidden === !0) {
12
+ let e = t(u);
14
13
  if (e !== void 0) return e;
15
14
  }
16
- if (n?.color === "00000000") return null;
17
- if (n?.color) return {
15
+ if (r?.color === "00000000") return null;
16
+ if (r?.color) return {
18
17
  fillType: "solid",
19
- color: n.color
18
+ color: r.color
20
19
  };
21
- let l = E(t.chartexStyle, s, a);
22
- return l === void 0 ? P(o, s, a, n?.chartexStyle, t.chartexStyle) : l;
20
+ let f = v(n.chartexStyle, u, o);
21
+ return f === void 0 ? s(c, u, o, r?.chartexStyle, n.chartexStyle) : f;
23
22
  }
24
- function ke(e) {
23
+ //#endregion
24
+ //#region packages/core/src/chart/three-d-mesh.ts
25
+ var ze = 32;
26
+ function Be(e) {
25
27
  switch (e) {
26
28
  case "cylinder":
27
29
  case "cone":
@@ -31,8 +33,8 @@ function ke(e) {
31
33
  default: return "box";
32
34
  }
33
35
  }
34
- var Ae = (e) => Math.max(0, Math.min(1, e));
35
- function je(e, t) {
36
+ var Ve = (e) => Math.max(0, Math.min(1, e));
37
+ function He(e, t) {
36
38
  if (t.length < 3) return null;
37
39
  let n = e[t[0]];
38
40
  for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
@@ -57,7 +59,7 @@ function je(e, t) {
57
59
  }
58
60
  return null;
59
61
  }
60
- function Me(e, t) {
62
+ function Ue(e, t) {
61
63
  let n = e.reduce((t, n) => ({
62
64
  x: t.x + n.x / e.length,
63
65
  y: t.y + n.y / e.length,
@@ -68,7 +70,7 @@ function Me(e, t) {
68
70
  depth: 0
69
71
  });
70
72
  return t.map((t) => {
71
- let r = je(e, t.indices);
73
+ let r = He(e, t.indices);
72
74
  if (!r) return t;
73
75
  let i = t.indices.reduce((n, r) => ({
74
76
  x: n.x + e[r].x / t.indices.length,
@@ -89,7 +91,7 @@ function Me(e, t) {
89
91
  };
90
92
  });
91
93
  }
92
- function Ne(e) {
94
+ function We(e) {
93
95
  let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
94
96
  if (![
95
97
  n,
@@ -99,7 +101,7 @@ function Ne(e) {
99
101
  o,
100
102
  s
101
103
  ].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
102
- let c = ke(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 = Ae(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = Ae(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
104
+ let c = Be(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 ?? ze))) : 4, p = Ve(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = Ve(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
103
105
  if (p === 0 && m === 0) return null;
104
106
  let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
105
107
  if (n === 0) {
@@ -166,11 +168,11 @@ function Ne(e) {
166
168
  return {
167
169
  shape: c,
168
170
  vertices: y,
169
- faces: Me(y, w),
171
+ faces: Ue(y, w),
170
172
  silhouetteEdges: T
171
173
  };
172
174
  }
173
- function Pe(e) {
175
+ function Ge(e) {
174
176
  let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
175
177
  if (![
176
178
  t,
@@ -230,7 +232,7 @@ function Pe(e) {
230
232
  return {
231
233
  shape: "areaStrip",
232
234
  vertices: _,
233
- faces: Me(_, [
235
+ faces: Ue(_, [
234
236
  {
235
237
  indices: [
236
238
  0,
@@ -295,17 +297,17 @@ function Pe(e) {
295
297
  silhouetteEdges: []
296
298
  };
297
299
  }
298
- function Fe(e) {
300
+ function Ke(e) {
299
301
  let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
300
302
  if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
301
303
  let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
302
- return [Pe({
304
+ return [Ge({
303
305
  ...e,
304
306
  x1: i,
305
307
  lower1: a,
306
308
  upper1: a,
307
309
  capEnd: !1
308
- }), Pe({
310
+ }), Ge({
309
311
  ...e,
310
312
  x0: i,
311
313
  lower0: a,
@@ -313,10 +315,10 @@ function Fe(e) {
313
315
  capStart: !1
314
316
  })].filter((e) => e != null);
315
317
  }
316
- let r = Pe(e);
318
+ let r = Ge(e);
317
319
  return r ? [r] : [];
318
320
  }
319
- function Ie(e) {
321
+ function qe(e) {
320
322
  let t = e.outline;
321
323
  if (t.length < 3 || t.length > 64 || ![e.nearDepth, e.farDepth].every(Number.isFinite) || Math.abs(e.nearDepth - e.farDepth) < 1e-9 || !t.every((e) => Number.isFinite(e.x) && Number.isFinite(e.y))) return null;
322
324
  let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
@@ -329,7 +331,7 @@ function Ie(e) {
329
331
  return {
330
332
  shape: "lineRibbon",
331
333
  vertices: a,
332
- faces: Me(a, [
334
+ faces: Ue(a, [
333
335
  {
334
336
  indices: o,
335
337
  role: "side",
@@ -357,7 +359,7 @@ function Ie(e) {
357
359
  silhouetteEdges: []
358
360
  };
359
361
  }
360
- function Le(e) {
362
+ function Je(e) {
361
363
  let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
362
364
  if (![
363
365
  t,
@@ -369,7 +371,7 @@ function Le(e) {
369
371
  s,
370
372
  c
371
373
  ].every(Number.isFinite) || !(i > 0) || !(a > 0) || !(o > 0) || !(c > s)) return null;
372
- 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 = [{
374
+ 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(ze * l / (Math.PI * 2))))), f = n - o / 2, p = n + o / 2, m = [{
373
375
  x: t,
374
376
  y: f,
375
377
  depth: r
@@ -449,13 +451,13 @@ function Le(e) {
449
451
  return {
450
452
  shape: "pieSector",
451
453
  vertices: m,
452
- faces: Me(m, v),
454
+ faces: Ue(m, v),
453
455
  silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
454
456
  };
455
457
  }
456
458
  //#endregion
457
459
  //#region packages/core/src/chart/three-d-scene.ts
458
- function Re(e, t) {
460
+ function Ye(e, t) {
459
461
  if (![e, t].every(Number.isFinite)) return null;
460
462
  let n = t - e;
461
463
  if (n === 0) return e >= 0 && e <= 1 ? {
@@ -468,7 +470,7 @@ function Re(e, t) {
468
470
  endT: o
469
471
  } : null;
470
472
  }
471
- function ze(e, t, n, r) {
473
+ function Xe(e, t, n, r) {
472
474
  if (![
473
475
  e,
474
476
  t,
@@ -497,12 +499,12 @@ function ze(e, t, n, r) {
497
499
  }
498
500
  return l;
499
501
  }
500
- var Be = (e) => ({
502
+ var Ze = (e) => ({
501
503
  minX: Math.min(...e.map((e) => e.x)),
502
504
  maxX: Math.max(...e.map((e) => e.x)),
503
505
  minY: Math.min(...e.map((e) => e.y)),
504
506
  maxY: Math.max(...e.map((e) => e.y))
505
- }), Ve = (e, t) => {
507
+ }), Qe = (e, t) => {
506
508
  let n = !1;
507
509
  for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
508
510
  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));
@@ -510,7 +512,7 @@ var Be = (e) => ({
510
512
  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);
511
513
  }
512
514
  return n;
513
- }, He = (e, t, n, r) => {
515
+ }, $e = (e, t, n, r) => {
514
516
  let i = {
515
517
  x: t.x - e.x,
516
518
  y: t.y - e.y
@@ -528,23 +530,23 @@ var Be = (e) => ({
528
530
  y: e.y + i.y * c
529
531
  };
530
532
  };
531
- function Ue(e, t, n, r) {
533
+ function et(e, t, n, r) {
532
534
  let i = [], a = (e) => {
533
535
  i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
534
536
  }, o = {
535
537
  x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
536
538
  y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
537
539
  };
538
- Ve(e, o) && Ve(t, o) && a(o);
539
- for (let n of e) Ve(t, n) && a(n);
540
- for (let n of t) Ve(e, n) && a(n);
540
+ Qe(e, o) && Qe(t, o) && a(o);
541
+ for (let n of e) Qe(t, n) && a(n);
542
+ for (let n of t) Qe(e, n) && a(n);
541
543
  for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
542
- let i = He(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
544
+ let i = $e(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
543
545
  i && a(i);
544
546
  }
545
547
  return i;
546
548
  }
547
- function We(e, t) {
549
+ function tt(e, t) {
548
550
  let n = e.cameraDepths;
549
551
  if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
550
552
  let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
@@ -558,17 +560,17 @@ function We(e, t) {
558
560
  }
559
561
  return e.cameraDepth;
560
562
  }
561
- function Ge(e) {
563
+ function nt(e) {
562
564
  if (e.length < 2) return [...e];
563
- let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => Be(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;
565
+ let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => Ze(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;
564
566
  for (let c of r) {
565
567
  for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
566
568
  for (let r of o) {
567
569
  if (++s > 2e5) return t.map((t) => e[t]);
568
570
  if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
569
- let o = Ue(e[r].points, e[c].points, n[r], n[c]), l = 0;
571
+ let o = et(e[r].points, e[c].points, n[r], n[c]), l = 0;
570
572
  for (let t of o) {
571
- let n = We(e[r], t) - We(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
573
+ let n = tt(e[r], t) - tt(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
572
574
  if (Math.abs(n) <= i) continue;
573
575
  let a = n < 0 ? -1 : 1;
574
576
  if (l !== 0 && l !== a) {
@@ -594,29 +596,29 @@ function Ge(e) {
594
596
  }
595
597
  //#endregion
596
598
  //#region packages/core/src/chart/three-d-stroke.ts
597
- var Z = 1e-9, Ke = 1e4, qe = (e, t, n) => ({
599
+ var Q = 1e-9, rt = 1e4, it = (e, t, n) => ({
598
600
  x: e.x + (t.x - e.x) * n,
599
601
  y: e.y + (t.y - e.y) * n,
600
602
  cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
601
603
  cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
602
- }), Je = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Z;
603
- function Ye(e, t, n = 0) {
604
- let r = t.filter((e) => Number.isFinite(e) && e > Z);
604
+ }), at = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Q;
605
+ function ot(e, t, n = 0) {
606
+ let r = t.filter((e) => Number.isFinite(e) && e > Q);
605
607
  if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
606
608
  r.length % 2 == 1 && r.push(...r);
607
- let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Z && Number.isFinite(n) ? (n % c + c) % c : 0;
608
- for (; l > Z;) {
609
+ let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Q && Number.isFinite(n) ? (n % c + c) % c : 0;
610
+ for (; l > Q;) {
609
611
  let e = Math.min(l, o);
610
- l -= e, o -= e, o <= Z && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
612
+ l -= e, o -= e, o <= Q && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
611
613
  }
612
614
  let u = null;
613
615
  for (let t = 0; t + 1 < e.length; t++) {
614
616
  let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
615
- if (!(l > Z)) continue;
617
+ if (!(l > Q)) continue;
616
618
  let d = 0;
617
- for (; d < l - Z;) {
618
- let e = Math.min(o, l - d), t = qe(n, c, d / l), f = qe(n, c, (d + e) / l);
619
- if (s && (u ??= [], (u.length === 0 || !Je(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Z) {
619
+ for (; d < l - Q;) {
620
+ let e = Math.min(o, l - d), t = it(n, c, d / l), f = it(n, c, (d + e) / l);
621
+ if (s && (u ??= [], (u.length === 0 || !at(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Q) {
620
622
  if (s && u && u.length >= 2) {
621
623
  if (i.length >= 1e4) return null;
622
624
  i.push(u);
@@ -629,13 +631,13 @@ function Ye(e, t, n = 0) {
629
631
  if (i.length >= 1e4) return null;
630
632
  i.push(u);
631
633
  }
632
- if (i.length > 1 && Je(e[0], e.at(-1)) && Je(i[0][0], e[0]) && Je(i.at(-1).at(-1), e.at(-1))) {
634
+ if (i.length > 1 && at(e[0], e.at(-1)) && at(i[0][0], e[0]) && at(i.at(-1).at(-1), e.at(-1))) {
633
635
  let e = i.shift(), t = i.pop();
634
636
  i.unshift([...t, ...e.slice(1)]);
635
637
  }
636
638
  return i;
637
639
  }
638
- var Xe = (e, t) => ({
640
+ var st = (e, t) => ({
639
641
  kind: e,
640
642
  points: t.map(({ x: e, y: t }) => ({
641
643
  x: e,
@@ -644,7 +646,7 @@ var Xe = (e, t) => ({
644
646
  cameraDepths: t.map((e) => e.cameraDepth),
645
647
  cameraWeights: t.map((e) => e.cameraWeight ?? 1),
646
648
  cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
647
- }), Ze = (e, t, n) => {
649
+ }), ct = (e, t, n) => {
648
650
  let r = [];
649
651
  for (let n = 0; n < 12; n++) {
650
652
  let i = Math.PI * 2 * n / 12;
@@ -654,17 +656,17 @@ var Xe = (e, t) => ({
654
656
  y: e.y + Math.sin(i) * t
655
657
  });
656
658
  }
657
- return Xe(n, r);
659
+ return st(n, r);
658
660
  };
659
- function Qe(e, t, n) {
661
+ function lt(e, t, n) {
660
662
  let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
661
- if (!(r > Z) || t.length < 3) return null;
663
+ if (!(r > Q) || t.length < 3) return null;
662
664
  let i = r / 2;
663
- if ((n.lineJoin ?? "miter") === "round") return Ze(e, i, "join");
665
+ if ((n.lineJoin ?? "miter") === "round") return ct(e, i, "join");
664
666
  let a = [];
665
667
  for (let n of t) {
666
668
  let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
667
- if (!(o > Z)) continue;
669
+ if (!(o > Q)) continue;
668
670
  let s = -r / o * i, c = t / o * i;
669
671
  a.push({
670
672
  ...e,
@@ -680,20 +682,20 @@ function Qe(e, t, n) {
680
682
  a.sort((e, t) => e.x - t.x || e.y - t.y);
681
683
  let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
682
684
  for (let e of a) {
683
- for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Z;) s.pop();
685
+ for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Q;) s.pop();
684
686
  s.push(e);
685
687
  }
686
688
  let c = [];
687
689
  for (let e of [...a].reverse()) {
688
- for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Z;) c.pop();
690
+ for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Q;) c.pop();
689
691
  c.push(e);
690
692
  }
691
693
  let l = [...s.slice(0, -1), ...c.slice(0, -1)];
692
- return l.length >= 3 ? Xe("join", l) : null;
694
+ return l.length >= 3 ? st("join", l) : null;
693
695
  }
694
- var $e = (e, t, n, r) => {
696
+ var ut = (e, t, n, r) => {
695
697
  let i = t.x * r.y - t.y * r.x;
696
- if (Math.abs(i) <= Z) return null;
698
+ if (Math.abs(i) <= Q) return null;
697
699
  let a = {
698
700
  x: n.x - e.x,
699
701
  y: n.y - e.y
@@ -703,17 +705,17 @@ var $e = (e, t, n, r) => {
703
705
  y: e.y + t.y * o
704
706
  };
705
707
  };
706
- function et(e, t) {
708
+ function dt(e, t) {
707
709
  let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
708
- if (!(n > Z) || e.length < 2) return [];
709
- let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = Ye(e, t.dash ?? [], t.dashOffset);
710
+ if (!(n > Q) || e.length < 2) return [];
711
+ let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = ot(e, t.dash ?? [], t.dashOffset);
710
712
  if (c == null) return null;
711
713
  let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
712
714
  for (let n = 0; n < c.length; n++) {
713
- let s = c[n], u = s.length > 2 && Je(s[0], s.at(-1)), d = n === 0 && Je(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && Je(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
715
+ let s = c[n], u = s.length > 2 && at(s[0], s.at(-1)), d = n === 0 && at(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && at(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
714
716
  for (let e = 0; e + 1 < s.length; e++) {
715
717
  let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
716
- p.push(r > Z ? {
718
+ p.push(r > Q ? {
717
719
  x: (n.x - t.x) / r,
718
720
  y: (n.y - t.y) / r
719
721
  } : null);
@@ -733,7 +735,7 @@ function et(e, t) {
733
735
  x: s[e + 1].x + n.x * _,
734
736
  y: s[e + 1].y + n.y * _
735
737
  };
736
- if (!l(Xe("segment", [
738
+ if (!l(st("segment", [
737
739
  {
738
740
  ...v,
739
741
  x: v.x + i.x,
@@ -756,12 +758,12 @@ function et(e, t) {
756
758
  }
757
759
  ]))) return null;
758
760
  }
759
- if (!u && d === "round" && !l(Ze(s[0], r, "cap")) || !u && f === "round" && !l(Ze(s.at(-1), r, "cap"))) return null;
761
+ if (!u && d === "round" && !l(ct(s[0], r, "cap")) || !u && f === "round" && !l(ct(s.at(-1), r, "cap"))) return null;
760
762
  let m = (e, t, n) => {
761
763
  if (!t || !n) return !0;
762
764
  let i = t.x * n.y - t.y * n.x;
763
- if (Math.abs(i) <= Z) return !0;
764
- if (a === "round") return l(Ze(e, r, "join"));
765
+ if (Math.abs(i) <= Q) return !0;
766
+ if (a === "round") return l(ct(e, r, "join"));
765
767
  let s = i > 0 ? -1 : 1, c = {
766
768
  ...e,
767
769
  x: e.x + -t.y * r * s,
@@ -772,8 +774,8 @@ function et(e, t) {
772
774
  y: e.y + n.x * r * s
773
775
  };
774
776
  if (a === "miter") {
775
- let i = $e(c, t, u, n);
776
- if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Xe("join", [
777
+ let i = ut(c, t, u, n);
778
+ if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(st("join", [
777
779
  c,
778
780
  {
779
781
  ...e,
@@ -782,7 +784,7 @@ function et(e, t) {
782
784
  u
783
785
  ]));
784
786
  }
785
- return l(Xe("join", [
787
+ return l(st("join", [
786
788
  c,
787
789
  e,
788
790
  u
@@ -795,30 +797,30 @@ function et(e, t) {
795
797
  }
796
798
  //#endregion
797
799
  //#region packages/core/src/chart/three-d-outline.ts
798
- var tt = 1e-9, nt = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= tt, rt = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, it = (e, t) => {
800
+ var ft = 1e-9, pt = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= ft, mt = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, ht = (e, t) => {
799
801
  let n = Math.min(e.length, t.length);
800
802
  for (let r = 0; r < n; r++) {
801
- let n = rt(e[r], t[r]);
803
+ let n = mt(e[r], t[r]);
802
804
  if (n !== 0) return n;
803
805
  }
804
806
  return e.length - t.length;
805
807
  };
806
- function at(e) {
808
+ function gt(e) {
807
809
  let t = [...e].reverse();
808
- return it(e, t) <= 0 ? e : t;
810
+ return ht(e, t) <= 0 ? e : t;
809
811
  }
810
- function ot(e) {
811
- let t = nt(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
812
+ function _t(e) {
813
+ let t = pt(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
812
814
  if (t.length === 0) return [];
813
815
  let n = 0;
814
- for (let e = 1; e < t.length; e++) rt(t[e], t[n]) < 0 && (n = e);
815
- let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = it(r, i) <= 0 ? r : i;
816
+ for (let e = 1; e < t.length; e++) mt(t[e], t[n]) < 0 && (n = e);
817
+ let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = ht(r, i) <= 0 ? r : i;
816
818
  return [...a, a[0]];
817
819
  }
818
- function st(e) {
820
+ function vt(e) {
819
821
  let t = [], n = (e) => {
820
- let n = t.find((t) => nt(t.point, e));
821
- if (n) return rt(e, n.point) < 0 && (n.point = e), n;
822
+ let n = t.find((t) => pt(t.point, e));
823
+ if (n) return mt(e, n.point) < 0 && (n.point = e), n;
822
824
  let r = {
823
825
  point: e,
824
826
  edges: [],
@@ -827,11 +829,11 @@ function st(e) {
827
829
  return t.push(r), r;
828
830
  }, r = [];
829
831
  for (let [t, i] of e) {
830
- if (nt(t, i)) continue;
832
+ if (pt(t, i)) continue;
831
833
  let e = n(t), a = n(i);
832
834
  e !== a && r.push([e, a]);
833
835
  }
834
- t.sort((e, t) => rt(e.point, t.point)), t.forEach((e, t) => {
836
+ t.sort((e, t) => mt(e.point, t.point)), t.forEach((e, t) => {
835
837
  e.order = t;
836
838
  });
837
839
  let i = [], a = /* @__PURE__ */ new Set();
@@ -859,47 +861,47 @@ function st(e) {
859
861
  }
860
862
  return n;
861
863
  }, c = [];
862
- for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(at(s(e, t)));
864
+ for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(gt(s(e, t)));
863
865
  for (let e = 0; e < i.length; e++) {
864
866
  if (o.has(e)) continue;
865
867
  let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
866
- c.push(ot(s(n, e)));
868
+ c.push(_t(s(n, e)));
867
869
  }
868
870
  let l = t.filter((e) => e.edges.length > 2).map((e) => ({
869
871
  point: e.point,
870
872
  neighbours: e.edges.map((t) => {
871
873
  let n = i[t];
872
874
  return n.first === e ? n.second.point : n.first.point;
873
- }).sort(rt)
875
+ }).sort(mt)
874
876
  }));
875
877
  return {
876
- paths: c.sort(it),
878
+ paths: c.sort(ht),
877
879
  junctions: l
878
880
  };
879
881
  }
880
882
  //#endregion
881
883
  //#region packages/core/src/chart/three-d-renderer.ts
882
- function ct(e) {
884
+ function yt(e) {
883
885
  let t = /* @__PURE__ */ new Map();
884
886
  for (let n of e.legendEntries ?? []) t.set(n.idx, n);
885
887
  return t;
886
888
  }
887
- function lt(e, t, n) {
888
- let r = v(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
889
+ function bt(e, t, n) {
890
+ let r = H(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
889
891
  return {
890
892
  fontPx: r,
891
- font: `${t?.fontItalic ?? e.legendFontItalic ?? !1 ? "italic " : ""}${a ? "bold " : ""}${r}px ${Tt(i)}`,
893
+ font: `${t?.fontItalic ?? e.legendFontItalic ?? !1 ? "italic " : ""}${a ? "bold " : ""}${r}px ${Lt(e, i)}`,
892
894
  color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
893
895
  };
894
896
  }
895
- var ut = [
897
+ var xt = [
896
898
  "4472C4",
897
899
  "ED7D31",
898
900
  "70AD47",
899
901
  "A5A5A5",
900
902
  "FFC000",
901
903
  "5B9BD5"
902
- ], dt = _, ft = s, pt = new Set([
904
+ ], St = oe, Ct = X, wt = new Set([
903
905
  "line",
904
906
  "stackedLine",
905
907
  "stackedLinePct",
@@ -913,11 +915,11 @@ var ut = [
913
915
  "stackedBarPct",
914
916
  "stackedBarHPct"
915
917
  ]);
916
- function mt(e, t) {
917
- let n = Number.isFinite(t) && t > 0 ? t / ue : 1, r = Number.isFinite(e) && e >= 0 ? e / X : 0;
918
+ function Tt(e, t) {
919
+ let n = Number.isFinite(t) && t > 0 ? t / U : 1, r = Number.isFinite(e) && e >= 0 ? e / W : 0;
918
920
  return Math.max(.25, r) * n;
919
921
  }
920
- function ht(e, t) {
922
+ function Et(e, t) {
921
923
  let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
922
924
  for (let t of e) {
923
925
  let e = t.categoryIndex;
@@ -925,18 +927,18 @@ function ht(e, t) {
925
927
  }
926
928
  return r;
927
929
  }
928
- var gt = (e, t) => `#${t?.color ?? ut[e % ut.length]}`;
929
- function _t(e, t, n) {
930
+ var Dt = (e, t) => `#${t?.color ?? xt[e % xt.length]}`;
931
+ function Ot(e, t, n) {
930
932
  let r = 0;
931
933
  for (let i of e) for (let e of [t(i), n(i)]) {
932
934
  if (e == null) continue;
933
- let t = D(e);
934
- if (e.fillType === "gradient" && t > dt || t > ft - r) return !1;
935
+ let t = fe(e);
936
+ if (e.fillType === "gradient" && t > St || t > Ct - r) return !1;
935
937
  r += t;
936
938
  }
937
939
  return !0;
938
940
  }
939
- function vt(e, t) {
941
+ function kt(e, t) {
940
942
  let n = Array.from({ length: t }, () => ({
941
943
  maxMagnitude: 0,
942
944
  scaledTotal: 0
@@ -951,7 +953,7 @@ function vt(e, t) {
951
953
  }
952
954
  return n;
953
955
  }
954
- function yt(e, t, n, r) {
956
+ function At(e, t, n, r) {
955
957
  let i = e.series[t]?.values[n] ?? 0;
956
958
  if (!Number.isFinite(i)) return 0;
957
959
  if (!r) return i;
@@ -961,18 +963,18 @@ function yt(e, t, n, r) {
961
963
  };
962
964
  return a > 0 && o > 0 ? i / a / o * 100 : 0;
963
965
  }
964
- function bt(e, t) {
966
+ function jt(e, t) {
965
967
  let n = e + t;
966
968
  return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
967
969
  }
968
- function xt(e) {
970
+ function Mt(e) {
969
971
  let t = [];
970
972
  for (let [n, r] of [
971
973
  [e.threeD?.floor, "floor"],
972
974
  [e.threeD?.sideWall, "wall"],
973
975
  [e.threeD?.backWall, "wall"]
974
976
  ]) {
975
- let i = A(e, n, r);
977
+ let i = d(e, n, r);
976
978
  t.push({
977
979
  fill: i.fill,
978
980
  line: i.line
@@ -985,7 +987,7 @@ function xt(e) {
985
987
  for (let i = 0; i < n.values.length; i++) {
986
988
  let a = n.values[i];
987
989
  if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
988
- let o = Q(e, n, r.get(i), i, 0);
990
+ let o = $(e, n, r.get(i), i, 0);
989
991
  t.push({
990
992
  fill: o.fill,
991
993
  line: o.lineFill
@@ -993,7 +995,7 @@ function xt(e) {
993
995
  }
994
996
  }
995
997
  } else if (e.chartType === "clusteredBar" || e.chartType === "clusteredBarH" || e.chartType.startsWith("stackedBar")) {
996
- let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ? vt(e, o) : void 0, c = (t, n) => {
998
+ let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ? kt(e, o) : void 0, c = (t, n) => {
997
999
  if (t === n) return !1;
998
1000
  let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
999
1001
  return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
@@ -1003,9 +1005,9 @@ function xt(e) {
1003
1005
  for (let p = 0; p < o; p++) {
1004
1006
  let o = d.values[p];
1005
1007
  if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
1006
- let m = yt(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = bt(h, m);
1008
+ let m = At(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = jt(h, m);
1007
1009
  if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
1008
- let _ = Q(e, d, f.get(p), p, r);
1010
+ let _ = $(e, d, f.get(p), p, r);
1009
1011
  t.push({
1010
1012
  fill: _.fill,
1011
1013
  line: _.lineFill
@@ -1013,11 +1015,11 @@ function xt(e) {
1013
1015
  }
1014
1016
  }
1015
1017
  } else {
1016
- let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ? vt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
1018
+ let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ? kt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
1017
1019
  if (r) {
1018
1020
  let t = Array(s).fill(0), n = Array(s).fill(0);
1019
1021
  for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
1020
- let a = yt(e, r, i, c), o = bt(a >= 0 ? t[i] : n[i], a);
1022
+ let a = At(e, r, i, c), o = jt(a >= 0 ? t[i] : n[i], a);
1021
1023
  l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
1022
1024
  }
1023
1025
  }
@@ -1027,12 +1029,12 @@ function xt(e) {
1027
1029
  let f = u.values[s];
1028
1030
  if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
1029
1031
  p++;
1030
- let a = r ? l[i][s] : yt(e, i, s, c), o = m == null ? a : Math.min(m, a), f = m == null ? a : Math.max(m, a), _ = e.valMin != null && Number.isFinite(e.valMin) && f <= e.valMin || e.valMax != null && Number.isFinite(e.valMax) && o >= e.valMax;
1032
+ let a = r ? l[i][s] : At(e, i, s, c), o = m == null ? a : Math.min(m, a), f = m == null ? a : Math.max(m, a), _ = e.valMin != null && Number.isFinite(e.valMin) && f <= e.valMin || e.valMax != null && Number.isFinite(e.valMax) && o >= e.valMax;
1031
1033
  if (p >= 2 && (n || u.smooth === !0 || !_)) {
1032
1034
  if (h = !0, n) break;
1033
1035
  let r = d.get(s);
1034
- if (Ct(r)) {
1035
- let n = Q(e, u, r, s, i);
1036
+ if (Pt(r)) {
1037
+ let n = $(e, u, r, s, i);
1036
1038
  t.push({
1037
1039
  fill: void 0,
1038
1040
  line: n.lineFill
@@ -1043,7 +1045,7 @@ function xt(e) {
1043
1045
  } else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
1044
1046
  }
1045
1047
  if (!h) continue;
1046
- let _ = Q(e, u, void 0, i, i);
1048
+ let _ = $(e, u, void 0, i, i);
1047
1049
  n ? t.push({
1048
1050
  fill: _.fill,
1049
1051
  line: _.lineFill
@@ -1053,9 +1055,9 @@ function xt(e) {
1053
1055
  });
1054
1056
  }
1055
1057
  }
1056
- return _t(t, (e) => e.fill, (e) => e.line);
1058
+ return Ot(t, (e) => e.fill, (e) => e.line);
1057
1059
  }
1058
- function St(e, t) {
1060
+ function Nt(e, t) {
1059
1061
  return e?.fillType === "solid" ? {
1060
1062
  color: `#${e.color}`,
1061
1063
  fill: void 0
@@ -1064,44 +1066,44 @@ function St(e, t) {
1064
1066
  fill: e
1065
1067
  };
1066
1068
  }
1067
- function Q(e, n, r, i, a, o = !0) {
1068
- let s = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : gt(a, n), c = re(e, a) ? i : n.chartexFormatIdx ?? a, l = n.seriesType ?? e.chartType, u = l === "line" || l === "stackedLine" || l === "stackedLinePct", d = q(e, "dataPoint3D", a), f = W(e, "dataPoint3D"), p, m = s, h = Oe(e, n, r, i, a);
1069
- h !== void 0 && ({color: m, fill: p} = St(h, m));
1070
- let g, _ = null, v = O(r?.chartexStyle, f, i);
1071
- if (v === void 0 && r?.lineHidden === !0 && (v = t(f)), v !== void 0) v?.fillType === "solid" ? _ = `#${v.color}` : g = v;
1072
- else if (r?.lineColor) _ = `#${r.lineColor}`;
1069
+ function $(t, n, r, i, a, o = !0) {
1070
+ let s = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : Dt(a, n), c = e(t, a) ? i : n.chartexFormatIdx ?? a, u = n.seriesType ?? t.chartType, d = u === "line" || u === "stackedLine" || u === "stackedLinePct", f = l(t, "dataPoint3D", a), p = J(t, "dataPoint3D"), m, h = s, g = Re(t, n, r, i, a);
1071
+ g !== void 0 && ({color: h, fill: m} = Nt(g, h));
1072
+ let _, v = null, y = ye(r?.chartexStyle, p, i);
1073
+ if (y === void 0 && r?.lineHidden === !0 && (y = T(p)), y !== void 0) y?.fillType === "solid" ? v = `#${y.color}` : _ = y;
1074
+ else if (r?.lineColor) v = `#${r.lineColor}`;
1073
1075
  else {
1074
- let e = O(n.chartexStyle, f, c);
1075
- if (e === void 0 && n.lineHidden === !0 && (e = t(f)), e !== void 0) e?.fillType === "solid" ? _ = `#${e.color}` : g = e;
1076
- else if (n.lineColor) _ = `#${n.lineColor}`;
1077
- else if (u) g = p === null ? null : p;
1076
+ let e = ye(n.chartexStyle, p, c);
1077
+ if (e === void 0 && n.lineHidden === !0 && (e = T(p)), e !== void 0) e?.fillType === "solid" ? v = `#${e.color}` : _ = e;
1078
+ else if (n.lineColor) v = `#${n.lineColor}`;
1079
+ else if (d) _ = m === null ? null : m;
1078
1080
  else {
1079
- let e = K(d, f, c, r?.chartexStyle, n.chartexStyle);
1080
- e !== void 0 && (e?.fillType === "solid" ? _ = `#${e.color}` : g = e);
1081
+ let e = D(f, p, c, r?.chartexStyle, n.chartexStyle);
1082
+ e !== void 0 && (e?.fillType === "solid" ? v = `#${e.color}` : _ = e);
1081
1083
  }
1082
1084
  }
1083
- let y = u ? void 0 : d, b = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? y?.lineCap, x = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? y?.lineJoin, S = N(r?.lineDash == null ? r?.chartexStyle : {
1085
+ let b = d ? void 0 : f, x = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? b?.lineCap, S = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? b?.lineJoin, C = L(r?.lineDash == null ? r?.chartexStyle : {
1084
1086
  lineDash: r.lineDash,
1085
1087
  lineDashAuthored: !0
1086
- }, n.chartexStyle, y);
1088
+ }, n.chartexStyle, b);
1087
1089
  return {
1088
- color: m,
1089
- fill: p,
1090
- lineColor: _,
1091
- lineFill: g,
1092
- lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? y?.lineWidthEmu,
1093
- lineDash: S?.lineDash,
1094
- lineCustomDash: S?.lineCustomDash,
1095
- lineCap: b === "rnd" ? "round" : b === "sq" ? "square" : "butt",
1096
- lineJoin: x === "round" || x === "bevel" ? x : "miter"
1090
+ color: h,
1091
+ fill: m,
1092
+ lineColor: v,
1093
+ lineFill: _,
1094
+ lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? b?.lineWidthEmu,
1095
+ lineDash: C?.lineDash,
1096
+ lineCustomDash: C?.lineCustomDash,
1097
+ lineCap: x === "rnd" ? "round" : x === "sq" ? "square" : "butt",
1098
+ lineJoin: S === "round" || S === "bevel" ? S : "miter"
1097
1099
  };
1098
1100
  }
1099
- function Ct(e) {
1101
+ function Pt(e) {
1100
1102
  if (!e) return !1;
1101
1103
  let t = e.chartexStyle;
1102
1104
  return e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || e.lineDash != null || t?.linePaintAuthored === !0 || t?.lineHidden != null || t?.lineNoStyle === !0 || t?.lineColors?.some((e) => e != null) === !0 || t?.linePaints?.some((e) => e != null) === !0 || t?.lineWidthEmu != null || t?.lineDash != null || t?.lineCustomDash != null || t?.lineCap != null || t?.lineJoin != null;
1103
1105
  }
1104
- function wt(e, t) {
1106
+ function Ft(e, t) {
1105
1107
  let n = e.cameraNormal(t);
1106
1108
  if (!n) return 1;
1107
1109
  let r = {
@@ -1111,20 +1113,20 @@ function wt(e, t) {
1111
1113
  }, 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);
1112
1114
  return Math.max(.78, Math.min(1, .78 + .24 * a));
1113
1115
  }
1114
- var Tt = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, $ = (e, t, n = "minor") => Tt((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1115
- function Et(e, t) {
1116
+ var It = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Lt = (e, t) => It(ge(e, t)), Rt = (e, t, n = "minor") => It((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1117
+ function zt(e, t) {
1116
1118
  if (t.length) {
1117
1119
  e.beginPath(), e.moveTo(t[0].x, t[0].y);
1118
1120
  for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1119
1121
  e.closePath();
1120
1122
  }
1121
1123
  }
1122
- var Dt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1123
- function Ot(e, t, n, r) {
1124
- Dt(n) || (Et(e, t), e.fillStyle = n, e.fill(), r > 0 && (Et(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1124
+ var Bt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1125
+ function Vt(e, t, n, r) {
1126
+ Bt(n) || (zt(e, t), e.fillStyle = n, e.fill(), r > 0 && (zt(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1125
1127
  }
1126
- function kt(e, t, n, r, i, a, o, s, c, l, u, d) {
1127
- return Fe({
1128
+ function Ht(e, t, n, r, i, a, o, s, c, l, u, d) {
1129
+ return Ke({
1128
1130
  x0: t,
1129
1131
  x1: n,
1130
1132
  lower0: r,
@@ -1135,13 +1137,13 @@ function kt(e, t, n, r, i, a, o, s, c, l, u, d) {
1135
1137
  farDepth: c,
1136
1138
  capStart: u,
1137
1139
  capEnd: d
1138
- }).flatMap((t) => jt(e, t, l).map((e) => ({
1140
+ }).flatMap((t) => Wt(e, t, l).map((e) => ({
1139
1141
  ...e,
1140
1142
  outline: !1,
1141
1143
  outlineSegments: void 0
1142
1144
  })));
1143
1145
  }
1144
- function At(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1146
+ function Ut(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1145
1147
  if (![
1146
1148
  r,
1147
1149
  i,
@@ -1152,7 +1154,7 @@ function At(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1152
1154
  l,
1153
1155
  u
1154
1156
  ].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
1155
- let v = Ne({
1157
+ let v = We({
1156
1158
  shape: t,
1157
1159
  horizontal: n,
1158
1160
  crossStart: n ? i : r,
@@ -1166,9 +1168,9 @@ function At(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1166
1168
  omitBaseCap: m,
1167
1169
  omitEndCap: h
1168
1170
  });
1169
- return v ? jt(e, v, d, g, _) : [];
1171
+ return v ? Wt(e, v, d, g, _) : [];
1170
1172
  }
1171
- function jt(e, t, n, r, i, a = !1) {
1173
+ function Wt(e, t, n, r, i, a = !1) {
1172
1174
  if (i?.exceeded) return [];
1173
1175
  let o = t.faces.map((r) => {
1174
1176
  let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
@@ -1190,7 +1192,7 @@ function jt(e, t, n, r, i, a = !1) {
1190
1192
  facing: a,
1191
1193
  face: {
1192
1194
  points: o,
1193
- color: Ce(n, wt(e, i)),
1195
+ color: Ne(n, Ft(e, i)),
1194
1196
  paintRole: "fill",
1195
1197
  shade: 0,
1196
1198
  cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
@@ -1227,11 +1229,11 @@ function jt(e, t, n, r, i, a = !1) {
1227
1229
  let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
1228
1230
  for (let [e, n] of t) l(e, n);
1229
1231
  }
1230
- let p = st([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1232
+ let p = vt([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1231
1233
  if (!r) return s;
1232
1234
  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));
1233
1235
  for (let t of p.paths) {
1234
- 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 = et(n.map((e, t) => ({
1236
+ 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 = dt(n.map((e, t) => ({
1235
1237
  ...e,
1236
1238
  cameraDepth: a[t],
1237
1239
  cameraWeight: o[t]
@@ -1261,7 +1263,7 @@ function jt(e, t, n, r, i, a = !1) {
1261
1263
  }));
1262
1264
  }
1263
1265
  for (let t of p.junctions) {
1264
- let n = Qe({
1266
+ let n = lt({
1265
1267
  ...e.project(t.point.x, t.point.y, t.point.depth),
1266
1268
  cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
1267
1269
  cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
@@ -1290,7 +1292,7 @@ function jt(e, t, n, r, i, a = !1) {
1290
1292
  }
1291
1293
  return s;
1292
1294
  }
1293
- function Mt(e, t, n, r, i, a, o) {
1295
+ function Gt(e, t, n, r, i, a, o) {
1294
1296
  if (!t.length || o.exceeded) return [];
1295
1297
  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) => ({
1296
1298
  x: t.centerX + Math.cos(n) * r,
@@ -1302,7 +1304,7 @@ function Mt(e, t, n, r, i, a, o) {
1302
1304
  depth: e.centerDepth
1303
1305
  }), h = [], g = (t, n = !1) => {
1304
1306
  if (t.length < 2 || o.exceeded) return;
1305
- 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 = et((n && !s ? [...t, r] : [...t]).map((t) => ({
1307
+ 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 = dt((n && !s ? [...t, r] : [...t]).map((t) => ({
1306
1308
  ...e.project(t.x, t.y, t.depth),
1307
1309
  cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1308
1310
  cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
@@ -1382,10 +1384,10 @@ function Mt(e, t, n, r, i, a, o) {
1382
1384
  for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
1383
1385
  return h;
1384
1386
  }
1385
- function Nt(e, t) {
1386
- t.paint !== null && (t.paint === void 0 ? Ot(e, t.points, t.color, t.shade) : (Et(e, t.points), e.fillStyle = t.paint, e.fill()), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(ce(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (Et(e, t.points), e.stroke()), e.setLineDash([])));
1387
+ function Kt(e, t) {
1388
+ t.paint !== null && (t.paint === void 0 ? Vt(e, t.points, t.color, t.shade) : (zt(e, t.points), e.fillStyle = t.paint, e.fill()), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(Se(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (zt(e, t.points), e.stroke()), e.setLineDash([])));
1387
1389
  }
1388
- function Pt(e, t) {
1390
+ function qt(e, t) {
1389
1391
  let n = t.filter((e) => e.paint !== null && e.points.length >= 3);
1390
1392
  if (n.length) {
1391
1393
  e.beginPath();
@@ -1397,7 +1399,7 @@ function Pt(e, t) {
1397
1399
  e.fillStyle = "#000000", e.fill();
1398
1400
  }
1399
1401
  }
1400
- function Ft(e, t, n, r, i) {
1402
+ function Jt(e, t, n, r, i) {
1401
1403
  if (r === void 0) return;
1402
1404
  let a = t.filter((e) => e.paintRole === n);
1403
1405
  if (!a.length) return;
@@ -1405,38 +1407,45 @@ function Ft(e, t, n, r, i) {
1405
1407
  for (let e of a) e.paint = null;
1406
1408
  return;
1407
1409
  }
1408
- let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d = R(r, e, s, l, c - s, u - l, i);
1410
+ let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d = se(r, e, s, l, c - s, u - l, i);
1409
1411
  for (let e of a) e.paint = d;
1410
1412
  }
1411
- function It(e, t) {
1413
+ function Yt(e, t) {
1412
1414
  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);
1413
1415
  }
1414
- function Lt(e) {
1416
+ function Xt(e) {
1415
1417
  let t = e.catAxisLabelRotation;
1416
1418
  return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
1417
1419
  }
1418
- function Rt(e, t, n, r, i, a = 1, o = 6) {
1420
+ function Zt(e) {
1421
+ return Math.max(e * 1.2, 10);
1422
+ }
1423
+ function Qt(e, t) {
1424
+ let n = Math.max(1, ...e.map(R));
1425
+ return n > 1 ? (n - 1) * Zt(t) : 0;
1426
+ }
1427
+ function $t(e, t, n, r, i, a = 1, o = 6, s = 0) {
1419
1428
  if (i || r === 0) {
1420
- e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", e.fillText(t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o));
1429
+ e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", B(e, t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o), s);
1421
1430
  return;
1422
1431
  }
1423
- e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
1432
+ e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", B(e, t, 0, 0, s), e.restore();
1424
1433
  }
1425
- function zt(e, t, n, r, i, a, o, s = void 0, c = 0, l = ue, u = void 0, d = void 0, f = 0, p = f, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0) {
1434
+ function en(e, t, n, r, i, a, o, s = void 0, c = 0, l = U, u = void 0, d = void 0, f = 0, p = f, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0) {
1426
1435
  if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1427
1436
  let y = r / 2;
1428
1437
  if (u !== void 0 || d !== void 0) {
1429
- F(e, u, d, f, {
1438
+ b(e, u, d, f, {
1430
1439
  x: t.x - y,
1431
1440
  y: t.y - y,
1432
1441
  w: r,
1433
1442
  h: r
1434
- }, l, (e) => zt(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, m, h, g, _, v), p);
1443
+ }, l, (e) => en(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, m, h, g, _, v), p);
1435
1444
  return;
1436
1445
  }
1437
1446
  e.beginPath();
1438
- let b = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : R(m, e, t.x - y, t.y - y, r, r, c);
1439
- switch (b && (e.strokeStyle = b, e.lineWidth = o, e.setLineDash(ae(g, h, o)), e.lineCap = _ === "rnd" ? "round" : _ === "sq" ? "square" : "butt", e.lineJoin = v === "round" || v === "bevel" ? v : "miter"), n) {
1447
+ let S = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : se(m, e, t.x - y, t.y - y, r, r, c);
1448
+ switch (S && (e.strokeStyle = S, e.lineWidth = o, e.setLineDash(x(g, h, o)), e.lineCap = _ === "rnd" ? "round" : _ === "sq" ? "square" : "butt", e.lineJoin = v === "round" || v === "bevel" ? v : "miter"), n) {
1440
1449
  case "square":
1441
1450
  e.rect(t.x - y, t.y - y, r, r);
1442
1451
  break;
@@ -1449,7 +1458,7 @@ function zt(e, t, n, r, i, a, o, s = void 0, c = 0, l = ue, u = void 0, d = void
1449
1458
  case "x":
1450
1459
  case "plus": {
1451
1460
  let r = n === "x";
1452
- e.moveTo(t.x - y, t.y + (r ? -y : 0)), e.lineTo(t.x + y, t.y + (r ? y : 0)), e.moveTo(t.x + (r ? -y : 0), t.y + y), e.lineTo(t.x + (r ? y : 0), t.y - y), b && e.stroke();
1461
+ e.moveTo(t.x - y, t.y + (r ? -y : 0)), e.lineTo(t.x + y, t.y + (r ? y : 0)), e.moveTo(t.x + (r ? -y : 0), t.y + y), e.lineTo(t.x + (r ? y : 0), t.y - y), S && e.stroke();
1453
1462
  return;
1454
1463
  }
1455
1464
  case "dash":
@@ -1466,323 +1475,329 @@ function zt(e, t, n, r, i, a, o, s = void 0, c = 0, l = ue, u = void 0, d = void
1466
1475
  e.ellipse(t.x, t.y, r * .25, r * .1, 0, 0, Math.PI * 2);
1467
1476
  break;
1468
1477
  case "picture":
1469
- s?.fillType === "image" && Y(e, s, t.x - y, t.y - y, r, r, l, c), b && e.strokeRect(t.x - y, t.y - y, r, r);
1478
+ s?.fillType === "image" && ue(e, s, t.x - y, t.y - y, r, r, l, c), S && e.strokeRect(t.x - y, t.y - y, r, r);
1470
1479
  return;
1471
1480
  default:
1472
1481
  e.arc(t.x, t.y, y, 0, Math.PI * 2);
1473
1482
  break;
1474
1483
  }
1475
- let x = s?.fillType === "image" ? s : void 0, S = x ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : R(s, e, t.x - y, t.y - y, r, r, c);
1476
- S == null ? x && (e.save(), e.clip(), Y(e, x, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = S, e.fill()), b && e.stroke();
1477
- }
1478
- function Bt(e, t, n, r, a, o, s, c, l, u = 0, d, f, p = "t", m = s, h = !0, g, _, y = o, b = 0) {
1479
- let x = f, S = n.seriesDataLabels;
1480
- if (U(S, x) || t.showDataLabelsOverMax !== !0 && _ != null && Number.isFinite(_) && y > _) return;
1481
- let w = x?.showVal ?? S?.showVal ?? t.showDataLabels, T = x?.showCatName ?? S?.showCatName ?? !1, E = x?.showSerName ?? S?.showSerName ?? !1, D = x?.showPercent ?? S?.showPercent ?? !1, O = x?.text, A = C({
1482
- customText: O,
1483
- showCategory: T,
1484
- showSeries: E,
1485
- showValue: w,
1486
- showPercent: D,
1487
- category: n.categories?.[a] ?? t.categories[a] ?? `${a + 1}`,
1488
- seriesName: n.name || `Series ${r + 1}`,
1489
- sourceValue: o,
1490
- valueDivisor: g?.divisor,
1491
- percentRatio: d != null && Number.isFinite(d) ? d : void 0,
1492
- formatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1493
- percentFormatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1484
+ let C = s?.fillType === "image" ? s : void 0, w = C ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : se(s, e, t.x - y, t.y - y, r, r, c);
1485
+ w == null ? C && (e.save(), e.clip(), ue(e, C, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = w, e.fill()), S && e.stroke();
1486
+ }
1487
+ function tn(e, t, r, i, o, s, l, u, d, f = 0, m, h, g = "t", v = l, b = !0, x, S, C = s, w = 0) {
1488
+ let T = h, D = r.seriesDataLabels;
1489
+ if (p(D, T) || t.showDataLabelsOverMax !== !0 && S != null && Number.isFinite(S) && C > S) return;
1490
+ let k = T?.showVal ?? D?.showVal ?? t.showDataLabels, A = T?.showCatName ?? D?.showCatName ?? !1, j = T?.showSerName ?? D?.showSerName ?? !1, M = T?.showPercent ?? D?.showPercent ?? !1, P = T?.text, F = N({
1491
+ customText: P,
1492
+ showCategory: A,
1493
+ showSeries: j,
1494
+ showValue: k,
1495
+ showPercent: M,
1496
+ category: r.categories?.[o] ?? t.categories[o] ?? `${o + 1}`,
1497
+ seriesName: r.name || `Series ${i + 1}`,
1498
+ sourceValue: s,
1499
+ valueDivisor: x?.divisor,
1500
+ percentRatio: m != null && Number.isFinite(m) ? m : void 0,
1501
+ formatCode: T?.formatCode ?? D?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1502
+ percentFormatCode: T?.formatCode ?? D?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1494
1503
  date1904: t.date1904,
1495
- separator: x?.separator ?? S?.separator
1504
+ separator: T?.separator ?? D?.separator
1496
1505
  });
1497
- if (!A) return;
1498
- let j = v(x?.fontSizeHpt ?? S?.fontSizeHpt ?? t.dataLabelFontSizeHpt, l) ?? 9 * l, N = x?.fontBold ?? S?.fontBold ?? t.dataLabelFontBold ?? !1, P = z(x, S), F = $(t, x?.fontFace ?? S?.fontFace ?? t.dataLabelFontFace);
1499
- e.font = `${P.fontItalic ? "italic " : ""}${N ? "bold " : ""}${j}px ${F}`;
1500
- let R = `#${x?.fontColor ?? S?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, B = O && x?.richRuns?.length ? ge(e, {
1501
- runs: x.richRuns,
1502
- ptToPx: l,
1503
- fontFamily: F,
1504
- fallbackBold: N,
1505
- fallbackItalic: P.fontItalic,
1506
- fallbackBaseline: P.fontBaseline,
1507
- fallbackColorHidden: P.fontPaintAuthored === !0 && (P.fontHidden === !0 || P.fontColor == null),
1508
- fontFamilyForFace: (e) => $(t, e)
1509
- }, j, R) : null, V = B ? [] : L(A, Math.max(j, c.w * .45), Math.max(j * 1.2, c.h * .35), j * 1.2, (t) => e.measureText(t).width, P);
1510
- if (!B && !V.length) return;
1511
- let H = B?.width ?? Math.max(...V.map((t) => e.measureText(t).width)), ee = B?.height ?? V.length * j * 1.2, W = te(P, l), G = k(H + W.left + W.right, ee + W.top + W.bottom, P.textRotation, P.textVerticalMode), K = se({
1506
+ if (!F) return;
1507
+ let I = H(T?.fontSizeHpt ?? D?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, L = T?.fontBold ?? D?.fontBold ?? t.dataLabelFontBold ?? !1, R = y(T, D), z = Rt(t, T?.fontFace ?? D?.fontFace ?? t.dataLabelFontFace);
1508
+ e.font = `${R.fontItalic ? "italic " : ""}${L ? "bold " : ""}${I}px ${z}`;
1509
+ let B = `#${T?.fontColor ?? D?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, V = P && T?.richRuns?.length ? Fe(e, {
1510
+ runs: T.richRuns,
1511
+ ptToPx: d,
1512
+ fontFamily: z,
1513
+ fallbackBold: L,
1514
+ fallbackItalic: R.fontItalic,
1515
+ fallbackBaseline: R.fontBaseline,
1516
+ fallbackColorHidden: R.fontPaintAuthored === !0 && (R.fontHidden === !0 || R.fontColor == null),
1517
+ fontFamilyForFace: (e) => Rt(t, e)
1518
+ }, I, B) : null, U = V ? [] : be(F, Math.max(I, u.w * .45), Math.max(I * 1.2, u.h * .35), I * 1.2, (t) => e.measureText(t).width, R);
1519
+ if (!V && !U.length) return;
1520
+ let ee = V?.width ?? Math.max(...U.map((t) => e.measureText(t).width)), G = V?.height ?? U.length * I * 1.2, K = c(R, d), te = n(ee + K.left + K.right, G + K.top + K.bottom, R.textRotation, R.textVerticalMode), q = O({
1512
1521
  kind: "point",
1513
- x: s.x,
1514
- y: s.y,
1515
- position: x?.position ?? S?.position ?? t.dataLabelPosition ?? p,
1516
- markerGap: u
1517
- }, c, {
1518
- w: G.w,
1519
- h: G.h
1520
- }, j, x?.manualLayout, c);
1521
- if (!K) return;
1522
- let q = le(x?.labelBox, S?.labelBox);
1523
- S?.showLeaderLines && S.leaderLineHidden !== !0 && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(K.rect.x, Math.min(m.x, K.rect.x + K.rect.w)), Math.max(K.rect.y, Math.min(m.y, K.rect.y + K.rect.h))), e.strokeStyle = `#${S.leaderLineColor ?? "808080"}`, e.lineWidth = S.leaderLineWidthEmu == null ? .75 * l : Math.max(.25, S.leaderLineWidthEmu / X * l), e.setLineDash(ce(S.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), i(e, q, K.rect, l, b), e.save(), e.beginPath(), e.rect(K.clip.x, K.clip.y, K.clip.w, K.clip.h), e.clip();
1524
- let J = I(P, K.textAlign), ne = M(K.x, K.y, K.rect, ee + W.top + W.bottom, P, x?.manualLayout != null, J, K.textAlign, H + W.left + W.right, G.radians), Y = ie(e, ne.x, ne.y, G.radians, J, K.textBaseline, W);
1525
- if (B) {
1526
- ye(e, B, Y.x, Y.y, J, K.textBaseline, x?.manualLayout ? Math.max(0, K.rect.w - W.left - W.right) : B.width), e.restore();
1522
+ x: l.x,
1523
+ y: l.y,
1524
+ position: T?.position ?? D?.position ?? t.dataLabelPosition ?? g,
1525
+ markerGap: f
1526
+ }, u, {
1527
+ w: te.w,
1528
+ h: te.h
1529
+ }, I, T?.manualLayout, u);
1530
+ if (!q) return;
1531
+ let ne = pe(T?.labelBox, D?.labelBox);
1532
+ D?.showLeaderLines && D.leaderLineHidden !== !0 && b && (e.beginPath(), e.moveTo(v.x, v.y), e.lineTo(Math.max(q.rect.x, Math.min(v.x, q.rect.x + q.rect.w)), Math.max(q.rect.y, Math.min(v.y, q.rect.y + q.rect.h))), e.strokeStyle = `#${D.leaderLineColor ?? "808080"}`, e.lineWidth = D.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, D.leaderLineWidthEmu / W * d), e.setLineDash(Se(D.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ve(e, ne, q.rect, d, w), e.save(), e.beginPath(), e.rect(q.clip.x, q.clip.y, q.clip.w, q.clip.h), e.clip();
1533
+ let J = a(R, q.textAlign), Y = _(q.x, q.y, q.rect, G + K.top + K.bottom, R, T?.manualLayout != null, J, q.textAlign, ee + K.left + K.right, te.radians), X = E(e, Y.x, Y.y, te.radians, J, q.textBaseline, K);
1534
+ if (V) {
1535
+ Pe(e, V, X.x, X.y, J, q.textBaseline, T?.manualLayout ? Math.max(0, q.rect.w - K.left - K.right) : V.width), e.restore();
1527
1536
  return;
1528
1537
  }
1529
- if (!(P.fontPaintAuthored === !0 && (P.fontHidden === !0 || P.fontColor == null))) {
1530
- e.fillStyle = R, e.textAlign = J, e.textBaseline = "middle";
1531
- let t = j * 1.2, n = (P.fontBaseline ?? 0) * j, r = Y.y - (V.length - 1) * t / 2 - n;
1532
- V.forEach((n, i) => e.fillText(n, Y.x, r + i * t));
1538
+ if (!(R.fontPaintAuthored === !0 && (R.fontHidden === !0 || R.fontColor == null))) {
1539
+ e.fillStyle = B, e.textAlign = J, e.textBaseline = "middle";
1540
+ let t = I * 1.2, n = (R.fontBaseline ?? 0) * I, r = X.y - (U.length - 1) * t / 2 - n;
1541
+ U.forEach((n, i) => e.fillText(n, X.x, r + i * t));
1533
1542
  }
1534
1543
  e.restore();
1535
1544
  }
1536
- function Vt(e, t, n) {
1545
+ function nn(e, t, n) {
1537
1546
  let r = t.seriesDataLabels;
1538
- return U(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1547
+ return p(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1539
1548
  }
1540
- function Ht(e, t, n, i, a, o) {
1541
- let s = c(t, n.h, i);
1549
+ function rn(e, t, n, r, i, a) {
1550
+ let o = j(t, n.h, r), s = t.titleRichRuns?.length ? {
1551
+ ...o,
1552
+ bandH: o.bandH + G(t.title, o.fontPx)
1553
+ } : o;
1542
1554
  if (t.title) {
1543
- e.font = `${t.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${Tt(t.titleFontFace)}`, e.fillStyle = t.titleFontColor ? `#${t.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1544
- let r = e.measureText(t.title).width, i = {
1555
+ e.font = `${t.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${Lt(t, t.titleFontFace)}`, e.fillStyle = t.titleFontColor ? `#${t.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1556
+ let r = M(e, t.title), i = {
1545
1557
  x: n.x + (n.w - r) / 2,
1546
1558
  y: n.y + s.topPad,
1547
1559
  w: r,
1548
- h: Math.max(1, s.fontPx)
1549
- }, a = t.titleManualLayout ? b({
1560
+ h: Math.max(1, s.fontPx) + G(t.title, s.fontPx)
1561
+ }, a = t.titleManualLayout ? P({
1550
1562
  ...t.titleManualLayout,
1551
1563
  w: void 0,
1552
1564
  h: void 0
1553
1565
  }, n, i) : null;
1554
- e.fillText(t.title, a ? a.x + a.w / 2 : n.x + n.w / 2, a?.y ?? i.y);
1566
+ B(e, t.title, a ? a.x + a.w / 2 : n.x + n.w / 2, a?.y ?? i.y, s.fontPx);
1555
1567
  }
1556
- let u = ct(t);
1568
+ let c = yt(t);
1557
1569
  e.save();
1558
- let d = (t.chartType === "pie" ? t.series[0]?.categories?.length ? t.series[0].categories : t.categories : t.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => u.get(t)?.deleted === !0 ? [] : [{
1570
+ let l = (t.chartType === "pie" ? t.series[0]?.categories?.length ? t.series[0].categories : t.categories : t.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => c.get(t)?.deleted === !0 ? [] : [{
1559
1571
  label: e,
1560
1572
  index: t
1561
- }]), f = d.map((e) => lt(t, u.get(e.index), i)), m = Math.max(0, ...f.map((e) => e.fontPx)), h = d.map((t, n) => (e.font = f[n].font, 7 * i + 4 + e.measureText(t.label).width)), _ = g(t, n.w, n.h, .23, {
1562
- itemWidths: h,
1563
- rowHeight: Math.max(m * 1.45, 12),
1573
+ }]), d = l.map((e) => bt(t, c.get(e.index), r)), p = Math.max(0, ...d.map((e) => e.fontPx)), m = l.map((t, n) => (e.font = d[n].font, 7 * r + 4 + M(e, t.label))), h = ne(t, n.w, n.h, {
1574
+ itemWidths: m,
1575
+ rowHeight: Math.max(p * 1.45, 12) + Qt(l.map((e) => e.label), p),
1564
1576
  itemGap: 12,
1565
1577
  horizontalPadding: 8,
1566
1578
  verticalPadding: 4
1567
1579
  });
1568
1580
  e.restore();
1569
- let v = H(_, t.legendOverlay === !0), y = r(t, n.w, n.h, i), x = l(t.catAxisTitleTextVerticalInsetEmu, i), S = l(t.valAxisTitleTextVerticalInsetEmu, i), C = a === "horizontal" ? t.catAxisTitle ? y.catFontPx + x + oe(n.w) + 4 : 0 : a === "vertical" ? y.valBandW : 0, w = a === "horizontal" ? t.valAxisTitle ? y.valFontPx + S + oe(n.h) + 4 : 0 : a === "vertical" ? y.catBandH : 0, T = p(t, n.x, n.y, n.w, n.h, i, {
1581
+ let g = le(h, t.legendOverlay === !0), _ = I(t, n.w, n.h, r), v = k(t.catAxisTitleTextVerticalInsetEmu, r), y = k(t.valAxisTitleTextVerticalInsetEmu, r), b = i === "horizontal" ? t.catAxisTitle ? _.catFontPx + v + u(n.w) + 4 + f(t.catAxisTitle, _.catFontPx, "left", t.catAxisTitleRotation, t.catAxisTitleVerticalMode) : 0 : i === "vertical" ? _.valBandW : 0, x = i === "horizontal" ? t.valAxisTitle ? _.valFontPx + y + u(n.h) + 4 + f(t.valAxisTitle, _.valFontPx, "horizontal", t.valAxisTitleRotation, t.valAxisTitleVerticalMode) : 0 : i === "vertical" ? _.catBandH : 0, S = Y(t, n.x, n.y, n.w, n.h, r, {
1570
1582
  titleBand: s,
1571
- legendSideReserveFrac: .23,
1572
- legendReserve: _,
1583
+ legendReserve: h,
1573
1584
  pad: {
1574
- t: s.bandH + v.legTopH + n.h * .04,
1575
- r: v.legRightW + n.w * .05,
1576
- b: v.legBottomH + n.h * .19 + w,
1577
- l: v.legLeftW + n.w * .13 + C
1585
+ t: s.bandH + g.legTopH + n.h * .04,
1586
+ r: g.legRightW + n.w * .05,
1587
+ b: g.legBottomH + n.h * .19 + x,
1588
+ l: g.legLeftW + n.w * .13 + b
1578
1589
  },
1579
1590
  honorPlotAreaManualLayout: !0,
1580
1591
  manualOuterInsets: {
1581
1592
  t: s.bandH,
1582
- r: v.legRightW,
1583
- b: v.legBottomH + w,
1584
- l: v.legLeftW + C
1593
+ r: g.legRightW,
1594
+ b: g.legBottomH + x,
1595
+ l: g.legLeftW + b
1585
1596
  }
1586
- }), E = {
1587
- x: T.plotRect.px0,
1588
- y: T.plotRect.py0,
1589
- w: Math.max(1, T.plotRect.pw),
1590
- h: Math.max(1, T.plotRect.ph)
1597
+ }), C = {
1598
+ x: S.plotRect.px0,
1599
+ y: S.plotRect.py0,
1600
+ w: Math.max(1, S.plotRect.pw),
1601
+ h: Math.max(1, S.plotRect.ph)
1591
1602
  };
1592
- J(e, t, E.x, E.y, E.w, E.h, i, o);
1593
- let D = _ ? _.side === "r" ? {
1594
- x: n.x + n.w - _.reserveW,
1595
- y: E.y,
1596
- w: _.reserveW,
1597
- h: E.h
1598
- } : _.side === "l" ? {
1603
+ ce(e, t, C.x, C.y, C.w, C.h, r, a);
1604
+ let w = h ? h.side === "r" ? {
1605
+ x: n.x + n.w - h.reserveW,
1606
+ y: C.y,
1607
+ w: h.reserveW,
1608
+ h: C.h
1609
+ } : h.side === "l" ? {
1599
1610
  x: n.x,
1600
- y: E.y,
1601
- w: _.reserveW,
1602
- h: E.h
1603
- } : _.side === "t" ? {
1611
+ y: C.y,
1612
+ w: h.reserveW,
1613
+ h: C.h
1614
+ } : h.side === "t" ? {
1604
1615
  x: n.x + 4,
1605
1616
  y: n.y + s.bandH,
1606
1617
  w: Math.max(1, n.w - 8),
1607
- h: _.reserveH
1618
+ h: h.reserveH
1608
1619
  } : {
1609
1620
  x: n.x + 4,
1610
- y: n.y + n.h - _.reserveH,
1621
+ y: n.y + n.h - h.reserveH,
1611
1622
  w: Math.max(1, n.w - 8),
1612
- h: _.reserveH
1623
+ h: h.reserveH
1613
1624
  } : null;
1614
1625
  return {
1615
- plot: E,
1616
- legend: (D && t.legendManualLayout ? b(t.legendManualLayout, n, D) : null) ?? D,
1626
+ plot: C,
1627
+ legend: (w && t.legendManualLayout ? P(t.legendManualLayout, n, w) : null) ?? w,
1617
1628
  legendMeasure: {
1618
- labels: d.map((e) => e.label),
1619
- styles: f,
1620
- itemWidths: h
1629
+ labels: l.map((e) => e.label),
1630
+ styles: d,
1631
+ itemWidths: m
1621
1632
  }
1622
1633
  };
1623
1634
  }
1624
- function Ut(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1635
+ function an(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1625
1636
  e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
1626
- let m = f ? t : me(e, t, p), h = x(i, u, d), g = r;
1637
+ let m = f ? t : on(e, t, p), h = A(i, u, d), g = r;
1627
1638
  if (f) {
1628
- let t = e.measureText(m).width, i = Math.abs(Math.cos(h)), o = Math.abs(Math.sin(h)), s = {
1629
- x: r.x - (t * i + a * o) / 2,
1630
- y: r.y - (t * o + a * i) / 2,
1631
- w: t * i + a * o,
1632
- h: t * o + a * i
1633
- }, c = b({
1639
+ let t = M(e, m), i = a + G(m, a), o = Math.abs(Math.cos(h)), s = Math.abs(Math.sin(h)), c = {
1640
+ x: r.x - (t * o + i * s) / 2,
1641
+ y: r.y - (t * s + i * o) / 2,
1642
+ w: t * o + i * s,
1643
+ h: t * s + i * o
1644
+ }, l = P({
1634
1645
  ...f,
1635
1646
  w: void 0,
1636
1647
  h: void 0
1637
- }, n, s);
1638
- c && (g = {
1639
- x: c.x + c.w / 2,
1640
- y: c.y + c.h / 2
1648
+ }, n, c);
1649
+ l && (g = {
1650
+ x: l.x + l.w / 2,
1651
+ y: l.y + l.h / 2
1641
1652
  });
1642
1653
  }
1643
- e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", e.fillText(m, 0, 0), e.restore();
1654
+ e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", B(e, m, 0, 0, a), e.restore();
1655
+ }
1656
+ function on(e, t, n) {
1657
+ let r = re(t);
1658
+ return r.length === 1 ? de(e, t, n) : r.map((t) => de(e, t, n)).join("\n");
1644
1659
  }
1645
- function Wt(e, t, n, r, i, a) {
1660
+ function sn(e, t, n, r, i, a) {
1646
1661
  if (t.valAxisTitle) {
1647
- let s = o(t.valAxisTitleFontSizeHpt, a), c = i ? "horizontal" : "left";
1648
- Ut(e, t.valAxisTitle, n, i ? {
1662
+ let o = Z(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left", c = f(t.valAxisTitle, o, s, t.valAxisTitleRotation, t.valAxisTitleVerticalMode) / 2;
1663
+ an(e, t.valAxisTitle, n, i ? {
1649
1664
  x: r.x + r.w / 2,
1650
- y: r.y + r.h + oe(n.h) + s / 2
1665
+ y: r.y + r.h + u(n.h) + o / 2 + c
1651
1666
  } : {
1652
- x: r.x - oe(n.w) - s / 2,
1667
+ x: r.x - u(n.w) - o / 2 - c,
1653
1668
  y: r.y + r.h / 2
1654
- }, c, s, $(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1669
+ }, s, o, Rt(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1655
1670
  }
1656
1671
  if (t.catAxisTitle) {
1657
- let s = o(t.catAxisTitleFontSizeHpt, a), c = i ? "left" : "horizontal";
1658
- Ut(e, t.catAxisTitle, n, i ? {
1659
- x: r.x - oe(n.w) - s / 2,
1672
+ let o = Z(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal", c = f(t.catAxisTitle, o, s, t.catAxisTitleRotation, t.catAxisTitleVerticalMode) / 2;
1673
+ an(e, t.catAxisTitle, n, i ? {
1674
+ x: r.x - u(n.w) - o / 2 - c,
1660
1675
  y: r.y + r.h / 2
1661
1676
  } : {
1662
1677
  x: r.x + r.w / 2,
1663
- y: r.y + r.h + oe(n.h) + s / 2
1664
- }, c, s, $(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1665
- }
1666
- }
1667
- function Gt(e, t, n, r, i, a, s, c, l, u, d) {
1668
- let f = t.threeD?.seriesAxis;
1669
- if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1670
- let p = dn(t, r, i, a, s, c, l), m = Qt(r), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === r.front.y ? r.front.y + r.front.h : r.front.y : m.floorY, _ = r.project(h, g, r.topology.nearDepth), y = r.project(h, g, r.topology.farDepth), b = Math.hypot(y.x - _.x, y.y - _.y);
1671
- if (!(b > 1e-6)) return;
1672
- let x = {
1673
- x: (y.x - _.x) / b,
1674
- y: (y.y - _.y) / b
1675
- }, S = {
1676
- x: -x.y,
1677
- y: x.x
1678
- }, C = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), w = {
1679
- x: (_.x + y.x) / 2,
1680
- y: (_.y + y.y) / 2
1678
+ y: r.y + r.h + u(n.h) + o / 2 + c
1679
+ }, s, o, Rt(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1680
+ }
1681
+ }
1682
+ function cn(e, t, n, r, i, a, o, s, c, l, u) {
1683
+ let d = t.threeD?.seriesAxis;
1684
+ if (!d || d.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1685
+ let f = Dn(t, r, i, a, o, s, c), p = hn(r), m = c === "vertical" ? p.seriesAxisX : f.axisX, h = c === "horizontal" ? p.floorY === r.front.y ? r.front.y + r.front.h : r.front.y : p.floorY, g = r.project(m, h, r.topology.nearDepth), _ = r.project(m, h, r.topology.farDepth), v = Math.hypot(_.x - g.x, _.y - g.y);
1686
+ if (!(v > 1e-6)) return;
1687
+ let y = {
1688
+ x: (_.x - g.x) / v,
1689
+ y: (_.y - g.y) / v
1690
+ }, b = {
1691
+ x: -y.y,
1692
+ y: y.x
1693
+ }, x = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), S = {
1694
+ x: (g.x + _.x) / 2,
1695
+ y: (g.y + _.y) / 2
1681
1696
  };
1682
- (w.x - C.x) * S.x + (w.y - C.y) * S.y < 0 && (S = {
1683
- x: -S.x,
1684
- y: -S.y
1685
- }), (f.tickLabelPos === "low" && S.y < 0 || f.tickLabelPos === "high" && S.y > 0) && (S = {
1686
- x: -S.x,
1687
- y: -S.y
1688
- }), f.lineHidden || (nn(e, en(f.lineColor, f.lineWidthEmu, f.lineDash, d)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(y.x, y.y), e.stroke());
1689
- let T = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), E = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), D = f.majorTickMark ?? "out", O = v(f.fontSizeHpt, d) ?? 9 * d;
1690
- if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${O}px ${$(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", 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", u && !f.lineHidden && D !== "none") {
1691
- nn(e, tn(f.lineColor, f.lineWidthEmu, f.lineDash, d));
1697
+ (S.x - x.x) * b.x + (S.y - x.y) * b.y < 0 && (b = {
1698
+ x: -b.x,
1699
+ y: -b.y
1700
+ }), (d.tickLabelPos === "low" && b.y < 0 || d.tickLabelPos === "high" && b.y > 0) && (b = {
1701
+ x: -b.x,
1702
+ y: -b.y
1703
+ }), d.lineHidden || (yn(e, _n(d.lineColor, d.lineWidthEmu, d.lineDash, u)), e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(_.x, _.y), e.stroke());
1704
+ let C = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), w = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), T = d.majorTickMark ?? "out", E = H(d.fontSizeHpt, u) ?? 9 * u;
1705
+ if (e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${E}px ${Rt(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.fontColor}` : "#595959", e.textAlign = Math.abs(b.x) < .2 ? "center" : b.x < 0 ? "right" : "left", e.textBaseline = Math.abs(b.y) < .2 ? "middle" : b.y < 0 ? "bottom" : "top", l && !d.lineHidden && T !== "none") {
1706
+ yn(e, vn(d.lineColor, d.lineWidthEmu, d.lineDash, u));
1692
1707
  let n = t.series.length;
1693
- for (let t = 0; t <= n; t += T) {
1694
- let i = t / n, a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a), s = 6 * d, c = D === "cross" ? s / 2 : D === "out" ? s : 0, l = D === "cross" ? s / 2 : D === "in" ? s : 0;
1695
- e.beginPath(), e.moveTo(o.x + S.x * c, o.y + S.y * c), e.lineTo(o.x - S.x * l, o.y - S.y * l), e.stroke();
1708
+ for (let t = 0; t <= n; t += C) {
1709
+ let i = t / n, a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a), s = 6 * u, c = T === "cross" ? s / 2 : T === "out" ? s : 0, l = T === "cross" ? s / 2 : T === "in" ? s : 0;
1710
+ e.beginPath(), e.moveTo(o.x + b.x * c, o.y + b.y * c), e.lineTo(o.x - b.x * l, o.y - b.y * l), e.stroke();
1696
1711
  }
1697
1712
  }
1698
1713
  for (let n = 0; n < t.series.length; n++) {
1699
- let i = r.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
1700
- if (!u && !f.lineHidden && n % T === 0 && D !== "none") {
1701
- let t = 6 * d, n = D === "cross" ? t / 2 : D === "out" ? t : 0, r = D === "cross" ? t / 2 : D === "in" ? t : 0;
1702
- e.beginPath(), e.moveTo(o.x + S.x * n, o.y + S.y * n), e.lineTo(o.x - S.x * r, o.y - S.y * r), e.stroke();
1714
+ let i = r.seriesDepth(n, t.series.length, !1), a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a);
1715
+ if (!l && !d.lineHidden && n % C === 0 && T !== "none") {
1716
+ let t = 6 * u, n = T === "cross" ? t / 2 : T === "out" ? t : 0, r = T === "cross" ? t / 2 : T === "in" ? t : 0;
1717
+ e.beginPath(), e.moveTo(o.x + b.x * n, o.y + b.y * n), e.lineTo(o.x - b.x * r, o.y - b.y * r), e.stroke();
1703
1718
  }
1704
- f.tickLabelPos !== "none" && n % E === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + S.x * (6 * d + 3), o.y + S.y * (6 * d + 3));
1705
- }
1706
- if (e.setLineDash([]), f.title) {
1707
- let i = o(f.titleFontSizeHpt, d);
1708
- Ut(e, f.title, n, {
1709
- x: w.x + S.x * (O + i + 12),
1710
- y: w.y + S.y * (O + i + 12)
1711
- }, "horizontal", i, $(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(r.front.w, r.front.h));
1712
- }
1713
- }
1714
- function Kt(t, n, r, i, a, o, s) {
1715
- let c = q(t, "dataPointMarker", a), l = W(t, "dataPointMarker"), u = n.chartexFormatIdx ?? a, d = E(r?.markerStyle, l, i), f = E(n.markerStyle, l, u), p = d !== void 0 || r?.markerFillPaint !== void 0 || r?.markerFill != null || r?.color != null || r?.markerFillPaintAuthored === !0 && r.markerStyle?.fillHidden !== !0, m = f !== void 0 || n.markerFillPaint !== void 0 || n.markerFill != null || n.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, h = P(c, l, u), g = p ? d ?? r?.markerFillPaint : m ? f ?? n.markerFillPaint : h, _ = G(n, r, i, o), v = g;
1716
- g?.fillType === "solid" ? (_ = g.color, v = void 0) : g === null && (_ = "00000000");
1717
- let y = O(r?.markerStyle, l, i), b = O(n.markerStyle, l, u), x = y !== void 0 || r?.markerLine != null || r?.markerLinePaintAuthored === !0 && r.markerStyle?.lineHidden !== !0, S = b !== void 0 || n.markerLine != null || n.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, C = V(c, u), w = x ? y ?? (r?.markerLinePaintAuthored === !0 ? null : void 0) : S ? b ?? (n.markerLinePaintAuthored === !0 ? null : void 0) : C, T = r?.markerLine ?? n.markerLine ?? n.lineColor ?? o, D = w;
1718
- w?.fillType === "solid" ? (T = w.color, D = void 0) : w === null && (T = "00000000");
1719
- let k = r?.markerStyle ?? n.markerStyle ?? c, A = N(r?.markerStyle, n.markerStyle, c);
1719
+ d.tickLabelPos !== "none" && n % w === 0 && B(e, t.series[n].name || `Series ${n + 1}`, o.x + b.x * (6 * u + 3), o.y + b.y * (6 * u + 3), K(E));
1720
+ }
1721
+ if (e.setLineDash([]), d.title) {
1722
+ let i = Z(d.titleFontSizeHpt, u), a = E + i + 12 + F(t.series.map((e, t) => e.name || `Series ${t + 1}`), K(E)) + G(d.title, i) / 2;
1723
+ an(e, d.title, n, {
1724
+ x: S.x + b.x * a,
1725
+ y: S.y + b.y * a
1726
+ }, "horizontal", i, Rt(t, d.titleFontFace, "major"), d.titleFontColor, d.titleFontBold ?? !0, d.titleFontItalic ?? !1, d.titleRotation, d.titleVerticalMode, d.titleManualLayout, Math.max(r.front.w, r.front.h));
1727
+ }
1728
+ }
1729
+ function ln(e, t, n, r, i, a, c) {
1730
+ let u = l(e, "dataPointMarker", i), d = J(e, "dataPointMarker"), f = t.chartexFormatIdx ?? i, p = v(n?.markerStyle, d, r), h = v(t.markerStyle, d, f), g = p !== void 0 || n?.markerFillPaint !== void 0 || n?.markerFill != null || n?.color != null || n?.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, _ = h !== void 0 || t.markerFillPaint !== void 0 || t.markerFill != null || t.markerFillPaintAuthored === !0 && t.markerStyle?.fillHidden !== !0, y = s(u, d, f), b = g ? p ?? n?.markerFillPaint : _ ? h ?? t.markerFillPaint : y, x = z(t, n, r, a), S = b;
1731
+ b?.fillType === "solid" ? (x = b.color, S = void 0) : b === null && (x = "00000000");
1732
+ let C = ye(n?.markerStyle, d, r), w = ye(t.markerStyle, d, f), T = C !== void 0 || n?.markerLine != null || n?.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, E = w !== void 0 || t.markerLine != null || t.markerLinePaintAuthored === !0 && t.markerStyle?.lineHidden !== !0, D = o(u, f), O = T ? C ?? (n?.markerLinePaintAuthored === !0 ? null : void 0) : E ? w ?? (t.markerLinePaintAuthored === !0 ? null : void 0) : D, k = n?.markerLine ?? t.markerLine ?? t.lineColor ?? a, A = O;
1733
+ O?.fillType === "solid" ? (k = O.color, A = void 0) : O === null && (k = "00000000");
1734
+ let j = n?.markerStyle ?? t.markerStyle ?? u, M = L(n?.markerStyle, t.markerStyle, u);
1720
1735
  return {
1721
- fill: _,
1722
- fillPaint: v,
1723
- line: T,
1724
- linePaint: D,
1725
- lineWidth: (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? k?.lineWidthEmu) == null ? Math.max(.75, s) : Math.max(.25, (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? k?.lineWidthEmu ?? 0) / X * s),
1726
- lineDash: A?.lineDash,
1727
- lineCustomDash: A?.lineCustomDash,
1728
- lineCap: k?.lineCap,
1729
- lineJoin: k?.lineJoin,
1730
- effectDirect: e(r?.markerStyle, r?.chartexStyle, n.markerStyle),
1731
- effectFallback: c,
1732
- effectIndex: r?.markerStyle || r?.chartexStyle ? i : u,
1733
- effectFallbackIndex: u
1736
+ fill: x,
1737
+ fillPaint: S,
1738
+ line: k,
1739
+ linePaint: A,
1740
+ lineWidth: (n?.markerLineWidthEmu ?? t.markerLineWidthEmu ?? j?.lineWidthEmu) == null ? Math.max(.75, c) : Math.max(.25, (n?.markerLineWidthEmu ?? t.markerLineWidthEmu ?? j?.lineWidthEmu ?? 0) / W * c),
1741
+ lineDash: M?.lineDash,
1742
+ lineCustomDash: M?.lineCustomDash,
1743
+ lineCap: j?.lineCap,
1744
+ lineJoin: j?.lineJoin,
1745
+ effectDirect: m(n?.markerStyle, n?.chartexStyle, t.markerStyle),
1746
+ effectFallback: u,
1747
+ effectIndex: n?.markerStyle || n?.chartexStyle ? r : f,
1748
+ effectFallbackIndex: f
1734
1749
  };
1735
1750
  }
1736
- function qt(t, n, r, i, a, o, s, c, l, u, d, f) {
1737
- let p = Q(n, r, i, a, o, f), m = De(n, r, a, o), h = {
1738
- x: s,
1739
- y: c - l / 2,
1740
- w: l,
1741
- h: l
1742
- }, g = (e) => {
1751
+ function un(e, t, n, r, i, a, o, s, c, u, d, f) {
1752
+ let p = $(t, n, r, i, a, f), h = Le(t, n, i, a), g = {
1753
+ x: o,
1754
+ y: s - c / 2,
1755
+ w: c,
1756
+ h: c
1757
+ }, _ = (e) => {
1743
1758
  if (p.fill !== null) {
1744
- let t = p.fill === void 0 ? p.color : p.fill.fillType === "image" ? null : R(p.fill, e, h.x, h.y, h.w, h.h, d);
1745
- t && (e.fillStyle = t, e.fillRect(h.x, h.y, h.w, h.h));
1759
+ let t = p.fill === void 0 ? p.color : p.fill.fillType === "image" ? null : se(p.fill, e, g.x, g.y, g.w, g.h, d);
1760
+ t && (e.fillStyle = t, e.fillRect(g.x, g.y, g.w, g.h));
1746
1761
  }
1747
- let t = p.lineFill === void 0 ? p.lineColor : p.lineFill == null || p.lineFill.fillType === "image" ? null : R(p.lineFill, e, h.x, h.y, h.w, h.h, d);
1748
- t && (e.strokeStyle = t, e.lineWidth = p.lineWidthEmu == null ? .75 * u : Math.max(.25, p.lineWidthEmu / X * u), e.setLineDash(ae(p.lineCustomDash, p.lineDash, e.lineWidth)), e.lineCap = p.lineCap, e.lineJoin = p.lineJoin, e.strokeRect(h.x, h.y, h.w, h.h), e.setLineDash([]));
1749
- }, _ = e(i?.chartexStyle, r.chartexStyle);
1750
- F(t, _, q(n, "dataPoint3D", o), _ === i?.chartexStyle ? a : m, h, u, g, m);
1762
+ let t = p.lineFill === void 0 ? p.lineColor : p.lineFill == null || p.lineFill.fillType === "image" ? null : se(p.lineFill, e, g.x, g.y, g.w, g.h, d);
1763
+ t && (e.strokeStyle = t, e.lineWidth = p.lineWidthEmu == null ? .75 * u : Math.max(.25, p.lineWidthEmu / W * u), e.setLineDash(x(p.lineCustomDash, p.lineDash, e.lineWidth)), e.lineCap = p.lineCap, e.lineJoin = p.lineJoin, e.strokeRect(g.x, g.y, g.w, g.h), e.setLineDash([]));
1764
+ }, v = m(r?.chartexStyle, n.chartexStyle);
1765
+ b(e, v, l(t, "dataPoint3D", a), v === r?.chartexStyle ? i : h, g, u, _, h);
1751
1766
  }
1752
- function Jt(t, n, r, i, a, o, s, c, l, u) {
1753
- let d = Q(n, r, void 0, i, i, !1), f = d.lineFill === void 0 ? d.lineColor == null ? d.fill : {
1767
+ function dn(e, t, n, r, i, a, o, s, c, u) {
1768
+ let d = $(t, n, void 0, r, r, !1), f = d.lineFill === void 0 ? d.lineColor == null ? d.fill : {
1754
1769
  fillType: "solid",
1755
1770
  color: d.lineColor.replace(/^#/, "")
1756
1771
  } : d.lineFill;
1757
1772
  if (f !== null) {
1758
- let a = d.lineWidthEmu == null ? Math.max(1, 2 * l) : Math.max(.5, d.lineWidthEmu / X * l), p = {
1759
- x: o,
1760
- y: s - a / 2,
1761
- w: c,
1762
- h: a
1763
- }, m = f === void 0 ? d.color : f.fillType === "image" ? null : f.fillType === "solid" ? `#${f.color}` : R(f, t, o, s - a / 2, c, a, u);
1764
- if (m) {
1765
- let h = (e) => {
1766
- e.beginPath(), e.moveTo(o, s), e.lineTo(o + c, s), e.strokeStyle = e === t ? m : f === void 0 ? d.color : f.fillType === "image" ? "rgba(0,0,0,0)" : f.fillType === "solid" ? `#${f.color}` : R(f, e, o, s - a / 2, c, a, u) ?? "rgba(0,0,0,0)", e.lineWidth = a, e.setLineDash(ae(d.lineCustomDash, d.lineDash, a)), e.stroke(), e.setLineDash([]);
1767
- }, g = De(n, r, i, i);
1768
- F(t, e(r.chartexStyle), q(n, "dataPoint3D", i), g, p, l, h, g);
1773
+ let i = d.lineWidthEmu == null ? Math.max(1, 2 * c) : Math.max(.5, d.lineWidthEmu / W * c), p = {
1774
+ x: a,
1775
+ y: o - i / 2,
1776
+ w: s,
1777
+ h: i
1778
+ }, h = f === void 0 ? d.color : f.fillType === "image" ? null : f.fillType === "solid" ? `#${f.color}` : se(f, e, a, o - i / 2, s, i, u);
1779
+ if (h) {
1780
+ let g = (t) => {
1781
+ t.beginPath(), t.moveTo(a, o), t.lineTo(a + s, o), t.strokeStyle = t === e ? h : f === void 0 ? d.color : f.fillType === "image" ? "rgba(0,0,0,0)" : f.fillType === "solid" ? `#${f.color}` : se(f, t, a, o - i / 2, s, i, u) ?? "rgba(0,0,0,0)", t.lineWidth = i, t.setLineDash(x(d.lineCustomDash, d.lineDash, i)), t.stroke(), t.setLineDash([]);
1782
+ }, _ = Le(t, n, r, r);
1783
+ b(e, m(n.chartexStyle), l(t, "dataPoint3D", r), _, p, c, g, _);
1769
1784
  }
1770
1785
  }
1771
- if (r.showMarker !== !0 || r.markerSymbol === "none") return;
1772
- let p = r.markerSymbol ?? "circle", m = Kt(n, r, void 0, i, i, a.replace(/^#/, ""), l);
1773
- zt(t, {
1774
- x: o + c / 2,
1775
- y: s
1776
- }, p, Math.min(c, Math.max(2, (r.markerSize ?? 5) * l)), m.fill === "00000000" ? "transparent" : `#${m.fill.replace(/^#/, "")}`, m.line === "00000000" ? "rgba(0,0,0,0)" : `#${m.line.replace(/^#/, "")}`, m.lineWidth, m.fillPaint, u, l, m.effectDirect, m.effectFallback, m.effectIndex, m.effectFallbackIndex, m.linePaint, m.lineDash, m.lineCustomDash, m.lineCap, m.lineJoin);
1786
+ if (n.showMarker !== !0 || n.markerSymbol === "none") return;
1787
+ let p = n.markerSymbol ?? "circle", h = ln(t, n, void 0, r, r, i.replace(/^#/, ""), c);
1788
+ en(e, {
1789
+ x: a + s / 2,
1790
+ y: o
1791
+ }, p, Math.min(s, Math.max(2, (n.markerSize ?? 5) * c)), h.fill === "00000000" ? "transparent" : `#${h.fill.replace(/^#/, "")}`, h.line === "00000000" ? "rgba(0,0,0,0)" : `#${h.line.replace(/^#/, "")}`, h.lineWidth, h.fillPaint, u, c, h.effectDirect, h.effectFallback, h.effectIndex, h.effectFallbackIndex, h.linePaint, h.lineDash, h.lineCustomDash, h.lineCap, h.lineJoin);
1777
1792
  }
1778
- function Yt(e, t, n, r, i = !1, a, o = 0) {
1793
+ function fn(e, t, n, r, i = !1, a, o = 0) {
1779
1794
  if (!n) return;
1780
- ee(e, t, n, r, o);
1795
+ ie(e, t, n, r, o);
1781
1796
  let s = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), c = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1782
1797
  let r = t.series[0]?.dataPointColors?.[n];
1783
1798
  return {
1784
1799
  label: e,
1785
- color: r === "00000000" ? "transparent" : r ? `#${r}` : gt(n),
1800
+ color: r === "00000000" ? "transparent" : r ? `#${r}` : Dt(n),
1786
1801
  series: t.series[0],
1787
1802
  point: s.get(n),
1788
1803
  sourceIndex: n,
@@ -1790,45 +1805,45 @@ function Yt(e, t, n, r, i = !1, a, o = 0) {
1790
1805
  };
1791
1806
  }) : t.series.map((e, t) => ({
1792
1807
  label: e.name || `Series ${t + 1}`,
1793
- color: gt(t, e),
1808
+ color: Dt(t, e),
1794
1809
  series: e,
1795
1810
  point: void 0,
1796
1811
  sourceIndex: t,
1797
1812
  seriesIndex: t
1798
- })), l = ct(t), u = c.filter((e) => l.get(e.sourceIndex)?.deleted !== !0), d = a != null && a.labels.length === u.length && a.labels.every((e, t) => e === u[t].label), f = d ? a.styles : u.map((e) => lt(t, l.get(e.sourceIndex), r));
1813
+ })), l = yt(t), u = c.filter((e) => l.get(e.sourceIndex)?.deleted !== !0), d = a != null && a.labels.length === u.length && a.labels.every((e, t) => e === u[t].label), f = d ? a.styles : u.map((e) => bt(t, l.get(e.sourceIndex), r));
1799
1814
  e.textAlign = "left", e.textBaseline = "middle";
1800
- let p = Math.max(Math.max(0, ...f.map((e) => e.fontPx)) * 1.45, 12), m = Math.min(7 * r, p * .7);
1815
+ let p = Math.max(0, ...f.map((e) => e.fontPx)), m = Math.max(p * 1.45, 12), h = Math.min(7 * r, m * .7), g = m + Qt(u.map((e) => e.label), p);
1801
1816
  if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1802
- let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, m + 4 + e.measureText(t.label).width)), c = h(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / p))), l = n.y + 2 + p / 2;
1817
+ let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, h + 4 + M(e, t.label))), c = ae(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / g))), l = n.y + 2 + g / 2;
1803
1818
  for (let a of c) {
1804
- let c = a.map((e) => Math.min(n.w, s[e])), d = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, h = n.x + Math.max(4, (n.w - d) / 2);
1819
+ let c = a.map((e) => Math.min(n.w, s[e])), d = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, p = n.x + Math.max(4, (n.w - d) / 2);
1805
1820
  for (let n = 0; n < a.length; n++) {
1806
- let s = a[n], d = u[s], p = f[s];
1807
- e.font = p.font;
1808
- let g = Math.max(0, c[n] - m - 4);
1809
- !i && t.chartType.toLowerCase().includes("line") && d.series ? Jt(e, t, d.series, d.seriesIndex, d.color, h, l, m, r, o) : d.series && qt(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, h, l, m, r, o, i), e.fillStyle = p.color, e.fillText(me(e, d.label, g), h + m + 4, l), h += c[n] + 12;
1821
+ let s = a[n], d = u[s], m = f[s];
1822
+ e.font = m.font;
1823
+ let g = Math.max(0, c[n] - h - 4);
1824
+ !i && t.chartType.toLowerCase().includes("line") && d.series ? dn(e, t, d.series, d.seriesIndex, d.color, p, l, h, r, o) : d.series && un(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, p, l, h, r, o, i), e.fillStyle = m.color, B(e, d.label, p + h + 4, l, Zt(m.fontPx), g), p += c[n] + 12;
1810
1825
  }
1811
- l += p;
1826
+ l += g;
1812
1827
  }
1813
1828
  return;
1814
1829
  }
1815
- let g = n.y;
1830
+ let _ = n.y;
1816
1831
  for (let a = 0; a < u.length; a++) {
1817
1832
  let s = u[a], c = f[a];
1818
1833
  e.font = c.font;
1819
- let l = n.x + 8 + m, d = Math.max(0, n.x + n.w - 4 - l), h = Math.max(c.fontPx * 1.2, 10), _ = j(s.label, d, h * (i ? 1 : 2), h, (t) => e.measureText(t).width);
1820
- if (_.length === 0) continue;
1821
- let v = Math.max(p, _.length * h + 2);
1822
- if (g + v > n.y + n.h + 1e-6) break;
1823
- let y = g + v / 2;
1824
- !i && t.chartType.toLowerCase().includes("line") && s.series ? Jt(e, t, s.series, s.seriesIndex, s.color, n.x + 4, y, m, r, o) : s.series && qt(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, y, m, r, o, i), e.fillStyle = c.color;
1825
- let b = y - (_.length - 1) * h / 2;
1826
- _.forEach((t, n) => e.fillText(t, l, b + n * h)), g += v;
1834
+ let l = n.x + 8 + h, d = Math.max(0, n.x + n.w - 4 - l), p = Math.max(c.fontPx * 1.2, 10), g = re(s.label), v = (t) => w(t, d, p * (i ? 1 : 2), p, (t) => e.measureText(t).width), y = g.length === 1 ? v(s.label) : g.flatMap(v);
1835
+ if (y.length === 0) continue;
1836
+ let b = Math.max(m, y.length * p + 2);
1837
+ if (_ + b > n.y + n.h + 1e-6) break;
1838
+ let x = _ + b / 2;
1839
+ !i && t.chartType.toLowerCase().includes("line") && s.series ? dn(e, t, s.series, s.seriesIndex, s.color, n.x + 4, x, h, r, o) : s.series && un(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, x, h, r, o, i), e.fillStyle = c.color;
1840
+ let S = x - (y.length - 1) * p / 2;
1841
+ y.forEach((t, n) => e.fillText(t, l, S + n * p)), _ += b;
1827
1842
  }
1828
1843
  }
1829
- function Xt(e, t, n, r, i, a) {
1844
+ function pn(e, t, n, r, i, a) {
1830
1845
  let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
1831
- return we({
1846
+ return h({
1832
1847
  dataMin: t,
1833
1848
  dataMax: n,
1834
1849
  explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
@@ -1842,7 +1857,7 @@ function Xt(e, t, n, r, i, a) {
1842
1857
  needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
1843
1858
  });
1844
1859
  }
1845
- function Zt(e, t, n) {
1860
+ function mn(e, t, n) {
1846
1861
  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;
1847
1862
  return {
1848
1863
  start: Math.min(o, s),
@@ -1851,7 +1866,7 @@ function Zt(e, t, n) {
1851
1866
  leading: o
1852
1867
  };
1853
1868
  }
1854
- function Qt(e) {
1869
+ function hn(e) {
1855
1870
  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);
1856
1871
  return {
1857
1872
  floor: [
@@ -1880,42 +1895,42 @@ function Qt(e) {
1880
1895
  farDepth: l
1881
1896
  };
1882
1897
  }
1883
- function $t(e, t, n, r, i = "A6A6A6", a = .75) {
1884
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / X * r) : a * r;
1898
+ function gn(e, t, n, r, i = "A6A6A6", a = .75) {
1899
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / W * r) : a * r;
1885
1900
  return {
1886
1901
  color: `#${e ?? i}`,
1887
1902
  width: o,
1888
- dash: ce(n ?? "solid", o)
1903
+ dash: Se(n ?? "solid", o)
1889
1904
  };
1890
1905
  }
1891
- function en(e, t, n, r) {
1892
- let i = $t(e, t, n, r, "898989", 1);
1906
+ function _n(e, t, n, r) {
1907
+ let i = gn(e, t, n, r, "898989", 1);
1893
1908
  if (t == null || !Number.isFinite(t) || t < 0) return i;
1894
- let a = t / X * r;
1909
+ let a = t / W * r;
1895
1910
  if (!(a > 0)) return i;
1896
1911
  let o = a;
1897
1912
  return {
1898
1913
  ...i,
1899
1914
  width: o,
1900
- dash: ce(n ?? "solid", o)
1915
+ dash: Se(n ?? "solid", o)
1901
1916
  };
1902
1917
  }
1903
- function tn(e, t, n, r) {
1904
- return en(e, t, n, r);
1918
+ function vn(e, t, n, r) {
1919
+ return _n(e, t, n, r);
1905
1920
  }
1906
- function nn(e, t) {
1921
+ function yn(e, t) {
1907
1922
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1908
1923
  }
1909
- function rn(e, t, n, r, i, o, s, c, l) {
1910
- let { front: u } = n, d = u.x, f = u.x + u.w, p = Qt(n), { sideX: m, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = p, y = dn(t, n, r, o, s, c, i), b = [], x = t.catAxisLinePaintAuthored === !0, C = t.valAxisLinePaintAuthored === !0, w = i === "vertical" ? x && !t.catAxisHidden && !t.catAxisLineHidden : C && !t.valAxisHidden && !t.valAxisLineHidden, T = i === "vertical" ? C && !t.valAxisHidden && !t.valAxisLineHidden : x && !t.catAxisHidden && !t.catAxisLineHidden;
1911
- w && b.push([y.horizontalStart, y.horizontalEnd]), T && b.push([y.verticalStart, y.verticalEnd]);
1912
- let E = t.threeD?.seriesAxis, D = E?.linePaintAuthored === !0;
1913
- if (E && !E.hidden && !E.lineHidden && D && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1924
+ function bn(e, t, n, r, i, a, o, s, c) {
1925
+ let { front: l } = n, u = l.x, f = l.x + l.w, p = hn(n), { sideX: m, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = p, y = Dn(t, n, r, a, o, s, i), b = [], C = t.catAxisLinePaintAuthored === !0, w = t.valAxisLinePaintAuthored === !0, T = i === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : w && !t.valAxisHidden && !t.valAxisLineHidden, E = i === "vertical" ? w && !t.valAxisHidden && !t.valAxisLineHidden : C && !t.catAxisHidden && !t.catAxisLineHidden;
1926
+ T && b.push([y.horizontalStart, y.horizontalEnd]), E && b.push([y.verticalStart, y.verticalEnd]);
1927
+ let D = t.threeD?.seriesAxis, O = D?.linePaintAuthored === !0;
1928
+ if (D && !D.hidden && !D.lineHidden && O && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1914
1929
  let e = i === "vertical" ? p.seriesAxisX : y.axisX, t = i === "horizontal" ? h === n.front.y ? n.front.y + n.front.h : n.front.y : h;
1915
1930
  b.push([n.project(e, t, _), n.project(e, t, v)]);
1916
1931
  }
1917
- let O = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, k = (e, t) => b.some(([n, r]) => O(e, n) && O(t, r) || O(e, r) && O(t, n)), j = (e, t) => {
1918
- let r = fe(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1932
+ let k = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, A = (e, t) => b.some(([n, r]) => k(e, n) && k(t, r) || k(e, r) && k(t, n)), j = (e, t) => {
1933
+ let r = Ce(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1919
1934
  scenePoints: e,
1920
1935
  faceIndex: t
1921
1936
  })).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
@@ -1929,67 +1944,67 @@ function rn(e, t, n, r, i, o, s, c, l) {
1929
1944
  faces: i,
1930
1945
  visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
1931
1946
  };
1932
- }, M = j("floor", t.threeD?.floor), N = j("sideWall", t.threeD?.sideWall), P = j("backWall", t.threeD?.backWall), F = M.faces, I = N.faces, L = P.faces, z = (i, a, o, s) => {
1933
- let c = A(t, a, o), l = i.faces;
1934
- if (!c.fill || !l.length) return;
1935
- if (c.fill.fillType === "image") {
1936
- let t = B(c.fill);
1937
- if (!t) return;
1938
- de(e, c.fill, t, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min);
1947
+ }, M = j("floor", t.threeD?.floor), N = j("sideWall", t.threeD?.sideWall), P = j("backWall", t.threeD?.backWall), F = M.faces, I = N.faces, L = P.faces, R = (i, a, o, s) => {
1948
+ let l = d(t, a, o), u = i.faces;
1949
+ if (!l.fill || !u.length) return;
1950
+ if (l.fill.fillType === "image") {
1951
+ let t = l.fill, o = ke(i.slab, c), u = ee(l.fill, o ? q(l.fill, o.widthPt, o.heightPt) : void 0);
1952
+ if (!u) return;
1953
+ Ee(e, l.fill, u, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min, (e, n) => ee(t, q(t, e, n)), c);
1939
1954
  return;
1940
1955
  }
1941
- let u = l.flatMap((e) => e.points), d = Math.min(...u.map((e) => e.x)), f = Math.max(...u.map((e) => e.x)), p = Math.min(...u.map((e) => e.y)), m = Math.max(...u.map((e) => e.y)), h = c.fill.fillType === "solid" ? `#${c.fill.color}` : R(c.fill, e, d, p, f - d, m - p);
1942
- if (h) for (let t of l) t.points.length < 3 || (Et(e, t.points), e.fillStyle = h, e.fill());
1956
+ let f = u.flatMap((e) => e.points), p = Math.min(...f.map((e) => e.x)), m = Math.max(...f.map((e) => e.x)), h = Math.min(...f.map((e) => e.y)), g = Math.max(...f.map((e) => e.y)), _ = l.fill.fillType === "solid" ? `#${l.fill.color}` : se(l.fill, e, p, h, m - p, g - h);
1957
+ if (_) for (let t of u) t.points.length < 3 || (zt(e, t.points), e.fillStyle = _, e.fill());
1943
1958
  };
1944
- z(M, t.threeD?.floor, "floor", "floor"), z(N, t.threeD?.sideWall, "wall", "sideWall"), z(P, t.threeD?.backWall, "wall", "backWall");
1945
- let V = (t, r, i, a, o = !0) => {
1946
- for (let s of ve(t.slab, r, i, a)) {
1959
+ R(M, t.threeD?.floor, "floor", "floor"), R(N, t.threeD?.sideWall, "wall", "sideWall"), R(P, t.threeD?.backWall, "wall", "backWall");
1960
+ let z = (t, r, i, a, o = !0) => {
1961
+ for (let s of Oe(t.slab, r, i, a)) {
1947
1962
  if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
1948
1963
  let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
1949
1964
  e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
1950
1965
  }
1951
- }, H = (t, a, o) => {
1952
- nn(e, a);
1966
+ }, B = (t, a, o) => {
1967
+ yn(e, a);
1953
1968
  for (let a of t) {
1954
1969
  let t = r.fraction(a);
1955
1970
  if (o) {
1956
- i === "horizontal" ? (V(M, "floor", "x", t), V(P, "backWall", "x", t)) : (V(N, "sideWall", "y", t), V(P, "backWall", "y", t));
1971
+ i === "horizontal" ? (z(M, "floor", "x", t), z(P, "backWall", "x", t)) : (z(N, "sideWall", "y", t), z(P, "backWall", "y", t));
1957
1972
  continue;
1958
1973
  }
1959
1974
  if (i === "horizontal") {
1960
- let r = u.x + t * u.w, i = n.project(r, h, v), a = n.project(r, g, v);
1975
+ let r = l.x + t * l.w, i = n.project(r, h, v), a = n.project(r, g, v);
1961
1976
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
1962
1977
  } else {
1963
- let r = u.y + u.h - t * u.h, i = n.project(m, r, _), a = n.project(m, r, v), o = n.project(m === d ? f : d, r, v);
1978
+ let r = l.y + l.h - t * l.h, i = n.project(m, r, _), a = n.project(m, r, v), o = n.project(m === u ? f : u, r, v);
1964
1979
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke(), e.beginPath(), e.moveTo(a.x, a.y), e.lineTo(o.x, o.y), e.stroke();
1965
1980
  }
1966
1981
  }
1967
1982
  };
1968
- t.valAxisMinorGridlines === !0 && H(r.minorTicks, $t(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, l, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && H(r.majorTicks, $t(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, l, "898989", 1), !0);
1969
- let ee = (t, n) => {
1970
- nn(e, n);
1971
- for (let e of t) i === "vertical" ? (V(M, "floor", "x", e), V(P, "backWall", "x", e)) : (V(N, "sideWall", "y", e), V(P, "backWall", "y", e));
1983
+ t.valAxisMinorGridlines === !0 && B(r.minorTicks, gn(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && B(r.majorTicks, gn(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1), !0);
1984
+ let V = (t, n) => {
1985
+ yn(e, n);
1986
+ for (let e of t) i === "vertical" ? (z(M, "floor", "x", e), z(P, "backWall", "x", e)) : (z(N, "sideWall", "y", e), z(P, "backWall", "y", e));
1972
1987
  };
1973
- t.catAxisMinorGridlines === !0 && ee(S(o, s), $t(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, l, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && ee(a(o, s), $t(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, l, "E0E0E0", .5));
1974
- let U = (n, r, i) => {
1988
+ t.catAxisMinorGridlines === !0 && V(S(a, o), gn(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, c, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && V(_e(a, o), gn(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, c, "E0E0E0", .5));
1989
+ let H = (n, r, i) => {
1975
1990
  if (!n.length) return;
1976
- let a = A(t, r, i);
1991
+ let a = d(t, r, i);
1977
1992
  if (a.line === null) return;
1978
1993
  let o = a.line ?? {
1979
1994
  fillType: "solid",
1980
1995
  color: "898989"
1981
- }, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), d = Math.min(...s.map((e) => e.y)), f = Math.max(...s.map((e) => e.y)), p = o.fillType === "solid" ? `#${o.color}` : R(o, e, c, d, u - c, f - d);
1982
- if (!p) return;
1983
- let m = a.lineWidthEmu == null ? l : Math.max(.25, a.lineWidthEmu / X * l);
1984
- e.strokeStyle = p, e.lineWidth = m, e.setLineDash(ae(a.lineCustomDash, a.lineDash, m)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1996
+ }, s = n.flatMap((e) => e.points), l = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), f = Math.min(...s.map((e) => e.y)), p = Math.max(...s.map((e) => e.y)), m = o.fillType === "solid" ? `#${o.color}` : se(o, e, l, f, u - l, p - f);
1997
+ if (!m) return;
1998
+ let h = a.lineWidthEmu == null ? c : Math.max(.25, a.lineWidthEmu / W * c);
1999
+ e.strokeStyle = m, e.lineWidth = h, e.setLineDash(x(a.lineCustomDash, a.lineDash, h)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1985
2000
  for (let t of n) {
1986
2001
  if (t.points.length < 2) continue;
1987
2002
  let n = t.points.map((e, n) => ({
1988
2003
  start: e,
1989
2004
  end: t.points[(n + 1) % t.points.length]
1990
2005
  }));
1991
- if (n.some((e) => k(e.start, e.end))) {
1992
- for (let t of n) k(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
2006
+ if (n.some((e) => A(e.start, e.end))) {
2007
+ for (let t of n) A(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
1993
2008
  continue;
1994
2009
  }
1995
2010
  e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
@@ -1997,13 +2012,13 @@ function rn(e, t, n, r, i, o, s, c, l) {
1997
2012
  e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
1998
2013
  }
1999
2014
  };
2000
- U(F, t.threeD?.floor, "floor"), U(I, t.threeD?.sideWall, "wall"), U(L, t.threeD?.backWall, "wall"), e.setLineDash([]);
2015
+ H(F, t.threeD?.floor, "floor"), H(I, t.threeD?.sideWall, "wall"), H(L, t.threeD?.backWall, "wall"), e.setLineDash([]);
2001
2016
  }
2002
- function an(e, t, n, r, i, a, o, s, c) {
2003
- let l = dn(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;
2004
- u && (nn(e, en(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, c === "vertical" ? t.catAxisLineDash : t.valAxisLineDash, s)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && (nn(e, en(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, c === "vertical" ? t.valAxisLineDash : t.catAxisLineDash, s)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
2017
+ function xn(e, t, n, r, i, a, o, s, c) {
2018
+ let l = Dn(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;
2019
+ u && (yn(e, _n(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, c === "vertical" ? t.catAxisLineDash : t.valAxisLineDash, s)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && (yn(e, _n(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, c === "vertical" ? t.valAxisLineDash : t.catAxisLineDash, s)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
2005
2020
  }
2006
- function on(e, t, n, r) {
2021
+ function Sn(e, t, n, r) {
2007
2022
  let i = {
2008
2023
  x: (e.x + t.x) / 2,
2009
2024
  y: (e.y + t.y) / 2
@@ -2016,286 +2031,286 @@ function on(e, t, n, r) {
2016
2031
  y: i.y <= n.y ? -1 : 1
2017
2032
  };
2018
2033
  }
2019
- function sn(e, t, n, r, i, a, o, s, c) {
2034
+ function Cn(e, t, n, r, i, a, o, s, c) {
2020
2035
  if (!t || t === "none") return;
2021
- let l = on(r, i, a, o), u = cn(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
2036
+ let l = Sn(r, i, a, o), u = wn(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
2022
2037
  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();
2023
2038
  }
2024
- function cn(e, t) {
2039
+ function wn(e, t) {
2025
2040
  return (e === "minor" ? 4 : 6) * t;
2026
2041
  }
2027
- function ln(e, t, n) {
2042
+ function Tn(e, t, n) {
2028
2043
  if (e !== "out" && e !== "cross") return 0;
2029
- let r = cn(t, n);
2044
+ let r = wn(t, n);
2030
2045
  return e === "cross" ? r / 2 : r;
2031
2046
  }
2032
- function un(e, t, n, r) {
2047
+ function En(e, t, n, r) {
2033
2048
  if (t) return r;
2034
- let i = ln(e, "major", n);
2049
+ let i = Tn(e, "major", n);
2035
2050
  return Math.max(r, i + 3 * n);
2036
2051
  }
2037
- function dn(e, t, n, r, i, a, o) {
2038
- 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 = () => {
2052
+ function Dn(e, t, n, i, a, o, s) {
2053
+ let { front: c } = t, l = (e) => Math.max(0, Math.min(1, e)), u = t.topology.axisX === "min" ? c.x : c.x + c.w, d = t.topology.axisY === "min" ? c.y : c.y + c.h, f = () => {
2039
2054
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
2040
2055
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
2041
- return c(n.fraction(t));
2056
+ return l(n.fraction(t));
2042
2057
  }
2043
2058
  let t = e.catAxisCrosses ?? "autoZero";
2044
- return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
2045
- }, f = () => {
2059
+ return l(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
2060
+ }, p = () => {
2046
2061
  let t = e.valAxisCrossesAt;
2047
- if (t != null && Number.isFinite(t)) return T(t - 1, r, i, a);
2062
+ if (t != null && Number.isFinite(t)) return r(t - 1, i, a, o);
2048
2063
  let n = e.valAxisCrosses;
2049
2064
  if (n !== "min" && n !== "max") return null;
2050
- let o = +(n === "max");
2051
- return a ? 1 - o : o;
2052
- }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, g = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, _ = t.topology.nearDepth;
2065
+ let s = +(n === "max");
2066
+ return o ? 1 - s : s;
2067
+ }, m = f(), h = p(), g = s === "horizontal" ? c.x + m * c.w : h == null ? u : c.x + h * c.w, _ = s === "vertical" ? c.y + c.h - m * c.h : h == null ? d : c.y + h * c.h, v = t.topology.nearDepth;
2053
2068
  return {
2054
- axisX: h,
2055
- axisY: g,
2056
- depth: _,
2057
- horizontalStart: t.project(s.x, g, _),
2058
- horizontalEnd: t.project(s.x + s.w, g, _),
2059
- verticalStart: t.project(h, s.y + s.h, _),
2060
- verticalEnd: t.project(h, s.y, _)
2069
+ axisX: g,
2070
+ axisY: _,
2071
+ depth: v,
2072
+ horizontalStart: t.project(c.x, _, v),
2073
+ horizontalEnd: t.project(c.x + c.w, _, v),
2074
+ verticalStart: t.project(g, c.y + c.h, v),
2075
+ verticalEnd: t.project(g, c.y, v)
2061
2076
  };
2062
2077
  }
2063
- function fn(e, t, n, r, i, o, s, c, l, u) {
2064
- let { front: d } = n, f = dn(t, n, r, i, o, s, c), { axisX: p, axisY: m, depth: h } = f, g = n.project(d.x + d.w / 2, d.y + d.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = l ? tn : en;
2078
+ function On(e, t, n, i, a, o, s, c, l, u) {
2079
+ let { front: d } = n, f = Dn(t, n, i, a, o, s, c), { axisX: p, axisY: m, depth: h } = f, g = n.project(d.x + d.w / 2, d.y + d.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = l ? vn : _n;
2065
2080
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
2066
- nn(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
2067
- let i = (e) => c === "horizontal" ? n.project(d.x + r.fraction(e) * d.w, m, h) : n.project(p, d.y + d.h - r.fraction(e) * d.h, h), a = c === "horizontal" ? f.horizontalStart : f.verticalStart, o = c === "horizontal" ? f.horizontalEnd : f.verticalEnd;
2068
- for (let n of r.majorTicks) sn(e, t.valAxisMajorTickMark, i(n), a, o, g, c === "vertical" ? "horizontal" : "vertical", "major", u);
2069
- for (let t of r.minorTicks) sn(e, _, i(t), a, o, g, c === "vertical" ? "horizontal" : "vertical", "minor", u);
2081
+ yn(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
2082
+ let r = (e) => c === "horizontal" ? n.project(d.x + i.fraction(e) * d.w, m, h) : n.project(p, d.y + d.h - i.fraction(e) * d.h, h), a = c === "horizontal" ? f.horizontalStart : f.verticalStart, o = c === "horizontal" ? f.horizontalEnd : f.verticalEnd;
2083
+ for (let n of i.majorTicks) Cn(e, t.valAxisMajorTickMark, r(n), a, o, g, c === "vertical" ? "horizontal" : "vertical", "major", u);
2084
+ for (let t of i.minorTicks) Cn(e, _, r(t), a, o, g, c === "vertical" ? "horizontal" : "vertical", "minor", u);
2070
2085
  }
2071
2086
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
2072
- nn(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
2073
- let r = c === "vertical" ? f.horizontalStart : f.verticalStart, _ = c === "vertical" ? f.horizontalEnd : f.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (i) => {
2074
- let a = c === "vertical" ? n.project(d.x + i * d.w, m, h) : n.project(p, d.y + i * d.h, h);
2075
- sn(e, t.catAxisMajorTickMark, a, r, _, g, c === "vertical" ? "vertical" : "horizontal", "major", u);
2087
+ yn(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
2088
+ let i = c === "vertical" ? f.horizontalStart : f.verticalStart, _ = c === "vertical" ? f.horizontalEnd : f.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (r) => {
2089
+ let a = c === "vertical" ? n.project(d.x + r * d.w, m, h) : n.project(p, d.y + r * d.h, h);
2090
+ Cn(e, t.catAxisMajorTickMark, a, i, _, g, c === "vertical" ? "vertical" : "horizontal", "major", u);
2076
2091
  };
2077
2092
  if (l) {
2078
- let e = a(i, o);
2093
+ let e = _e(a, o);
2079
2094
  for (let t = 0; t < e.length; t += y) b(s ? 1 - e[t] : e[t]);
2080
- } else for (let e = 0; e < i; e += y) b(T(e, i, o, s));
2095
+ } else for (let e = 0; e < a; e += y) b(r(e, a, o, s));
2081
2096
  let x = t.catAxisMinorUnit;
2082
2097
  if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && x != null && Number.isFinite(x) && x > 0) {
2083
- let a = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, l = Math.min(512, Math.ceil(i / x));
2084
- for (let f = 1; f < l; f++) {
2085
- let l = f * x;
2086
- if (!(l < i)) break;
2087
- if (Math.abs(l / a - Math.round(l / a)) < 1e-9) continue;
2088
- let v = T(l, i, o, s), y = c === "vertical" ? n.project(d.x + v * d.w, m, h) : n.project(p, d.y + v * d.h, h);
2089
- sn(e, t.catAxisMinorTickMark, y, r, _, g, c === "vertical" ? "vertical" : "horizontal", "minor", u);
2098
+ let l = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, f = Math.min(512, Math.ceil(a / x));
2099
+ for (let v = 1; v < f; v++) {
2100
+ let f = v * x;
2101
+ if (!(f < a)) break;
2102
+ if (Math.abs(f / l - Math.round(f / l)) < 1e-9) continue;
2103
+ let y = r(f, a, o, s), b = c === "vertical" ? n.project(d.x + y * d.w, m, h) : n.project(p, d.y + y * d.h, h);
2104
+ Cn(e, t.catAxisMinorTickMark, b, i, _, g, c === "vertical" ? "vertical" : "horizontal", "minor", u);
2090
2105
  }
2091
2106
  }
2092
2107
  }
2093
2108
  e.setLineDash([]);
2094
2109
  }
2095
- function pn(t, r, i, a, o) {
2096
- if (!r.threeD) return !1;
2097
- let s = r.chartType === "clusteredBar" || r.chartType === "clusteredBarH" || r.chartType.startsWith("stackedBar"), c = r.chartType.endsWith("H") || r.chartType.includes("BarH"), l = r.chartType.startsWith("stacked"), p = s && !l && r.threeD.barGrouping === "standard", { plot: h, legend: g, legendMeasure: _ } = Ht(t, r, i, a, c ? "horizontal" : "vertical", o), y = he(r.threeD, h, {
2098
- sceneDepthScale: s ? p ? .65 : .1 : .4,
2099
- perspectiveTangentGain: p ? 1 : 2,
2100
- sceneHeightScale: !s && !(r.threeD.heightPercentAuthored ?? r.threeD.heightPercent != null) ? 1 / 3 : void 0
2110
+ function kn(e, t, n, a, o) {
2111
+ if (!t.threeD) return !1;
2112
+ let s = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), c = t.chartType.endsWith("H") || t.chartType.includes("BarH"), u = t.chartType.startsWith("stacked"), d = s && !u && t.threeD.barGrouping === "standard", { plot: f, legend: p, legendMeasure: h } = rn(e, t, n, a, c ? "horizontal" : "vertical", o), _ = Te(t.threeD, f, {
2113
+ sceneDepthScale: s ? d ? .65 : .1 : .4,
2114
+ perspectiveTangentGain: d ? 1 : 2,
2115
+ sceneHeightScale: !s && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
2101
2116
  });
2102
- if (!y) return !0;
2103
- y = _e(y, r.threeD, h);
2104
- let b = r.chartType.endsWith("Pct"), x = r.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? r.categories, S = Math.max(1, x.length, ...r.series.map((e) => e.values.length)), C = b ? vt(r, S) : void 0, E = r.catAxisOrientation === "maxMin", D = r.catAxisCrossBetween === "between", O = r.dispBlanksAs ?? "gap", k = r.valAxisLogBase != null && Number.isFinite(r.valAxisLogBase) && r.valAxisLogBase >= 2, A = (e, t) => {
2105
- let n = r.series[e]?.values[t];
2106
- return n != null && Number.isFinite(n) && (!k || n > 0) || n == null && (l || O === "zero");
2107
- }, j = (e, t) => yt(r, e, t, C), M = 0, N = 0;
2108
- if (l) {
2109
- for (let e = 0; e < S; e++) {
2110
- let t = 0, n = 0;
2111
- for (let i = 0; i < r.series.length; i++) {
2112
- let r = j(i, e);
2113
- r >= 0 ? t = bt(t, r) : n = bt(n, r);
2117
+ if (!_) return !0;
2118
+ _ = De(_, t.threeD, f);
2119
+ let v = t.chartType.endsWith("Pct"), y = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, b = Math.max(1, y.length, ...t.series.map((e) => e.values.length)), S = v ? kt(t, b) : void 0, w = t.catAxisOrientation === "maxMin", T = t.catAxisCrossBetween === "between", E = t.dispBlanksAs ?? "gap", D = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, O = (e, n) => {
2120
+ let r = t.series[e]?.values[n];
2121
+ return r != null && Number.isFinite(r) && (!D || r > 0) || r == null && (u || E === "zero");
2122
+ }, k = (e, n) => At(t, e, n, S), A = 0, j = 0;
2123
+ if (u) {
2124
+ for (let e = 0; e < b; e++) {
2125
+ let n = 0, r = 0;
2126
+ for (let i = 0; i < t.series.length; i++) {
2127
+ let t = k(i, e);
2128
+ t >= 0 ? n = jt(n, t) : r = jt(r, t);
2114
2129
  }
2115
- M = Math.min(M, n), N = Math.max(N, t);
2130
+ A = Math.min(A, r), j = Math.max(j, n);
2116
2131
  }
2117
- b && (M = M < 0 ? -100 : 0, N = N > 0 ? 100 : 0, M === 0 && N === 0 && (N = 1));
2132
+ v && (A = A < 0 ? -100 : 0, j = j > 0 ? 100 : 0, A === 0 && j === 0 && (j = 1));
2118
2133
  } else {
2119
- let e = Te(r.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!k || e > 0)), k ? {
2134
+ let e = g(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!D || e > 0)), D ? {
2120
2135
  min: 1,
2121
2136
  max: 10
2122
2137
  } : {
2123
2138
  min: 0,
2124
2139
  max: 1
2125
2140
  });
2126
- M = k ? e.min : Math.min(0, e.min), N = k ? e.max : Math.max(0, e.max);
2141
+ A = D ? e.min : Math.min(0, e.min), j = D ? e.max : Math.max(0, e.max);
2127
2142
  }
2128
- let P = c ? y.project(y.front.x, y.topology.axisY === "min" ? y.front.y : y.front.y + y.front.h, y.topology.nearDepth) : y.project(y.topology.axisX === "min" ? y.front.x : y.front.x + y.front.w, y.front.y, y.topology.nearDepth), F = c ? y.project(y.front.x + y.front.w, y.topology.axisY === "min" ? y.front.y : y.front.y + y.front.h, y.topology.nearDepth) : y.project(y.topology.axisX === "min" ? y.front.x : y.front.x + y.front.w, y.front.y + y.front.h, y.topology.nearDepth), I = Math.hypot(F.x - P.x, F.y - P.y) / a, L = Xt(r, M, N, I, b, c ? "horizontal" : "vertical"), R = (e) => Number.isFinite(e) ? Math.max(L.min, Math.min(L.max, e)) : L.min;
2129
- s || rn(t, r, y, L, c ? "horizontal" : "vertical", S, D, E, a);
2130
- let { front: z } = y, B = Math.max(1, r.series.length), V = [], H = r.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), ee = r.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2143
+ let N = c ? _.project(_.front.x, _.topology.axisY === "min" ? _.front.y : _.front.y + _.front.h, _.topology.nearDepth) : _.project(_.topology.axisX === "min" ? _.front.x : _.front.x + _.front.w, _.front.y, _.topology.nearDepth), P = c ? _.project(_.front.x + _.front.w, _.topology.axisY === "min" ? _.front.y : _.front.y + _.front.h, _.topology.nearDepth) : _.project(_.topology.axisX === "min" ? _.front.x : _.front.x + _.front.w, _.front.y + _.front.h, _.topology.nearDepth), F = Math.hypot(P.x - N.x, P.y - N.y) / a, I = pn(t, A, j, F, v, c ? "horizontal" : "vertical"), L = (e) => Number.isFinite(e) ? Math.max(I.min, Math.min(I.max, e)) : I.min;
2144
+ s || bn(e, t, _, I, c ? "horizontal" : "vertical", b, T, w, a);
2145
+ let { front: R } = _, z = Math.max(1, t.series.length), ee = [], G = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), q = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2131
2146
  if (s) {
2132
- let n = y.prismInterval(0, 1, !0), s = [], u = Array(S).fill(0), d = Array(S).fill(0), f = (c ? z.h : z.w) / S, m = r.barGapWidth != null && Number.isFinite(r.barGapWidth) && r.barGapWidth >= 0 ? r.barGapWidth : 150;
2133
- for (let e = 0; e < r.series.length; e++) {
2134
- let t = r.series[e], i = p ? y.prismInterval(e, B, !1) : n, o = xe(f, m, p ? 0 : e, p ? 1 : B, l || p);
2135
- for (let n = 0; n < S; n++) {
2136
- if (!A(e, n)) continue;
2137
- let p = j(e, n), m = Q(r, t, H[e].get(n), n, e), h = m.fill === null ? "transparent" : m.color, g = m.lineFill !== null && (m.lineColor != null || m.lineFill !== void 0), _ = l ? p >= 0 ? u[n] : d[n] : 0, v = bt(_, p);
2138
- l && (p >= 0 ? u[n] = v : d[n] = v);
2139
- let y = R(_), x = R(v), C = t.threeDShape ?? r.threeD.shape ?? "box", w = C === "cone" || C === "pyramid", T = C === "coneToMax" || C === "pyramidToMax", D = (e) => {
2140
- if (!w) return 1;
2141
- let t = k && !(_ > 0) ? L.min : _, n = L.fraction(t), r = L.fraction(v), i = L.fraction(e), a = r - n;
2142
- return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
2143
- }, O = (e) => {
2147
+ let r = _.prismInterval(0, 1, !0), i = [], s = Array(b).fill(0), f = Array(b).fill(0), p = (c ? R.h : R.w) / b, h = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2148
+ for (let e = 0; e < t.series.length; e++) {
2149
+ let n = t.series[e], o = d ? _.prismInterval(e, z, !1) : r, l = je(p, h, d ? 0 : e, d ? 1 : z, u || d);
2150
+ for (let r = 0; r < b; r++) {
2151
+ if (!O(e, r)) continue;
2152
+ let d = k(e, r), m = $(t, n, G[e].get(r), r, e), h = m.fill === null ? "transparent" : m.color, g = m.lineFill !== null && (m.lineColor != null || m.lineFill !== void 0), _ = u ? d >= 0 ? s[r] : f[r] : 0, y = jt(_, d);
2153
+ u && (d >= 0 ? s[r] = y : f[r] = y);
2154
+ let x = L(_), S = L(y), C = n.threeDShape ?? t.threeD.shape ?? "box", T = C === "cone" || C === "pyramid", E = C === "coneToMax" || C === "pyramidToMax", A = (e) => {
2144
2155
  if (!T) return 1;
2145
- let t = v >= _ ? L.max : L.min, n = k ? L.min : 0, r = L.fraction(t), i = L.fraction(n), a = L.fraction(e), o = Math.abs(r - i);
2156
+ let t = D && !(_ > 0) ? I.min : _, n = I.fraction(t), r = I.fraction(y), i = I.fraction(e), a = r - n;
2157
+ return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
2158
+ }, j = (e) => {
2159
+ if (!E) return 1;
2160
+ let t = y >= _ ? I.max : I.min, n = D ? I.min : 0, r = I.fraction(t), i = I.fraction(n), a = I.fraction(e), o = Math.abs(r - i);
2146
2161
  return !(o > 0) || ![
2147
2162
  r,
2148
2163
  i,
2149
2164
  a
2150
- ].every(Number.isFinite) ? pe(e, L.min, L.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2151
- }, M = T ? O(y) : D(y), N = T ? O(x) : D(x);
2165
+ ].every(Number.isFinite) ? we(e, I.min, I.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2166
+ }, M = E ? j(x) : A(x), N = E ? j(S) : A(S);
2152
2167
  if (c) {
2153
- let t = z.x + L.fraction(y) * z.w, r = z.x + L.fraction(x) * z.w, c = E ? S - 1 - n : n, l = z.y + c * f + o.offset;
2154
- s.push({
2155
- x: Math.min(t, r),
2156
- y: l,
2157
- width: Math.abs(r - t),
2158
- height: o.size,
2159
- nearDepth: i.near,
2160
- farDepth: i.far,
2161
- categoryIndex: n,
2168
+ let t = R.x + I.fraction(x) * R.w, n = R.x + I.fraction(S) * R.w, s = w ? b - 1 - r : r, c = R.y + s * p + l.offset;
2169
+ i.push({
2170
+ x: Math.min(t, n),
2171
+ y: c,
2172
+ width: Math.abs(n - t),
2173
+ height: l.size,
2174
+ nearDepth: o.near,
2175
+ farDepth: o.far,
2176
+ categoryIndex: r,
2162
2177
  seriesIndex: e,
2163
2178
  color: h,
2164
2179
  fillPaint: m.fill,
2165
2180
  lineFill: m.lineFill,
2166
2181
  shape: C,
2167
2182
  baseCoord: t,
2168
- endCoord: r,
2183
+ endCoord: n,
2169
2184
  baseScale: M,
2170
2185
  endScale: N,
2171
2186
  omitBaseCap: !1,
2172
2187
  omitEndCap: !1,
2173
2188
  outline: g,
2174
2189
  outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2175
- outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
2190
+ outlineWidth: m.lineWidthEmu == null ? .75 * a / U : Tt(m.lineWidthEmu, a),
2176
2191
  outlineDash: m.lineDash ?? "solid",
2177
2192
  outlineCustomDash: m.lineCustomDash,
2178
2193
  outlineCap: m.lineCap,
2179
2194
  outlineJoin: m.lineJoin,
2180
- labelValue: b ? p / 100 : p,
2181
- plottedLabelValue: v
2195
+ labelValue: v ? d / 100 : d,
2196
+ plottedLabelValue: y
2182
2197
  });
2183
2198
  } else {
2184
- let t = z.y + z.h - L.fraction(y) * z.h, r = z.y + z.h - L.fraction(x) * z.h, c = E ? S - 1 - n : n, l = z.x + c * f + o.offset;
2185
- s.push({
2186
- x: l,
2187
- y: Math.min(t, r),
2188
- width: o.size,
2189
- height: Math.abs(r - t),
2190
- nearDepth: i.near,
2191
- farDepth: i.far,
2192
- categoryIndex: n,
2199
+ let t = R.y + R.h - I.fraction(x) * R.h, n = R.y + R.h - I.fraction(S) * R.h, s = w ? b - 1 - r : r, c = R.x + s * p + l.offset;
2200
+ i.push({
2201
+ x: c,
2202
+ y: Math.min(t, n),
2203
+ width: l.size,
2204
+ height: Math.abs(n - t),
2205
+ nearDepth: o.near,
2206
+ farDepth: o.far,
2207
+ categoryIndex: r,
2193
2208
  seriesIndex: e,
2194
2209
  color: h,
2195
2210
  fillPaint: m.fill,
2196
2211
  lineFill: m.lineFill,
2197
2212
  shape: C,
2198
2213
  baseCoord: t,
2199
- endCoord: r,
2214
+ endCoord: n,
2200
2215
  baseScale: M,
2201
2216
  endScale: N,
2202
2217
  omitBaseCap: !1,
2203
2218
  omitEndCap: !1,
2204
2219
  outline: g,
2205
2220
  outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2206
- outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
2221
+ outlineWidth: m.lineWidthEmu == null ? .75 * a / U : Tt(m.lineWidthEmu, a),
2207
2222
  outlineDash: m.lineDash ?? "solid",
2208
2223
  outlineCustomDash: m.lineCustomDash,
2209
2224
  outlineCap: m.lineCap,
2210
2225
  outlineJoin: m.lineJoin,
2211
- labelValue: b ? p / 100 : p,
2212
- plottedLabelValue: v
2226
+ labelValue: v ? d / 100 : d,
2227
+ plottedLabelValue: y
2213
2228
  });
2214
2229
  }
2215
2230
  }
2216
2231
  }
2217
- if (l) {
2218
- let e = ht(s, S);
2219
- for (let t = 0; t < S; t++) {
2232
+ if (u) {
2233
+ let e = Et(i, b);
2234
+ for (let t = 0; t < b; t++) {
2220
2235
  let n = e[t];
2221
2236
  for (let e of [-1, 1]) {
2222
- let t = n.filter((t) => Math.sign(t.labelValue) === e && !Dt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2237
+ let t = n.filter((t) => Math.sign(t.labelValue) === e && !Bt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2223
2238
  for (let e = 0; e + 1 < t.length; e++) {
2224
2239
  let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
2225
2240
  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);
2226
2241
  }
2227
2242
  }
2228
- let r = n.find((e) => e.labelValue > 0 && !Dt(e.color)), i = n.find((e) => e.labelValue < 0 && !Dt(e.color));
2243
+ let r = n.find((e) => e.labelValue > 0 && !Bt(e.color)), i = n.find((e) => e.labelValue < 0 && !Bt(e.color));
2229
2244
  if (r && i) {
2230
2245
  let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
2231
2246
  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);
2232
2247
  }
2233
2248
  }
2234
2249
  }
2235
- rn(t, r, y, L, c ? "horizontal" : "vertical", S, D, E, a);
2236
- let h = {
2237
- remaining: Ke,
2250
+ bn(e, t, _, I, c ? "horizontal" : "vertical", b, T, w, a);
2251
+ let g = {
2252
+ remaining: rt,
2238
2253
  exceeded: !1
2239
- }, g = s.map((e) => {
2240
- let n = At(y, e.shape, c, 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 ? {
2241
- color: e.outlineColor,
2242
- width: e.outlineWidth,
2243
- dash: ae(e.outlineCustomDash, e.outlineDash, e.outlineWidth),
2244
- cap: e.outlineCap,
2245
- join: e.outlineJoin
2246
- } : void 0, h);
2247
- return Ft(t, n, "fill", e.fillPaint, o), Ft(t, n, "outline", e.lineFill, o), {
2248
- item: e,
2254
+ }, y = i.map((t) => {
2255
+ let n = Ut(_, t.shape, c, t.x, t.y, t.width, t.height, t.baseCoord, t.endCoord, t.nearDepth, t.farDepth, t.color, t.baseScale, t.endScale, t.omitBaseCap, t.omitEndCap, t.outline && t.outlineColor ? {
2256
+ color: t.outlineColor,
2257
+ width: t.outlineWidth,
2258
+ dash: x(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2259
+ cap: t.outlineCap,
2260
+ join: t.outlineJoin
2261
+ } : void 0, g);
2262
+ return Jt(e, n, "fill", t.fillPaint, o), Jt(e, n, "outline", t.lineFill, o), {
2263
+ item: t,
2249
2264
  faces: n
2250
2265
  };
2251
- }), _ = g.flatMap((e) => e.faces);
2252
- if (h.exceeded) return It(t, i), !0;
2253
- for (let e of Ge(_)) Nt(t, e);
2254
- for (let { item: n, faces: i } of g) {
2255
- let o = r.series[n.seriesIndex], s = H[n.seriesIndex].get(n.categoryIndex), c = De(r, o, n.categoryIndex, n.seriesIndex), l = e(s?.chartexStyle), u = e(o.chartexStyle);
2256
- ne(t, l ?? u, q(r, "dataPoint3D", n.seriesIndex), l ? n.categoryIndex : c, a, (e) => Pt(e, i), c);
2266
+ }), S = y.flatMap((e) => e.faces);
2267
+ if (g.exceeded) return Yt(e, n), !0;
2268
+ for (let t of nt(S)) Kt(e, t);
2269
+ for (let { item: n, faces: r } of y) {
2270
+ let i = t.series[n.seriesIndex], o = G[n.seriesIndex].get(n.categoryIndex), s = Le(t, i, n.categoryIndex, n.seriesIndex), c = m(o?.chartexStyle), u = m(i.chartexStyle);
2271
+ xe(e, c ?? u, l(t, "dataPoint3D", n.seriesIndex), c ? n.categoryIndex : s, a, (e) => qt(e, r), s);
2257
2272
  }
2258
- for (let e of s) {
2259
- let n = r.series[e.seriesIndex], s = c ? y.project(e.endCoord, e.y + e.height / 2, (e.nearDepth + e.farDepth) / 2) : y.project(e.x + e.width / 2, e.endCoord, (e.nearDepth + e.farDepth) / 2), l = ee[e.seriesIndex].get(e.categoryIndex);
2260
- Vt(r, n, l) && V.push(() => Bt(t, r, n, e.seriesIndex, e.categoryIndex, e.labelValue, s, i, a, 0, void 0, l, "t", s, !0, r.valAxisDisplayUnits, L.max, e.plottedLabelValue, o));
2273
+ for (let r of i) {
2274
+ let i = t.series[r.seriesIndex], s = c ? _.project(r.endCoord, r.y + r.height / 2, (r.nearDepth + r.farDepth) / 2) : _.project(r.x + r.width / 2, r.endCoord, (r.nearDepth + r.farDepth) / 2), l = q[r.seriesIndex].get(r.categoryIndex);
2275
+ nn(t, i, l) && ee.push(() => tn(e, t, i, r.seriesIndex, r.categoryIndex, r.labelValue, s, n, a, 0, void 0, l, "t", s, !0, t.valAxisDisplayUnits, I.max, r.plottedLabelValue, o));
2261
2276
  }
2262
2277
  } else {
2263
- let e = r.series.map(() => Array(S).fill(0)), s = r.series.map(() => Array(S).fill(0));
2264
- if (l) {
2265
- let t = Array(S).fill(0), n = Array(S).fill(0);
2266
- for (let i = 0; i < r.series.length; i++) for (let r = 0; r < S; r++) {
2267
- let a = j(i, r), o = a >= 0 ? t[r] : n[r];
2268
- e[i][r] = o, s[i][r] = bt(o, a), a >= 0 ? t[r] = bt(t[r], a) : n[r] = bt(n[r], a);
2278
+ let i = t.series.map(() => Array(b).fill(0)), s = t.series.map(() => Array(b).fill(0));
2279
+ if (u) {
2280
+ let e = Array(b).fill(0), n = Array(b).fill(0);
2281
+ for (let r = 0; r < t.series.length; r++) for (let t = 0; t < b; t++) {
2282
+ let a = k(r, t), o = a >= 0 ? e[t] : n[t];
2283
+ i[r][t] = o, s[r][t] = jt(o, a), a >= 0 ? e[t] = jt(e[t], a) : n[t] = jt(n[t], a);
2269
2284
  }
2270
2285
  }
2271
2286
  let c = (e) => {
2272
- let t = y.seriesDepth(e, B, l), n = 0, r = 0;
2273
- for (let i = 0; i < S; i++) {
2274
- if (!A(e, i)) continue;
2275
- let a = l ? s[e][i] : j(e, i), o = z.x + T(i, S, D, E) * z.w, c = z.y + z.h - L.fraction(R(a)) * z.h;
2276
- n += y.cameraDepth(o, c, t), r++;
2287
+ let t = _.seriesDepth(e, z, u), n = 0, i = 0;
2288
+ for (let a = 0; a < b; a++) {
2289
+ if (!O(e, a)) continue;
2290
+ let o = u ? s[e][a] : k(e, a), c = R.x + r(a, b, T, w) * R.w, l = R.y + R.h - I.fraction(L(o)) * R.h;
2291
+ n += _.cameraDepth(c, l, t), i++;
2277
2292
  }
2278
- return r > 0 ? n / r : -Infinity;
2279
- }, d = r.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), f = r.series.map((e, t) => Q(r, e, void 0, t, t)), p = [], h = [], g = !1;
2280
- for (let c of d) {
2281
- if (g) break;
2282
- let d = r.series[c], _ = f[c], v = _.fill === null ? "transparent" : _.color, x = l ? y.prismInterval(0, 1, !0) : y.prismInterval(c, B, !1), C = z.x + z.w / 2, w = z.y + z.h / 2, k = y.cameraDepth(C, w, x.near) >= y.cameraDepth(C, w, x.far) ? x.near : x.far, M = [], N = [], P = [], F = [], I = [], R = [], U = [], te = [], W = [], G = [];
2283
- for (let t = 0; t < S; t++) {
2284
- if (!A(c, t)) {
2285
- M.push(null), N.push(null), P.push(null), F.push(null), I.push(null), R.push(null), U.push(null), te.push(null), W.push(null), G.push(null);
2293
+ return i > 0 ? n / i : -Infinity;
2294
+ }, l = t.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), d = t.series.map((e, n) => $(t, e, void 0, n, n)), f = [], p = [], m = !1;
2295
+ for (let c of l) {
2296
+ if (m) break;
2297
+ let l = t.series[c], h = d[c], g = h.fill === null ? "transparent" : h.color, y = u ? _.prismInterval(0, 1, !0) : _.prismInterval(c, z, !1), S = R.x + R.w / 2, D = R.y + R.h / 2, A = _.cameraDepth(S, D, y.near) >= _.cameraDepth(S, D, y.far) ? y.near : y.far, j = [], M = [], N = [], P = [], F = [], L = [], B = [], H = [], U = [], K = [];
2298
+ for (let e = 0; e < b; e++) {
2299
+ if (!O(c, e)) {
2300
+ j.push(null), M.push(null), N.push(null), P.push(null), F.push(null), L.push(null), B.push(null), H.push(null), U.push(null), K.push(null);
2286
2301
  continue;
2287
2302
  }
2288
- let n = l ? s[c][t] : j(c, t), i = l ? e[c][t] : 0, a = z.x + T(t, S, D, E) * z.w, o = L.fraction(n), u = L.fraction(i), d = Number.isFinite(u) ? u : i <= L.min ? 0 : 1, f = Number.isFinite(o) && o >= 0 && o <= 1, p = Number.isFinite(o) ? Math.max(0, Math.min(1, o)) : n <= L.min ? 0 : 1, m = z.y + z.h - p * z.h, h = z.y + z.h - Math.max(0, Math.min(1, d)) * z.h;
2289
- M.push(r.chartType.toLowerCase().includes("area") || f ? y.project(a, m, k) : null), N.push(y.project(a, h, k)), P.push(f ? y.cameraDepth(a, m, k) : null), F.push(y.cameraDepth(a, h, k)), I.push(n), R.push(a), U.push(m), te.push(h), W.push(o), G.push(d);
2303
+ let n = u ? s[c][e] : k(c, e), a = u ? i[c][e] : 0, o = R.x + r(e, b, T, w) * R.w, l = I.fraction(n), d = I.fraction(a), f = Number.isFinite(d) ? d : a <= I.min ? 0 : 1, p = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= I.min ? 0 : 1, h = R.y + R.h - m * R.h, g = R.y + R.h - Math.max(0, Math.min(1, f)) * R.h;
2304
+ j.push(t.chartType.toLowerCase().includes("area") || p ? _.project(o, h, A) : null), M.push(_.project(o, g, A)), N.push(p ? _.cameraDepth(o, h, A) : null), P.push(_.cameraDepth(o, g, A)), F.push(n), L.push(o), B.push(h), H.push(g), U.push(l), K.push(f);
2290
2305
  }
2291
- let K = [], q = null;
2292
- for (let e = 0; e < M.length; e++) {
2293
- let t = M[e], n = N[e];
2306
+ let ne = [], J = null;
2307
+ for (let e = 0; e < j.length; e++) {
2308
+ let t = j[e], n = M[e];
2294
2309
  if (!t || !n) {
2295
- O === "gap" && (q && K.push(q), q = null);
2310
+ E === "gap" && (J && ne.push(J), J = null);
2296
2311
  continue;
2297
2312
  }
2298
- q ??= {
2313
+ J ??= {
2299
2314
  upper: [],
2300
2315
  lower: [],
2301
2316
  upperDepths: [],
@@ -2306,81 +2321,81 @@ function pn(t, r, i, a, o) {
2306
2321
  lowerYs: [],
2307
2322
  upperFractions: [],
2308
2323
  lowerFractions: []
2309
- }, q.upper.push(t), q.lower.push(n), q.upperDepths.push(P[e] ?? 0), q.lowerDepths.push(F[e] ?? 0), q.indices.push(e), q.sceneXs.push(R[e] ?? 0), q.upperYs.push(U[e] ?? 0), q.lowerYs.push(te[e] ?? 0), q.upperFractions.push(W[e] ?? 0), q.lowerFractions.push(G[e] ?? 0);
2324
+ }, J.upper.push(t), J.lower.push(n), J.upperDepths.push(N[e] ?? 0), J.lowerDepths.push(P[e] ?? 0), J.indices.push(e), J.sceneXs.push(L[e] ?? 0), J.upperYs.push(B[e] ?? 0), J.lowerYs.push(H[e] ?? 0), J.upperFractions.push(U[e] ?? 0), J.lowerFractions.push(K[e] ?? 0);
2310
2325
  }
2311
- q && K.push(q);
2312
- let J = [], ne = [];
2313
- if (r.chartType.toLowerCase().includes("area")) {
2314
- for (let e of K) {
2326
+ J && ne.push(J);
2327
+ let Y = [], X = [];
2328
+ if (t.chartType.toLowerCase().includes("area")) {
2329
+ for (let t of ne) {
2315
2330
  let n = null;
2316
- for (let r = 0; r + 1 < e.upper.length; r++) {
2317
- let i = ze(e.lowerFractions[r], e.lowerFractions[r + 1], e.upperFractions[r], e.upperFractions[r + 1]);
2331
+ for (let r = 0; r + 1 < t.upper.length; r++) {
2332
+ let i = Xe(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2318
2333
  for (let a = 0; a < i.length; a++) {
2319
- let o = i[a], s = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.startT, c = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.endT, l = z.y + z.h - o.lowerStart * z.h, u = z.y + z.h - o.lowerEnd * z.h, d = z.y + z.h - o.upperStart * z.h, f = z.y + z.h - o.upperEnd * z.h, m = {
2320
- ...y.project(s, d, k),
2321
- cameraDepth: y.cameraDepth(s, d, k),
2322
- cameraWeight: y.cameraProjectionWeight(s, d, k)
2323
- }, h = {
2324
- ...y.project(c, f, k),
2325
- cameraDepth: y.cameraDepth(c, f, k),
2326
- cameraWeight: y.cameraProjectionWeight(c, f, k)
2334
+ 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, l = R.y + R.h - o.lowerStart * R.h, u = R.y + R.h - o.lowerEnd * R.h, d = R.y + R.h - o.upperStart * R.h, p = R.y + R.h - o.upperEnd * R.h, h = {
2335
+ ..._.project(s, d, A),
2336
+ cameraDepth: _.cameraDepth(s, d, A),
2337
+ cameraWeight: _.cameraProjectionWeight(s, d, A)
2338
+ }, v = {
2339
+ ..._.project(c, p, A),
2340
+ cameraDepth: _.cameraDepth(c, p, A),
2341
+ cameraWeight: _.cameraProjectionWeight(c, p, A)
2327
2342
  };
2328
- n != null && Math.hypot(n.at(-1).x - m.x, n.at(-1).y - m.y) <= 1e-8 ? n.push(h) : (n && n.length >= 2 && J.push(n), n = [m, h]);
2329
- let _ = kt(y, s, c, l, u, d, f, x.near, x.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === e.upper.length && a + 1 === i.length && o.endT === 1);
2330
- for (let e of _) {
2331
- if (p.length >= 1e4) {
2332
- g = !0;
2343
+ n != null && Math.hypot(n.at(-1).x - h.x, n.at(-1).y - h.y) <= 1e-8 ? n.push(v) : (n && n.length >= 2 && Y.push(n), n = [h, v]);
2344
+ let b = Ht(_, s, c, l, u, d, p, y.near, y.far, g, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2345
+ for (let t of b) {
2346
+ if (f.length >= 1e4) {
2347
+ m = !0;
2333
2348
  break;
2334
2349
  }
2335
- p.push({
2336
- points: e.points,
2337
- cameraDepth: e.cameraDepth,
2338
- cameraDepths: e.cameraDepths,
2339
- cameraWeights: e.cameraWeights,
2350
+ f.push({
2351
+ points: t.points,
2352
+ cameraDepth: t.cameraDepth,
2353
+ cameraDepths: t.cameraDepths,
2354
+ cameraWeights: t.cameraWeights,
2340
2355
  layer: 0,
2341
- paint: () => Nt(t, e)
2342
- }), ne.push(e);
2356
+ paint: () => Kt(e, t)
2357
+ }), X.push(t);
2343
2358
  }
2344
- if (g) break;
2359
+ if (m) break;
2345
2360
  }
2346
- if (g) break;
2361
+ if (m) break;
2347
2362
  }
2348
- if (n && n.length >= 2 && J.push(n), g) break;
2363
+ if (n && n.length >= 2 && Y.push(n), m) break;
2349
2364
  }
2350
- Ft(t, ne, "fill", _.fill, o);
2365
+ Jt(e, X, "fill", h.fill, o);
2351
2366
  }
2352
- let Y = [];
2353
- if (!r.chartType.toLowerCase().includes("area")) {
2367
+ let re = [];
2368
+ if (!t.chartType.toLowerCase().includes("area")) {
2354
2369
  let e = [], t = null;
2355
- for (let n = 0; n < S; n++) {
2356
- let r = I[n], i = r == null ? NaN : L.fraction(r);
2357
- if (r == null || !Number.isFinite(i)) {
2358
- O === "gap" && t && (e.push(t), t = null);
2370
+ for (let n = 0; n < b; n++) {
2371
+ let i = F[n], a = i == null ? NaN : I.fraction(i);
2372
+ if (i == null || !Number.isFinite(a)) {
2373
+ E === "gap" && t && (e.push(t), t = null);
2359
2374
  continue;
2360
2375
  }
2361
2376
  t ??= [], t.push({
2362
- x: z.x + T(n, S, D, E) * z.w,
2363
- fraction: i,
2377
+ x: R.x + r(n, b, T, w) * R.w,
2378
+ fraction: a,
2364
2379
  ownerIndex: n
2365
2380
  });
2366
2381
  }
2367
2382
  t && e.push(t);
2368
2383
  let n = (e) => {
2369
- let t = Math.max(0, Math.min(1, e.fraction)), n = z.y + z.h - t * z.h;
2384
+ let t = Math.max(0, Math.min(1, e.fraction)), n = R.y + R.h - t * R.h;
2370
2385
  return {
2371
- ...y.project(e.x, n, k),
2372
- cameraDepth: y.cameraDepth(e.x, n, k),
2373
- cameraWeight: y.cameraProjectionWeight(e.x, n, k)
2386
+ ..._.project(e.x, n, A),
2387
+ cameraDepth: _.cameraDepth(e.x, n, A),
2388
+ cameraWeight: _.cameraProjectionWeight(e.x, n, A)
2374
2389
  };
2375
- }, r = (e) => {
2376
- e && e.path.length >= 2 && Y.push(e);
2390
+ }, i = (e) => {
2391
+ e && e.path.length >= 2 && re.push(e);
2377
2392
  };
2378
2393
  for (let t of e) {
2379
2394
  if (t.length < 2) continue;
2380
2395
  let e = [t[0]];
2381
2396
  for (let n = 0; n + 1 < t.length; n++) {
2382
2397
  let r = t[n - 1] ?? t[n], i = t[n], a = t[n + 1], o = t[n + 2] ?? a;
2383
- if (d.smooth !== !0 || t.length < 3) {
2398
+ if (l.smooth !== !0 || t.length < 3) {
2384
2399
  e.push(a);
2385
2400
  continue;
2386
2401
  }
@@ -2400,23 +2415,23 @@ function pn(t, r, i, a, o) {
2400
2415
  });
2401
2416
  }
2402
2417
  }
2403
- let i = null, a = 0;
2418
+ let r = null, a = 0;
2404
2419
  for (let t = 0; t + 1 < e.length; t++) {
2405
- let o = e[t], s = e[t + 1], c = (e) => y.project(e.x, z.y + z.h - e.fraction * z.h, k), 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) * z.h), p = Re(o.fraction, s.fraction);
2420
+ let o = e[t], s = e[t + 1], c = (e) => _.project(e.x, R.y + R.h - e.fraction * R.h, A), 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) * R.h), p = Ye(o.fraction, s.fraction);
2406
2421
  if (!p || p.endT - p.startT <= 1e-12) {
2407
- r(i), i = null, a += f;
2422
+ i(r), r = null, a += f;
2408
2423
  continue;
2409
2424
  }
2410
2425
  let m = (e) => ({
2411
2426
  x: o.x + (s.x - o.x) * e,
2412
2427
  fraction: o.fraction + (s.fraction - o.fraction) * e,
2413
2428
  ownerIndex: s.ownerIndex
2414
- }), h = c(m(p.startT)), g = Math.hypot(h.x - l.x, h.y - l.y), _ = n(m(p.startT)), v = n(m(p.endT)), b = m(p.startT), x = m(p.endT), S = (e) => ({
2429
+ }), h = c(m(p.startT)), g = Math.hypot(h.x - l.x, h.y - l.y), v = n(m(p.startT)), y = n(m(p.endT)), b = m(p.startT), x = m(p.endT), S = (e) => ({
2415
2430
  x: e.x,
2416
- y: z.y + z.h - Math.max(0, Math.min(1, e.fraction)) * z.h
2431
+ y: R.y + R.h - Math.max(0, Math.min(1, e.fraction)) * R.h
2417
2432
  });
2418
- i != null && Math.hypot(i.path.at(-1).x - _.x, i.path.at(-1).y - _.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(v), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 || p.endT < 1) : (r(i), i = {
2419
- path: [_, v],
2433
+ r != null && Math.hypot(r.path.at(-1).x - v.x, r.path.at(-1).y - v.y) <= 1e-8 && r.ownerIndex === s.ownerIndex ? (r.path.push(y), r.modelPath.push(S(x)), r.endClipped = t + 1 < e.length - 1 || p.endT < 1) : (i(r), r = {
2434
+ path: [v, y],
2420
2435
  modelPath: [S(b), S(x)],
2421
2436
  ownerIndex: s.ownerIndex,
2422
2437
  startClipped: t > 0 || p.startT > 0,
@@ -2424,198 +2439,198 @@ function pn(t, r, i, a, o) {
2424
2439
  dashOffset: a + (Number.isFinite(g) ? g : f * p.startT)
2425
2440
  }), a += f;
2426
2441
  }
2427
- r(i);
2442
+ i(r);
2428
2443
  }
2429
2444
  }
2430
- let re = r.chartType.toLowerCase().includes("area"), ie = d.lineHidden != null || d.lineColor != null || d.lineWidthEmu != null || d.chartexStyle?.lineHidden != null || d.chartexStyle?.lineColors?.some(Boolean) || d.chartexStyle?.lineWidthEmu != null || d.chartexStyle?.lineDash != null || d.chartexStyle?.lineCap != null || d.chartexStyle?.lineJoin != null || _.lineColor != null || _.lineFill !== void 0;
2431
- if (!re || _.lineFill !== null && ie) {
2432
- let e = /* @__PURE__ */ new Map(), n = (t) => {
2433
- let n = H[c].get(t);
2434
- if (!Ct(n)) return _;
2435
- let i = e.get(t);
2436
- return i || (i = Q(r, d, n, t, c), e.set(t, i)), i;
2445
+ let Z = t.chartType.toLowerCase().includes("area"), ie = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || h.lineColor != null || h.lineFill !== void 0;
2446
+ if (!Z || h.lineFill !== null && ie) {
2447
+ let n = /* @__PURE__ */ new Map(), r = (e) => {
2448
+ let r = G[c].get(e);
2449
+ if (!Pt(r)) return h;
2450
+ let i = n.get(e);
2451
+ return i || (i = $(t, l, r, e, c), n.set(e, i)), i;
2437
2452
  }, i = /* @__PURE__ */ new Map(), s = {
2438
- remaining: Ke,
2453
+ remaining: rt,
2439
2454
  exceeded: !1
2440
- }, l = (e, n, r, o = r, c = 0, l) => {
2455
+ }, u = (t, n, r, o = r, c = 0, l) => {
2441
2456
  if (n.lineFill === null) return;
2442
- let u = n === _ ? v : n.color, d = n.lineColor ?? Ce(u, .7), f = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / X) * a : re ? .75 * a : Math.max(1, 2 * a), m = {
2443
- width: f,
2444
- dash: ae(n.lineCustomDash, n.lineDash, f),
2457
+ let u = n === h ? g : n.color, d = n.lineColor ?? Ne(u, .7), p = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / W) * a : Z ? .75 * a : Math.max(1, 2 * a), v = {
2458
+ width: p,
2459
+ dash: x(n.lineCustomDash, n.lineDash, p),
2445
2460
  dashOffset: c,
2446
2461
  lineCap: n.lineCap,
2447
2462
  startCap: r,
2448
2463
  endCap: o,
2449
2464
  lineJoin: n.lineJoin
2450
2465
  };
2451
- if (!re && l && l.length >= 2) {
2452
- let e = et(l.map((e) => ({
2466
+ if (!Z && l && l.length >= 2) {
2467
+ let t = dt(l.map((e) => ({
2453
2468
  ...e,
2454
2469
  cameraDepth: 0,
2455
2470
  cameraWeight: 1
2456
- })), m);
2457
- if (e == null) {
2458
- g = !0;
2471
+ })), v);
2472
+ if (t == null) {
2473
+ m = !0;
2459
2474
  return;
2460
2475
  }
2461
2476
  let r = i.get(n) ?? [];
2462
- for (let n of e) {
2463
- let e = Ie({
2477
+ for (let n of t) {
2478
+ let t = qe({
2464
2479
  outline: n.points,
2465
- nearDepth: x.near,
2466
- farDepth: x.far
2480
+ nearDepth: y.near,
2481
+ farDepth: y.far
2467
2482
  });
2468
- if (!e) continue;
2469
- let i = jt(y, e, d, void 0, s).map((e) => ({
2483
+ if (!t) continue;
2484
+ let i = Wt(_, t, d, void 0, s).map((e) => ({
2470
2485
  ...e,
2471
2486
  paintRole: "outline"
2472
2487
  }));
2473
2488
  if (s.exceeded) {
2474
- g = !0;
2489
+ m = !0;
2475
2490
  return;
2476
2491
  }
2477
2492
  r.push(...i);
2478
- for (let e of i) p.push({
2479
- points: e.points,
2480
- cameraDepth: e.cameraDepth,
2481
- cameraDepths: e.cameraDepths,
2482
- cameraWeights: e.cameraWeights,
2493
+ for (let t of i) f.push({
2494
+ points: t.points,
2495
+ cameraDepth: t.cameraDepth,
2496
+ cameraDepths: t.cameraDepths,
2497
+ cameraWeights: t.cameraWeights,
2483
2498
  layer: 1,
2484
- paint: () => Nt(t, e)
2499
+ paint: () => Kt(e, t)
2485
2500
  });
2486
2501
  }
2487
2502
  i.set(n, r);
2488
2503
  return;
2489
2504
  }
2490
- let h = et(e, m);
2491
- if (h == null) {
2492
- g = !0;
2505
+ let b = dt(t, v);
2506
+ if (b == null) {
2507
+ m = !0;
2493
2508
  return;
2494
2509
  }
2495
- if (p.length + h.length > 1e4) {
2496
- g = !0;
2510
+ if (f.length + b.length > 1e4) {
2511
+ m = !0;
2497
2512
  return;
2498
2513
  }
2499
- for (let e of h) {
2514
+ for (let t of b) {
2500
2515
  let r = {
2501
- points: e.points,
2516
+ points: t.points,
2502
2517
  color: d,
2503
2518
  paintRole: "outline",
2504
2519
  shade: 0,
2505
- cameraDepth: e.cameraDepth,
2506
- cameraDepths: e.cameraDepths,
2507
- cameraWeights: e.cameraWeights,
2520
+ cameraDepth: t.cameraDepth,
2521
+ cameraDepths: t.cameraDepths,
2522
+ cameraWeights: t.cameraWeights,
2508
2523
  outline: !1
2509
2524
  }, a = i.get(n) ?? [];
2510
- a.push(r), i.set(n, a), p.push({
2511
- points: e.points,
2512
- cameraDepth: e.cameraDepth,
2513
- cameraDepths: e.cameraDepths,
2514
- cameraWeights: e.cameraWeights,
2525
+ a.push(r), i.set(n, a), f.push({
2526
+ points: t.points,
2527
+ cameraDepth: t.cameraDepth,
2528
+ cameraDepths: t.cameraDepths,
2529
+ cameraWeights: t.cameraWeights,
2515
2530
  layer: 1,
2516
- paint: () => Nt(t, r)
2531
+ paint: () => Kt(e, r)
2517
2532
  });
2518
2533
  }
2519
2534
  };
2520
- if (re) for (let e of J) l(e, _, _.lineCap);
2521
- else for (let e of Y) {
2522
- let t = n(e.ownerIndex);
2523
- l(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2535
+ if (Z) for (let e of Y) u(e, h, h.lineCap);
2536
+ else for (let e of re) {
2537
+ let t = r(e.ownerIndex);
2538
+ u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2524
2539
  }
2525
- for (let [e, n] of i) Ft(t, n, "outline", e.lineFill, o);
2540
+ for (let [t, n] of i) Jt(e, n, "outline", t.lineFill, o);
2526
2541
  }
2527
- let oe = (re ? d.showMarker === !0 || n(d) : d.showMarker === !0) && d.markerSymbol !== "none";
2528
- if ((r.chartType.toLowerCase().includes("line") || re) && (oe || m(d))) for (let e = 0; e < M.length; e++) {
2529
- let n = M[e];
2530
- if (!n) continue;
2531
- let i = H[c].get(e), s = u(d, i, "circle", oe);
2542
+ let ae = (Z ? l.showMarker === !0 || C(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2543
+ if ((t.chartType.toLowerCase().includes("line") || Z) && (ae || V(l))) for (let n = 0; n < j.length; n++) {
2544
+ let r = j[n];
2545
+ if (!r) continue;
2546
+ let i = G[c].get(n), s = te(l, i, "circle", ae);
2532
2547
  if (s === "none") continue;
2533
- let l = i?.markerSize ?? d.markerSize ?? 5, f = Kt(r, d, i, e, c, d.color ?? ut[c % ut.length], a);
2534
- h.push(() => zt(t, n, s, Math.max(2, l) * a, f.fill === "00000000" ? "transparent" : `#${f.fill.replace(/^#/, "")}`, f.line === "00000000" ? "rgba(0,0,0,0)" : `#${f.line.replace(/^#/, "")}`, f.lineWidth, f.fillPaint, o, a, f.effectDirect, f.effectFallback, f.effectIndex, f.effectFallbackIndex, f.linePaint, f.lineDash, f.lineCustomDash, f.lineCap, f.lineJoin));
2548
+ let u = i?.markerSize ?? l.markerSize ?? 5, d = ln(t, l, i, n, c, l.color ?? xt[c % xt.length], a);
2549
+ p.push(() => en(e, r, s, Math.max(2, u) * a, d.fill === "00000000" ? "transparent" : `#${d.fill.replace(/^#/, "")}`, d.line === "00000000" ? "rgba(0,0,0,0)" : `#${d.line.replace(/^#/, "")}`, d.lineWidth, d.fillPaint, o, a, d.effectDirect, d.effectFallback, d.effectIndex, d.effectFallbackIndex, d.linePaint, d.lineDash, d.lineCustomDash, d.lineCap, d.lineJoin));
2535
2550
  }
2536
- for (let e = 0; e < M.length; e++) {
2537
- let n = M[e];
2538
- if (!n) continue;
2539
- let u = j(c, e), f = H[c].get(e), p = f?.markerSize ?? d.markerSize ?? 5, m = ee[c].get(e);
2540
- Vt(r, d, m) && V.push(() => Bt(t, r, d, c, e, b ? u / 100 : u, n, i, a, d.showMarker === !0 || f?.markerSymbol != null ? p * a / 2 : 0, void 0, m, "t", n, !0, r.valAxisDisplayUnits, L.max, l ? s[c][e] : u, o));
2551
+ for (let r = 0; r < j.length; r++) {
2552
+ let i = j[r];
2553
+ if (!i) continue;
2554
+ let d = k(c, r), f = G[c].get(r), p = f?.markerSize ?? l.markerSize ?? 5, m = q[c].get(r);
2555
+ nn(t, l, m) && ee.push(() => tn(e, t, l, c, r, v ? d / 100 : d, i, n, a, l.showMarker === !0 || f?.markerSymbol != null ? p * a / 2 : 0, void 0, m, "t", i, !0, t.valAxisDisplayUnits, I.max, u ? s[c][r] : d, o));
2541
2556
  }
2542
2557
  }
2543
- if (g) return It(t, i), !0;
2544
- for (let e of Ge(p)) e.paint();
2545
- for (let e of h) e();
2546
- }
2547
- an(t, r, y, L, S, D, E, a, c ? "horizontal" : "vertical"), fn(t, r, y, L, S, D, E, c ? "horizontal" : "vertical", s, a), Gt(t, r, i, y, L, S, D, E, c ? "horizontal" : "vertical", s, a);
2548
- let U = dn(r, y, L, S, D, E, c ? "horizontal" : "vertical"), te = (e, t) => {
2549
- if (t !== "low" && t !== "high") return U;
2550
- let n = y.topology.nearDepth, r = U.axisX, i = U.axisY;
2558
+ if (m) return Yt(e, n), !0;
2559
+ for (let e of nt(f)) e.paint();
2560
+ for (let e of p) e();
2561
+ }
2562
+ xn(e, t, _, I, b, T, w, a, c ? "horizontal" : "vertical"), On(e, t, _, I, b, T, w, c ? "horizontal" : "vertical", s, a), cn(e, t, n, _, I, b, T, w, c ? "horizontal" : "vertical", s, a);
2563
+ let ne = Dn(t, _, I, b, T, w, c ? "horizontal" : "vertical"), J = (e, t) => {
2564
+ if (t !== "low" && t !== "high") return ne;
2565
+ let n = _.topology.nearDepth, r = ne.axisX, i = ne.axisY;
2551
2566
  if (e === "value" === c) {
2552
- let e = z.y, r = z.y + z.h, a = y.project(z.x + z.w / 2, e, n), o = y.project(z.x + z.w / 2, r, n), s = a.y >= o.y ? e : r;
2567
+ let e = R.y, r = R.y + R.h, a = _.project(R.x + R.w / 2, e, n), o = _.project(R.x + R.w / 2, r, n), s = a.y >= o.y ? e : r;
2553
2568
  i = t === "low" ? s : s === e ? r : e;
2554
2569
  } else {
2555
- let e = z.x, i = z.x + z.w, a = y.project(e, z.y + z.h / 2, n), o = y.project(i, z.y + z.h / 2, n), s = a.x <= o.x ? e : i;
2570
+ let e = R.x, i = R.x + R.w, a = _.project(e, R.y + R.h / 2, n), o = _.project(i, R.y + R.h / 2, n), s = a.x <= o.x ? e : i;
2556
2571
  r = t === "low" ? s : s === e ? i : e;
2557
2572
  }
2558
2573
  return {
2559
2574
  axisX: r,
2560
2575
  axisY: i,
2561
2576
  depth: n,
2562
- horizontalStart: y.project(z.x, i, n),
2563
- horizontalEnd: y.project(z.x + z.w, i, n),
2564
- verticalStart: y.project(r, z.y + z.h, n),
2565
- verticalEnd: y.project(r, z.y, n)
2577
+ horizontalStart: _.project(R.x, i, n),
2578
+ horizontalEnd: _.project(R.x + R.w, i, n),
2579
+ verticalStart: _.project(r, R.y + R.h, n),
2580
+ verticalEnd: _.project(r, R.y, n)
2566
2581
  };
2567
- }, W = te("value", r.valAxisTickLabelPos), G = te("category", r.catAxisTickLabelPos), K = v(r.valAxisFontSizeHpt, a) ?? 9 * a;
2568
- if (t.font = `${r.valAxisFontItalic ? "italic " : ""}${r.valAxisFontBold ? "bold " : ""}${K}px ${Tt(r.valAxisFontFace)}`, t.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", t.textAlign = c ? "center" : "right", t.textBaseline = c ? "top" : "middle", !r.valAxisHidden && r.valAxisTickLabelPos !== "none") {
2569
- let { axisX: e, axisY: n, depth: i } = W, o = y.project(z.x + z.w / 2, z.y + z.h / 2, i), s = on(c ? W.horizontalStart : W.verticalStart, c ? W.horizontalEnd : W.verticalEnd, o, c ? "vertical" : "horizontal");
2570
- t.textAlign = Math.abs(s.x) < .2 ? "center" : s.x < 0 ? "right" : "left", t.textBaseline = Math.abs(s.y) < .2 ? "middle" : s.y < 0 ? "bottom" : "top";
2571
- let l = un(r.valAxisMajorTickMark, r.valAxisLineHidden, a, 5), u = r.valAxisDisplayUnits?.divisor;
2572
- for (let a of L.majorTicks) {
2573
- let o = c ? y.project(z.x + L.fraction(a) * z.w, n, i) : y.project(e, z.y + z.h - L.fraction(a) * z.h, i);
2574
- t.fillText(w(b ? a / 100 : u != null && Number.isFinite(u) && u > 0 ? a / u : a, b ? r.valAxisFormatCode ?? "0%" : r.valAxisFormatCode, r.date1904), o.x + s.x * l, o.y + s.y * l);
2582
+ }, Y = J("value", t.valAxisTickLabelPos), X = J("category", t.catAxisTickLabelPos), re = H(t.valAxisFontSizeHpt, a) ?? 9 * a;
2583
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${re}px ${Lt(t, t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = c ? "center" : "right", e.textBaseline = c ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2584
+ let { axisX: n, axisY: r, depth: o } = Y, s = _.project(R.x + R.w / 2, R.y + R.h / 2, o), l = Sn(c ? Y.horizontalStart : Y.verticalStart, c ? Y.horizontalEnd : Y.verticalEnd, s, c ? "vertical" : "horizontal");
2585
+ e.textAlign = Math.abs(l.x) < .2 ? "center" : l.x < 0 ? "right" : "left", e.textBaseline = Math.abs(l.y) < .2 ? "middle" : l.y < 0 ? "bottom" : "top";
2586
+ let u = En(t.valAxisMajorTickMark, t.valAxisLineHidden, a, 5), d = t.valAxisDisplayUnits?.divisor;
2587
+ for (let a of I.majorTicks) {
2588
+ let s = c ? _.project(R.x + I.fraction(a) * R.w, r, o) : _.project(n, R.y + R.h - I.fraction(a) * R.h, o);
2589
+ B(e, i(v ? a / 100 : d != null && Number.isFinite(d) && d > 0 ? a / d : a, v ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + l.x * u, s.y + l.y * u, K(re));
2575
2590
  }
2576
2591
  }
2577
- let J = v(r.catAxisFontSizeHpt, a) ?? 9 * a;
2578
- if (t.font = `${r.catAxisFontItalic ? "italic " : ""}${r.catAxisFontBold ? "bold " : ""}${J}px ${Tt(r.catAxisFontFace)}`, t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", !r.catAxisHidden && r.catAxisTickLabelPos !== "none") {
2579
- let e = f(un(r.catAxisMajorTickMark, r.catAxisLineHidden, a, 6), r.catAxisLabelOffsetPercent), n = Array.from({ length: S }, (e, t) => d(String(x[t] ?? t + 1), r.catAxisFormatCode, r.date1904)), i = Lt(r);
2580
- if (i == null && (i = 0, !c && S > 1)) {
2581
- let e = Infinity, r = null, a = G.axisY;
2582
- for (let t = 0; t < S; t++) {
2583
- let n = T(t, S, D, E), i = y.project(z.x + n * z.w, a, y.topology.nearDepth);
2584
- r && (e = Math.min(e, Math.hypot(i.x - r.x, i.y - r.y))), r = i;
2592
+ let Z = H(t.catAxisFontSizeHpt, a) ?? 9 * a;
2593
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${Z}px ${Lt(t, t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2594
+ let n = me(En(t.catAxisMajorTickMark, t.catAxisLineHidden, a, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: b }, (e, n) => he(String(y[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), o = Xt(t);
2595
+ if (o == null && (o = 0, !c && b > 1)) {
2596
+ let t = Infinity, n = null, a = X.axisY;
2597
+ for (let e = 0; e < b; e++) {
2598
+ let i = r(e, b, T, w), o = _.project(R.x + i * R.w, a, _.topology.nearDepth);
2599
+ n && (t = Math.min(t, Math.hypot(o.x - n.x, o.y - n.y))), n = o;
2585
2600
  }
2586
- Math.max(0, ...n.map((e) => t.measureText(e).width)) > e * .9 && (i = -Math.PI / 4);
2601
+ Math.max(0, ...i.map((t) => M(e, t))) > t * .9 && (o = -Math.PI / 4);
2587
2602
  }
2588
- let o = Math.max(1, Math.floor(r.catAxisTickLabelSkip ?? 1));
2589
- for (let r = 0; r < S; r += o) {
2590
- let a = T(r, S, D, E), { axisX: o, axisY: s, depth: l } = G, u = c ? y.project(o, z.y + T(r, S, D, E) * z.h, l) : y.project(z.x + a * z.w, s, l);
2603
+ let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2604
+ for (let t = 0; t < b; t += s) {
2605
+ let a = r(t, b, T, w), { axisX: s, axisY: l, depth: u } = X, d = c ? _.project(s, R.y + r(t, b, T, w) * R.h, u) : _.project(R.x + a * R.w, l, u);
2591
2606
  if (c) {
2592
- let i = y.project(o, z.y + z.h / 2, l), a = y.project(z.x + z.w / 2, z.y + z.h / 2, l), s = i.x <= a.x;
2593
- t.textAlign = s ? "right" : "left", t.textBaseline = "middle", t.fillText(n[r], u.x + (s ? -e : e), u.y);
2607
+ let r = _.project(s, R.y + R.h / 2, u), a = _.project(R.x + R.w / 2, R.y + R.h / 2, u), o = r.x <= a.x;
2608
+ e.textAlign = o ? "right" : "left", e.textBaseline = "middle", B(e, i[t], d.x + (o ? -n : n), d.y, K(Z));
2594
2609
  } else {
2595
- let a = y.project(z.x + z.w / 2, z.y + z.h / 2, l), o = on(G.horizontalStart, G.horizontalEnd, a, "vertical");
2596
- Rt(t, n[r], u, i, c, o.y < 0 ? -1 : 1, e);
2610
+ let r = _.project(R.x + R.w / 2, R.y + R.h / 2, u), a = Sn(X.horizontalStart, X.horizontalEnd, r, "vertical");
2611
+ $t(e, i[t], d, o, c, a.y < 0 ? -1 : 1, n, K(Z));
2597
2612
  }
2598
2613
  }
2599
2614
  }
2600
- Wt(t, r, i, h, c, a);
2601
- for (let e of V) e();
2602
- return Yt(t, r, g, a, !1, _, o), !0;
2615
+ sn(e, t, n, f, c, a);
2616
+ for (let e of ee) e();
2617
+ return fn(e, t, p, a, !1, h, o), !0;
2603
2618
  }
2604
- function mn(t, n, r, i, a) {
2605
- if (!n.threeD || n.chartType !== "pie") return !1;
2606
- let o = n.series[0];
2607
- if (!o) return !0;
2608
- let s = o.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2619
+ function An(e, t, n, r, i) {
2620
+ if (!t.threeD || t.chartType !== "pie") return !1;
2621
+ let a = t.series[0];
2622
+ if (!a) return !0;
2623
+ let o = a.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2609
2624
  index: t,
2610
2625
  value: Math.abs(e)
2611
- }] : []), c = 0;
2612
- for (let e of s) c = Math.max(c, e.value);
2613
- if (!(c > 0)) return !0;
2614
- let l = s.reduce((e, t) => e + t.value / c, 0);
2615
- if (!(l > 0) || !Number.isFinite(l)) return !0;
2616
- let { plot: u, legend: d, legendMeasure: f } = Ht(t, n, r, i, "radial", a), p = he({
2617
- ...n.threeD,
2618
- rotationY: n.threeD.rotationY ?? 0,
2626
+ }] : []), s = 0;
2627
+ for (let e of o) s = Math.max(s, e.value);
2628
+ if (!(s > 0)) return !0;
2629
+ let c = o.reduce((e, t) => e + t.value / s, 0);
2630
+ if (!(c > 0) || !Number.isFinite(c)) return !0;
2631
+ let { plot: u, legend: d, legendMeasure: f } = rn(e, t, n, r, "radial", i), p = Te({
2632
+ ...t.threeD,
2633
+ rotationY: t.threeD.rotationY ?? 0,
2619
2634
  heightPercent: void 0,
2620
2635
  depthPercent: 100
2621
2636
  }, u, {
@@ -2623,145 +2638,145 @@ function mn(t, n, r, i, a) {
2623
2638
  sceneHeightScale: .15
2624
2639
  });
2625
2640
  if (!p) return !0;
2626
- let m = new Map(o.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
2627
- for (let e of m.values()) e.explosion != null && Number.isFinite(e.explosion) && (h = Math.max(h, Math.max(0, Math.min(100, e.explosion)) / 100));
2628
- let { scene: g } = p, _ = Math.min(g.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), g.h / .45);
2629
- if (!(_ > 0)) return !0;
2630
- let y = g.x + g.w / 2, b = g.y + g.h / 2, x = .5, S = _ * .3 * be(n.threeD), w = 0, T = [], E = new Map(o.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), D = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2631
- for (let e of s) {
2632
- let t = e.value / c / l, r = Zt(n.firstSliceAngle, w, t), i = m.get(e.index), a = Q(n, o, i, e.index, 0), s = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = y + Math.cos(s) * _ * u, f = x + Math.sin(s) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(D * t)), g = Le({
2641
+ let h = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), g = 0;
2642
+ for (let e of h.values()) e.explosion != null && Number.isFinite(e.explosion) && (g = Math.max(g, Math.max(0, Math.min(100, e.explosion)) / 100));
2643
+ let { scene: _ } = p, v = Math.min(_.w * .45 / (1 + g), p.modelDepth * .45 / (1 + g), _.h / .45);
2644
+ if (!(v > 0)) return !0;
2645
+ let y = _.x + _.w / 2, b = _.y + _.h / 2, S = .5, C = v * .3 * Ae(t.threeD), w = 0, T = [], E = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), D = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * v / 4)));
2646
+ for (let e of o) {
2647
+ let n = e.value / s / c, r = mn(t.firstSliceAngle, w, n), i = h.get(e.index), o = $(t, a, i, e.index, 0), l = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = y + Math.cos(l) * v * u, f = S + Math.sin(l) * v * u / p.modelDepth, m = Math.max(2, Math.ceil(D * n)), g = Je({
2633
2648
  centerX: d,
2634
2649
  centerY: b,
2635
2650
  centerDepth: f,
2636
- radius: _,
2651
+ radius: v,
2637
2652
  modelDepth: p.modelDepth,
2638
- thickness: S,
2653
+ thickness: C,
2639
2654
  startAngle: r.start,
2640
2655
  endAngle: r.end,
2641
- segments: h
2656
+ segments: m
2642
2657
  });
2643
2658
  if (!g) {
2644
- w += t;
2659
+ w += n;
2645
2660
  continue;
2646
2661
  }
2647
2662
  T.push({
2648
2663
  index: e.index,
2649
2664
  start: r.start,
2650
2665
  end: r.end,
2651
- color: a.fill === null ? "transparent" : a.color,
2652
- fillPaint: a.fill,
2666
+ color: o.fill === null ? "transparent" : o.color,
2667
+ fillPaint: o.fill,
2653
2668
  value: e.value,
2654
- percentValue: t,
2669
+ percentValue: n,
2655
2670
  centerX: d,
2656
2671
  centerDepth: f,
2657
- segments: h,
2672
+ segments: m,
2658
2673
  mesh: g,
2659
- lineColor: a.lineColor,
2660
- lineFill: a.lineFill,
2661
- lineWidthEmu: a.lineWidthEmu ?? null,
2662
- lineDash: a.lineDash ?? "solid",
2663
- lineCustomDash: a.lineCustomDash,
2664
- lineCap: a.lineCap,
2665
- lineJoin: a.lineJoin
2666
- }), w += t;
2667
- }
2668
- p = Se(p, T.flatMap((e) => e.mesh.vertices), u, .08);
2674
+ lineColor: o.lineColor,
2675
+ lineFill: o.lineFill,
2676
+ lineWidthEmu: o.lineWidthEmu ?? null,
2677
+ lineDash: o.lineDash ?? "solid",
2678
+ lineCustomDash: o.lineCustomDash,
2679
+ lineCap: o.lineCap,
2680
+ lineJoin: o.lineJoin
2681
+ }), w += n;
2682
+ }
2683
+ p = Me(p, T.flatMap((e) => e.mesh.vertices), u, .08);
2669
2684
  let O = [], k = {
2670
- remaining: Ke,
2685
+ remaining: rt,
2671
2686
  exceeded: !1
2672
2687
  }, A = (e) => {
2673
- let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / X * i);
2688
+ let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / W * r);
2674
2689
  return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
2675
2690
  color: e.lineColor ?? "rgba(0,0,0,0.42)",
2676
2691
  width: t,
2677
- dash: ae(e.lineCustomDash, e.lineDash, t),
2692
+ dash: x(e.lineCustomDash, e.lineDash, t),
2678
2693
  cap: e.lineCap,
2679
2694
  join: e.lineJoin
2680
2695
  } : void 0;
2681
- }, j = T.map((e) => {
2682
- let n = jt(p, e.mesh, e.color, void 0, k);
2683
- return Ft(t, n, "fill", e.fillPaint, a), {
2684
- slice: e,
2696
+ }, j = T.map((t) => {
2697
+ let n = Wt(p, t.mesh, t.color, void 0, k);
2698
+ return Jt(e, n, "fill", t.fillPaint, i), {
2699
+ slice: t,
2685
2700
  faces: n
2686
2701
  };
2687
- }), M = j.flatMap((e) => e.faces), N = [], P = T.map(A), F = P[0], I = (e) => e == null ? null : [
2702
+ }), M = j.flatMap((e) => e.faces), P = [], F = T.map(A), I = F[0], L = (e) => e == null ? null : [
2688
2703
  e.color,
2689
2704
  e.width,
2690
2705
  e.dash.join(","),
2691
2706
  e.cap,
2692
2707
  e.join
2693
- ].join("|"), L = F != null && T.every((e) => e.lineFill === void 0) && P.every((e) => I(e) === I(F)) && T.every((e) => Math.abs(e.centerX - y) < 1e-9 && Math.abs(e.centerDepth - x) < 1e-9);
2694
- if (L) N.push(...Mt(p, T, b, _, S, F, k));
2695
- else for (let e = 0; e < T.length; e++) {
2696
- let n = P[e];
2708
+ ].join("|"), R = I != null && T.every((e) => e.lineFill === void 0) && F.every((e) => L(e) === L(I)) && T.every((e) => Math.abs(e.centerX - y) < 1e-9 && Math.abs(e.centerDepth - S) < 1e-9);
2709
+ if (R) P.push(...Gt(p, T, b, v, C, I, k));
2710
+ else for (let t = 0; t < T.length; t++) {
2711
+ let n = F[t];
2697
2712
  if (!n) continue;
2698
- let r = jt(p, T[e].mesh, "transparent", n, k, !0);
2699
- Ft(t, r, "outline", T[e].lineFill, a), N.push(...r);
2700
- }
2701
- if (k.exceeded) return It(t, r), !0;
2702
- if (L) {
2703
- for (let e of Ge(M)) Nt(t, e);
2704
- for (let e of Ge(N)) Nt(t, e);
2705
- } else for (let e of Ge([...M, ...N])) Nt(t, e);
2706
- for (let { slice: r, faces: a } of j) {
2707
- let s = m.get(r.index), c = De(n, o, r.index, 0), l = e(s?.chartexStyle);
2708
- ne(t, l ?? e(o.chartexStyle), q(n, "dataPoint3D", 0), l ? r.index : c, i, (e) => Pt(e, a), c);
2709
- }
2710
- for (let e of T) {
2711
- let r = (e.start + e.end) / 2, s = E.get(e.index);
2712
- if (Vt(n, o, s)) {
2713
- let c = o.seriesDataLabels, l = v(s?.fontSizeHpt ?? c?.fontSizeHpt ?? n.dataLabelFontSizeHpt, i) ?? 9 * i;
2714
- t.font = `${s?.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ? "bold " : ""}${l}px ${$(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace)}`;
2715
- let d = C({
2713
+ let r = Wt(p, T[t].mesh, "transparent", n, k, !0);
2714
+ Jt(e, r, "outline", T[t].lineFill, i), P.push(...r);
2715
+ }
2716
+ if (k.exceeded) return Yt(e, n), !0;
2717
+ if (R) {
2718
+ for (let t of nt(M)) Kt(e, t);
2719
+ for (let t of nt(P)) Kt(e, t);
2720
+ } else for (let t of nt([...M, ...P])) Kt(e, t);
2721
+ for (let { slice: n, faces: i } of j) {
2722
+ let o = h.get(n.index), s = Le(t, a, n.index, 0), c = m(o?.chartexStyle);
2723
+ xe(e, c ?? m(a.chartexStyle), l(t, "dataPoint3D", 0), c ? n.index : s, r, (e) => qt(e, i), s);
2724
+ }
2725
+ for (let n of T) {
2726
+ let o = (n.start + n.end) / 2, s = E.get(n.index);
2727
+ if (nn(t, a, s)) {
2728
+ let c = a.seriesDataLabels, l = H(s?.fontSizeHpt ?? c?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2729
+ e.font = `${s?.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace)}`;
2730
+ let d = N({
2716
2731
  customText: s?.text,
2717
2732
  showCategory: s?.showCatName ?? c?.showCatName ?? !1,
2718
2733
  showSeries: s?.showSerName ?? c?.showSerName ?? !1,
2719
- showValue: s?.showVal ?? c?.showVal ?? n.showDataLabels,
2734
+ showValue: s?.showVal ?? c?.showVal ?? t.showDataLabels,
2720
2735
  showPercent: s?.showPercent ?? c?.showPercent ?? !1,
2721
- category: o.categories?.[e.index] ?? n.categories[e.index] ?? `${e.index + 1}`,
2722
- seriesName: o.name || "Series 1",
2723
- sourceValue: e.value,
2724
- percentRatio: e.percentValue,
2725
- formatCode: s?.formatCode ?? c?.formatCode ?? n.dataLabelFormatCode ?? o.valFormatCode,
2736
+ category: a.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2737
+ seriesName: a.name || "Series 1",
2738
+ sourceValue: n.value,
2739
+ percentRatio: n.percentValue,
2740
+ formatCode: s?.formatCode ?? c?.formatCode ?? t.dataLabelFormatCode ?? a.valFormatCode,
2726
2741
  separator: s?.separator ?? c?.separator,
2727
- date1904: n.date1904
2728
- }), f = $(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace), m = s?.text && s.richRuns?.length ? ge(t, {
2742
+ date1904: t.date1904
2743
+ }), f = Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace), m = s?.text && s.richRuns?.length ? Fe(e, {
2729
2744
  runs: s.richRuns,
2730
- ptToPx: i,
2745
+ ptToPx: r,
2731
2746
  fontFamily: f,
2732
- fallbackBold: s.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ?? !1,
2733
- fontFamilyForFace: (e) => $(n, e)
2734
- }, l, `#${s.fontColor ?? c?.fontColor ?? o.labelColor ?? n.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? n.dataLabelPosition, g = b - S / 2, y = b + S / 2, x = p.cameraDepth(e.centerX, g, e.centerDepth) >= p.cameraDepth(e.centerX, y, e.centerDepth) ? g : y, w = 0, T = null;
2735
- for (let t = 0; t <= 12; t++) {
2736
- let n = e.start + (e.end - e.start) * t / 12, r = p.project(e.centerX + Math.cos(n) * _ * .64, x, e.centerDepth + Math.sin(n) * _ * .64 / p.modelDepth);
2737
- T && (w += Math.hypot(r.x - T.x, r.y - T.y)), T = r;
2747
+ fallbackBold: s.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ?? !1,
2748
+ fontFamilyForFace: (e) => Rt(t, e)
2749
+ }, l, `#${s.fontColor ?? c?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? t.dataLabelPosition, g = b - C / 2, _ = b + C / 2, y = p.cameraDepth(n.centerX, g, n.centerDepth) >= p.cameraDepth(n.centerX, _, n.centerDepth) ? g : _, x = 0, S = null;
2750
+ for (let e = 0; e <= 12; e++) {
2751
+ let t = n.start + (n.end - n.start) * e / 12, r = p.project(n.centerX + Math.cos(t) * v * .64, y, n.centerDepth + Math.sin(t) * v * .64 / p.modelDepth);
2752
+ S && (x += Math.hypot(r.x - S.x, r.y - S.y)), S = r;
2738
2753
  }
2739
- let E = (h == null || h === "bestFit") && (e.percentValue === 0 || w < (m?.width ?? t.measureText(d).width)) || h === "outEnd", D = _ * (E ? 1.12 : .64), k = p.project(e.centerX + Math.cos(r) * D, x, e.centerDepth + Math.sin(r) * D / p.modelDepth), A = p.project(e.centerX + Math.cos(r) * _, x, e.centerDepth + Math.sin(r) * _ / p.modelDepth);
2740
- O.push(() => Bt(t, n, o, 0, e.index, e.value, k, u, i, 0, e.percentValue, s, "ctr", A, E, void 0, void 0, void 0, a));
2754
+ let w = (h == null || h === "bestFit") && (n.percentValue === 0 || x < (m?.width ?? e.measureText(d).width)) || h === "outEnd", T = v * (w ? 1.12 : .64), E = p.project(n.centerX + Math.cos(o) * T, y, n.centerDepth + Math.sin(o) * T / p.modelDepth), D = p.project(n.centerX + Math.cos(o) * v, y, n.centerDepth + Math.sin(o) * v / p.modelDepth);
2755
+ O.push(() => tn(e, t, a, 0, n.index, n.value, E, u, r, 0, n.percentValue, s, "ctr", D, w, void 0, void 0, void 0, i));
2741
2756
  }
2742
2757
  }
2743
2758
  for (let e of O) e();
2744
- let R = o.categories?.length ? o.categories : n.categories, z = Array.from({ length: R.length }, (e, t) => {
2745
- let r = m.get(t), i = Oe(n, o, r, t, 0);
2759
+ let z = a.categories?.length ? a.categories : t.categories, B = Array.from({ length: z.length }, (e, n) => {
2760
+ let r = h.get(n), i = Re(t, a, r, n, 0);
2746
2761
  if (i === null) return "00000000";
2747
- let a = i?.fillType === "solid" ? i.color : r?.color ?? o.dataPointColors?.[t] ?? o.color;
2748
- return a === "00000000" ? "00000000" : Ce(a ? `#${a}` : gt(t), .8).replace(/^#/, "");
2762
+ let o = i?.fillType === "solid" ? i.color : r?.color ?? a.dataPointColors?.[n] ?? a.color;
2763
+ return o === "00000000" ? "00000000" : Ne(o ? `#${o}` : Dt(n), .8).replace(/^#/, "");
2749
2764
  });
2750
- return Yt(t, {
2751
- ...n,
2752
- categories: R,
2765
+ return fn(e, {
2766
+ ...t,
2767
+ categories: z,
2753
2768
  series: [{
2754
- ...o,
2755
- categories: R,
2756
- dataPointColors: z
2769
+ ...a,
2770
+ categories: z,
2771
+ dataPointColors: B
2757
2772
  }]
2758
- }, d, i, !0, f, a), !0;
2773
+ }, d, r, !0, f, i), !0;
2759
2774
  }
2760
- function hn(e, t, n, r, i = 0) {
2761
- return !t.threeD || !(t.chartType === "pie" || pt.has(t.chartType)) ? !1 : xt(t) ? mn(e, t, n, r, i) ? !0 : pn(e, t, n, r, i) : (It(e, n), !0);
2775
+ function jn(e, t, n, r, i = 0) {
2776
+ return !t.threeD || !(t.chartType === "pie" || wt.has(t.chartType)) ? !1 : Mt(t) ? An(e, t, n, r, i) ? !0 : kn(e, t, n, r, i) : (Yt(e, n), !0);
2762
2777
  }
2763
2778
  //#endregion
2764
2779
  //#region src/three-d.ts
2765
- var gn = Ee({ render: hn }, "threeD");
2780
+ var Mn = Ie({ render: jn }, "threeD");
2766
2781
  //#endregion
2767
- export { gn as threeD };
2782
+ export { Mn as threeD };