@silurus/ooxml 0.80.3 → 0.81.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 (54) hide show
  1. package/README.md +57 -77
  2. package/dist/assets/render-worker-C2ACcLes.js +11 -0
  3. package/dist/assets/render-worker-Cx5uR77k.js +10 -0
  4. package/dist/assets/render-worker-DtU8oQZ7.js +24 -0
  5. package/dist/{canvas-viewer-mechanics-D-r6wHY_.js → canvas-viewer-mechanics-CqxKRGCp.js} +1 -1
  6. package/dist/chart-ex.mjs +1017 -0
  7. package/dist/{document-pull-client-vxk-Aomu.js → document-pull-client-Ux4a_ax8.js} +4540 -4412
  8. package/dist/{docx-DN0PRx2f.js → docx-SEyQ4gS-.js} +79 -75
  9. package/dist/docx.mjs +5 -4
  10. package/dist/docx_parser_bg.wasm +0 -0
  11. package/dist/index.mjs +3 -3
  12. package/dist/{line-distribute-Bvtp0Gt6.js → line-distribute-BBGvvwLt.js} +17 -16
  13. package/dist/{line-metrics-DdEJYxjx.js → line-metrics-Baz31mML.js} +663 -7488
  14. package/dist/math.mjs +2 -2
  15. package/dist/node.mjs +248 -247
  16. package/dist/plot-area-frame-Dg1VIpUU.js +3669 -0
  17. package/dist/{pptx-B-Laftl1.js → pptx-5lQrMvMR.js} +236 -232
  18. package/dist/pptx.mjs +6 -5
  19. package/dist/pptx_parser_bg.wasm +0 -0
  20. package/dist/region-map.mjs +102 -97
  21. package/dist/{render-CoqMHcbF.js → render-DEHjijQD.js} +1 -1
  22. package/dist/{render-worker-host-CYPhmBtX.js → render-worker-host-B1nbV_k7.js} +1 -1
  23. package/dist/{render-worker-host-GlLR1rtF.js → render-worker-host-Bze5M6k5.js} +1 -1
  24. package/dist/{render-worker-host-IuQFpoJM.js → render-worker-host-Dg_74V64.js} +1 -1
  25. package/dist/renderer-DuopJE1K.js +5855 -0
  26. package/dist/{renderer-module-contract-BNGz8HvO.js → renderer-module-contract-0bO_5SC0.js} +4 -3
  27. package/dist/{resource-measurement-CgMubiAI.js → resource-measurement-DRLp4nFt.js} +12 -11
  28. package/dist/{session-DkPblDiq.js → session-CNVc3VJ4.js} +8 -8
  29. package/dist/{slide-pull-client-m2blvngt.js → slide-pull-client-CzutXnGc.js} +888 -1082
  30. package/dist/three-d-BYiWCNlz.js +1345 -0
  31. package/dist/three-d.mjs +1238 -798
  32. package/dist/types/chart-ex.d.ts +949 -0
  33. package/dist/types/docx.d.ts +325 -18
  34. package/dist/types/index.d.ts +325 -26
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +303 -14
  37. package/dist/types/pptx.d.ts +314 -22
  38. package/dist/types/region-map.d.ts +318 -6
  39. package/dist/types/three-d.d.ts +318 -6
  40. package/dist/types/xlsx.d.ts +317 -18
  41. package/dist/{worksheet-pull-client-BntP6RiO.js → worksheet-pull-client-Cxj3Ej0s.js} +19 -19
  42. package/dist/{xlsx-DqMe7J2C.js → xlsx-Bl3TIEVu.js} +1313 -1279
  43. package/dist/xlsx.mjs +6 -5
  44. package/dist/xlsx_parser_bg.wasm +0 -0
  45. package/package.json +7 -1
  46. package/dist/assets/render-worker-CRaEOHkw.js +0 -9
  47. package/dist/assets/render-worker-DQGLj5Zv.js +0 -22
  48. package/dist/assets/render-worker-rnrSLmqL.js +0 -8
  49. package/dist/chart-number-format-qLhnk6hj.js +0 -475
  50. package/dist/three-d-C28kqDym.js +0 -1086
  51. /package/dist/{highlight-rect-BuX5rWP4.js → highlight-rect-BqcZMHUE.js} +0 -0
  52. /package/dist/{mathjax-DgAl7Yi5.js → mathjax-DJa-Q93p.js} +0 -0
  53. /package/dist/{transfer-CKZ79zFw.js → transfer-D0U6Uhn4.js} +0 -0
  54. /package/dist/{visible-index-BjesVGhg.js → visible-index-DbDuGMCE.js} +0 -0
package/dist/three-d.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { C as e, S as t, _ as n, d as r, f as i, g as a, h as o, l as s, r as c, t as l, u, x as d, y as f } from "./chart-number-format-qLhnk6hj.js";
2
- import { H as p, L as m, N as h, S as g, _, b as v, d as y, g as b, i as x, j as S, n as C, r as w, s as T, t as E, v as D, w as O, x as k, y as ee } from "./three-d-C28kqDym.js";
3
- import { t as A } from "./renderer-module-contract-BNGz8HvO.js";
4
- function j(e) {
1
+ import { A as e, At as t, B as n, Bt as r, Ct as i, Dt as a, E as o, Et as s, H as c, Ht as l, It as u, J as d, Jt as f, Kt as p, Lt as m, Mt as h, Nt as g, R as _, Rt as v, St as y, Ut as b, Wt as x, Xt as S, Y as C, Yt as w, _t as T, a as E, an as D, at as O, b as k, bt as A, ct as j, ft as M, ht as N, it as P, jt as F, kt as I, mt as L, n as R, ot as ee, r as z, rn as B, st as V, t as H, v as U, vt as te, wt as W, x as G, xt as ne, yt as re } from "./plot-area-frame-Dg1VIpUU.js";
2
+ import { D as K, E as q, O as ie, _ as J, a as Y, c as ae, d as X, g as oe, h as se, i as ce, k as le, m as ue, n as de, o as fe, r as pe, s as me, t as he, x as ge } from "./three-d-BYiWCNlz.js";
3
+ import { t as _e } from "./renderer-module-contract-0bO_5SC0.js";
4
+ function ve(e) {
5
5
  switch (e) {
6
6
  case "cylinder":
7
7
  case "cone":
@@ -11,8 +11,8 @@ function j(e) {
11
11
  default: return "box";
12
12
  }
13
13
  }
14
- var M = (e) => Math.max(0, Math.min(1, e));
15
- function N(e, t) {
14
+ var ye = (e) => Math.max(0, Math.min(1, e));
15
+ function be(e, t) {
16
16
  if (t.length < 3) return null;
17
17
  let n = e[t[0]];
18
18
  for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
@@ -37,7 +37,7 @@ function N(e, t) {
37
37
  }
38
38
  return null;
39
39
  }
40
- function P(e, t) {
40
+ function xe(e, t) {
41
41
  let n = e.reduce((t, n) => ({
42
42
  x: t.x + n.x / e.length,
43
43
  y: t.y + n.y / e.length,
@@ -48,7 +48,7 @@ function P(e, t) {
48
48
  depth: 0
49
49
  });
50
50
  return t.map((t) => {
51
- let r = N(e, t.indices);
51
+ let r = be(e, t.indices);
52
52
  if (!r) return t;
53
53
  let i = t.indices.reduce((n, r) => ({
54
54
  x: n.x + e[r].x / t.indices.length,
@@ -69,7 +69,7 @@ function P(e, t) {
69
69
  };
70
70
  });
71
71
  }
72
- function F(e) {
72
+ function Se(e) {
73
73
  let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
74
74
  if (![
75
75
  n,
@@ -79,7 +79,7 @@ function F(e) {
79
79
  o,
80
80
  s
81
81
  ].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
82
- let c = j(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? 32))) : 4, p = M(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = M(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
82
+ let c = ve(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 = ye(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = ye(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
83
83
  if (p === 0 && m === 0) return null;
84
84
  let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
85
85
  if (n === 0) {
@@ -146,11 +146,11 @@ function F(e) {
146
146
  return {
147
147
  shape: c,
148
148
  vertices: y,
149
- faces: P(y, w),
149
+ faces: xe(y, w),
150
150
  silhouetteEdges: T
151
151
  };
152
152
  }
153
- function I(e) {
153
+ function Ce(e) {
154
154
  let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
155
155
  if (![
156
156
  t,
@@ -210,7 +210,7 @@ function I(e) {
210
210
  return {
211
211
  shape: "areaStrip",
212
212
  vertices: _,
213
- faces: P(_, [
213
+ faces: xe(_, [
214
214
  {
215
215
  indices: [
216
216
  0,
@@ -275,17 +275,17 @@ function I(e) {
275
275
  silhouetteEdges: []
276
276
  };
277
277
  }
278
- function L(e) {
278
+ function we(e) {
279
279
  let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
280
280
  if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
281
281
  let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
282
- return [I({
282
+ return [Ce({
283
283
  ...e,
284
284
  x1: i,
285
285
  lower1: a,
286
286
  upper1: a,
287
287
  capEnd: !1
288
- }), I({
288
+ }), Ce({
289
289
  ...e,
290
290
  x0: i,
291
291
  lower0: a,
@@ -293,10 +293,51 @@ function L(e) {
293
293
  capStart: !1
294
294
  })].filter((e) => e != null);
295
295
  }
296
- let r = I(e);
296
+ let r = Ce(e);
297
297
  return r ? [r] : [];
298
298
  }
299
- function R(e) {
299
+ function Te(e) {
300
+ let t = e.outline;
301
+ 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;
302
+ let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
303
+ ...e,
304
+ depth: n
305
+ })), ...t.map((e) => ({
306
+ ...e,
307
+ depth: r
308
+ }))], o = Array.from({ length: i }, (e, t) => t), s = Array.from({ length: i }, (e, t) => i + t).reverse();
309
+ return {
310
+ shape: "lineRibbon",
311
+ vertices: a,
312
+ faces: xe(a, [
313
+ {
314
+ indices: o,
315
+ role: "side",
316
+ smoothSurface: !1
317
+ },
318
+ {
319
+ indices: s,
320
+ role: "side",
321
+ smoothSurface: !1
322
+ },
323
+ ...Array.from({ length: i }, (e, t) => {
324
+ let n = (t + 1) % i;
325
+ return {
326
+ indices: [
327
+ t,
328
+ n,
329
+ i + n,
330
+ i + t
331
+ ],
332
+ role: "side",
333
+ smoothSurface: !1
334
+ };
335
+ })
336
+ ]),
337
+ silhouetteEdges: []
338
+ };
339
+ }
340
+ function Ee(e) {
300
341
  let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
301
342
  if (![
302
343
  t,
@@ -388,13 +429,13 @@ function R(e) {
388
429
  return {
389
430
  shape: "pieSector",
390
431
  vertices: m,
391
- faces: P(m, v),
432
+ faces: xe(m, v),
392
433
  silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
393
434
  };
394
435
  }
395
436
  //#endregion
396
437
  //#region packages/core/src/chart/three-d-scene.ts
397
- function z(e, t) {
438
+ function De(e, t) {
398
439
  if (![e, t].every(Number.isFinite)) return null;
399
440
  let n = t - e;
400
441
  if (n === 0) return e >= 0 && e <= 1 ? {
@@ -407,7 +448,7 @@ function z(e, t) {
407
448
  endT: o
408
449
  } : null;
409
450
  }
410
- function B(e, t, n, r) {
451
+ function Oe(e, t, n, r) {
411
452
  if (![
412
453
  e,
413
454
  t,
@@ -436,12 +477,12 @@ function B(e, t, n, r) {
436
477
  }
437
478
  return l;
438
479
  }
439
- var V = (e) => ({
480
+ var ke = (e) => ({
440
481
  minX: Math.min(...e.map((e) => e.x)),
441
482
  maxX: Math.max(...e.map((e) => e.x)),
442
483
  minY: Math.min(...e.map((e) => e.y)),
443
484
  maxY: Math.max(...e.map((e) => e.y))
444
- }), H = (e, t) => {
485
+ }), Ae = (e, t) => {
445
486
  let n = !1;
446
487
  for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
447
488
  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));
@@ -449,7 +490,7 @@ var V = (e) => ({
449
490
  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);
450
491
  }
451
492
  return n;
452
- }, U = (e, t, n, r) => {
493
+ }, je = (e, t, n, r) => {
453
494
  let i = {
454
495
  x: t.x - e.x,
455
496
  y: t.y - e.y
@@ -467,23 +508,23 @@ var V = (e) => ({
467
508
  y: e.y + i.y * c
468
509
  };
469
510
  };
470
- function W(e, t, n, r) {
511
+ function Me(e, t, n, r) {
471
512
  let i = [], a = (e) => {
472
513
  i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
473
514
  }, o = {
474
515
  x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
475
516
  y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
476
517
  };
477
- H(e, o) && H(t, o) && a(o);
478
- for (let n of e) H(t, n) && a(n);
479
- for (let n of t) H(e, n) && a(n);
518
+ Ae(e, o) && Ae(t, o) && a(o);
519
+ for (let n of e) Ae(t, n) && a(n);
520
+ for (let n of t) Ae(e, n) && a(n);
480
521
  for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
481
- let i = U(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
522
+ let i = je(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
482
523
  i && a(i);
483
524
  }
484
525
  return i;
485
526
  }
486
- function G(e, t) {
527
+ function Ne(e, t) {
487
528
  let n = e.cameraDepths;
488
529
  if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
489
530
  let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
@@ -497,17 +538,17 @@ function G(e, t) {
497
538
  }
498
539
  return e.cameraDepth;
499
540
  }
500
- function K(e) {
541
+ function Pe(e) {
501
542
  if (e.length < 2) return [...e];
502
- let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => V(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;
543
+ let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => ke(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;
503
544
  for (let c of r) {
504
545
  for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
505
546
  for (let r of o) {
506
547
  if (++s > 2e5) return t.map((t) => e[t]);
507
548
  if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
508
- let o = W(e[r].points, e[c].points, n[r], n[c]), l = 0;
549
+ let o = Me(e[r].points, e[c].points, n[r], n[c]), l = 0;
509
550
  for (let t of o) {
510
- let n = G(e[r], t) - G(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
551
+ let n = Ne(e[r], t) - Ne(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
511
552
  if (Math.abs(n) <= i) continue;
512
553
  let a = n < 0 ? -1 : 1;
513
554
  if (l !== 0 && l !== a) {
@@ -533,29 +574,29 @@ function K(e) {
533
574
  }
534
575
  //#endregion
535
576
  //#region packages/core/src/chart/three-d-stroke.ts
536
- var q = 1e-9, te = 1e4, ne = (e, t, n) => ({
577
+ var Z = 1e-9, Fe = 1e4, Ie = (e, t, n) => ({
537
578
  x: e.x + (t.x - e.x) * n,
538
579
  y: e.y + (t.y - e.y) * n,
539
580
  cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
540
581
  cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
541
- }), J = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= q;
542
- function re(e, t, n = 0) {
543
- let r = t.filter((e) => Number.isFinite(e) && e > q);
582
+ }), Le = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Z;
583
+ function Re(e, t, n = 0) {
584
+ let r = t.filter((e) => Number.isFinite(e) && e > Z);
544
585
  if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
545
586
  r.length % 2 == 1 && r.push(...r);
546
- 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;
547
- for (; l > q;) {
587
+ 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;
588
+ for (; l > Z;) {
548
589
  let e = Math.min(l, o);
549
- l -= e, o -= e, o <= q && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
590
+ l -= e, o -= e, o <= Z && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
550
591
  }
551
592
  let u = null;
552
593
  for (let t = 0; t + 1 < e.length; t++) {
553
594
  let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
554
- if (!(l > q)) continue;
595
+ if (!(l > Z)) continue;
555
596
  let d = 0;
556
- for (; d < l - q;) {
557
- let e = Math.min(o, l - d), t = ne(n, c, d / l), f = ne(n, c, (d + e) / l);
558
- if (s && (u ??= [], (u.length === 0 || !J(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= q) {
597
+ for (; d < l - Z;) {
598
+ let e = Math.min(o, l - d), t = Ie(n, c, d / l), f = Ie(n, c, (d + e) / l);
599
+ if (s && (u ??= [], (u.length === 0 || !Le(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Z) {
559
600
  if (s && u && u.length >= 2) {
560
601
  if (i.length >= 1e4) return null;
561
602
  i.push(u);
@@ -568,13 +609,13 @@ function re(e, t, n = 0) {
568
609
  if (i.length >= 1e4) return null;
569
610
  i.push(u);
570
611
  }
571
- if (i.length > 1 && J(e[0], e.at(-1)) && J(i[0][0], e[0]) && J(i.at(-1).at(-1), e.at(-1))) {
612
+ if (i.length > 1 && Le(e[0], e.at(-1)) && Le(i[0][0], e[0]) && Le(i.at(-1).at(-1), e.at(-1))) {
572
613
  let e = i.shift(), t = i.pop();
573
614
  i.unshift([...t, ...e.slice(1)]);
574
615
  }
575
616
  return i;
576
617
  }
577
- var Y = (e, t) => ({
618
+ var ze = (e, t) => ({
578
619
  kind: e,
579
620
  points: t.map(({ x: e, y: t }) => ({
580
621
  x: e,
@@ -583,7 +624,7 @@ var Y = (e, t) => ({
583
624
  cameraDepths: t.map((e) => e.cameraDepth),
584
625
  cameraWeights: t.map((e) => e.cameraWeight ?? 1),
585
626
  cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
586
- }), ie = (e, t, n) => {
627
+ }), Be = (e, t, n) => {
587
628
  let r = [];
588
629
  for (let n = 0; n < 12; n++) {
589
630
  let i = Math.PI * 2 * n / 12;
@@ -593,17 +634,17 @@ var Y = (e, t) => ({
593
634
  y: e.y + Math.sin(i) * t
594
635
  });
595
636
  }
596
- return Y(n, r);
637
+ return ze(n, r);
597
638
  };
598
- function ae(e, t, n) {
639
+ function Ve(e, t, n) {
599
640
  let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
600
- if (!(r > q) || t.length < 3) return null;
641
+ if (!(r > Z) || t.length < 3) return null;
601
642
  let i = r / 2;
602
- if ((n.lineJoin ?? "miter") === "round") return ie(e, i, "join");
643
+ if ((n.lineJoin ?? "miter") === "round") return Be(e, i, "join");
603
644
  let a = [];
604
645
  for (let n of t) {
605
646
  let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
606
- if (!(o > q)) continue;
647
+ if (!(o > Z)) continue;
607
648
  let s = -r / o * i, c = t / o * i;
608
649
  a.push({
609
650
  ...e,
@@ -619,20 +660,20 @@ function ae(e, t, n) {
619
660
  a.sort((e, t) => e.x - t.x || e.y - t.y);
620
661
  let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
621
662
  for (let e of a) {
622
- for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= q;) s.pop();
663
+ for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Z;) s.pop();
623
664
  s.push(e);
624
665
  }
625
666
  let c = [];
626
667
  for (let e of [...a].reverse()) {
627
- for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= q;) c.pop();
668
+ for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Z;) c.pop();
628
669
  c.push(e);
629
670
  }
630
671
  let l = [...s.slice(0, -1), ...c.slice(0, -1)];
631
- return l.length >= 3 ? Y("join", l) : null;
672
+ return l.length >= 3 ? ze("join", l) : null;
632
673
  }
633
- var oe = (e, t, n, r) => {
674
+ var He = (e, t, n, r) => {
634
675
  let i = t.x * r.y - t.y * r.x;
635
- if (Math.abs(i) <= q) return null;
676
+ if (Math.abs(i) <= Z) return null;
636
677
  let a = {
637
678
  x: n.x - e.x,
638
679
  y: n.y - e.y
@@ -642,17 +683,17 @@ var oe = (e, t, n, r) => {
642
683
  y: e.y + t.y * o
643
684
  };
644
685
  };
645
- function se(e, t) {
686
+ function Ue(e, t) {
646
687
  let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
647
- if (!(n > q) || e.length < 2) return [];
648
- let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = re(e, t.dash ?? [], t.dashOffset);
688
+ if (!(n > Z) || e.length < 2) return [];
689
+ let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = Re(e, t.dash ?? [], t.dashOffset);
649
690
  if (c == null) return null;
650
691
  let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
651
692
  for (let n = 0; n < c.length; n++) {
652
- let s = c[n], u = s.length > 2 && J(s[0], s.at(-1)), d = n === 0 && J(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && J(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
693
+ let s = c[n], u = s.length > 2 && Le(s[0], s.at(-1)), d = n === 0 && Le(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && Le(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
653
694
  for (let e = 0; e + 1 < s.length; e++) {
654
695
  let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
655
- p.push(r > q ? {
696
+ p.push(r > Z ? {
656
697
  x: (n.x - t.x) / r,
657
698
  y: (n.y - t.y) / r
658
699
  } : null);
@@ -672,7 +713,7 @@ function se(e, t) {
672
713
  x: s[e + 1].x + n.x * _,
673
714
  y: s[e + 1].y + n.y * _
674
715
  };
675
- if (!l(Y("segment", [
716
+ if (!l(ze("segment", [
676
717
  {
677
718
  ...v,
678
719
  x: v.x + i.x,
@@ -695,12 +736,12 @@ function se(e, t) {
695
736
  }
696
737
  ]))) return null;
697
738
  }
698
- if (!u && d === "round" && !l(ie(s[0], r, "cap")) || !u && f === "round" && !l(ie(s.at(-1), r, "cap"))) return null;
739
+ if (!u && d === "round" && !l(Be(s[0], r, "cap")) || !u && f === "round" && !l(Be(s.at(-1), r, "cap"))) return null;
699
740
  let m = (e, t, n) => {
700
741
  if (!t || !n) return !0;
701
742
  let i = t.x * n.y - t.y * n.x;
702
- if (Math.abs(i) <= q) return !0;
703
- if (a === "round") return l(ie(e, r, "join"));
743
+ if (Math.abs(i) <= Z) return !0;
744
+ if (a === "round") return l(Be(e, r, "join"));
704
745
  let s = i > 0 ? -1 : 1, c = {
705
746
  ...e,
706
747
  x: e.x + -t.y * r * s,
@@ -711,8 +752,8 @@ function se(e, t) {
711
752
  y: e.y + n.x * r * s
712
753
  };
713
754
  if (a === "miter") {
714
- let i = oe(c, t, u, n);
715
- if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Y("join", [
755
+ let i = He(c, t, u, n);
756
+ if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(ze("join", [
716
757
  c,
717
758
  {
718
759
  ...e,
@@ -721,7 +762,7 @@ function se(e, t) {
721
762
  u
722
763
  ]));
723
764
  }
724
- return l(Y("join", [
765
+ return l(ze("join", [
725
766
  c,
726
767
  e,
727
768
  u
@@ -734,30 +775,30 @@ function se(e, t) {
734
775
  }
735
776
  //#endregion
736
777
  //#region packages/core/src/chart/three-d-outline.ts
737
- var ce = 1e-9, le = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= ce, ue = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, de = (e, t) => {
778
+ var We = 1e-9, Ge = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= We, Ke = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, qe = (e, t) => {
738
779
  let n = Math.min(e.length, t.length);
739
780
  for (let r = 0; r < n; r++) {
740
- let n = ue(e[r], t[r]);
781
+ let n = Ke(e[r], t[r]);
741
782
  if (n !== 0) return n;
742
783
  }
743
784
  return e.length - t.length;
744
785
  };
745
- function fe(e) {
786
+ function Je(e) {
746
787
  let t = [...e].reverse();
747
- return de(e, t) <= 0 ? e : t;
788
+ return qe(e, t) <= 0 ? e : t;
748
789
  }
749
- function pe(e) {
750
- let t = le(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
790
+ function Ye(e) {
791
+ let t = Ge(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
751
792
  if (t.length === 0) return [];
752
793
  let n = 0;
753
- for (let e = 1; e < t.length; e++) ue(t[e], t[n]) < 0 && (n = e);
754
- let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = de(r, i) <= 0 ? r : i;
794
+ for (let e = 1; e < t.length; e++) Ke(t[e], t[n]) < 0 && (n = e);
795
+ let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = qe(r, i) <= 0 ? r : i;
755
796
  return [...a, a[0]];
756
797
  }
757
- function me(e) {
798
+ function Xe(e) {
758
799
  let t = [], n = (e) => {
759
- let n = t.find((t) => le(t.point, e));
760
- if (n) return ue(e, n.point) < 0 && (n.point = e), n;
800
+ let n = t.find((t) => Ge(t.point, e));
801
+ if (n) return Ke(e, n.point) < 0 && (n.point = e), n;
761
802
  let r = {
762
803
  point: e,
763
804
  edges: [],
@@ -766,11 +807,11 @@ function me(e) {
766
807
  return t.push(r), r;
767
808
  }, r = [];
768
809
  for (let [t, i] of e) {
769
- if (le(t, i)) continue;
810
+ if (Ge(t, i)) continue;
770
811
  let e = n(t), a = n(i);
771
812
  e !== a && r.push([e, a]);
772
813
  }
773
- t.sort((e, t) => ue(e.point, t.point)), t.forEach((e, t) => {
814
+ t.sort((e, t) => Ke(e.point, t.point)), t.forEach((e, t) => {
774
815
  e.order = t;
775
816
  });
776
817
  let i = [], a = /* @__PURE__ */ new Set();
@@ -798,34 +839,47 @@ function me(e) {
798
839
  }
799
840
  return n;
800
841
  }, c = [];
801
- for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(fe(s(e, t)));
842
+ for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(Je(s(e, t)));
802
843
  for (let e = 0; e < i.length; e++) {
803
844
  if (o.has(e)) continue;
804
845
  let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
805
- c.push(pe(s(n, e)));
846
+ c.push(Ye(s(n, e)));
806
847
  }
807
848
  let l = t.filter((e) => e.edges.length > 2).map((e) => ({
808
849
  point: e.point,
809
850
  neighbours: e.edges.map((t) => {
810
851
  let n = i[t];
811
852
  return n.first === e ? n.second.point : n.first.point;
812
- }).sort(ue)
853
+ }).sort(Ke)
813
854
  }));
814
855
  return {
815
- paths: c.sort(de),
856
+ paths: c.sort(qe),
816
857
  junctions: l
817
858
  };
818
859
  }
819
860
  //#endregion
820
861
  //#region packages/core/src/chart/three-d-renderer.ts
821
- var X = [
862
+ function Ze(e) {
863
+ let t = /* @__PURE__ */ new Map();
864
+ for (let n of e.legendEntries ?? []) t.set(n.idx, n);
865
+ return t;
866
+ }
867
+ function Qe(e, t, n) {
868
+ let i = r(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, a = t?.fontFace ?? e.legendFontFace;
869
+ return {
870
+ fontPx: i,
871
+ font: `${t?.fontBold ?? e.legendFontBold ?? !1 ? "bold " : ""}${i}px ${mt(a)}`,
872
+ color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
873
+ };
874
+ }
875
+ var $e = [
822
876
  "4472C4",
823
877
  "ED7D31",
824
878
  "70AD47",
825
879
  "A5A5A5",
826
880
  "FFC000",
827
881
  "5B9BD5"
828
- ], he = new Set([
882
+ ], et = C, tt = d, nt = new Set([
829
883
  "line",
830
884
  "stackedLine",
831
885
  "stackedLinePct",
@@ -839,11 +893,11 @@ var X = [
839
893
  "stackedBarPct",
840
894
  "stackedBarHPct"
841
895
  ]);
842
- function ge(e, t) {
843
- let n = Number.isFinite(t) && t > 0 ? t / h : 1, r = Number.isFinite(e) && e >= 0 ? e / S : 0;
896
+ function rt(e, t) {
897
+ let n = Number.isFinite(t) && t > 0 ? t / D : 1, r = Number.isFinite(e) && e >= 0 ? e / B : 0;
844
898
  return Math.max(.25, r) * n;
845
899
  }
846
- function _e(e, t) {
900
+ function it(e, t) {
847
901
  let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
848
902
  for (let t of e) {
849
903
  let e = t.categoryIndex;
@@ -851,13 +905,191 @@ function _e(e, t) {
851
905
  }
852
906
  return r;
853
907
  }
854
- var ve = (e, t) => `#${t?.color ?? X[e % X.length]}`;
855
- function ye(e, t) {
856
- if (t?.lineHidden != null || t?.lineColor != null || t?.lineWidthEmu != null || t?.lineDash != null) return t.lineHidden !== !0;
857
- let n = e.chartexStyle;
858
- return (e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || n?.lineHidden != null || n?.lineNoStyle != null || n?.lineColors != null || n?.lineWidthEmu != null || n?.lineDash != null || n?.lineCap != null || n?.lineJoin != null) && e.lineHidden !== !0 && n?.lineHidden !== !0;
908
+ var at = (e, t) => `#${t?.color ?? $e[e % $e.length]}`;
909
+ function ot(e, t, n) {
910
+ let r = 0;
911
+ for (let i of e) for (let e of [t(i), n(i)]) {
912
+ if (e == null) continue;
913
+ let t = j(e);
914
+ if (e.fillType === "gradient" && t > et || t > tt - r) return !1;
915
+ r += t;
916
+ }
917
+ return !0;
859
918
  }
860
- function be(e, t) {
919
+ function st(e, t) {
920
+ let n = Array.from({ length: t }, () => ({
921
+ maxMagnitude: 0,
922
+ scaledTotal: 0
923
+ }));
924
+ for (let r of e.series) for (let e = 0; e < t; e++) {
925
+ let t = r.values[e];
926
+ t != null && Number.isFinite(t) && (n[e].maxMagnitude = Math.max(n[e].maxMagnitude, Math.abs(t)));
927
+ }
928
+ for (let r of e.series) for (let e = 0; e < t; e++) {
929
+ let t = r.values[e], i = n[e].maxMagnitude;
930
+ t != null && Number.isFinite(t) && i > 0 && (n[e].scaledTotal += Math.abs(t) / i);
931
+ }
932
+ return n;
933
+ }
934
+ function ct(e, t, n, r) {
935
+ let i = e.series[t]?.values[n] ?? 0;
936
+ if (!Number.isFinite(i)) return 0;
937
+ if (!r) return i;
938
+ let { maxMagnitude: a, scaledTotal: o } = r[n] ?? {
939
+ maxMagnitude: 0,
940
+ scaledTotal: 0
941
+ };
942
+ return a > 0 && o > 0 ? i / a / o * 100 : 0;
943
+ }
944
+ function Q(e, t) {
945
+ let n = e + t;
946
+ return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
947
+ }
948
+ function lt(e) {
949
+ let t = [];
950
+ for (let [n, r] of [
951
+ [e.threeD?.floor, "floor"],
952
+ [e.threeD?.sideWall, "wall"],
953
+ [e.threeD?.backWall, "wall"]
954
+ ]) {
955
+ let i = c(e, n, r);
956
+ t.push({
957
+ fill: i.fill,
958
+ line: i.line
959
+ });
960
+ }
961
+ if (e.chartType === "pie") {
962
+ let n = e.series[0];
963
+ if (n) {
964
+ let r = new Map(n.dataPointOverrides?.map((e) => [e.idx, e]) ?? []);
965
+ for (let i = 0; i < n.values.length; i++) {
966
+ let a = n.values[i];
967
+ if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
968
+ let o = dt(e, n, r.get(i), i, 0);
969
+ t.push({
970
+ fill: o.fill,
971
+ line: o.lineFill
972
+ });
973
+ }
974
+ }
975
+ } else if (e.chartType === "clusteredBar" || e.chartType === "clusteredBarH" || e.chartType.startsWith("stackedBar")) {
976
+ 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 ? st(e, o) : void 0, c = (t, n) => {
977
+ if (t === n) return !1;
978
+ let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
979
+ return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
980
+ }, l = Array(o).fill(0), u = Array(o).fill(0);
981
+ for (let r = 0; r < e.series.length; r++) {
982
+ let d = e.series[r], f = new Map(d.dataPointOverrides?.map((e) => [e.idx, e]) ?? []);
983
+ for (let p = 0; p < o; p++) {
984
+ let o = d.values[p];
985
+ if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
986
+ let m = ct(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = Q(h, m);
987
+ if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
988
+ let _ = dt(e, d, f.get(p), p, r);
989
+ t.push({
990
+ fill: _.fill,
991
+ line: _.lineFill
992
+ });
993
+ }
994
+ }
995
+ } else {
996
+ 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 ? st(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
997
+ if (r) {
998
+ let t = Array(s).fill(0), n = Array(s).fill(0);
999
+ for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
1000
+ let a = ct(e, r, i, c), o = Q(a >= 0 ? t[i] : n[i], a);
1001
+ l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
1002
+ }
1003
+ }
1004
+ for (let i = 0; i < e.series.length; i++) {
1005
+ let u = e.series[i], d = new Map(u.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), f = s, p = 0, m = null, h = !1, g = !1;
1006
+ for (let s = 0; s < f; s++) {
1007
+ let f = u.values[s];
1008
+ if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
1009
+ p++;
1010
+ let a = r ? l[i][s] : ct(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;
1011
+ if (p >= 2 && (n || u.smooth === !0 || !_)) {
1012
+ if (h = !0, n) break;
1013
+ let r = d.get(s);
1014
+ if (ft(r)) {
1015
+ let n = dt(e, u, r, s, i);
1016
+ t.push({
1017
+ fill: void 0,
1018
+ line: n.lineFill
1019
+ });
1020
+ } else g = !0;
1021
+ }
1022
+ m = a;
1023
+ } else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
1024
+ }
1025
+ if (!h) continue;
1026
+ let _ = dt(e, u, void 0, i, i);
1027
+ n ? t.push({
1028
+ fill: _.fill,
1029
+ line: _.lineFill
1030
+ }) : g && t.push({
1031
+ fill: void 0,
1032
+ line: _.lineFill
1033
+ });
1034
+ }
1035
+ }
1036
+ return ot(t, (e) => e.fill, (e) => e.line);
1037
+ }
1038
+ function ut(e, t) {
1039
+ return e?.fillType === "solid" ? {
1040
+ color: `#${e.color}`,
1041
+ fill: void 0
1042
+ } : {
1043
+ color: t,
1044
+ fill: e
1045
+ };
1046
+ }
1047
+ function dt(e, t, r, i, a) {
1048
+ let o = t.dataPointColors?.[i] ? `#${t.dataPointColors[i]}` : at(a, t), s = e.chartType === "pie" || e.varyColors === !0 && e.series.length === 1 && e.chartType.includes("Bar") ? i : a, c, l = o, u = _(r?.chartexStyle, i);
1049
+ if (u !== void 0) ({color: l, fill: c} = ut(u, l));
1050
+ else if (r?.fillHidden === !0 || r?.color === "00000000") c = null;
1051
+ else if (r?.color) l = `#${r.color}`;
1052
+ else {
1053
+ let n = _(t.chartexStyle, s);
1054
+ if (n !== void 0) ({color: l, fill: c} = ut(n, l));
1055
+ else {
1056
+ let t = _(e.chartStyleRoles?.dataPoint3D, s);
1057
+ t !== void 0 && ({color: l, fill: c} = ut(t, l));
1058
+ }
1059
+ }
1060
+ let d, f = null, p = n(r?.chartexStyle, i);
1061
+ if (p !== void 0) p?.fillType === "solid" ? f = `#${p.color}` : d = p;
1062
+ else if (r?.lineHidden === !0) d = null;
1063
+ else if (r?.lineColor) f = `#${r.lineColor}`;
1064
+ else {
1065
+ let r = n(t.chartexStyle, s);
1066
+ if (r !== void 0) r?.fillType === "solid" ? f = `#${r.color}` : d = r;
1067
+ else if (t.lineHidden === !0) d = null;
1068
+ else if (t.lineColor) f = `#${t.lineColor}`;
1069
+ else {
1070
+ let t = n(e.chartStyleRoles?.dataPoint3D, s);
1071
+ t !== void 0 && (t?.fillType === "solid" ? f = `#${t.color}` : d = t);
1072
+ }
1073
+ }
1074
+ let m = e.chartStyleRoles?.dataPoint3D?.lineNoStyle === !0 ? void 0 : e.chartStyleRoles?.dataPoint3D, h = r?.chartexStyle?.lineCap ?? t.chartexStyle?.lineCap ?? m?.lineCap, g = r?.chartexStyle?.lineJoin ?? t.chartexStyle?.lineJoin ?? m?.lineJoin;
1075
+ return {
1076
+ color: l,
1077
+ fill: c,
1078
+ lineColor: f,
1079
+ lineFill: d,
1080
+ lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? t.lineWidthEmu ?? t.chartexStyle?.lineWidthEmu ?? m?.lineWidthEmu,
1081
+ lineDash: r?.lineDash ?? r?.chartexStyle?.lineDash ?? t.chartexStyle?.lineDash ?? m?.lineDash,
1082
+ lineCustomDash: r?.chartexStyle?.lineCustomDash ?? t.chartexStyle?.lineCustomDash ?? m?.lineCustomDash,
1083
+ lineCap: h === "rnd" ? "round" : h === "sq" ? "square" : "butt",
1084
+ lineJoin: g === "round" || g === "bevel" ? g : "miter"
1085
+ };
1086
+ }
1087
+ function ft(e) {
1088
+ if (!e) return !1;
1089
+ let t = e.chartexStyle;
1090
+ 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;
1091
+ }
1092
+ function pt(e, t) {
861
1093
  let n = e.cameraNormal(t);
862
1094
  if (!n) return 1;
863
1095
  let r = {
@@ -867,20 +1099,20 @@ function be(e, t) {
867
1099
  }, 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);
868
1100
  return Math.max(.78, Math.min(1, .78 + .24 * a));
869
1101
  }
870
- var xe = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Z = (e, t, n = "minor") => xe((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
871
- function Se(e, t) {
1102
+ var mt = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, $ = (e, t, n = "minor") => mt((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1103
+ function ht(e, t) {
872
1104
  if (t.length) {
873
1105
  e.beginPath(), e.moveTo(t[0].x, t[0].y);
874
1106
  for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
875
1107
  e.closePath();
876
1108
  }
877
1109
  }
878
- var Ce = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
879
- function we(e, t, n, r) {
880
- Ce(n) || (Se(e, t), e.fillStyle = n, e.fill(), r > 0 && (Se(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1110
+ var gt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1111
+ function _t(e, t, n, r) {
1112
+ gt(n) || (ht(e, t), e.fillStyle = n, e.fill(), r > 0 && (ht(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
881
1113
  }
882
- function Te(e, t, n, r, i, a, o, s, c, l, u, d) {
883
- return L({
1114
+ function vt(e, t, n, r, i, a, o, s, c, l, u, d) {
1115
+ return we({
884
1116
  x0: t,
885
1117
  x1: n,
886
1118
  lower0: r,
@@ -891,13 +1123,13 @@ function Te(e, t, n, r, i, a, o, s, c, l, u, d) {
891
1123
  farDepth: c,
892
1124
  capStart: u,
893
1125
  capEnd: d
894
- }).flatMap((t) => De(e, t, l).map((e) => ({
1126
+ }).flatMap((t) => bt(e, t, l).map((e) => ({
895
1127
  ...e,
896
1128
  outline: !1,
897
1129
  outlineSegments: void 0
898
1130
  })));
899
1131
  }
900
- function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1132
+ function yt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
901
1133
  if (![
902
1134
  r,
903
1135
  i,
@@ -908,7 +1140,7 @@ function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
908
1140
  l,
909
1141
  u
910
1142
  ].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
911
- let v = F({
1143
+ let v = Se({
912
1144
  shape: t,
913
1145
  horizontal: n,
914
1146
  crossStart: n ? i : r,
@@ -922,9 +1154,9 @@ function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
922
1154
  omitBaseCap: m,
923
1155
  omitEndCap: h
924
1156
  });
925
- return v ? De(e, v, d, g, _) : [];
1157
+ return v ? bt(e, v, d, g, _) : [];
926
1158
  }
927
- function De(e, t, n, r, i, a = !1) {
1159
+ function bt(e, t, n, r, i, a = !1) {
928
1160
  if (i?.exceeded) return [];
929
1161
  let o = t.faces.map((r) => {
930
1162
  let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
@@ -946,7 +1178,8 @@ function De(e, t, n, r, i, a = !1) {
946
1178
  facing: a,
947
1179
  face: {
948
1180
  points: o,
949
- color: T(n, be(e, i)),
1181
+ color: X(n, pt(e, i)),
1182
+ paintRole: "fill",
950
1183
  shade: 0,
951
1184
  cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
952
1185
  cameraDepths: i.map((t) => e.cameraDepth(t.x, t.y, t.depth)),
@@ -982,11 +1215,11 @@ function De(e, t, n, r, i, a = !1) {
982
1215
  let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
983
1216
  for (let [e, n] of t) l(e, n);
984
1217
  }
985
- let p = me([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1218
+ let p = Xe([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
986
1219
  if (!r) return s;
987
1220
  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));
988
1221
  for (let t of p.paths) {
989
- let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = se(n.map((e, t) => ({
1222
+ 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 = Ue(n.map((e, t) => ({
990
1223
  ...e,
991
1224
  cameraDepth: a[t],
992
1225
  cameraWeight: o[t]
@@ -1006,6 +1239,7 @@ function De(e, t, n, r, i, a = !1) {
1006
1239
  return {
1007
1240
  points: e.points,
1008
1241
  color: r.color,
1242
+ paintRole: "outline",
1009
1243
  shade: 0,
1010
1244
  cameraDepth: e.cameraDepth + t,
1011
1245
  cameraDepths: e.cameraDepths?.map((e) => e + t),
@@ -1015,7 +1249,7 @@ function De(e, t, n, r, i, a = !1) {
1015
1249
  }));
1016
1250
  }
1017
1251
  for (let t of p.junctions) {
1018
- let n = ae({
1252
+ let n = Ve({
1019
1253
  ...e.project(t.point.x, t.point.y, t.point.depth),
1020
1254
  cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
1021
1255
  cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
@@ -1034,6 +1268,7 @@ function De(e, t, n, r, i, a = !1) {
1034
1268
  s.push({
1035
1269
  points: n.points,
1036
1270
  color: r.color,
1271
+ paintRole: "outline",
1037
1272
  shade: 0,
1038
1273
  cameraDepth: n.cameraDepth + a,
1039
1274
  cameraDepths: n.cameraDepths?.map((e) => e + a),
@@ -1043,7 +1278,7 @@ function De(e, t, n, r, i, a = !1) {
1043
1278
  }
1044
1279
  return s;
1045
1280
  }
1046
- function Oe(e, t, n, r, i, a, o) {
1281
+ function xt(e, t, n, r, i, a, o) {
1047
1282
  if (!t.length || o.exceeded) return [];
1048
1283
  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) => ({
1049
1284
  x: t.centerX + Math.cos(n) * r,
@@ -1055,7 +1290,7 @@ function Oe(e, t, n, r, i, a, o) {
1055
1290
  depth: e.centerDepth
1056
1291
  }), h = [], g = (t, n = !1) => {
1057
1292
  if (t.length < 2 || o.exceeded) return;
1058
- let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c = se((n && !s ? [...t, r] : [...t]).map((t) => ({
1293
+ 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 = Ue((n && !s ? [...t, r] : [...t]).map((t) => ({
1059
1294
  ...e.project(t.x, t.y, t.depth),
1060
1295
  cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1061
1296
  cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
@@ -1077,6 +1312,7 @@ function Oe(e, t, n, r, i, a, o) {
1077
1312
  h.push({
1078
1313
  points: e.points,
1079
1314
  color: a.color,
1315
+ paintRole: "outline",
1080
1316
  shade: 0,
1081
1317
  cameraDepth: e.cameraDepth + t,
1082
1318
  cameraDepths: e.cameraDepths?.map((e) => e + t),
@@ -1134,244 +1370,269 @@ function Oe(e, t, n, r, i, a, o) {
1134
1370
  for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
1135
1371
  return h;
1136
1372
  }
1137
- function ke(e, t) {
1138
- we(e, t.points, t.color, t.shade), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(y(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (Se(e, t.points), e.stroke()), e.setLineDash([]));
1373
+ function St(e, t) {
1374
+ t.paint !== null && (t.paint === void 0 ? _t(e, t.points, t.color, t.shade) : (ht(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(G(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (ht(e, t.points), e.stroke()), e.setLineDash([])));
1139
1375
  }
1140
- function Ae(e, t, n) {
1141
- t.points.length < 3 || Ce(n) || (Se(e, t.points), e.fillStyle = n, e.fill());
1376
+ function Ct(e, t, n, r, i) {
1377
+ if (r === void 0) return;
1378
+ let a = t.filter((e) => e.paintRole === n);
1379
+ if (!a.length) return;
1380
+ if (r === null) {
1381
+ for (let e of a) e.paint = null;
1382
+ return;
1383
+ }
1384
+ 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 = U(r, e, s, l, c - s, u - l, i);
1385
+ for (let e of a) e.paint = d;
1142
1386
  }
1143
- function je(e, t) {
1387
+ function wt(e, t) {
1144
1388
  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);
1145
1389
  }
1146
- function Me(e) {
1390
+ function Tt(e) {
1147
1391
  let t = e.catAxisLabelRotation;
1148
1392
  return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
1149
1393
  }
1150
- function Ne(e, t, n, r, i, a = 1, o = 6) {
1394
+ function Et(e, t, n, r, i, a = 1, o = 6) {
1151
1395
  if (i || r === 0) {
1152
1396
  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));
1153
1397
  return;
1154
1398
  }
1155
1399
  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();
1156
1400
  }
1157
- function Pe(e, t, n, r, i, a, o) {
1158
- if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1159
- let s = r / 2;
1160
- switch (e.beginPath(), n) {
1401
+ function Dt(t, n, r, i, a, o, s, c = void 0, l = 0, u = D) {
1402
+ if (!(i > 0) || !Number.isFinite(n.x) || !Number.isFinite(n.y)) return;
1403
+ let d = i / 2;
1404
+ switch (t.beginPath(), r) {
1161
1405
  case "square":
1162
- e.rect(t.x - s, t.y - s, r, r);
1406
+ t.rect(n.x - d, n.y - d, i, i);
1163
1407
  break;
1164
1408
  case "diamond":
1165
- e.moveTo(t.x, t.y - s), e.lineTo(t.x + s, t.y), e.lineTo(t.x, t.y + s), e.lineTo(t.x - s, t.y), e.closePath();
1409
+ t.moveTo(n.x, n.y - d), t.lineTo(n.x + d, n.y), t.lineTo(n.x, n.y + d), t.lineTo(n.x - d, n.y), t.closePath();
1166
1410
  break;
1167
1411
  case "triangle":
1168
- e.moveTo(t.x, t.y - s), e.lineTo(t.x + s, t.y + s), e.lineTo(t.x - s, t.y + s), e.closePath();
1412
+ t.moveTo(n.x, n.y - d), t.lineTo(n.x + d, n.y + d), t.lineTo(n.x - d, n.y + d), t.closePath();
1169
1413
  break;
1170
1414
  case "x":
1171
- case "plus":
1172
- case "dash": {
1173
- if (n === "dash") {
1174
- e.moveTo(t.x - s, t.y), e.lineTo(t.x + s, t.y), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1175
- return;
1176
- }
1177
- let r = n === "x";
1178
- e.moveTo(t.x - s, t.y + (r ? -s : 0)), e.lineTo(t.x + s, t.y + (r ? s : 0)), e.moveTo(t.x + (r ? -s : 0), t.y + s), e.lineTo(t.x + (r ? s : 0), t.y - s), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1415
+ case "plus": {
1416
+ let e = r === "x";
1417
+ t.moveTo(n.x - d, n.y + (e ? -d : 0)), t.lineTo(n.x + d, n.y + (e ? d : 0)), t.moveTo(n.x + (e ? -d : 0), n.y + d), t.lineTo(n.x + (e ? d : 0), n.y - d), t.strokeStyle = o, t.lineWidth = s, t.stroke();
1179
1418
  return;
1180
1419
  }
1420
+ case "dash":
1421
+ t.rect(n.x - d, n.y - i * .1, i, i * .2);
1422
+ break;
1181
1423
  case "star":
1182
- for (let n = 0; n < 10; n++) {
1183
- let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? s : s * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1184
- n ? e.lineTo(a, o) : e.moveTo(a, o);
1424
+ for (let e = 0; e < 10; e++) {
1425
+ let r = -Math.PI / 2 + e * Math.PI / 5, i = e % 2 == 0 ? d : d * .4, a = n.x + Math.cos(r) * i, o = n.y + Math.sin(r) * i;
1426
+ e ? t.lineTo(a, o) : t.moveTo(a, o);
1185
1427
  }
1186
- e.closePath();
1428
+ t.closePath();
1187
1429
  break;
1188
1430
  case "dot":
1189
- e.arc(t.x, t.y, Math.max(1, s * .35), 0, Math.PI * 2);
1431
+ t.ellipse(n.x, n.y, i * .25, i * .1, 0, 0, Math.PI * 2);
1190
1432
  break;
1191
- case "picture": return;
1433
+ case "picture":
1434
+ c?.fillType === "image" && e(t, c, n.x - d, n.y - d, i, i, u, l), t.strokeStyle = o, t.lineWidth = s, t.strokeRect(n.x - d, n.y - d, i, i);
1435
+ return;
1192
1436
  default:
1193
- e.arc(t.x, t.y, s, 0, Math.PI * 2);
1437
+ t.arc(n.x, n.y, d, 0, Math.PI * 2);
1194
1438
  break;
1195
1439
  }
1196
- i !== "transparent" && (e.fillStyle = i, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1197
- }
1198
- function Fe(e, t, n, r, i, a, o, s, c, l = 0, u, d, p = "t", m = o, h = !0, g) {
1199
- let y = d;
1200
- if (y?.deleted) return;
1201
- let x = n.seriesDataLabels, C = y?.showVal ?? x?.showVal ?? t.showDataLabels, w = y?.showCatName ?? x?.showCatName ?? !1, T = y?.showSerName ?? x?.showSerName ?? !1, E = y?.showPercent ?? x?.showPercent ?? !1, D = y?.text, O = ee({
1202
- customText: D,
1203
- showCategory: w,
1204
- showSeries: T,
1205
- showValue: C,
1206
- showPercent: E,
1207
- category: n.categories?.[i] ?? t.categories[i] ?? `${i + 1}`,
1208
- seriesName: n.name || `Series ${r + 1}`,
1209
- sourceValue: a,
1210
- valueDivisor: g?.divisor,
1211
- percentRatio: u != null && Number.isFinite(u) ? u : void 0,
1212
- formatCode: y?.formatCode ?? x?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1213
- percentFormatCode: y?.formatCode ?? x?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1440
+ let f = c?.fillType === "image" ? c : void 0, p = f ? null : c === void 0 ? a === "transparent" ? null : a : c == null ? null : U(c, t, n.x - d, n.y - d, i, i, l);
1441
+ p == null ? f && (t.save(), t.clip(), e(t, f, n.x - d, n.y - d, i, i, u, l), t.restore()) : (t.fillStyle = p, t.fill()), t.strokeStyle = o, t.lineWidth = s, t.stroke();
1442
+ }
1443
+ function Ot(e, t, n, o, s, c, l, u, d, f = 0, p, m, h = "t", g = l, _ = !0, v, b, x = c, S = 0) {
1444
+ let C = m, w = n.seriesDataLabels;
1445
+ if (A(w, C) || t.showDataLabelsOverMax !== !0 && b != null && Number.isFinite(b) && x > b) return;
1446
+ let E = C?.showVal ?? w?.showVal ?? t.showDataLabels, D = C?.showCatName ?? w?.showCatName ?? !1, O = C?.showSerName ?? w?.showSerName ?? !1, k = C?.showPercent ?? w?.showPercent ?? !1, j = C?.text, M = ue({
1447
+ customText: j,
1448
+ showCategory: D,
1449
+ showSeries: O,
1450
+ showValue: E,
1451
+ showPercent: k,
1452
+ category: n.categories?.[s] ?? t.categories[s] ?? `${s + 1}`,
1453
+ seriesName: n.name || `Series ${o + 1}`,
1454
+ sourceValue: c,
1455
+ valueDivisor: v?.divisor,
1456
+ percentRatio: p != null && Number.isFinite(p) ? p : void 0,
1457
+ formatCode: C?.formatCode ?? w?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1458
+ percentFormatCode: C?.formatCode ?? w?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1214
1459
  date1904: t.date1904,
1215
- separator: y?.separator ?? x?.separator
1460
+ separator: C?.separator ?? w?.separator
1216
1461
  });
1217
- if (!O) return;
1218
- let A = f(y?.fontSizeHpt ?? x?.fontSizeHpt ?? t.dataLabelFontSizeHpt, c) ?? 9 * c, j = y?.fontBold ?? x?.fontBold ?? t.dataLabelFontBold ?? !1, M = Z(t, y?.fontFace ?? x?.fontFace ?? t.dataLabelFontFace);
1219
- e.font = `${j ? "bold " : ""}${A}px ${M}`;
1220
- let N = `#${y?.fontColor ?? x?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, P = D && y?.richRuns?.length ? k(e, {
1221
- runs: y.richRuns,
1222
- ptToPx: c,
1223
- fontFamily: M,
1224
- fallbackBold: j,
1225
- fontFamilyForFace: (e) => Z(t, e)
1226
- }, A, N) : null, F = P ? [] : b(O, Math.max(A, s.w * .45), Math.max(A * 1.2, s.h * .35), A * 1.2, (t) => e.measureText(t).width);
1227
- if (!P && !F.length) return;
1228
- let I = P?.width ?? Math.max(...F.map((t) => e.measureText(t).width)), L = P?.height ?? F.length * A * 1.2, R = _({
1462
+ if (!M) return;
1463
+ let N = r(C?.fontSizeHpt ?? w?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, P = C?.fontBold ?? w?.fontBold ?? t.dataLabelFontBold ?? !1, F = ne(C, w), I = $(t, C?.fontFace ?? w?.fontFace ?? t.dataLabelFontFace);
1464
+ e.font = `${F.fontItalic ? "italic " : ""}${P ? "bold " : ""}${N}px ${I}`;
1465
+ let L = `#${C?.fontColor ?? w?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, R = j && C?.richRuns?.length ? oe(e, {
1466
+ runs: C.richRuns,
1467
+ ptToPx: d,
1468
+ fontFamily: I,
1469
+ fallbackBold: P,
1470
+ fallbackItalic: F.fontItalic,
1471
+ fallbackBaseline: F.fontBaseline,
1472
+ fallbackColorHidden: F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null),
1473
+ fontFamilyForFace: (e) => $(t, e)
1474
+ }, N, L) : null, ee = R ? [] : y(M, Math.max(N, u.w * .45), Math.max(N * 1.2, u.h * .35), N * 1.2, (t) => e.measureText(t).width, F);
1475
+ if (!R && !ee.length) return;
1476
+ let z = R?.width ?? Math.max(...ee.map((t) => e.measureText(t).width)), V = R?.height ?? ee.length * N * 1.2, H = re(F, d), U = i(z + H.left + H.right, V + H.top + H.bottom, F.textRotation, F.textVerticalMode), q = a({
1229
1477
  kind: "point",
1230
- x: o.x,
1231
- y: o.y,
1232
- position: y?.position ?? x?.position ?? t.dataLabelPosition ?? p,
1233
- markerGap: l
1234
- }, s, {
1235
- w: I,
1236
- h: L
1237
- }, A, y?.manualLayout, s);
1238
- if (!R) return;
1239
- let z = y?.labelBox ?? x?.labelBox;
1240
- if (x?.showLeaderLines && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(R.rect.x, Math.min(m.x, R.rect.x + R.rect.w)), Math.max(R.rect.y, Math.min(m.y, R.rect.y + R.rect.h))), e.strokeStyle = `#${x.leaderLineColor ?? "808080"}`, e.lineWidth = x.leaderLineWidthEmu == null ? .75 * c : Math.max(.25, x.leaderLineWidthEmu / S * c), e.stroke()), z && (z.fill && (e.fillStyle = `#${z.fill}`, e.fillRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h)), z.borderColor && (e.strokeStyle = `#${z.borderColor}`, e.lineWidth = z.borderWidthEmu == null ? .75 * c : Math.max(.25, z.borderWidthEmu / S * c), e.strokeRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h))), e.save(), e.beginPath(), e.rect(R.clip.x, R.clip.y, R.clip.w, R.clip.h), e.clip(), P) {
1241
- v(e, P, R.x, R.y, R.textAlign, R.textBaseline), e.restore();
1478
+ x: l.x,
1479
+ y: l.y,
1480
+ position: C?.position ?? w?.position ?? t.dataLabelPosition ?? h,
1481
+ markerGap: f
1482
+ }, u, {
1483
+ w: U.w,
1484
+ h: U.h
1485
+ }, N, C?.manualLayout, u);
1486
+ if (!q) return;
1487
+ let J = K(C?.labelBox, w?.labelBox);
1488
+ w?.showLeaderLines && w.leaderLineHidden !== !0 && _ && (e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(Math.max(q.rect.x, Math.min(g.x, q.rect.x + q.rect.w)), Math.max(q.rect.y, Math.min(g.y, q.rect.y + q.rect.h))), e.strokeStyle = `#${w.leaderLineColor ?? "808080"}`, e.lineWidth = w.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, w.leaderLineWidthEmu / B * d), e.setLineDash(G(w.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ie(e, J, q.rect, d, S), e.save(), e.beginPath(), e.rect(q.clip.x, q.clip.y, q.clip.w, q.clip.h), e.clip();
1489
+ let Y = te(F, q.textAlign), ae = T(q.x, q.y, q.rect, V + H.top + H.bottom, F, C?.manualLayout != null, Y, q.textAlign, z + H.left + H.right, U.radians), X = W(e, ae.x, ae.y, U.radians, Y, q.textBaseline, H);
1490
+ if (R) {
1491
+ se(e, R, X.x, X.y, Y, q.textBaseline, C?.manualLayout ? Math.max(0, q.rect.w - H.left - H.right) : R.width), e.restore();
1242
1492
  return;
1243
1493
  }
1244
- e.fillStyle = N, e.textAlign = R.textAlign, e.textBaseline = "middle";
1245
- let B = A * 1.2, V = R.y - (F.length - 1) * B / 2;
1246
- F.forEach((t, n) => e.fillText(t, R.x, V + n * B)), e.restore();
1494
+ if (!(F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null))) {
1495
+ e.fillStyle = L, e.textAlign = Y, e.textBaseline = "middle";
1496
+ let t = N * 1.2, n = (F.fontBaseline ?? 0) * N, r = X.y - (ee.length - 1) * t / 2 - n;
1497
+ ee.forEach((n, i) => e.fillText(n, X.x, r + i * t));
1498
+ }
1499
+ e.restore();
1247
1500
  }
1248
- function Ie(e, t, n) {
1249
- if (n?.deleted) return !1;
1250
- if (n?.text) return !0;
1501
+ function kt(e, t, n) {
1251
1502
  let r = t.seriesDataLabels;
1252
- return (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1253
- }
1254
- function Le(t, r, s, c, l) {
1255
- let p = i(r, s.h, c);
1256
- if (r.title) {
1257
- t.font = `${r.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${xe(r.titleFontFace)}`, t.fillStyle = r.titleFontColor ? `#${r.titleFontColor}` : "#111111", t.textAlign = "center", t.textBaseline = "top";
1258
- let n = t.measureText(r.title).width, i = {
1259
- x: s.x + (s.w - n) / 2,
1260
- y: s.y + p.topPad,
1261
- w: n,
1262
- h: Math.max(1, p.fontPx)
1263
- }, a = r.titleManualLayout ? e({
1264
- ...r.titleManualLayout,
1503
+ return A(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);
1504
+ }
1505
+ function At(e, n, r, i, a, o) {
1506
+ let s = g(n, r.h, i);
1507
+ if (n.title) {
1508
+ e.font = `${n.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${mt(n.titleFontFace)}`, e.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1509
+ let t = e.measureText(n.title).width, i = {
1510
+ x: r.x + (r.w - t) / 2,
1511
+ y: r.y + s.topPad,
1512
+ w: t,
1513
+ h: Math.max(1, s.fontPx)
1514
+ }, a = n.titleManualLayout ? x({
1515
+ ...n.titleManualLayout,
1265
1516
  w: void 0,
1266
1517
  h: void 0
1267
- }, s, i) : null;
1268
- t.fillText(r.title, a ? a.x + a.w / 2 : s.x + s.w / 2, a?.y ?? i.y);
1269
- }
1270
- let m = f(r.legendFontSizeHpt, c) ?? 9 * c;
1271
- t.save(), t.font = `${r.legendFontBold ? "bold " : ""}${m}px ${xe(r.legendFontFace)}`;
1272
- let h = r.chartType === "pie" ? r.series[0]?.categories?.length ? r.series[0].categories : r.categories : r.series.map((e, t) => e.name || `Series ${t + 1}`), g = n(r, s.w, s.h, .23, {
1273
- itemWidths: h.map((e) => 7 * c + 4 + t.measureText(e).width),
1274
- rowHeight: Math.max(m * 1.45, 12),
1518
+ }, r, i) : null;
1519
+ e.fillText(n.title, a ? a.x + a.w / 2 : r.x + r.w / 2, a?.y ?? i.y);
1520
+ }
1521
+ let c = Ze(n);
1522
+ e.save();
1523
+ let d = (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) => c.get(t)?.deleted === !0 ? [] : [{
1524
+ label: e,
1525
+ index: t
1526
+ }]), f = d.map((e) => Qe(n, c.get(e.index), i)), p = Math.max(0, ...f.map((e) => e.fontPx)), _ = d.map((t, n) => (e.font = f[n].font, 7 * i + 4 + e.measureText(t.label).width)), y = v(n, r.w, r.h, .23, {
1527
+ itemWidths: _,
1528
+ rowHeight: Math.max(p * 1.45, 12),
1275
1529
  itemGap: 12,
1276
1530
  horizontalPadding: 8,
1277
1531
  verticalPadding: 4
1278
1532
  });
1279
- t.restore();
1280
- let _ = a(g), v = o(r, s.w, s.h, c), y = l === "horizontal" ? r.catAxisTitle ? v.catFontPx + u(s.w) + 4 : 0 : l === "vertical" ? v.valBandW : 0, b = l === "horizontal" ? r.valAxisTitle ? v.valFontPx + u(s.h) + 4 : 0 : l === "vertical" ? v.catBandH : 0, x = d(r, s.x, s.y, s.w, s.h, c, {
1281
- titleBand: p,
1533
+ e.restore();
1534
+ let b = m(y, n.legendOverlay === !0), S = u(n, r.w, r.h, i), C = h(n.catAxisTitleTextVerticalInsetEmu, i), w = h(n.valAxisTitleTextVerticalInsetEmu, i), T = a === "horizontal" ? n.catAxisTitle ? S.catFontPx + C + t(r.w) + 4 : 0 : a === "vertical" ? S.valBandW : 0, E = a === "horizontal" ? n.valAxisTitle ? S.valFontPx + w + t(r.h) + 4 : 0 : a === "vertical" ? S.catBandH : 0, D = l(n, r.x, r.y, r.w, r.h, i, {
1535
+ titleBand: s,
1282
1536
  legendSideReserveFrac: .23,
1283
- legendReserve: g,
1537
+ legendReserve: y,
1284
1538
  pad: {
1285
- t: p.bandH + _.legTopH + s.h * .04,
1286
- r: _.legRightW + s.w * .05,
1287
- b: _.legBottomH + s.h * .19 + b,
1288
- l: _.legLeftW + s.w * .13 + y
1539
+ t: s.bandH + b.legTopH + r.h * .04,
1540
+ r: b.legRightW + r.w * .05,
1541
+ b: b.legBottomH + r.h * .19 + E,
1542
+ l: b.legLeftW + r.w * .13 + T
1289
1543
  },
1290
1544
  honorPlotAreaManualLayout: !0,
1291
1545
  manualOuterInsets: {
1292
- t: p.bandH,
1293
- r: _.legRightW,
1294
- b: _.legBottomH + b,
1295
- l: _.legLeftW + y
1546
+ t: s.bandH,
1547
+ r: b.legRightW,
1548
+ b: b.legBottomH + E,
1549
+ l: b.legLeftW + T
1296
1550
  }
1297
- }), S = {
1298
- x: x.plotRect.px0,
1299
- y: x.plotRect.py0,
1300
- w: Math.max(1, x.plotRect.pw),
1301
- h: Math.max(1, x.plotRect.ph)
1302
- }, C = g ? g.side === "r" ? {
1303
- x: s.x + s.w - g.reserveW,
1304
- y: S.y,
1305
- w: g.reserveW,
1306
- h: S.h
1307
- } : g.side === "l" ? {
1308
- x: s.x,
1309
- y: S.y,
1310
- w: g.reserveW,
1311
- h: S.h
1312
- } : g.side === "t" ? {
1313
- x: s.x + 4,
1314
- y: s.y + p.bandH,
1315
- w: Math.max(1, s.w - 8),
1316
- h: g.reserveH
1551
+ }), O = {
1552
+ x: D.plotRect.px0,
1553
+ y: D.plotRect.py0,
1554
+ w: Math.max(1, D.plotRect.pw),
1555
+ h: Math.max(1, D.plotRect.ph)
1556
+ };
1557
+ H(e, n, O.x, O.y, O.w, O.h, i, o);
1558
+ let k = y ? y.side === "r" ? {
1559
+ x: r.x + r.w - y.reserveW,
1560
+ y: O.y,
1561
+ w: y.reserveW,
1562
+ h: O.h
1563
+ } : y.side === "l" ? {
1564
+ x: r.x,
1565
+ y: O.y,
1566
+ w: y.reserveW,
1567
+ h: O.h
1568
+ } : y.side === "t" ? {
1569
+ x: r.x + 4,
1570
+ y: r.y + s.bandH,
1571
+ w: Math.max(1, r.w - 8),
1572
+ h: y.reserveH
1317
1573
  } : {
1318
- x: s.x + 4,
1319
- y: s.y + s.h - g.reserveH,
1320
- w: Math.max(1, s.w - 8),
1321
- h: g.reserveH
1574
+ x: r.x + 4,
1575
+ y: r.y + r.h - y.reserveH,
1576
+ w: Math.max(1, r.w - 8),
1577
+ h: y.reserveH
1322
1578
  } : null;
1323
1579
  return {
1324
- plot: S,
1325
- legend: (C && r.legendManualLayout ? e(r.legendManualLayout, s, C) : null) ?? C
1580
+ plot: O,
1581
+ legend: (k && n.legendManualLayout ? x(n.legendManualLayout, r, k) : null) ?? k,
1582
+ legendMeasure: {
1583
+ labels: d.map((e) => e.label),
1584
+ styles: f,
1585
+ itemWidths: _
1586
+ }
1326
1587
  };
1327
1588
  }
1328
- function Re(t, n, i, a, o, s, c, l, u, d, f, p, m, h) {
1329
- t.save(), t.font = `${d ? "italic " : ""}${u ? "bold " : ""}${s}px ${c}`, t.fillStyle = l ? `#${l}` : "#555";
1330
- let g = m ? n : O(t, n, h), _ = r(o, f, p), v = a;
1331
- if (m) {
1332
- let n = t.measureText(g).width, r = Math.abs(Math.cos(_)), o = Math.abs(Math.sin(_)), c = {
1333
- x: a.x - (n * r + s * o) / 2,
1334
- y: a.y - (n * o + s * r) / 2,
1335
- w: n * r + s * o,
1336
- h: n * o + s * r
1337
- }, l = e({
1338
- ...m,
1589
+ function jt(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1590
+ e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
1591
+ let m = f ? t : J(e, t, p), h = F(i, u, d), g = r;
1592
+ if (f) {
1593
+ let t = e.measureText(m).width, i = Math.abs(Math.cos(h)), o = Math.abs(Math.sin(h)), s = {
1594
+ x: r.x - (t * i + a * o) / 2,
1595
+ y: r.y - (t * o + a * i) / 2,
1596
+ w: t * i + a * o,
1597
+ h: t * o + a * i
1598
+ }, c = x({
1599
+ ...f,
1339
1600
  w: void 0,
1340
1601
  h: void 0
1341
- }, i, c);
1342
- l && (v = {
1343
- x: l.x + l.w / 2,
1344
- y: l.y + l.h / 2
1602
+ }, n, s);
1603
+ c && (g = {
1604
+ x: c.x + c.w / 2,
1605
+ y: c.y + c.h / 2
1345
1606
  });
1346
1607
  }
1347
- t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", t.fillText(g, 0, 0), t.restore();
1608
+ e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", e.fillText(m, 0, 0), e.restore();
1348
1609
  }
1349
- function ze(e, t, n, r, i, a) {
1350
- if (t.valAxisTitle) {
1351
- let o = s(t.valAxisTitleFontSizeHpt, a), c = i ? "horizontal" : "left";
1352
- Re(e, t.valAxisTitle, n, i ? {
1353
- x: r.x + r.w / 2,
1354
- y: r.y + r.h + u(n.h) + o / 2
1610
+ function Mt(e, n, r, i, a, o) {
1611
+ if (n.valAxisTitle) {
1612
+ let s = I(n.valAxisTitleFontSizeHpt, o), c = a ? "horizontal" : "left";
1613
+ jt(e, n.valAxisTitle, r, a ? {
1614
+ x: i.x + i.w / 2,
1615
+ y: i.y + i.h + t(r.h) + s / 2
1355
1616
  } : {
1356
- x: r.x - u(n.w) - o / 2,
1357
- y: r.y + r.h / 2
1358
- }, c, o, Z(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1359
- }
1360
- if (t.catAxisTitle) {
1361
- let o = s(t.catAxisTitleFontSizeHpt, a), c = i ? "left" : "horizontal";
1362
- Re(e, t.catAxisTitle, n, i ? {
1363
- x: r.x - u(n.w) - o / 2,
1364
- y: r.y + r.h / 2
1617
+ x: i.x - t(r.w) - s / 2,
1618
+ y: i.y + i.h / 2
1619
+ }, c, s, $(n, n.valAxisTitleFontFace, "major"), n.valAxisTitleFontColor, n.valAxisTitleFontBold ?? !0, n.valAxisTitleFontItalic ?? !1, n.valAxisTitleRotation, n.valAxisTitleVerticalMode, n.valAxisTitleManualLayout, a ? i.w : i.h);
1620
+ }
1621
+ if (n.catAxisTitle) {
1622
+ let s = I(n.catAxisTitleFontSizeHpt, o), c = a ? "left" : "horizontal";
1623
+ jt(e, n.catAxisTitle, r, a ? {
1624
+ x: i.x - t(r.w) - s / 2,
1625
+ y: i.y + i.h / 2
1365
1626
  } : {
1366
- x: r.x + r.w / 2,
1367
- y: r.y + r.h + u(n.h) + o / 2
1368
- }, c, o, Z(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1627
+ x: i.x + i.w / 2,
1628
+ y: i.y + i.h + t(r.h) + s / 2
1629
+ }, c, s, $(n, n.catAxisTitleFontFace, "major"), n.catAxisTitleFontColor, n.catAxisTitleFontBold ?? !0, n.catAxisTitleFontItalic ?? !1, n.catAxisTitleRotation, n.catAxisTitleVerticalMode, n.catAxisTitleManualLayout, a ? i.h : i.w);
1369
1630
  }
1370
1631
  }
1371
- function Be(e, t, n, r, i, a, o, c, l, u) {
1372
- let d = t.threeD?.seriesAxis;
1373
- if (!d || d.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1374
- let p = Qe(t, r, i, a, o, c, l), m = We(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), v = r.project(h, g, r.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
1632
+ function Nt(e, t, n, i, a, o, s, c, l, u, d) {
1633
+ let f = t.threeD?.seriesAxis;
1634
+ if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1635
+ let p = Xt(t, i, a, o, s, c, l), m = Rt(i), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === i.front.y ? i.front.y + i.front.h : i.front.y : m.floorY, _ = i.project(h, g, i.topology.nearDepth), v = i.project(h, g, i.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
1375
1636
  if (!(y > 1e-6)) return;
1376
1637
  let b = {
1377
1638
  x: (v.x - _.x) / y,
@@ -1379,97 +1640,118 @@ function Be(e, t, n, r, i, a, o, c, l, u) {
1379
1640
  }, x = {
1380
1641
  x: -b.y,
1381
1642
  y: b.x
1382
- }, S = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), C = {
1643
+ }, S = i.project(i.front.x + i.front.w / 2, i.front.y + i.front.h / 2, .5), C = {
1383
1644
  x: (_.x + v.x) / 2,
1384
1645
  y: (_.y + v.y) / 2
1385
1646
  };
1386
1647
  (C.x - S.x) * x.x + (C.y - S.y) * x.y < 0 && (x = {
1387
1648
  x: -x.x,
1388
1649
  y: -x.y
1389
- }), (d.tickLabelPos === "low" && x.y < 0 || d.tickLabelPos === "high" && x.y > 0) && (x = {
1650
+ }), (f.tickLabelPos === "low" && x.y < 0 || f.tickLabelPos === "high" && x.y > 0) && (x = {
1390
1651
  x: -x.x,
1391
1652
  y: -x.y
1392
- }), d.lineHidden || ($(e, Q(d.lineColor, d.lineWidthEmu, null, u, "898989", 1)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
1393
- let w = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), E = d.majorTickMark ?? "out", D = f(d.fontSizeHpt, u) ?? 9 * u;
1394
- e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${D}px ${Z(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.fontColor}` : "#595959", e.textAlign = Math.abs(x.x) < .2 ? "center" : x.x < 0 ? "right" : "left", e.textBaseline = Math.abs(x.y) < .2 ? "middle" : x.y < 0 ? "bottom" : "top";
1653
+ }), f.lineHidden || (Ht(e, Bt(f.lineColor, f.lineWidthEmu, f.lineDash, d)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
1654
+ let w = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), E = f.majorTickMark ?? "out", D = r(f.fontSizeHpt, d) ?? 9 * d;
1655
+ if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${$(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", e.textAlign = Math.abs(x.x) < .2 ? "center" : x.x < 0 ? "right" : "left", e.textBaseline = Math.abs(x.y) < .2 ? "middle" : x.y < 0 ? "bottom" : "top", u && !f.lineHidden && E !== "none") {
1656
+ Ht(e, Vt(f.lineColor, f.lineWidthEmu, f.lineDash, d));
1657
+ let n = t.series.length;
1658
+ for (let t = 0; t <= n; t += w) {
1659
+ let r = t / n, a = f.orientation === "maxMin" ? 1 - r : r, o = i.project(h, g, a), s = 6 * d, c = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "in" ? s : 0;
1660
+ e.beginPath(), e.moveTo(o.x + x.x * c, o.y + x.y * c), e.lineTo(o.x - x.x * l, o.y - x.y * l), e.stroke();
1661
+ }
1662
+ }
1395
1663
  for (let n = 0; n < t.series.length; n++) {
1396
- let i = r.seriesDepth(n, t.series.length, !1), a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
1397
- if (!d.lineHidden && n % w === 0 && E !== "none") {
1398
- let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1664
+ let r = i.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - r : r, o = i.project(h, g, a);
1665
+ if (!u && !f.lineHidden && n % w === 0 && E !== "none") {
1666
+ let t = 6 * d, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1399
1667
  e.beginPath(), e.moveTo(o.x + x.x * n, o.y + x.y * n), e.lineTo(o.x - x.x * r, o.y - x.y * r), e.stroke();
1400
1668
  }
1401
- d.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * u + 3), o.y + x.y * (6 * u + 3));
1669
+ f.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * d + 3), o.y + x.y * (6 * d + 3));
1402
1670
  }
1403
- if (e.setLineDash([]), d.title) {
1404
- let i = s(d.titleFontSizeHpt, u);
1405
- Re(e, d.title, n, {
1406
- x: C.x + x.x * (D + i + 12),
1407
- y: C.y + x.y * (D + i + 12)
1408
- }, "horizontal", i, Z(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));
1671
+ if (e.setLineDash([]), f.title) {
1672
+ let r = I(f.titleFontSizeHpt, d);
1673
+ jt(e, f.title, n, {
1674
+ x: C.x + x.x * (D + r + 12),
1675
+ y: C.y + x.y * (D + r + 12)
1676
+ }, "horizontal", r, $(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(i.front.w, i.front.h));
1409
1677
  }
1410
1678
  }
1411
- function Ve(e, n, r, i, a = !1) {
1412
- if (!r) return;
1413
- D(e, n, r, i);
1414
- let o = new Map(n.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), s = a ? (n.series[0]?.categories?.length ? n.series[0].categories : n.categories).map((e, t) => {
1415
- let r = n.series[0]?.dataPointColors?.[t];
1679
+ function Pt(e, t, n, r, i, a, o, s) {
1680
+ if (t.lineHidden !== !0) {
1681
+ let s = t.lineWidthEmu == null ? Math.max(1, 2 * o) : Math.max(.5, t.lineWidthEmu / B * o);
1682
+ e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.strokeStyle = t.lineColor ? `#${t.lineColor}` : X(n, .7), e.lineWidth = s, e.setLineDash(G(t.chartexStyle?.lineDash ?? "solid", s)), e.stroke(), e.setLineDash([]);
1683
+ }
1684
+ if (t.showMarker !== !0 || t.markerSymbol === "none") return;
1685
+ let c = t.markerSymbol ?? "circle", l = L(t, n.replace(/^#/, "")), u = l === "00000000" ? "transparent" : l.startsWith("#") ? l : `#${l}`, d = t.markerLine ?? t.lineColor ?? n.replace(/^#/, ""), f = d === "00000000" ? "rgba(0,0,0,0)" : d.startsWith("#") ? d : `#${d}`, p = t.markerLineWidthEmu == null ? Math.max(.75, o) : Math.max(.25, t.markerLineWidthEmu / B * o);
1686
+ Dt(e, {
1687
+ x: r + a / 2,
1688
+ y: i
1689
+ }, c, Math.min(a, Math.max(2, (t.markerSize ?? 5) * o)), u, f, p, N(t), s, o);
1690
+ }
1691
+ function Ft(e, t, n, r, i = !1, a, o = 0) {
1692
+ if (!n) return;
1693
+ R(e, t, n, r, o);
1694
+ let c = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), l = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1695
+ let r = t.series[0]?.dataPointColors?.[n];
1416
1696
  return {
1417
1697
  label: e,
1418
- color: r === "00000000" ? "transparent" : r ? `#${r}` : ve(t),
1419
- series: n.series[0],
1420
- point: o.get(t)
1698
+ color: r === "00000000" ? "transparent" : r ? `#${r}` : at(n),
1699
+ series: t.series[0],
1700
+ point: c.get(n),
1701
+ sourceIndex: n
1421
1702
  };
1422
- }) : n.series.map((e, t) => ({
1703
+ }) : t.series.map((e, t) => ({
1423
1704
  label: e.name || `Series ${t + 1}`,
1424
- color: ve(t, e),
1705
+ color: at(t, e),
1425
1706
  series: e,
1426
- point: void 0
1427
- })), c = f(n.legendFontSizeHpt, i) ?? 9 * i;
1428
- e.font = `${n.legendFontBold ? "bold " : ""}${c}px ${xe(n.legendFontFace)}`, e.textAlign = "left", e.textBaseline = "middle";
1429
- let l = Math.max(c * 1.45, 12), u = Math.min(7 * i, l * .7);
1430
- if (n.legendPos === "t" || n.legendPos === "b" || n.legendManualLayout != null && r.w >= r.h) {
1431
- let o = s.map((t) => u + 4 + e.measureText(t.label).width), c = t(o, Math.max(1, r.w - 8), 12).slice(0, Math.max(0, Math.floor((r.h - 4 + 1e-6) / l))), d = r.y + 2 + l / 2;
1432
- for (let t of c) {
1433
- let c = t.map((e) => Math.min(r.w, o[e])), f = c.reduce((e, t) => e + t, 0) + Math.max(0, t.length - 1) * 12, p = r.x + Math.max(4, (r.w - f) / 2);
1434
- for (let r = 0; r < t.length; r++) {
1435
- let o = s[t[r]], l = Math.max(0, c[r] - u - 4);
1436
- if (!a && n.chartType.toLowerCase().includes("line") && o.series?.lineHidden !== !0) {
1437
- let t = o.series?.lineWidthEmu == null ? Math.max(1, 2 * i) : Math.max(.5, o.series.lineWidthEmu / S * i);
1438
- e.beginPath(), e.moveTo(p, d), e.lineTo(p + u, d), e.strokeStyle = o.series?.lineColor ? `#${o.series.lineColor}` : T(o.color, .7), e.lineWidth = t, e.setLineDash(y(o.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]);
1439
- } else {
1440
- o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(p, d - u / 2, u, u));
1441
- let t = o.point?.lineHidden ?? o.series?.lineHidden, n = o.point?.lineColor ?? o.series?.lineColor;
1442
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * i : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / S * i), e.setLineDash(y(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(p, d - u / 2, u, u), e.setLineDash([]));
1707
+ point: void 0,
1708
+ sourceIndex: t
1709
+ })), u = Ze(t), d = l.filter((e) => u.get(e.sourceIndex)?.deleted !== !0), f = a != null && a.labels.length === d.length && a.labels.every((e, t) => e === d[t].label), p = f ? a.styles : d.map((e) => Qe(t, u.get(e.sourceIndex), r));
1710
+ e.textAlign = "left", e.textBaseline = "middle";
1711
+ let m = Math.max(Math.max(0, ...p.map((e) => e.fontPx)) * 1.45, 12), h = Math.min(7 * r, m * .7);
1712
+ if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1713
+ let s = f ? a.itemWidths : d.map((t, n) => (e.font = p[n].font, h + 4 + e.measureText(t.label).width)), c = b(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / m))), l = n.y + 2 + m / 2;
1714
+ for (let a of c) {
1715
+ let c = a.map((e) => Math.min(n.w, s[e])), u = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, f = n.x + Math.max(4, (n.w - u) / 2);
1716
+ for (let n = 0; n < a.length; n++) {
1717
+ let s = a[n], u = d[s], m = p[s];
1718
+ e.font = m.font;
1719
+ let g = Math.max(0, c[n] - h - 4);
1720
+ if (!i && t.chartType.toLowerCase().includes("line") && u.series) Pt(e, u.series, u.color, f, l, h, r, o);
1721
+ else {
1722
+ u.color !== "transparent" && (e.fillStyle = u.color, e.fillRect(f, l - h / 2, h, h));
1723
+ let t = u.point?.lineHidden ?? u.series?.lineHidden, n = u.point?.lineColor ?? u.series?.lineColor;
1724
+ t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (u.point?.lineWidthEmu ?? u.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (u.point?.lineWidthEmu ?? u.series?.lineWidthEmu ?? 0) / B * r), e.setLineDash(G(u.point?.lineDash ?? u.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(f, l - h / 2, h, h), e.setLineDash([]));
1443
1725
  }
1444
- e.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959", e.fillText(O(e, o.label, l), p + u + 4, d), p += c[r] + 12;
1726
+ e.fillStyle = m.color, e.fillText(J(e, u.label, g), f + h + 4, l), f += c[n] + 12;
1445
1727
  }
1446
- d += l;
1728
+ l += m;
1447
1729
  }
1448
1730
  return;
1449
1731
  }
1450
- let d = r.y;
1451
- for (let t = 0; t < s.length; t++) {
1452
- let o = s[t], f = r.x + 8 + u, p = Math.max(0, r.x + r.w - 4 - f), m = Math.max(c * 1.2, 10), h = b(o.label, p, m * (a ? 1 : 2), m, (t) => e.measureText(t).width);
1453
- if (h.length === 0) continue;
1454
- let g = Math.max(l, h.length * m + 2);
1455
- if (d + g > r.y + r.h + 1e-6) break;
1456
- let _ = d + g / 2;
1457
- if (!a && n.chartType.toLowerCase().includes("line")) {
1458
- let t = o.series?.lineWidthEmu == null ? Math.max(1, 2 * i) : Math.max(.5, o.series.lineWidthEmu / S * i);
1459
- o.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(r.x + 4, _), e.lineTo(r.x + 4 + u, _), e.strokeStyle = o.series?.lineColor ? `#${o.series.lineColor}` : T(o.color, .7), e.lineWidth = t, e.setLineDash(y(o.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]));
1460
- } else {
1461
- o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(r.x + 4, _ - u / 2, u, u));
1462
- let t = o.point?.lineHidden ?? o.series?.lineHidden, n = o.point?.lineColor ?? o.series?.lineColor;
1463
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * i : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / S * i), e.setLineDash(y(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(r.x + 4, _ - u / 2, u, u), e.setLineDash([]));
1732
+ let g = n.y;
1733
+ for (let a = 0; a < d.length; a++) {
1734
+ let c = d[a], l = p[a];
1735
+ e.font = l.font;
1736
+ let u = n.x + 8 + h, f = Math.max(0, n.x + n.w - 4 - u), _ = Math.max(l.fontPx * 1.2, 10), v = s(c.label, f, _ * (i ? 1 : 2), _, (t) => e.measureText(t).width);
1737
+ if (v.length === 0) continue;
1738
+ let y = Math.max(m, v.length * _ + 2);
1739
+ if (g + y > n.y + n.h + 1e-6) break;
1740
+ let b = g + y / 2;
1741
+ if (!i && t.chartType.toLowerCase().includes("line") && c.series) Pt(e, c.series, c.color, n.x + 4, b, h, r, o);
1742
+ else {
1743
+ c.color !== "transparent" && (e.fillStyle = c.color, e.fillRect(n.x + 4, b - h / 2, h, h));
1744
+ let t = c.point?.lineHidden ?? c.series?.lineHidden, i = c.point?.lineColor ?? c.series?.lineColor;
1745
+ t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (c.point?.lineWidthEmu ?? c.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (c.point?.lineWidthEmu ?? c.series?.lineWidthEmu ?? 0) / B * r), e.setLineDash(G(c.point?.lineDash ?? c.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, b - h / 2, h, h), e.setLineDash([]));
1464
1746
  }
1465
- e.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959";
1466
- let v = _ - (h.length - 1) * m / 2;
1467
- h.forEach((t, n) => e.fillText(t, f, v + n * m)), d += g;
1747
+ e.fillStyle = l.color;
1748
+ let x = b - (v.length - 1) * _ / 2;
1749
+ v.forEach((t, n) => e.fillText(t, u, x + n * _)), g += y;
1468
1750
  }
1469
1751
  }
1470
- function He(e, t, n, r, i, a) {
1752
+ function It(e, t, n, r, i, a) {
1471
1753
  let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
1472
- return p({
1754
+ return q({
1473
1755
  dataMin: t,
1474
1756
  dataMax: n,
1475
1757
  explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
@@ -1483,7 +1765,7 @@ function He(e, t, n, r, i, a) {
1483
1765
  needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
1484
1766
  });
1485
1767
  }
1486
- function Ue(e, t, n) {
1768
+ function Lt(e, t, n) {
1487
1769
  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;
1488
1770
  return {
1489
1771
  start: Math.min(o, s),
@@ -1492,7 +1774,7 @@ function Ue(e, t, n) {
1492
1774
  leading: o
1493
1775
  };
1494
1776
  }
1495
- function We(e) {
1777
+ function Rt(e) {
1496
1778
  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);
1497
1779
  return {
1498
1780
  floor: [
@@ -1521,54 +1803,130 @@ function We(e) {
1521
1803
  farDepth: l
1522
1804
  };
1523
1805
  }
1524
- function Q(e, t, n, r, i = "A6A6A6", a = .75) {
1525
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / S * r) : a * r;
1806
+ function zt(e, t, n, r, i = "A6A6A6", a = .75) {
1807
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / B * r) : a * r;
1526
1808
  return {
1527
1809
  color: `#${e ?? i}`,
1528
1810
  width: o,
1529
- dash: y(n ?? "solid", o)
1811
+ dash: G(n ?? "solid", o)
1530
1812
  };
1531
1813
  }
1532
- function $(e, t) {
1814
+ function Bt(e, t, n, r) {
1815
+ let i = zt(e, t, n, r, "898989", 1);
1816
+ if (t == null || !Number.isFinite(t) || t < 0) return i;
1817
+ let a = t / B * r;
1818
+ if (!(a > 0)) return i;
1819
+ let o = a;
1820
+ return {
1821
+ ...i,
1822
+ width: o,
1823
+ dash: G(n ?? "solid", o)
1824
+ };
1825
+ }
1826
+ function Vt(e, t, n, r) {
1827
+ return Bt(e, t, n, r);
1828
+ }
1829
+ function Ht(e, t) {
1533
1830
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1534
1831
  }
1535
- function Ge(e, t, n, r, i, a, o, s, c) {
1536
- let { front: l } = n, u = l.x, d = l.x + l.w, f = We(n), { sideX: p, floorY: m, oppositeFloorY: h, nearDepth: _, farDepth: v } = f, y = (t, n) => {
1537
- n?.fillHidden === !0 || !n?.fillColor || we(e, t, `#${n.fillColor}`, 0);
1832
+ function Ut(e, t, n, r, i, a, s, l, u) {
1833
+ let { front: d } = n, f = d.x, m = d.x + d.w, h = Rt(n), { sideX: g, floorY: _, oppositeFloorY: v, nearDepth: y, farDepth: b } = h, x = Xt(t, n, r, a, s, l, i), S = [], C = t.catAxisLinePaintAuthored === !0, T = t.valAxisLinePaintAuthored === !0, E = i === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : T && !t.valAxisHidden && !t.valAxisLineHidden, D = i === "vertical" ? T && !t.valAxisHidden && !t.valAxisLineHidden : C && !t.catAxisHidden && !t.catAxisLineHidden;
1834
+ E && S.push([x.horizontalStart, x.horizontalEnd]), D && S.push([x.verticalStart, x.verticalEnd]);
1835
+ let O = t.threeD?.seriesAxis, A = O?.linePaintAuthored === !0;
1836
+ if (O && !O.hidden && !O.lineHidden && A && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1837
+ let e = i === "vertical" ? h.seriesAxisX : x.axisX, t = i === "horizontal" ? _ === n.front.y ? n.front.y + n.front.h : n.front.y : _;
1838
+ S.push([n.project(e, t, y), n.project(e, t, b)]);
1839
+ }
1840
+ let j = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, M = (e, t) => S.some(([n, r]) => j(e, n) && j(t, r) || j(e, r) && j(t, n)), N = (e, t) => {
1841
+ let r = Y(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1842
+ scenePoints: e,
1843
+ faceIndex: t
1844
+ })).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
1845
+ faceIndex: t,
1846
+ scenePoints: e,
1847
+ points: e.map((e) => n.projectUnbounded(e.x, e.y, e.depth)),
1848
+ depth: e.reduce((e, t) => e + n.cameraDepth(t.x, t.y, t.depth), 0) / e.length
1849
+ })).sort((e, t) => e.depth - t.depth);
1850
+ return {
1851
+ slab: r,
1852
+ faces: i,
1853
+ visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
1854
+ };
1855
+ }, P = N("floor", t.threeD?.floor), F = N("sideWall", t.threeD?.sideWall), I = N("backWall", t.threeD?.backWall), L = P.faces, R = F.faces, ee = I.faces, z = (i, a, s, l) => {
1856
+ let u = c(t, a, s), d = i.faces;
1857
+ if (!u.fill || !d.length) return;
1858
+ if (u.fill.fillType === "image") {
1859
+ let t = o(u.fill);
1860
+ if (!t) return;
1861
+ le(e, u.fill, t, a, l, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min);
1862
+ return;
1863
+ }
1864
+ let f = d.flatMap((e) => e.points), p = Math.min(...f.map((e) => e.x)), m = Math.max(...f.map((e) => e.x)), h = Math.min(...f.map((e) => e.y)), g = Math.max(...f.map((e) => e.y)), _ = u.fill.fillType === "solid" ? `#${u.fill.color}` : U(u.fill, e, p, h, m - p, g - h);
1865
+ if (_) for (let t of d) t.points.length < 3 || (ht(e, t.points), e.fillStyle = _, e.fill());
1538
1866
  };
1539
- y(f.floor, t.threeD?.floor), y(f.sideWall, t.threeD?.sideWall), y(f.backWall, t.threeD?.backWall);
1540
- let b = (t, a) => {
1541
- $(e, a);
1542
- for (let a of t) if (i === "horizontal") {
1543
- let t = l.x + r.fraction(a) * l.w, i = n.project(t, m, v), o = n.project(t, h, v);
1544
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke();
1545
- } else {
1546
- let t = l.y + l.h - r.fraction(a) * l.h, i = n.project(p, t, _), o = n.project(p, t, v), s = n.project(p === u ? d : u, t, v);
1547
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke(), e.beginPath(), e.moveTo(o.x, o.y), e.lineTo(s.x, s.y), e.stroke();
1867
+ z(P, t.threeD?.floor, "floor", "floor"), z(F, t.threeD?.sideWall, "wall", "sideWall"), z(I, t.threeD?.backWall, "wall", "backWall");
1868
+ let V = (t, r, i, a, o = !0) => {
1869
+ for (let s of fe(t.slab, r, i, a)) {
1870
+ if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
1871
+ let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
1872
+ e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
1873
+ }
1874
+ }, H = (t, a, o) => {
1875
+ Ht(e, a);
1876
+ for (let a of t) {
1877
+ let t = r.fraction(a);
1878
+ if (o) {
1879
+ i === "horizontal" ? (V(P, "floor", "x", t), V(I, "backWall", "x", t)) : (V(F, "sideWall", "y", t), V(I, "backWall", "y", t));
1880
+ continue;
1881
+ }
1882
+ if (i === "horizontal") {
1883
+ let r = d.x + t * d.w, i = n.project(r, _, b), a = n.project(r, v, b);
1884
+ e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
1885
+ } else {
1886
+ let r = d.y + d.h - t * d.h, i = n.project(g, r, y), a = n.project(g, r, b), o = n.project(g === f ? m : f, r, b);
1887
+ 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();
1888
+ }
1548
1889
  }
1549
1890
  };
1550
- t.valAxisMinorGridlines === !0 && b(r.minorTicks, Q(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5)), t.valAxisMajorGridlines !== !1 && b(r.majorTicks, Q(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1)), $(e, Q(null, null, null, c, "898989", 1));
1551
- for (let t = 0; t < a; t++) if (i === "vertical") {
1552
- let r = l.x + g(t, a, o, s) * l.w, i = n.project(r, m, _), c = n.project(r, m, v);
1553
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1554
- } else {
1555
- let r = l.y + g(t, a, o, s) * l.h, i = n.project(p, r, _), c = n.project(p, r, v);
1556
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1557
- }
1558
- let x = (t, n) => {
1559
- if (!(n?.lineHidden === !0 || t.length < 2)) {
1560
- $(e, Q(n?.lineColor, n?.lineWidthEmu, n?.lineDash, c, "898989", 1)), e.beginPath(), e.moveTo(t[0].x, t[0].y);
1561
- for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1562
- e.lineTo(t[0].x, t[0].y), e.closePath(), e.stroke();
1891
+ t.valAxisMinorGridlines === !0 && H(r.minorTicks, zt(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, u, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && H(r.majorTicks, zt(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, u, "898989", 1), !0);
1892
+ let te = (t, n) => {
1893
+ Ht(e, n);
1894
+ for (let e of t) i === "vertical" ? (V(P, "floor", "x", e), V(I, "backWall", "x", e)) : (V(F, "sideWall", "y", e), V(I, "backWall", "y", e));
1895
+ };
1896
+ t.catAxisMinorGridlines === !0 && te(w(a, s), zt(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, u, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && te(p(a, s), zt(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, u, "E0E0E0", .5));
1897
+ let W = (n, r, i) => {
1898
+ if (!n.length) return;
1899
+ let a = c(t, r, i);
1900
+ if (a.line === null) return;
1901
+ let o = a.line ?? {
1902
+ fillType: "solid",
1903
+ color: "898989"
1904
+ }, s = n.flatMap((e) => e.points), l = Math.min(...s.map((e) => e.x)), d = Math.max(...s.map((e) => e.x)), f = Math.min(...s.map((e) => e.y)), p = Math.max(...s.map((e) => e.y)), m = o.fillType === "solid" ? `#${o.color}` : U(o, e, l, f, d - l, p - f);
1905
+ if (!m) return;
1906
+ let h = a.lineWidthEmu == null ? u : Math.max(.25, a.lineWidthEmu / B * u);
1907
+ e.strokeStyle = m, e.lineWidth = h, e.setLineDash(k(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";
1908
+ for (let t of n) {
1909
+ if (t.points.length < 2) continue;
1910
+ let n = t.points.map((e, n) => ({
1911
+ start: e,
1912
+ end: t.points[(n + 1) % t.points.length]
1913
+ }));
1914
+ if (n.some((e) => M(e.start, e.end))) {
1915
+ for (let t of n) M(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
1916
+ continue;
1917
+ }
1918
+ e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
1919
+ for (let n = 1; n < t.points.length; n++) e.lineTo(t.points[n].x, t.points[n].y);
1920
+ e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
1563
1921
  }
1564
1922
  };
1565
- x(f.floor, t.threeD?.floor), x(f.sideWall, t.threeD?.sideWall), x(f.backWall, t.threeD?.backWall), e.setLineDash([]);
1923
+ W(L, t.threeD?.floor, "floor"), W(R, t.threeD?.sideWall, "wall"), W(ee, t.threeD?.backWall, "wall"), e.setLineDash([]);
1566
1924
  }
1567
- function Ke(e, t, n, r, i, a, o, s, c) {
1568
- let l = Qe(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;
1569
- u && ($(e, Q(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && ($(e, Q(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
1925
+ function Wt(e, t, n, r, i, a, o, s, c) {
1926
+ let l = Xt(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;
1927
+ u && (Ht(e, Bt(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 && (Ht(e, Bt(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([]);
1570
1928
  }
1571
- function qe(e, t, n, r) {
1929
+ function Gt(e, t, n, r) {
1572
1930
  let i = {
1573
1931
  x: (e.x + t.x) / 2,
1574
1932
  y: (e.y + t.y) / 2
@@ -1581,25 +1939,25 @@ function qe(e, t, n, r) {
1581
1939
  y: i.y <= n.y ? -1 : 1
1582
1940
  };
1583
1941
  }
1584
- function Je(e, t, n, r, i, a, o, s, c) {
1942
+ function Kt(e, t, n, r, i, a, o, s, c) {
1585
1943
  if (!t || t === "none") return;
1586
- let l = qe(r, i, a, o), u = Ye(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
1944
+ let l = Gt(r, i, a, o), u = qt(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
1587
1945
  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();
1588
1946
  }
1589
- function Ye(e, t) {
1947
+ function qt(e, t) {
1590
1948
  return (e === "minor" ? 4 : 6) * t;
1591
1949
  }
1592
- function Xe(e, t, n) {
1950
+ function Jt(e, t, n) {
1593
1951
  if (e !== "out" && e !== "cross") return 0;
1594
- let r = Ye(t, n);
1952
+ let r = qt(t, n);
1595
1953
  return e === "cross" ? r / 2 : r;
1596
1954
  }
1597
- function Ze(e, t, n, r) {
1955
+ function Yt(e, t, n, r) {
1598
1956
  if (t) return r;
1599
- let i = Xe(e, "major", n);
1957
+ let i = Jt(e, "major", n);
1600
1958
  return Math.max(r, i + 3 * n);
1601
1959
  }
1602
- function Qe(e, t, n, r, i, a, o) {
1960
+ function Xt(e, t, n, r, i, a, o) {
1603
1961
  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 = () => {
1604
1962
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
1605
1963
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
@@ -1609,253 +1967,251 @@ function Qe(e, t, n, r, i, a, o) {
1609
1967
  return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
1610
1968
  }, f = () => {
1611
1969
  let t = e.valAxisCrossesAt;
1612
- if (t != null && Number.isFinite(t)) return g(t - 1, r, i, a);
1970
+ if (t != null && Number.isFinite(t)) return S(t - 1, r, i, a);
1613
1971
  let n = e.valAxisCrosses;
1614
1972
  if (n !== "min" && n !== "max") return null;
1615
1973
  let o = +(n === "max");
1616
1974
  return a ? 1 - o : o;
1617
- }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, _ = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, v = t.topology.nearDepth;
1975
+ }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, g = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, _ = t.topology.nearDepth;
1618
1976
  return {
1619
1977
  axisX: h,
1620
- axisY: _,
1621
- depth: v,
1622
- horizontalStart: t.project(s.x, _, v),
1623
- horizontalEnd: t.project(s.x + s.w, _, v),
1624
- verticalStart: t.project(h, s.y + s.h, v),
1625
- verticalEnd: t.project(h, s.y, v)
1978
+ axisY: g,
1979
+ depth: _,
1980
+ horizontalStart: t.project(s.x, g, _),
1981
+ horizontalEnd: t.project(s.x + s.w, g, _),
1982
+ verticalStart: t.project(h, s.y + s.h, _),
1983
+ verticalEnd: t.project(h, s.y, _)
1626
1984
  };
1627
1985
  }
1628
- function $e(e, t, n, r, i, a, o, s, c) {
1629
- let { front: l } = n, u = Qe(t, n, r, i, a, o, s), { axisX: d, axisY: f, depth: p } = u, m = n.project(l.x + l.w / 2, l.y + l.h / 2, p), h = t.valAxisMinorTickMark ?? "none";
1986
+ function Zt(e, t, n, r, i, a, o, s, c, l) {
1987
+ let { front: u } = n, d = Xt(t, n, r, i, a, o, s), { axisX: f, axisY: m, depth: h } = d, g = n.project(u.x + u.w / 2, u.y + u.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = c ? Vt : Bt;
1630
1988
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
1631
- $(e, Q(t.valAxisLineColor, t.valAxisLineWidthEmu, null, c, "898989", 1));
1632
- let i = (e) => s === "horizontal" ? n.project(l.x + r.fraction(e) * l.w, f, p) : n.project(d, l.y + l.h - r.fraction(e) * l.h, p), a = s === "horizontal" ? u.horizontalStart : u.verticalStart, o = s === "horizontal" ? u.horizontalEnd : u.verticalEnd;
1633
- for (let n of r.majorTicks) Je(e, t.valAxisMajorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "major", c);
1634
- for (let t of r.minorTicks) Je(e, h, i(t), a, o, m, s === "vertical" ? "horizontal" : "vertical", "minor", c);
1989
+ Ht(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, l));
1990
+ let i = (e) => s === "horizontal" ? n.project(u.x + r.fraction(e) * u.w, m, h) : n.project(f, u.y + u.h - r.fraction(e) * u.h, h), a = s === "horizontal" ? d.horizontalStart : d.verticalStart, o = s === "horizontal" ? d.horizontalEnd : d.verticalEnd;
1991
+ for (let n of r.majorTicks) Kt(e, t.valAxisMajorTickMark, i(n), a, o, g, s === "vertical" ? "horizontal" : "vertical", "major", l);
1992
+ for (let t of r.minorTicks) Kt(e, _, i(t), a, o, g, s === "vertical" ? "horizontal" : "vertical", "minor", l);
1635
1993
  }
1636
1994
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
1637
- $(e, Q(t.catAxisLineColor, t.catAxisLineWidthEmu, null, c, "898989", 1));
1638
- let r = s === "vertical" ? u.horizontalStart : u.verticalStart, h = s === "vertical" ? u.horizontalEnd : u.verticalEnd, _ = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1));
1639
- for (let u = 0; u < i; u += _) {
1640
- let _ = g(u, i, a, o), v = s === "vertical" ? n.project(l.x + _ * l.w, f, p) : n.project(d, l.y + _ * l.h, p);
1641
- Je(e, t.catAxisMajorTickMark, v, r, h, m, s === "vertical" ? "vertical" : "horizontal", "major", c);
1642
- }
1643
- let v = t.catAxisMinorUnit;
1644
- if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && v != null && Number.isFinite(v) && v > 0) {
1645
- let u = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : _, y = Math.min(512, Math.ceil(i / v));
1646
- for (let _ = 1; _ < y; _++) {
1647
- let y = _ * v;
1648
- if (!(y < i)) break;
1649
- if (Math.abs(y / u - Math.round(y / u)) < 1e-9) continue;
1650
- let b = g(y, i, a, o), x = s === "vertical" ? n.project(l.x + b * l.w, f, p) : n.project(d, l.y + b * l.h, p);
1651
- Je(e, t.catAxisMinorTickMark, x, r, h, m, s === "vertical" ? "vertical" : "horizontal", "minor", c);
1995
+ Ht(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, l));
1996
+ let r = s === "vertical" ? d.horizontalStart : d.verticalStart, _ = s === "vertical" ? d.horizontalEnd : d.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (i) => {
1997
+ let a = s === "vertical" ? n.project(u.x + i * u.w, m, h) : n.project(f, u.y + i * u.h, h);
1998
+ Kt(e, t.catAxisMajorTickMark, a, r, _, g, s === "vertical" ? "vertical" : "horizontal", "major", l);
1999
+ };
2000
+ if (c) {
2001
+ let e = p(i, a);
2002
+ for (let t = 0; t < e.length; t += y) b(o ? 1 - e[t] : e[t]);
2003
+ } else for (let e = 0; e < i; e += y) b(S(e, i, a, o));
2004
+ let x = t.catAxisMinorUnit;
2005
+ if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && x != null && Number.isFinite(x) && x > 0) {
2006
+ let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, d = Math.min(512, Math.ceil(i / x));
2007
+ for (let p = 1; p < d; p++) {
2008
+ let d = p * x;
2009
+ if (!(d < i)) break;
2010
+ if (Math.abs(d / c - Math.round(d / c)) < 1e-9) continue;
2011
+ let v = S(d, i, a, o), y = s === "vertical" ? n.project(u.x + v * u.w, m, h) : n.project(f, u.y + v * u.h, h);
2012
+ Kt(e, t.catAxisMinorTickMark, y, r, _, g, s === "vertical" ? "vertical" : "horizontal", "minor", l);
1652
2013
  }
1653
2014
  }
1654
2015
  }
1655
2016
  e.setLineDash([]);
1656
2017
  }
1657
- function et(e, t, n, r) {
2018
+ function Qt(e, t, n, i, a) {
1658
2019
  if (!t.threeD) return !1;
1659
- let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), o = t.chartType.startsWith("stacked"), s = i && !o && t.threeD.barGrouping === "standard", { plot: u, legend: d } = Le(e, t, n, r, a ? "horizontal" : "vertical"), p = C(t.threeD, u, {
1660
- sceneDepthScale: i ? s ? .65 : .1 : .4,
1661
- perspectiveTangentGain: s ? 1 : 2
2020
+ 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: p } = At(e, t, n, i, s ? "horizontal" : "vertical", a), m = ce(t.threeD, u, {
2021
+ sceneDepthScale: o ? l ? .65 : .1 : .4,
2022
+ perspectiveTangentGain: l ? 1 : 2,
2023
+ sceneHeightScale: !o && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
1662
2024
  });
1663
- if (!p) return !0;
1664
- let _ = t.chartType.endsWith("Pct"), v = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, b = Math.max(1, v.length, ...t.series.map((e) => e.values.length)), E = t.catAxisOrientation === "maxMin", D = t.catAxisCrossBetween === "between", O = t.dispBlanksAs ?? "gap", k = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, ee = (e, n) => {
2025
+ if (!m) return !0;
2026
+ m = de(m, t.threeD, u);
2027
+ let h = t.chartType.endsWith("Pct"), g = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, g.length, ...t.series.map((e) => e.values.length)), v = h ? st(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) => {
1665
2028
  let r = t.series[e]?.values[n];
1666
- return r != null && Number.isFinite(r) && (!k || r > 0) || r == null && (o || O === "zero");
1667
- }, A = (e, n) => {
1668
- let r = t.series[e]?.values[n] ?? 0;
1669
- if (!Number.isFinite(r)) return 0;
1670
- if (!_) return r;
1671
- let i = 0;
1672
- for (let e of t.series) {
1673
- let t = e.values[n];
1674
- t != null && Number.isFinite(t) && (i = Math.max(i, Math.abs(t)));
1675
- }
1676
- if (!(i > 0)) return 0;
1677
- let a = 0;
1678
- for (let e of t.series) {
1679
- let t = e.values[n];
1680
- t != null && Number.isFinite(t) && (a += Math.abs(t) / i);
1681
- }
1682
- return a > 0 ? r / i / a * 100 : 0;
1683
- }, j = (e, t) => {
1684
- let n = e + t;
1685
- return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
1686
- }, M = 0, N = 0;
1687
- if (o) {
1688
- for (let e = 0; e < b; e++) {
2029
+ return r != null && Number.isFinite(r) && (!C || r > 0) || r == null && (c || x === "zero");
2030
+ }, T = (e, n) => ct(t, e, n, v), A = 0, j = 0;
2031
+ if (c) {
2032
+ for (let e = 0; e < _; e++) {
1689
2033
  let n = 0, r = 0;
1690
2034
  for (let i = 0; i < t.series.length; i++) {
1691
- let t = A(i, e);
1692
- t >= 0 ? n = j(n, t) : r = j(r, t);
2035
+ let t = T(i, e);
2036
+ t >= 0 ? n = Q(n, t) : r = Q(r, t);
1693
2037
  }
1694
- M = Math.min(M, r), N = Math.max(N, n);
2038
+ A = Math.min(A, r), j = Math.max(j, n);
1695
2039
  }
1696
- _ && (M = M < 0 ? -100 : 0, N = N > 0 ? 100 : 0, M === 0 && N === 0 && (N = 1));
2040
+ h && (A = A < 0 ? -100 : 0, j = j > 0 ? 100 : 0, A === 0 && j === 0 && (j = 1));
1697
2041
  } else {
1698
- let e = m(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!k || e > 0)), k ? {
2042
+ let e = ge(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!C || e > 0)), C ? {
1699
2043
  min: 1,
1700
2044
  max: 10
1701
2045
  } : {
1702
2046
  min: 0,
1703
2047
  max: 1
1704
2048
  });
1705
- M = k ? e.min : Math.min(0, e.min), N = k ? e.max : Math.max(0, e.max);
2049
+ A = C ? e.min : Math.min(0, e.min), j = C ? e.max : Math.max(0, e.max);
1706
2050
  }
1707
- let P = He(t, M, N, (a ? p.front.w : p.front.h) / r, _, a ? "horizontal" : "vertical"), F = (e) => Number.isFinite(e) ? Math.max(P.min, Math.min(P.max, e)) : P.min;
1708
- Ge(e, t, p, P, a ? "horizontal" : "vertical", b, D, E, r);
1709
- let { front: I } = p, L = Math.max(1, t.series.length), R = [], V = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), H = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
1710
- if (i) {
1711
- let i = p.prismInterval(0, 1, !0), c = [], l = Array(b).fill(0), u = Array(b).fill(0), d = (a ? I.h : I.w) / b, f = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2051
+ let N = s ? m.project(m.front.x, m.topology.axisY === "min" ? m.front.y : m.front.y + m.front.h, m.topology.nearDepth) : m.project(m.topology.axisX === "min" ? m.front.x : m.front.x + m.front.w, m.front.y, m.topology.nearDepth), F = s ? m.project(m.front.x + m.front.w, m.topology.axisY === "min" ? m.front.y : m.front.y + m.front.h, m.topology.nearDepth) : m.project(m.topology.axisX === "min" ? m.front.x : m.front.x + m.front.w, m.front.y + m.front.h, m.topology.nearDepth), I = Math.hypot(F.x - N.x, F.y - N.y) / i, L = It(t, A, j, I, h, s ? "horizontal" : "vertical"), R = (e) => Number.isFinite(e) ? Math.max(L.min, Math.min(L.max, e)) : L.min;
2052
+ o || Ut(e, t, m, L, s ? "horizontal" : "vertical", _, b, y, i);
2053
+ let { front: H } = m, U = Math.max(1, t.series.length), te = [], W = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), G = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2054
+ if (o) {
2055
+ let r = m.prismInterval(0, 1, !0), o = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (s ? H.h : H.w) / _, p = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
1712
2056
  for (let e = 0; e < t.series.length; e++) {
1713
- let n = t.series[e], m = s ? p.prismInterval(e, L, !1) : i, g = w(d, f, s ? 0 : e, s ? 1 : L, o || s);
1714
- for (let i = 0; i < b; i++) {
1715
- if (!ee(e, i)) continue;
1716
- let s = A(e, i), f = V[e].get(i), p = f?.fillHidden === !0 ? "transparent" : f?.color ?? n.dataPointColors?.[i], v = p === "00000000" ? "transparent" : p ? `#${p}` : n.color === "00000000" ? "transparent" : ve(e, n), y = ye(n, f), S = f?.lineColor ?? n.lineColor, C = f?.lineWidthEmu ?? n.lineWidthEmu, w = f?.lineDash ?? n.chartexStyle?.lineDash ?? "solid", T = n.chartexStyle?.lineCap === "rnd" ? "round" : n.chartexStyle?.lineCap === "sq" ? "square" : "butt", D = n.chartexStyle?.lineJoin === "round" || n.chartexStyle?.lineJoin === "bevel" ? n.chartexStyle.lineJoin : "miter", O = o ? s >= 0 ? l[i] : u[i] : 0, M = j(O, s);
1717
- o && (s >= 0 ? l[i] = M : u[i] = M);
1718
- let N = F(O), L = F(M), R = n.threeDShape ?? t.threeD.shape ?? "box", z = R === "cone" || R === "pyramid", B = R === "coneToMax" || R === "pyramidToMax", H = (e) => {
1719
- if (!z) return 1;
1720
- let t = k && !(O > 0) ? P.min : O, n = P.fraction(t), r = P.fraction(M), i = P.fraction(e), a = r - n;
2057
+ let n = t.series[e], a = l ? m.prismInterval(e, U, !1) : r, g = me(f, p, l ? 0 : e, l ? 1 : U, c || l);
2058
+ for (let r = 0; r < _; r++) {
2059
+ if (!w(e, r)) continue;
2060
+ let l = T(e, r), p = dt(t, n, W[e].get(r), r, e), m = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = c ? l >= 0 ? u[r] : d[r] : 0, x = Q(b, l);
2061
+ c && (l >= 0 ? u[r] = x : d[r] = x);
2062
+ let S = R(b), E = R(x), O = n.threeDShape ?? t.threeD.shape ?? "box", k = O === "cone" || O === "pyramid", A = O === "coneToMax" || O === "pyramidToMax", j = (e) => {
2063
+ if (!k) return 1;
2064
+ let t = C && !(b > 0) ? L.min : b, n = L.fraction(t), r = L.fraction(x), i = L.fraction(e), a = r - n;
1721
2065
  return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
1722
- }, U = (e) => {
1723
- if (!B) return 1;
1724
- let t = M >= O ? P.max : P.min, n = k ? P.min : 0, r = P.fraction(t), i = P.fraction(n), a = P.fraction(e), o = Math.abs(r - i);
2066
+ }, M = (e) => {
2067
+ if (!A) return 1;
2068
+ let t = x >= b ? L.max : L.min, n = C ? L.min : 0, r = L.fraction(t), i = L.fraction(n), a = L.fraction(e), o = Math.abs(r - i);
1725
2069
  return !(o > 0) || ![
1726
2070
  r,
1727
2071
  i,
1728
2072
  a
1729
- ].every(Number.isFinite) ? x(e, P.min, P.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
1730
- }, W = B ? U(N) : H(N), G = B ? U(L) : H(L);
1731
- if (a) {
1732
- let t = I.x + P.fraction(N) * I.w, n = I.x + P.fraction(L) * I.w, a = E ? b - 1 - i : i, o = I.y + a * d + g.offset;
1733
- c.push({
2073
+ ].every(Number.isFinite) ? ae(e, L.min, L.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2074
+ }, N = A ? M(S) : j(S), P = A ? M(E) : j(E);
2075
+ if (s) {
2076
+ let t = H.x + L.fraction(S) * H.w, n = H.x + L.fraction(E) * H.w, s = y ? _ - 1 - r : r, c = H.y + s * f + g.offset;
2077
+ o.push({
1734
2078
  x: Math.min(t, n),
1735
- y: o,
2079
+ y: c,
1736
2080
  width: Math.abs(n - t),
1737
2081
  height: g.size,
1738
- nearDepth: m.near,
1739
- farDepth: m.far,
1740
- categoryIndex: i,
2082
+ nearDepth: a.near,
2083
+ farDepth: a.far,
2084
+ categoryIndex: r,
1741
2085
  seriesIndex: e,
1742
- color: v,
1743
- shape: R,
2086
+ color: m,
2087
+ fillPaint: p.fill,
2088
+ lineFill: p.lineFill,
2089
+ shape: O,
1744
2090
  baseCoord: t,
1745
2091
  endCoord: n,
1746
- baseScale: W,
1747
- endScale: G,
2092
+ baseScale: N,
2093
+ endScale: P,
1748
2094
  omitBaseCap: !1,
1749
2095
  omitEndCap: !1,
1750
- outline: y,
1751
- outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1752
- outlineWidth: C == null ? .75 * r / h : ge(C, r),
1753
- outlineDash: w,
1754
- outlineCap: T,
1755
- outlineJoin: D,
1756
- labelValue: _ ? s / 100 : s
2096
+ outline: v,
2097
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2098
+ outlineWidth: p.lineWidthEmu == null ? .75 * i / D : rt(p.lineWidthEmu, i),
2099
+ outlineDash: p.lineDash ?? "solid",
2100
+ outlineCustomDash: p.lineCustomDash,
2101
+ outlineCap: p.lineCap,
2102
+ outlineJoin: p.lineJoin,
2103
+ labelValue: h ? l / 100 : l,
2104
+ plottedLabelValue: x
1757
2105
  });
1758
2106
  } else {
1759
- let t = I.y + I.h - P.fraction(N) * I.h, n = I.y + I.h - P.fraction(L) * I.h, a = E ? b - 1 - i : i, o = I.x + a * d + g.offset;
1760
- c.push({
1761
- x: o,
2107
+ let t = H.y + H.h - L.fraction(S) * H.h, n = H.y + H.h - L.fraction(E) * H.h, s = y ? _ - 1 - r : r, c = H.x + s * f + g.offset;
2108
+ o.push({
2109
+ x: c,
1762
2110
  y: Math.min(t, n),
1763
2111
  width: g.size,
1764
2112
  height: Math.abs(n - t),
1765
- nearDepth: m.near,
1766
- farDepth: m.far,
1767
- categoryIndex: i,
2113
+ nearDepth: a.near,
2114
+ farDepth: a.far,
2115
+ categoryIndex: r,
1768
2116
  seriesIndex: e,
1769
- color: v,
1770
- shape: R,
2117
+ color: m,
2118
+ fillPaint: p.fill,
2119
+ lineFill: p.lineFill,
2120
+ shape: O,
1771
2121
  baseCoord: t,
1772
2122
  endCoord: n,
1773
- baseScale: W,
1774
- endScale: G,
2123
+ baseScale: N,
2124
+ endScale: P,
1775
2125
  omitBaseCap: !1,
1776
2126
  omitEndCap: !1,
1777
- outline: y,
1778
- outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1779
- outlineWidth: C == null ? .75 * r / h : ge(C, r),
1780
- outlineDash: w,
1781
- outlineCap: T,
1782
- outlineJoin: D,
1783
- labelValue: _ ? s / 100 : s
2127
+ outline: v,
2128
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2129
+ outlineWidth: p.lineWidthEmu == null ? .75 * i / D : rt(p.lineWidthEmu, i),
2130
+ outlineDash: p.lineDash ?? "solid",
2131
+ outlineCustomDash: p.lineCustomDash,
2132
+ outlineCap: p.lineCap,
2133
+ outlineJoin: p.lineJoin,
2134
+ labelValue: h ? l / 100 : l,
2135
+ plottedLabelValue: x
1784
2136
  });
1785
2137
  }
1786
2138
  }
1787
2139
  }
1788
- if (o) {
1789
- let e = _e(c, b);
1790
- for (let t = 0; t < b; t++) {
2140
+ if (c) {
2141
+ let e = it(o, _);
2142
+ for (let t = 0; t < _; t++) {
1791
2143
  let n = e[t];
1792
2144
  for (let e of [-1, 1]) {
1793
- let t = n.filter((t) => Math.sign(t.labelValue) === e && !Ce(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2145
+ let t = n.filter((t) => Math.sign(t.labelValue) === e && !gt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
1794
2146
  for (let e = 0; e + 1 < t.length; e++) {
1795
2147
  let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
1796
2148
  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);
1797
2149
  }
1798
2150
  }
1799
- let r = n.find((e) => e.labelValue > 0 && !Ce(e.color)), i = n.find((e) => e.labelValue < 0 && !Ce(e.color));
2151
+ let r = n.find((e) => e.labelValue > 0 && !gt(e.color)), i = n.find((e) => e.labelValue < 0 && !gt(e.color));
1800
2152
  if (r && i) {
1801
2153
  let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
1802
2154
  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);
1803
2155
  }
1804
2156
  }
1805
2157
  }
1806
- let m = {
1807
- remaining: te,
2158
+ Ut(e, t, m, L, s ? "horizontal" : "vertical", _, b, y, i);
2159
+ let g = {
2160
+ remaining: Fe,
1808
2161
  exceeded: !1
1809
- }, g = c.flatMap((e) => Ee(p, e.shape, a, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
1810
- color: e.outlineColor,
1811
- width: e.outlineWidth,
1812
- dash: y(e.outlineDash, e.outlineWidth),
1813
- cap: e.outlineCap,
1814
- join: e.outlineJoin
1815
- } : void 0, m));
1816
- if (m.exceeded) return je(e, n), !0;
1817
- for (let t of K(g)) ke(e, t);
1818
- for (let i of c) {
1819
- let o = t.series[i.seriesIndex], s = a ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), c = H[i.seriesIndex].get(i.categoryIndex);
1820
- Ie(t, o, c) && R.push(() => Fe(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, s, n, r, 0, void 0, c, "t", s, !0, t.valAxisDisplayUnits));
2162
+ }, v = o.flatMap((t) => {
2163
+ let n = yt(m, 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 ? {
2164
+ color: t.outlineColor,
2165
+ width: t.outlineWidth,
2166
+ dash: k(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2167
+ cap: t.outlineCap,
2168
+ join: t.outlineJoin
2169
+ } : void 0, g);
2170
+ return Ct(e, n, "fill", t.fillPaint, a), Ct(e, n, "outline", t.lineFill, a), n;
2171
+ });
2172
+ if (g.exceeded) return wt(e, n), !0;
2173
+ for (let t of Pe(v)) St(e, t);
2174
+ for (let r of o) {
2175
+ let o = t.series[r.seriesIndex], c = s ? m.project(r.endCoord, r.y + r.height / 2, (r.nearDepth + r.farDepth) / 2) : m.project(r.x + r.width / 2, r.endCoord, (r.nearDepth + r.farDepth) / 2), l = G[r.seriesIndex].get(r.categoryIndex);
2176
+ kt(t, o, l) && te.push(() => Ot(e, t, o, r.seriesIndex, r.categoryIndex, r.labelValue, c, n, i, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, L.max, r.plottedLabelValue, a));
1821
2177
  }
1822
2178
  } else {
1823
- let i = t.series.map(() => Array(b).fill(0)), a = t.series.map(() => Array(b).fill(0));
1824
- if (o) {
1825
- let e = Array(b).fill(0), n = Array(b).fill(0);
1826
- for (let r = 0; r < t.series.length; r++) for (let t = 0; t < b; t++) {
1827
- let o = A(r, t), s = o >= 0 ? e[t] : n[t];
1828
- i[r][t] = s, a[r][t] = j(s, o), o >= 0 ? e[t] = j(e[t], o) : n[t] = j(n[t], o);
2179
+ let r = t.series.map(() => Array(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
2180
+ if (c) {
2181
+ let e = Array(_).fill(0), n = Array(_).fill(0);
2182
+ for (let i = 0; i < t.series.length; i++) for (let t = 0; t < _; t++) {
2183
+ let a = T(i, t), s = a >= 0 ? e[t] : n[t];
2184
+ r[i][t] = s, o[i][t] = Q(s, a), a >= 0 ? e[t] = Q(e[t], a) : n[t] = Q(n[t], a);
1829
2185
  }
1830
2186
  }
1831
2187
  let s = (e) => {
1832
- let t = p.seriesDepth(e, L, o), n = 0, r = 0;
1833
- for (let i = 0; i < b; i++) {
1834
- if (!ee(e, i)) continue;
1835
- let s = o ? a[e][i] : A(e, i), c = I.x + g(i, b, D, E) * I.w, l = I.y + I.h - P.fraction(F(s)) * I.h;
1836
- n += p.cameraDepth(c, l, t), r++;
2188
+ let t = m.seriesDepth(e, U, c), n = 0, r = 0;
2189
+ for (let i = 0; i < _; i++) {
2190
+ if (!w(e, i)) continue;
2191
+ let a = c ? o[e][i] : T(e, i), s = H.x + S(i, _, b, y) * H.w, l = H.y + H.h - L.fraction(R(a)) * H.h;
2192
+ n += m.cameraDepth(s, l, t), r++;
1837
2193
  }
1838
2194
  return r > 0 ? n / r : -Infinity;
1839
- }, c = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), l = [], u = [], d = !1;
1840
- for (let s of c) {
1841
- if (d) break;
1842
- let c = t.series[s], f = ve(s, c), m = o ? p.prismInterval(0, 1, !0) : p.prismInterval(s, L, !1), h = I.x + I.w / 2, v = I.y + I.h / 2, x = p.cameraDepth(h, v, m.near) >= p.cameraDepth(h, v, m.far) ? m.near : m.far, C = [], w = [], k = [], j = [], M = [], N = [], F = [], U = [], W = [], G = [];
1843
- for (let e = 0; e < b; e++) {
1844
- if (!ee(s, e)) {
1845
- C.push(null), w.push(null), k.push(null), j.push(null), M.push(null), N.push(null), F.push(null), U.push(null), W.push(null), G.push(null);
2195
+ }, l = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), u = t.series.map((e, n) => dt(t, e, void 0, n, n)), d = [], f = [], p = !1;
2196
+ for (let s of l) {
2197
+ if (p) break;
2198
+ let l = t.series[s], g = u[s], v = g.fill === null ? "transparent" : g.color, C = c ? m.prismInterval(0, 1, !0) : m.prismInterval(s, U, !1), E = H.x + H.w / 2, D = H.y + H.h / 2, A = m.cameraDepth(E, D, C.near) >= m.cameraDepth(E, D, C.far) ? C.near : C.far, j = [], N = [], F = [], I = [], R = [], z = [], ne = [], re = [], K = [], q = [];
2199
+ for (let e = 0; e < _; e++) {
2200
+ if (!w(s, e)) {
2201
+ j.push(null), N.push(null), F.push(null), I.push(null), R.push(null), z.push(null), ne.push(null), re.push(null), K.push(null), q.push(null);
1846
2202
  continue;
1847
2203
  }
1848
- let n = o ? a[s][e] : A(s, e), r = o ? i[s][e] : 0, c = I.x + g(e, b, D, E) * I.w, l = P.fraction(n), u = P.fraction(r), d = Number.isFinite(u) ? u : r <= P.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= P.min ? 0 : 1, h = I.y + I.h - m * I.h, _ = I.y + I.h - Math.max(0, Math.min(1, d)) * I.h;
1849
- C.push(t.chartType.toLowerCase().includes("area") || f ? p.project(c, h, x) : null), w.push(p.project(c, _, x)), k.push(f ? p.cameraDepth(c, h, x) : null), j.push(p.cameraDepth(c, _, x)), M.push(n), N.push(c), F.push(h), U.push(_), W.push(l), G.push(d);
2204
+ let n = c ? o[s][e] : T(s, e), i = c ? r[s][e] : 0, a = H.x + S(e, _, b, y) * H.w, l = L.fraction(n), u = L.fraction(i), d = Number.isFinite(u) ? u : i <= L.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, p = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= L.min ? 0 : 1, h = H.y + H.h - p * H.h, g = H.y + H.h - Math.max(0, Math.min(1, d)) * H.h;
2205
+ j.push(t.chartType.toLowerCase().includes("area") || f ? m.project(a, h, A) : null), N.push(m.project(a, g, A)), F.push(f ? m.cameraDepth(a, h, A) : null), I.push(m.cameraDepth(a, g, A)), R.push(n), z.push(a), ne.push(h), re.push(g), K.push(l), q.push(d);
1850
2206
  }
1851
- let K = [], q = null;
1852
- for (let e = 0; e < C.length; e++) {
1853
- let t = C[e], n = w[e];
2207
+ let ie = [], J = null;
2208
+ for (let e = 0; e < j.length; e++) {
2209
+ let t = j[e], n = N[e];
1854
2210
  if (!t || !n) {
1855
- O === "gap" && (q && K.push(q), q = null);
2211
+ x === "gap" && (J && ie.push(J), J = null);
1856
2212
  continue;
1857
2213
  }
1858
- q ??= {
2214
+ J ??= {
1859
2215
  upper: [],
1860
2216
  lower: [],
1861
2217
  upperDepths: [],
@@ -1866,369 +2222,453 @@ function et(e, t, n, r) {
1866
2222
  lowerYs: [],
1867
2223
  upperFractions: [],
1868
2224
  lowerFractions: []
1869
- }, q.upper.push(t), q.lower.push(n), q.upperDepths.push(k[e] ?? 0), q.lowerDepths.push(j[e] ?? 0), q.indices.push(e), q.sceneXs.push(N[e] ?? 0), q.upperYs.push(F[e] ?? 0), q.lowerYs.push(U[e] ?? 0), q.upperFractions.push(W[e] ?? 0), q.lowerFractions.push(G[e] ?? 0);
2225
+ }, J.upper.push(t), J.lower.push(n), J.upperDepths.push(F[e] ?? 0), J.lowerDepths.push(I[e] ?? 0), J.indices.push(e), J.sceneXs.push(z[e] ?? 0), J.upperYs.push(ne[e] ?? 0), J.lowerYs.push(re[e] ?? 0), J.upperFractions.push(K[e] ?? 0), J.lowerFractions.push(q[e] ?? 0);
1870
2226
  }
1871
- q && K.push(q);
1872
- let te = [];
1873
- if (t.chartType.toLowerCase().includes("area")) for (let t of K) {
1874
- let n = null;
1875
- for (let r = 0; r + 1 < t.upper.length; r++) {
1876
- let i = B(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
1877
- for (let a = 0; a < i.length; a++) {
1878
- let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, u = I.y + I.h - o.lowerStart * I.h, h = I.y + I.h - o.lowerEnd * I.h, g = I.y + I.h - o.upperStart * I.h, _ = I.y + I.h - o.upperEnd * I.h, v = {
1879
- ...p.project(s, g, x),
1880
- cameraDepth: p.cameraDepth(s, g, x),
1881
- cameraWeight: p.cameraProjectionWeight(s, g, x)
1882
- }, y = {
1883
- ...p.project(c, _, x),
1884
- cameraDepth: p.cameraDepth(c, _, x),
1885
- cameraWeight: p.cameraProjectionWeight(c, _, x)
1886
- };
1887
- n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 && te.push(n), n = [v, y]);
1888
- let b = Te(p, s, c, u, h, g, _, m.near, m.far, f, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
1889
- for (let t of b) {
1890
- if (l.length >= 1e4) {
1891
- d = !0;
1892
- break;
2227
+ J && ie.push(J);
2228
+ let Y = [], ae = [];
2229
+ if (t.chartType.toLowerCase().includes("area")) {
2230
+ for (let t of ie) {
2231
+ let n = null;
2232
+ for (let r = 0; r + 1 < t.upper.length; r++) {
2233
+ let i = Oe(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2234
+ for (let a = 0; a < i.length; a++) {
2235
+ 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 = H.y + H.h - o.lowerStart * H.h, u = H.y + H.h - o.lowerEnd * H.h, f = H.y + H.h - o.upperStart * H.h, h = H.y + H.h - o.upperEnd * H.h, g = {
2236
+ ...m.project(s, f, A),
2237
+ cameraDepth: m.cameraDepth(s, f, A),
2238
+ cameraWeight: m.cameraProjectionWeight(s, f, A)
2239
+ }, _ = {
2240
+ ...m.project(c, h, A),
2241
+ cameraDepth: m.cameraDepth(c, h, A),
2242
+ cameraWeight: m.cameraProjectionWeight(c, h, A)
2243
+ };
2244
+ n != null && Math.hypot(n.at(-1).x - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 && Y.push(n), n = [g, _]);
2245
+ let y = vt(m, s, c, l, u, f, h, C.near, C.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2246
+ for (let t of y) {
2247
+ if (d.length >= 1e4) {
2248
+ p = !0;
2249
+ break;
2250
+ }
2251
+ d.push({
2252
+ points: t.points,
2253
+ cameraDepth: t.cameraDepth,
2254
+ cameraDepths: t.cameraDepths,
2255
+ cameraWeights: t.cameraWeights,
2256
+ layer: 0,
2257
+ paint: () => St(e, t)
2258
+ }), ae.push(t);
1893
2259
  }
1894
- l.push({
1895
- points: t.points,
1896
- cameraDepth: t.cameraDepth,
1897
- cameraDepths: t.cameraDepths,
1898
- cameraWeights: t.cameraWeights,
1899
- layer: 0,
1900
- paint: () => ke(e, t)
1901
- });
2260
+ if (p) break;
1902
2261
  }
1903
- if (d) break;
2262
+ if (p) break;
1904
2263
  }
1905
- if (d) break;
2264
+ if (n && n.length >= 2 && Y.push(n), p) break;
1906
2265
  }
1907
- if (n && n.length >= 2 && te.push(n), d) break;
2266
+ Ct(e, ae, "fill", g.fill, a);
1908
2267
  }
1909
- let ne = [];
2268
+ let oe = [];
1910
2269
  if (!t.chartType.toLowerCase().includes("area")) {
1911
2270
  let e = [], t = null;
1912
- for (let n = 0; n < b; n++) {
1913
- let r = M[n], i = r == null ? NaN : P.fraction(r);
2271
+ for (let n = 0; n < _; n++) {
2272
+ let r = R[n], i = r == null ? NaN : L.fraction(r);
1914
2273
  if (r == null || !Number.isFinite(i)) {
1915
- O === "gap" && t && (e.push(t), t = null);
2274
+ x === "gap" && t && (e.push(t), t = null);
1916
2275
  continue;
1917
2276
  }
1918
2277
  t ??= [], t.push({
1919
- x: I.x + g(n, b, D, E) * I.w,
1920
- fraction: i
2278
+ x: H.x + S(n, _, b, y) * H.w,
2279
+ fraction: i,
2280
+ ownerIndex: n
1921
2281
  });
1922
2282
  }
1923
2283
  t && e.push(t);
1924
2284
  let n = (e) => {
1925
- let t = Math.max(0, Math.min(1, e.fraction)), n = I.y + I.h - t * I.h;
2285
+ let t = Math.max(0, Math.min(1, e.fraction)), n = H.y + H.h - t * H.h;
1926
2286
  return {
1927
- ...p.project(e.x, n, x),
1928
- cameraDepth: p.cameraDepth(e.x, n, x),
1929
- cameraWeight: p.cameraProjectionWeight(e.x, n, x)
2287
+ ...m.project(e.x, n, A),
2288
+ cameraDepth: m.cameraDepth(e.x, n, A),
2289
+ cameraWeight: m.cameraProjectionWeight(e.x, n, A)
1930
2290
  };
1931
2291
  }, r = (e) => {
1932
- e && e.path.length >= 2 && ne.push(e);
2292
+ e && e.path.length >= 2 && oe.push(e);
1933
2293
  };
1934
2294
  for (let t of e) {
1935
2295
  if (t.length < 2) continue;
1936
2296
  let e = [t[0]];
1937
2297
  for (let n = 0; n + 1 < t.length; n++) {
1938
2298
  let r = t[n - 1] ?? t[n], i = t[n], a = t[n + 1], o = t[n + 2] ?? a;
1939
- if (c.smooth !== !0 || t.length < 3) {
2299
+ if (l.smooth !== !0 || t.length < 3) {
1940
2300
  e.push(a);
1941
2301
  continue;
1942
2302
  }
1943
2303
  let s = {
1944
2304
  x: i.x + (a.x - r.x) / 6,
1945
2305
  fraction: i.fraction + (a.fraction - r.fraction) / 6
1946
- }, l = {
2306
+ }, c = {
1947
2307
  x: a.x - (o.x - i.x) / 6,
1948
2308
  fraction: a.fraction - (o.fraction - i.fraction) / 6
1949
2309
  };
1950
2310
  for (let t = 1; t <= 12; t++) {
1951
2311
  let n = t / 12, r = 1 - n;
1952
2312
  e.push({
1953
- x: r * r * r * i.x + 3 * r * r * n * s.x + 3 * r * n * n * l.x + n * n * n * a.x,
1954
- fraction: r * r * r * i.fraction + 3 * r * r * n * s.fraction + 3 * r * n * n * l.fraction + n * n * n * a.fraction
2313
+ x: r * r * r * i.x + 3 * r * r * n * s.x + 3 * r * n * n * c.x + n * n * n * a.x,
2314
+ fraction: r * r * r * i.fraction + 3 * r * r * n * s.fraction + 3 * r * n * n * c.fraction + n * n * n * a.fraction,
2315
+ ownerIndex: a.ownerIndex
1955
2316
  });
1956
2317
  }
1957
2318
  }
1958
2319
  let i = null, a = 0;
1959
2320
  for (let t = 0; t + 1 < e.length; t++) {
1960
- let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, I.y + I.h - e.fraction * I.h, x), 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) * I.h), m = z(o.fraction, s.fraction);
1961
- if (!m || m.endT - m.startT <= 1e-12) {
2321
+ let o = e[t], s = e[t + 1], c = (e) => m.project(e.x, H.y + H.h - e.fraction * H.h, A), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * H.h), p = De(o.fraction, s.fraction);
2322
+ if (!p || p.endT - p.startT <= 1e-12) {
1962
2323
  r(i), i = null, a += f;
1963
2324
  continue;
1964
2325
  }
1965
2326
  let h = (e) => ({
1966
2327
  x: o.x + (s.x - o.x) * e,
1967
- fraction: o.fraction + (s.fraction - o.fraction) * e
1968
- }), 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));
1969
- i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 ? (i.path.push(y), i.endClipped = t + 1 < e.length - 1 || m.endT < 1) : (r(i), i = {
2328
+ fraction: o.fraction + (s.fraction - o.fraction) * e,
2329
+ ownerIndex: s.ownerIndex
2330
+ }), g = c(h(p.startT)), _ = Math.hypot(g.x - l.x, g.y - l.y), v = n(h(p.startT)), y = n(h(p.endT)), b = h(p.startT), x = h(p.endT), S = (e) => ({
2331
+ x: e.x,
2332
+ y: H.y + H.h - Math.max(0, Math.min(1, e.fraction)) * H.h
2333
+ });
2334
+ 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 || p.endT < 1) : (r(i), i = {
1970
2335
  path: [v, y],
1971
- startClipped: t > 0 || m.startT > 0,
1972
- endClipped: t + 1 < e.length - 1 || m.endT < 1,
1973
- dashOffset: a + (Number.isFinite(_) ? _ : f * m.startT)
2336
+ modelPath: [S(b), S(x)],
2337
+ ownerIndex: s.ownerIndex,
2338
+ startClipped: t > 0 || p.startT > 0,
2339
+ endClipped: t + 1 < e.length - 1 || p.endT < 1,
2340
+ dashOffset: a + (Number.isFinite(_) ? _ : f * p.startT)
1974
2341
  }), a += f;
1975
2342
  }
1976
2343
  r(i);
1977
2344
  }
1978
2345
  }
1979
- let J = t.chartType.toLowerCase().includes("area"), re = c.lineHidden != null || c.lineColor != null || c.lineWidthEmu != null || c.chartexStyle?.lineHidden != null || c.chartexStyle?.lineColors?.some(Boolean) || c.chartexStyle?.lineWidthEmu != null || c.chartexStyle?.lineDash != null || c.chartexStyle?.lineCap != null || c.chartexStyle?.lineJoin != null;
1980
- if (c.lineHidden !== !0 && (!J || re)) {
1981
- let t = c.lineColor ? `#${c.lineColor}` : T(f, .7), n = c.lineWidthEmu ? Math.max(.5, c.lineWidthEmu / S) * r : J ? .75 * r : Math.max(1, 2 * r), i = y(c.chartexStyle?.lineDash ?? "solid", n), a = c.chartexStyle?.lineCap === "rnd" ? "round" : c.chartexStyle?.lineCap === "sq" ? "square" : "butt", o = c.chartexStyle?.lineJoin === "round" || c.chartexStyle?.lineJoin === "bevel" ? c.chartexStyle.lineJoin : "miter", s = (r, s, c = s, u = 0) => {
1982
- let f = se(r, {
1983
- width: n,
1984
- dash: i,
1985
- dashOffset: u,
1986
- lineCap: a,
1987
- startCap: s,
1988
- endCap: c,
1989
- lineJoin: o
1990
- });
1991
- if (f == null) {
1992
- d = !0;
2346
+ let se = t.chartType.toLowerCase().includes("area"), ce = 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;
2347
+ if (!se || g.lineFill !== null && ce) {
2348
+ let n = /* @__PURE__ */ new Map(), r = (e) => {
2349
+ let r = W[s].get(e);
2350
+ if (!ft(r)) return g;
2351
+ let i = n.get(e);
2352
+ return i || (i = dt(t, l, r, e, s), n.set(e, i)), i;
2353
+ }, o = /* @__PURE__ */ new Map(), c = {
2354
+ remaining: Fe,
2355
+ exceeded: !1
2356
+ }, u = (t, n, r, a = r, s = 0, l) => {
2357
+ if (n.lineFill === null) return;
2358
+ let u = n === g ? v : n.color, f = n.lineColor ?? X(u, .7), h = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / B) * i : se ? .75 * i : Math.max(1, 2 * i), _ = {
2359
+ width: h,
2360
+ dash: k(n.lineCustomDash, n.lineDash, h),
2361
+ dashOffset: s,
2362
+ lineCap: n.lineCap,
2363
+ startCap: r,
2364
+ endCap: a,
2365
+ lineJoin: n.lineJoin
2366
+ };
2367
+ if (!se && l && l.length >= 2) {
2368
+ let t = Ue(l.map((e) => ({
2369
+ ...e,
2370
+ cameraDepth: 0,
2371
+ cameraWeight: 1
2372
+ })), _);
2373
+ if (t == null) {
2374
+ p = !0;
2375
+ return;
2376
+ }
2377
+ let r = o.get(n) ?? [];
2378
+ for (let n of t) {
2379
+ let t = Te({
2380
+ outline: n.points,
2381
+ nearDepth: C.near,
2382
+ farDepth: C.far
2383
+ });
2384
+ if (!t) continue;
2385
+ let i = bt(m, t, f, void 0, c).map((e) => ({
2386
+ ...e,
2387
+ paintRole: "outline"
2388
+ }));
2389
+ if (c.exceeded) {
2390
+ p = !0;
2391
+ return;
2392
+ }
2393
+ r.push(...i);
2394
+ for (let t of i) d.push({
2395
+ points: t.points,
2396
+ cameraDepth: t.cameraDepth,
2397
+ cameraDepths: t.cameraDepths,
2398
+ cameraWeights: t.cameraWeights,
2399
+ layer: 1,
2400
+ paint: () => St(e, t)
2401
+ });
2402
+ }
2403
+ o.set(n, r);
1993
2404
  return;
1994
2405
  }
1995
- if (l.length + f.length > 1e4) {
1996
- d = !0;
2406
+ let y = Ue(t, _);
2407
+ if (y == null) {
2408
+ p = !0;
1997
2409
  return;
1998
2410
  }
1999
- for (let n of f) l.push({
2000
- points: n.points,
2001
- cameraDepth: n.cameraDepth,
2002
- cameraDepths: n.cameraDepths,
2003
- cameraWeights: n.cameraWeights,
2004
- layer: 1,
2005
- paint: () => Ae(e, n, t)
2006
- });
2411
+ if (d.length + y.length > 1e4) {
2412
+ p = !0;
2413
+ return;
2414
+ }
2415
+ for (let t of y) {
2416
+ let r = {
2417
+ points: t.points,
2418
+ color: f,
2419
+ paintRole: "outline",
2420
+ shade: 0,
2421
+ cameraDepth: t.cameraDepth,
2422
+ cameraDepths: t.cameraDepths,
2423
+ cameraWeights: t.cameraWeights,
2424
+ outline: !1
2425
+ }, i = o.get(n) ?? [];
2426
+ i.push(r), o.set(n, i), d.push({
2427
+ points: t.points,
2428
+ cameraDepth: t.cameraDepth,
2429
+ cameraDepths: t.cameraDepths,
2430
+ cameraWeights: t.cameraWeights,
2431
+ layer: 1,
2432
+ paint: () => St(e, r)
2433
+ });
2434
+ }
2007
2435
  };
2008
- if (J) for (let e of te) s(e, a);
2009
- else for (let e of ne) s(e.path, e.startClipped ? "butt" : a, e.endClipped ? "butt" : a, e.dashOffset);
2436
+ if (se) for (let e of Y) u(e, g, g.lineCap);
2437
+ else for (let e of oe) {
2438
+ let t = r(e.ownerIndex);
2439
+ u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2440
+ }
2441
+ for (let [t, n] of o) Ct(e, n, "outline", t.lineFill, a);
2010
2442
  }
2011
- let Y = c.dataPointOverrides?.some((e) => e.markerSymbol != null && e.markerSymbol !== "none") === !0;
2012
- if (t.chartType.toLowerCase().includes("line") && (c.showMarker === !0 || Y)) for (let t = 0; t < C.length; t++) {
2013
- let n = C[t];
2443
+ let le = (se ? l.showMarker === !0 || M(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2444
+ if ((t.chartType.toLowerCase().includes("line") || se) && (le || O(l))) for (let t = 0; t < j.length; t++) {
2445
+ let n = j[t];
2014
2446
  if (!n) continue;
2015
- let i = V[s].get(t), a = i?.markerSymbol ?? (c.showMarker === !0 ? c.markerSymbol ?? "circle" : "none");
2016
- if (a === "none") continue;
2017
- let o = i?.markerSize ?? c.markerSize ?? 5, l = i?.markerFill ?? c.markerFill ?? c.color ?? X[s % X.length], d = i?.markerLine ?? c.markerLine ?? c.lineColor ?? c.color ?? X[s % X.length], f = (i?.markerLineWidthEmu ?? c.markerLineWidthEmu) == null ? Math.max(.75, c.lineWidthEmu == null ? r : c.lineWidthEmu / S * r) : Math.max(.25, (i?.markerLineWidthEmu ?? c.markerLineWidthEmu ?? 0) / S * r);
2018
- u.push(() => Pe(e, n, a, Math.max(2, o) * r, l === "00000000" ? "transparent" : `#${l}`, `#${d}`, f));
2447
+ let r = W[s].get(t), o = P(l, r, "circle", le);
2448
+ if (o === "none") continue;
2449
+ let c = r?.markerSize ?? l.markerSize ?? 5, u = ee(l, r, t, l.color ?? $e[s % $e.length]), d = V(l, r, t), p = r?.markerLine ?? l.markerLine ?? l.lineColor ?? l.color ?? $e[s % $e.length], m = (r?.markerLineWidthEmu ?? l.markerLineWidthEmu) == null ? Math.max(.75, l.lineWidthEmu == null ? i : l.lineWidthEmu / B * i) : Math.max(.25, (r?.markerLineWidthEmu ?? l.markerLineWidthEmu ?? 0) / B * i);
2450
+ f.push(() => Dt(e, n, o, Math.max(2, c) * i, u === "00000000" ? "transparent" : `#${u}`, `#${p}`, m, d, a, i));
2019
2451
  }
2020
- for (let i = 0; i < C.length; i++) {
2021
- let a = C[i];
2022
- if (!a) continue;
2023
- let o = A(s, i), l = V[s].get(i), u = l?.markerSize ?? c.markerSize ?? 5, d = H[s].get(i);
2024
- Ie(t, c, d) && R.push(() => Fe(e, t, c, s, i, _ ? o / 100 : o, a, n, r, c.showMarker === !0 || l?.markerSymbol != null ? u * r / 2 : 0, void 0, d, "t", a, !0, t.valAxisDisplayUnits));
2452
+ for (let r = 0; r < j.length; r++) {
2453
+ let u = j[r];
2454
+ if (!u) continue;
2455
+ let d = T(s, r), f = W[s].get(r), p = f?.markerSize ?? l.markerSize ?? 5, m = G[s].get(r);
2456
+ kt(t, l, m) && te.push(() => Ot(e, t, l, s, r, h ? d / 100 : d, u, n, i, l.showMarker === !0 || f?.markerSymbol != null ? p * i / 2 : 0, void 0, m, "t", u, !0, t.valAxisDisplayUnits, L.max, c ? o[s][r] : d, a));
2025
2457
  }
2026
2458
  }
2027
- if (d) return je(e, n), !0;
2028
- for (let e of K(l)) e.paint();
2029
- for (let e of u) e();
2030
- }
2031
- Ke(e, t, p, P, b, D, E, r, a ? "horizontal" : "vertical"), $e(e, t, p, P, b, D, E, a ? "horizontal" : "vertical", r), Be(e, t, n, p, P, b, D, E, a ? "horizontal" : "vertical", r);
2032
- let U = Qe(t, p, P, b, D, E, a ? "horizontal" : "vertical"), W = (e, t) => {
2033
- if (t !== "low" && t !== "high") return U;
2034
- let n = p.topology.nearDepth, r = U.axisX, i = U.axisY;
2035
- if (e === "value" === a) {
2036
- let e = I.y, r = I.y + I.h, a = p.project(I.x + I.w / 2, e, n), o = p.project(I.x + I.w / 2, r, n), s = a.y >= o.y ? e : r;
2459
+ if (p) return wt(e, n), !0;
2460
+ for (let e of Pe(d)) e.paint();
2461
+ for (let e of f) e();
2462
+ }
2463
+ Wt(e, t, m, L, _, b, y, i, s ? "horizontal" : "vertical"), Zt(e, t, m, L, _, b, y, s ? "horizontal" : "vertical", o, i), Nt(e, t, n, m, L, _, b, y, s ? "horizontal" : "vertical", o, i);
2464
+ let ne = Xt(t, m, L, _, b, y, s ? "horizontal" : "vertical"), re = (e, t) => {
2465
+ if (t !== "low" && t !== "high") return ne;
2466
+ let n = m.topology.nearDepth, r = ne.axisX, i = ne.axisY;
2467
+ if (e === "value" === s) {
2468
+ let e = H.y, r = H.y + H.h, a = m.project(H.x + H.w / 2, e, n), o = m.project(H.x + H.w / 2, r, n), s = a.y >= o.y ? e : r;
2037
2469
  i = t === "low" ? s : s === e ? r : e;
2038
2470
  } else {
2039
- let e = I.x, i = I.x + I.w, a = p.project(e, I.y + I.h / 2, n), o = p.project(i, I.y + I.h / 2, n), s = a.x <= o.x ? e : i;
2471
+ let e = H.x, i = H.x + H.w, a = m.project(e, H.y + H.h / 2, n), o = m.project(i, H.y + H.h / 2, n), s = a.x <= o.x ? e : i;
2040
2472
  r = t === "low" ? s : s === e ? i : e;
2041
2473
  }
2042
2474
  return {
2043
2475
  axisX: r,
2044
2476
  axisY: i,
2045
2477
  depth: n,
2046
- horizontalStart: p.project(I.x, i, n),
2047
- horizontalEnd: p.project(I.x + I.w, i, n),
2048
- verticalStart: p.project(r, I.y + I.h, n),
2049
- verticalEnd: p.project(r, I.y, n)
2478
+ horizontalStart: m.project(H.x, i, n),
2479
+ horizontalEnd: m.project(H.x + H.w, i, n),
2480
+ verticalStart: m.project(r, H.y + H.h, n),
2481
+ verticalEnd: m.project(r, H.y, n)
2050
2482
  };
2051
- }, G = W("value", t.valAxisTickLabelPos), q = W("category", t.catAxisTickLabelPos), ne = f(t.valAxisFontSizeHpt, r) ?? 9 * r;
2052
- if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ne}px ${xe(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = a ? "center" : "right", e.textBaseline = a ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2053
- let { axisX: n, axisY: i, depth: o } = G, s = p.project(I.x + I.w / 2, I.y + I.h / 2, o), l = qe(a ? G.horizontalStart : G.verticalStart, a ? G.horizontalEnd : G.verticalEnd, s, a ? "vertical" : "horizontal");
2054
- 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";
2055
- let u = Ze(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), d = t.valAxisDisplayUnits?.divisor;
2056
- for (let r of P.majorTicks) {
2057
- let s = a ? p.project(I.x + P.fraction(r) * I.w, i, o) : p.project(n, I.y + I.h - P.fraction(r) * I.h, o);
2058
- e.fillText(c(_ ? r / 100 : d != null && Number.isFinite(d) && d > 0 ? r / d : r, _ ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + l.x * u, s.y + l.y * u);
2483
+ }, K = re("value", t.valAxisTickLabelPos), q = re("category", t.catAxisTickLabelPos), ie = r(t.valAxisFontSizeHpt, i) ?? 9 * i;
2484
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ie}px ${mt(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = s ? "center" : "right", e.textBaseline = s ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2485
+ let { axisX: n, axisY: r, depth: a } = K, o = m.project(H.x + H.w / 2, H.y + H.h / 2, a), c = Gt(s ? K.horizontalStart : K.verticalStart, s ? K.horizontalEnd : K.verticalEnd, o, s ? "vertical" : "horizontal");
2486
+ e.textAlign = Math.abs(c.x) < .2 ? "center" : c.x < 0 ? "right" : "left", e.textBaseline = Math.abs(c.y) < .2 ? "middle" : c.y < 0 ? "bottom" : "top";
2487
+ let l = Yt(t.valAxisMajorTickMark, t.valAxisLineHidden, i, 5), u = t.valAxisDisplayUnits?.divisor;
2488
+ for (let i of L.majorTicks) {
2489
+ let o = s ? m.project(H.x + L.fraction(i) * H.w, r, a) : m.project(n, H.y + H.h - L.fraction(i) * H.h, a);
2490
+ e.fillText(E(h ? i / 100 : u != null && Number.isFinite(u) && u > 0 ? i / u : i, h ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), o.x + c.x * l, o.y + c.y * l);
2059
2491
  }
2060
2492
  }
2061
- let J = f(t.catAxisFontSizeHpt, r) ?? 9 * r;
2062
- if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${J}px ${xe(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2063
- let n = Ze(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), i = Array.from({ length: b }, (e, n) => l(String(v[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), o = Me(t);
2064
- if (o == null && (o = 0, !a && b > 1)) {
2065
- let t = Infinity, n = null, r = q.axisY;
2066
- for (let e = 0; e < b; e++) {
2067
- let i = g(e, b, D, E), a = p.project(I.x + i * I.w, r, p.topology.nearDepth);
2493
+ let J = r(t.catAxisFontSizeHpt, i) ?? 9 * i;
2494
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${J}px ${mt(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2495
+ let n = f(Yt(t.catAxisMajorTickMark, t.catAxisLineHidden, i, 6), t.catAxisLabelOffsetPercent), r = Array.from({ length: _ }, (e, n) => z(String(g[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Tt(t);
2496
+ if (a == null && (a = 0, !s && _ > 1)) {
2497
+ let t = Infinity, n = null, i = q.axisY;
2498
+ for (let e = 0; e < _; e++) {
2499
+ let r = S(e, _, b, y), a = m.project(H.x + r * H.w, i, m.topology.nearDepth);
2068
2500
  n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
2069
2501
  }
2070
- Math.max(0, ...i.map((t) => e.measureText(t).width)) > t * .9 && (o = -Math.PI / 4);
2502
+ Math.max(0, ...r.map((t) => e.measureText(t).width)) > t * .9 && (a = -Math.PI / 4);
2071
2503
  }
2072
- let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2073
- for (let t = 0; t < b; t += s) {
2074
- let r = g(t, b, D, E), { axisX: s, axisY: c, depth: l } = q, u = a ? p.project(s, I.y + g(t, b, D, E) * I.h, l) : p.project(I.x + r * I.w, c, l);
2075
- if (a) {
2076
- let r = p.project(s, I.y + I.h / 2, l), a = p.project(I.x + I.w / 2, I.y + I.h / 2, l), o = r.x <= a.x;
2077
- e.textAlign = o ? "right" : "left", e.textBaseline = "middle", e.fillText(i[t], u.x + (o ? -n : n), u.y);
2504
+ let o = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2505
+ for (let t = 0; t < _; t += o) {
2506
+ let i = S(t, _, b, y), { axisX: o, axisY: c, depth: l } = q, u = s ? m.project(o, H.y + S(t, _, b, y) * H.h, l) : m.project(H.x + i * H.w, c, l);
2507
+ if (s) {
2508
+ let i = m.project(o, H.y + H.h / 2, l), a = m.project(H.x + H.w / 2, H.y + H.h / 2, l), s = i.x <= a.x;
2509
+ e.textAlign = s ? "right" : "left", e.textBaseline = "middle", e.fillText(r[t], u.x + (s ? -n : n), u.y);
2078
2510
  } else {
2079
- let r = p.project(I.x + I.w / 2, I.y + I.h / 2, l), s = qe(q.horizontalStart, q.horizontalEnd, r, "vertical");
2080
- Ne(e, i[t], u, o, a, s.y < 0 ? -1 : 1, n);
2511
+ let i = m.project(H.x + H.w / 2, H.y + H.h / 2, l), o = Gt(q.horizontalStart, q.horizontalEnd, i, "vertical");
2512
+ Et(e, r[t], u, a, s, o.y < 0 ? -1 : 1, n);
2081
2513
  }
2082
2514
  }
2083
2515
  }
2084
- ze(e, t, n, u, a, r);
2085
- for (let e of R) e();
2086
- return Ve(e, t, d, r), !0;
2516
+ Mt(e, t, n, u, s, i);
2517
+ for (let e of te) e();
2518
+ return Ft(e, t, d, i, !1, p, a), !0;
2087
2519
  }
2088
- function tt(e, t, n, r) {
2520
+ function $t(e, t, n, i, a) {
2089
2521
  if (!t.threeD || t.chartType !== "pie") return !1;
2090
- let i = t.series[0];
2091
- if (!i) return !0;
2092
- let a = i.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2522
+ let o = t.series[0];
2523
+ if (!o) return !0;
2524
+ let s = o.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2093
2525
  index: t,
2094
2526
  value: Math.abs(e)
2095
- }] : []), o = 0;
2096
- for (let e of a) o = Math.max(o, e.value);
2097
- if (!(o > 0)) return !0;
2098
- let s = a.reduce((e, t) => e + t.value / o, 0);
2099
- if (!(s > 0) || !Number.isFinite(s)) return !0;
2100
- let { plot: c, legend: l } = Le(e, t, n, r, "radial"), u = C({
2527
+ }] : []), c = 0;
2528
+ for (let e of s) c = Math.max(c, e.value);
2529
+ if (!(c > 0)) return !0;
2530
+ let l = s.reduce((e, t) => e + t.value / c, 0);
2531
+ if (!(l > 0) || !Number.isFinite(l)) return !0;
2532
+ let { plot: u, legend: d, legendMeasure: f } = At(e, t, n, i, "radial", a), p = ce({
2101
2533
  ...t.threeD,
2102
2534
  rotationY: t.threeD.rotationY ?? 0,
2535
+ heightPercent: void 0,
2103
2536
  depthPercent: 100
2104
- }, c, {
2537
+ }, u, {
2105
2538
  sceneDepthScale: 1,
2106
2539
  sceneHeightScale: .15
2107
2540
  });
2108
- if (!u) return !0;
2109
- let d = new Map(i.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), p = 0;
2110
- for (let e of d.values()) e.explosion != null && Number.isFinite(e.explosion) && (p = Math.max(p, Math.max(0, Math.min(100, e.explosion)) / 100));
2111
- let { scene: m } = u, h = Math.min(m.w * .45 / (1 + p), u.modelDepth * .45 / (1 + p), m.h / .45);
2112
- if (!(h > 0)) return !0;
2113
- let g = m.x + m.w / 2, _ = m.y + m.h / 2, v = .5, b = h * .3, x = 0, w = [], D = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), O = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * h / 4)));
2114
- for (let e of a) {
2115
- let n = e.value / o / s, r = Ue(t.firstSliceAngle, x, n), a = d.get(e.index), c = a?.fillHidden === !0 ? "00000000" : a?.color ?? i.dataPointColors?.[e.index] ?? i.color, l = r.middle, f = a?.explosion != null && Number.isFinite(a.explosion) ? Math.max(0, Math.min(100, a.explosion)) / 100 : 0, p = g + Math.cos(l) * h * f, m = v + Math.sin(l) * h * f / u.modelDepth, y = Math.max(2, Math.ceil(O * n)), S = R({
2116
- centerX: p,
2117
- centerY: _,
2118
- centerDepth: m,
2119
- radius: h,
2120
- modelDepth: u.modelDepth,
2121
- thickness: b,
2541
+ if (!p) return !0;
2542
+ let m = new Map(o.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
2543
+ 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));
2544
+ let { scene: g } = p, _ = Math.min(g.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), g.h / .45);
2545
+ if (!(_ > 0)) return !0;
2546
+ let v = g.x + g.w / 2, y = g.y + g.h / 2, b = .5, x = _ * .3 * pe(t.threeD), S = 0, C = [], w = new Map(o.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2547
+ for (let e of s) {
2548
+ let n = e.value / c / l, r = Lt(t.firstSliceAngle, S, n), i = m.get(e.index), a = dt(t, 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 = v + Math.cos(s) * _ * u, f = b + Math.sin(s) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = Ee({
2549
+ centerX: d,
2550
+ centerY: y,
2551
+ centerDepth: f,
2552
+ radius: _,
2553
+ modelDepth: p.modelDepth,
2554
+ thickness: x,
2122
2555
  startAngle: r.start,
2123
2556
  endAngle: r.end,
2124
- segments: y
2557
+ segments: h
2125
2558
  });
2126
- if (!S) {
2127
- x += n;
2559
+ if (!g) {
2560
+ S += n;
2128
2561
  continue;
2129
2562
  }
2130
- w.push({
2563
+ C.push({
2131
2564
  index: e.index,
2132
2565
  start: r.start,
2133
2566
  end: r.end,
2134
- color: c === "00000000" ? "transparent" : c ? `#${c}` : ve(e.index),
2567
+ color: a.fill === null ? "transparent" : a.color,
2568
+ fillPaint: a.fill,
2135
2569
  value: e.value,
2136
2570
  percentValue: n,
2137
- centerX: p,
2138
- centerDepth: m,
2139
- segments: y,
2140
- mesh: S,
2141
- lineHidden: a?.lineHidden ?? i.lineHidden ?? !1,
2142
- lineColor: a?.lineColor ?? i.lineColor ?? null,
2143
- lineWidthEmu: a?.lineWidthEmu ?? i.lineWidthEmu ?? null,
2144
- lineDash: a?.lineDash ?? i.chartexStyle?.lineDash ?? "solid",
2145
- lineCap: i.chartexStyle?.lineCap === "rnd" ? "round" : i.chartexStyle?.lineCap === "sq" ? "square" : "butt",
2146
- lineJoin: i.chartexStyle?.lineJoin === "round" || i.chartexStyle?.lineJoin === "bevel" ? i.chartexStyle.lineJoin : "miter"
2147
- }), x += n;
2148
- }
2149
- u = E(u, w.flatMap((e) => e.mesh.vertices), c, .08);
2150
- let A = [], j = {
2151
- remaining: te,
2571
+ centerX: d,
2572
+ centerDepth: f,
2573
+ segments: h,
2574
+ mesh: g,
2575
+ lineColor: a.lineColor,
2576
+ lineFill: a.lineFill,
2577
+ lineWidthEmu: a.lineWidthEmu ?? null,
2578
+ lineDash: a.lineDash ?? "solid",
2579
+ lineCustomDash: a.lineCustomDash,
2580
+ lineCap: a.lineCap,
2581
+ lineJoin: a.lineJoin
2582
+ }), S += n;
2583
+ }
2584
+ p = he(p, C.flatMap((e) => e.mesh.vertices), u, .08);
2585
+ let E = [], D = {
2586
+ remaining: Fe,
2152
2587
  exceeded: !1
2153
- }, M = (e) => {
2154
- let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / S * r);
2155
- return !e.lineHidden && e.lineColor ? {
2156
- color: `#${e.lineColor}`,
2588
+ }, O = (e) => {
2589
+ let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / B * i);
2590
+ return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
2591
+ color: e.lineColor ?? "rgba(0,0,0,0.42)",
2157
2592
  width: t,
2158
- dash: y(e.lineDash, t),
2593
+ dash: k(e.lineCustomDash, e.lineDash, t),
2159
2594
  cap: e.lineCap,
2160
2595
  join: e.lineJoin
2161
2596
  } : void 0;
2162
- }, N = w.flatMap((e) => De(u, e.mesh, e.color, void 0, j)), P = [], F = w.map(M), I = F[0], L = (e) => e == null ? null : [
2597
+ }, A = C.flatMap((t) => {
2598
+ let n = bt(p, t.mesh, t.color, void 0, D);
2599
+ return Ct(e, n, "fill", t.fillPaint, a), n;
2600
+ }), j = [], M = C.map(O), N = M[0], P = (e) => e == null ? null : [
2163
2601
  e.color,
2164
2602
  e.width,
2165
2603
  e.dash.join(","),
2166
2604
  e.cap,
2167
2605
  e.join
2168
- ].join("|"), z = I != null && F.every((e) => L(e) === L(I)) && w.every((e) => Math.abs(e.centerX - g) < 1e-9 && Math.abs(e.centerDepth - v) < 1e-9);
2169
- if (z) P.push(...Oe(u, w, _, h, b, I, j));
2170
- else for (let e = 0; e < w.length; e++) {
2171
- let t = F[e];
2172
- t && P.push(...De(u, w[e].mesh, "transparent", t, j, !0));
2173
- }
2174
- if (j.exceeded) return je(e, n), !0;
2175
- if (z) {
2176
- for (let t of K(N)) ke(e, t);
2177
- for (let t of K(P)) ke(e, t);
2178
- } else for (let t of K([...N, ...P])) ke(e, t);
2179
- for (let n of w) {
2180
- let a = (n.start + n.end) / 2, o = D.get(n.index);
2181
- if (Ie(t, i, o)) {
2182
- let s = i.seriesDataLabels, l = f(o?.fontSizeHpt ?? s?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2183
- e.font = `${o?.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${Z(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace)}`;
2184
- let d = ee({
2185
- customText: o?.text,
2186
- showCategory: o?.showCatName ?? s?.showCatName ?? !1,
2187
- showSeries: o?.showSerName ?? s?.showSerName ?? !1,
2188
- showValue: o?.showVal ?? s?.showVal ?? t.showDataLabels,
2189
- showPercent: o?.showPercent ?? s?.showPercent ?? !1,
2190
- category: i.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2191
- seriesName: i.name || "Series 1",
2606
+ ].join("|"), F = N != null && C.every((e) => e.lineFill === void 0) && M.every((e) => P(e) === P(N)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2607
+ if (F) j.push(...xt(p, C, y, _, x, N, D));
2608
+ else for (let t = 0; t < C.length; t++) {
2609
+ let n = M[t];
2610
+ if (!n) continue;
2611
+ let r = bt(p, C[t].mesh, "transparent", n, D, !0);
2612
+ Ct(e, r, "outline", C[t].lineFill, a), j.push(...r);
2613
+ }
2614
+ if (D.exceeded) return wt(e, n), !0;
2615
+ if (F) {
2616
+ for (let t of Pe(A)) St(e, t);
2617
+ for (let t of Pe(j)) St(e, t);
2618
+ } else for (let t of Pe([...A, ...j])) St(e, t);
2619
+ for (let n of C) {
2620
+ let s = (n.start + n.end) / 2, c = w.get(n.index);
2621
+ if (kt(t, o, c)) {
2622
+ let l = o.seriesDataLabels, d = r(c?.fontSizeHpt ?? l?.fontSizeHpt ?? t.dataLabelFontSizeHpt, i) ?? 9 * i;
2623
+ e.font = `${c?.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${d}px ${$(t, c?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace)}`;
2624
+ let f = ue({
2625
+ customText: c?.text,
2626
+ showCategory: c?.showCatName ?? l?.showCatName ?? !1,
2627
+ showSeries: c?.showSerName ?? l?.showSerName ?? !1,
2628
+ showValue: c?.showVal ?? l?.showVal ?? t.showDataLabels,
2629
+ showPercent: c?.showPercent ?? l?.showPercent ?? !1,
2630
+ category: o.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2631
+ seriesName: o.name || "Series 1",
2192
2632
  sourceValue: n.value,
2193
2633
  percentRatio: n.percentValue,
2194
- formatCode: o?.formatCode ?? s?.formatCode ?? t.dataLabelFormatCode ?? i.valFormatCode,
2195
- separator: o?.separator ?? s?.separator,
2634
+ formatCode: c?.formatCode ?? l?.formatCode ?? t.dataLabelFormatCode ?? o.valFormatCode,
2635
+ separator: c?.separator ?? l?.separator,
2196
2636
  date1904: t.date1904
2197
- }), p = Z(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace), m = o?.text && o.richRuns?.length ? k(e, {
2198
- runs: o.richRuns,
2199
- ptToPx: r,
2200
- fontFamily: p,
2201
- fallbackBold: o.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ?? !1,
2202
- fontFamilyForFace: (e) => Z(t, e)
2203
- }, l, `#${o.fontColor ?? s?.fontColor ?? i.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = o?.position ?? s?.position ?? t.dataLabelPosition, v = _ - b / 2, y = _ + b / 2, x = u.cameraDepth(n.centerX, v, n.centerDepth) >= u.cameraDepth(n.centerX, y, n.centerDepth) ? v : y, S = 0, C = null;
2637
+ }), m = $(t, c?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace), h = c?.text && c.richRuns?.length ? oe(e, {
2638
+ runs: c.richRuns,
2639
+ ptToPx: i,
2640
+ fontFamily: m,
2641
+ fallbackBold: c.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ?? !1,
2642
+ fontFamilyForFace: (e) => $(t, e)
2643
+ }, d, `#${c.fontColor ?? l?.fontColor ?? o.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = c?.position ?? l?.position ?? t.dataLabelPosition, v = y - x / 2, b = y + x / 2, S = p.cameraDepth(n.centerX, v, n.centerDepth) >= p.cameraDepth(n.centerX, b, n.centerDepth) ? v : b, C = 0, w = null;
2204
2644
  for (let e = 0; e <= 12; e++) {
2205
- let t = n.start + (n.end - n.start) * e / 12, r = u.project(n.centerX + Math.cos(t) * h * .64, x, n.centerDepth + Math.sin(t) * h * .64 / u.modelDepth);
2206
- C && (S += Math.hypot(r.x - C.x, r.y - C.y)), C = r;
2645
+ let t = n.start + (n.end - n.start) * e / 12, r = p.project(n.centerX + Math.cos(t) * _ * .64, S, n.centerDepth + Math.sin(t) * _ * .64 / p.modelDepth);
2646
+ w && (C += Math.hypot(r.x - w.x, r.y - w.y)), w = r;
2207
2647
  }
2208
- let w = (g == null || g === "bestFit") && (n.percentValue === 0 || S < (m?.width ?? e.measureText(d).width)) || g === "outEnd", T = h * (w ? 1.12 : .64), E = u.project(n.centerX + Math.cos(a) * T, x, n.centerDepth + Math.sin(a) * T / u.modelDepth), D = u.project(n.centerX + Math.cos(a) * h, x, n.centerDepth + Math.sin(a) * h / u.modelDepth);
2209
- A.push(() => Fe(e, t, i, 0, n.index, n.value, E, c, r, 0, n.percentValue, o, "ctr", D, w));
2648
+ let T = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (h?.width ?? e.measureText(f).width)) || g === "outEnd", D = _ * (T ? 1.12 : .64), O = p.project(n.centerX + Math.cos(s) * D, S, n.centerDepth + Math.sin(s) * D / p.modelDepth), k = p.project(n.centerX + Math.cos(s) * _, S, n.centerDepth + Math.sin(s) * _ / p.modelDepth);
2649
+ E.push(() => Ot(e, t, o, 0, n.index, n.value, O, u, i, 0, n.percentValue, c, "ctr", k, T, void 0, void 0, void 0, a));
2210
2650
  }
2211
2651
  }
2212
- for (let e of A) e();
2213
- let B = i.categories?.length ? i.categories : t.categories, V = Array.from({ length: B.length }, (e, t) => {
2214
- let n = d.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? i.dataPointColors?.[t] ?? i.color;
2215
- return r === "00000000" ? "00000000" : T(r ? `#${r}` : ve(t), .8).replace(/^#/, "");
2652
+ for (let e of E) e();
2653
+ let I = o.categories?.length ? o.categories : t.categories, L = Array.from({ length: I.length }, (e, t) => {
2654
+ let n = m.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? o.dataPointColors?.[t] ?? o.color;
2655
+ return r === "00000000" ? "00000000" : X(r ? `#${r}` : at(t), .8).replace(/^#/, "");
2216
2656
  });
2217
- return Ve(e, {
2657
+ return Ft(e, {
2218
2658
  ...t,
2219
- categories: B,
2659
+ categories: I,
2220
2660
  series: [{
2221
- ...i,
2222
- categories: B,
2223
- dataPointColors: V
2661
+ ...o,
2662
+ categories: I,
2663
+ dataPointColors: L
2224
2664
  }]
2225
- }, l, r, !0), !0;
2665
+ }, d, i, !0, f, a), !0;
2226
2666
  }
2227
- function nt(e, t, n, r) {
2228
- return t.threeD ? tt(e, t, n, r) ? !0 : he.has(t.chartType) ? et(e, t, n, r) : !1 : !1;
2667
+ function en(e, t, n, r, i = 0) {
2668
+ return !t.threeD || !(t.chartType === "pie" || nt.has(t.chartType)) ? !1 : lt(t) ? $t(e, t, n, r, i) ? !0 : Qt(e, t, n, r, i) : (wt(e, n), !0);
2229
2669
  }
2230
2670
  //#endregion
2231
2671
  //#region src/three-d.ts
2232
- var rt = A({ render: nt }, "threeD");
2672
+ var tn = _e({ render: en }, "threeD");
2233
2673
  //#endregion
2234
- export { rt as threeD };
2674
+ export { tn as threeD };