drizzle-cube 0.1.46 → 0.1.48

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.
@@ -1,19 +1,19 @@
1
- import { jsx as s, jsxs as N, Fragment as Te } from "react/jsx-runtime";
2
- import { useState as O, useMemo as pt } from "react";
3
- import { ResponsiveContainer as He, Tooltip as vt, ComposedChart as at, CartesianGrid as ge, XAxis as pe, YAxis as ve, Legend as B, Bar as bt, Cell as je, Line as q, LineChart as Nt, Area as wt, PieChart as At, Pie as kt, ScatterChart as St, Scatter as Oe, RadarChart as Mt, PolarGrid as $t, PolarAngleAxis as Lt, PolarRadiusAxis as Tt, Radar as jt, RadialBarChart as Ft, RadialBar as zt, Treemap as Dt } from "recharts";
4
- import { u as W } from "./providers-aaWIe5KD.js";
5
- function G({ children: e, height: t = "100%" }) {
1
+ import { jsx as s, jsxs as g, Fragment as De } from "react/jsx-runtime";
2
+ import { useState as G, useMemo as bt } from "react";
3
+ import { ResponsiveContainer as Oe, Tooltip as lt, ComposedChart as ot, CartesianGrid as ve, XAxis as be, YAxis as Ne, Legend as W, Bar as Nt, Cell as Ee, Line as K, LineChart as wt, Area as At, PieChart as St, Pie as kt, ScatterChart as Mt, Scatter as Ge, RadarChart as $t, PolarGrid as Lt, PolarAngleAxis as Tt, PolarRadiusAxis as Ft, Radar as Dt, RadialBarChart as Et, RadialBar as jt, Treemap as zt } from "recharts";
4
+ import { u as Y } from "./providers-aaWIe5KD.js";
5
+ function U({ children: e, height: t = "100%" }) {
6
6
  try {
7
7
  if (t === "100%")
8
- return /* @__PURE__ */ s("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ s(He, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
8
+ return /* @__PURE__ */ s("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ s(Oe, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
9
9
  const n = {
10
10
  height: typeof t == "number" ? `${t}px` : t,
11
11
  width: "100%",
12
12
  minHeight: "200px"
13
13
  };
14
- return /* @__PURE__ */ s("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ s(He, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
14
+ return /* @__PURE__ */ s("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ s(Oe, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
15
  } catch (n) {
16
- return /* @__PURE__ */ N(
16
+ return /* @__PURE__ */ g(
17
17
  "div",
18
18
  {
19
19
  className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border border-dashed rounded-lg",
@@ -26,72 +26,23 @@ function G({ children: e, height: t = "100%" }) {
26
26
  );
27
27
  }
28
28
  }
29
- function C({ formatter: e, labelFormatter: t }) {
30
- return /* @__PURE__ */ s(
31
- vt,
32
- {
33
- formatter: e,
34
- labelFormatter: t,
35
- contentStyle: {
36
- backgroundColor: "white",
37
- border: "1px solid #e5e7eb",
38
- borderRadius: "0.5rem",
39
- fontSize: "0.875rem",
40
- color: "#1f2937",
41
- boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
42
- padding: "8px 12px"
43
- }
44
- }
45
- );
46
- }
47
- const j = [
48
- "#3b82f6",
49
- // blue
50
- "#10b981",
51
- // green
52
- "#f59e0b",
53
- // yellow
54
- "#ef4444",
55
- // red
56
- "#8b5cf6",
57
- // purple
58
- "#f97316",
59
- // orange
60
- "#06b6d4",
61
- // cyan
62
- "#84cc16"
63
- // lime
64
- ], ae = [
65
- "#440154",
66
- // dark purple
67
- "#414487",
68
- // purple-blue
69
- "#2a788e",
70
- // teal
71
- "#22a884",
72
- // green-teal
73
- "#7ad151",
74
- // green
75
- "#fde725"
76
- // yellow
77
- ], Ge = "#10b981", Et = "#ef4444", be = {
78
- top: 5,
79
- right: 30,
80
- left: 20,
81
- bottom: 5
82
- };
83
- function Ae(e) {
29
+ function ke(e) {
84
30
  return e != null && !isNaN(Number(e));
85
31
  }
86
- function Z(e) {
32
+ function ee(e) {
87
33
  if (e == null) return null;
88
34
  const t = typeof e == "string" ? parseFloat(e) : Number(e);
89
35
  return isNaN(t) ? null : t;
90
36
  }
91
- function ke(e, t) {
37
+ function O(e) {
38
+ if (e == null) return "No data";
39
+ const t = typeof e == "number" ? e : parseFloat(e);
40
+ return isNaN(t) ? String(e) : Number.isInteger(t) ? t.toLocaleString() : parseFloat(t.toFixed(2)).toLocaleString();
41
+ }
42
+ function Me(e, t) {
92
43
  return t[e] || e;
93
44
  }
94
- function R(e, t) {
45
+ function z(e, t) {
95
46
  if (!e) return String(e || "Unknown");
96
47
  const n = String(e);
97
48
  if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
@@ -119,19 +70,19 @@ function R(e, t) {
119
70
  case "minute":
120
71
  return `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
121
72
  }
122
- const f = i.getUTCSeconds(), u = i.getUTCMilliseconds();
123
- if (c === "01" && d === 0 && o === 0 && f === 0 && u === 0) {
73
+ const u = i.getUTCSeconds(), f = i.getUTCMilliseconds();
74
+ if (c === "01" && d === 0 && o === 0 && u === 0 && f === 0) {
124
75
  if (a === "01" || a === "04" || a === "07" || a === "10") {
125
76
  const m = Math.floor(i.getUTCMonth() / 3) + 1;
126
77
  return `${l}-Q${m}`;
127
78
  }
128
79
  return `${l}-${a}`;
129
80
  }
130
- return d === 0 && o === 0 && f === 0 && u === 0 ? `${l}-${a}-${c}` : o === 0 && f === 0 && u === 0 ? `${l}-${a}-${c} ${String(d).padStart(2, "0")}:00` : `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
81
+ return d === 0 && o === 0 && u === 0 && f === 0 ? `${l}-${a}-${c}` : o === 0 && u === 0 && f === 0 ? `${l}-${a}-${c} ${String(d).padStart(2, "0")}:00` : `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
131
82
  }
132
83
  return n;
133
84
  }
134
- function H(e, t) {
85
+ function I(e, t) {
135
86
  try {
136
87
  if (e?.timeDimensions) {
137
88
  const r = e.timeDimensions.find((i) => t === i.dimension || t.startsWith(i.dimension.replace(".", "_")) || t === `${i.dimension}_${i.granularity}`);
@@ -151,72 +102,127 @@ function H(e, t) {
151
102
  }
152
103
  function Rt(e, t, n, r, i = {}) {
153
104
  if (!e || e.length === 0) return [];
154
- const l = H(r, t);
105
+ const l = I(r, t);
155
106
  return e.map((a) => {
156
107
  const c = {
157
- name: R(a[t], l) || a[t] || "Unknown"
108
+ name: z(a[t], l) || a[t] || "Unknown"
158
109
  };
159
110
  return n.forEach((d) => {
160
- const o = ke(d, i);
161
- c[o] = Z(a[d]);
111
+ const o = Me(d, i);
112
+ c[o] = ee(a[d]);
162
113
  }), c;
163
114
  });
164
115
  }
165
- function te(e, t, n, r, i, l = {}) {
116
+ function ie(e, t, n, r, i, l = {}) {
166
117
  if (!e || e.length === 0)
167
118
  return { data: [], seriesKeys: [], hasDimensions: !1 };
168
119
  const a = r || {}, c = [
169
120
  ...a.dimensions || [],
170
- ...a.timeDimensions?.map((p) => p.dimension) || []
171
- ], d = a.measures || [], o = n.filter((p) => d.includes(p)), f = (i || []).filter((p) => c.includes(p));
172
- if (f.length > 0) {
173
- const p = {};
174
- e.forEach((y) => {
175
- const S = H(r, t), $ = R(y[t], S) || y[t] || "Unknown";
176
- p[$] || (p[$] = { name: String($) }), o.forEach((g) => {
177
- const b = ke(g, l), x = Z(y[g]);
178
- if (x !== null) {
179
- const h = p[$][b];
180
- p[$][b] = h == null ? x : h + x;
181
- } else b in p[$] || (p[$][b] = null);
182
- }), f.forEach((g) => {
183
- const b = y[g];
184
- if (b != null) {
185
- const x = String(b), h = o[0] || d.find(
186
- (A) => A.includes("totalCost") || A.includes("count") || A.includes("sum")
121
+ ...a.timeDimensions?.map((v) => v.dimension) || []
122
+ ], d = a.measures || [], o = n.filter((v) => d.includes(v)), u = (i || []).filter((v) => c.includes(v));
123
+ if (u.length > 0) {
124
+ const v = {};
125
+ e.forEach((h) => {
126
+ const $ = I(r, t), T = z(h[t], $) || h[t] || "Unknown";
127
+ v[T] || (v[T] = { name: String(T) }), o.forEach((N) => {
128
+ const S = Me(N, l), p = ee(h[N]);
129
+ if (p !== null) {
130
+ const x = v[T][S];
131
+ v[T][S] = x == null ? p : x + p;
132
+ } else S in v[T] || (v[T][S] = null);
133
+ }), u.forEach((N) => {
134
+ const S = h[N];
135
+ if (S != null) {
136
+ const p = String(S), x = o[0] || d.find(
137
+ (y) => y.includes("totalCost") || y.includes("count") || y.includes("sum")
187
138
  ) || d[0];
188
- if (h) {
189
- const A = Z(y[h]);
190
- if (A !== null) {
191
- const T = p[$][x];
192
- p[$][x] = T == null ? A : T + A;
193
- } else x in p[$] || (p[$][x] = null);
139
+ if (x) {
140
+ const y = ee(h[x]);
141
+ if (y !== null) {
142
+ const k = v[T][p];
143
+ v[T][p] = k == null ? y : k + y;
144
+ } else p in v[T] || (v[T][p] = null);
194
145
  }
195
146
  }
196
147
  });
197
148
  });
198
- const v = Object.values(p), w = Array.from(new Set(
149
+ const w = Object.values(v), b = Array.from(new Set(
199
150
  e.flatMap(
200
- (y) => f.map((S) => {
201
- const $ = y[S];
202
- return $ != null ? String($) : null;
203
- }).filter((S) => S !== null)
151
+ (h) => u.map(($) => {
152
+ const T = h[$];
153
+ return T != null ? String(T) : null;
154
+ }).filter(($) => $ !== null)
204
155
  )
205
156
  ));
206
157
  return {
207
- data: v,
208
- seriesKeys: w,
158
+ data: w,
159
+ seriesKeys: b,
209
160
  hasDimensions: !0
210
161
  };
211
162
  }
212
- const u = Rt(e, t, n, r, l), m = n.map((p) => ke(p, l));
163
+ const f = Rt(e, t, n, r, l), m = n.map((v) => Me(v, l));
213
164
  return {
214
- data: u,
165
+ data: f,
215
166
  seriesKeys: m,
216
167
  hasDimensions: !1
217
168
  };
218
169
  }
219
- function Fe(e) {
170
+ const Vt = (e, t) => e == null ? ["No data", t] : [O(e), t];
171
+ function X({ formatter: e, labelFormatter: t }) {
172
+ return /* @__PURE__ */ s(
173
+ lt,
174
+ {
175
+ formatter: e || Vt,
176
+ labelFormatter: t,
177
+ contentStyle: {
178
+ backgroundColor: "white",
179
+ border: "1px solid #e5e7eb",
180
+ borderRadius: "0.5rem",
181
+ fontSize: "0.875rem",
182
+ color: "#1f2937",
183
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
184
+ padding: "8px 12px"
185
+ }
186
+ }
187
+ );
188
+ }
189
+ const F = [
190
+ "#3b82f6",
191
+ // blue
192
+ "#10b981",
193
+ // green
194
+ "#f59e0b",
195
+ // yellow
196
+ "#ef4444",
197
+ // red
198
+ "#8b5cf6",
199
+ // purple
200
+ "#f97316",
201
+ // orange
202
+ "#06b6d4",
203
+ // cyan
204
+ "#84cc16"
205
+ // lime
206
+ ], oe = [
207
+ "#440154",
208
+ // dark purple
209
+ "#414487",
210
+ // purple-blue
211
+ "#2a788e",
212
+ // teal
213
+ "#22a884",
214
+ // green-teal
215
+ "#7ad151",
216
+ // green
217
+ "#fde725"
218
+ // yellow
219
+ ], Ue = "#10b981", It = "#ef4444", we = {
220
+ top: 5,
221
+ right: 30,
222
+ left: 20,
223
+ bottom: 5
224
+ };
225
+ function je(e) {
220
226
  if (!e || typeof e != "string")
221
227
  return [];
222
228
  const t = e.trim();
@@ -248,13 +254,13 @@ function ze(e, t) {
248
254
  }
249
255
  return n;
250
256
  }
251
- function Bn(e, t) {
257
+ function Yn(e, t) {
252
258
  return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
253
259
  }
254
- function Wn(e, t = 1) {
260
+ function Xn(e, t = 1) {
255
261
  return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
256
262
  }
257
- function Yn({
263
+ function Qn({
258
264
  data: e,
259
265
  chartConfig: t,
260
266
  displayConfig: n = {},
@@ -262,64 +268,64 @@ function Yn({
262
268
  height: i = "100%",
263
269
  colorPalette: l
264
270
  }) {
265
- const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
271
+ const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
266
272
  try {
267
- const f = {
273
+ const u = {
268
274
  showLegend: n?.showLegend ?? !0,
269
275
  showGrid: n?.showGrid ?? !0,
270
276
  showTooltip: n?.showTooltip ?? !0,
271
277
  stacked: n?.stacked ?? !1
272
278
  };
273
279
  if (!e || e.length === 0)
274
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
280
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
275
281
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
276
282
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
277
283
  ] }) });
278
- let u, m, p = [];
284
+ let f, m, v = [];
279
285
  if (t?.xAxis && t?.yAxis)
280
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
286
+ f = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
281
287
  else if (t?.x && t?.y)
282
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
288
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
283
289
  else
284
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
290
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
285
291
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
286
292
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
287
293
  ] }) });
288
- if (!u || !m || m.length === 0)
289
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
294
+ if (!f || !m || m.length === 0)
295
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
290
296
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
291
297
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
292
298
  ] }) });
293
- const { data: v, seriesKeys: w } = te(
299
+ const { data: w, seriesKeys: b } = ie(
294
300
  e,
295
- u,
301
+ f,
296
302
  m,
297
303
  r,
298
- p,
304
+ v,
299
305
  d
300
- ), { chartData: y, skippedCount: S } = pt(() => {
301
- const k = v.filter((M) => w.some((D) => Ae(M[D]))), L = v.length - k.length;
302
- return { chartData: k, skippedCount: L };
303
- }, [v, w]), $ = f.stacked === !0, g = w.length === 1 && y.some((k) => {
304
- const L = k[w[0]];
306
+ ), { chartData: h, skippedCount: $ } = bt(() => {
307
+ const A = w.filter((M) => b.some((D) => ke(M[D]))), L = w.length - A.length;
308
+ return { chartData: A, skippedCount: L };
309
+ }, [w, b]), T = u.stacked === !0, N = b.length === 1 && h.some((A) => {
310
+ const L = A[b[0]];
305
311
  return typeof L == "number" && L < 0;
306
- }), b = f.showLegend, x = {
307
- ...be,
312
+ }), S = u.showLegend, p = {
313
+ ...we,
308
314
  left: 40
309
315
  // Increased from 20 to 40 for Y-axis label space
310
- }, h = Fe(n?.target || ""), A = ze(h, y.length);
311
- let T = y;
312
- return A.length > 0 && (T = y.map((k, L) => ({
313
- ...k,
314
- __target: A[L] || null
315
- }))), !y || y.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
316
+ }, x = je(n?.target || ""), y = ze(x, h.length);
317
+ let k = h;
318
+ return y.length > 0 && (k = h.map((A, L) => ({
319
+ ...A,
320
+ __target: y[L] || null
321
+ }))), !h || h.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
316
322
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
317
323
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
318
- ] }) }) : /* @__PURE__ */ N("div", { className: "relative w-full", style: { height: i }, children: [
319
- /* @__PURE__ */ s(G, { height: S > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ N(at, { data: T, margin: x, children: [
320
- f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
324
+ ] }) }) : /* @__PURE__ */ g("div", { className: "relative w-full", style: { height: i }, children: [
325
+ /* @__PURE__ */ s(U, { height: $ > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ g(ot, { data: k, margin: p, children: [
326
+ u.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
321
327
  /* @__PURE__ */ s(
322
- pe,
328
+ be,
323
329
  {
324
330
  dataKey: "name",
325
331
  tick: { fontSize: 12 },
@@ -329,20 +335,20 @@ function Yn({
329
335
  }
330
336
  ),
331
337
  /* @__PURE__ */ s(
332
- ve,
338
+ Ne,
333
339
  {
334
340
  tick: { fontSize: 12 },
335
341
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
336
342
  }
337
343
  ),
338
- f.showTooltip && /* @__PURE__ */ s(
339
- C,
344
+ u.showTooltip && /* @__PURE__ */ s(
345
+ X,
340
346
  {
341
- formatter: (k, L) => k == null ? ["No data", L] : L === "Target" ? [`${k}`, "Target Value"] : [k, L]
347
+ formatter: (A, L) => A == null ? ["No data", L] : L === "Target" ? [O(A), "Target Value"] : [O(A), L]
342
348
  }
343
349
  ),
344
- b && /* @__PURE__ */ s(
345
- B,
350
+ S && /* @__PURE__ */ s(
351
+ W,
346
352
  {
347
353
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
348
354
  iconType: "rect",
@@ -350,34 +356,34 @@ function Yn({
350
356
  layout: "horizontal",
351
357
  align: "center",
352
358
  verticalAlign: "bottom",
353
- onMouseEnter: (k) => c(String(k.dataKey || "")),
359
+ onMouseEnter: (A) => c(String(A.dataKey || "")),
354
360
  onMouseLeave: () => c(null)
355
361
  }
356
362
  ),
357
- w.map((k, L) => /* @__PURE__ */ s(
358
- bt,
363
+ b.map((A, L) => /* @__PURE__ */ s(
364
+ Nt,
359
365
  {
360
- dataKey: k,
361
- stackId: $ ? "stack" : void 0,
362
- fill: g ? Ge : l?.colors && l.colors[L % l.colors.length] || j[L % j.length],
363
- fillOpacity: a ? a === k ? 1 : 0.3 : 1,
364
- children: g && y.map((M, D) => {
365
- const F = M[k], _ = typeof F == "number" && F < 0 ? Et : Ge;
366
+ dataKey: A,
367
+ stackId: T ? "stack" : void 0,
368
+ fill: N ? Ue : l?.colors && l.colors[L % l.colors.length] || F[L % F.length],
369
+ fillOpacity: a ? a === A ? 1 : 0.3 : 1,
370
+ children: N && h.map((M, D) => {
371
+ const E = M[A], R = typeof E == "number" && E < 0 ? It : Ue;
366
372
  return /* @__PURE__ */ s(
367
- je,
373
+ Ee,
368
374
  {
369
- fill: _,
370
- fillOpacity: a ? a === k ? 1 : 0.3 : 1
375
+ fill: R,
376
+ fillOpacity: a ? a === A ? 1 : 0.3 : 1
371
377
  },
372
378
  `cell-${D}`
373
379
  );
374
380
  })
375
381
  },
376
- k
382
+ A
377
383
  )),
378
- A.length > 0 && /* @__PURE__ */ N(Te, { children: [
384
+ y.length > 0 && /* @__PURE__ */ g(De, { children: [
379
385
  /* @__PURE__ */ s(
380
- q,
386
+ K,
381
387
  {
382
388
  type: "monotone",
383
389
  dataKey: "__target",
@@ -389,7 +395,7 @@ function Yn({
389
395
  }
390
396
  ),
391
397
  /* @__PURE__ */ s(
392
- q,
398
+ K,
393
399
  {
394
400
  type: "monotone",
395
401
  dataKey: "__target",
@@ -404,22 +410,22 @@ function Yn({
404
410
  )
405
411
  ] })
406
412
  ] }) }),
407
- S > 0 && /* @__PURE__ */ N("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
408
- S,
413
+ $ > 0 && /* @__PURE__ */ g("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
414
+ $,
409
415
  " data point",
410
- S !== 1 ? "s" : "",
416
+ $ !== 1 ? "s" : "",
411
417
  " with no values hidden"
412
418
  ] })
413
419
  ] });
414
- } catch (f) {
415
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
420
+ } catch (u) {
421
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
416
422
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
417
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
423
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
418
424
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
419
425
  ] }) });
420
426
  }
421
427
  }
422
- function Xn({
428
+ function Zn({
423
429
  data: e,
424
430
  chartConfig: t,
425
431
  displayConfig: n = {},
@@ -427,56 +433,56 @@ function Xn({
427
433
  height: i = "100%",
428
434
  colorPalette: l
429
435
  }) {
430
- const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
436
+ const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
431
437
  try {
432
- const f = {
438
+ const u = {
433
439
  showLegend: n?.showLegend ?? !0,
434
440
  showGrid: n?.showGrid ?? !0,
435
441
  showTooltip: n?.showTooltip ?? !0
436
442
  };
437
443
  if (!e || e.length === 0)
438
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
444
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
439
445
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
440
446
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
441
447
  ] }) });
442
- let u, m, p = [];
448
+ let f, m, v = [];
443
449
  if (t?.xAxis && t?.yAxis)
444
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
450
+ f = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
445
451
  else if (t?.x && t?.y)
446
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
452
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
447
453
  else
448
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
454
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
449
455
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
450
456
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
451
457
  ] }) });
452
- if (!u || !m || m.length === 0)
453
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
458
+ if (!f || !m || m.length === 0)
459
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
454
460
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
455
461
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
456
462
  ] }) });
457
- const { data: v, seriesKeys: w } = te(
463
+ const { data: w, seriesKeys: b } = ie(
458
464
  e,
459
- u,
465
+ f,
460
466
  m,
461
467
  r,
462
- p,
468
+ v,
463
469
  d
464
- ), y = f.showLegend, S = {
465
- ...be,
470
+ ), h = u.showLegend, $ = {
471
+ ...we,
466
472
  left: 40
467
473
  // Increased from 20 to 40 for Y-axis label space
468
- }, $ = Fe(n?.target || ""), g = ze($, v.length);
469
- let b = v;
470
- return g.length > 0 && (b = v.map((x, h) => ({
471
- ...x,
472
- __target: g[h] || null
473
- }))), !v || v.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
474
+ }, T = je(n?.target || ""), N = ze(T, w.length);
475
+ let S = w;
476
+ return N.length > 0 && (S = w.map((p, x) => ({
477
+ ...p,
478
+ __target: N[x] || null
479
+ }))), !w || w.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
474
480
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
475
481
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
476
- ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(Nt, { data: b, margin: S, children: [
477
- f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
482
+ ] }) }) : /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g(wt, { data: S, margin: $, children: [
483
+ u.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
478
484
  /* @__PURE__ */ s(
479
- pe,
485
+ be,
480
486
  {
481
487
  dataKey: "name",
482
488
  tick: { fontSize: 12 },
@@ -486,20 +492,20 @@ function Xn({
486
492
  }
487
493
  ),
488
494
  /* @__PURE__ */ s(
489
- ve,
495
+ Ne,
490
496
  {
491
497
  tick: { fontSize: 12 },
492
498
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
493
499
  }
494
500
  ),
495
- f.showTooltip && /* @__PURE__ */ s(
496
- C,
501
+ u.showTooltip && /* @__PURE__ */ s(
502
+ X,
497
503
  {
498
- formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
504
+ formatter: (p, x) => p == null ? ["No data", x] : x === "Target" ? [O(p), "Target Value"] : [O(p), x]
499
505
  }
500
506
  ),
501
- y && /* @__PURE__ */ s(
502
- B,
507
+ h && /* @__PURE__ */ s(
508
+ W,
503
509
  {
504
510
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
505
511
  iconType: "line",
@@ -507,27 +513,27 @@ function Xn({
507
513
  layout: "horizontal",
508
514
  align: "center",
509
515
  verticalAlign: "bottom",
510
- onMouseEnter: (x) => c(String(x.dataKey || "")),
516
+ onMouseEnter: (p) => c(String(p.dataKey || "")),
511
517
  onMouseLeave: () => c(null)
512
518
  }
513
519
  ),
514
- w.map((x, h) => /* @__PURE__ */ s(
515
- q,
520
+ b.map((p, x) => /* @__PURE__ */ s(
521
+ K,
516
522
  {
517
523
  type: "monotone",
518
- dataKey: x,
519
- stroke: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
524
+ dataKey: p,
525
+ stroke: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
520
526
  strokeWidth: 2,
521
527
  dot: { r: 3 },
522
528
  activeDot: { r: 5 },
523
- strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
529
+ strokeOpacity: a ? a === p ? 1 : 0.3 : 1,
524
530
  connectNulls: !1
525
531
  },
526
- x
532
+ p
527
533
  )),
528
- g.length > 0 && /* @__PURE__ */ N(Te, { children: [
534
+ N.length > 0 && /* @__PURE__ */ g(De, { children: [
529
535
  /* @__PURE__ */ s(
530
- q,
536
+ K,
531
537
  {
532
538
  type: "monotone",
533
539
  dataKey: "__target",
@@ -539,7 +545,7 @@ function Xn({
539
545
  }
540
546
  ),
541
547
  /* @__PURE__ */ s(
542
- q,
548
+ K,
543
549
  {
544
550
  type: "monotone",
545
551
  dataKey: "__target",
@@ -554,15 +560,15 @@ function Xn({
554
560
  )
555
561
  ] })
556
562
  ] }) });
557
- } catch (f) {
558
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
563
+ } catch (u) {
564
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
559
565
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
560
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
566
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
561
567
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
562
568
  ] }) });
563
569
  }
564
570
  }
565
- function Qn({
571
+ function Jn({
566
572
  data: e,
567
573
  chartConfig: t,
568
574
  displayConfig: n = {},
@@ -570,57 +576,57 @@ function Qn({
570
576
  height: i = "100%",
571
577
  colorPalette: l
572
578
  }) {
573
- const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
579
+ const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
574
580
  try {
575
- const f = {
581
+ const u = {
576
582
  showLegend: n?.showLegend ?? !0,
577
583
  showGrid: n?.showGrid ?? !0,
578
584
  showTooltip: n?.showTooltip ?? !0,
579
585
  stacked: n?.stacked ?? !1
580
586
  };
581
587
  if (!e || e.length === 0)
582
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
588
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
583
589
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
584
590
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
585
591
  ] }) });
586
- let u, m, p = [];
592
+ let f, m, v = [];
587
593
  if (t?.xAxis && t?.yAxis)
588
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
594
+ f = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
589
595
  else if (t?.x && t?.y)
590
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
596
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
591
597
  else
592
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
598
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
593
599
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
594
600
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
595
601
  ] }) });
596
- if (!u || !m || m.length === 0)
597
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
602
+ if (!f || !m || m.length === 0)
603
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
598
604
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
599
605
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
600
606
  ] }) });
601
- const { data: v, seriesKeys: w } = te(
607
+ const { data: w, seriesKeys: b } = ie(
602
608
  e,
603
- u,
609
+ f,
604
610
  m,
605
611
  r,
606
- p,
612
+ v,
607
613
  d
608
- ), y = f.showLegend, S = {
609
- ...be,
614
+ ), h = u.showLegend, $ = {
615
+ ...we,
610
616
  left: 40
611
617
  // Increased from 20 to 40 for Y-axis label space
612
- }, $ = Fe(n?.target || ""), g = ze($, v.length);
613
- let b = v;
614
- return g.length > 0 && (b = v.map((x, h) => ({
615
- ...x,
616
- __target: g[h] || null
617
- }))), !v || v.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
618
+ }, T = je(n?.target || ""), N = ze(T, w.length);
619
+ let S = w;
620
+ return N.length > 0 && (S = w.map((p, x) => ({
621
+ ...p,
622
+ __target: N[x] || null
623
+ }))), !w || w.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
618
624
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
619
625
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
620
- ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(at, { data: b, margin: S, children: [
621
- f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
626
+ ] }) }) : /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g(ot, { data: S, margin: $, children: [
627
+ u.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
622
628
  /* @__PURE__ */ s(
623
- pe,
629
+ be,
624
630
  {
625
631
  dataKey: "name",
626
632
  tick: { fontSize: 12 },
@@ -630,20 +636,20 @@ function Qn({
630
636
  }
631
637
  ),
632
638
  /* @__PURE__ */ s(
633
- ve,
639
+ Ne,
634
640
  {
635
641
  tick: { fontSize: 12 },
636
642
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
637
643
  }
638
644
  ),
639
- f.showTooltip && /* @__PURE__ */ s(
640
- C,
645
+ u.showTooltip && /* @__PURE__ */ s(
646
+ X,
641
647
  {
642
- formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
648
+ formatter: (p, x) => p == null ? ["No data", x] : x === "Target" ? [O(p), "Target Value"] : [O(p), x]
643
649
  }
644
650
  ),
645
- y && /* @__PURE__ */ s(
646
- B,
651
+ h && /* @__PURE__ */ s(
652
+ W,
647
653
  {
648
654
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
649
655
  iconType: "rect",
@@ -651,28 +657,28 @@ function Qn({
651
657
  layout: "horizontal",
652
658
  align: "center",
653
659
  verticalAlign: "bottom",
654
- onMouseEnter: (x) => c(String(x.dataKey || "")),
660
+ onMouseEnter: (p) => c(String(p.dataKey || "")),
655
661
  onMouseLeave: () => c(null)
656
662
  }
657
663
  ),
658
- w.map((x, h) => /* @__PURE__ */ s(
659
- wt,
664
+ b.map((p, x) => /* @__PURE__ */ s(
665
+ At,
660
666
  {
661
667
  type: "monotone",
662
- dataKey: x,
663
- stackId: f.stacked ? "stack" : void 0,
664
- stroke: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
665
- fill: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
666
- fillOpacity: a ? a === x ? 0.6 : 0.1 : 0.3,
668
+ dataKey: p,
669
+ stackId: u.stacked ? "stack" : void 0,
670
+ stroke: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
671
+ fill: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
672
+ fillOpacity: a ? a === p ? 0.6 : 0.1 : 0.3,
667
673
  strokeWidth: 2,
668
- strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
674
+ strokeOpacity: a ? a === p ? 1 : 0.3 : 1,
669
675
  connectNulls: !1
670
676
  },
671
- x
677
+ p
672
678
  )),
673
- g.length > 0 && /* @__PURE__ */ N(Te, { children: [
679
+ N.length > 0 && /* @__PURE__ */ g(De, { children: [
674
680
  /* @__PURE__ */ s(
675
- q,
681
+ K,
676
682
  {
677
683
  type: "monotone",
678
684
  dataKey: "__target",
@@ -684,7 +690,7 @@ function Qn({
684
690
  }
685
691
  ),
686
692
  /* @__PURE__ */ s(
687
- q,
693
+ K,
688
694
  {
689
695
  type: "monotone",
690
696
  dataKey: "__target",
@@ -699,15 +705,15 @@ function Qn({
699
705
  )
700
706
  ] })
701
707
  ] }) });
702
- } catch (f) {
703
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
708
+ } catch (u) {
709
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
704
710
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
705
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
711
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
706
712
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
707
713
  ] }) });
708
714
  }
709
715
  }
710
- function Zn({
716
+ function Pn({
711
717
  data: e,
712
718
  chartConfig: t,
713
719
  displayConfig: n = {},
@@ -715,89 +721,89 @@ function Zn({
715
721
  height: i = "100%",
716
722
  colorPalette: l
717
723
  }) {
718
- const [a, c] = O(null), { labelMap: d } = W();
724
+ const [a, c] = G(null), { labelMap: d } = Y();
719
725
  try {
720
726
  const o = {
721
727
  showLegend: n?.showLegend ?? !0,
722
728
  showTooltip: n?.showTooltip ?? !0
723
729
  };
724
730
  if (!e || e.length === 0)
725
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
731
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
726
732
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
727
733
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
728
734
  ] }) });
729
- let f, u, m, p = [];
735
+ let u, f, m, v = [];
730
736
  if (t?.xAxis && t?.yAxis)
731
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
737
+ f = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
732
738
  else if (t?.x && t?.y)
733
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
739
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
734
740
  else
735
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
741
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
736
742
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
737
743
  /* @__PURE__ */ s("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
738
744
  ] }) });
739
- if (!u || !m || m.length === 0)
740
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
745
+ if (!f || !m || m.length === 0)
746
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
741
747
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
742
748
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
743
749
  ] }) });
744
- if (p.length > 0) {
745
- const { data: w } = te(
750
+ if (v.length > 0) {
751
+ const { data: b } = ie(
746
752
  e,
747
- u,
753
+ f,
748
754
  m,
749
755
  r,
750
- p,
756
+ v,
751
757
  d
752
758
  );
753
- if (f = [], w.length > 0) {
754
- const y = w[0];
755
- Object.keys(y).forEach((S) => {
756
- S !== "name" && typeof y[S] == "number" && f.push({
757
- name: String(S),
758
- value: y[S]
759
+ if (u = [], b.length > 0) {
760
+ const h = b[0];
761
+ Object.keys(h).forEach(($) => {
762
+ $ !== "name" && typeof h[$] == "number" && u.push({
763
+ name: String($),
764
+ value: h[$]
759
765
  });
760
766
  });
761
767
  }
762
768
  } else {
763
- const w = H(r, u);
764
- f = e.map((y) => {
765
- let S = R(y[u], w) || String(y[u]) || "Unknown";
766
- return typeof y[u] == "boolean" ? S = y[u] ? "Active" : "Inactive" : (S === "true" || S === "false") && (S = S === "true" ? "Active" : "Inactive"), {
767
- name: S,
768
- value: typeof y[m[0]] == "string" ? parseFloat(y[m[0]]) : y[m[0]] || 0
769
+ const b = I(r, f);
770
+ u = e.map((h) => {
771
+ let $ = z(h[f], b) || String(h[f]) || "Unknown";
772
+ return typeof h[f] == "boolean" ? $ = h[f] ? "Active" : "Inactive" : ($ === "true" || $ === "false") && ($ = $ === "true" ? "Active" : "Inactive"), {
773
+ name: $,
774
+ value: typeof h[m[0]] == "string" ? parseFloat(h[m[0]]) : h[m[0]] || 0
769
775
  };
770
776
  });
771
777
  }
772
- const v = f.length;
773
- return f = f.filter(
774
- (w) => w.value != null && !isNaN(w.value) && w.value !== 0 && w.value > 0
775
- ), f.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
778
+ const w = u.length;
779
+ return u = u.filter(
780
+ (b) => b.value != null && !isNaN(b.value) && b.value !== 0 && b.value > 0
781
+ ), u.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
776
782
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
777
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: v > 0 ? `Filtered out ${v} data points (zero or invalid values)` : "No data points to display in pie chart" })
778
- ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(At, { children: [
783
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: w > 0 ? `Filtered out ${w} data points (zero or invalid values)` : "No data points to display in pie chart" })
784
+ ] }) }) : /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g(St, { children: [
779
785
  /* @__PURE__ */ s(
780
786
  kt,
781
787
  {
782
- data: f,
788
+ data: u,
783
789
  cx: "50%",
784
790
  cy: "50%",
785
791
  outerRadius: "70%",
786
792
  dataKey: "value",
787
- label: o.showLegend ? void 0 : ({ name: w, percent: y }) => `${w} ${((y || 0) * 100).toFixed(0)}%`,
788
- children: f.map((w, y) => /* @__PURE__ */ s(
789
- je,
793
+ label: o.showLegend ? void 0 : ({ name: b, percent: h }) => `${b} ${((h || 0) * 100).toFixed(0)}%`,
794
+ children: u.map((b, h) => /* @__PURE__ */ s(
795
+ Ee,
790
796
  {
791
- fill: l?.colors && l.colors[y % l.colors.length] || j[y % j.length],
792
- fillOpacity: a ? a === f[y].name ? 1 : 0.3 : 1
797
+ fill: l?.colors && l.colors[h % l.colors.length] || F[h % F.length],
798
+ fillOpacity: a ? a === u[h].name ? 1 : 0.3 : 1
793
799
  },
794
- `cell-${y}`
800
+ `cell-${h}`
795
801
  ))
796
802
  }
797
803
  ),
798
- o.showTooltip && /* @__PURE__ */ s(C, {}),
804
+ o.showTooltip && /* @__PURE__ */ s(X, {}),
799
805
  o.showLegend && /* @__PURE__ */ s(
800
- B,
806
+ W,
801
807
  {
802
808
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
803
809
  iconType: "circle",
@@ -805,20 +811,20 @@ function Zn({
805
811
  layout: "horizontal",
806
812
  align: "center",
807
813
  verticalAlign: "bottom",
808
- onMouseEnter: (w) => c(String(w.value || "")),
814
+ onMouseEnter: (b) => c(String(b.value || "")),
809
815
  onMouseLeave: () => c(null)
810
816
  }
811
817
  )
812
818
  ] }) });
813
819
  } catch (o) {
814
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
820
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
815
821
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
816
822
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
817
823
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
818
824
  ] }) });
819
825
  }
820
826
  }
821
- function Jn({
827
+ function er({
822
828
  data: e,
823
829
  chartConfig: t,
824
830
  displayConfig: n = {},
@@ -826,7 +832,7 @@ function Jn({
826
832
  height: i = "100%",
827
833
  colorPalette: l
828
834
  }) {
829
- const [a, c] = O(null), { getFieldLabel: d } = W();
835
+ const [a, c] = G(null), { getFieldLabel: d } = Y();
830
836
  try {
831
837
  const o = {
832
838
  showLegend: n?.showLegend ?? !0,
@@ -834,86 +840,139 @@ function Jn({
834
840
  showTooltip: n?.showTooltip ?? !0
835
841
  };
836
842
  if (!e || e.length === 0)
837
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
843
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
838
844
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
839
845
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
840
846
  ] }) });
841
- let f, u, m = [];
842
- if (t?.xAxis && t?.yAxis)
843
- f = t.xAxis[0], u = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = t.series || [];
844
- else if (t?.x && t?.y)
845
- f = t.x, u = Array.isArray(t.y) ? t.y[0] : t.y;
847
+ let u, f, m = [];
848
+ if (t?.xAxis && t?.yAxis) {
849
+ u = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
850
+ const x = t.series;
851
+ m = x ? Array.isArray(x) ? x : [x] : [];
852
+ } else if (t?.x && t?.y)
853
+ u = t.x, f = Array.isArray(t.y) ? t.y[0] : t.y;
846
854
  else
847
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
855
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
848
856
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
849
857
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
850
858
  ] }) });
851
- if (!f || !u)
852
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
859
+ if (!u || !f)
860
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
853
861
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
854
862
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
855
863
  ] }) });
856
- let p, v = {};
864
+ const w = (r?.timeDimensions || []).map((x) => x.dimension);
865
+ let b, h = {};
857
866
  if (m.length > 0) {
858
- const g = m[0];
859
- e.forEach((x) => {
860
- const h = String(x[g] || "Default");
861
- v[h] || (v[h] = []);
862
- const A = H(r, f), T = R(x[f], A) || x[f], k = Z(x[u]), L = typeof T == "string" ? parseFloat(T) : T;
863
- Ae(L) && k !== null && v[h].push({
864
- x: L,
865
- y: k,
866
- name: `${h} (${T}, ${k})`
867
- });
868
- });
869
- const b = Object.keys(v);
870
- p = v[b[0]] || [];
867
+ const x = m[0];
868
+ e.forEach((k) => {
869
+ const A = String(k[x] || "Default");
870
+ h[A] || (h[A] = []);
871
+ const L = I(r, u), M = z(k[u], L) || k[u], D = ee(k[f]), E = typeof M == "string" ? parseFloat(M) : M;
872
+ if (ke(E) && D !== null) {
873
+ const R = {};
874
+ w.forEach((q) => {
875
+ if (k[q]) {
876
+ const Q = I(r, q);
877
+ R[q] = z(k[q], Q);
878
+ }
879
+ }), h[A].push({
880
+ x: E,
881
+ y: D,
882
+ name: A,
883
+ timeValues: R,
884
+ originalItem: k
885
+ });
886
+ }
887
+ }), b = Object.keys(h).flatMap((k) => h[k]);
871
888
  } else {
872
- const g = H(r, f);
873
- p = e.map((b) => {
874
- const x = R(b[f], g) || b[f], h = Z(b[u]), A = typeof x == "string" ? parseFloat(x) : x;
875
- return {
876
- x: A,
877
- y: h,
878
- name: `(${x}, ${h})`,
879
- isValid: Ae(A) && h !== null
889
+ const x = I(r, u);
890
+ b = e.map((y) => {
891
+ const k = z(y[u], x) || y[u], A = ee(y[f]), L = typeof k == "string" ? parseFloat(k) : k, M = {};
892
+ return w.forEach((D) => {
893
+ if (y[D]) {
894
+ const E = I(r, D);
895
+ M[D] = z(y[D], E);
896
+ }
897
+ }), {
898
+ x: L,
899
+ y: A,
900
+ name: "Point",
901
+ timeValues: M,
902
+ originalItem: y,
903
+ isValid: ke(L) && A !== null
880
904
  };
881
- }).filter((b) => b.isValid);
905
+ }).filter((y) => y.isValid);
882
906
  }
883
- if (!p || p.length === 0)
884
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
907
+ if (!b || b.length === 0)
908
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
885
909
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
886
910
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
887
911
  ] }) });
888
- const w = Object.keys(v), y = w.length > 1, S = o.showLegend && y, $ = {
889
- ...be,
912
+ const $ = Object.keys(h), N = $.length > 1 && $.length <= 20, S = o.showLegend && N, p = {
913
+ ...we,
890
914
  left: 40
891
915
  // Increased from 20 to 40 for Y-axis label space
892
916
  };
893
- return /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(St, { data: p, margin: $, children: [
894
- o.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
917
+ return /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g(Mt, { margin: p, children: [
918
+ o.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
895
919
  /* @__PURE__ */ s(
896
- pe,
920
+ be,
897
921
  {
898
922
  type: "number",
899
923
  dataKey: "x",
900
- name: d(f),
924
+ name: d(u),
901
925
  tick: { fontSize: 12 }
902
926
  }
903
927
  ),
904
928
  /* @__PURE__ */ s(
905
- ve,
929
+ Ne,
906
930
  {
907
931
  type: "number",
908
932
  dataKey: "y",
909
- name: d(u),
933
+ name: d(f),
910
934
  tick: { fontSize: 12 },
911
- label: { value: d(u), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
935
+ label: { value: d(f), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
936
+ }
937
+ ),
938
+ o.showTooltip && /* @__PURE__ */ s(
939
+ lt,
940
+ {
941
+ cursor: { strokeDasharray: "3 3" },
942
+ content: ({ active: x, payload: y }) => {
943
+ if (!x || !y || y.length === 0) return null;
944
+ const k = y[0]?.payload;
945
+ return k ? /* @__PURE__ */ g("div", { style: {
946
+ backgroundColor: "white",
947
+ border: "1px solid #e5e7eb",
948
+ borderRadius: "0.5rem",
949
+ fontSize: "0.875rem",
950
+ color: "#1f2937",
951
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
952
+ padding: "8px 12px"
953
+ }, children: [
954
+ /* @__PURE__ */ s("div", { style: { fontWeight: 600, marginBottom: "4px" }, children: k.name }),
955
+ k.timeValues && Object.keys(k.timeValues).length > 0 && /* @__PURE__ */ s("div", { style: { marginBottom: "4px", color: "#6b7280" }, children: Object.entries(k.timeValues).map(([A, L]) => /* @__PURE__ */ g("div", { children: [
956
+ d(A),
957
+ ": ",
958
+ L
959
+ ] }, A)) }),
960
+ /* @__PURE__ */ g("div", { children: [
961
+ d(u),
962
+ ": ",
963
+ O(k.x)
964
+ ] }),
965
+ /* @__PURE__ */ g("div", { children: [
966
+ d(f),
967
+ ": ",
968
+ O(k.y)
969
+ ] })
970
+ ] }) : null;
971
+ }
912
972
  }
913
973
  ),
914
- o.showTooltip && /* @__PURE__ */ s(C, {}),
915
974
  S && /* @__PURE__ */ s(
916
- B,
975
+ W,
917
976
  {
918
977
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
919
978
  iconType: "circle",
@@ -921,43 +980,43 @@ function Jn({
921
980
  layout: "horizontal",
922
981
  align: "center",
923
982
  verticalAlign: "bottom",
924
- onMouseEnter: (g) => c(String(g.dataKey || "")),
983
+ onMouseEnter: (x) => c(String(x.dataKey || "")),
925
984
  onMouseLeave: () => c(null)
926
985
  }
927
986
  ),
928
- y ? (
987
+ N ? (
929
988
  // Multiple series
930
- w.map((g, b) => /* @__PURE__ */ s(
931
- Oe,
989
+ $.map((x, y) => /* @__PURE__ */ s(
990
+ Ge,
932
991
  {
933
- name: g,
934
- data: v[g],
935
- fill: l?.colors && l.colors[b % l.colors.length] || j[b % j.length],
936
- fillOpacity: a ? a === g ? 1 : 0.3 : 1
992
+ name: x,
993
+ data: h[x],
994
+ fill: l?.colors && l.colors[y % l.colors.length] || F[y % F.length],
995
+ fillOpacity: a ? a === x ? 1 : 0.3 : 1
937
996
  },
938
- g
997
+ x
939
998
  ))
940
999
  ) : (
941
1000
  // Single series
942
1001
  /* @__PURE__ */ s(
943
- Oe,
1002
+ Ge,
944
1003
  {
945
1004
  name: "Data",
946
- data: p,
947
- fill: l?.colors && l.colors[0] || j[0]
1005
+ data: b,
1006
+ fill: l?.colors && l.colors[0] || F[0]
948
1007
  }
949
1008
  )
950
1009
  )
951
1010
  ] }) });
952
1011
  } catch (o) {
953
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1012
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
954
1013
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
955
1014
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
956
1015
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
957
1016
  ] }) });
958
1017
  }
959
1018
  }
960
- function Pn({
1019
+ function tr({
961
1020
  data: e,
962
1021
  chartConfig: t,
963
1022
  displayConfig: n = {},
@@ -965,7 +1024,7 @@ function Pn({
965
1024
  height: i = "100%",
966
1025
  colorPalette: l
967
1026
  }) {
968
- const [a, c] = O(null);
1027
+ const [a, c] = G(null);
969
1028
  try {
970
1029
  const d = {
971
1030
  showLegend: n?.showLegend ?? !0,
@@ -973,55 +1032,55 @@ function Pn({
973
1032
  showGrid: n?.showGrid ?? !0
974
1033
  };
975
1034
  if (!e || e.length === 0)
976
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1035
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
977
1036
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
978
1037
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
979
1038
  ] }) });
980
- let o, f = [];
1039
+ let o, u = [];
981
1040
  if (t?.xAxis && t?.yAxis) {
982
- const u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [], { data: v, seriesKeys: w } = te(
1041
+ const f = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [], { data: w, seriesKeys: b } = ie(
983
1042
  e,
984
- u,
1043
+ f,
985
1044
  m,
986
1045
  r,
987
- p
1046
+ v
988
1047
  );
989
- o = v, f = w;
1048
+ o = w, u = b;
990
1049
  } else {
991
- const u = e[0], m = Object.keys(u), p = m.find(
992
- (w) => typeof u[w] == "string" || w.toLowerCase().includes("subject") || w.toLowerCase().includes("name") || w.toLowerCase().includes("category")
993
- ) || m[0], v = m.filter(
994
- (w) => typeof u[w] == "number" && w !== p
1050
+ const f = e[0], m = Object.keys(f), v = m.find(
1051
+ (b) => typeof f[b] == "string" || b.toLowerCase().includes("subject") || b.toLowerCase().includes("name") || b.toLowerCase().includes("category")
1052
+ ) || m[0], w = m.filter(
1053
+ (b) => typeof f[b] == "number" && b !== v
995
1054
  );
996
- if (v.length === 0)
997
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1055
+ if (w.length === 0)
1056
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
998
1057
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
999
1058
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
1000
1059
  ] }) });
1001
- if (p) {
1002
- const w = H(r, p);
1003
- o = e.map((y) => {
1004
- const S = {
1005
- name: R(y[p], w) || String(y[p]) || "Unknown"
1060
+ if (v) {
1061
+ const b = I(r, v);
1062
+ o = e.map((h) => {
1063
+ const $ = {
1064
+ name: z(h[v], b) || String(h[v]) || "Unknown"
1006
1065
  };
1007
- return v.forEach(($) => {
1008
- const g = $.split(".").pop() || $;
1009
- S[g] = typeof y[$] == "string" ? parseFloat(y[$]) : y[$] || 0;
1010
- }), S;
1011
- }), f = v.map((y) => y.split(".").pop() || y);
1066
+ return w.forEach((T) => {
1067
+ const N = T.split(".").pop() || T;
1068
+ $[N] = typeof h[T] == "string" ? parseFloat(h[T]) : h[T] || 0;
1069
+ }), $;
1070
+ }), u = w.map((h) => h.split(".").pop() || h);
1012
1071
  } else
1013
- o = e.map((w) => ({
1014
- name: String(w[m[0]] || "Unknown"),
1015
- value: typeof w[v[0]] == "string" ? parseFloat(w[v[0]]) : w[v[0]] || 0
1016
- })), f = ["value"];
1072
+ o = e.map((b) => ({
1073
+ name: String(b[m[0]] || "Unknown"),
1074
+ value: typeof b[w[0]] == "string" ? parseFloat(b[w[0]]) : b[w[0]] || 0
1075
+ })), u = ["value"];
1017
1076
  }
1018
- return !o || o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1077
+ return !o || o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1019
1078
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1020
1079
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
1021
- ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(Mt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1022
- d.showGrid && /* @__PURE__ */ s($t, {}),
1080
+ ] }) }) : /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g($t, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1081
+ d.showGrid && /* @__PURE__ */ s(Lt, {}),
1023
1082
  /* @__PURE__ */ s(
1024
- Lt,
1083
+ Tt,
1025
1084
  {
1026
1085
  dataKey: "name",
1027
1086
  tick: { fontSize: 12 },
@@ -1029,15 +1088,15 @@ function Pn({
1029
1088
  }
1030
1089
  ),
1031
1090
  /* @__PURE__ */ s(
1032
- Tt,
1091
+ Ft,
1033
1092
  {
1034
1093
  tick: { fontSize: 10 },
1035
1094
  className: "text-dc-text-muted"
1036
1095
  }
1037
1096
  ),
1038
- d.showTooltip && /* @__PURE__ */ s(C, {}),
1039
- d.showLegend && f.length > 1 && /* @__PURE__ */ s(
1040
- B,
1097
+ d.showTooltip && /* @__PURE__ */ s(X, {}),
1098
+ d.showLegend && u.length > 1 && /* @__PURE__ */ s(
1099
+ W,
1041
1100
  {
1042
1101
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1043
1102
  iconType: "rect",
@@ -1045,33 +1104,33 @@ function Pn({
1045
1104
  layout: "horizontal",
1046
1105
  align: "center",
1047
1106
  verticalAlign: "bottom",
1048
- onMouseEnter: (u) => c(String(u.dataKey || "")),
1107
+ onMouseEnter: (f) => c(String(f.dataKey || "")),
1049
1108
  onMouseLeave: () => c(null)
1050
1109
  }
1051
1110
  ),
1052
- f.map((u, m) => /* @__PURE__ */ s(
1053
- jt,
1111
+ u.map((f, m) => /* @__PURE__ */ s(
1112
+ Dt,
1054
1113
  {
1055
- name: u,
1056
- dataKey: u,
1057
- stroke: l?.colors && l.colors[m % l.colors.length] || j[m % j.length],
1058
- fill: l?.colors && l.colors[m % l.colors.length] || j[m % j.length],
1059
- fillOpacity: a ? a === u ? 0.6 : 0.1 : 0.3,
1060
- strokeOpacity: a ? a === u ? 1 : 0.3 : 1,
1114
+ name: f,
1115
+ dataKey: f,
1116
+ stroke: l?.colors && l.colors[m % l.colors.length] || F[m % F.length],
1117
+ fill: l?.colors && l.colors[m % l.colors.length] || F[m % F.length],
1118
+ fillOpacity: a ? a === f ? 0.6 : 0.1 : 0.3,
1119
+ strokeOpacity: a ? a === f ? 1 : 0.3 : 1,
1061
1120
  strokeWidth: 2
1062
1121
  },
1063
- u
1122
+ f
1064
1123
  ))
1065
1124
  ] }) });
1066
1125
  } catch (d) {
1067
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1126
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1068
1127
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
1069
1128
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1070
1129
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1071
1130
  ] }) });
1072
1131
  }
1073
1132
  }
1074
- function er({
1133
+ function nr({
1075
1134
  data: e,
1076
1135
  chartConfig: t,
1077
1136
  displayConfig: n = {},
@@ -1079,59 +1138,59 @@ function er({
1079
1138
  height: i = "100%",
1080
1139
  colorPalette: l
1081
1140
  }) {
1082
- const [a, c] = O(null);
1141
+ const [a, c] = G(null);
1083
1142
  try {
1084
1143
  const d = {
1085
1144
  showLegend: n?.showLegend ?? !0,
1086
1145
  showTooltip: n?.showTooltip ?? !0
1087
1146
  };
1088
1147
  if (!e || e.length === 0)
1089
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1148
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1090
1149
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1091
1150
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
1092
1151
  ] }) });
1093
1152
  let o;
1094
1153
  if (t?.xAxis && t?.yAxis) {
1095
- const f = t.xAxis[0], u = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = H(r, f);
1096
- o = e.map((p, v) => ({
1097
- name: R(p[f], m) || String(p[f]) || "Unknown",
1098
- value: typeof p[u] == "string" ? parseFloat(p[u]) : p[u] || 0,
1099
- fill: l?.colors && l.colors[v % l.colors.length] || j[v % j.length]
1154
+ const u = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = I(r, u);
1155
+ o = e.map((v, w) => ({
1156
+ name: z(v[u], m) || String(v[u]) || "Unknown",
1157
+ value: typeof v[f] == "string" ? parseFloat(v[f]) : v[f] || 0,
1158
+ fill: l?.colors && l.colors[w % l.colors.length] || F[w % F.length]
1100
1159
  }));
1101
1160
  } else {
1102
- const f = e[0], u = Object.keys(f), m = u.find(
1103
- (v) => typeof f[v] == "string" || v.toLowerCase().includes("name") || v.toLowerCase().includes("label") || v.toLowerCase().includes("category")
1104
- ) || u[0], p = u.find(
1105
- (v) => typeof f[v] == "number" && v !== m
1106
- ) || u[1];
1107
- if (!p)
1108
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1161
+ const u = e[0], f = Object.keys(u), m = f.find(
1162
+ (w) => typeof u[w] == "string" || w.toLowerCase().includes("name") || w.toLowerCase().includes("label") || w.toLowerCase().includes("category")
1163
+ ) || f[0], v = f.find(
1164
+ (w) => typeof u[w] == "number" && w !== m
1165
+ ) || f[1];
1166
+ if (!v)
1167
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1109
1168
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1110
1169
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
1111
1170
  ] }) });
1112
- o = e.map((v, w) => {
1113
- let y = v[m];
1114
- return typeof y == "boolean" ? y = y ? "Active" : "Inactive" : y === "true" || y === "false" ? y = y === "true" ? "Active" : "Inactive" : y = String(y), {
1115
- name: y,
1116
- value: typeof v[p] == "string" ? parseFloat(v[p]) : v[p] || 0,
1117
- fill: l?.colors && l.colors[w % l.colors.length] || j[w % j.length]
1171
+ o = e.map((w, b) => {
1172
+ let h = w[m];
1173
+ return typeof h == "boolean" ? h = h ? "Active" : "Inactive" : h === "true" || h === "false" ? h = h === "true" ? "Active" : "Inactive" : h = String(h), {
1174
+ name: h,
1175
+ value: typeof w[v] == "string" ? parseFloat(w[v]) : w[v] || 0,
1176
+ fill: l?.colors && l.colors[b % l.colors.length] || F[b % F.length]
1118
1177
  };
1119
1178
  });
1120
1179
  }
1121
- return o = o.filter((f) => f.value != null && f.value !== 0), o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1180
+ return o = o.filter((u) => u.value != null && u.value !== 0), o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1122
1181
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1123
1182
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
1124
- ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(
1125
- Ft,
1183
+ ] }) }) : /* @__PURE__ */ s(U, { height: i, children: /* @__PURE__ */ g(
1184
+ Et,
1126
1185
  {
1127
1186
  data: o,
1128
1187
  innerRadius: "10%",
1129
1188
  outerRadius: "80%",
1130
1189
  margin: { top: 20, right: 30, bottom: 20, left: 30 },
1131
1190
  children: [
1132
- d.showTooltip && /* @__PURE__ */ s(C, {}),
1191
+ d.showTooltip && /* @__PURE__ */ s(X, {}),
1133
1192
  d.showLegend && /* @__PURE__ */ s(
1134
- B,
1193
+ W,
1135
1194
  {
1136
1195
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1137
1196
  iconType: "circle",
@@ -1139,23 +1198,23 @@ function er({
1139
1198
  layout: "horizontal",
1140
1199
  align: "center",
1141
1200
  verticalAlign: "bottom",
1142
- onMouseEnter: (f) => c(String(f.value || "")),
1201
+ onMouseEnter: (u) => c(String(u.value || "")),
1143
1202
  onMouseLeave: () => c(null)
1144
1203
  }
1145
1204
  ),
1146
1205
  /* @__PURE__ */ s(
1147
- zt,
1206
+ jt,
1148
1207
  {
1149
1208
  dataKey: "value",
1150
1209
  cornerRadius: 4,
1151
1210
  label: { position: "insideStart", fill: "#fff", fontSize: 12 },
1152
- children: o.map((f, u) => /* @__PURE__ */ s(
1153
- je,
1211
+ children: o.map((u, f) => /* @__PURE__ */ s(
1212
+ Ee,
1154
1213
  {
1155
- fill: f.fill,
1156
- fillOpacity: a ? a === f.name ? 1 : 0.3 : 1
1214
+ fill: u.fill,
1215
+ fillOpacity: a ? a === u.name ? 1 : 0.3 : 1
1157
1216
  },
1158
- `cell-${u}`
1217
+ `cell-${f}`
1159
1218
  ))
1160
1219
  }
1161
1220
  )
@@ -1163,98 +1222,98 @@ function er({
1163
1222
  }
1164
1223
  ) });
1165
1224
  } catch (d) {
1166
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1225
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1167
1226
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
1168
1227
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1169
1228
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1170
1229
  ] }) });
1171
1230
  }
1172
1231
  }
1173
- function de(e, t) {
1232
+ function fe(e, t) {
1174
1233
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
1175
1234
  }
1176
- function Vt(e, t) {
1235
+ function _t(e, t) {
1177
1236
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1178
1237
  }
1179
- function lt(e) {
1238
+ function ct(e) {
1180
1239
  let t, n, r;
1181
- e.length !== 2 ? (t = de, n = (c, d) => de(e(c), d), r = (c, d) => e(c) - d) : (t = e === de || e === Vt ? e : It, n = e, r = e);
1182
- function i(c, d, o = 0, f = c.length) {
1183
- if (o < f) {
1184
- if (t(d, d) !== 0) return f;
1240
+ e.length !== 2 ? (t = fe, n = (c, d) => fe(e(c), d), r = (c, d) => e(c) - d) : (t = e === fe || e === _t ? e : Ht, n = e, r = e);
1241
+ function i(c, d, o = 0, u = c.length) {
1242
+ if (o < u) {
1243
+ if (t(d, d) !== 0) return u;
1185
1244
  do {
1186
- const u = o + f >>> 1;
1187
- n(c[u], d) < 0 ? o = u + 1 : f = u;
1188
- } while (o < f);
1245
+ const f = o + u >>> 1;
1246
+ n(c[f], d) < 0 ? o = f + 1 : u = f;
1247
+ } while (o < u);
1189
1248
  }
1190
1249
  return o;
1191
1250
  }
1192
- function l(c, d, o = 0, f = c.length) {
1193
- if (o < f) {
1194
- if (t(d, d) !== 0) return f;
1251
+ function l(c, d, o = 0, u = c.length) {
1252
+ if (o < u) {
1253
+ if (t(d, d) !== 0) return u;
1195
1254
  do {
1196
- const u = o + f >>> 1;
1197
- n(c[u], d) <= 0 ? o = u + 1 : f = u;
1198
- } while (o < f);
1255
+ const f = o + u >>> 1;
1256
+ n(c[f], d) <= 0 ? o = f + 1 : u = f;
1257
+ } while (o < u);
1199
1258
  }
1200
1259
  return o;
1201
1260
  }
1202
- function a(c, d, o = 0, f = c.length) {
1203
- const u = i(c, d, o, f - 1);
1204
- return u > o && r(c[u - 1], d) > -r(c[u], d) ? u - 1 : u;
1261
+ function a(c, d, o = 0, u = c.length) {
1262
+ const f = i(c, d, o, u - 1);
1263
+ return f > o && r(c[f - 1], d) > -r(c[f], d) ? f - 1 : f;
1205
1264
  }
1206
1265
  return { left: i, center: a, right: l };
1207
1266
  }
1208
- function It() {
1267
+ function Ht() {
1209
1268
  return 0;
1210
1269
  }
1211
- function _t(e) {
1270
+ function Ot(e) {
1212
1271
  return e === null ? NaN : +e;
1213
1272
  }
1214
- const Ht = lt(de), ot = Ht.right;
1215
- lt(_t).center;
1216
- class Ce extends Map {
1217
- constructor(t, n = Ct) {
1273
+ const Gt = ct(fe), dt = Gt.right;
1274
+ ct(Ot).center;
1275
+ class qe extends Map {
1276
+ constructor(t, n = Bt) {
1218
1277
  if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, i] of t) this.set(r, i);
1219
1278
  }
1220
1279
  get(t) {
1221
- return super.get(Ue(this, t));
1280
+ return super.get(Be(this, t));
1222
1281
  }
1223
1282
  has(t) {
1224
- return super.has(Ue(this, t));
1283
+ return super.has(Be(this, t));
1225
1284
  }
1226
1285
  set(t, n) {
1227
- return super.set(Ot(this, t), n);
1286
+ return super.set(Ut(this, t), n);
1228
1287
  }
1229
1288
  delete(t) {
1230
- return super.delete(Gt(this, t));
1289
+ return super.delete(qt(this, t));
1231
1290
  }
1232
1291
  }
1233
- function Ue({ _intern: e, _key: t }, n) {
1292
+ function Be({ _intern: e, _key: t }, n) {
1234
1293
  const r = t(n);
1235
1294
  return e.has(r) ? e.get(r) : n;
1236
1295
  }
1237
- function Ot({ _intern: e, _key: t }, n) {
1296
+ function Ut({ _intern: e, _key: t }, n) {
1238
1297
  const r = t(n);
1239
1298
  return e.has(r) ? e.get(r) : (e.set(r, n), n);
1240
1299
  }
1241
- function Gt({ _intern: e, _key: t }, n) {
1300
+ function qt({ _intern: e, _key: t }, n) {
1242
1301
  const r = t(n);
1243
1302
  return e.has(r) && (n = e.get(r), e.delete(r)), n;
1244
1303
  }
1245
- function Ct(e) {
1304
+ function Bt(e) {
1246
1305
  return e !== null && typeof e == "object" ? e.valueOf() : e;
1247
1306
  }
1248
- const Ut = Math.sqrt(50), qt = Math.sqrt(10), Kt = Math.sqrt(2);
1249
- function fe(e, t, n) {
1250
- const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >= Ut ? 10 : l >= qt ? 5 : l >= Kt ? 2 : 1;
1307
+ const Kt = Math.sqrt(50), Ct = Math.sqrt(10), Wt = Math.sqrt(2);
1308
+ function me(e, t, n) {
1309
+ const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >= Kt ? 10 : l >= Ct ? 5 : l >= Wt ? 2 : 1;
1251
1310
  let c, d, o;
1252
- return i < 0 ? (o = Math.pow(10, -i) / a, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, i) * a, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <= n && n < 2 ? fe(e, t, n * 2) : [c, d, o];
1311
+ return i < 0 ? (o = Math.pow(10, -i) / a, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, i) * a, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <= n && n < 2 ? me(e, t, n * 2) : [c, d, o];
1253
1312
  }
1254
- function Bt(e, t, n) {
1313
+ function Yt(e, t, n) {
1255
1314
  if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1256
1315
  if (e === t) return [e];
1257
- const r = t < e, [i, l, a] = r ? fe(t, e, n) : fe(e, t, n);
1316
+ const r = t < e, [i, l, a] = r ? me(t, e, n) : me(e, t, n);
1258
1317
  if (!(l >= i)) return [];
1259
1318
  const c = l - i + 1, d = new Array(c);
1260
1319
  if (r)
@@ -1264,25 +1323,25 @@ function Bt(e, t, n) {
1264
1323
  else for (let o = 0; o < c; ++o) d[o] = (i + o) * a;
1265
1324
  return d;
1266
1325
  }
1267
- function Se(e, t, n) {
1268
- return t = +t, e = +e, n = +n, fe(e, t, n)[2];
1326
+ function $e(e, t, n) {
1327
+ return t = +t, e = +e, n = +n, me(e, t, n)[2];
1269
1328
  }
1270
- function Wt(e, t, n) {
1329
+ function Xt(e, t, n) {
1271
1330
  t = +t, e = +e, n = +n;
1272
- const r = t < e, i = r ? Se(t, e, n) : Se(e, t, n);
1331
+ const r = t < e, i = r ? $e(t, e, n) : $e(e, t, n);
1273
1332
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
1274
1333
  }
1275
- function De(e, t, n) {
1334
+ function Re(e, t, n) {
1276
1335
  e.prototype = t.prototype = n, n.constructor = e;
1277
1336
  }
1278
- function ct(e, t) {
1337
+ function ut(e, t) {
1279
1338
  var n = Object.create(e.prototype);
1280
1339
  for (var r in t) n[r] = t[r];
1281
1340
  return n;
1282
1341
  }
1283
- function ne() {
1342
+ function se() {
1284
1343
  }
1285
- var J = 0.7, ue = 1 / J, X = "\\s*([+-]?\\d+)\\s*", P = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", V = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Yt = /^#([0-9a-f]{3,8})$/, Xt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Qt = new RegExp(`^rgb\\(${V},${V},${V}\\)$`), Zt = new RegExp(`^rgba\\(${X},${X},${X},${P}\\)$`), Jt = new RegExp(`^rgba\\(${V},${V},${V},${P}\\)$`), Pt = new RegExp(`^hsl\\(${P},${V},${V}\\)$`), en = new RegExp(`^hsla\\(${P},${V},${V},${P}\\)$`), qe = {
1344
+ var te = 0.7, xe = 1 / te, J = "\\s*([+-]?\\d+)\\s*", ne = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", _ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Qt = /^#([0-9a-f]{3,8})$/, Zt = new RegExp(`^rgb\\(${J},${J},${J}\\)$`), Jt = new RegExp(`^rgb\\(${_},${_},${_}\\)$`), Pt = new RegExp(`^rgba\\(${J},${J},${J},${ne}\\)$`), en = new RegExp(`^rgba\\(${_},${_},${_},${ne}\\)$`), tn = new RegExp(`^hsl\\(${ne},${_},${_}\\)$`), nn = new RegExp(`^hsla\\(${ne},${_},${_},${ne}\\)$`), Ke = {
1286
1345
  aliceblue: 15792383,
1287
1346
  antiquewhite: 16444375,
1288
1347
  aqua: 65535,
@@ -1432,178 +1491,178 @@ var J = 0.7, ue = 1 / J, X = "\\s*([+-]?\\d+)\\s*", P = "\\s*([+-]?(?:\\d*\\.)?\
1432
1491
  yellow: 16776960,
1433
1492
  yellowgreen: 10145074
1434
1493
  };
1435
- De(ne, ee, {
1494
+ Re(se, re, {
1436
1495
  copy(e) {
1437
1496
  return Object.assign(new this.constructor(), this, e);
1438
1497
  },
1439
1498
  displayable() {
1440
1499
  return this.rgb().displayable();
1441
1500
  },
1442
- hex: Ke,
1501
+ hex: Ce,
1443
1502
  // Deprecated! Use color.formatHex.
1444
- formatHex: Ke,
1445
- formatHex8: tn,
1446
- formatHsl: nn,
1447
- formatRgb: Be,
1448
- toString: Be
1503
+ formatHex: Ce,
1504
+ formatHex8: rn,
1505
+ formatHsl: sn,
1506
+ formatRgb: We,
1507
+ toString: We
1449
1508
  });
1450
- function Ke() {
1509
+ function Ce() {
1451
1510
  return this.rgb().formatHex();
1452
1511
  }
1453
- function tn() {
1512
+ function rn() {
1454
1513
  return this.rgb().formatHex8();
1455
1514
  }
1456
- function nn() {
1457
- return dt(this).formatHsl();
1515
+ function sn() {
1516
+ return ft(this).formatHsl();
1458
1517
  }
1459
- function Be() {
1518
+ function We() {
1460
1519
  return this.rgb().formatRgb();
1461
1520
  }
1462
- function ee(e) {
1521
+ function re(e) {
1463
1522
  var t, n;
1464
- return e = (e + "").trim().toLowerCase(), (t = Yt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? We(t) : n === 3 ? new z(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? le(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? le(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Xt.exec(e)) ? new z(t[1], t[2], t[3], 1) : (t = Qt.exec(e)) ? new z(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Zt.exec(e)) ? le(t[1], t[2], t[3], t[4]) : (t = Jt.exec(e)) ? le(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Pt.exec(e)) ? Qe(t[1], t[2] / 100, t[3] / 100, 1) : (t = en.exec(e)) ? Qe(t[1], t[2] / 100, t[3] / 100, t[4]) : qe.hasOwnProperty(e) ? We(qe[e]) : e === "transparent" ? new z(NaN, NaN, NaN, 0) : null;
1523
+ return e = (e + "").trim().toLowerCase(), (t = Qt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ye(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ce(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ce(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Jt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Pt.exec(e)) ? ce(t[1], t[2], t[3], t[4]) : (t = en.exec(e)) ? ce(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = tn.exec(e)) ? Ze(t[1], t[2] / 100, t[3] / 100, 1) : (t = nn.exec(e)) ? Ze(t[1], t[2] / 100, t[3] / 100, t[4]) : Ke.hasOwnProperty(e) ? Ye(Ke[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1465
1524
  }
1466
- function We(e) {
1467
- return new z(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1525
+ function Ye(e) {
1526
+ return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1468
1527
  }
1469
- function le(e, t, n, r) {
1470
- return r <= 0 && (e = t = n = NaN), new z(e, t, n, r);
1528
+ function ce(e, t, n, r) {
1529
+ return r <= 0 && (e = t = n = NaN), new j(e, t, n, r);
1471
1530
  }
1472
- function rn(e) {
1473
- return e instanceof ne || (e = ee(e)), e ? (e = e.rgb(), new z(e.r, e.g, e.b, e.opacity)) : new z();
1531
+ function an(e) {
1532
+ return e instanceof se || (e = re(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
1474
1533
  }
1475
- function Me(e, t, n, r) {
1476
- return arguments.length === 1 ? rn(e) : new z(e, t, n, r ?? 1);
1534
+ function Le(e, t, n, r) {
1535
+ return arguments.length === 1 ? an(e) : new j(e, t, n, r ?? 1);
1477
1536
  }
1478
- function z(e, t, n, r) {
1537
+ function j(e, t, n, r) {
1479
1538
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1480
1539
  }
1481
- De(z, Me, ct(ne, {
1540
+ Re(j, Le, ut(se, {
1482
1541
  brighter(e) {
1483
- return e = e == null ? ue : Math.pow(ue, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1542
+ return e = e == null ? xe : Math.pow(xe, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1484
1543
  },
1485
1544
  darker(e) {
1486
- return e = e == null ? J : Math.pow(J, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1545
+ return e = e == null ? te : Math.pow(te, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1487
1546
  },
1488
1547
  rgb() {
1489
1548
  return this;
1490
1549
  },
1491
1550
  clamp() {
1492
- return new z(K(this.r), K(this.g), K(this.b), me(this.opacity));
1551
+ return new j(C(this.r), C(this.g), C(this.b), he(this.opacity));
1493
1552
  },
1494
1553
  displayable() {
1495
1554
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1496
1555
  },
1497
- hex: Ye,
1556
+ hex: Xe,
1498
1557
  // Deprecated! Use color.formatHex.
1499
- formatHex: Ye,
1500
- formatHex8: sn,
1501
- formatRgb: Xe,
1502
- toString: Xe
1558
+ formatHex: Xe,
1559
+ formatHex8: ln,
1560
+ formatRgb: Qe,
1561
+ toString: Qe
1503
1562
  }));
1504
- function Ye() {
1505
- return `#${U(this.r)}${U(this.g)}${U(this.b)}`;
1563
+ function Xe() {
1564
+ return `#${B(this.r)}${B(this.g)}${B(this.b)}`;
1506
1565
  }
1507
- function sn() {
1508
- return `#${U(this.r)}${U(this.g)}${U(this.b)}${U((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1566
+ function ln() {
1567
+ return `#${B(this.r)}${B(this.g)}${B(this.b)}${B((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1509
1568
  }
1510
- function Xe() {
1511
- const e = me(this.opacity);
1512
- return `${e === 1 ? "rgb(" : "rgba("}${K(this.r)}, ${K(this.g)}, ${K(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1569
+ function Qe() {
1570
+ const e = he(this.opacity);
1571
+ return `${e === 1 ? "rgb(" : "rgba("}${C(this.r)}, ${C(this.g)}, ${C(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1513
1572
  }
1514
- function me(e) {
1573
+ function he(e) {
1515
1574
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1516
1575
  }
1517
- function K(e) {
1576
+ function C(e) {
1518
1577
  return Math.max(0, Math.min(255, Math.round(e) || 0));
1519
1578
  }
1520
- function U(e) {
1521
- return e = K(e), (e < 16 ? "0" : "") + e.toString(16);
1579
+ function B(e) {
1580
+ return e = C(e), (e < 16 ? "0" : "") + e.toString(16);
1522
1581
  }
1523
- function Qe(e, t, n, r) {
1524
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new E(e, t, n, r);
1582
+ function Ze(e, t, n, r) {
1583
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new V(e, t, n, r);
1525
1584
  }
1526
- function dt(e) {
1527
- if (e instanceof E) return new E(e.h, e.s, e.l, e.opacity);
1528
- if (e instanceof ne || (e = ee(e)), !e) return new E();
1529
- if (e instanceof E) return e;
1585
+ function ft(e) {
1586
+ if (e instanceof V) return new V(e.h, e.s, e.l, e.opacity);
1587
+ if (e instanceof se || (e = re(e)), !e) return new V();
1588
+ if (e instanceof V) return e;
1530
1589
  e = e.rgb();
1531
1590
  var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), l = Math.max(t, n, r), a = NaN, c = l - i, d = (l + i) / 2;
1532
- return c ? (t === l ? a = (n - r) / c + (n < r) * 6 : n === l ? a = (r - t) / c + 2 : a = (t - n) / c + 4, c /= d < 0.5 ? l + i : 2 - l - i, a *= 60) : c = d > 0 && d < 1 ? 0 : a, new E(a, c, d, e.opacity);
1591
+ return c ? (t === l ? a = (n - r) / c + (n < r) * 6 : n === l ? a = (r - t) / c + 2 : a = (t - n) / c + 4, c /= d < 0.5 ? l + i : 2 - l - i, a *= 60) : c = d > 0 && d < 1 ? 0 : a, new V(a, c, d, e.opacity);
1533
1592
  }
1534
- function an(e, t, n, r) {
1535
- return arguments.length === 1 ? dt(e) : new E(e, t, n, r ?? 1);
1593
+ function on(e, t, n, r) {
1594
+ return arguments.length === 1 ? ft(e) : new V(e, t, n, r ?? 1);
1536
1595
  }
1537
- function E(e, t, n, r) {
1596
+ function V(e, t, n, r) {
1538
1597
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1539
1598
  }
1540
- De(E, an, ct(ne, {
1599
+ Re(V, on, ut(se, {
1541
1600
  brighter(e) {
1542
- return e = e == null ? ue : Math.pow(ue, e), new E(this.h, this.s, this.l * e, this.opacity);
1601
+ return e = e == null ? xe : Math.pow(xe, e), new V(this.h, this.s, this.l * e, this.opacity);
1543
1602
  },
1544
1603
  darker(e) {
1545
- return e = e == null ? J : Math.pow(J, e), new E(this.h, this.s, this.l * e, this.opacity);
1604
+ return e = e == null ? te : Math.pow(te, e), new V(this.h, this.s, this.l * e, this.opacity);
1546
1605
  },
1547
1606
  rgb() {
1548
1607
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - r;
1549
- return new z(
1550
- Ne(e >= 240 ? e - 240 : e + 120, i, r),
1551
- Ne(e, i, r),
1552
- Ne(e < 120 ? e + 240 : e - 120, i, r),
1608
+ return new j(
1609
+ Ae(e >= 240 ? e - 240 : e + 120, i, r),
1610
+ Ae(e, i, r),
1611
+ Ae(e < 120 ? e + 240 : e - 120, i, r),
1553
1612
  this.opacity
1554
1613
  );
1555
1614
  },
1556
1615
  clamp() {
1557
- return new E(Ze(this.h), oe(this.s), oe(this.l), me(this.opacity));
1616
+ return new V(Je(this.h), de(this.s), de(this.l), he(this.opacity));
1558
1617
  },
1559
1618
  displayable() {
1560
1619
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1561
1620
  },
1562
1621
  formatHsl() {
1563
- const e = me(this.opacity);
1564
- return `${e === 1 ? "hsl(" : "hsla("}${Ze(this.h)}, ${oe(this.s) * 100}%, ${oe(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1622
+ const e = he(this.opacity);
1623
+ return `${e === 1 ? "hsl(" : "hsla("}${Je(this.h)}, ${de(this.s) * 100}%, ${de(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1565
1624
  }
1566
1625
  }));
1567
- function Ze(e) {
1626
+ function Je(e) {
1568
1627
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1569
1628
  }
1570
- function oe(e) {
1629
+ function de(e) {
1571
1630
  return Math.max(0, Math.min(1, e || 0));
1572
1631
  }
1573
- function Ne(e, t, n) {
1632
+ function Ae(e, t, n) {
1574
1633
  return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1575
1634
  }
1576
- const Ee = (e) => () => e;
1577
- function ln(e, t) {
1635
+ const Ve = (e) => () => e;
1636
+ function cn(e, t) {
1578
1637
  return function(n) {
1579
1638
  return e + n * t;
1580
1639
  };
1581
1640
  }
1582
- function on(e, t, n) {
1641
+ function dn(e, t, n) {
1583
1642
  return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
1584
1643
  return Math.pow(e + r * t, n);
1585
1644
  };
1586
1645
  }
1587
- function cn(e) {
1588
- return (e = +e) == 1 ? ft : function(t, n) {
1589
- return n - t ? on(t, n, e) : Ee(isNaN(t) ? n : t);
1646
+ function un(e) {
1647
+ return (e = +e) == 1 ? mt : function(t, n) {
1648
+ return n - t ? dn(t, n, e) : Ve(isNaN(t) ? n : t);
1590
1649
  };
1591
1650
  }
1592
- function ft(e, t) {
1651
+ function mt(e, t) {
1593
1652
  var n = t - e;
1594
- return n ? ln(e, n) : Ee(isNaN(e) ? t : e);
1653
+ return n ? cn(e, n) : Ve(isNaN(e) ? t : e);
1595
1654
  }
1596
- const Je = (function e(t) {
1597
- var n = cn(t);
1655
+ const Pe = (function e(t) {
1656
+ var n = un(t);
1598
1657
  function r(i, l) {
1599
- var a = n((i = Me(i)).r, (l = Me(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = ft(i.opacity, l.opacity);
1600
- return function(f) {
1601
- return i.r = a(f), i.g = c(f), i.b = d(f), i.opacity = o(f), i + "";
1658
+ var a = n((i = Le(i)).r, (l = Le(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = mt(i.opacity, l.opacity);
1659
+ return function(u) {
1660
+ return i.r = a(u), i.g = c(u), i.b = d(u), i.opacity = o(u), i + "";
1602
1661
  };
1603
1662
  }
1604
1663
  return r.gamma = e, r;
1605
1664
  })(1);
1606
- function dn(e, t) {
1665
+ function fn(e, t) {
1607
1666
  t || (t = []);
1608
1667
  var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
1609
1668
  return function(l) {
@@ -1611,72 +1670,72 @@ function dn(e, t) {
1611
1670
  return r;
1612
1671
  };
1613
1672
  }
1614
- function fn(e) {
1673
+ function mn(e) {
1615
1674
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
1616
1675
  }
1617
- function un(e, t) {
1676
+ function xn(e, t) {
1618
1677
  var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = new Array(r), l = new Array(n), a;
1619
- for (a = 0; a < r; ++a) i[a] = Re(e[a], t[a]);
1678
+ for (a = 0; a < r; ++a) i[a] = Ie(e[a], t[a]);
1620
1679
  for (; a < n; ++a) l[a] = t[a];
1621
1680
  return function(c) {
1622
1681
  for (a = 0; a < r; ++a) l[a] = i[a](c);
1623
1682
  return l;
1624
1683
  };
1625
1684
  }
1626
- function mn(e, t) {
1685
+ function hn(e, t) {
1627
1686
  var n = /* @__PURE__ */ new Date();
1628
1687
  return e = +e, t = +t, function(r) {
1629
1688
  return n.setTime(e * (1 - r) + t * r), n;
1630
1689
  };
1631
1690
  }
1632
- function xe(e, t) {
1691
+ function ye(e, t) {
1633
1692
  return e = +e, t = +t, function(n) {
1634
1693
  return e * (1 - n) + t * n;
1635
1694
  };
1636
1695
  }
1637
- function xn(e, t) {
1696
+ function yn(e, t) {
1638
1697
  var n = {}, r = {}, i;
1639
1698
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1640
1699
  for (i in t)
1641
- i in e ? n[i] = Re(e[i], t[i]) : r[i] = t[i];
1700
+ i in e ? n[i] = Ie(e[i], t[i]) : r[i] = t[i];
1642
1701
  return function(l) {
1643
1702
  for (i in n) r[i] = n[i](l);
1644
1703
  return r;
1645
1704
  };
1646
1705
  }
1647
- var $e = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp($e.source, "g");
1648
- function hn(e) {
1706
+ var Te = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Se = new RegExp(Te.source, "g");
1707
+ function pn(e) {
1649
1708
  return function() {
1650
1709
  return e;
1651
1710
  };
1652
1711
  }
1653
- function yn(e) {
1712
+ function gn(e) {
1654
1713
  return function(t) {
1655
1714
  return e(t) + "";
1656
1715
  };
1657
1716
  }
1658
- function gn(e, t) {
1659
- var n = $e.lastIndex = we.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
1660
- for (e = e + "", t = t + ""; (r = $e.exec(e)) && (i = we.exec(t)); )
1661
- (l = i.index) > n && (l = t.slice(n, l), c[a] ? c[a] += l : c[++a] = l), (r = r[0]) === (i = i[0]) ? c[a] ? c[a] += i : c[++a] = i : (c[++a] = null, d.push({ i: a, x: xe(r, i) })), n = we.lastIndex;
1662
- return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ? yn(d[0].x) : hn(t) : (t = d.length, function(o) {
1663
- for (var f = 0, u; f < t; ++f) c[(u = d[f]).i] = u.x(o);
1717
+ function vn(e, t) {
1718
+ var n = Te.lastIndex = Se.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
1719
+ for (e = e + "", t = t + ""; (r = Te.exec(e)) && (i = Se.exec(t)); )
1720
+ (l = i.index) > n && (l = t.slice(n, l), c[a] ? c[a] += l : c[++a] = l), (r = r[0]) === (i = i[0]) ? c[a] ? c[a] += i : c[++a] = i : (c[++a] = null, d.push({ i: a, x: ye(r, i) })), n = Se.lastIndex;
1721
+ return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ? gn(d[0].x) : pn(t) : (t = d.length, function(o) {
1722
+ for (var u = 0, f; u < t; ++u) c[(f = d[u]).i] = f.x(o);
1664
1723
  return c.join("");
1665
1724
  });
1666
1725
  }
1667
- function Re(e, t) {
1726
+ function Ie(e, t) {
1668
1727
  var n = typeof t, r;
1669
- return t == null || n === "boolean" ? Ee(t) : (n === "number" ? xe : n === "string" ? (r = ee(t)) ? (t = r, Je) : gn : t instanceof ee ? Je : t instanceof Date ? mn : fn(t) ? dn : Array.isArray(t) ? un : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? xn : xe)(e, t);
1728
+ return t == null || n === "boolean" ? Ve(t) : (n === "number" ? ye : n === "string" ? (r = re(t)) ? (t = r, Pe) : vn : t instanceof re ? Pe : t instanceof Date ? hn : mn(t) ? fn : Array.isArray(t) ? xn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? yn : ye)(e, t);
1670
1729
  }
1671
- function pn(e, t) {
1730
+ function bn(e, t) {
1672
1731
  return e = +e, t = +t, function(n) {
1673
1732
  return Math.round(e * (1 - n) + t * n);
1674
1733
  };
1675
1734
  }
1676
- function vn(e) {
1735
+ function Nn(e) {
1677
1736
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1678
1737
  }
1679
- function he(e, t) {
1738
+ function pe(e, t) {
1680
1739
  if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
1681
1740
  var n, r = e.slice(0, n);
1682
1741
  return [
@@ -1684,28 +1743,28 @@ function he(e, t) {
1684
1743
  +e.slice(n + 1)
1685
1744
  ];
1686
1745
  }
1687
- function Q(e) {
1688
- return e = he(Math.abs(e)), e ? e[1] : NaN;
1746
+ function P(e) {
1747
+ return e = pe(Math.abs(e)), e ? e[1] : NaN;
1689
1748
  }
1690
- function bn(e, t) {
1749
+ function wn(e, t) {
1691
1750
  return function(n, r) {
1692
1751
  for (var i = n.length, l = [], a = 0, c = e[0], d = 0; i > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), l.push(n.substring(i -= c, i + c)), !((d += c + 1) > r)); )
1693
1752
  c = e[a = (a + 1) % e.length];
1694
1753
  return l.reverse().join(t);
1695
1754
  };
1696
1755
  }
1697
- function Nn(e) {
1756
+ function An(e) {
1698
1757
  return function(t) {
1699
1758
  return t.replace(/[0-9]/g, function(n) {
1700
1759
  return e[+n];
1701
1760
  });
1702
1761
  };
1703
1762
  }
1704
- var wn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1705
- function ye(e) {
1706
- if (!(t = wn.exec(e))) throw new Error("invalid format: " + e);
1763
+ var Sn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1764
+ function ge(e) {
1765
+ if (!(t = Sn.exec(e))) throw new Error("invalid format: " + e);
1707
1766
  var t;
1708
- return new Ve({
1767
+ return new _e({
1709
1768
  fill: t[1],
1710
1769
  align: t[2],
1711
1770
  sign: t[3],
@@ -1718,14 +1777,14 @@ function ye(e) {
1718
1777
  type: t[10]
1719
1778
  });
1720
1779
  }
1721
- ye.prototype = Ve.prototype;
1722
- function Ve(e) {
1780
+ ge.prototype = _e.prototype;
1781
+ function _e(e) {
1723
1782
  this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
1724
1783
  }
1725
- Ve.prototype.toString = function() {
1784
+ _e.prototype.toString = function() {
1726
1785
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
1727
1786
  };
1728
- function An(e) {
1787
+ function kn(e) {
1729
1788
  e: for (var t = e.length, n = 1, r = -1, i; n < t; ++n)
1730
1789
  switch (e[n]) {
1731
1790
  case ".":
@@ -1741,113 +1800,113 @@ function An(e) {
1741
1800
  }
1742
1801
  return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
1743
1802
  }
1744
- var ut;
1745
- function kn(e, t) {
1746
- var n = he(e, t);
1803
+ var xt;
1804
+ function Mn(e, t) {
1805
+ var n = pe(e, t);
1747
1806
  if (!n) return e + "";
1748
- var r = n[0], i = n[1], l = i - (ut = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
1749
- return l === a ? r : l > a ? r + new Array(l - a + 1).join("0") : l > 0 ? r.slice(0, l) + "." + r.slice(l) : "0." + new Array(1 - l).join("0") + he(e, Math.max(0, t + l - 1))[0];
1807
+ var r = n[0], i = n[1], l = i - (xt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
1808
+ return l === a ? r : l > a ? r + new Array(l - a + 1).join("0") : l > 0 ? r.slice(0, l) + "." + r.slice(l) : "0." + new Array(1 - l).join("0") + pe(e, Math.max(0, t + l - 1))[0];
1750
1809
  }
1751
- function Pe(e, t) {
1752
- var n = he(e, t);
1810
+ function et(e, t) {
1811
+ var n = pe(e, t);
1753
1812
  if (!n) return e + "";
1754
1813
  var r = n[0], i = n[1];
1755
1814
  return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
1756
1815
  }
1757
- const et = {
1816
+ const tt = {
1758
1817
  "%": (e, t) => (e * 100).toFixed(t),
1759
1818
  b: (e) => Math.round(e).toString(2),
1760
1819
  c: (e) => e + "",
1761
- d: vn,
1820
+ d: Nn,
1762
1821
  e: (e, t) => e.toExponential(t),
1763
1822
  f: (e, t) => e.toFixed(t),
1764
1823
  g: (e, t) => e.toPrecision(t),
1765
1824
  o: (e) => Math.round(e).toString(8),
1766
- p: (e, t) => Pe(e * 100, t),
1767
- r: Pe,
1768
- s: kn,
1825
+ p: (e, t) => et(e * 100, t),
1826
+ r: et,
1827
+ s: Mn,
1769
1828
  X: (e) => Math.round(e).toString(16).toUpperCase(),
1770
1829
  x: (e) => Math.round(e).toString(16)
1771
1830
  };
1772
- function tt(e) {
1831
+ function nt(e) {
1773
1832
  return e;
1774
1833
  }
1775
- var nt = Array.prototype.map, rt = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1776
- function Sn(e) {
1777
- var t = e.grouping === void 0 || e.thousands === void 0 ? tt : bn(nt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", l = e.numerals === void 0 ? tt : Nn(nt.call(e.numerals, String)), a = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1778
- function o(u) {
1779
- u = ye(u);
1780
- var m = u.fill, p = u.align, v = u.sign, w = u.symbol, y = u.zero, S = u.width, $ = u.comma, g = u.precision, b = u.trim, x = u.type;
1781
- x === "n" ? ($ = !0, x = "g") : et[x] || (g === void 0 && (g = 12), b = !0, x = "g"), (y || m === "0" && p === "=") && (y = !0, m = "0", p = "=");
1782
- var h = w === "$" ? n : w === "#" && /[boxX]/.test(x) ? "0" + x.toLowerCase() : "", A = w === "$" ? r : /[%p]/.test(x) ? a : "", T = et[x], k = /[defgprs%]/.test(x);
1783
- g = g === void 0 ? 6 : /[gprs]/.test(x) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
1834
+ var rt = Array.prototype.map, it = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1835
+ function $n(e) {
1836
+ var t = e.grouping === void 0 || e.thousands === void 0 ? nt : wn(rt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", l = e.numerals === void 0 ? nt : An(rt.call(e.numerals, String)), a = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1837
+ function o(f) {
1838
+ f = ge(f);
1839
+ var m = f.fill, v = f.align, w = f.sign, b = f.symbol, h = f.zero, $ = f.width, T = f.comma, N = f.precision, S = f.trim, p = f.type;
1840
+ p === "n" ? (T = !0, p = "g") : tt[p] || (N === void 0 && (N = 12), S = !0, p = "g"), (h || m === "0" && v === "=") && (h = !0, m = "0", v = "=");
1841
+ var x = b === "$" ? n : b === "#" && /[boxX]/.test(p) ? "0" + p.toLowerCase() : "", y = b === "$" ? r : /[%p]/.test(p) ? a : "", k = tt[p], A = /[defgprs%]/.test(p);
1842
+ N = N === void 0 ? 6 : /[gprs]/.test(p) ? Math.max(1, Math.min(21, N)) : Math.max(0, Math.min(20, N));
1784
1843
  function L(M) {
1785
- var D = h, F = A, _, _e, re;
1786
- if (x === "c")
1787
- F = T(M) + F, M = "";
1844
+ var D = x, E = y, R, q, Q;
1845
+ if (p === "c")
1846
+ E = k(M) + E, M = "";
1788
1847
  else {
1789
1848
  M = +M;
1790
- var ie = M < 0 || 1 / M < 0;
1791
- if (M = isNaN(M) ? d : T(Math.abs(M), g), b && (M = An(M)), ie && +M == 0 && v !== "+" && (ie = !1), D = (ie ? v === "(" ? v : c : v === "-" || v === "(" ? "" : v) + D, F = (x === "s" ? rt[8 + ut / 3] : "") + F + (ie && v === "(" ? ")" : ""), k) {
1792
- for (_ = -1, _e = M.length; ++_ < _e; )
1793
- if (re = M.charCodeAt(_), 48 > re || re > 57) {
1794
- F = (re === 46 ? i + M.slice(_ + 1) : M.slice(_)) + F, M = M.slice(0, _);
1849
+ var ae = M < 0 || 1 / M < 0;
1850
+ if (M = isNaN(M) ? d : k(Math.abs(M), N), S && (M = kn(M)), ae && +M == 0 && w !== "+" && (ae = !1), D = (ae ? w === "(" ? w : c : w === "-" || w === "(" ? "" : w) + D, E = (p === "s" ? it[8 + xt / 3] : "") + E + (ae && w === "(" ? ")" : ""), A) {
1851
+ for (R = -1, q = M.length; ++R < q; )
1852
+ if (Q = M.charCodeAt(R), 48 > Q || Q > 57) {
1853
+ E = (Q === 46 ? i + M.slice(R + 1) : M.slice(R)) + E, M = M.slice(0, R);
1795
1854
  break;
1796
1855
  }
1797
1856
  }
1798
1857
  }
1799
- $ && !y && (M = t(M, 1 / 0));
1800
- var se = D.length + M.length + F.length, I = se < S ? new Array(S - se + 1).join(m) : "";
1801
- switch ($ && y && (M = t(I + M, I.length ? S - F.length : 1 / 0), I = ""), p) {
1858
+ T && !h && (M = t(M, 1 / 0));
1859
+ var le = D.length + M.length + E.length, H = le < $ ? new Array($ - le + 1).join(m) : "";
1860
+ switch (T && h && (M = t(H + M, H.length ? $ - E.length : 1 / 0), H = ""), v) {
1802
1861
  case "<":
1803
- M = D + M + F + I;
1862
+ M = D + M + E + H;
1804
1863
  break;
1805
1864
  case "=":
1806
- M = D + I + M + F;
1865
+ M = D + H + M + E;
1807
1866
  break;
1808
1867
  case "^":
1809
- M = I.slice(0, se = I.length >> 1) + D + M + F + I.slice(se);
1868
+ M = H.slice(0, le = H.length >> 1) + D + M + E + H.slice(le);
1810
1869
  break;
1811
1870
  default:
1812
- M = I + D + M + F;
1871
+ M = H + D + M + E;
1813
1872
  break;
1814
1873
  }
1815
1874
  return l(M);
1816
1875
  }
1817
1876
  return L.toString = function() {
1818
- return u + "";
1877
+ return f + "";
1819
1878
  }, L;
1820
1879
  }
1821
- function f(u, m) {
1822
- var p = o((u = ye(u), u.type = "f", u)), v = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, w = Math.pow(10, -v), y = rt[8 + v / 3];
1823
- return function(S) {
1824
- return p(w * S) + y;
1880
+ function u(f, m) {
1881
+ var v = o((f = ge(f), f.type = "f", f)), w = Math.max(-8, Math.min(8, Math.floor(P(m) / 3))) * 3, b = Math.pow(10, -w), h = it[8 + w / 3];
1882
+ return function($) {
1883
+ return v(b * $) + h;
1825
1884
  };
1826
1885
  }
1827
1886
  return {
1828
1887
  format: o,
1829
- formatPrefix: f
1888
+ formatPrefix: u
1830
1889
  };
1831
1890
  }
1832
- var ce, mt, xt;
1833
- Mn({
1891
+ var ue, ht, yt;
1892
+ Ln({
1834
1893
  thousands: ",",
1835
1894
  grouping: [3],
1836
1895
  currency: ["$", ""]
1837
1896
  });
1838
- function Mn(e) {
1839
- return ce = Sn(e), mt = ce.format, xt = ce.formatPrefix, ce;
1897
+ function Ln(e) {
1898
+ return ue = $n(e), ht = ue.format, yt = ue.formatPrefix, ue;
1840
1899
  }
1841
- function $n(e) {
1842
- return Math.max(0, -Q(Math.abs(e)));
1900
+ function Tn(e) {
1901
+ return Math.max(0, -P(Math.abs(e)));
1843
1902
  }
1844
- function Ln(e, t) {
1845
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Q(t) / 3))) * 3 - Q(Math.abs(e)));
1903
+ function Fn(e, t) {
1904
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(P(t) / 3))) * 3 - P(Math.abs(e)));
1846
1905
  }
1847
- function Tn(e, t) {
1848
- return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Q(t) - Q(e)) + 1;
1906
+ function Dn(e, t) {
1907
+ return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, P(t) - P(e)) + 1;
1849
1908
  }
1850
- function Ie(e, t) {
1909
+ function He(e, t) {
1851
1910
  switch (arguments.length) {
1852
1911
  case 0:
1853
1912
  break;
@@ -1860,20 +1919,20 @@ function Ie(e, t) {
1860
1919
  }
1861
1920
  return this;
1862
1921
  }
1863
- const it = Symbol("implicit");
1864
- function ht() {
1865
- var e = new Ce(), t = [], n = [], r = it;
1922
+ const st = Symbol("implicit");
1923
+ function pt() {
1924
+ var e = new qe(), t = [], n = [], r = st;
1866
1925
  function i(l) {
1867
1926
  let a = e.get(l);
1868
1927
  if (a === void 0) {
1869
- if (r !== it) return r;
1928
+ if (r !== st) return r;
1870
1929
  e.set(l, a = t.push(l) - 1);
1871
1930
  }
1872
1931
  return n[a % n.length];
1873
1932
  }
1874
1933
  return i.domain = function(l) {
1875
1934
  if (!arguments.length) return t.slice();
1876
- t = [], e = new Ce();
1935
+ t = [], e = new qe();
1877
1936
  for (const a of l)
1878
1937
  e.has(a) || e.set(a, t.push(a) - 1);
1879
1938
  return i;
@@ -1882,25 +1941,25 @@ function ht() {
1882
1941
  }, i.unknown = function(l) {
1883
1942
  return arguments.length ? (r = l, i) : r;
1884
1943
  }, i.copy = function() {
1885
- return ht(t, n).unknown(r);
1886
- }, Ie.apply(i, arguments), i;
1944
+ return pt(t, n).unknown(r);
1945
+ }, He.apply(i, arguments), i;
1887
1946
  }
1888
- function jn(e) {
1947
+ function En(e) {
1889
1948
  return function() {
1890
1949
  return e;
1891
1950
  };
1892
1951
  }
1893
- function Fn(e) {
1952
+ function jn(e) {
1894
1953
  return +e;
1895
1954
  }
1896
- var st = [0, 1];
1897
- function Y(e) {
1955
+ var at = [0, 1];
1956
+ function Z(e) {
1898
1957
  return e;
1899
1958
  }
1900
- function Le(e, t) {
1959
+ function Fe(e, t) {
1901
1960
  return (t -= e = +e) ? function(n) {
1902
1961
  return (n - e) / t;
1903
- } : jn(isNaN(t) ? NaN : 0.5);
1962
+ } : En(isNaN(t) ? NaN : 0.5);
1904
1963
  }
1905
1964
  function zn(e, t) {
1906
1965
  var n;
@@ -1908,90 +1967,90 @@ function zn(e, t) {
1908
1967
  return Math.max(e, Math.min(t, r));
1909
1968
  };
1910
1969
  }
1911
- function Dn(e, t, n) {
1970
+ function Rn(e, t, n) {
1912
1971
  var r = e[0], i = e[1], l = t[0], a = t[1];
1913
- return i < r ? (r = Le(i, r), l = n(a, l)) : (r = Le(r, i), l = n(l, a)), function(c) {
1972
+ return i < r ? (r = Fe(i, r), l = n(a, l)) : (r = Fe(r, i), l = n(l, a)), function(c) {
1914
1973
  return l(r(c));
1915
1974
  };
1916
1975
  }
1917
- function En(e, t, n) {
1976
+ function Vn(e, t, n) {
1918
1977
  var r = Math.min(e.length, t.length) - 1, i = new Array(r), l = new Array(r), a = -1;
1919
1978
  for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++a < r; )
1920
- i[a] = Le(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1979
+ i[a] = Fe(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1921
1980
  return function(c) {
1922
- var d = ot(e, c, 1, r) - 1;
1981
+ var d = dt(e, c, 1, r) - 1;
1923
1982
  return l[d](i[d](c));
1924
1983
  };
1925
1984
  }
1926
- function Rn(e, t) {
1985
+ function In(e, t) {
1927
1986
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
1928
1987
  }
1929
- function Vn() {
1930
- var e = st, t = st, n = Re, r, i, l, a = Y, c, d, o;
1931
- function f() {
1988
+ function _n() {
1989
+ var e = at, t = at, n = Ie, r, i, l, a = Z, c, d, o;
1990
+ function u() {
1932
1991
  var m = Math.min(e.length, t.length);
1933
- return a !== Y && (a = zn(e[0], e[m - 1])), c = m > 2 ? En : Dn, d = o = null, u;
1992
+ return a !== Z && (a = zn(e[0], e[m - 1])), c = m > 2 ? Vn : Rn, d = o = null, f;
1934
1993
  }
1935
- function u(m) {
1994
+ function f(m) {
1936
1995
  return m == null || isNaN(m = +m) ? l : (d || (d = c(e.map(r), t, n)))(r(a(m)));
1937
1996
  }
1938
- return u.invert = function(m) {
1939
- return a(i((o || (o = c(t, e.map(r), xe)))(m)));
1940
- }, u.domain = function(m) {
1941
- return arguments.length ? (e = Array.from(m, Fn), f()) : e.slice();
1942
- }, u.range = function(m) {
1943
- return arguments.length ? (t = Array.from(m), f()) : t.slice();
1944
- }, u.rangeRound = function(m) {
1945
- return t = Array.from(m), n = pn, f();
1946
- }, u.clamp = function(m) {
1947
- return arguments.length ? (a = m ? !0 : Y, f()) : a !== Y;
1948
- }, u.interpolate = function(m) {
1949
- return arguments.length ? (n = m, f()) : n;
1950
- }, u.unknown = function(m) {
1951
- return arguments.length ? (l = m, u) : l;
1952
- }, function(m, p) {
1953
- return r = m, i = p, f();
1997
+ return f.invert = function(m) {
1998
+ return a(i((o || (o = c(t, e.map(r), ye)))(m)));
1999
+ }, f.domain = function(m) {
2000
+ return arguments.length ? (e = Array.from(m, jn), u()) : e.slice();
2001
+ }, f.range = function(m) {
2002
+ return arguments.length ? (t = Array.from(m), u()) : t.slice();
2003
+ }, f.rangeRound = function(m) {
2004
+ return t = Array.from(m), n = bn, u();
2005
+ }, f.clamp = function(m) {
2006
+ return arguments.length ? (a = m ? !0 : Z, u()) : a !== Z;
2007
+ }, f.interpolate = function(m) {
2008
+ return arguments.length ? (n = m, u()) : n;
2009
+ }, f.unknown = function(m) {
2010
+ return arguments.length ? (l = m, f) : l;
2011
+ }, function(m, v) {
2012
+ return r = m, i = v, u();
1954
2013
  };
1955
2014
  }
1956
- function In() {
1957
- return Vn()(Y, Y);
2015
+ function Hn() {
2016
+ return _n()(Z, Z);
1958
2017
  }
1959
- function _n(e, t, n, r) {
1960
- var i = Wt(e, t, n), l;
1961
- switch (r = ye(r ?? ",f"), r.type) {
2018
+ function On(e, t, n, r) {
2019
+ var i = Xt(e, t, n), l;
2020
+ switch (r = ge(r ?? ",f"), r.type) {
1962
2021
  case "s": {
1963
2022
  var a = Math.max(Math.abs(e), Math.abs(t));
1964
- return r.precision == null && !isNaN(l = Ln(i, a)) && (r.precision = l), xt(r, a);
2023
+ return r.precision == null && !isNaN(l = Fn(i, a)) && (r.precision = l), yt(r, a);
1965
2024
  }
1966
2025
  case "":
1967
2026
  case "e":
1968
2027
  case "g":
1969
2028
  case "p":
1970
2029
  case "r": {
1971
- r.precision == null && !isNaN(l = Tn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = l - (r.type === "e"));
2030
+ r.precision == null && !isNaN(l = Dn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = l - (r.type === "e"));
1972
2031
  break;
1973
2032
  }
1974
2033
  case "f":
1975
2034
  case "%": {
1976
- r.precision == null && !isNaN(l = $n(i)) && (r.precision = l - (r.type === "%") * 2);
2035
+ r.precision == null && !isNaN(l = Tn(i)) && (r.precision = l - (r.type === "%") * 2);
1977
2036
  break;
1978
2037
  }
1979
2038
  }
1980
- return mt(r);
2039
+ return ht(r);
1981
2040
  }
1982
- function yt(e) {
2041
+ function gt(e) {
1983
2042
  var t = e.domain;
1984
2043
  return e.ticks = function(n) {
1985
2044
  var r = t();
1986
- return Bt(r[0], r[r.length - 1], n ?? 10);
2045
+ return Yt(r[0], r[r.length - 1], n ?? 10);
1987
2046
  }, e.tickFormat = function(n, r) {
1988
2047
  var i = t();
1989
- return _n(i[0], i[i.length - 1], n ?? 10, r);
2048
+ return On(i[0], i[i.length - 1], n ?? 10, r);
1990
2049
  }, e.nice = function(n) {
1991
2050
  n == null && (n = 10);
1992
- var r = t(), i = 0, l = r.length - 1, a = r[i], c = r[l], d, o, f = 10;
1993
- for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o); f-- > 0; ) {
1994
- if (o = Se(a, c, n), o === d)
2051
+ var r = t(), i = 0, l = r.length - 1, a = r[i], c = r[l], d, o, u = 10;
2052
+ for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o); u-- > 0; ) {
2053
+ if (o = $e(a, c, n), o === d)
1995
2054
  return r[i] = a, r[l] = c, t(r);
1996
2055
  if (o > 0)
1997
2056
  a = Math.floor(a / o) * o, c = Math.ceil(c / o) * o;
@@ -2004,16 +2063,16 @@ function yt(e) {
2004
2063
  return e;
2005
2064
  }, e;
2006
2065
  }
2007
- function Hn() {
2008
- var e = In();
2066
+ function Gn() {
2067
+ var e = Hn();
2009
2068
  return e.copy = function() {
2010
- return Rn(e, Hn());
2011
- }, Ie.apply(e, arguments), yt(e);
2069
+ return In(e, Gn());
2070
+ }, He.apply(e, arguments), gt(e);
2012
2071
  }
2013
- function gt() {
2072
+ function vt() {
2014
2073
  var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], l;
2015
2074
  function a(d) {
2016
- return d != null && d <= d ? i[ot(r, d, 0, n)] : l;
2075
+ return d != null && d <= d ? i[dt(r, d, 0, n)] : l;
2017
2076
  }
2018
2077
  function c() {
2019
2078
  var d = -1;
@@ -2032,10 +2091,10 @@ function gt() {
2032
2091
  }, a.thresholds = function() {
2033
2092
  return r.slice();
2034
2093
  }, a.copy = function() {
2035
- return gt().domain([e, t]).range(i).unknown(l);
2036
- }, Ie.apply(yt(a), arguments);
2094
+ return vt().domain([e, t]).range(i).unknown(l);
2095
+ }, He.apply(gt(a), arguments);
2037
2096
  }
2038
- function tr({
2097
+ function rr({
2039
2098
  data: e,
2040
2099
  chartConfig: t,
2041
2100
  displayConfig: n = {},
@@ -2043,108 +2102,108 @@ function tr({
2043
2102
  height: i = "100%",
2044
2103
  colorPalette: l
2045
2104
  }) {
2046
- const [a, c] = O(null), { getFieldLabel: d } = W();
2105
+ const [a, c] = G(null), { getFieldLabel: d } = Y();
2047
2106
  try {
2048
2107
  const o = {
2049
2108
  showTooltip: n?.showTooltip ?? !0,
2050
2109
  showLegend: n?.showLegend ?? !0
2051
2110
  };
2052
2111
  if (!e || e.length === 0)
2053
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2112
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2054
2113
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2055
2114
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
2056
2115
  ] }) });
2057
- let f, u = !1, m;
2116
+ let u, f = !1, m;
2058
2117
  if (t?.xAxis && t?.yAxis) {
2059
- const g = t.xAxis[0], b = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2118
+ const N = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, S = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2060
2119
  m = Array.isArray(t.series) ? t.series[0] : t.series;
2061
- const x = H(r, g);
2120
+ const p = I(r, N);
2062
2121
  if (m) {
2063
- const h = e.map((A) => {
2064
- const T = A[m];
2065
- return typeof T == "string" ? parseFloat(T) : T;
2066
- }).filter((A) => !isNaN(A));
2067
- if (u = h.length === e.length && h.every((A) => typeof A == "number"), u) {
2068
- const A = Math.min(...h), T = Math.max(...h), k = gt().domain([A, T]).range(ae);
2069
- f = e.map((L) => {
2070
- const M = typeof L[m] == "string" ? parseFloat(L[m]) : L[m], D = k(M);
2122
+ const x = e.map((y) => {
2123
+ const k = y[m];
2124
+ return typeof k == "string" ? parseFloat(k) : k;
2125
+ }).filter((y) => !isNaN(y));
2126
+ if (f = x.length === e.length && x.every((y) => typeof y == "number"), f) {
2127
+ const y = Math.min(...x), k = Math.max(...x), A = vt().domain([y, k]).range(oe);
2128
+ u = e.map((L) => {
2129
+ const M = typeof L[m] == "string" ? parseFloat(L[m]) : L[m], D = A(M);
2071
2130
  return {
2072
- name: R(L[g], x) || String(L[g]) || "Unknown",
2073
- size: typeof L[b] == "string" ? parseFloat(L[b]) : L[b] || 0,
2131
+ name: z(L[N], p) || String(L[N]) || "Unknown",
2132
+ size: typeof L[S] == "string" ? parseFloat(L[S]) : L[S] || 0,
2074
2133
  fill: D,
2075
2134
  series: String(L[m])
2076
2135
  };
2077
2136
  });
2078
2137
  } else {
2079
- const A = [...new Set(e.map((k) => String(k[m])))], T = ht().domain(A).range(l?.colors || j);
2080
- f = e.map((k) => ({
2081
- name: R(k[g], x) || String(k[g]) || "Unknown",
2082
- size: typeof k[b] == "string" ? parseFloat(k[b]) : k[b] || 0,
2083
- fill: T(String(k[m])),
2084
- series: String(k[m])
2138
+ const y = [...new Set(e.map((A) => String(A[m])))], k = pt().domain(y).range(l?.colors || F);
2139
+ u = e.map((A) => ({
2140
+ name: z(A[N], p) || String(A[N]) || "Unknown",
2141
+ size: typeof A[S] == "string" ? parseFloat(A[S]) : A[S] || 0,
2142
+ fill: k(String(A[m])),
2143
+ series: String(A[m])
2085
2144
  }));
2086
2145
  }
2087
2146
  } else
2088
- f = e.map((h, A) => ({
2089
- name: R(h[g], x) || String(h[g]) || "Unknown",
2090
- size: typeof h[b] == "string" ? parseFloat(h[b]) : h[b] || 0,
2091
- fill: l?.colors && l.colors[A % l.colors.length] || j[A % j.length]
2147
+ u = e.map((x, y) => ({
2148
+ name: z(x[N], p) || String(x[N]) || "Unknown",
2149
+ size: typeof x[S] == "string" ? parseFloat(x[S]) : x[S] || 0,
2150
+ fill: l?.colors && l.colors[y % l.colors.length] || F[y % F.length]
2092
2151
  }));
2093
2152
  } else {
2094
- const g = e[0], b = Object.keys(g), x = b.find(
2095
- (A) => typeof g[A] == "string" || A.toLowerCase().includes("name") || A.toLowerCase().includes("label") || A.toLowerCase().includes("category")
2096
- ) || b[0], h = b.find((A) => A.toLowerCase().includes("size")) || b.find(
2097
- (A) => typeof g[A] == "number" && A !== x
2098
- ) || b[1];
2099
- if (!h)
2100
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2153
+ const N = e[0], S = Object.keys(N), p = S.find(
2154
+ (y) => typeof N[y] == "string" || y.toLowerCase().includes("name") || y.toLowerCase().includes("label") || y.toLowerCase().includes("category")
2155
+ ) || S[0], x = S.find((y) => y.toLowerCase().includes("size")) || S.find(
2156
+ (y) => typeof N[y] == "number" && y !== p
2157
+ ) || S[1];
2158
+ if (!x)
2159
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2101
2160
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2102
2161
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
2103
2162
  ] }) });
2104
- f = e.map((A, T) => {
2105
- let k = A[x];
2106
- return typeof k == "boolean" ? k = k ? "Active" : "Inactive" : k === "true" || k === "false" ? k = k === "true" ? "Active" : "Inactive" : k = String(k), {
2107
- name: k,
2108
- size: typeof A[h] == "string" ? parseFloat(A[h]) : A[h] || 0,
2109
- fill: l?.colors && l.colors[T % l.colors.length] || j[T % j.length]
2163
+ u = e.map((y, k) => {
2164
+ let A = y[p];
2165
+ return typeof A == "boolean" ? A = A ? "Active" : "Inactive" : A === "true" || A === "false" ? A = A === "true" ? "Active" : "Inactive" : A = String(A), {
2166
+ name: A,
2167
+ size: typeof y[x] == "string" ? parseFloat(y[x]) : y[x] || 0,
2168
+ fill: l?.colors && l.colors[k % l.colors.length] || F[k % F.length]
2110
2169
  };
2111
2170
  });
2112
2171
  }
2113
- if (f = f.filter((g) => g.size != null && g.size > 0), f.length === 0)
2114
- return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2172
+ if (u = u.filter((N) => N.size != null && N.size > 0), u.length === 0)
2173
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2115
2174
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2116
2175
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
2117
2176
  ] }) });
2118
- const p = (g) => {
2119
- const { x: b, y: x, width: h, height: A, index: T, name: k, size: L } = g;
2120
- return h < 20 || A < 20 ? null : /* @__PURE__ */ N("g", { children: [
2177
+ const v = (N) => {
2178
+ const { x: S, y: p, width: x, height: y, index: k, name: A, size: L } = N;
2179
+ return x < 20 || y < 20 ? null : /* @__PURE__ */ g("g", { children: [
2121
2180
  /* @__PURE__ */ s(
2122
2181
  "rect",
2123
2182
  {
2124
- x: b,
2125
- y: x,
2126
- width: h,
2127
- height: A,
2183
+ x: S,
2184
+ y: p,
2185
+ width: x,
2186
+ height: y,
2128
2187
  style: {
2129
- fill: f[T]?.fill || l?.colors && l.colors[T % l.colors.length] || j[T % j.length],
2130
- fillOpacity: a !== null ? a === T ? 1 : 0.6 : 0.8,
2188
+ fill: u[k]?.fill || l?.colors && l.colors[k % l.colors.length] || F[k % F.length],
2189
+ fillOpacity: a !== null ? a === k ? 1 : 0.6 : 0.8,
2131
2190
  stroke: "#fff",
2132
2191
  strokeWidth: 2,
2133
2192
  cursor: "pointer"
2134
2193
  },
2135
- onMouseEnter: () => c(T),
2194
+ onMouseEnter: () => c(k),
2136
2195
  onMouseLeave: () => c(null)
2137
2196
  }
2138
2197
  ),
2139
2198
  /* @__PURE__ */ s(
2140
2199
  "foreignObject",
2141
2200
  {
2142
- x: b,
2143
- y: x,
2144
- width: h,
2145
- height: A,
2201
+ x: S,
2202
+ y: p,
2203
+ width: x,
2204
+ height: y,
2146
2205
  style: { pointerEvents: "none", overflow: "visible" },
2147
- children: /* @__PURE__ */ N(
2206
+ children: /* @__PURE__ */ g(
2148
2207
  "div",
2149
2208
  {
2150
2209
  style: {
@@ -2162,26 +2221,26 @@ function tr({
2162
2221
  overflow: "hidden"
2163
2222
  },
2164
2223
  children: [
2165
- h > 40 && A > 30 && /* @__PURE__ */ s(
2224
+ x > 40 && y > 30 && /* @__PURE__ */ s(
2166
2225
  "div",
2167
2226
  {
2168
2227
  style: {
2169
- fontSize: `${Math.max(10, Math.min(h / 8, A / 8, 16))}px`,
2228
+ fontSize: `${Math.max(10, Math.min(x / 8, y / 8, 16))}px`,
2170
2229
  fontWeight: "600",
2171
2230
  textAlign: "center",
2172
2231
  lineHeight: "1.2",
2173
- marginBottom: h > 60 && A > 45 ? "4px" : "0",
2232
+ marginBottom: x > 60 && y > 45 ? "4px" : "0",
2174
2233
  wordBreak: "break-word",
2175
2234
  hyphens: "auto"
2176
2235
  },
2177
- children: k
2236
+ children: A
2178
2237
  }
2179
2238
  ),
2180
- h > 60 && A > 45 && /* @__PURE__ */ s(
2239
+ x > 60 && y > 45 && /* @__PURE__ */ s(
2181
2240
  "div",
2182
2241
  {
2183
2242
  style: {
2184
- fontSize: `${Math.max(8, Math.min(h / 10, A / 10, 14))}px`,
2243
+ fontSize: `${Math.max(8, Math.min(x / 10, y / 10, 14))}px`,
2185
2244
  textAlign: "center",
2186
2245
  opacity: 0.9
2187
2246
  },
@@ -2194,51 +2253,51 @@ function tr({
2194
2253
  }
2195
2254
  )
2196
2255
  ] });
2197
- }, w = f.some((g) => "series" in g) ? [...new Set(f.map((g) => g.series).filter(Boolean))] : [];
2198
- let y = [];
2256
+ }, b = u.some((N) => "series" in N) ? [...new Set(u.map((N) => N.series).filter(Boolean))] : [];
2257
+ let h = [];
2199
2258
  if (o.showLegend && m)
2200
- if (u) {
2201
- const g = Math.min(...e.map((x) => {
2202
- const h = x[m];
2203
- return typeof h == "string" ? parseFloat(h) : h;
2204
- })), b = Math.max(...e.map((x) => {
2205
- const h = x[m];
2206
- return typeof h == "string" ? parseFloat(h) : h;
2259
+ if (f) {
2260
+ const N = Math.min(...e.map((p) => {
2261
+ const x = p[m];
2262
+ return typeof x == "string" ? parseFloat(x) : x;
2263
+ })), S = Math.max(...e.map((p) => {
2264
+ const x = p[m];
2265
+ return typeof x == "string" ? parseFloat(x) : x;
2207
2266
  }));
2208
- y = ae.map((x, h) => {
2209
- const A = h / (ae.length - 1);
2267
+ h = oe.map((p, x) => {
2268
+ const y = x / (oe.length - 1);
2210
2269
  return {
2211
- value: (g + (b - g) * A).toFixed(2),
2270
+ value: (N + (S - N) * y).toFixed(2),
2212
2271
  type: "rect",
2213
- color: x
2272
+ color: p
2214
2273
  };
2215
2274
  });
2216
- } else w.length > 1 && (y = w.map((g, b) => ({
2217
- value: g,
2275
+ } else b.length > 1 && (h = b.map((N, S) => ({
2276
+ value: N,
2218
2277
  type: "rect",
2219
- color: j[b % j.length]
2278
+ color: F[S % F.length]
2220
2279
  })));
2221
- const S = o.showLegend && y.length > 0, $ = S ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2222
- return /* @__PURE__ */ N("div", { className: "w-full", style: { height: $ }, children: [
2223
- /* @__PURE__ */ s(G, { height: S ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
2224
- Dt,
2280
+ const $ = o.showLegend && h.length > 0, T = $ ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2281
+ return /* @__PURE__ */ g("div", { className: "w-full", style: { height: T }, children: [
2282
+ /* @__PURE__ */ s(U, { height: $ ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
2283
+ zt,
2225
2284
  {
2226
- data: f,
2285
+ data: u,
2227
2286
  dataKey: "size",
2228
2287
  aspectRatio: 4 / 3,
2229
2288
  stroke: "#fff",
2230
- content: /* @__PURE__ */ s(p, {}),
2231
- children: o.showTooltip && /* @__PURE__ */ s(C, {})
2289
+ content: /* @__PURE__ */ s(v, {}),
2290
+ children: o.showTooltip && /* @__PURE__ */ s(X, {})
2232
2291
  }
2233
2292
  ) }),
2234
- S && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
2293
+ $ && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: f ? (
2235
2294
  // Gradient legend for numeric series
2236
- /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
2295
+ /* @__PURE__ */ g("div", { className: "flex flex-col items-center", children: [
2237
2296
  /* @__PURE__ */ s("div", { className: "text-xs font-semibold text-dc-text-primary mb-2", children: m ? d(m) : "" }),
2238
- /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2239
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((g) => {
2240
- const b = g[m];
2241
- return typeof b == "string" ? parseFloat(b) : b;
2297
+ /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
2298
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((N) => {
2299
+ const S = N[m];
2300
+ return typeof S == "string" ? parseFloat(S) : S;
2242
2301
  })).toFixed(2) }),
2243
2302
  /* @__PURE__ */ s(
2244
2303
  "div",
@@ -2246,51 +2305,51 @@ function tr({
2246
2305
  className: "h-4 rounded-sm",
2247
2306
  style: {
2248
2307
  width: "200px",
2249
- background: `linear-gradient(to right, ${ae.join(", ")})`
2308
+ background: `linear-gradient(to right, ${oe.join(", ")})`
2250
2309
  }
2251
2310
  }
2252
2311
  ),
2253
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((g) => {
2254
- const b = g[m];
2255
- return typeof b == "string" ? parseFloat(b) : b;
2312
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((N) => {
2313
+ const S = N[m];
2314
+ return typeof S == "string" ? parseFloat(S) : S;
2256
2315
  })).toFixed(2) })
2257
2316
  ] })
2258
2317
  ] })
2259
2318
  ) : (
2260
2319
  // Discrete legend for categorical series
2261
- /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: y.map((g, b) => /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2320
+ /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: h.map((N, S) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
2262
2321
  /* @__PURE__ */ s(
2263
2322
  "div",
2264
2323
  {
2265
2324
  className: "w-3 h-3 rounded-xs",
2266
- style: { backgroundColor: g.color }
2325
+ style: { backgroundColor: N.color }
2267
2326
  }
2268
2327
  ),
2269
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: g.value })
2270
- ] }, b)) })
2328
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: N.value })
2329
+ ] }, S)) })
2271
2330
  ) })
2272
2331
  ] });
2273
2332
  } catch (o) {
2274
- return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2333
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2275
2334
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2276
2335
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2277
2336
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2278
2337
  ] }) });
2279
2338
  }
2280
2339
  }
2281
- function nr({
2340
+ function ir({
2282
2341
  data: e,
2283
2342
  chartConfig: t,
2284
2343
  height: n = 300
2285
2344
  }) {
2286
- const { getFieldLabel: r } = W();
2345
+ const { getFieldLabel: r } = Y();
2287
2346
  if (!e || e.length === 0)
2288
2347
  return /* @__PURE__ */ s(
2289
2348
  "div",
2290
2349
  {
2291
2350
  className: "flex items-center justify-center w-full",
2292
2351
  style: { height: n },
2293
- children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2352
+ children: /* @__PURE__ */ g("div", { className: "text-center text-dc-text-muted", children: [
2294
2353
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2295
2354
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data to display in table" })
2296
2355
  ] })
@@ -2302,12 +2361,12 @@ function nr({
2302
2361
  {
2303
2362
  className: "flex items-center justify-center w-full",
2304
2363
  style: { height: n },
2305
- children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2364
+ children: /* @__PURE__ */ g("div", { className: "text-center text-dc-text-muted", children: [
2306
2365
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2307
2366
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "Data structure is invalid" })
2308
2367
  ] })
2309
2368
  }
2310
- ) : /* @__PURE__ */ s("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ N("table", { className: "min-w-full divide-y border-dc-border", children: [
2369
+ ) : /* @__PURE__ */ s("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ g("table", { className: "min-w-full divide-y border-dc-border", children: [
2311
2370
  /* @__PURE__ */ s("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ s("tr", { children: l.map((a) => /* @__PURE__ */ s(
2312
2371
  "th",
2313
2372
  {
@@ -2320,23 +2379,23 @@ function nr({
2320
2379
  "td",
2321
2380
  {
2322
2381
  className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
2323
- children: On(a[d])
2382
+ children: Un(a[d])
2324
2383
  },
2325
2384
  d
2326
2385
  )) }, c)) })
2327
2386
  ] }) });
2328
2387
  }
2329
- function On(e) {
2388
+ function Un(e) {
2330
2389
  return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
2331
2390
  }
2332
- function rr(e) {
2333
- const t = Gn(e);
2391
+ function sr(e) {
2392
+ const t = qn(e);
2334
2393
  return {
2335
2394
  portlets: e,
2336
2395
  layouts: t
2337
2396
  };
2338
2397
  }
2339
- function Gn(e) {
2398
+ function qn(e) {
2340
2399
  const t = e.map((n) => ({
2341
2400
  i: n.id,
2342
2401
  x: n.x,
@@ -2354,7 +2413,7 @@ function Gn(e) {
2354
2413
  xxs: t.map((n) => ({ ...n, w: 2 }))
2355
2414
  };
2356
2415
  }
2357
- function ir(e, t = {}) {
2416
+ function ar(e, t = {}) {
2358
2417
  const { formatNumbers: n = !0, precision: r = 2 } = t;
2359
2418
  return n ? e.map((i) => {
2360
2419
  const l = {};
@@ -2363,13 +2422,13 @@ function ir(e, t = {}) {
2363
2422
  return l;
2364
2423
  }) : e;
2365
2424
  }
2366
- function sr() {
2425
+ function lr() {
2367
2426
  return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2368
2427
  }
2369
- function ar(e, t = 6, n = 4) {
2428
+ function or(e, t = 6, n = 4) {
2370
2429
  return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((i) => i.y + i.h)) };
2371
2430
  }
2372
- function lr(e) {
2431
+ function cr(e) {
2373
2432
  try {
2374
2433
  const t = JSON.parse(e);
2375
2434
  return typeof t != "object" || t === null ? { valid: !1, error: "Query must be a JSON object" } : !t.measures && !t.dimensions ? { valid: !1, error: "Query must have at least measures or dimensions" } : { valid: !0, query: t };
@@ -2377,7 +2436,7 @@ function lr(e) {
2377
2436
  return { valid: !1, error: "Invalid JSON format" };
2378
2437
  }
2379
2438
  }
2380
- function or() {
2439
+ function dr() {
2381
2440
  return {
2382
2441
  title: "Sample Chart",
2383
2442
  query: JSON.stringify({
@@ -2401,45 +2460,45 @@ function or() {
2401
2460
  };
2402
2461
  }
2403
2462
  export {
2404
- Qn as A,
2405
- Yn as B,
2406
- be as C,
2407
- nr as D,
2408
- ar as E,
2409
- lr as F,
2410
- or as G,
2411
- Ge as H,
2412
- Xn as L,
2413
- Et as N,
2414
- Zn as P,
2415
- Pn as R,
2416
- Jn as S,
2417
- tr as T,
2418
- er as a,
2419
- Je as b,
2420
- rr as c,
2421
- gn as d,
2422
- ee as e,
2423
- ir as f,
2424
- Rn as g,
2425
- Ie as h,
2426
- xe as i,
2427
- Y as j,
2428
- H as k,
2429
- yt as l,
2430
- R as m,
2431
- Ae as n,
2432
- Hn as o,
2433
- Z as p,
2434
- gt as q,
2435
- ae as r,
2436
- ht as s,
2437
- Vn as t,
2438
- j as u,
2439
- Fe as v,
2440
- Wn as w,
2441
- Bn as x,
2442
- Gn as y,
2443
- sr as z
2463
+ Jn as A,
2464
+ Qn as B,
2465
+ we as C,
2466
+ ir as D,
2467
+ or as E,
2468
+ cr as F,
2469
+ dr as G,
2470
+ Ue as H,
2471
+ Zn as L,
2472
+ It as N,
2473
+ Pn as P,
2474
+ tr as R,
2475
+ er as S,
2476
+ rr as T,
2477
+ nr as a,
2478
+ Pe as b,
2479
+ sr as c,
2480
+ vn as d,
2481
+ re as e,
2482
+ ar as f,
2483
+ In as g,
2484
+ He as h,
2485
+ ye as i,
2486
+ Z as j,
2487
+ I as k,
2488
+ gt as l,
2489
+ z as m,
2490
+ ke as n,
2491
+ Gn as o,
2492
+ ee as p,
2493
+ vt as q,
2494
+ oe as r,
2495
+ pt as s,
2496
+ _n as t,
2497
+ F as u,
2498
+ je as v,
2499
+ Xn as w,
2500
+ Yn as x,
2501
+ qn as y,
2502
+ lr as z
2444
2503
  };
2445
- //# sourceMappingURL=charts-CC85023I.js.map
2504
+ //# sourceMappingURL=charts-C4AUz_2H.js.map