@sheetxl/react 0.8.0-beta.11 → 0.8.0-beta.12

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 (116) hide show
  1. package/browser/esm/{94dxo1A-z8lgiiGw.mjs → B4mT3G7GHwgDYFGP.mjs} +2 -2
  2. package/browser/esm/{B26QVfjer2oY2ewK.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
  3. package/browser/esm/{CRi6DQ3UXmPEv-w_.mjs → BR-AiOwuQlYh5-tr.mjs} +147 -146
  4. package/browser/esm/{ClAtIfYbsUPA073B.mjs → BapujiblfiXDlu67.mjs} +1 -1
  5. package/browser/esm/{D2u6THGErqw64KQI.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
  6. package/browser/esm/{Bl2BFCQ00fotauKB.mjs → CUekkfE6uwwsdQpc.mjs} +1 -1
  7. package/browser/esm/{DgL7Dy-Lqcr1TvW6.mjs → C_LUq-BnguetvGZz.mjs} +4851 -4818
  8. package/browser/esm/{BQYS2Yf-EAV_tBLr.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
  9. package/browser/esm/{1-LEUre9ZLG0OYYB.mjs → Cslk_qRdBSuJIi1O.mjs} +6 -6
  10. package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
  11. package/browser/esm/{BegvsXeRs7e-9t8k.mjs → D22NJmTiky4NL8tM.mjs} +1 -1
  12. package/browser/esm/{B93LSmhnvkxNXTq-.mjs → D2GydDzPuvIjdpok.mjs} +1 -1
  13. package/browser/esm/{CzRIbc-Lk__VMLKM.mjs → DGG1auUKsjFbAazu.mjs} +3 -3
  14. package/browser/esm/{Bos4Rkp8UTF7QXUB.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
  15. package/browser/esm/{Dnh1kpz3v1JKtRD_.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
  16. package/browser/esm/{cQ6xdPFkEcuDlNTN.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
  17. package/browser/esm/{DS66lAIM-9M-YoZQ.mjs → DxEczXCHTerDemDP.mjs} +112 -104
  18. package/browser/esm/{C1pc9F4Rt2C5FKUo.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
  19. package/browser/esm/{CPnnESfZz2jjJd82.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
  20. package/browser/esm/{DMdsMPT0fWBbTkNn.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
  21. package/browser/esm/chart.mjs +28 -27
  22. package/browser/esm/control.mjs +2 -2
  23. package/browser/esm/group.mjs +3 -3
  24. package/browser/esm/index.mjs +5750 -5089
  25. package/browser/esm/note.mjs +4 -4
  26. package/browser/esm/picture.mjs +41 -41
  27. package/browser/esm/shape.mjs +2 -2
  28. package/browser/esm/slicer.mjs +4 -4
  29. package/node/esm/{BaRfst1euuhquupX.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
  30. package/node/esm/{b-XRVRI1fYQQMkTC.mjs → Bi2Jwc0zpweaNzKc.mjs} +525 -492
  31. package/node/esm/{D_pCpfdQowV_4Aje.mjs → C0KLMCRb3sbd5Q20.mjs} +5 -5
  32. package/node/esm/{sigD1UFqvPlWUw_9.mjs → CH1DVfFhjdd_3pw1.mjs} +2 -2
  33. package/node/esm/{Be9c1GwQkPo8Piuh.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
  34. package/node/esm/{BiaDWnN3tT7neoRL.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
  35. package/node/esm/{DgGEHydEjD7nfsDB.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
  36. package/node/esm/{BlxXufqBBg1PtsXd.mjs → CzN6c6KyxVmNvayz.mjs} +1 -1
  37. package/node/esm/{6zApGj9DozhFy-bx.mjs → DKqdv5JubgVaq-g9.mjs} +1 -1
  38. package/node/esm/{umljAT66yb3_rURh.mjs → DWkPWuf5ZrLRMixG.mjs} +118 -110
  39. package/node/esm/{JiQGhLkoL8CJpVvA.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
  40. package/node/esm/{DTMTIrYIK1eZswsM.mjs → DayGI0Bt57FDNbVF.mjs} +1 -1
  41. package/node/esm/{C_SNx7TlFEcwbYjx.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
  42. package/node/esm/{Dj5FM7_-YWhCtCCt.mjs → MWges5ywL3aEdChp.mjs} +1 -1
  43. package/node/esm/{BMVK5plvmBOAIlxP.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
  44. package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
  45. package/node/esm/{DxQZmb-j4NLUO9Af.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
  46. package/node/esm/chart.mjs +26 -25
  47. package/node/esm/control.mjs +2 -2
  48. package/node/esm/group.mjs +3 -3
  49. package/node/esm/{gpD-9LDW92phhoma.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
  50. package/node/esm/index.mjs +7658 -6996
  51. package/node/esm/note.mjs +4 -4
  52. package/node/esm/picture.mjs +41 -41
  53. package/node/esm/shape.mjs +50 -49
  54. package/node/esm/slicer.mjs +4 -4
  55. package/package.json +7 -7
  56. package/resources/locales/de/sheet.cmd.json +21 -0
  57. package/resources/locales/de/workbook.cmd.json +6 -0
  58. package/resources/locales/en/sheet.cmd.json +21 -0
  59. package/resources/locales/en/ui.msg.json +2 -0
  60. package/resources/locales/en/workbook.cmd.json +6 -0
  61. package/types/src/border/useBorders.d.ts +2 -2
  62. package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
  63. package/types/src/cell/CellContent.d.ts +68 -0
  64. package/types/src/cell/CellControlContext.d.ts +37 -0
  65. package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +5 -5
  66. package/types/src/cell/CellImageRenderer.d.ts +11 -0
  67. package/types/src/cell/CellRenderers.d.ts +190 -0
  68. package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
  69. package/types/src/cell/ColumnButton.d.ts +3 -3
  70. package/types/src/cell/OutlineButton.d.ts +4 -4
  71. package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
  72. package/types/src/cell/index.d.ts +8 -2
  73. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  74. package/types/src/cell/useInsertableCellControls.d.ts +25 -0
  75. package/types/src/chart/ChartEditor.d.ts +2 -0
  76. package/types/src/chart/ChartElement.d.ts +14 -3
  77. package/types/src/chart/paint/_mode.d.ts +6 -0
  78. package/types/src/chart/paint/echarts.d.ts +5 -2
  79. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +8 -0
  80. package/types/src/chart/paint/toEChartsOption.d.ts +11 -0
  81. package/types/src/editableLabel/EditableLabel.d.ts +3 -1
  82. package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
  83. package/types/src/editor/useFormulaHints.d.ts +1 -1
  84. package/types/src/layer/CellErrorLayer.d.ts +3 -2
  85. package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
  86. package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
  87. package/types/src/layer/HyperlinkLayer.d.ts +8 -5
  88. package/types/src/layer/ProtectionLayer.d.ts +1 -2
  89. package/types/src/layer/SheetCellLayer.d.ts +11 -4
  90. package/types/src/layer/SheetMovableLayer.d.ts +2 -1
  91. package/types/src/layer/SheetOutlineLayer.d.ts +1 -1
  92. package/types/src/layer/TableLayer.d.ts +1 -1
  93. package/types/src/layer/TableToolbar.d.ts +1 -1
  94. package/types/src/layer/ValidationPromptLayer.d.ts +16 -4
  95. package/types/src/layer/index.d.ts +1 -0
  96. package/types/src/listener/useRangeListener.d.ts +13 -7
  97. package/types/src/movable/DefaultMovable.d.ts +1 -1
  98. package/types/src/movable/MovableControl.d.ts +3 -1
  99. package/types/src/movable/MovableFrame.d.ts +2 -1
  100. package/types/src/movable/MovableLayer.d.ts +6 -3
  101. package/types/src/sheet/ISheetHeaderElement.d.ts +2 -2
  102. package/types/src/sheet/IWorksheetElement.d.ts +21 -22
  103. package/types/src/sheet/SheetCommandProvider.d.ts +3 -0
  104. package/types/src/sheet/SheetOutlineElement.d.ts +2 -2
  105. package/types/src/sheet/SheetPanels.d.ts +2 -2
  106. package/types/src/tabStrip/Sortable.d.ts +5 -5
  107. package/types/src/tabStrip/TabStrip.d.ts +6 -6
  108. package/types/src/tabStrip/TabStripItem.d.ts +15 -13
  109. package/types/src/taskPane/CellControlPane.d.ts +17 -0
  110. package/types/src/taskPane/index.d.ts +1 -0
  111. package/types/src/taskPane/useTaskPane.d.ts +6 -3
  112. package/types/src/workbook/DefaultRenderers.d.ts +4 -4
  113. package/types/src/workbook/IWorkbookElement.d.ts +52 -20
  114. package/types/src/workbook/WorkbookStrip.d.ts +5 -5
  115. package/browser/esm/ugfE7YeZALQURDKF.mjs +0 -241
  116. package/node/esm/DJPgbB1X22YmhbaR.mjs +0 -242
@@ -1,16 +1,16 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./6zApGj9DozhFy-bx.mjs";
8
- import { IFill as t, IStroke as i } from "@sheetxl/sdk";
9
- import * as s from "echarts/core";
10
- import { BarChart as r, LineChart as n, PieChart as l } from "echarts/charts";
11
- import { GraphicComponent as o, GridComponent as a, LegendComponent as p, TitleComponent as h, TooltipComponent as c } from "echarts/components";
12
- import { SVGRenderer as d } from "echarts/renderers";
13
- var y = {
7
+ import { t as e } from "./DKqdv5JubgVaq-g9.mjs";
8
+ import { Color as t, IFill as i, IStroke as r, PaintUtils as s } from "@sheetxl/sdk";
9
+ import * as n from "echarts/core";
10
+ import { BarChart as o, LineChart as l, PieChart as a } from "echarts/charts";
11
+ import { GraphicComponent as p, GridComponent as h, LegendComponent as c, TitleComponent as d, TooltipComponent as y } from "echarts/components";
12
+ import { SVGRenderer as f } from "echarts/renderers";
13
+ var u = {
14
14
  pct5: "0040000000040000",
15
15
  pct10: "0004004000040040",
16
16
  pct20: "0044001100440011",
@@ -59,90 +59,90 @@ var y = {
59
59
  divot: "8000040804008040",
60
60
  shingle: "8160100808182442",
61
61
  wave: "0600C0290600C029"
62
- }, f = (e) => {
63
- const t = e ? y[e] : void 0;
62
+ }, g = (e) => {
63
+ const t = e ? u[e] : void 0;
64
64
  if (!t) return null;
65
65
  const i = [];
66
66
  for (let e = 0; e < 8; e++) {
67
- const s = parseInt(t.slice(2 * e, 2 * e + 2), 16);
68
- i.push(Array.from({ length: 8 }, (e, t) => !!(s & 128 >> t)));
67
+ const r = parseInt(t.slice(2 * e, 2 * e + 2), 16);
68
+ i.push(Array.from({ length: 8 }, (e, t) => !!(r & 128 >> t)));
69
69
  }
70
70
  return i;
71
- }, u = (e, t, i) => {
72
- let s = "";
71
+ }, x = (e, t, i) => {
72
+ let r = "";
73
73
  e.forEach((e, t) => e.forEach((e, i) => {
74
- e && (s += `M${i} ${t}h1v1h-1z`);
74
+ e && (r += `M${i} ${t}h1v1h-1z`);
75
75
  }));
76
- return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" shape-rendering="crispEdges"><rect width="8" height="8" fill="${i}"/><path d="${s}" fill="${t}"/></svg>`)}`;
77
- }, g = (e) => Math.max(0, Math.min(1, e ?? 0)), x = (e) => {
78
- const i = ((e) => {
76
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" shape-rendering="crispEdges"><rect width="8" height="8" fill="${i}"/><path d="${r}" fill="${t}"/></svg>`)}`;
77
+ }, m = (e) => Math.max(0, Math.min(1, e ?? 0)), b = (e) => {
78
+ const t = ((e) => {
79
79
  const t = e.stops ?? [], i = Math.max(1, t.length - 1);
80
80
  return t.map((e, t) => ({
81
- offset: g("object" == typeof e && "number" == typeof e.offset ? e.offset : t / i),
81
+ offset: m("object" == typeof e && "number" == typeof e.offset ? e.offset : t / i),
82
82
  color: "string" == typeof e ? e : String(e.color)
83
83
  })).sort((e, t) => e.offset - t.offset);
84
84
  })(e);
85
- if ((e.gradientType ?? t.GradientType.Linear) === t.GradientType.Linear) {
86
- const t = ((e.angle ?? 90) - 90) % 360 * Math.PI / 180, s = Math.cos(t), r = Math.sin(t), n = (Math.abs(s) + Math.abs(r)) / 2, l = (e) => Math.round(1e9 * e) / 1e9;
85
+ if ((e.gradientType ?? i.GradientType.Linear) === i.GradientType.Linear) {
86
+ const i = ((e.angle ?? 90) - 90) % 360 * Math.PI / 180, r = Math.cos(i), s = Math.sin(i), n = (Math.abs(r) + Math.abs(s)) / 2, o = (e) => Math.round(1e9 * e) / 1e9;
87
87
  return {
88
88
  type: "linear",
89
- x: l(.5 - s * n),
90
- y: l(.5 - r * n),
91
- x2: l(.5 + s * n),
92
- y2: l(.5 + r * n),
93
- colorStops: i,
89
+ x: o(.5 - r * n),
90
+ y: o(.5 - s * n),
91
+ x2: o(.5 + r * n),
92
+ y2: o(.5 + s * n),
93
+ colorStops: t,
94
94
  global: !1
95
95
  };
96
96
  }
97
- const s = e.focus, r = (g(s?.left) + g(s?.right ?? s?.left)) / 2, n = (g(s?.top) + g(s?.bottom ?? s?.top)) / 2;
97
+ const r = e.focus, s = (m(r?.left) + m(r?.right ?? r?.left)) / 2, n = (m(r?.top) + m(r?.bottom ?? r?.top)) / 2;
98
98
  return {
99
99
  type: "radial",
100
- x: r,
100
+ x: s,
101
101
  y: n,
102
- r: Math.hypot(Math.max(r, 1 - r), Math.max(n, 1 - n)),
103
- colorStops: i,
102
+ r: Math.hypot(Math.max(s, 1 - s), Math.max(n, 1 - n)),
103
+ colorStops: t,
104
104
  global: !1
105
105
  };
106
- }, m = (e, i = "transparent") => {
107
- if (!e) return i;
106
+ }, k = (e, t = "transparent") => {
107
+ if (!e) return t;
108
108
  switch (e.type) {
109
- case t.Type.Solid: return e.color ?? i;
110
- case t.Type.Gradient: return (e.stops?.length ?? 0) > 0 ? x(e) : i;
111
- case t.Type.Pattern: {
109
+ case i.Type.Solid: return e.color ?? t;
110
+ case i.Type.Gradient: return (e.stops?.length ?? 0) > 0 ? b(e) : t;
111
+ case i.Type.Pattern: {
112
112
  const t = String(e.foreground ?? "#000000"), i = String(e.background ?? "#FFFFFF");
113
113
  return {
114
- image: u(f(e.patternType) ?? f("pct50"), t, i),
114
+ image: x(g(e.patternType) ?? g("pct50"), t, i),
115
115
  repeat: "repeat",
116
116
  imageWidth: 8,
117
117
  imageHeight: 8
118
118
  };
119
119
  }
120
- default: return i;
120
+ default: return t;
121
121
  }
122
- }, b = (e) => e?.width ?? 0, k = (e) => i.toDashLengths(e.dash)?.map((t) => t * b(e)), w = (e) => e.font?.family ?? "Calibri", A = (e) => (e.weight ?? 400) >= 600, v = (e) => "italic" === e.style, F = (e) => e.size ?? 0, z = (e) => "string" == typeof e.color ? e.color : m(e.color, "#000000"), C = (e) => ({
123
- fontFamily: w(e),
124
- fontSize: F(e),
125
- color: z(e),
126
- fontWeight: A(e) ? "bold" : "normal",
127
- fontStyle: v(e) ? "italic" : "normal"
128
- }), M = (e, t = F(e)) => {
129
- return `${v(e) ? "italic " : ""}${A(e) ? "bold " : ""}${t}px ${i = w(e), i.includes(" ") ? `'${i}'` : i}`;
122
+ }, w = (e) => e?.width ?? 0, A = (e) => r.toDashLengths(e.dash)?.map((t) => t * w(e)), v = (e) => e.font?.family ?? "Calibri", F = (e) => (e.weight ?? 400) >= 600, z = (e) => "italic" === e.style, C = (e) => e.size ?? 0, M = (e) => "string" == typeof e.color ? e.color : k(e.color, "#000000"), S = (e) => ({
123
+ fontFamily: v(e),
124
+ fontSize: C(e),
125
+ color: M(e),
126
+ fontWeight: F(e) ? "bold" : "normal",
127
+ fontStyle: z(e) ? "italic" : "normal"
128
+ }), L = (e, t = C(e)) => {
129
+ return `${z(e) ? "italic " : ""}${F(e) ? "bold " : ""}${t}px ${i = v(e), i.includes(" ") ? `'${i}'` : i}`;
130
130
  var i;
131
- }, S = (e) => e ? {
132
- stroke: m(e.fill, "none"),
133
- lineWidth: b(e),
131
+ }, B = (e) => e ? {
132
+ stroke: k(e.fill, "none"),
133
+ lineWidth: w(e),
134
134
  lineCap: e.lineCap ?? "butt",
135
- lineDash: k(e)
135
+ lineDash: A(e)
136
136
  } : {
137
137
  stroke: "none",
138
138
  lineWidth: 0
139
- }, L = (e) => e ? {
140
- color: m(e.fill),
141
- width: b(e),
139
+ }, I = (e) => e ? {
140
+ color: k(e.fill),
141
+ width: w(e),
142
142
  cap: e.lineCap ?? "butt",
143
143
  join: "round",
144
- type: k(e) ?? "solid"
145
- } : { width: 0 }, B = {
144
+ type: A(e) ?? "solid"
145
+ } : { width: 0 }, E = {
146
146
  x: [[
147
147
  0,
148
148
  0,
@@ -185,10 +185,10 @@ var y = {
185
185
  1,
186
186
  .5
187
187
  ]]
188
- }, I = (e) => {
189
- const t = e.size, i = b(e.stroke), s = B[e.symbol];
190
- if (s) return {
191
- symbol: "path://" + s.map(([e, t, i, s]) => `M${e} ${t}L${i} ${s}`).join(""),
188
+ }, $ = (e) => {
189
+ const t = e.size, i = w(e.stroke), r = E[e.symbol];
190
+ if (r) return {
191
+ symbol: "path://" + r.map(([e, t, i, r]) => `M${e} ${t}L${i} ${r}`).join(""),
192
192
  symbolSize: t
193
193
  };
194
194
  switch (e.symbol) {
@@ -218,145 +218,145 @@ var y = {
218
218
  symbolSize: t
219
219
  };
220
220
  }
221
- }, E = (e) => e && B[e.symbol] && e.fill ? e.fill : null, $ = (e, t, i, s) => {
222
- const r = e.size, n = r / 2, l = {
223
- fill: m(e.fill),
224
- ...S(e.stroke)
225
- }, o = B[e.symbol];
226
- if (o) {
227
- const l = E(e);
228
- return [...l ? [{
221
+ }, D = (e) => e && E[e.symbol] && e.fill ? e.fill : null, W = (e, t, i, r) => {
222
+ const s = e.size, n = s / 2, o = {
223
+ fill: k(e.fill),
224
+ ...B(e.stroke)
225
+ }, l = E[e.symbol];
226
+ if (l) {
227
+ const o = D(e);
228
+ return [...o ? [{
229
229
  type: "rect",
230
230
  silent: !0,
231
- z: s,
231
+ z: r,
232
232
  shape: {
233
233
  x: t - n,
234
234
  y: i - n,
235
- width: r,
236
- height: r
235
+ width: s,
236
+ height: s
237
237
  },
238
- style: { fill: m(l) }
239
- }] : [], ...o.map(([l, o, a, p]) => ({
238
+ style: { fill: k(o) }
239
+ }] : [], ...l.map(([o, l, a, p]) => ({
240
240
  type: "line",
241
241
  silent: !0,
242
- z: s,
242
+ z: r,
243
243
  shape: {
244
- x1: t - n + l * r,
245
- y1: i - n + o * r,
246
- x2: t - n + a * r,
247
- y2: i - n + p * r
244
+ x1: t - n + o * s,
245
+ y1: i - n + l * s,
246
+ x2: t - n + a * s,
247
+ y2: i - n + p * s
248
248
  },
249
- style: S(e.stroke)
249
+ style: B(e.stroke)
250
250
  }))];
251
251
  }
252
- const a = b(e.stroke), p = r - a, h = r / 5 - a;
252
+ const a = w(e.stroke), p = s - a, h = s / 5 - a;
253
253
  switch (e.symbol) {
254
254
  case "circle": return [{
255
255
  type: "circle",
256
256
  silent: !0,
257
- z: s,
257
+ z: r,
258
258
  shape: {
259
259
  cx: t,
260
260
  cy: i,
261
261
  r: p / 2
262
262
  },
263
- style: l
263
+ style: o
264
264
  }];
265
265
  case "square": return [{
266
266
  type: "rect",
267
267
  silent: !0,
268
- z: s,
268
+ z: r,
269
269
  shape: {
270
270
  x: t - p / 2,
271
271
  y: i - p / 2,
272
272
  width: p,
273
273
  height: p
274
274
  },
275
- style: l
275
+ style: o
276
276
  }];
277
277
  case "dash": return [{
278
278
  type: "rect",
279
279
  silent: !0,
280
- z: s,
280
+ z: r,
281
281
  shape: {
282
282
  x: t - p / 2,
283
283
  y: i - h / 2,
284
284
  width: p,
285
285
  height: h
286
286
  },
287
- style: l
287
+ style: o
288
288
  }];
289
289
  case "dot": return [{
290
290
  type: "rect",
291
291
  silent: !0,
292
- z: s,
292
+ z: r,
293
293
  shape: {
294
294
  x: t,
295
295
  y: i - h / 2,
296
296
  width: n,
297
297
  height: h
298
298
  },
299
- style: l
299
+ style: o
300
300
  }];
301
301
  case "triangle": return [{
302
302
  type: "polygon",
303
303
  silent: !0,
304
- z: s,
304
+ z: r,
305
305
  shape: { points: [
306
306
  [t, i - n],
307
307
  [t + n, i + n],
308
308
  [t - n, i + n]
309
309
  ] },
310
- style: l
310
+ style: o
311
311
  }];
312
312
  default: return [{
313
313
  type: "polygon",
314
314
  silent: !0,
315
- z: s,
315
+ z: r,
316
316
  shape: { points: [
317
317
  [t, i - n],
318
318
  [t + n, i],
319
319
  [t, i + n],
320
320
  [t - n, i]
321
321
  ] },
322
- style: l
322
+ style: o
323
323
  }];
324
324
  }
325
- }, D = (e, t, i, s) => {
326
- const { rect: r, font: n } = e, l = [];
327
- return (t || i) && l.push({
325
+ }, H = (e, t, i, r) => {
326
+ const { rect: s, font: n } = e, o = [];
327
+ return (t || i) && o.push({
328
328
  type: "rect",
329
329
  silent: !0,
330
330
  z: 59,
331
331
  shape: {
332
- x: r.x,
333
- y: r.y,
334
- width: r.width,
335
- height: r.height
332
+ x: s.x,
333
+ y: s.y,
334
+ width: s.width,
335
+ height: s.height
336
336
  },
337
337
  style: {
338
- fill: m(t),
339
- ...S(i)
338
+ fill: k(t),
339
+ ...B(i)
340
340
  }
341
- }), l.push({
341
+ }), o.push({
342
342
  type: "text",
343
343
  silent: !0,
344
344
  z: 60,
345
- x: r.x + r.width / 2,
346
- y: r.y + r.height / 2,
345
+ x: s.x + s.width / 2,
346
+ y: s.y + s.height / 2,
347
347
  rotation: (e.rotation ?? 0) * Math.PI / 180,
348
348
  style: {
349
349
  x: 0,
350
350
  y: 0,
351
351
  text: e.text,
352
- fill: z(n),
353
- font: M(n),
352
+ fill: M(n),
353
+ font: L(n),
354
354
  align: "center",
355
355
  verticalAlign: "middle",
356
- ...s ? { lineHeight: s } : {}
356
+ ...r ? { lineHeight: r } : {}
357
357
  }
358
- }), l;
359
- }, W = (e) => (e?.segments ?? []).map((t) => ({
358
+ }), o;
359
+ }, j = (e) => (e?.segments ?? []).map((t) => ({
360
360
  type: "line",
361
361
  silent: !0,
362
362
  z: 3,
@@ -368,9 +368,9 @@ var y = {
368
368
  },
369
369
  style: {
370
370
  fill: "none",
371
- ...S(e.stroke)
371
+ ...B(e.stroke)
372
372
  }
373
- })), H = (e) => (e?.bars ?? []).map((t) => {
373
+ })), G = (e) => (e?.bars ?? []).map((t) => {
374
374
  const i = t.up ? e.up : e.down;
375
375
  return {
376
376
  type: "rect",
@@ -383,23 +383,23 @@ var y = {
383
383
  height: t.rect.height
384
384
  },
385
385
  style: {
386
- fill: m(i.fill, "none"),
387
- ...S(i.stroke)
386
+ fill: k(i.fill, "none"),
387
+ ...B(i.stroke)
388
388
  }
389
389
  };
390
- }), j = {
390
+ }), P = {
391
391
  types: ["bar"],
392
392
  horizontal: (e) => "bar" === e.type && "bar" === e.barDir,
393
393
  series: (e, t) => "bar" === e.type ? ((e, t) => {
394
- const i = t.cartesian(e), s = "clustered" === e.grouping ? void 0 : `bar:${e.axisIds.join(":")}`, r = e.series.map((r, n) => ({
395
- ...i.base(r),
394
+ const i = t.cartesian(e), r = "clustered" === e.grouping ? void 0 : `bar:${e.axisIds.join(":")}`, s = e.series.map((s, n) => ({
395
+ ...i.base(s),
396
396
  type: "bar",
397
- data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
397
+ data: i.placed(s, s.plotted.map((e, t) => e === s.values[t] ? e : {
398
398
  value: e,
399
- source: r.values[t]
399
+ source: s.values[t]
400
400
  })),
401
- ...s ? {
402
- stack: s,
401
+ ...r ? {
402
+ stack: r,
403
403
  stackStrategy: "samesign"
404
404
  } : {},
405
405
  clip: !0,
@@ -408,19 +408,19 @@ var y = {
408
408
  barGap: -e.overlap + "%",
409
409
  z: 2 + n / e.series.length,
410
410
  itemStyle: {
411
- color: t.paint(r.fill),
412
- borderColor: t.paint(r.stroke?.fill),
413
- borderWidth: t.width(r.stroke)
411
+ color: t.paint(s.fill),
412
+ borderColor: t.paint(s.stroke?.fill),
413
+ borderWidth: t.width(s.stroke)
414
414
  }
415
415
  }));
416
- return "bar" === e.barDir == !!t.axisOf(e.axisIds[0])?.reversed || s ? r : r.reverse();
416
+ return "bar" === e.barDir == !!t.axisOf(e.axisIds[0])?.reversed || r ? s : s.reverse();
417
417
  })(e, t) : [],
418
418
  graphic: (e, t) => "bar" === e.type ? t.lines(e.seriesLines) : []
419
- }, G = {
419
+ }, T = {
420
420
  types: ["waterfall"],
421
421
  graphic: (e, t) => "waterfall" === e.type ? ((e, t) => {
422
422
  const i = [];
423
- for (const s of e.series) for (const e of s.bars ?? []) e && i.push({
423
+ for (const r of e.series) for (const e of r.bars ?? []) e && i.push({
424
424
  type: "rect",
425
425
  silent: !0,
426
426
  z: 2,
@@ -437,17 +437,17 @@ var y = {
437
437
  });
438
438
  return i.push(...t.lines(e.connectorLines)), i;
439
439
  })(e, t) : []
440
- }, P = {
440
+ }, O = {
441
441
  types: ["sunburst"],
442
442
  grid: !1,
443
443
  graphic: (e, t) => "sunburst" === e.type ? ((e, t) => {
444
- const i = [], s = [], { x: r, y: n } = e.center;
445
- for (const l of e.series) for (const e of l.segments ?? []) e.endAngle > e.startAngle && (i.push({
444
+ const i = [], r = [], { x: s, y: n } = e.center;
445
+ for (const o of e.series) for (const e of o.segments ?? []) e.endAngle > e.startAngle && (i.push({
446
446
  type: "sector",
447
447
  silent: !0,
448
448
  z: 2,
449
449
  shape: {
450
- cx: r,
450
+ cx: s,
451
451
  cy: n,
452
452
  r0: e.innerRadius,
453
453
  r: e.outerRadius,
@@ -459,15 +459,15 @@ var y = {
459
459
  fill: t.paint(e.fill, "none"),
460
460
  ...t.stroke(e.stroke)
461
461
  }
462
- }), e.label && s.push(...t.text(e.label, null, null)));
463
- return [...i, ...s];
462
+ }), e.label && r.push(...t.text(e.label, null, null)));
463
+ return [...i, ...r];
464
464
  })(e, t) : []
465
- }, T = {
465
+ }, V = {
466
466
  types: ["histogram"],
467
467
  graphic: (e, t) => "histogram" === e.type ? ((e, t) => {
468
468
  const i = [];
469
- for (const s of e.series) {
470
- for (const e of s.bars) e && i.push({
469
+ for (const r of e.series) {
470
+ for (const e of r.bars) e && i.push({
471
471
  type: "rect",
472
472
  silent: !0,
473
473
  z: 2,
@@ -478,12 +478,12 @@ var y = {
478
478
  height: e.height
479
479
  },
480
480
  style: {
481
- fill: t.paint(s.fill, "none"),
482
- ...t.stroke(s.stroke)
481
+ fill: t.paint(r.fill, "none"),
482
+ ...t.stroke(r.stroke)
483
483
  }
484
484
  });
485
- if (s.line) {
486
- const e = s.line.points.filter((e) => !!e);
485
+ if (r.line) {
486
+ const e = r.line.points.filter((e) => !!e);
487
487
  e.length > 1 && i.push({
488
488
  type: "polyline",
489
489
  silent: !0,
@@ -491,20 +491,20 @@ var y = {
491
491
  shape: { points: e.map((e) => [e.x, e.y]) },
492
492
  style: {
493
493
  fill: "none",
494
- ...t.stroke(s.stroke)
494
+ ...t.stroke(r.stroke)
495
495
  }
496
496
  });
497
497
  }
498
498
  }
499
499
  return i;
500
500
  })(e, t) : []
501
- }, V = {
501
+ }, R = {
502
502
  types: ["boxWhisker"],
503
503
  graphic: (e, t) => "boxWhisker" === e.type ? ((e, t) => {
504
- const i = [], s = (e, i, s) => ({
504
+ const i = [], r = (e, i, r) => ({
505
505
  type: "line",
506
506
  silent: !0,
507
- z: s,
507
+ z: r,
508
508
  shape: {
509
509
  x1: e.from.x,
510
510
  y1: e.from.y,
@@ -516,10 +516,10 @@ var y = {
516
516
  ...t.stroke(i)
517
517
  }
518
518
  });
519
- for (const r of e.series) {
520
- for (const e of r.boxes) {
519
+ for (const s of e.series) {
520
+ for (const e of s.boxes) {
521
521
  if (!e) continue;
522
- const r = t.stroke(e.stroke);
522
+ const s = t.stroke(e.stroke);
523
523
  i.push({
524
524
  type: "rect",
525
525
  silent: !0,
@@ -532,13 +532,13 @@ var y = {
532
532
  },
533
533
  style: {
534
534
  fill: t.paint(e.fill, "none"),
535
- ...r
535
+ ...s
536
536
  }
537
- }), i.push(s(e.median, e.stroke, 3));
538
- for (const t of [e.whiskerHigh, e.whiskerLow]) t && i.push(s(t.line, e.stroke, 3), s(t.cap, e.stroke, 3));
537
+ }), i.push(r(e.median, e.stroke, 3));
538
+ for (const t of [e.whiskerHigh, e.whiskerLow]) t && i.push(r(t.line, e.stroke, 3), r(t.cap, e.stroke, 3));
539
539
  if (e.mean) {
540
- const { center: t, size: r } = e.mean, n = r / 2;
541
- i.push(s({
540
+ const { center: t, size: s } = e.mean, n = s / 2;
541
+ i.push(r({
542
542
  from: {
543
543
  x: t.x - n,
544
544
  y: t.y - n
@@ -547,7 +547,7 @@ var y = {
547
547
  x: t.x + n,
548
548
  y: t.y + n
549
549
  }
550
- }, e.stroke, 4), s({
550
+ }, e.stroke, 4), r({
551
551
  from: {
552
552
  x: t.x - n,
553
553
  y: t.y + n
@@ -558,46 +558,46 @@ var y = {
558
558
  }
559
559
  }, e.stroke, 4));
560
560
  }
561
- for (const s of e.outliers) i.push({
561
+ for (const r of e.outliers) i.push({
562
562
  type: "circle",
563
563
  silent: !0,
564
564
  z: 4,
565
565
  shape: {
566
- cx: s.center.x,
567
- cy: s.center.y,
568
- r: s.size / 2
566
+ cx: r.center.x,
567
+ cy: r.center.y,
568
+ r: r.size / 2
569
569
  },
570
570
  style: {
571
571
  fill: t.paint(e.fill, "none"),
572
- ...r
572
+ ...s
573
573
  }
574
574
  });
575
- for (const t of e.innerPoints) i.push({
575
+ for (const r of e.innerPoints) i.push({
576
576
  type: "circle",
577
577
  silent: !0,
578
578
  z: 4,
579
579
  shape: {
580
- cx: t.center.x,
581
- cy: t.center.y,
582
- r: t.size / 2
580
+ cx: r.center.x,
581
+ cy: r.center.y,
582
+ r: r.size / 2
583
583
  },
584
584
  style: {
585
- fill: "#FFFFFF",
586
- ...r
585
+ fill: t.color("#FFFFFF"),
586
+ ...s
587
587
  }
588
588
  });
589
589
  }
590
- i.push(...t.lines(r.meanLine));
590
+ i.push(...t.lines(s.meanLine));
591
591
  }
592
592
  return i;
593
593
  })(e, t) : []
594
- }, O = {
594
+ }, U = {
595
595
  types: ["treemap"],
596
596
  grid: !1,
597
597
  graphic: (e, t) => "treemap" === e.type ? ((e, t) => {
598
- const i = [], s = [];
599
- for (const r of e.series) {
600
- for (const e of r.tiles) e.rect.width > 0 && e.rect.height > 0 && (i.push({
598
+ const i = [], r = [];
599
+ for (const s of e.series) {
600
+ for (const e of s.tiles) e.rect.width > 0 && e.rect.height > 0 && (i.push({
601
601
  type: "rect",
602
602
  silent: !0,
603
603
  z: 2,
@@ -611,19 +611,19 @@ var y = {
611
611
  fill: t.paint(e.fill, "none"),
612
612
  ...t.stroke(e.stroke)
613
613
  }
614
- }), e.label && s.push(...t.text(e.label, null, null)));
615
- for (const e of r.parents) {
614
+ }), e.label && r.push(...t.text(e.label, null, null)));
615
+ for (const e of s.parents) {
616
616
  if (e.banner) {
617
- const { rect: s } = e.banner;
617
+ const { rect: r } = e.banner;
618
618
  i.push({
619
619
  type: "rect",
620
620
  silent: !0,
621
621
  z: 3,
622
622
  shape: {
623
- x: s.x,
624
- y: s.y,
625
- width: s.width,
626
- height: s.height
623
+ x: r.x,
624
+ y: r.y,
625
+ width: r.width,
626
+ height: r.height
627
627
  },
628
628
  style: {
629
629
  fill: t.paint(e.banner.fill, "none"),
@@ -631,12 +631,12 @@ var y = {
631
631
  }
632
632
  });
633
633
  }
634
- s.push(...t.text(e.label, null, null));
634
+ r.push(...t.text(e.label, null, null));
635
635
  }
636
636
  }
637
- return [...i, ...s];
637
+ return [...i, ...r];
638
638
  })(e, t) : []
639
- }, R = {
639
+ }, K = {
640
640
  types: ["funnel"],
641
641
  grid: !1,
642
642
  graphic: (e, t) => "funnel" === e.type ? ((e, t) => {
@@ -656,8 +656,8 @@ var y = {
656
656
  ...t.stroke(e.axisStroke)
657
657
  }
658
658
  });
659
- for (const s of e.categoryLabels) s && i.push(...t.text(s, null, null));
660
- for (const s of e.series) for (const e of s.bars) e && i.push({
659
+ for (const r of e.categoryLabels) r && i.push(...t.text(r, null, null));
660
+ for (const r of e.series) for (const e of r.bars) e && i.push({
661
661
  type: "rect",
662
662
  silent: !0,
663
663
  z: 2,
@@ -668,39 +668,39 @@ var y = {
668
668
  height: e.height
669
669
  },
670
670
  style: {
671
- fill: t.paint(s.fill, "none"),
672
- ...t.stroke(s.stroke)
671
+ fill: t.paint(r.fill, "none"),
672
+ ...t.stroke(r.stroke)
673
673
  }
674
674
  });
675
675
  return i;
676
676
  })(e, t) : []
677
- }, U = (e, t, i) => {
678
- const s = t.x + t.width / 2, r = t.y + t.height / 2, n = [];
677
+ }, J = (e, t, i) => {
678
+ const r = t.x + t.width / 2, s = t.y + t.height / 2, n = [];
679
679
  return e.stroke && n.push({
680
680
  type: "line",
681
681
  silent: !0,
682
682
  z: 50,
683
683
  shape: {
684
684
  x1: t.x,
685
- y1: r,
685
+ y1: s,
686
686
  x2: t.x + t.width,
687
- y2: r
687
+ y2: s
688
688
  },
689
689
  style: i.stroke(e.stroke)
690
- }), e.marker && n.push(...i.marker.graphic(e.marker, s, r, 51)), n;
691
- }, K = {
690
+ }), e.marker && n.push(...i.marker.graphic(e.marker, r, s, 51)), n;
691
+ }, Z = {
692
692
  types: ["line"],
693
693
  series: (e, t) => "line" === e.type ? ((e, t) => {
694
- const i = t.cartesian(e), s = "standard" === e.grouping ? void 0 : `line:${e.axisIds.join(":")}`;
695
- return e.series.flatMap((r) => t.withMarkerFills(r, {
696
- ...i.base(r),
697
- ...t.lineSeries(r, !1, e.spanBlanks),
698
- ...s ? {
699
- data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
694
+ const i = t.cartesian(e), r = "standard" === e.grouping ? void 0 : `line:${e.axisIds.join(":")}`;
695
+ return e.series.flatMap((s) => t.withMarkerFills(s, {
696
+ ...i.base(s),
697
+ ...t.lineSeries(s, !1, e.spanBlanks),
698
+ ...r ? {
699
+ data: i.placed(s, s.plotted.map((e, t) => e === s.values[t] ? e : {
700
700
  value: e,
701
- source: r.values[t]
701
+ source: s.values[t]
702
702
  })),
703
- stack: s
703
+ stack: r
704
704
  } : {}
705
705
  }));
706
706
  })(e, t) : [],
@@ -709,21 +709,21 @@ var y = {
709
709
  ...t.lines(e.hiLowLines),
710
710
  ...t.lines(e.dropLines)
711
711
  ] : [],
712
- legendKey: (e, t, i, s, r) => U(t, s, r)
713
- }, J = {
712
+ legendKey: (e, t, i, r, s) => J(t, r, s)
713
+ }, q = {
714
714
  types: ["area"],
715
715
  series: (e, t) => "area" === e.type ? ((e, t) => {
716
- const i = t.cartesian(e), s = "standard" === e.grouping ? void 0 : `area:${e.axisIds.join(":")}`;
717
- return e.series.map((r) => ({
718
- ...i.base(r),
719
- ...t.lineSeries(r, !1),
720
- data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
716
+ const i = t.cartesian(e), r = "standard" === e.grouping ? void 0 : `area:${e.axisIds.join(":")}`;
717
+ return e.series.map((s) => ({
718
+ ...i.base(s),
719
+ ...t.lineSeries(s, !1),
720
+ data: i.placed(s, s.plotted.map((e, t) => e === s.values[t] ? e : {
721
721
  value: e,
722
- source: r.values[t]
722
+ source: s.values[t]
723
723
  })),
724
- ...s ? { stack: s } : {},
724
+ ...r ? { stack: r } : {},
725
725
  areaStyle: {
726
- color: t.paint(r.fill),
726
+ color: t.paint(s.fill),
727
727
  opacity: 1,
728
728
  origin: e.baseValue
729
729
  },
@@ -731,23 +731,23 @@ var y = {
731
731
  }));
732
732
  })(e, t) : [],
733
733
  graphic: (e, t) => "area" === e.type ? t.lines(e.dropLines) : []
734
- }, Z = {
734
+ }, N = {
735
735
  types: ["scatter"],
736
736
  series: (e, t) => "scatter" === e.type ? ((e, t) => {
737
737
  const i = t.cartesian(e);
738
- return e.series.flatMap((s) => t.withMarkerFills(s, {
739
- ...i.base(s),
740
- ...t.lineSeries(s, s.smooth, e.spanBlanks),
741
- data: s.values.map((e, t) => [s.xValues[t], e])
738
+ return e.series.flatMap((r) => t.withMarkerFills(r, {
739
+ ...i.base(r),
740
+ ...t.lineSeries(r, r.smooth, e.spanBlanks),
741
+ data: r.values.map((e, t) => [r.xValues[t], e])
742
742
  }));
743
743
  })(e, t) : [],
744
- legendKey: (e, t, i, s, r) => U(t, s, r)
745
- }, q = {
744
+ legendKey: (e, t, i, r, s) => J(t, r, s)
745
+ }, Q = {
746
746
  types: ["bubble"],
747
747
  series: (e, t) => "bubble" === e.type ? ((e, t) => {
748
748
  const i = t.cartesian(e);
749
- return e.series.map((s) => ({
750
- ...i.base(s),
749
+ return e.series.map((r) => ({
750
+ ...i.base(r),
751
751
  type: "line",
752
752
  showSymbol: !0,
753
753
  symbol: "circle",
@@ -755,16 +755,16 @@ var y = {
755
755
  width: 0,
756
756
  opacity: 0
757
757
  },
758
- data: s.values.flatMap((i, r) => {
759
- if (null === s.radii[r]) return [];
760
- const n = s.negative[r] ? e.negative : {
761
- fill: s.fill,
762
- stroke: s.stroke
758
+ data: r.values.flatMap((i, s) => {
759
+ if (null === r.radii[s]) return [];
760
+ const n = r.negative[s] ? e.negative : {
761
+ fill: r.fill,
762
+ stroke: r.stroke
763
763
  };
764
764
  return [{
765
- value: [s.xValues[r], i],
766
- symbolSize: 2 * s.radii[r] - t.width(n.stroke),
767
- ...s.negative[r] ? { itemStyle: {
765
+ value: [r.xValues[s], i],
766
+ symbolSize: 2 * r.radii[s] - t.width(n.stroke),
767
+ ...r.negative[s] ? { itemStyle: {
768
768
  color: t.paint(n.fill),
769
769
  borderColor: t.paint(n.stroke?.fill),
770
770
  borderWidth: t.width(n.stroke)
@@ -772,21 +772,21 @@ var y = {
772
772
  }];
773
773
  }),
774
774
  itemStyle: {
775
- color: t.paint(s.fill),
776
- borderColor: t.paint(s.stroke?.fill),
777
- borderWidth: t.width(s.stroke)
775
+ color: t.paint(r.fill),
776
+ borderColor: t.paint(r.stroke?.fill),
777
+ borderWidth: t.width(r.stroke)
778
778
  },
779
779
  z: 2
780
780
  }));
781
781
  })(e, t) : []
782
- }, N = (e, t, i, s, r, n, l) => {
782
+ }, X = (e, t, i, r, s, n, o) => {
783
783
  if (0 === n.length) return [];
784
- const o = (e) => e.center.x !== i.x || e.center.y !== i.y, a = (e, i, o) => ({
784
+ const l = (e) => e.center.x !== i.x || e.center.y !== i.y, a = (e, i, l) => ({
785
785
  type: "pie",
786
786
  id: e,
787
787
  name: t,
788
788
  center: [i.x, i.y],
789
- radius: [s, r],
789
+ radius: [r, s],
790
790
  startAngle: 90 - n[0].slice.startAngle,
791
791
  clockwise: !0,
792
792
  minAngle: 0,
@@ -801,20 +801,20 @@ var y = {
801
801
  name: t,
802
802
  value: e.endAngle - e.startAngle,
803
803
  itemStyle: i ? {
804
- color: l.paint(e.fill),
805
- borderColor: l.paint(e.stroke?.fill),
806
- borderWidth: l.width(e.stroke)
804
+ color: o.paint(e.fill),
805
+ borderColor: o.paint(e.stroke?.fill),
806
+ borderWidth: o.width(e.stroke)
807
807
  } : {
808
808
  color: "transparent",
809
809
  borderWidth: 0
810
810
  },
811
811
  ...i ? {} : { tooltip: { show: !1 } }
812
- }))(e, o(e.slice)))
813
- }), p = [a(e, i, (e) => !o(e))];
812
+ }))(e, l(e.slice)))
813
+ }), p = [a(e, i, (e) => !l(e))];
814
814
  return n.forEach(({ slice: t }, i) => {
815
- o(t) && p.push(a(`${e}:${i}`, t.center, (e) => e === t));
815
+ l(t) && p.push(a(`${e}:${i}`, t.center, (e) => e === t));
816
816
  }), p;
817
- }, Q = (e, t, i, s) => [{
817
+ }, Y = (e, t, i, r) => [{
818
818
  type: "rect",
819
819
  silent: !0,
820
820
  z: 50,
@@ -825,23 +825,23 @@ var y = {
825
825
  height: i.height
826
826
  },
827
827
  style: {
828
- fill: s.paint(e),
829
- ...s.stroke(t ?? null)
828
+ fill: r.paint(e),
829
+ ...r.stroke(t ?? null)
830
830
  }
831
- }], X = {
831
+ }], _ = {
832
832
  types: ["pie"],
833
833
  series: (e, t) => "pie" === e.type ? ((e, t) => e.series.flatMap((i) => {
834
- const s = i.slices.flatMap((e, t) => e ? [{
834
+ const r = i.slices.flatMap((e, t) => e ? [{
835
835
  slice: e,
836
836
  name: String(t + 1)
837
837
  }] : []);
838
- return N(i.id, i.name, e.center, i.innerRadius, i.outerRadius, s, t);
838
+ return X(i.id, i.name, e.center, i.innerRadius, i.outerRadius, r, t);
839
839
  }))(e, t) : [],
840
- legendKey: (e, t, i, s, r) => {
840
+ legendKey: (e, t, i, r, s) => {
841
841
  const n = void 0 === e.pointIndex ? void 0 : t.slices[e.pointIndex];
842
- return n ? Q(n.fill, n.stroke, s, r) : void 0;
842
+ return n ? Y(n.fill, n.stroke, r, s) : void 0;
843
843
  }
844
- }, Y = (e, t) => e.series.flatMap((e) => (e.bars ?? []).flatMap((e) => e ? [{
844
+ }, ee = (e, t) => e.series.flatMap((e) => (e.bars ?? []).flatMap((e) => e ? [{
845
845
  type: "rect",
846
846
  silent: !0,
847
847
  z: 2,
@@ -855,166 +855,197 @@ var y = {
855
855
  fill: t.paint(e.fill, "none"),
856
856
  ...t.stroke(e.stroke)
857
857
  }
858
- }] : [])), _ = {
858
+ }] : [])), te = {
859
859
  types: ["ofPie"],
860
860
  series: (e, t) => "ofPie" === e.type ? ((e, t) => e.series.flatMap((i) => {
861
- const s = i.slices.flatMap((e, t) => e ? [{
861
+ const r = i.slices.flatMap((e, t) => e ? [{
862
862
  slice: e,
863
863
  name: String(t + 1),
864
864
  k: t
865
- }] : []), r = s.filter(({ k: e }) => !i.second[e]);
866
- i.other && r.unshift({
865
+ }] : []), s = r.filter(({ k: e }) => !i.second[e]);
866
+ i.other && s.unshift({
867
867
  slice: i.other,
868
868
  name: "Other",
869
869
  k: -1
870
870
  });
871
- const n = N(i.id, i.name, e.center, 0, e.radius, r, t);
872
- return e.second && n.push(...N(`${i.id}:second`, i.name, e.second.center, 0, e.second.radius, s.filter(({ k: e }) => i.second[e]), t)), n;
871
+ const n = X(i.id, i.name, e.center, 0, e.radius, s, t);
872
+ return e.second && n.push(...X(`${i.id}:second`, i.name, e.second.center, 0, e.second.radius, r.filter(({ k: e }) => i.second[e]), t)), n;
873
873
  }))(e, t) : [],
874
- graphic: (e, t) => "ofPie" === e.type ? [...Y(e, t), ...t.lines(e.seriesLines)] : [],
875
- legendKey: (e, t, i, s, r) => {
874
+ graphic: (e, t) => "ofPie" === e.type ? [...ee(e, t), ...t.lines(e.seriesLines)] : [],
875
+ legendKey: (e, t, i, r, s) => {
876
876
  if ("ofPie" !== i.type || void 0 === e.pointIndex) return;
877
- const n = i.series[0], l = n?.slices[e.pointIndex] ?? n?.bars?.[e.pointIndex];
878
- return l ? Q(l.fill, l.stroke, s, r) : void 0;
877
+ const n = i.series[0], o = n?.slices[e.pointIndex] ?? n?.bars?.[e.pointIndex];
878
+ return o ? Y(o.fill, o.stroke, r, s) : void 0;
879
879
  }
880
- }, ee = {
880
+ }, ie = {
881
881
  types: ["radar"],
882
882
  grid: !1,
883
883
  graphic: (e, t) => "radar" === e.type ? ((e, t) => {
884
884
  const i = [];
885
- for (const s of e.rings) i.push({
885
+ for (const r of e.rings) i.push({
886
886
  type: "polygon",
887
887
  silent: !0,
888
888
  z: 1,
889
- shape: { points: s.map((e) => [e.x, e.y]) },
889
+ shape: { points: r.map((e) => [e.x, e.y]) },
890
890
  style: {
891
891
  fill: "none",
892
892
  ...t.stroke(e.ringStroke)
893
893
  }
894
894
  });
895
- for (const s of e.spokes) i.push({
895
+ for (const r of e.spokes) i.push({
896
896
  type: "line",
897
897
  silent: !0,
898
898
  z: 1,
899
899
  shape: {
900
- x1: s.from.x,
901
- y1: s.from.y,
902
- x2: s.to.x,
903
- y2: s.to.y
900
+ x1: r.from.x,
901
+ y1: r.from.y,
902
+ x2: r.to.x,
903
+ y2: r.to.y
904
904
  },
905
905
  style: t.stroke(e.spokeStroke)
906
906
  });
907
- e.series.forEach((s, r) => {
908
- const n = 2 + r / Math.max(1, e.series.length), l = [[]];
909
- s.points.forEach((e) => {
910
- e ? l[l.length - 1].push(e) : l.push([]);
907
+ e.series.forEach((r, s) => {
908
+ const n = 2 + s / Math.max(1, e.series.length), o = [[]];
909
+ r.points.forEach((e) => {
910
+ e ? o[o.length - 1].push(e) : o.push([]);
911
911
  }), e.filled ? i.push({
912
912
  type: "polygon",
913
913
  silent: !0,
914
914
  z: n,
915
- shape: { points: s.points.filter((e) => !!e).map((e) => [e.x, e.y]) },
915
+ shape: { points: r.points.filter((e) => !!e).map((e) => [e.x, e.y]) },
916
916
  style: {
917
- fill: t.paint(s.fill, "none"),
918
- ...t.stroke(s.stroke)
917
+ fill: t.paint(r.fill, "none"),
918
+ ...t.stroke(r.stroke)
919
919
  }
920
- }) : s.stroke && (s.points.length > 1 && s.points.every((e) => !!e) ? i.push({
920
+ }) : r.stroke && (r.points.length > 1 && r.points.every((e) => !!e) ? i.push({
921
921
  type: "polygon",
922
922
  silent: !0,
923
923
  z: n,
924
- shape: { points: s.points.map((e) => [e.x, e.y]) },
924
+ shape: { points: r.points.map((e) => [e.x, e.y]) },
925
925
  style: {
926
926
  fill: "none",
927
- ...t.stroke(s.stroke),
927
+ ...t.stroke(r.stroke),
928
928
  lineJoin: "round"
929
929
  }
930
- }) : l.filter((e) => e.length > 1).forEach((e) => i.push({
930
+ }) : o.filter((e) => e.length > 1).forEach((e) => i.push({
931
931
  type: "polyline",
932
932
  silent: !0,
933
933
  z: n,
934
934
  shape: { points: e.map((e) => [e.x, e.y]) },
935
935
  style: {
936
936
  fill: "none",
937
- ...t.stroke(s.stroke),
937
+ ...t.stroke(r.stroke),
938
938
  lineJoin: "round"
939
939
  }
940
- }))), s.marker && s.points.forEach((e) => {
941
- e && i.push(...t.marker.graphic(s.marker, e.x, e.y, n + .5));
940
+ }))), r.marker && r.points.forEach((e) => {
941
+ e && i.push(...t.marker.graphic(r.marker, e.x, e.y, n + .5));
942
942
  });
943
943
  });
944
- for (const s of e.categoryLabels) s && i.push(...t.text(s, null, null));
945
- for (const s of e.valueLabels) i.push(...t.text(s, null, null));
944
+ for (const r of e.categoryLabels) r && i.push(...t.text(r, null, null));
945
+ for (const r of e.valueLabels) i.push(...t.text(r, null, null));
946
946
  return i;
947
947
  })(e, t) : [],
948
- legendKey: (e, t, i, s, r) => "radar" !== i.type || i.filled ? void 0 : U(t, s, r)
949
- }, te = {
948
+ legendKey: (e, t, i, r, s) => "radar" !== i.type || i.filled ? void 0 : J(t, r, s)
949
+ }, re = {
950
950
  types: ["surface"],
951
951
  grid: !1,
952
952
  graphic: (e, t) => "surface" === e.type ? ((e, t) => {
953
953
  const i = [];
954
- e.bands.forEach((s) => {
955
- for (const r of s.polygons) i.push({
954
+ e.bands.forEach((r) => {
955
+ for (const s of r.polygons) i.push({
956
956
  type: "polygon",
957
957
  silent: !0,
958
958
  z: 2,
959
- shape: { points: r.map((e) => [e.x, e.y]) },
959
+ shape: { points: s.map((e) => [e.x, e.y]) },
960
960
  style: e.wireframe ? {
961
961
  fill: "none",
962
- ...t.stroke(s.stroke)
962
+ ...t.stroke(r.stroke)
963
963
  } : {
964
- fill: t.paint(s.fill, "none"),
965
- stroke: t.paint(s.fill, "none"),
964
+ fill: t.paint(r.fill, "none"),
965
+ stroke: t.paint(r.fill, "none"),
966
966
  lineWidth: .5
967
967
  }
968
968
  });
969
969
  });
970
- for (const s of [...e.categoryLabels, ...e.seriesLabels]) i.push(...t.text(s, null, null));
970
+ for (const r of [...e.categoryLabels, ...e.seriesLabels]) i.push(...t.text(r, null, null));
971
971
  return i;
972
972
  })(e, t) : [],
973
- legendKey: (e, t, i, s, r) => {
973
+ legendKey: (e, t, i, r, s) => {
974
974
  const n = "surface" === i.type && void 0 !== e.bandIndex ? i.bands[e.bandIndex] : void 0;
975
- return n ? Q(n.fill, n.stroke, s, r) : void 0;
975
+ return n ? Y(n.fill, n.stroke, r, s) : void 0;
976
976
  }
977
- }, ie = {
977
+ }, se = {
978
978
  types: ["regionMap"],
979
979
  grid: !1,
980
- graphic: (e) => "label" in e && e.label ? D(e.label, null, null) : []
980
+ graphic: (e) => "label" in e && e.label ? H(e.label, null, null) : []
981
981
  };
982
- function se(e) {
982
+ function ne(e) {
983
983
  for (const t of [
984
- j,
985
- G,
986
984
  P,
987
985
  T,
988
- V,
989
986
  O,
987
+ V,
990
988
  R,
989
+ U,
991
990
  K,
992
- J,
993
991
  Z,
994
992
  q,
995
- X,
993
+ N,
994
+ Q,
996
995
  _,
997
- ee,
998
996
  te,
999
- ie
997
+ ie,
998
+ re,
999
+ se
1000
1000
  ]) e(t);
1001
1001
  }
1002
- function re(t, i) {
1003
- e.registerBuiltIns(se);
1004
- const s = i?.interactive ?? !0, r = i?.legend ?? "graphic", n = (t) => e.of(t), l = t.axes.filter((e) => "bottom" === e.position || "top" === e.position), o = t.axes.filter((e) => "left" === e.position || "right" === e.position), a = oe(t.groups, n), p = ae(t, (e) => {
1005
- const t = l.findIndex((t) => t.id === e);
1002
+ var oe = /* @__PURE__ */ new Map(), le = (e) => {
1003
+ let i = oe.get(e);
1004
+ if (void 0 === i) {
1005
+ try {
1006
+ i = s.toConcreteCSS(new t(e), !0);
1007
+ } catch {
1008
+ i = e;
1009
+ }
1010
+ oe.set(e, i);
1011
+ }
1012
+ return i;
1013
+ }, ae = /* @__PURE__ */ new Set([
1014
+ "color",
1015
+ "foreground",
1016
+ "background"
1017
+ ]), pe = (e, t) => {
1018
+ if ("data" === t) return e;
1019
+ if ("string" == typeof e) return t && ae.has(t) ? le(e) : e;
1020
+ if (Array.isArray(e)) return e.map((e) => "stops" === t && "string" == typeof e ? le(e) : pe(e));
1021
+ if (e && "object" == typeof e) {
1022
+ const t = {};
1023
+ for (const [i, r] of Object.entries(e)) t[i] = pe(r, i);
1024
+ return t;
1025
+ }
1026
+ return e;
1027
+ };
1028
+ function he(t, i) {
1029
+ e.registerBuiltIns(ne);
1030
+ const r = i?.darkMode ?? !1, s = i?.background ?? "#FFFFFF";
1031
+ t = ((e, t) => t ? pe(e) : e)(t, r);
1032
+ const n = i?.interactive ?? !0, o = i?.legend ?? "graphic", l = (t) => e.of(t), a = t.axes.filter((e) => "bottom" === e.position || "top" === e.position), p = t.axes.filter((e) => "left" === e.position || "right" === e.position), h = ye(t.groups, l), c = fe(t, (e) => {
1033
+ const t = a.findIndex((t) => t.id === e);
1006
1034
  if (t >= 0) return {
1007
1035
  dim: "x",
1008
1036
  index: t
1009
1037
  };
1010
- const i = o.findIndex((t) => t.id === e);
1038
+ const i = p.findIndex((t) => t.id === e);
1011
1039
  if (i >= 0) return {
1012
1040
  dim: "y",
1013
1041
  index: i
1014
1042
  };
1015
1043
  throw new Error(`chart layout names axis ${e}, which it does not have`);
1016
- }), h = [], c = t.chartArea.cornerRadius, d = t.chartArea.fill, y = !!d && (c > 0 || "solid" !== d.type);
1017
- if (y && h.push({
1044
+ }, r), d = [], y = t.chartArea.cornerRadius, f = t.chartArea.fill, u = void 0 !== f ? f : "transparent" === s ? null : {
1045
+ type: "solid",
1046
+ color: r ? le(s) : s
1047
+ }, g = !!u && (y > 0 || "solid" !== u.type);
1048
+ if (g && d.push({
1018
1049
  type: "rect",
1019
1050
  silent: !0,
1020
1051
  z: -100,
@@ -1023,12 +1054,12 @@ function re(t, i) {
1023
1054
  y: 0,
1024
1055
  width: t.width,
1025
1056
  height: t.height,
1026
- r: c
1057
+ r: y
1027
1058
  },
1028
- style: { fill: m(d, "none") }
1059
+ style: { fill: k(u, "none") }
1029
1060
  }), t.chartArea.border) {
1030
- const e = b(t.chartArea.border);
1031
- h.push({
1061
+ const e = w(t.chartArea.border);
1062
+ d.push({
1032
1063
  type: "rect",
1033
1064
  silent: !0,
1034
1065
  z: 100,
@@ -1037,16 +1068,16 @@ function re(t, i) {
1037
1068
  y: e / 2,
1038
1069
  width: t.width - e,
1039
1070
  height: t.height - e,
1040
- r: Math.max(0, c - e / 2)
1071
+ r: Math.max(0, y - e / 2)
1041
1072
  },
1042
1073
  style: {
1043
1074
  fill: "none",
1044
- ...S(t.chartArea.border)
1075
+ ...B(t.chartArea.border)
1045
1076
  }
1046
1077
  });
1047
1078
  }
1048
- t.legend && "graphic" === r && h.push(...function(t, i, s) {
1049
- const r = (e) => {
1079
+ t.legend && "graphic" === o && d.push(...function(t, i, r) {
1080
+ const s = (e) => {
1050
1081
  for (const t of i) {
1051
1082
  const i = t.series.find((t) => t.id === e);
1052
1083
  if (i) return {
@@ -1056,47 +1087,47 @@ function re(t, i) {
1056
1087
  }
1057
1088
  }, n = [];
1058
1089
  for (const i of t.entries) {
1059
- const l = r(i.seriesId), o = i.keyRect, a = void 0 === i.trendlineIndex ? void 0 : l?.series.trendlines?.[i.trendlineIndex];
1090
+ const o = s(i.seriesId), l = i.keyRect, a = void 0 === i.trendlineIndex ? void 0 : o?.series.trendlines?.[i.trendlineIndex];
1060
1091
  if (a) {
1061
- const e = o.y + o.height / 2;
1092
+ const e = l.y + l.height / 2;
1062
1093
  n.push({
1063
1094
  type: "line",
1064
1095
  silent: !0,
1065
1096
  z: 50,
1066
1097
  shape: {
1067
- x1: o.x,
1098
+ x1: l.x,
1068
1099
  y1: e,
1069
- x2: o.x + o.width,
1100
+ x2: l.x + l.width,
1070
1101
  y2: e
1071
1102
  },
1072
- style: S(a.stroke)
1103
+ style: B(a.stroke)
1073
1104
  });
1074
1105
  } else {
1075
- const t = l && !i.swatch ? e.of(l.group)?.legendKey?.(i, l.series, l.group, o, s) : void 0;
1106
+ const t = o && !i.swatch ? e.of(o.group)?.legendKey?.(i, o.series, o.group, l, r) : void 0;
1076
1107
  if (t) n.push(...t);
1077
1108
  else {
1078
1109
  const e = i.swatch ?? {
1079
- fill: l?.series.fill ?? null,
1080
- stroke: l?.series.stroke ?? null
1110
+ fill: o?.series.fill ?? null,
1111
+ stroke: o?.series.stroke ?? null
1081
1112
  };
1082
1113
  n.push({
1083
1114
  type: "rect",
1084
1115
  silent: !0,
1085
1116
  z: 50,
1086
1117
  shape: {
1087
- x: o.x,
1088
- y: o.y,
1089
- width: o.width,
1090
- height: o.height
1118
+ x: l.x,
1119
+ y: l.y,
1120
+ width: l.width,
1121
+ height: l.height
1091
1122
  },
1092
1123
  style: {
1093
- fill: m(e.fill),
1094
- ...S(e.stroke)
1124
+ fill: k(e.fill),
1125
+ ...B(e.stroke)
1095
1126
  }
1096
1127
  });
1097
1128
  }
1098
1129
  }
1099
- const p = o.x + o.width + (o.x - i.rect.x);
1130
+ const p = l.x + l.width + (l.x - i.rect.x);
1100
1131
  n.push({
1101
1132
  type: "text",
1102
1133
  silent: !0,
@@ -1105,28 +1136,28 @@ function re(t, i) {
1105
1136
  x: p,
1106
1137
  y: i.rect.y + i.rect.height / 2,
1107
1138
  text: i.text,
1108
- fill: z(t.font),
1109
- font: M(t.font),
1139
+ fill: M(t.font),
1140
+ font: L(t.font),
1110
1141
  verticalAlign: "middle",
1111
1142
  align: "left"
1112
1143
  }
1113
1144
  });
1114
1145
  }
1115
1146
  return n;
1116
- }(t.legend, t.groups, p));
1117
- for (const e of t.axes) h.push(...ge(e)), h.push(...ue(e, t.plotArea.inner)), e.title && !e.deleted && h.push(...D(e.title, null, null)), e.unitLabel && !e.deleted && h.push(...D(e.unitLabel, null, null)), "category" !== e.kind || e.deleted || h.push(...de(e)), e.labelVertical && h.push(...fe(e, t.plotArea.inner));
1147
+ }(t.legend, t.groups, c));
1148
+ for (const e of t.axes) d.push(...Ae(e)), d.push(...we(e, t.plotArea.inner)), e.title && !e.deleted && d.push(...H(e.title, null, null)), e.unitLabel && !e.deleted && d.push(...H(e.unitLabel, null, null)), "category" !== e.kind || e.deleted || d.push(...me(e)), e.labelVertical && d.push(...ke(e, t.plotArea.inner));
1118
1149
  for (const e of t.groups) {
1119
- h.push(...n(e)?.graphic?.(e, p) ?? []);
1150
+ d.push(...l(e)?.graphic?.(e, c) ?? []);
1120
1151
  for (const t of e.series) {
1121
- for (const e of t.labels ?? []) e && h.push(...D(e, e.fill, e.border));
1122
- for (const e of t.trendlines ?? []) h.push(...me(e));
1123
- for (const e of t.errorBars ?? []) h.push(...xe(e));
1152
+ for (const e of t.labels ?? []) e && d.push(...H(e, e.fill, e.border));
1153
+ for (const e of t.trendlines ?? []) d.push(...Fe(e));
1154
+ for (const e of t.errorBars ?? []) d.push(...ve(e));
1124
1155
  }
1125
1156
  }
1126
1157
  return {
1127
1158
  animation: !1,
1128
- backgroundColor: y ? "transparent" : m(d),
1129
- textStyle: { fontFamily: w(t.axes.find((e) => e.labelFont)?.labelFont ?? {}) },
1159
+ backgroundColor: g ? "transparent" : k(u),
1160
+ textStyle: { fontFamily: v(t.axes.find((e) => e.labelFont)?.labelFont ?? {}) },
1130
1161
  title: t.title ? {
1131
1162
  show: !0,
1132
1163
  text: t.title.text,
@@ -1140,7 +1171,7 @@ function re(t, i) {
1140
1171
  ],
1141
1172
  triggerEvent: !0,
1142
1173
  textStyle: {
1143
- ...C(t.title.font),
1174
+ ...S(t.title.font),
1144
1175
  lineHeight: t.title.rect.height - t.title.insets.top - t.title.insets.bottom
1145
1176
  }
1146
1177
  } : { show: !1 },
@@ -1153,10 +1184,10 @@ function re(t, i) {
1153
1184
  containLabel: !1,
1154
1185
  outerBoundsMode: "none",
1155
1186
  show: !(!t.plotArea.fill && !t.plotArea.border),
1156
- backgroundColor: m(t.plotArea.fill),
1157
- borderColor: m(t.plotArea.border?.fill),
1158
- borderWidth: b(t.plotArea.border)
1159
- }, ...t.axes.some((e) => 1 === a(e.id)) ? [{
1187
+ backgroundColor: k(t.plotArea.fill),
1188
+ borderColor: k(t.plotArea.border?.fill),
1189
+ borderWidth: w(t.plotArea.border)
1190
+ }, ...t.axes.some((e) => 1 === h(e.id)) ? [{
1160
1191
  id: "plot:vertical",
1161
1192
  left: t.plotArea.inner.x,
1162
1193
  top: t.plotArea.inner.y,
@@ -1166,12 +1197,12 @@ function re(t, i) {
1166
1197
  outerBoundsMode: "none",
1167
1198
  show: !1
1168
1199
  }] : []],
1169
- xAxis: l.map((e) => pe(e, t.plotArea.inner, a(e.id))),
1170
- yAxis: o.map((e) => pe(e, t.plotArea.inner, a(e.id))),
1171
- series: t.groups.flatMap((e) => n(e)?.series?.(e, p) ?? []),
1172
- legend: t.legend && "native" === r ? ce(t.legend) : { show: !1 },
1173
- graphic: h,
1174
- tooltip: s ? {
1200
+ xAxis: a.map((e) => ue(e, t.plotArea.inner, h(e.id))),
1201
+ yAxis: p.map((e) => ue(e, t.plotArea.inner, h(e.id))),
1202
+ series: t.groups.flatMap((e) => l(e)?.series?.(e, c) ?? []),
1203
+ legend: t.legend && "native" === o ? xe(t.legend) : { show: !1 },
1204
+ graphic: d,
1205
+ tooltip: n ? {
1175
1206
  show: !0,
1176
1207
  trigger: "item",
1177
1208
  formatter: (e) => {
@@ -1181,60 +1212,62 @@ function re(t, i) {
1181
1212
  } : { show: !1 }
1182
1213
  };
1183
1214
  }
1184
- var ne = (e) => (t) => {
1215
+ var ce = (e) => (t) => {
1185
1216
  const i = e.ticks.find((i) => Math.abs(i.value - t) <= ((t) => e.logBase ? 1e-9 * Math.abs(t) : 1e-6 * e.majorUnit)(i.value));
1186
1217
  return i ? i.label : "";
1187
- }, le = (e, t) => {
1218
+ }, de = (e, t) => {
1188
1219
  const i = e.labelsAt ?? e.lineAt;
1189
- let s;
1220
+ let r;
1190
1221
  switch (e.position) {
1191
1222
  case "bottom":
1192
- s = i - (t.y + t.height);
1223
+ r = i - (t.y + t.height);
1193
1224
  break;
1194
1225
  case "top":
1195
- s = t.y - i;
1226
+ r = t.y - i;
1196
1227
  break;
1197
1228
  case "left":
1198
- s = t.x - i;
1229
+ r = t.x - i;
1199
1230
  break;
1200
- default: s = i - (t.x + t.width);
1231
+ default: r = i - (t.x + t.width);
1201
1232
  }
1202
- return Math.abs(s) < 1e-6 ? 0 : s;
1203
- }, oe = (e, t) => {
1204
- const i = (e) => t(e)?.horizontal?.(e) ?? !1, s = e.filter((e) => t(e)?.grid ?? ("axisIds" in e && 2 === e.axisIds.length)), r = s.some(i) && s.some((e) => !i(e)), n = new Set(r ? s.filter((e) => !i(e)).flatMap((e) => e.axisIds) : []);
1233
+ return Math.abs(r) < 1e-6 ? 0 : r;
1234
+ }, ye = (e, t) => {
1235
+ const i = (e) => t(e)?.horizontal?.(e) ?? !1, r = e.filter((e) => t(e)?.grid ?? ("axisIds" in e && 2 === e.axisIds.length)), s = r.some(i) && r.some((e) => !i(e)), n = new Set(s ? r.filter((e) => !i(e)).flatMap((e) => e.axisIds) : []);
1205
1236
  return (e) => n.has(e) ? 1 : 0;
1206
- }, ae = (e, t) => {
1207
- const i = (t) => e.axes.find((e) => e.id === t);
1237
+ }, fe = (e, t, i) => {
1238
+ const r = (t) => e.axes.find((e) => e.id === t);
1208
1239
  return {
1209
1240
  layout: e,
1210
- axisOf: i,
1241
+ darkMode: i,
1242
+ color: (e) => i ? le(e) : e,
1243
+ axisOf: r,
1211
1244
  cartesian: (e) => {
1212
- const s = t(e.axisIds[0]), r = t(e.axisIds[1]), n = "x" === s.dim ? s.index : r.index, l = "y" === s.dim ? s.index : r.index, o = i(e.axisIds[1]), a = "value" === o?.kind && !!o.logBase, p = (e, t) => {
1245
+ const i = t(e.axisIds[0]), s = t(e.axisIds[1]), n = "x" === i.dim ? i.index : s.index, o = "y" === i.dim ? i.index : s.index, l = r(e.axisIds[1]), a = "value" === l?.kind && !!l.logBase, p = (e, t) => {
1213
1246
  a && (t = t.map((e) => {
1214
1247
  const t = null !== e && "object" == typeof e ? e.value : e;
1215
1248
  return "number" != typeof t || t > 0 ? e : null;
1216
1249
  }));
1217
- const i = e.slots;
1218
- if (!i) return t;
1219
- const r = (e, t) => "x" === s.dim ? [e, t] : [t, e];
1250
+ const r = e.slots;
1251
+ if (!r) return t;
1252
+ const s = (e, t) => "x" === i.dim ? [e, t] : [t, e];
1220
1253
  return t.map((e, t) => {
1221
- const s = i[t];
1222
- return null == s ? null : null !== e && "object" == typeof e ? {
1254
+ const i = r[t];
1255
+ return null == i ? null : null !== e && "object" == typeof e ? {
1223
1256
  ...e,
1224
- value: r(s, e.value)
1225
- } : r(s, e);
1257
+ value: s(i, e.value)
1258
+ } : s(i, e);
1226
1259
  }).filter((e) => null !== e);
1227
1260
  };
1228
1261
  return {
1229
1262
  xAxisIndex: n,
1230
- yAxisIndex: l,
1263
+ yAxisIndex: o,
1231
1264
  isLog: a,
1232
1265
  placed: p,
1233
1266
  base: (e) => ({
1234
1267
  id: e.id,
1235
1268
  name: e.name,
1236
1269
  xAxisIndex: n,
1237
- yAxisIndex: l,
1270
+ yAxisIndex: o,
1238
1271
  data: p(e, e.values),
1239
1272
  emphasis: { disabled: !0 },
1240
1273
  label: { show: !1 },
@@ -1242,28 +1275,28 @@ var ne = (e) => (t) => {
1242
1275
  })
1243
1276
  };
1244
1277
  },
1245
- paint: m,
1246
- stroke: S,
1247
- line: L,
1248
- width: b,
1278
+ paint: k,
1279
+ stroke: B,
1280
+ line: I,
1281
+ width: w,
1249
1282
  lineSeries: (e, t, i = !1) => ({
1250
1283
  type: "line",
1251
1284
  smooth: t,
1252
1285
  connectNulls: i,
1253
1286
  showSymbol: !!e.marker,
1254
- ...e.marker ? I(e.marker) : {
1287
+ ...e.marker ? $(e.marker) : {
1255
1288
  symbol: "none",
1256
1289
  symbolSize: 0
1257
1290
  },
1258
- lineStyle: L(e.stroke),
1291
+ lineStyle: I(e.stroke),
1259
1292
  itemStyle: {
1260
- color: e.marker && !B[e.marker.symbol] ? m(e.marker.fill) : e.marker ? "transparent" : m(e.stroke?.fill),
1261
- borderColor: m(e.marker?.stroke?.fill),
1262
- borderWidth: b(e.marker?.stroke)
1293
+ color: e.marker && !E[e.marker.symbol] ? k(e.marker.fill) : e.marker ? "transparent" : k(e.stroke?.fill),
1294
+ borderColor: k(e.marker?.stroke?.fill),
1295
+ borderWidth: w(e.marker?.stroke)
1263
1296
  }
1264
1297
  }),
1265
1298
  withMarkerFills: (e, t) => {
1266
- const i = E(e.marker);
1299
+ const i = D(e.marker);
1267
1300
  return i ? [{
1268
1301
  ...t,
1269
1302
  id: `${e.id}:fill`,
@@ -1277,47 +1310,47 @@ var ne = (e) => (t) => {
1277
1310
  opacity: 0
1278
1311
  },
1279
1312
  itemStyle: {
1280
- color: m(i),
1313
+ color: k(i),
1281
1314
  borderWidth: 0
1282
1315
  },
1283
1316
  z: (t.z ?? 2) - .5
1284
1317
  }, t] : [t];
1285
1318
  },
1286
1319
  marker: {
1287
- symbol: I,
1288
- fill: E,
1289
- graphic: $
1320
+ symbol: $,
1321
+ fill: D,
1322
+ graphic: W
1290
1323
  },
1291
- text: D,
1292
- lines: W,
1293
- upDownBars: H
1324
+ text: H,
1325
+ lines: j,
1326
+ upDownBars: G
1294
1327
  };
1295
1328
  };
1296
- function pe(e, t, i) {
1297
- const s = {
1329
+ function ue(e, t, i) {
1330
+ const r = {
1298
1331
  id: String(e.id),
1299
1332
  gridIndex: i,
1300
1333
  position: e.position,
1301
- offset: le(e, t),
1334
+ offset: de(e, t),
1302
1335
  show: !e.deleted,
1303
1336
  inverse: e.reversed,
1304
1337
  axisLine: {
1305
1338
  show: !!e.line && void 0 === e.labelsAt,
1306
1339
  onZero: !1,
1307
- lineStyle: L(e.line)
1340
+ lineStyle: I(e.line)
1308
1341
  },
1309
1342
  axisTick: {
1310
1343
  show: "none" !== e.tickMark && !!e.line,
1311
1344
  inside: "in" === e.tickMark,
1312
1345
  length: e.tickLength,
1313
- lineStyle: L(e.line)
1346
+ lineStyle: I(e.line)
1314
1347
  },
1315
1348
  splitLine: { show: !1 },
1316
1349
  z: 3,
1317
1350
  axisLabel: {
1318
1351
  show: !!e.labelFont && !e.labelVertical,
1319
1352
  margin: e.labelMargin,
1320
- ...e.labelFont ? C(e.labelFont) : {},
1353
+ ...e.labelFont ? S(e.labelFont) : {},
1321
1354
  interval: 0,
1322
1355
  hideOverlap: !1,
1323
1356
  showMinLabel: !0,
@@ -1326,47 +1359,47 @@ function pe(e, t, i) {
1326
1359
  triggerEvent: !0
1327
1360
  };
1328
1361
  return "category" === e.kind ? {
1329
- ...s,
1362
+ ...r,
1330
1363
  type: "category",
1331
1364
  data: e.categories,
1332
1365
  boundaryGap: "between" === e.crossBetween,
1333
1366
  axisTick: {
1334
- ...s.axisTick,
1367
+ ...r.axisTick,
1335
1368
  ...e.dividers ? { show: !1 } : {},
1336
1369
  alignWithLabel: "midCat" === e.crossBetween
1337
1370
  },
1338
1371
  axisLabel: {
1339
- ...s.axisLabel,
1340
- ...he(e),
1372
+ ...r.axisLabel,
1373
+ ...ge(e),
1341
1374
  formatter: (t, i) => e.labels[i] ?? "",
1342
1375
  lineHeight: e.labelLineHeight,
1343
1376
  overflow: "none"
1344
1377
  }
1345
1378
  } : e.logBase ? {
1346
- ...s,
1379
+ ...r,
1347
1380
  type: "log",
1348
1381
  logBase: e.logBase,
1349
1382
  min: e.min,
1350
1383
  max: e.max,
1351
1384
  interval: Math.round(Math.log(e.majorUnit) / Math.log(e.logBase)),
1352
1385
  axisLabel: {
1353
- ...s.axisLabel,
1354
- formatter: ne(e)
1386
+ ...r.axisLabel,
1387
+ formatter: ce(e)
1355
1388
  }
1356
1389
  } : {
1357
- ...s,
1390
+ ...r,
1358
1391
  type: "value",
1359
1392
  min: e.min,
1360
1393
  max: e.max,
1361
1394
  interval: e.majorUnit,
1362
1395
  alignTicks: !1,
1363
1396
  axisLabel: {
1364
- ...s.axisLabel,
1365
- formatter: ne(e)
1397
+ ...r.axisLabel,
1398
+ formatter: ce(e)
1366
1399
  }
1367
1400
  };
1368
1401
  }
1369
- function he(e) {
1402
+ function ge(e) {
1370
1403
  const t = e.labelRotation;
1371
1404
  if ("left" === e.position || "right" === e.position) return {
1372
1405
  rotate: t,
@@ -1384,7 +1417,7 @@ function he(e) {
1384
1417
  verticalAlign: i ? "top" : "bottom"
1385
1418
  };
1386
1419
  }
1387
- function ce(e) {
1420
+ function xe(e) {
1388
1421
  const t = e.entries[0], i = e.entries.length > 1 ? e.entries[1].rect.x - (t.rect.x + t.rect.width) : 0;
1389
1422
  return {
1390
1423
  show: !0,
@@ -1399,59 +1432,59 @@ function ce(e) {
1399
1432
  itemHeight: t?.keyRect.height ?? 10,
1400
1433
  align: "left",
1401
1434
  selectedMode: !1,
1402
- textStyle: C(e.font),
1435
+ textStyle: S(e.font),
1403
1436
  data: e.entries.map((e) => ({ name: e.text }))
1404
1437
  };
1405
1438
  }
1406
- function de(e) {
1439
+ function me(e) {
1407
1440
  const t = [];
1408
- for (const i of e.levels ?? []) for (const e of i.labels) t.push(...D(e, null, null, e.lineHeight));
1409
- if (e.line) for (const { from: i, to: s } of e.dividers ?? []) t.push({
1441
+ for (const i of e.levels ?? []) for (const e of i.labels) t.push(...H(e, null, null, e.lineHeight));
1442
+ if (e.line) for (const { from: i, to: r } of e.dividers ?? []) t.push({
1410
1443
  type: "line",
1411
1444
  silent: !0,
1412
1445
  z: 50,
1413
1446
  shape: {
1414
1447
  x1: i.x,
1415
1448
  y1: i.y,
1416
- x2: s.x,
1417
- y2: s.y
1449
+ x2: r.x,
1450
+ y2: r.y
1418
1451
  },
1419
- style: S(e.line)
1452
+ style: B(e.line)
1420
1453
  });
1421
1454
  return t;
1422
1455
  }
1423
- var ye = .95;
1424
- function fe(e, t) {
1456
+ var be = .95;
1457
+ function ke(e, t) {
1425
1458
  const i = e.labelFont;
1426
1459
  if (!i || e.deleted) return [];
1427
- const s = "bottom" === e.position || "top" === e.position, r = e.labelsAt ?? e.lineAt, n = e.labelLineHeight ?? F(i), l = s ? t.x : t.y + t.height, o = s ? t.width : t.height, a = (e) => s ? l + e * o : l - e * o, p = [];
1460
+ const r = "bottom" === e.position || "top" === e.position, s = e.labelsAt ?? e.lineAt, n = e.labelLineHeight ?? C(i), o = r ? t.x : t.y + t.height, l = r ? t.width : t.height, a = (e) => r ? o + e * l : o - e * l, p = [];
1428
1461
  if ("category" === e.kind) {
1429
1462
  const t = e.categories.length;
1430
- e.labels.forEach((i, s) => {
1463
+ e.labels.forEach((i, r) => {
1431
1464
  if (null === i) return;
1432
- const r = e.reversed ? t - 1 - s : s, n = "between" === e.crossBetween ? (r + .5) / t : 1 === t ? .5 : r / (t - 1);
1465
+ const s = e.reversed ? t - 1 - r : r, n = "between" === e.crossBetween ? (s + .5) / t : 1 === t ? .5 : s / (t - 1);
1433
1466
  p.push([i, a(n)]);
1434
1467
  });
1435
1468
  } else {
1436
1469
  const [t, i] = e.logBase ? [Math.log(e.min), Math.log(e.max)] : [e.min, e.max];
1437
- for (const s of e.ticks) {
1438
- if (!s.label) continue;
1439
- const r = e.logBase ? Math.log(s.value) : s.value, n = i === t ? .5 : (r - t) / (i - t);
1440
- p.push([s.label, a(e.reversed ? 1 - n : n)]);
1470
+ for (const r of e.ticks) {
1471
+ if (!r.label) continue;
1472
+ const s = e.logBase ? Math.log(r.value) : r.value, n = i === t ? .5 : (s - t) / (i - t);
1473
+ p.push([r.label, a(e.reversed ? 1 - n : n)]);
1441
1474
  }
1442
1475
  }
1443
1476
  const h = {
1444
- fill: z(i),
1445
- font: M(i),
1477
+ fill: M(i),
1478
+ font: L(i),
1446
1479
  lineHeight: n
1447
1480
  }, c = [];
1448
1481
  for (const [t, n] of p) {
1449
- if (!s) {
1482
+ if (!r) {
1450
1483
  c.push({
1451
1484
  type: "text",
1452
1485
  silent: !0,
1453
1486
  z: 3,
1454
- x: "left" === e.position ? r - e.labelMargin : r + e.labelMargin,
1487
+ x: "left" === e.position ? s - e.labelMargin : s + e.labelMargin,
1455
1488
  y: n,
1456
1489
  style: {
1457
1490
  ...h,
@@ -1462,13 +1495,13 @@ function fe(e, t) {
1462
1495
  });
1463
1496
  continue;
1464
1497
  }
1465
- const l = t.split(" "), o = ye * F(i);
1466
- l.forEach((t, i) => c.push({
1498
+ const o = t.split(" "), l = be * C(i);
1499
+ o.forEach((t, i) => c.push({
1467
1500
  type: "text",
1468
1501
  silent: !0,
1469
1502
  z: 3,
1470
- x: n + (i - (l.length - 1) / 2) * o,
1471
- y: "bottom" === e.position ? r + e.labelMargin : r - e.labelMargin,
1503
+ x: n + (i - (o.length - 1) / 2) * l,
1504
+ y: "bottom" === e.position ? s + e.labelMargin : s - e.labelMargin,
1472
1505
  style: {
1473
1506
  ...h,
1474
1507
  text: t,
@@ -1479,7 +1512,7 @@ function fe(e, t) {
1479
1512
  }
1480
1513
  return c;
1481
1514
  }
1482
- function ue(e, t) {
1515
+ function we(e, t) {
1483
1516
  return void 0 === e.labelsAt || !e.line || e.deleted ? [] : [{
1484
1517
  type: "line",
1485
1518
  silent: !0,
@@ -1495,10 +1528,10 @@ function ue(e, t) {
1495
1528
  x2: e.lineAt,
1496
1529
  y2: t.y + t.height
1497
1530
  },
1498
- style: S(e.line)
1531
+ style: B(e.line)
1499
1532
  }];
1500
1533
  }
1501
- function ge(e) {
1534
+ function Ae(e) {
1502
1535
  return e.gridlines && e.majorGridlines ? e.gridlines.map((t) => ({
1503
1536
  type: "line",
1504
1537
  silent: !0,
@@ -1511,11 +1544,11 @@ function ge(e) {
1511
1544
  },
1512
1545
  style: {
1513
1546
  fill: "none",
1514
- ...S(e.majorGridlines)
1547
+ ...B(e.majorGridlines)
1515
1548
  }
1516
1549
  })) : [];
1517
1550
  }
1518
- function xe(e) {
1551
+ function ve(e) {
1519
1552
  return e.paths.map((t) => ({
1520
1553
  type: "polyline",
1521
1554
  silent: !0,
@@ -1523,11 +1556,11 @@ function xe(e) {
1523
1556
  shape: { points: t.map((e) => [e.x, e.y]) },
1524
1557
  style: {
1525
1558
  fill: "none",
1526
- ...S(e.stroke)
1559
+ ...B(e.stroke)
1527
1560
  }
1528
1561
  }));
1529
1562
  }
1530
- function me(e) {
1563
+ function Fe(e) {
1531
1564
  const t = e.paths.map((t) => ({
1532
1565
  type: "polyline",
1533
1566
  silent: !0,
@@ -1535,48 +1568,48 @@ function me(e) {
1535
1568
  shape: { points: t.map((e) => [e.x, e.y]) },
1536
1569
  style: {
1537
1570
  fill: "none",
1538
- ...S(e.stroke),
1571
+ ...B(e.stroke),
1539
1572
  lineJoin: "round"
1540
1573
  }
1541
1574
  })), i = e.label;
1542
1575
  if (!i) return t;
1543
- const { rect: s, font: r } = i;
1576
+ const { rect: r, font: s } = i;
1544
1577
  (i.fill || i.border) && t.push({
1545
1578
  type: "rect",
1546
1579
  silent: !0,
1547
1580
  z: 59,
1548
1581
  shape: {
1549
- x: s.x,
1550
- y: s.y,
1551
- width: s.width,
1552
- height: s.height
1582
+ x: r.x,
1583
+ y: r.y,
1584
+ width: r.width,
1585
+ height: r.height
1553
1586
  },
1554
1587
  style: {
1555
- fill: m(i.fill),
1556
- ...S(i.border)
1588
+ fill: k(i.fill),
1589
+ ...B(i.border)
1557
1590
  }
1558
1591
  });
1559
- const n = (e) => M(r, e);
1560
- return i.lines.forEach((e, l) => {
1592
+ const n = (e) => L(s, e);
1593
+ return i.lines.forEach((e, o) => {
1561
1594
  t.push({
1562
1595
  type: "text",
1563
1596
  silent: !0,
1564
1597
  z: 60,
1565
- x: s.x + s.width / 2,
1566
- y: s.y + i.insets.top + (l + .5) * i.lineHeight,
1598
+ x: r.x + r.width / 2,
1599
+ y: r.y + i.insets.top + (o + .5) * i.lineHeight,
1567
1600
  style: {
1568
1601
  x: 0,
1569
1602
  y: 0,
1570
1603
  text: e.map((e) => `{${e.superscript ? "raised" : "plain"}|${e.text}}`).join(""),
1571
1604
  rich: {
1572
1605
  plain: {
1573
- font: n(F(r)),
1574
- fill: z(r),
1606
+ font: n(C(s)),
1607
+ fill: M(s),
1575
1608
  lineHeight: i.lineHeight
1576
1609
  },
1577
1610
  raised: {
1578
1611
  font: n(i.superscriptSize),
1579
- fill: z(r),
1612
+ fill: M(s),
1580
1613
  lineHeight: i.lineHeight,
1581
1614
  verticalAlign: "top"
1582
1615
  }
@@ -1587,43 +1620,43 @@ function me(e) {
1587
1620
  });
1588
1621
  }), t;
1589
1622
  }
1590
- var be = !1;
1591
- function ke() {
1592
- be || (be = !0, s.use([
1593
- d,
1594
- a,
1595
- p,
1623
+ var ze = !1;
1624
+ function Ce() {
1625
+ ze || (ze = !0, n.use([
1626
+ f,
1596
1627
  h,
1597
1628
  c,
1598
- o
1629
+ d,
1630
+ y,
1631
+ p
1599
1632
  ]));
1600
1633
  }
1601
- var we = {
1602
- bar: [r],
1603
- line: [n],
1604
- area: [n],
1605
- scatter: [n],
1606
- bubble: [n],
1607
- pie: [l],
1608
- ofPie: [l]
1609
- }, Ae = /* @__PURE__ */ new Set();
1610
- function ve(t) {
1634
+ var Me = {
1635
+ bar: [o],
1636
+ line: [l],
1637
+ area: [l],
1638
+ scatter: [l],
1639
+ bubble: [l],
1640
+ pie: [a],
1641
+ ofPie: [a]
1642
+ }, Se = /* @__PURE__ */ new Set();
1643
+ function Le(t) {
1611
1644
  for (const i of t.groups) {
1612
1645
  const t = e.typeOf(i);
1613
- if (Ae.has(t)) continue;
1614
- Ae.add(t);
1615
- const r = e.get(t)?.modules?.() ?? we[t] ?? [];
1616
- r.length > 0 && s.use(r);
1646
+ if (Se.has(t)) continue;
1647
+ Se.add(t);
1648
+ const r = e.get(t)?.modules?.() ?? Me[t] ?? [];
1649
+ r.length > 0 && n.use(r);
1617
1650
  }
1618
1651
  }
1619
- function Fe(e, t) {
1620
- ke();
1621
- const i = re(e, {
1652
+ function Be(e, t) {
1653
+ Ce();
1654
+ const i = he(e, {
1622
1655
  interactive: !1,
1623
1656
  ...t
1624
1657
  });
1625
- ve(e);
1626
- const r = s.init(null, null, {
1658
+ Le(e);
1659
+ const r = n.init(null, null, {
1627
1660
  renderer: "svg",
1628
1661
  ssr: !0,
1629
1662
  width: e.width,
@@ -1631,34 +1664,34 @@ function Fe(e, t) {
1631
1664
  });
1632
1665
  return r.setOption(i), r;
1633
1666
  }
1634
- function ze(e, t) {
1635
- const i = Fe(e, t);
1667
+ function Ie(e, t) {
1668
+ const i = Be(e, t);
1636
1669
  try {
1637
1670
  return i.renderToSVGString();
1638
1671
  } finally {
1639
1672
  i.dispose();
1640
1673
  }
1641
1674
  }
1642
- function Ce(e, t, i) {
1643
- ke();
1644
- let r = t;
1645
- const n = re(t, i);
1646
- ve(t);
1647
- const l = s.init(e, null, {
1675
+ function Ee(e, t, i) {
1676
+ Ce();
1677
+ let r = t, s = i;
1678
+ const o = he(t, i);
1679
+ Le(t);
1680
+ const l = n.init(e, null, {
1648
1681
  renderer: "svg",
1649
1682
  width: t.width,
1650
1683
  height: t.height
1651
1684
  });
1652
- return l.setOption(n), {
1653
- update: (e) => {
1685
+ return l.setOption(o), {
1686
+ update: (e, t) => {
1654
1687
  e.width === r.width && e.height === r.height || l.resize({
1655
1688
  width: e.width,
1656
1689
  height: e.height
1657
- }), r = e;
1658
- const t = re(e, i);
1659
- ve(e), l.setOption(t, { notMerge: !0 });
1690
+ }), r = e, t && (s = t);
1691
+ const i = he(e, s);
1692
+ Le(e), l.setOption(i, { notMerge: !0 });
1660
1693
  },
1661
1694
  dispose: () => l.dispose()
1662
1695
  };
1663
1696
  }
1664
- export { Fe as createHeadlessChart, ke as ensureRegistered, Ce as mountChart, ze as renderChartToSVG };
1697
+ export { Be as createHeadlessChart, Ce as ensureRegistered, Ee as mountChart, Ie as renderChartToSVG };