@silurus/ooxml 0.88.0 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +118 -23
  2. package/THIRD_PARTY_NOTICES.md +7 -6
  3. package/dist/abort-VrnK7mdP.js +10 -0
  4. package/dist/assets/render-worker-CUOU6mL2.js +16 -0
  5. package/dist/assets/render-worker-DOqrFhSU.js +15 -0
  6. package/dist/assets/render-worker-DvWUdZUN.js +35 -0
  7. package/dist/bounded-raw-part-cache-B7JoC1CD.js +64586 -0
  8. package/dist/bundled-asset-url-E2nXURF9.js +15 -0
  9. package/dist/canvas-viewer-mechanics-DfQqRKkD.js +675 -0
  10. package/dist/cfb-guard-9QTRTg7f.js +528 -0
  11. package/dist/chart-ex.mjs +692 -688
  12. package/dist/comment-overlay-controller-B5_zGgG5.js +994 -0
  13. package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
  14. package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-D_sb2K6s.js} +5 -5
  15. package/dist/{comment-ui-runtime-CWGqn5Vr.js → comment-ui-runtime-Jy-3goA9.js} +5 -5
  16. package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
  17. package/dist/document-model-source-BKNrXjAL.js +249 -0
  18. package/dist/document-pull-client-CxONDGbk.js +37833 -0
  19. package/dist/document-pull-worker-AMyXYpPq.js +104 -0
  20. package/dist/docx-D91ER1_S.js +495 -0
  21. package/dist/docx-DhDnKEI6.js +3563 -0
  22. package/dist/docx-model-source-CdrSt3hF.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-ChcGZNd8.js +310 -0
  27. package/dist/duotone-ekYik4ix.js +126 -0
  28. package/dist/emf-UT6I8rVi.js +1790 -0
  29. package/dist/font-preload-demand-CdJZUMCT.js +2058 -0
  30. package/dist/grid-geometry-uQOgViJU.js +384 -0
  31. package/dist/host-layout-DVMw8hDY.js +56 -0
  32. package/dist/host-layout-measure-CCEgaC_v.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-CPOV6csk.js +2716 -0
  37. package/dist/math.mjs +2 -2
  38. package/dist/mathjax-stix2.js +10 -10
  39. package/dist/model-source-DJGzDtGb.js +61 -0
  40. package/dist/model-source-kz_NkZqT.js +179 -0
  41. package/dist/model-source-session-Bu9CHFHc.js +71 -0
  42. package/dist/model-source-session-CDuijwv1.js +85 -0
  43. package/dist/model-source-session-sKpNiIJI.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-CaJFvZ7p.js +8502 -0
  47. package/dist/pptx-CDP9dZHe.js +2936 -0
  48. package/dist/pptx-C_uxLVKB.js +183 -0
  49. package/dist/pptx-model-source-O7LhpOjz.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-tmROzteR.js +77 -0
  54. package/dist/raster-target-YQ4G6rxo.js +42 -0
  55. package/dist/region-map.mjs +114 -150
  56. package/dist/{render-D3iqVKCo.js → render-CJVglUHl.js} +3 -3
  57. package/dist/{render-worker-host-B5wQfB7U.js → render-worker-host-BseIaVvm.js} +1 -1
  58. package/dist/{render-worker-host-D4123J27.js → render-worker-host-CyxPU4JU.js} +1 -1
  59. package/dist/{render-worker-host-Di3LxLc0.js → render-worker-host-aF6aWkC0.js} +1 -1
  60. package/dist/renderer-CkGLj0CC.js +5170 -0
  61. package/dist/renderer-Czw1cCC7.js +5823 -0
  62. package/dist/resource-measurement-mXw-WjMF.js +771 -0
  63. package/dist/session-Csv9maad.js +656 -0
  64. package/dist/slide-pull-client-DRZYwBTu.js +6515 -0
  65. package/dist/three-d-BK5siJgJ.js +878 -0
  66. package/dist/three-d.mjs +960 -945
  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-DX4y0Ecl.js +97 -0
  82. package/dist/workbook-model-source-BTC4ISTS.js +94 -0
  83. package/dist/worker-source-I1cIYBel.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-CkHgbtyM.js +579 -0
  87. package/dist/xlsx-CpSDPAEU.js +5809 -0
  88. package/dist/xlsx-D5569TPf.js +534 -0
  89. package/dist/xlsx-model-source-DPSkjFic.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/hyperlink-Cxzhet30.js +0 -36446
  109. package/dist/line-distribute-D1WNHKz_.js +0 -1023
  110. package/dist/line-metrics-B60C86uh.js +0 -60
  111. package/dist/plot-area-frame-DLTYKHNP.js +0 -4354
  112. package/dist/pptx-DkyYBYoL.js +0 -3065
  113. package/dist/renderer-B4GZb5We.js +0 -6492
  114. package/dist/resource-measurement-SHQCbkh2.js +0 -150
  115. package/dist/session-BGq81gRQ.js +0 -743
  116. package/dist/slide-pull-client-DiPnm240.js +0 -6253
  117. package/dist/source-key-DIJG8BA0.js +0 -42
  118. package/dist/three-d-DJBl8g8M.js +0 -1162
  119. package/dist/transfer-p6iCC2R7.js +0 -6
  120. package/dist/units-BzZ0gAxs.js +0 -4
  121. package/dist/worksheet-pull-client-BM8ywvbu.js +0 -458
  122. package/dist/xlsx-C9NVjgaV.js +0 -8484
  123. /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
  124. /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
  125. /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
  126. /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
  127. /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
  128. /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
package/dist/three-d.mjs CHANGED
@@ -1,16 +1,15 @@
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 { $i as e, Aa as t, Ai as n, Bi as r, Cn as i, Di as a, Ei as o, Fa as s, Fi as c, Ga as l, Gi as u, Hi as d, Ia as f, Ki as p, La as m, Li as h, Ln as g, Ma as _, Mi as v, Na as y, Nt as b, Oi as x, Ot as S, Pi as C, Qi as w, Ri as T, Rn as E, Sa as D, Ti as O, Vi as k, Wa as A, Yi as j, Zi as M, aa as N, ai as P, ba as F, bn as I, br as L, ca as R, ea as z, fa as B, ia as V, ja as H, ji as ee, ka as U, ki as te, l as W, la as G, li as K, ma as q, n as J, na as ne, oa as Y, oi as re, on as X, pa as ie, pi as ae, qa as oe, qi as se, qt as ce, ra as le, si as ue, sn as de, sr as Z, t as fe, ua as pe, v as me, vn as he, xn as ge, xr as _e, xt as ve, yn as ye, za as be, zi as xe, zn as Se } from "./plot-area-frame-CaJFvZ7p.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-BK5siJgJ.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;
5
+ function Le(e, t, n, r) {
6
+ return A(e, r) ? n : t.chartexFormatIdx ?? r;
8
7
  }
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);
8
+ function Re(e, t, n, r, i) {
9
+ let a = Le(e, t, r, i), o = be(e, "dataPoint3D", i), s = oe(e, "dataPoint3D"), c = U(n?.chartexStyle, s, r);
11
10
  if (c !== void 0) return c;
12
11
  if (n?.fillHidden === !0) {
13
- let e = y(s);
12
+ let e = H(s);
14
13
  if (e !== void 0) return e;
15
14
  }
16
15
  if (n?.color === "00000000") return null;
@@ -18,10 +17,13 @@ function Oe(e, t, n, r, i) {
18
17
  fillType: "solid",
19
18
  color: n.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 l = U(t.chartexStyle, s, a);
21
+ return l === void 0 ? y(o, s, a, n?.chartexStyle, t.chartexStyle) : l;
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 = j(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 = de, 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 / D : 1, r = Number.isFinite(e) && e >= 0 ? e / F : 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 = K(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 = m(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 $(e, n, r, i, a, o = !0) {
1070
+ let c = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : Dt(a, n), u = A(e, a) ? i : n.chartexFormatIdx ?? a, d = n.seriesType ?? e.chartType, f = d === "line" || d === "stackedLine" || d === "stackedLinePct", p = be(e, "dataPoint3D", a), m = oe(e, "dataPoint3D"), h, g = c, v = Re(e, n, r, i, a);
1071
+ v !== void 0 && ({color: g, fill: h} = Nt(v, g));
1072
+ let y, b = null, x = t(r?.chartexStyle, m, i);
1073
+ if (x === void 0 && r?.lineHidden === !0 && (x = _(m)), x !== void 0) x?.fillType === "solid" ? b = `#${x.color}` : y = x;
1074
+ else if (r?.lineColor) b = `#${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 = t(n.chartexStyle, m, u);
1077
+ if (e === void 0 && n.lineHidden === !0 && (e = _(m)), e !== void 0) e?.fillType === "solid" ? b = `#${e.color}` : y = e;
1078
+ else if (n.lineColor) b = `#${n.lineColor}`;
1079
+ else if (f) y = h === null ? null : h;
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 = s(p, m, u, r?.chartexStyle, n.chartexStyle);
1082
+ e !== void 0 && (e?.fillType === "solid" ? b = `#${e.color}` : y = 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 S = f ? void 0 : p, C = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? S?.lineCap, w = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? S?.lineJoin, T = l(r?.lineDash == null ? r?.chartexStyle : {
1084
1086
  lineDash: r.lineDash,
1085
1087
  lineDashAuthored: !0
1086
- }, n.chartexStyle, y);
1088
+ }, n.chartexStyle, S);
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: g,
1091
+ fill: h,
1092
+ lineColor: b,
1093
+ lineFill: y,
1094
+ lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? S?.lineWidthEmu,
1095
+ lineDash: T?.lineDash,
1096
+ lineCustomDash: T?.lineCustomDash,
1097
+ lineCap: C === "rnd" ? "round" : C === "sq" ? "square" : "butt",
1098
+ lineJoin: w === "round" || w === "bevel" ? w : "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(ve(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(_e(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 = Z(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(le));
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", Y(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", Y(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 = D, 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
+ E(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 b = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : Z(m, e, t.x - y, t.y - y, r, r, c);
1448
+ switch (b && (e.strokeStyle = b, e.lineWidth = o, e.setLineDash(L(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;
@@ -1466,122 +1475,124 @@ 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" && me(e, s, t.x - y, t.y - y, r, r, l, c), b && 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 x = s?.fillType === "image" ? s : void 0, S = x ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : Z(s, e, t.x - y, t.y - y, r, r, c);
1485
+ S == null ? x && (e.save(), e.clip(), me(e, x, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = S, e.fill()), b && e.stroke();
1486
+ }
1487
+ function tn(e, t, r, i, s, l, u, d, f, p = 0, m, h, g = "t", _ = u, y = !0, b, S, C = l, w = 0) {
1488
+ let T = h, E = r.seriesDataLabels;
1489
+ if (x(E, T) || t.showDataLabelsOverMax !== !0 && S != null && Number.isFinite(S) && C > S) return;
1490
+ let D = T?.showVal ?? E?.showVal ?? t.showDataLabels, k = T?.showCatName ?? E?.showCatName ?? !1, A = T?.showSerName ?? E?.showSerName ?? !1, M = T?.showPercent ?? E?.showPercent ?? !1, N = T?.text, P = I({
1491
+ customText: N,
1492
+ showCategory: k,
1493
+ showSeries: A,
1494
+ showValue: D,
1495
+ showPercent: M,
1496
+ category: r.categories?.[s] ?? t.categories[s] ?? `${s + 1}`,
1497
+ seriesName: r.name || `Series ${i + 1}`,
1498
+ sourceValue: l,
1499
+ valueDivisor: b?.divisor,
1500
+ percentRatio: m != null && Number.isFinite(m) ? m : void 0,
1501
+ formatCode: T?.formatCode ?? E?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1502
+ percentFormatCode: T?.formatCode ?? E?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1494
1503
  date1904: t.date1904,
1495
- separator: x?.separator ?? S?.separator
1504
+ separator: T?.separator ?? E?.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 (!P) return;
1507
+ let L = j(T?.fontSizeHpt ?? E?.fontSizeHpt ?? t.dataLabelFontSizeHpt, f) ?? 9 * f, R = T?.fontBold ?? E?.fontBold ?? t.dataLabelFontBold ?? !1, z = te(T, E), B = Rt(t, T?.fontFace ?? E?.fontFace ?? t.dataLabelFontFace);
1508
+ e.font = `${z.fontItalic ? "italic " : ""}${R ? "bold " : ""}${L}px ${B}`;
1509
+ let V = `#${T?.fontColor ?? E?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, H = N && T?.richRuns?.length ? Fe(e, {
1510
+ runs: T.richRuns,
1511
+ ptToPx: f,
1512
+ fontFamily: B,
1513
+ fallbackBold: R,
1514
+ fallbackItalic: z.fontItalic,
1515
+ fallbackBaseline: z.fontBaseline,
1516
+ fallbackColorHidden: z.fontPaintAuthored === !0 && (z.fontHidden === !0 || z.fontColor == null),
1517
+ fontFamilyForFace: (e) => Rt(t, e)
1518
+ }, L, V) : null, U = H ? [] : n(P, Math.max(L, d.w * .45), Math.max(L * 1.2, d.h * .35), L * 1.2, (t) => e.measureText(t).width, z);
1519
+ if (!H && !U.length) return;
1520
+ let W = H?.width ?? Math.max(...U.map((t) => e.measureText(t).width)), G = H?.height ?? U.length * L * 1.2, K = a(z, f), q = ee(W + K.left + K.right, G + K.top + K.bottom, z.textRotation, z.textVerticalMode), J = c({
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: u.x,
1523
+ y: u.y,
1524
+ position: T?.position ?? E?.position ?? t.dataLabelPosition ?? g,
1525
+ markerGap: p
1526
+ }, d, {
1527
+ w: q.w,
1528
+ h: q.h
1529
+ }, L, T?.manualLayout, d);
1530
+ if (!J) return;
1531
+ let ne = he(T?.labelBox, E?.labelBox);
1532
+ E?.showLeaderLines && E.leaderLineHidden !== !0 && y && (e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(Math.max(J.rect.x, Math.min(_.x, J.rect.x + J.rect.w)), Math.max(J.rect.y, Math.min(_.y, J.rect.y + J.rect.h))), e.strokeStyle = `#${E.leaderLineColor ?? "808080"}`, e.lineWidth = E.leaderLineWidthEmu == null ? .75 * f : Math.max(.25, E.leaderLineWidthEmu / F * f), e.setLineDash(_e(E.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ye(e, ne, J.rect, f, w), e.save(), e.beginPath(), e.rect(J.clip.x, J.clip.y, J.clip.w, J.clip.h), e.clip();
1533
+ let Y = o(z, J.textAlign), re = O(J.x, J.y, J.rect, G + K.top + K.bottom, z, T?.manualLayout != null, Y, J.textAlign, W + K.left + K.right, q.radians), X = v(e, re.x, re.y, q.radians, Y, J.textBaseline, K);
1534
+ if (H) {
1535
+ Pe(e, H, X.x, X.y, Y, J.textBaseline, T?.manualLayout ? Math.max(0, J.rect.w - K.left - K.right) : H.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 (!(z.fontPaintAuthored === !0 && (z.fontHidden === !0 || z.fontColor == null))) {
1539
+ e.fillStyle = V, e.textAlign = Y, e.textBaseline = "middle";
1540
+ let t = L * 1.2, n = (z.fontBaseline ?? 0) * L, 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);
1539
- }
1540
- function Ht(e, t, n, i, a, o) {
1541
- let s = c(t, n.h, i);
1542
- 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 = {
1545
- x: n.x + (n.w - r) / 2,
1546
- y: n.y + s.topPad,
1547
- w: r,
1548
- h: Math.max(1, s.fontPx)
1549
- }, a = t.titleManualLayout ? b({
1550
- ...t.titleManualLayout,
1547
+ return x(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);
1548
+ }
1549
+ function rn(t, n, r, i, a, o) {
1550
+ let s = d(n, r.h, i), c = n.titleRichRuns?.length ? {
1551
+ ...s,
1552
+ bandH: s.bandH + z(n.title, s.fontPx)
1553
+ } : s;
1554
+ if (n.title) {
1555
+ t.font = `${n.titleFontBold === !1 ? "" : "bold "}${c.fontPx}px ${Lt(n, n.titleFontFace)}`, t.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", t.textAlign = "center", t.textBaseline = "top";
1556
+ let i = R(t, n.title), a = {
1557
+ x: r.x + (r.w - i) / 2,
1558
+ y: r.y + c.topPad,
1559
+ w: i,
1560
+ h: Math.max(1, c.fontPx) + z(n.title, c.fontPx)
1561
+ }, o = n.titleManualLayout ? e({
1562
+ ...n.titleManualLayout,
1551
1563
  w: void 0,
1552
1564
  h: void 0
1553
- }, n, i) : null;
1554
- e.fillText(t.title, a ? a.x + a.w / 2 : n.x + n.w / 2, a?.y ?? i.y);
1565
+ }, r, a) : null;
1566
+ Y(t, n.title, o ? o.x + o.w / 2 : r.x + r.w / 2, o?.y ?? a.y, c.fontPx);
1555
1567
  }
1556
- let u = ct(t);
1557
- 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 ? [] : [{
1568
+ let l = yt(n);
1569
+ t.save();
1570
+ let f = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => l.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
+ }]), m = f.map((e) => bt(n, l.get(e.index), i)), g = Math.max(0, ...m.map((e) => e.fontPx)), _ = f.map((e, n) => (t.font = m[n].font, 7 * i + 4 + R(t, e.label))), v = se(n, r.w, r.h, {
1574
+ itemWidths: _,
1575
+ rowHeight: Math.max(g * 1.45, 12) + Qt(f.map((e) => e.label), g),
1564
1576
  itemGap: 12,
1565
1577
  horizontalPadding: 8,
1566
1578
  verticalPadding: 4
1567
1579
  });
1568
- 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, {
1570
- titleBand: s,
1571
- legendSideReserveFrac: .23,
1572
- legendReserve: _,
1580
+ t.restore();
1581
+ let y = p(v, n.legendOverlay === !0), b = u(n, r.w, r.h, i), x = k(n.catAxisTitleTextVerticalInsetEmu, i), S = k(n.valAxisTitleTextVerticalInsetEmu, i), C = a === "horizontal" ? n.catAxisTitle ? b.catFontPx + x + xe(r.w) + 4 + h(n.catAxisTitle, b.catFontPx, "left", n.catAxisTitleRotation, n.catAxisTitleVerticalMode) : 0 : a === "vertical" ? b.valBandW : 0, w = a === "horizontal" ? n.valAxisTitle ? b.valFontPx + S + xe(r.h) + 4 + h(n.valAxisTitle, b.valFontPx, "horizontal", n.valAxisTitleRotation, n.valAxisTitleVerticalMode) : 0 : a === "vertical" ? b.catBandH : 0, T = M(n, r.x, r.y, r.w, r.h, i, {
1582
+ titleBand: c,
1583
+ legendReserve: v,
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: c.bandH + y.legTopH + r.h * .04,
1586
+ r: y.legRightW + r.w * .05,
1587
+ b: y.legBottomH + r.h * .19 + w,
1588
+ l: y.legLeftW + r.w * .13 + C
1578
1589
  },
1579
1590
  honorPlotAreaManualLayout: !0,
1580
1591
  manualOuterInsets: {
1581
- t: s.bandH,
1582
- r: v.legRightW,
1583
- b: v.legBottomH + w,
1584
- l: v.legLeftW + C
1592
+ t: c.bandH,
1593
+ r: y.legRightW,
1594
+ b: y.legBottomH + w,
1595
+ l: y.legLeftW + C
1585
1596
  }
1586
1597
  }), E = {
1587
1598
  x: T.plotRect.px0,
@@ -1589,200 +1600,204 @@ function Ht(e, t, n, i, a, o) {
1589
1600
  w: Math.max(1, T.plotRect.pw),
1590
1601
  h: Math.max(1, T.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,
1603
+ fe(t, n, E.x, E.y, E.w, E.h, i, o);
1604
+ let D = v ? v.side === "r" ? {
1605
+ x: r.x + r.w - v.reserveW,
1595
1606
  y: E.y,
1596
- w: _.reserveW,
1607
+ w: v.reserveW,
1597
1608
  h: E.h
1598
- } : _.side === "l" ? {
1599
- x: n.x,
1609
+ } : v.side === "l" ? {
1610
+ x: r.x,
1600
1611
  y: E.y,
1601
- w: _.reserveW,
1612
+ w: v.reserveW,
1602
1613
  h: E.h
1603
- } : _.side === "t" ? {
1604
- x: n.x + 4,
1605
- y: n.y + s.bandH,
1606
- w: Math.max(1, n.w - 8),
1607
- h: _.reserveH
1614
+ } : v.side === "t" ? {
1615
+ x: r.x + 4,
1616
+ y: r.y + c.bandH,
1617
+ w: Math.max(1, r.w - 8),
1618
+ h: v.reserveH
1608
1619
  } : {
1609
- x: n.x + 4,
1610
- y: n.y + n.h - _.reserveH,
1611
- w: Math.max(1, n.w - 8),
1612
- h: _.reserveH
1620
+ x: r.x + 4,
1621
+ y: r.y + r.h - v.reserveH,
1622
+ w: Math.max(1, r.w - 8),
1623
+ h: v.reserveH
1613
1624
  } : null;
1614
1625
  return {
1615
1626
  plot: E,
1616
- legend: (D && t.legendManualLayout ? b(t.legendManualLayout, n, D) : null) ?? D,
1627
+ legend: (D && n.legendManualLayout ? e(n.legendManualLayout, r, D) : null) ?? D,
1617
1628
  legendMeasure: {
1618
- labels: d.map((e) => e.label),
1619
- styles: f,
1620
- itemWidths: h
1629
+ labels: f.map((e) => e.label),
1630
+ styles: m,
1631
+ itemWidths: _
1621
1632
  }
1622
1633
  };
1623
1634
  }
1624
- function Ut(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1625
- 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;
1627
- 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({
1634
- ...f,
1635
+ function an(t, n, i, a, o, s, c, l, u, d, f, p, m, h) {
1636
+ t.save(), t.font = `${d ? "italic " : ""}${u ? "bold " : ""}${s}px ${c}`, t.fillStyle = l ? `#${l}` : "#555";
1637
+ let g = m ? n : on(t, n, h), _ = r(o, f, p), v = a;
1638
+ if (m) {
1639
+ let n = R(t, g), r = s + z(g, s), o = Math.abs(Math.cos(_)), c = Math.abs(Math.sin(_)), l = {
1640
+ x: a.x - (n * o + r * c) / 2,
1641
+ y: a.y - (n * c + r * o) / 2,
1642
+ w: n * o + r * c,
1643
+ h: n * c + r * o
1644
+ }, u = e({
1645
+ ...m,
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
+ }, i, l);
1649
+ u && (v = {
1650
+ x: u.x + u.w / 2,
1651
+ y: u.y + u.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
+ t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", Y(t, g, 0, 0, s), t.restore();
1644
1655
  }
1645
- function Wt(e, t, n, r, i, a) {
1656
+ function on(e, t, n) {
1657
+ let r = V(t);
1658
+ return r.length === 1 ? G(e, t, n) : r.map((t) => G(e, t, n)).join("\n");
1659
+ }
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 = T(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left", c = h(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 + xe(n.h) + o / 2 + c
1651
1666
  } : {
1652
- x: r.x - oe(n.w) - s / 2,
1667
+ x: r.x - xe(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 = T(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal", c = h(t.catAxisTitle, o, s, t.catAxisTitleRotation, t.catAxisTitleVerticalMode) / 2;
1673
+ an(e, t.catAxisTitle, n, i ? {
1674
+ x: r.x - xe(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 + xe(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)), E = d.majorTickMark ?? "out", D = j(d.fontSizeHpt, u) ?? 9 * u;
1705
+ if (e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${D}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 && E !== "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 = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "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 && E !== "none") {
1716
+ let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "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 && Y(e, t.series[n].name || `Series ${n + 1}`, o.x + b.x * (6 * u + 3), o.y + b.y * (6 * u + 3), N(D));
1720
+ }
1721
+ if (e.setLineDash([]), d.title) {
1722
+ let i = T(d.titleFontSizeHpt, u), a = D + i + 12 + ne(t.series.map((e, t) => e.name || `Series ${t + 1}`), N(D)) + z(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, n, r, i, a, o, s) {
1730
+ let c = be(e, "dataPointMarker", a), u = oe(e, "dataPointMarker"), d = n.chartexFormatIdx ?? a, p = U(r?.markerStyle, u, i), m = U(n.markerStyle, u, d), h = p !== void 0 || r?.markerFillPaint !== void 0 || r?.markerFill != null || r?.color != null || r?.markerFillPaintAuthored === !0 && r.markerStyle?.fillHidden !== !0, _ = m !== void 0 || n.markerFillPaint !== void 0 || n.markerFill != null || n.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, v = y(c, u, d), b = h ? p ?? r?.markerFillPaint : _ ? m ?? n.markerFillPaint : v, x = ue(n, r, i, o), S = b;
1731
+ b?.fillType === "solid" ? (x = b.color, S = void 0) : b === null && (x = "00000000");
1732
+ let C = t(r?.markerStyle, u, i), w = t(n.markerStyle, u, d), T = C !== void 0 || r?.markerLine != null || r?.markerLinePaintAuthored === !0 && r.markerStyle?.lineHidden !== !0, E = w !== void 0 || n.markerLine != null || n.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, D = f(c, d), O = T ? C ?? (r?.markerLinePaintAuthored === !0 ? null : void 0) : E ? w ?? (n.markerLinePaintAuthored === !0 ? null : void 0) : D, k = r?.markerLine ?? n.markerLine ?? n.lineColor ?? o, A = O;
1733
+ O?.fillType === "solid" ? (k = O.color, A = void 0) : O === null && (k = "00000000");
1734
+ let j = r?.markerStyle ?? n.markerStyle ?? c, M = l(r?.markerStyle, n.markerStyle, c);
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),
1736
+ fill: x,
1737
+ fillPaint: S,
1738
+ line: k,
1739
+ linePaint: A,
1740
+ lineWidth: (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? j?.lineWidthEmu) == null ? Math.max(.75, s) : Math.max(.25, (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? j?.lineWidthEmu ?? 0) / F * s),
1741
+ lineDash: M?.lineDash,
1742
+ lineCustomDash: M?.lineCustomDash,
1743
+ lineCap: j?.lineCap,
1744
+ lineJoin: j?.lineJoin,
1745
+ effectDirect: g(r?.markerStyle, r?.chartexStyle, n.markerStyle),
1731
1746
  effectFallback: c,
1732
- effectIndex: r?.markerStyle || r?.chartexStyle ? i : u,
1733
- effectFallbackIndex: u
1747
+ effectIndex: r?.markerStyle || r?.chartexStyle ? i : d,
1748
+ effectFallbackIndex: d
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) => {
1743
- 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));
1751
+ function un(e, t, n, r, i, a, o, s, c, l, u, d) {
1752
+ let f = $(t, n, r, i, a, d), p = Le(t, n, i, a), m = {
1753
+ x: o,
1754
+ y: s - c / 2,
1755
+ w: c,
1756
+ h: c
1757
+ }, h = (e) => {
1758
+ if (f.fill !== null) {
1759
+ let t = f.fill === void 0 ? f.color : f.fill.fillType === "image" ? null : Z(f.fill, e, m.x, m.y, m.w, m.h, u);
1760
+ t && (e.fillStyle = t, e.fillRect(m.x, m.y, m.w, m.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 = f.lineFill === void 0 ? f.lineColor : f.lineFill == null || f.lineFill.fillType === "image" ? null : Z(f.lineFill, e, m.x, m.y, m.w, m.h, u);
1763
+ t && (e.strokeStyle = t, e.lineWidth = f.lineWidthEmu == null ? .75 * l : Math.max(.25, f.lineWidthEmu / F * l), e.setLineDash(L(f.lineCustomDash, f.lineDash, e.lineWidth)), e.lineCap = f.lineCap, e.lineJoin = f.lineJoin, e.strokeRect(m.x, m.y, m.w, m.h), e.setLineDash([]));
1764
+ }, _ = g(r?.chartexStyle, n.chartexStyle);
1765
+ E(e, _, be(t, "dataPoint3D", a), _ === r?.chartexStyle ? i : p, m, l, h, p);
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, l) {
1768
+ let u = $(t, n, void 0, r, r, !1), d = u.lineFill === void 0 ? u.lineColor == null ? u.fill : {
1754
1769
  fillType: "solid",
1755
- color: d.lineColor.replace(/^#/, "")
1756
- } : d.lineFill;
1757
- 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);
1770
+ color: u.lineColor.replace(/^#/, "")
1771
+ } : u.lineFill;
1772
+ if (d !== null) {
1773
+ let i = u.lineWidthEmu == null ? Math.max(1, 2 * c) : Math.max(.5, u.lineWidthEmu / F * c), f = {
1774
+ x: a,
1775
+ y: o - i / 2,
1776
+ w: s,
1777
+ h: i
1778
+ }, p = d === void 0 ? u.color : d.fillType === "image" ? null : d.fillType === "solid" ? `#${d.color}` : Z(d, e, a, o - i / 2, s, i, l);
1779
+ if (p) {
1780
+ let m = (t) => {
1781
+ t.beginPath(), t.moveTo(a, o), t.lineTo(a + s, o), t.strokeStyle = t === e ? p : d === void 0 ? u.color : d.fillType === "image" ? "rgba(0,0,0,0)" : d.fillType === "solid" ? `#${d.color}` : Z(d, t, a, o - i / 2, s, i, l) ?? "rgba(0,0,0,0)", t.lineWidth = i, t.setLineDash(L(u.lineCustomDash, u.lineDash, i)), t.stroke(), t.setLineDash([]);
1782
+ }, h = Le(t, n, r, r);
1783
+ E(e, g(n.chartexStyle), be(t, "dataPoint3D", r), h, f, c, m, h);
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 f = n.markerSymbol ?? "circle", p = ln(t, n, void 0, r, r, i.replace(/^#/, ""), c);
1788
+ en(e, {
1789
+ x: a + s / 2,
1790
+ y: o
1791
+ }, f, Math.min(s, Math.max(2, (n.markerSize ?? 5) * c)), p.fill === "00000000" ? "transparent" : `#${p.fill.replace(/^#/, "")}`, p.line === "00000000" ? "rgba(0,0,0,0)" : `#${p.line.replace(/^#/, "")}`, p.lineWidth, p.fillPaint, l, c, p.effectDirect, p.effectFallback, p.effectIndex, p.effectFallbackIndex, p.linePaint, p.lineDash, p.lineCustomDash, p.lineCap, p.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
+ ce(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 + R(e, t.label))), c = w(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, Y(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 = V(s.label), v = (t) => C(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 b({
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 / F * r) : a * r;
1885
1900
  return {
1886
1901
  color: `#${e ?? i}`,
1887
1902
  width: o,
1888
- dash: ce(n ?? "solid", o)
1903
+ dash: _e(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 / F * 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: _e(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) {
1914
- 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;
1924
+ function bn(e, t, n, r, i, a, o, s, c) {
1925
+ let { front: l } = n, u = l.x, d = l.x + l.w, f = hn(n), { sideX: p, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = f, y = Dn(t, n, r, a, o, s, i), b = [], x = t.catAxisLinePaintAuthored === !0, S = t.valAxisLinePaintAuthored === !0, C = i === "vertical" ? x && !t.catAxisHidden && !t.catAxisLineHidden : S && !t.valAxisHidden && !t.valAxisLineHidden, w = i === "vertical" ? S && !t.valAxisHidden && !t.valAxisLineHidden : x && !t.catAxisHidden && !t.catAxisLineHidden;
1926
+ C && b.push([y.horizontalStart, y.horizontalEnd]), w && b.push([y.verticalStart, y.verticalEnd]);
1927
+ let T = t.threeD?.seriesAxis, E = T?.linePaintAuthored === !0;
1928
+ if (T && !T.hidden && !T.lineHidden && E && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1929
+ let e = i === "vertical" ? f.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 D = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, O = (e, t) => b.some(([n, r]) => D(e, n) && D(t, r) || D(e, r) && D(t, n)), k = (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
+ }, A = k("floor", t.threeD?.floor), j = k("sideWall", t.threeD?.sideWall), M = k("backWall", t.threeD?.backWall), N = A.faces, P = j.faces, I = M.faces, R = (i, a, o, s) => {
1948
+ let l = m(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 = W(l.fill, o ? J(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) => W(t, J(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 d = u.flatMap((e) => e.points), f = Math.min(...d.map((e) => e.x)), p = Math.max(...d.map((e) => e.x)), h = Math.min(...d.map((e) => e.y)), g = Math.max(...d.map((e) => e.y)), _ = l.fill.fillType === "solid" ? `#${l.fill.color}` : Z(l.fill, e, f, h, p - f, 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(A, t.threeD?.floor, "floor", "floor"), R(j, t.threeD?.sideWall, "wall", "sideWall"), R(M, 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(A, "floor", "x", t), z(M, "backWall", "x", t)) : (z(j, "sideWall", "y", t), z(M, "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(p, r, _), a = n.project(p, r, v), o = n.project(p === u ? d : 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(A, "floor", "x", e), z(M, "backWall", "x", e)) : (z(j, "sideWall", "y", e), z(M, "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(ie(a, o), gn(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, c, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && V(pe(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 = m(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);
1996
+ }, s = n.flatMap((e) => e.points), l = 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}` : Z(o, e, l, d, u - l, f - d);
1982
1997
  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";
1998
+ let h = a.lineWidthEmu == null ? c : Math.max(.25, a.lineWidthEmu / F * c);
1999
+ e.strokeStyle = p, e.lineWidth = h, e.setLineDash(L(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) => O(e.start, e.end))) {
2007
+ for (let t of n) O(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(N, t.threeD?.floor, "floor"), H(P, t.threeD?.sideWall, "wall"), H(I, 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,25 +2031,25 @@ 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) {
2052
+ function Dn(e, t, n, r, i, a, o) {
2038
2053
  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 = () => {
2039
2054
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
2040
2055
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
@@ -2044,7 +2059,7 @@ function dn(e, t, n, r, i, a, o) {
2044
2059
  return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
2045
2060
  }, f = () => {
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 q(t - 1, r, i, a);
2048
2063
  let n = e.valAxisCrosses;
2049
2064
  if (n !== "min" && n !== "max") return null;
2050
2065
  let o = +(n === "max");
@@ -2060,242 +2075,242 @@ function dn(e, t, n, r, i, a, o) {
2060
2075
  verticalEnd: t.project(h, s.y, _)
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, r, i, a, o, s, c, l) {
2079
+ let { front: u } = n, d = Dn(t, n, r, i, a, o, s), { axisX: f, axisY: p, depth: m } = d, h = n.project(u.x + u.w / 2, u.y + u.h / 2, m), g = t.valAxisMinorTickMark ?? "none", _ = c ? 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, _(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, l));
2082
+ let i = (e) => s === "horizontal" ? n.project(u.x + r.fraction(e) * u.w, p, m) : n.project(f, u.y + u.h - r.fraction(e) * u.h, m), a = s === "horizontal" ? d.horizontalStart : d.verticalStart, o = s === "horizontal" ? d.horizontalEnd : d.verticalEnd;
2083
+ for (let n of r.majorTicks) Cn(e, t.valAxisMajorTickMark, i(n), a, o, h, s === "vertical" ? "horizontal" : "vertical", "major", l);
2084
+ for (let t of r.minorTicks) Cn(e, g, i(t), a, o, h, s === "vertical" ? "horizontal" : "vertical", "minor", l);
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, _(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, l));
2088
+ let r = s === "vertical" ? d.horizontalStart : d.verticalStart, g = s === "vertical" ? d.horizontalEnd : d.verticalEnd, v = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), y = (i) => {
2089
+ let a = s === "vertical" ? n.project(u.x + i * u.w, p, m) : n.project(f, u.y + i * u.h, m);
2090
+ Cn(e, t.catAxisMajorTickMark, a, r, g, h, s === "vertical" ? "vertical" : "horizontal", "major", l);
2076
2091
  };
2077
- if (l) {
2078
- let e = a(i, o);
2079
- 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));
2081
- let x = t.catAxisMinorUnit;
2082
- 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);
2092
+ if (c) {
2093
+ let e = pe(i, a);
2094
+ for (let t = 0; t < e.length; t += v) y(o ? 1 - e[t] : e[t]);
2095
+ } else for (let e = 0; e < i; e += v) y(q(e, i, a, o));
2096
+ let b = t.catAxisMinorUnit;
2097
+ if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && b != null && Number.isFinite(b) && b > 0) {
2098
+ let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : v, d = Math.min(512, Math.ceil(i / b));
2099
+ for (let _ = 1; _ < d; _++) {
2100
+ let d = _ * b;
2101
+ if (!(d < i)) break;
2102
+ if (Math.abs(d / c - Math.round(d / c)) < 1e-9) continue;
2103
+ let v = q(d, i, a, o), y = s === "vertical" ? n.project(u.x + v * u.w, p, m) : n.project(f, u.y + v * u.h, m);
2104
+ Cn(e, t.catAxisMinorTickMark, y, r, g, h, s === "vertical" ? "vertical" : "horizontal", "minor", l);
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, r, a) {
2111
+ if (!t.threeD) return !1;
2112
+ let o = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), s = t.chartType.endsWith("H") || t.chartType.includes("BarH"), c = t.chartType.startsWith("stacked"), l = o && !c && t.threeD.barGrouping === "standard", { plot: u, legend: d, legendMeasure: f } = rn(e, t, n, r, s ? "horizontal" : "vertical", a), p = Te(t.threeD, u, {
2113
+ sceneDepthScale: o ? l ? .65 : .1 : .4,
2114
+ perspectiveTangentGain: l ? 1 : 2,
2115
+ sceneHeightScale: !o && !(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 (!p) return !0;
2118
+ p = De(p, t.threeD, u);
2119
+ let m = t.chartType.endsWith("Pct"), h = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, h.length, ...t.series.map((e) => e.values.length)), v = m ? kt(t, _) : void 0, y = t.catAxisOrientation === "maxMin", b = t.catAxisCrossBetween === "between", x = t.dispBlanksAs ?? "gap", C = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, w = (e, n) => {
2120
+ let r = t.series[e]?.values[n];
2121
+ return r != null && Number.isFinite(r) && (!C || r > 0) || r == null && (c || x === "zero");
2122
+ }, T = (e, n) => At(t, e, n, v), E = 0, O = 0;
2123
+ if (c) {
2124
+ for (let e = 0; e < _; e++) {
2125
+ let n = 0, r = 0;
2126
+ for (let i = 0; i < t.series.length; i++) {
2127
+ let t = T(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
+ E = Math.min(E, r), O = Math.max(O, n);
2116
2131
  }
2117
- b && (M = M < 0 ? -100 : 0, N = N > 0 ? 100 : 0, M === 0 && N === 0 && (N = 1));
2132
+ m && (E = E < 0 ? -100 : 0, O = O > 0 ? 100 : 0, E === 0 && O === 0 && (O = 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 = S(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!C || e > 0)), C ? {
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);
2127
- }
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]) ?? []));
2131
- 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;
2141
+ E = C ? e.min : Math.min(0, e.min), O = C ? e.max : Math.max(0, e.max);
2142
+ }
2143
+ let k = s ? p.project(p.front.x, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y, p.topology.nearDepth), A = s ? p.project(p.front.x + p.front.w, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y + p.front.h, p.topology.nearDepth), M = Math.hypot(A.x - k.x, A.y - k.y) / r, I = pn(t, E, O, M, m, s ? "horizontal" : "vertical"), z = (e) => Number.isFinite(e) ? Math.max(I.min, Math.min(I.max, e)) : I.min;
2144
+ o || bn(e, t, p, I, s ? "horizontal" : "vertical", _, b, y, r);
2145
+ let { front: V } = p, H = Math.max(1, t.series.length), ee = [], U = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), te = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2146
+ if (o) {
2147
+ let i = p.prismInterval(0, 1, !0), o = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (s ? V.h : V.w) / _, 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], a = l ? p.prismInterval(e, H, !1) : i, g = je(f, h, l ? 0 : e, l ? 1 : H, c || l);
2150
+ for (let i = 0; i < _; i++) {
2151
+ if (!w(e, i)) continue;
2152
+ let l = T(e, i), p = $(t, n, U[e].get(i), i, e), h = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = c ? l >= 0 ? u[i] : d[i] : 0, x = jt(b, l);
2153
+ c && (l >= 0 ? u[i] = x : d[i] = x);
2154
+ let S = z(b), E = z(x), O = n.threeDShape ?? t.threeD.shape ?? "box", k = O === "cone" || O === "pyramid", A = O === "coneToMax" || O === "pyramidToMax", j = (e) => {
2155
+ if (!k) return 1;
2156
+ let t = C && !(b > 0) ? I.min : b, n = I.fraction(t), r = I.fraction(x), i = I.fraction(e), a = r - n;
2142
2157
  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) => {
2144
- 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);
2158
+ }, M = (e) => {
2159
+ if (!A) return 1;
2160
+ let t = x >= b ? I.max : I.min, n = C ? 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);
2152
- 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,
2165
+ ].every(Number.isFinite) ? we(e, I.min, I.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2166
+ }, N = A ? M(S) : j(S), P = A ? M(E) : j(E);
2167
+ if (s) {
2168
+ let t = V.x + I.fraction(S) * V.w, n = V.x + I.fraction(E) * V.w, s = y ? _ - 1 - i : i, c = V.y + s * f + g.offset;
2169
+ o.push({
2170
+ x: Math.min(t, n),
2171
+ y: c,
2172
+ width: Math.abs(n - t),
2173
+ height: g.size,
2174
+ nearDepth: a.near,
2175
+ farDepth: a.far,
2176
+ categoryIndex: i,
2162
2177
  seriesIndex: e,
2163
2178
  color: h,
2164
- fillPaint: m.fill,
2165
- lineFill: m.lineFill,
2166
- shape: C,
2179
+ fillPaint: p.fill,
2180
+ lineFill: p.lineFill,
2181
+ shape: O,
2167
2182
  baseCoord: t,
2168
- endCoord: r,
2169
- baseScale: M,
2170
- endScale: N,
2183
+ endCoord: n,
2184
+ baseScale: N,
2185
+ endScale: P,
2171
2186
  omitBaseCap: !1,
2172
2187
  omitEndCap: !1,
2173
- outline: g,
2174
- outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2175
- outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
2176
- outlineDash: m.lineDash ?? "solid",
2177
- outlineCustomDash: m.lineCustomDash,
2178
- outlineCap: m.lineCap,
2179
- outlineJoin: m.lineJoin,
2180
- labelValue: b ? p / 100 : p,
2181
- plottedLabelValue: v
2188
+ outline: v,
2189
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2190
+ outlineWidth: p.lineWidthEmu == null ? .75 * r / D : Tt(p.lineWidthEmu, r),
2191
+ outlineDash: p.lineDash ?? "solid",
2192
+ outlineCustomDash: p.lineCustomDash,
2193
+ outlineCap: p.lineCap,
2194
+ outlineJoin: p.lineJoin,
2195
+ labelValue: m ? l / 100 : l,
2196
+ plottedLabelValue: x
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 = V.y + V.h - I.fraction(S) * V.h, n = V.y + V.h - I.fraction(E) * V.h, s = y ? _ - 1 - i : i, c = V.x + s * f + g.offset;
2200
+ o.push({
2201
+ x: c,
2202
+ y: Math.min(t, n),
2203
+ width: g.size,
2204
+ height: Math.abs(n - t),
2205
+ nearDepth: a.near,
2206
+ farDepth: a.far,
2207
+ categoryIndex: i,
2193
2208
  seriesIndex: e,
2194
2209
  color: h,
2195
- fillPaint: m.fill,
2196
- lineFill: m.lineFill,
2197
- shape: C,
2210
+ fillPaint: p.fill,
2211
+ lineFill: p.lineFill,
2212
+ shape: O,
2198
2213
  baseCoord: t,
2199
- endCoord: r,
2200
- baseScale: M,
2201
- endScale: N,
2214
+ endCoord: n,
2215
+ baseScale: N,
2216
+ endScale: P,
2202
2217
  omitBaseCap: !1,
2203
2218
  omitEndCap: !1,
2204
- outline: g,
2205
- outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2206
- outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
2207
- outlineDash: m.lineDash ?? "solid",
2208
- outlineCustomDash: m.lineCustomDash,
2209
- outlineCap: m.lineCap,
2210
- outlineJoin: m.lineJoin,
2211
- labelValue: b ? p / 100 : p,
2212
- plottedLabelValue: v
2219
+ outline: v,
2220
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2221
+ outlineWidth: p.lineWidthEmu == null ? .75 * r / D : Tt(p.lineWidthEmu, r),
2222
+ outlineDash: p.lineDash ?? "solid",
2223
+ outlineCustomDash: p.lineCustomDash,
2224
+ outlineCap: p.lineCap,
2225
+ outlineJoin: p.lineJoin,
2226
+ labelValue: m ? l / 100 : l,
2227
+ plottedLabelValue: x
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 (c) {
2233
+ let e = Et(o, _);
2234
+ for (let t = 0; t < _; 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, p, I, s ? "horizontal" : "vertical", _, b, y, r);
2251
+ let v = {
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
+ }, x = o.map((t) => {
2255
+ let n = Ut(p, t.shape, s, 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: L(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2259
+ cap: t.outlineCap,
2260
+ join: t.outlineJoin
2261
+ } : void 0, v);
2262
+ return Jt(e, n, "fill", t.fillPaint, a), Jt(e, n, "outline", t.lineFill, a), {
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 = x.flatMap((e) => e.faces);
2267
+ if (v.exceeded) return Yt(e, n), !0;
2268
+ for (let t of nt(S)) Kt(e, t);
2269
+ for (let { item: n, faces: i } of x) {
2270
+ let a = t.series[n.seriesIndex], o = U[n.seriesIndex].get(n.categoryIndex), s = Le(t, a, n.categoryIndex, n.seriesIndex), c = g(o?.chartexStyle), l = g(a.chartexStyle);
2271
+ Se(e, c ?? l, be(t, "dataPoint3D", n.seriesIndex), c ? n.categoryIndex : s, r, (e) => qt(e, i), 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 i of o) {
2274
+ let o = t.series[i.seriesIndex], c = s ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), l = te[i.seriesIndex].get(i.categoryIndex);
2275
+ nn(t, o, l) && ee.push(() => tn(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, c, n, r, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, I.max, i.plottedLabelValue, a));
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(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
2279
+ if (c) {
2280
+ let e = Array(_).fill(0), n = Array(_).fill(0);
2281
+ for (let r = 0; r < t.series.length; r++) for (let t = 0; t < _; t++) {
2282
+ let a = T(r, t), s = a >= 0 ? e[t] : n[t];
2283
+ i[r][t] = s, o[r][t] = jt(s, a), a >= 0 ? e[t] = jt(e[t], a) : n[t] = jt(n[t], a);
2269
2284
  }
2270
2285
  }
2271
- 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++;
2286
+ let s = (e) => {
2287
+ let t = p.seriesDepth(e, H, c), n = 0, r = 0;
2288
+ for (let i = 0; i < _; i++) {
2289
+ if (!w(e, i)) continue;
2290
+ let a = c ? o[e][i] : T(e, i), s = V.x + q(i, _, b, y) * V.w, l = V.y + V.h - I.fraction(z(a)) * V.h;
2291
+ n += p.cameraDepth(s, l, t), r++;
2277
2292
  }
2278
2293
  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);
2294
+ }, l = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), u = t.series.map((e, n) => $(t, e, void 0, n, n)), d = [], f = [], h = !1;
2295
+ for (let s of l) {
2296
+ if (h) break;
2297
+ let l = t.series[s], g = u[s], v = g.fill === null ? "transparent" : g.color, S = c ? p.prismInterval(0, 1, !0) : p.prismInterval(s, H, !1), C = V.x + V.w / 2, E = V.y + V.h / 2, D = p.cameraDepth(C, E, S.near) >= p.cameraDepth(C, E, S.far) ? S.near : S.far, O = [], k = [], A = [], j = [], M = [], N = [], R = [], z = [], B = [], W = [];
2298
+ for (let e = 0; e < _; e++) {
2299
+ if (!w(s, e)) {
2300
+ O.push(null), k.push(null), A.push(null), j.push(null), M.push(null), N.push(null), R.push(null), z.push(null), B.push(null), W.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 = c ? o[s][e] : T(s, e), r = c ? i[s][e] : 0, a = V.x + q(e, _, b, y) * V.w, l = I.fraction(n), u = I.fraction(r), d = Number.isFinite(u) ? u : r <= I.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= I.min ? 0 : 1, h = V.y + V.h - m * V.h, g = V.y + V.h - Math.max(0, Math.min(1, d)) * V.h;
2304
+ O.push(t.chartType.toLowerCase().includes("area") || f ? p.project(a, h, D) : null), k.push(p.project(a, g, D)), A.push(f ? p.cameraDepth(a, h, D) : null), j.push(p.cameraDepth(a, g, D)), M.push(n), N.push(a), R.push(h), z.push(g), B.push(l), W.push(d);
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 G = [], K = null;
2307
+ for (let e = 0; e < O.length; e++) {
2308
+ let t = O[e], n = k[e];
2294
2309
  if (!t || !n) {
2295
- O === "gap" && (q && K.push(q), q = null);
2310
+ x === "gap" && (K && G.push(K), K = null);
2296
2311
  continue;
2297
2312
  }
2298
- q ??= {
2313
+ K ??= {
2299
2314
  upper: [],
2300
2315
  lower: [],
2301
2316
  upperDepths: [],
@@ -2306,71 +2321,71 @@ 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
+ }, K.upper.push(t), K.lower.push(n), K.upperDepths.push(A[e] ?? 0), K.lowerDepths.push(j[e] ?? 0), K.indices.push(e), K.sceneXs.push(N[e] ?? 0), K.upperYs.push(R[e] ?? 0), K.lowerYs.push(z[e] ?? 0), K.upperFractions.push(B[e] ?? 0), K.lowerFractions.push(W[e] ?? 0);
2310
2325
  }
2311
- q && K.push(q);
2326
+ K && G.push(K);
2312
2327
  let J = [], ne = [];
2313
- if (r.chartType.toLowerCase().includes("area")) {
2314
- for (let e of K) {
2328
+ if (t.chartType.toLowerCase().includes("area")) {
2329
+ for (let t of G) {
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 = V.y + V.h - o.lowerStart * V.h, u = V.y + V.h - o.lowerEnd * V.h, f = V.y + V.h - o.upperStart * V.h, m = V.y + V.h - o.upperEnd * V.h, g = {
2335
+ ...p.project(s, f, D),
2336
+ cameraDepth: p.cameraDepth(s, f, D),
2337
+ cameraWeight: p.cameraProjectionWeight(s, f, D)
2338
+ }, _ = {
2339
+ ...p.project(c, m, D),
2340
+ cameraDepth: p.cameraDepth(c, m, D),
2341
+ cameraWeight: p.cameraProjectionWeight(c, m, D)
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 - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 && J.push(n), n = [g, _]);
2344
+ let y = Ht(p, s, c, l, u, f, m, S.near, S.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2345
+ for (let t of y) {
2346
+ if (d.length >= 1e4) {
2347
+ h = !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
+ d.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
+ }), ne.push(t);
2343
2358
  }
2344
- if (g) break;
2359
+ if (h) break;
2345
2360
  }
2346
- if (g) break;
2361
+ if (h) break;
2347
2362
  }
2348
- if (n && n.length >= 2 && J.push(n), g) break;
2363
+ if (n && n.length >= 2 && J.push(n), h) break;
2349
2364
  }
2350
- Ft(t, ne, "fill", _.fill, o);
2365
+ Jt(e, ne, "fill", g.fill, a);
2351
2366
  }
2352
2367
  let Y = [];
2353
- if (!r.chartType.toLowerCase().includes("area")) {
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);
2370
+ for (let n = 0; n < _; n++) {
2371
+ let r = M[n], i = r == null ? NaN : I.fraction(r);
2357
2372
  if (r == null || !Number.isFinite(i)) {
2358
- O === "gap" && t && (e.push(t), t = null);
2373
+ x === "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,
2377
+ x: V.x + q(n, _, b, y) * V.w,
2363
2378
  fraction: i,
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 = V.y + V.h - t * V.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
+ ...p.project(e.x, n, D),
2387
+ cameraDepth: p.cameraDepth(e.x, n, D),
2388
+ cameraWeight: p.cameraProjectionWeight(e.x, n, D)
2374
2389
  };
2375
2390
  }, r = (e) => {
2376
2391
  e && e.path.length >= 2 && Y.push(e);
@@ -2380,7 +2395,7 @@ function pn(t, r, i, a, o) {
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
  }
@@ -2402,366 +2417,366 @@ function pn(t, r, i, a, o) {
2402
2417
  }
2403
2418
  let i = 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);
2406
- if (!p || p.endT - p.startT <= 1e-12) {
2420
+ let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, V.y + V.h - e.fraction * V.h, D), 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) * V.h), m = Ye(o.fraction, s.fraction);
2421
+ if (!m || m.endT - m.startT <= 1e-12) {
2407
2422
  r(i), i = null, a += f;
2408
2423
  continue;
2409
2424
  }
2410
- let m = (e) => ({
2425
+ let h = (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
+ }), g = c(h(m.startT)), _ = Math.hypot(g.x - l.x, g.y - l.y), v = n(h(m.startT)), y = n(h(m.endT)), b = h(m.startT), x = h(m.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: V.y + V.h - Math.max(0, Math.min(1, e.fraction)) * V.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
+ i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(y), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 || m.endT < 1) : (r(i), i = {
2434
+ path: [v, y],
2420
2435
  modelPath: [S(b), S(x)],
2421
2436
  ownerIndex: s.ownerIndex,
2422
- startClipped: t > 0 || p.startT > 0,
2423
- endClipped: t + 1 < e.length - 1 || p.endT < 1,
2424
- dashOffset: a + (Number.isFinite(g) ? g : f * p.startT)
2437
+ startClipped: t > 0 || m.startT > 0,
2438
+ endClipped: t + 1 < e.length - 1 || m.endT < 1,
2439
+ dashOffset: a + (Number.isFinite(_) ? _ : f * m.startT)
2425
2440
  }), a += f;
2426
2441
  }
2427
2442
  r(i);
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;
2437
- }, i = /* @__PURE__ */ new Map(), s = {
2438
- remaining: Ke,
2445
+ let X = 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 || g.lineColor != null || g.lineFill !== void 0;
2446
+ if (!X || g.lineFill !== null && ie) {
2447
+ let n = /* @__PURE__ */ new Map(), i = (e) => {
2448
+ let r = U[s].get(e);
2449
+ if (!Pt(r)) return g;
2450
+ let i = n.get(e);
2451
+ return i || (i = $(t, l, r, e, s), n.set(e, i)), i;
2452
+ }, o = /* @__PURE__ */ new Map(), c = {
2453
+ remaining: rt,
2439
2454
  exceeded: !1
2440
- }, l = (e, n, r, o = r, c = 0, l) => {
2455
+ }, u = (t, n, i, a = i, s = 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),
2445
- dashOffset: c,
2457
+ let u = n === g ? v : n.color, f = n.lineColor ?? Ne(u, .7), m = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / F) * r : X ? .75 * r : Math.max(1, 2 * r), _ = {
2458
+ width: m,
2459
+ dash: L(n.lineCustomDash, n.lineDash, m),
2460
+ dashOffset: s,
2446
2461
  lineCap: n.lineCap,
2447
- startCap: r,
2448
- endCap: o,
2462
+ startCap: i,
2463
+ endCap: a,
2449
2464
  lineJoin: n.lineJoin
2450
2465
  };
2451
- if (!re && l && l.length >= 2) {
2452
- let e = et(l.map((e) => ({
2466
+ if (!X && 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
+ })), _);
2472
+ if (t == null) {
2473
+ h = !0;
2459
2474
  return;
2460
2475
  }
2461
- let r = i.get(n) ?? [];
2462
- for (let n of e) {
2463
- let e = Ie({
2476
+ let r = o.get(n) ?? [];
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: S.near,
2481
+ farDepth: S.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(p, t, f, void 0, c).map((e) => ({
2470
2485
  ...e,
2471
2486
  paintRole: "outline"
2472
2487
  }));
2473
- if (s.exceeded) {
2474
- g = !0;
2488
+ if (c.exceeded) {
2489
+ h = !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) d.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
- i.set(n, r);
2502
+ o.set(n, r);
2488
2503
  return;
2489
2504
  }
2490
- let h = et(e, m);
2491
- if (h == null) {
2492
- g = !0;
2505
+ let y = dt(t, _);
2506
+ if (y == null) {
2507
+ h = !0;
2493
2508
  return;
2494
2509
  }
2495
- if (p.length + h.length > 1e4) {
2496
- g = !0;
2510
+ if (d.length + y.length > 1e4) {
2511
+ h = !0;
2497
2512
  return;
2498
2513
  }
2499
- for (let e of h) {
2514
+ for (let t of y) {
2500
2515
  let r = {
2501
- points: e.points,
2502
- color: d,
2516
+ points: t.points,
2517
+ color: f,
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
- }, 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,
2524
+ }, i = o.get(n) ?? [];
2525
+ i.push(r), o.set(n, i), d.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);
2535
+ if (X) for (let e of J) u(e, g, g.lineCap);
2521
2536
  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);
2537
+ let t = i(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 o) Jt(e, n, "outline", t.lineFill, a);
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);
2532
- 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));
2542
+ let oe = (X ? l.showMarker === !0 || ae(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2543
+ if ((t.chartType.toLowerCase().includes("line") || X) && (oe || re(l))) for (let n = 0; n < O.length; n++) {
2544
+ let i = O[n];
2545
+ if (!i) continue;
2546
+ let o = U[s].get(n), c = P(l, o, "circle", oe);
2547
+ if (c === "none") continue;
2548
+ let u = o?.markerSize ?? l.markerSize ?? 5, d = ln(t, l, o, n, s, l.color ?? xt[s % xt.length], r);
2549
+ f.push(() => en(e, i, c, Math.max(2, u) * r, d.fill === "00000000" ? "transparent" : `#${d.fill.replace(/^#/, "")}`, d.line === "00000000" ? "rgba(0,0,0,0)" : `#${d.line.replace(/^#/, "")}`, d.lineWidth, d.fillPaint, a, r, 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 i = 0; i < O.length; i++) {
2552
+ let u = O[i];
2553
+ if (!u) continue;
2554
+ let d = T(s, i), f = U[s].get(i), p = f?.markerSize ?? l.markerSize ?? 5, h = te[s].get(i);
2555
+ nn(t, l, h) && ee.push(() => tn(e, t, l, s, i, m ? d / 100 : d, u, n, r, l.showMarker === !0 || f?.markerSymbol != null ? p * r / 2 : 0, void 0, h, "t", u, !0, t.valAxisDisplayUnits, I.max, c ? o[s][i] : d, a));
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;
2551
- 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;
2558
+ if (h) return Yt(e, n), !0;
2559
+ for (let e of nt(d)) e.paint();
2560
+ for (let e of f) e();
2561
+ }
2562
+ xn(e, t, p, I, _, b, y, r, s ? "horizontal" : "vertical"), On(e, t, p, I, _, b, y, s ? "horizontal" : "vertical", o, r), cn(e, t, n, p, I, _, b, y, s ? "horizontal" : "vertical", o, r);
2563
+ let W = Dn(t, p, I, _, b, y, s ? "horizontal" : "vertical"), G = (e, t) => {
2564
+ if (t !== "low" && t !== "high") return W;
2565
+ let n = p.topology.nearDepth, r = W.axisX, i = W.axisY;
2566
+ if (e === "value" === s) {
2567
+ let e = V.y, r = V.y + V.h, a = p.project(V.x + V.w / 2, e, n), o = p.project(V.x + V.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 = V.x, i = V.x + V.w, a = p.project(e, V.y + V.h / 2, n), o = p.project(i, V.y + V.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: p.project(V.x, i, n),
2578
+ horizontalEnd: p.project(V.x + V.w, i, n),
2579
+ verticalStart: p.project(r, V.y + V.h, n),
2580
+ verticalEnd: p.project(r, V.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
+ }, K = G("value", t.valAxisTickLabelPos), J = G("category", t.catAxisTickLabelPos), ne = j(t.valAxisFontSizeHpt, r) ?? 9 * r;
2583
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ne}px ${Lt(t, t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = s ? "center" : "right", e.textBaseline = s ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2584
+ let { axisX: n, axisY: a, depth: o } = K, c = p.project(V.x + V.w / 2, V.y + V.h / 2, o), l = Sn(s ? K.horizontalStart : K.verticalStart, s ? K.horizontalEnd : K.verticalEnd, c, s ? "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, r, 5), d = t.valAxisDisplayUnits?.divisor;
2587
+ for (let r of I.majorTicks) {
2588
+ let c = s ? p.project(V.x + I.fraction(r) * V.w, a, o) : p.project(n, V.y + V.h - I.fraction(r) * V.h, o);
2589
+ Y(e, i(m ? r / 100 : d != null && Number.isFinite(d) && d > 0 ? r / d : r, m ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), c.x + l.x * u, c.y + l.y * u, N(ne));
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 X = j(t.catAxisFontSizeHpt, r) ?? 9 * r;
2593
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${X}px ${Lt(t, t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2594
+ let n = B(En(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: _ }, (e, n) => ge(String(h[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Xt(t);
2595
+ if (a == null && (a = 0, !s && _ > 1)) {
2596
+ let t = Infinity, n = null, r = J.axisY;
2597
+ for (let e = 0; e < _; e++) {
2598
+ let i = q(e, _, b, y), a = p.project(V.x + i * V.w, r, p.topology.nearDepth);
2599
+ n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
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) => R(e, t))) > t * .9 && (a = -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);
2591
- 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);
2603
+ let o = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2604
+ for (let t = 0; t < _; t += o) {
2605
+ let r = q(t, _, b, y), { axisX: o, axisY: c, depth: l } = J, u = s ? p.project(o, V.y + q(t, _, b, y) * V.h, l) : p.project(V.x + r * V.w, c, l);
2606
+ if (s) {
2607
+ let r = p.project(o, V.y + V.h / 2, l), a = p.project(V.x + V.w / 2, V.y + V.h / 2, l), s = r.x <= a.x;
2608
+ e.textAlign = s ? "right" : "left", e.textBaseline = "middle", Y(e, i[t], u.x + (s ? -n : n), u.y, N(X));
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 = p.project(V.x + V.w / 2, V.y + V.h / 2, l), o = Sn(J.horizontalStart, J.horizontalEnd, r, "vertical");
2611
+ $t(e, i[t], u, a, s, o.y < 0 ? -1 : 1, n, N(X));
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, u, s, r);
2616
+ for (let e of ee) e();
2617
+ return fn(e, t, d, r, !1, f, a), !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: l, legend: u, legendMeasure: d } = rn(e, t, n, r, "radial", i), f = Te({
2632
+ ...t.threeD,
2633
+ rotationY: t.threeD.rotationY ?? 0,
2619
2634
  heightPercent: void 0,
2620
2635
  depthPercent: 100
2621
- }, u, {
2636
+ }, l, {
2622
2637
  sceneDepthScale: 1,
2623
2638
  sceneHeightScale: .15
2624
2639
  });
2625
- 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);
2640
+ if (!f) return !0;
2641
+ let p = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), m = 0;
2642
+ for (let e of p.values()) e.explosion != null && Number.isFinite(e.explosion) && (m = Math.max(m, Math.max(0, Math.min(100, e.explosion)) / 100));
2643
+ let { scene: h } = f, _ = Math.min(h.w * .45 / (1 + m), f.modelDepth * .45 / (1 + m), h.h / .45);
2629
2644
  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({
2645
+ let v = h.x + h.w / 2, y = h.y + h.h / 2, b = .5, x = _ * .3 * Ae(t.threeD), S = 0, C = [], w = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2646
+ for (let e of o) {
2647
+ let n = e.value / s / c, r = mn(t.firstSliceAngle, S, n), i = p.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 = v + Math.cos(l) * _ * u, m = b + Math.sin(l) * _ * u / f.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = Je({
2633
2648
  centerX: d,
2634
- centerY: b,
2635
- centerDepth: f,
2649
+ centerY: y,
2650
+ centerDepth: m,
2636
2651
  radius: _,
2637
- modelDepth: p.modelDepth,
2638
- thickness: S,
2652
+ modelDepth: f.modelDepth,
2653
+ thickness: x,
2639
2654
  startAngle: r.start,
2640
2655
  endAngle: r.end,
2641
2656
  segments: h
2642
2657
  });
2643
2658
  if (!g) {
2644
- w += t;
2659
+ S += n;
2645
2660
  continue;
2646
2661
  }
2647
- T.push({
2662
+ C.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
- centerDepth: f,
2671
+ centerDepth: m,
2657
2672
  segments: h,
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);
2669
- let O = [], k = {
2670
- remaining: Ke,
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
+ }), S += n;
2682
+ }
2683
+ f = Me(f, C.flatMap((e) => e.mesh.vertices), l, .08);
2684
+ let E = [], D = {
2685
+ remaining: rt,
2671
2686
  exceeded: !1
2672
- }, A = (e) => {
2673
- let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / X * i);
2687
+ }, O = (e) => {
2688
+ let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / F * 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: L(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
+ }, k = C.map((t) => {
2697
+ let n = Wt(f, t.mesh, t.color, void 0, D);
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
+ }), A = k.flatMap((e) => e.faces), M = [], N = C.map(O), P = N[0], R = (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("|"), z = P != null && C.every((e) => e.lineFill === void 0) && N.every((e) => R(e) === R(P)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2709
+ if (z) M.push(...Gt(f, C, y, _, x, P, D));
2710
+ else for (let t = 0; t < C.length; t++) {
2711
+ let n = N[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(f, C[t].mesh, "transparent", n, D, !0);
2714
+ Jt(e, r, "outline", C[t].lineFill, i), M.push(...r);
2715
+ }
2716
+ if (D.exceeded) return Yt(e, n), !0;
2717
+ if (z) {
2718
+ for (let t of nt(A)) Kt(e, t);
2719
+ for (let t of nt(M)) Kt(e, t);
2720
+ } else for (let t of nt([...A, ...M])) Kt(e, t);
2721
+ for (let { slice: n, faces: i } of k) {
2722
+ let o = p.get(n.index), s = Le(t, a, n.index, 0), c = g(o?.chartexStyle);
2723
+ Se(e, c ?? g(a.chartexStyle), be(t, "dataPoint3D", 0), c ? n.index : s, r, (e) => qt(e, i), s);
2724
+ }
2725
+ for (let n of C) {
2726
+ let o = (n.start + n.end) / 2, s = w.get(n.index);
2727
+ if (nn(t, a, s)) {
2728
+ let c = a.seriesDataLabels, u = j(s?.fontSizeHpt ?? c?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2729
+ e.font = `${s?.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${u}px ${Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace)}`;
2730
+ let d = I({
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
+ }), p = Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace), m = s?.text && s.richRuns?.length ? Fe(e, {
2729
2744
  runs: s.richRuns,
2730
- ptToPx: i,
2731
- 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;
2745
+ ptToPx: r,
2746
+ fontFamily: p,
2747
+ fallbackBold: s.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ?? !1,
2748
+ fontFamilyForFace: (e) => Rt(t, e)
2749
+ }, u, `#${s.fontColor ?? c?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? t.dataLabelPosition, g = y - x / 2, v = y + x / 2, b = f.cameraDepth(n.centerX, g, n.centerDepth) >= f.cameraDepth(n.centerX, v, n.centerDepth) ? g : v, S = 0, C = null;
2750
+ for (let e = 0; e <= 12; e++) {
2751
+ let t = n.start + (n.end - n.start) * e / 12, r = f.project(n.centerX + Math.cos(t) * _ * .64, b, n.centerDepth + Math.sin(t) * _ * .64 / f.modelDepth);
2752
+ C && (S += Math.hypot(r.x - C.x, r.y - C.y)), C = 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 || S < (m?.width ?? e.measureText(d).width)) || h === "outEnd", T = _ * (w ? 1.12 : .64), D = f.project(n.centerX + Math.cos(o) * T, b, n.centerDepth + Math.sin(o) * T / f.modelDepth), O = f.project(n.centerX + Math.cos(o) * _, b, n.centerDepth + Math.sin(o) * _ / f.modelDepth);
2755
+ E.push(() => tn(e, t, a, 0, n.index, n.value, D, l, r, 0, n.percentValue, s, "ctr", O, w, void 0, void 0, void 0, i));
2741
2756
  }
2742
2757
  }
2743
- 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);
2758
+ for (let e of E) e();
2759
+ let B = a.categories?.length ? a.categories : t.categories, V = Array.from({ length: B.length }, (e, n) => {
2760
+ let r = p.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: B,
2753
2768
  series: [{
2754
- ...o,
2755
- categories: R,
2756
- dataPointColors: z
2769
+ ...a,
2770
+ categories: B,
2771
+ dataPointColors: V
2757
2772
  }]
2758
- }, d, i, !0, f, a), !0;
2773
+ }, u, r, !0, d, 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 };