drizzle-cube 0.1.31 → 0.1.33
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.
- package/README.md +51 -8
- package/dist/adapters/{compiler-CVega_Gv.js → compiler-Ce33cdy6.js} +925 -896
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-MTxju0dv.js → charts-D4v7aUDh.js} +268 -244
- package/dist/client/chunks/charts-D4v7aUDh.js.map +1 -0
- package/dist/client/chunks/components-BXU3r9yv.js +19905 -0
- package/dist/client/chunks/components-BXU3r9yv.js.map +1 -0
- package/dist/client/chunks/{icons-C_McHd9z.js → icons-CEfXECaS.js} +174 -298
- package/dist/client/chunks/icons-CEfXECaS.js.map +1 -0
- package/dist/client/components/Modal.d.ts +1 -1
- package/dist/client/components.js +16 -19642
- package/dist/client/components.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +31 -24
- package/dist/client/styles.css +1 -1
- package/dist/client/theme/index.d.ts +101 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.d.ts +11 -2
- package/dist/server/index.js +1258 -1229
- package/package.json +2 -2
- package/dist/client/chunks/charts-MTxju0dv.js.map +0 -1
- package/dist/client/chunks/icons-C_McHd9z.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as N, Fragment as $e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as H } from "react";
|
|
3
|
-
import { ResponsiveContainer as _e, Tooltip as yt, ComposedChart as it, CartesianGrid as ye, XAxis as ge, YAxis as pe, Legend as K, Bar as gt, Cell as Le, Line as U, LineChart as pt, Area as vt, PieChart as bt, Pie as wt, ScatterChart as Nt, Scatter as Oe, RadarChart as At, PolarGrid as
|
|
3
|
+
import { ResponsiveContainer as _e, Tooltip as yt, ComposedChart as it, CartesianGrid as ye, XAxis as ge, YAxis as pe, Legend as K, Bar as gt, Cell as Le, Line as U, LineChart as pt, Area as vt, PieChart as bt, Pie as wt, ScatterChart as Nt, Scatter as Oe, RadarChart as At, PolarGrid as kt, PolarAngleAxis as St, PolarRadiusAxis as Mt, Radar as $t, RadialBarChart as Lt, RadialBar as Tt, Treemap as Ft } from "recharts";
|
|
4
4
|
import { u as B } from "./providers-DwDirAYo.js";
|
|
5
|
-
function
|
|
5
|
+
function C({ children: e, height: t = "100%" }) {
|
|
6
6
|
try {
|
|
7
7
|
if (t === "100%")
|
|
8
8
|
return /* @__PURE__ */ s("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ s(_e, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
|
|
@@ -16,17 +16,17 @@ function G({ children: e, height: t = "100%" }) {
|
|
|
16
16
|
return /* @__PURE__ */ N(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border-2 border-dashed
|
|
20
|
-
style: { height: t },
|
|
19
|
+
className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border-2 border-dashed rounded-lg",
|
|
20
|
+
style: { height: t, borderColor: "var(--dc-warning-border)", backgroundColor: "var(--dc-warning-bg)" },
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */ s("div", { className: "text-sm font-semibold
|
|
23
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
22
|
+
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", style: { color: "var(--dc-warning)" }, children: "Chart Container Error" }),
|
|
23
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: n instanceof Error ? n.message : "Failed to create responsive container" })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function G({ formatter: e, labelFormatter: t }) {
|
|
30
30
|
return /* @__PURE__ */ s(
|
|
31
31
|
yt,
|
|
32
32
|
{
|
|
@@ -163,19 +163,19 @@ function ee(e, t, n, r, i, l = {}) {
|
|
|
163
163
|
], d = a.measures || [], o = n.filter((v) => d.includes(v)), f = (i || []).filter((v) => c.includes(v));
|
|
164
164
|
if (f.length > 0) {
|
|
165
165
|
const v = {};
|
|
166
|
-
e.forEach((
|
|
167
|
-
const
|
|
168
|
-
v[$] || (v[$] = { name: String($) }), o.forEach((
|
|
169
|
-
const w = Ne(
|
|
170
|
-
v[$][w] = (v[$][w] || 0) + (typeof h
|
|
171
|
-
}), f.forEach((
|
|
172
|
-
const w = h
|
|
166
|
+
e.forEach((x) => {
|
|
167
|
+
const k = O(r, t), $ = R(x[t], k) || x[t] || "Unknown";
|
|
168
|
+
v[$] || (v[$] = { name: String($) }), o.forEach((h) => {
|
|
169
|
+
const w = Ne(h, l);
|
|
170
|
+
v[$][w] = (v[$][w] || 0) + (typeof x[h] == "string" ? parseFloat(x[h]) : x[h] || 0);
|
|
171
|
+
}), f.forEach((h) => {
|
|
172
|
+
const w = x[h];
|
|
173
173
|
if (w != null) {
|
|
174
174
|
const y = String(w), g = o[0] || d.find(
|
|
175
175
|
(b) => b.includes("totalCost") || b.includes("count") || b.includes("sum")
|
|
176
176
|
) || d[0];
|
|
177
177
|
if (g) {
|
|
178
|
-
const b = typeof
|
|
178
|
+
const b = typeof x[g] == "string" ? parseFloat(x[g]) : x[g] || 0;
|
|
179
179
|
v[$][y] = (v[$][y] || 0) + b;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ function ee(e, t, n, r, i, l = {}) {
|
|
|
183
183
|
});
|
|
184
184
|
const p = Object.values(v), A = Array.from(new Set(
|
|
185
185
|
e.flatMap(
|
|
186
|
-
(
|
|
187
|
-
const $ =
|
|
186
|
+
(x) => f.map((k) => {
|
|
187
|
+
const $ = x[k];
|
|
188
188
|
return $ != null ? String($) : null;
|
|
189
|
-
}).filter((
|
|
189
|
+
}).filter((k) => k !== null)
|
|
190
190
|
)
|
|
191
191
|
));
|
|
192
192
|
return {
|
|
@@ -257,9 +257,9 @@ function Kn({
|
|
|
257
257
|
stacked: n?.stacked ?? !1
|
|
258
258
|
};
|
|
259
259
|
if (!e || e.length === 0)
|
|
260
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
260
|
+
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: [
|
|
261
261
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
262
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in bar chart" })
|
|
262
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
|
|
263
263
|
] }) });
|
|
264
264
|
let u, m, v = [];
|
|
265
265
|
if (t?.xAxis && t?.yAxis)
|
|
@@ -283,10 +283,10 @@ function Kn({
|
|
|
283
283
|
r,
|
|
284
284
|
v,
|
|
285
285
|
d
|
|
286
|
-
),
|
|
286
|
+
), x = f.stacked === !0, k = A.length === 1 && p.some((b) => {
|
|
287
287
|
const M = b[A[0]];
|
|
288
288
|
return typeof M == "number" && M < 0;
|
|
289
|
-
}), $ = f.showLegend,
|
|
289
|
+
}), $ = f.showLegend, h = {
|
|
290
290
|
...ve,
|
|
291
291
|
left: 40
|
|
292
292
|
// Increased from 20 to 40 for Y-axis label space
|
|
@@ -295,10 +295,10 @@ function Kn({
|
|
|
295
295
|
return y.length > 0 && (g = p.map((b, M) => ({
|
|
296
296
|
...b,
|
|
297
297
|
__target: y[M] || null
|
|
298
|
-
}))), !p || p.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
298
|
+
}))), !p || p.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: [
|
|
299
299
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
300
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for bar chart after transformation" })
|
|
301
|
-
] }) }) : /* @__PURE__ */ s(
|
|
300
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
|
|
301
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(it, { data: g, margin: h, children: [
|
|
302
302
|
f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
|
|
303
303
|
/* @__PURE__ */ s(
|
|
304
304
|
ge,
|
|
@@ -318,7 +318,7 @@ function Kn({
|
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
320
|
f.showTooltip && /* @__PURE__ */ s(
|
|
321
|
-
|
|
321
|
+
G,
|
|
322
322
|
{
|
|
323
323
|
formatter: (b, M) => M === "Target" ? [`${b}`, "Target Value"] : [b, M]
|
|
324
324
|
}
|
|
@@ -340,11 +340,11 @@ function Kn({
|
|
|
340
340
|
gt,
|
|
341
341
|
{
|
|
342
342
|
dataKey: b,
|
|
343
|
-
stackId:
|
|
344
|
-
fill:
|
|
343
|
+
stackId: x ? "stack" : void 0,
|
|
344
|
+
fill: k ? He : l?.colors && l.colors[M % l.colors.length] || T[M % T.length],
|
|
345
345
|
fillOpacity: a ? a === b ? 1 : 0.3 : 1,
|
|
346
|
-
children:
|
|
347
|
-
const
|
|
346
|
+
children: k && p.map((L, F) => {
|
|
347
|
+
const S = L[b], E = typeof S == "number" && S < 0 ? jt : He;
|
|
348
348
|
return /* @__PURE__ */ s(
|
|
349
349
|
Le,
|
|
350
350
|
{
|
|
@@ -390,7 +390,7 @@ function Kn({
|
|
|
390
390
|
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: [
|
|
391
391
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
|
|
392
392
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
|
|
393
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
393
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
394
394
|
] }) });
|
|
395
395
|
}
|
|
396
396
|
}
|
|
@@ -410,9 +410,9 @@ function Bn({
|
|
|
410
410
|
showTooltip: n?.showTooltip ?? !0
|
|
411
411
|
};
|
|
412
412
|
if (!e || e.length === 0)
|
|
413
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
413
|
+
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: [
|
|
414
414
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
415
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in line chart" })
|
|
415
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
|
|
416
416
|
] }) });
|
|
417
417
|
let u, m, v = [];
|
|
418
418
|
if (t?.xAxis && t?.yAxis)
|
|
@@ -436,19 +436,19 @@ function Bn({
|
|
|
436
436
|
r,
|
|
437
437
|
v,
|
|
438
438
|
d
|
|
439
|
-
),
|
|
439
|
+
), x = f.showLegend, k = {
|
|
440
440
|
...ve,
|
|
441
441
|
left: 40
|
|
442
442
|
// Increased from 20 to 40 for Y-axis label space
|
|
443
|
-
}, $ = Te(n?.target || ""),
|
|
443
|
+
}, $ = Te(n?.target || ""), h = Fe($, p.length);
|
|
444
444
|
let w = p;
|
|
445
|
-
return
|
|
445
|
+
return h.length > 0 && (w = p.map((y, g) => ({
|
|
446
446
|
...y,
|
|
447
|
-
__target:
|
|
448
|
-
}))), !p || p.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
447
|
+
__target: h[g] || null
|
|
448
|
+
}))), !p || p.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: [
|
|
449
449
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
450
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for line chart after transformation" })
|
|
451
|
-
] }) }) : /* @__PURE__ */ s(
|
|
450
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
|
|
451
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(pt, { data: w, margin: k, children: [
|
|
452
452
|
f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
|
|
453
453
|
/* @__PURE__ */ s(
|
|
454
454
|
ge,
|
|
@@ -468,12 +468,12 @@ function Bn({
|
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
470
|
f.showTooltip && /* @__PURE__ */ s(
|
|
471
|
-
|
|
471
|
+
G,
|
|
472
472
|
{
|
|
473
473
|
formatter: (y, g) => g === "Target" ? [`${y}`, "Target Value"] : [y, g]
|
|
474
474
|
}
|
|
475
475
|
),
|
|
476
|
-
|
|
476
|
+
x && /* @__PURE__ */ s(
|
|
477
477
|
K,
|
|
478
478
|
{
|
|
479
479
|
wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
|
|
@@ -499,7 +499,7 @@ function Bn({
|
|
|
499
499
|
},
|
|
500
500
|
y
|
|
501
501
|
)),
|
|
502
|
-
|
|
502
|
+
h.length > 0 && /* @__PURE__ */ N($e, { children: [
|
|
503
503
|
/* @__PURE__ */ s(
|
|
504
504
|
U,
|
|
505
505
|
{
|
|
@@ -532,7 +532,7 @@ function Bn({
|
|
|
532
532
|
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: [
|
|
533
533
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
|
|
534
534
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
|
|
535
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
535
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
536
536
|
] }) });
|
|
537
537
|
}
|
|
538
538
|
}
|
|
@@ -553,9 +553,9 @@ function Wn({
|
|
|
553
553
|
stacked: n?.stacked ?? !1
|
|
554
554
|
};
|
|
555
555
|
if (!e || e.length === 0)
|
|
556
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
556
|
+
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: [
|
|
557
557
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
558
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in area chart" })
|
|
558
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
|
|
559
559
|
] }) });
|
|
560
560
|
let u, m, v = [];
|
|
561
561
|
if (t?.xAxis && t?.yAxis)
|
|
@@ -579,19 +579,19 @@ function Wn({
|
|
|
579
579
|
r,
|
|
580
580
|
v,
|
|
581
581
|
d
|
|
582
|
-
),
|
|
582
|
+
), x = f.showLegend, k = {
|
|
583
583
|
...ve,
|
|
584
584
|
left: 40
|
|
585
585
|
// Increased from 20 to 40 for Y-axis label space
|
|
586
|
-
}, $ = Te(n?.target || ""),
|
|
586
|
+
}, $ = Te(n?.target || ""), h = Fe($, p.length);
|
|
587
587
|
let w = p;
|
|
588
|
-
return
|
|
588
|
+
return h.length > 0 && (w = p.map((y, g) => ({
|
|
589
589
|
...y,
|
|
590
|
-
__target:
|
|
591
|
-
}))), !p || p.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
590
|
+
__target: h[g] || null
|
|
591
|
+
}))), !p || p.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: [
|
|
592
592
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
593
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for area chart after transformation" })
|
|
594
|
-
] }) }) : /* @__PURE__ */ s(
|
|
593
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
|
|
594
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(it, { data: w, margin: k, children: [
|
|
595
595
|
f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
|
|
596
596
|
/* @__PURE__ */ s(
|
|
597
597
|
ge,
|
|
@@ -611,12 +611,12 @@ function Wn({
|
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
f.showTooltip && /* @__PURE__ */ s(
|
|
614
|
-
|
|
614
|
+
G,
|
|
615
615
|
{
|
|
616
616
|
formatter: (y, g) => g === "Target" ? [`${y}`, "Target Value"] : [y, g]
|
|
617
617
|
}
|
|
618
618
|
),
|
|
619
|
-
|
|
619
|
+
x && /* @__PURE__ */ s(
|
|
620
620
|
K,
|
|
621
621
|
{
|
|
622
622
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
@@ -643,7 +643,7 @@ function Wn({
|
|
|
643
643
|
},
|
|
644
644
|
y
|
|
645
645
|
)),
|
|
646
|
-
|
|
646
|
+
h.length > 0 && /* @__PURE__ */ N($e, { children: [
|
|
647
647
|
/* @__PURE__ */ s(
|
|
648
648
|
U,
|
|
649
649
|
{
|
|
@@ -676,7 +676,7 @@ function Wn({
|
|
|
676
676
|
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: [
|
|
677
677
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
|
|
678
678
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
|
|
679
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
679
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
680
680
|
] }) });
|
|
681
681
|
}
|
|
682
682
|
}
|
|
@@ -695,9 +695,9 @@ function Yn({
|
|
|
695
695
|
showTooltip: n?.showTooltip ?? !0
|
|
696
696
|
};
|
|
697
697
|
if (!e || e.length === 0)
|
|
698
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
698
|
+
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: [
|
|
699
699
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
700
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in pie chart" })
|
|
700
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
|
|
701
701
|
] }) });
|
|
702
702
|
let f, u, m, v = [];
|
|
703
703
|
if (t?.xAxis && t?.yAxis)
|
|
@@ -724,31 +724,31 @@ function Yn({
|
|
|
724
724
|
d
|
|
725
725
|
);
|
|
726
726
|
if (f = [], A.length > 0) {
|
|
727
|
-
const
|
|
728
|
-
Object.keys(
|
|
729
|
-
|
|
730
|
-
name: String(
|
|
731
|
-
value:
|
|
727
|
+
const x = A[0];
|
|
728
|
+
Object.keys(x).forEach((k) => {
|
|
729
|
+
k !== "name" && typeof x[k] == "number" && f.push({
|
|
730
|
+
name: String(k),
|
|
731
|
+
value: x[k]
|
|
732
732
|
});
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
} else {
|
|
736
736
|
const A = O(r, u);
|
|
737
|
-
f = e.map((
|
|
738
|
-
let
|
|
739
|
-
return typeof
|
|
740
|
-
name:
|
|
741
|
-
value: typeof
|
|
737
|
+
f = e.map((x) => {
|
|
738
|
+
let k = R(x[u], A) || String(x[u]) || "Unknown";
|
|
739
|
+
return typeof x[u] == "boolean" ? k = x[u] ? "Active" : "Inactive" : (k === "true" || k === "false") && (k = k === "true" ? "Active" : "Inactive"), {
|
|
740
|
+
name: k,
|
|
741
|
+
value: typeof x[m[0]] == "string" ? parseFloat(x[m[0]]) : x[m[0]] || 0
|
|
742
742
|
};
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
745
|
const p = f.length;
|
|
746
746
|
return f = f.filter(
|
|
747
747
|
(A) => A.value != null && !isNaN(A.value) && A.value !== 0 && A.value > 0
|
|
748
|
-
), f.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
748
|
+
), 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: [
|
|
749
749
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
750
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: p > 0 ? `Filtered out ${p} data points (zero or invalid values)` : "No data points to display in pie chart" })
|
|
751
|
-
] }) }) : /* @__PURE__ */ s(
|
|
750
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: p > 0 ? `Filtered out ${p} data points (zero or invalid values)` : "No data points to display in pie chart" })
|
|
751
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(bt, { children: [
|
|
752
752
|
/* @__PURE__ */ s(
|
|
753
753
|
wt,
|
|
754
754
|
{
|
|
@@ -757,18 +757,18 @@ function Yn({
|
|
|
757
757
|
cy: "50%",
|
|
758
758
|
outerRadius: "70%",
|
|
759
759
|
dataKey: "value",
|
|
760
|
-
label: o.showLegend ? void 0 : ({ name: A, percent:
|
|
761
|
-
children: f.map((A,
|
|
760
|
+
label: o.showLegend ? void 0 : ({ name: A, percent: x }) => `${A} ${((x || 0) * 100).toFixed(0)}%`,
|
|
761
|
+
children: f.map((A, x) => /* @__PURE__ */ s(
|
|
762
762
|
Le,
|
|
763
763
|
{
|
|
764
|
-
fill: l?.colors && l.colors[
|
|
765
|
-
fillOpacity: a ? a === f[
|
|
764
|
+
fill: l?.colors && l.colors[x % l.colors.length] || T[x % T.length],
|
|
765
|
+
fillOpacity: a ? a === f[x].name ? 1 : 0.3 : 1
|
|
766
766
|
},
|
|
767
|
-
`cell-${
|
|
767
|
+
`cell-${x}`
|
|
768
768
|
))
|
|
769
769
|
}
|
|
770
770
|
),
|
|
771
|
-
o.showTooltip && /* @__PURE__ */ s(
|
|
771
|
+
o.showTooltip && /* @__PURE__ */ s(G, {}),
|
|
772
772
|
o.showLegend && /* @__PURE__ */ s(
|
|
773
773
|
K,
|
|
774
774
|
{
|
|
@@ -787,7 +787,7 @@ function Yn({
|
|
|
787
787
|
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: [
|
|
788
788
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
|
|
789
789
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
790
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
790
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
791
791
|
] }) });
|
|
792
792
|
}
|
|
793
793
|
}
|
|
@@ -807,9 +807,9 @@ function Xn({
|
|
|
807
807
|
showTooltip: n?.showTooltip ?? !0
|
|
808
808
|
};
|
|
809
809
|
if (!e || e.length === 0)
|
|
810
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
810
|
+
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: [
|
|
811
811
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
812
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in scatter chart" })
|
|
812
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
|
|
813
813
|
] }) });
|
|
814
814
|
let f, u, m = [];
|
|
815
815
|
if (t?.xAxis && t?.yAxis)
|
|
@@ -828,9 +828,9 @@ function Xn({
|
|
|
828
828
|
] }) });
|
|
829
829
|
let v, p = {};
|
|
830
830
|
if (m.length > 0) {
|
|
831
|
-
const
|
|
831
|
+
const h = m[0];
|
|
832
832
|
e.forEach((y) => {
|
|
833
|
-
const g = String(y[
|
|
833
|
+
const g = String(y[h] || "Default");
|
|
834
834
|
p[g] || (p[g] = []);
|
|
835
835
|
const b = O(r, f), M = R(y[f], b) || y[f], L = typeof y[u] == "string" ? parseFloat(y[u]) : y[u] || 0;
|
|
836
836
|
p[g].push({
|
|
@@ -842,9 +842,9 @@ function Xn({
|
|
|
842
842
|
const w = Object.keys(p);
|
|
843
843
|
v = p[w[0]] || [];
|
|
844
844
|
} else {
|
|
845
|
-
const
|
|
845
|
+
const h = O(r, f);
|
|
846
846
|
v = e.map((w) => {
|
|
847
|
-
const y = R(w[f],
|
|
847
|
+
const y = R(w[f], h) || w[f], g = typeof w[u] == "string" ? parseFloat(w[u]) : w[u] || 0;
|
|
848
848
|
return {
|
|
849
849
|
x: typeof y == "string" ? parseFloat(y) || 0 : y,
|
|
850
850
|
y: g,
|
|
@@ -853,16 +853,16 @@ function Xn({
|
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
855
|
if (!v || v.length === 0)
|
|
856
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
856
|
+
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: [
|
|
857
857
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
858
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for scatter chart after transformation" })
|
|
858
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
|
|
859
859
|
] }) });
|
|
860
|
-
const A = Object.keys(p),
|
|
860
|
+
const A = Object.keys(p), x = A.length > 1, k = o.showLegend && x, $ = {
|
|
861
861
|
...ve,
|
|
862
862
|
left: 40
|
|
863
863
|
// Increased from 20 to 40 for Y-axis label space
|
|
864
864
|
};
|
|
865
|
-
return /* @__PURE__ */ s(
|
|
865
|
+
return /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(Nt, { data: v, margin: $, children: [
|
|
866
866
|
o.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
|
|
867
867
|
/* @__PURE__ */ s(
|
|
868
868
|
ge,
|
|
@@ -883,8 +883,8 @@ function Xn({
|
|
|
883
883
|
label: { value: d(u), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
|
|
884
884
|
}
|
|
885
885
|
),
|
|
886
|
-
o.showTooltip && /* @__PURE__ */ s(
|
|
887
|
-
|
|
886
|
+
o.showTooltip && /* @__PURE__ */ s(G, {}),
|
|
887
|
+
k && /* @__PURE__ */ s(
|
|
888
888
|
K,
|
|
889
889
|
{
|
|
890
890
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
@@ -893,21 +893,21 @@ function Xn({
|
|
|
893
893
|
layout: "horizontal",
|
|
894
894
|
align: "center",
|
|
895
895
|
verticalAlign: "bottom",
|
|
896
|
-
onMouseEnter: (
|
|
896
|
+
onMouseEnter: (h) => c(String(h.dataKey || "")),
|
|
897
897
|
onMouseLeave: () => c(null)
|
|
898
898
|
}
|
|
899
899
|
),
|
|
900
|
-
|
|
900
|
+
x ? (
|
|
901
901
|
// Multiple series
|
|
902
|
-
A.map((
|
|
902
|
+
A.map((h, w) => /* @__PURE__ */ s(
|
|
903
903
|
Oe,
|
|
904
904
|
{
|
|
905
|
-
name:
|
|
906
|
-
data: p[
|
|
905
|
+
name: h,
|
|
906
|
+
data: p[h],
|
|
907
907
|
fill: l?.colors && l.colors[w % l.colors.length] || T[w % T.length],
|
|
908
|
-
fillOpacity: a ? a ===
|
|
908
|
+
fillOpacity: a ? a === h ? 1 : 0.3 : 1
|
|
909
909
|
},
|
|
910
|
-
|
|
910
|
+
h
|
|
911
911
|
))
|
|
912
912
|
) : (
|
|
913
913
|
// Single series
|
|
@@ -925,7 +925,7 @@ function Xn({
|
|
|
925
925
|
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: [
|
|
926
926
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
|
|
927
927
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
928
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
928
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
929
929
|
] }) });
|
|
930
930
|
}
|
|
931
931
|
}
|
|
@@ -945,9 +945,9 @@ function Qn({
|
|
|
945
945
|
showGrid: n?.showGrid ?? !0
|
|
946
946
|
};
|
|
947
947
|
if (!e || e.length === 0)
|
|
948
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
948
|
+
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: [
|
|
949
949
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
950
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in radar chart" })
|
|
950
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
|
|
951
951
|
] }) });
|
|
952
952
|
let o, f = [];
|
|
953
953
|
if (t?.xAxis && t?.yAxis) {
|
|
@@ -972,42 +972,42 @@ function Qn({
|
|
|
972
972
|
] }) });
|
|
973
973
|
if (v) {
|
|
974
974
|
const A = O(r, v);
|
|
975
|
-
o = e.map((
|
|
976
|
-
const
|
|
977
|
-
name: R(
|
|
975
|
+
o = e.map((x) => {
|
|
976
|
+
const k = {
|
|
977
|
+
name: R(x[v], A) || String(x[v]) || "Unknown"
|
|
978
978
|
};
|
|
979
979
|
return p.forEach(($) => {
|
|
980
|
-
const
|
|
981
|
-
|
|
982
|
-
}),
|
|
983
|
-
}), f = p.map((
|
|
980
|
+
const h = $.split(".").pop() || $;
|
|
981
|
+
k[h] = typeof x[$] == "string" ? parseFloat(x[$]) : x[$] || 0;
|
|
982
|
+
}), k;
|
|
983
|
+
}), f = p.map((x) => x.split(".").pop() || x);
|
|
984
984
|
} else
|
|
985
985
|
o = e.map((A) => ({
|
|
986
986
|
name: String(A[m[0]] || "Unknown"),
|
|
987
987
|
value: typeof A[p[0]] == "string" ? parseFloat(A[p[0]]) : A[p[0]] || 0
|
|
988
988
|
})), f = ["value"];
|
|
989
989
|
}
|
|
990
|
-
return !o || o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
990
|
+
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: [
|
|
991
991
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
992
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for radar chart after transformation" })
|
|
993
|
-
] }) }) : /* @__PURE__ */ s(
|
|
994
|
-
d.showGrid && /* @__PURE__ */ s(
|
|
992
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
|
|
993
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(At, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
|
|
994
|
+
d.showGrid && /* @__PURE__ */ s(kt, {}),
|
|
995
995
|
/* @__PURE__ */ s(
|
|
996
|
-
|
|
996
|
+
St,
|
|
997
997
|
{
|
|
998
998
|
dataKey: "name",
|
|
999
999
|
tick: { fontSize: 12 },
|
|
1000
|
-
className: "text-
|
|
1000
|
+
className: "text-dc-text-muted"
|
|
1001
1001
|
}
|
|
1002
1002
|
),
|
|
1003
1003
|
/* @__PURE__ */ s(
|
|
1004
1004
|
Mt,
|
|
1005
1005
|
{
|
|
1006
1006
|
tick: { fontSize: 10 },
|
|
1007
|
-
className: "text-
|
|
1007
|
+
className: "text-dc-text-muted"
|
|
1008
1008
|
}
|
|
1009
1009
|
),
|
|
1010
|
-
d.showTooltip && /* @__PURE__ */ s(
|
|
1010
|
+
d.showTooltip && /* @__PURE__ */ s(G, {}),
|
|
1011
1011
|
d.showLegend && f.length > 1 && /* @__PURE__ */ s(
|
|
1012
1012
|
K,
|
|
1013
1013
|
{
|
|
@@ -1039,7 +1039,7 @@ function Qn({
|
|
|
1039
1039
|
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: [
|
|
1040
1040
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
|
|
1041
1041
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
|
|
1042
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
1042
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
1043
1043
|
] }) });
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
@@ -1058,9 +1058,9 @@ function Zn({
|
|
|
1058
1058
|
showTooltip: n?.showTooltip ?? !0
|
|
1059
1059
|
};
|
|
1060
1060
|
if (!e || e.length === 0)
|
|
1061
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
1061
|
+
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: [
|
|
1062
1062
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
1063
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in radial bar chart" })
|
|
1063
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
|
|
1064
1064
|
] }) });
|
|
1065
1065
|
let o;
|
|
1066
1066
|
if (t?.xAxis && t?.yAxis) {
|
|
@@ -1082,18 +1082,18 @@ function Zn({
|
|
|
1082
1082
|
/* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
|
|
1083
1083
|
] }) });
|
|
1084
1084
|
o = e.map((p, A) => {
|
|
1085
|
-
let
|
|
1086
|
-
return typeof
|
|
1087
|
-
name:
|
|
1085
|
+
let x = p[m];
|
|
1086
|
+
return typeof x == "boolean" ? x = x ? "Active" : "Inactive" : x === "true" || x === "false" ? x = x === "true" ? "Active" : "Inactive" : x = String(x), {
|
|
1087
|
+
name: x,
|
|
1088
1088
|
value: typeof p[v] == "string" ? parseFloat(p[v]) : p[v] || 0,
|
|
1089
1089
|
fill: l?.colors && l.colors[A % l.colors.length] || T[A % T.length]
|
|
1090
1090
|
};
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
|
-
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-
|
|
1093
|
+
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: [
|
|
1094
1094
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
1095
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for radial bar chart after transformation" })
|
|
1096
|
-
] }) }) : /* @__PURE__ */ s(
|
|
1095
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
|
|
1096
|
+
] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(
|
|
1097
1097
|
Lt,
|
|
1098
1098
|
{
|
|
1099
1099
|
data: o,
|
|
@@ -1101,7 +1101,7 @@ function Zn({
|
|
|
1101
1101
|
outerRadius: "80%",
|
|
1102
1102
|
margin: { top: 20, right: 30, bottom: 20, left: 30 },
|
|
1103
1103
|
children: [
|
|
1104
|
-
d.showTooltip && /* @__PURE__ */ s(
|
|
1104
|
+
d.showTooltip && /* @__PURE__ */ s(G, {}),
|
|
1105
1105
|
d.showLegend && /* @__PURE__ */ s(
|
|
1106
1106
|
K,
|
|
1107
1107
|
{
|
|
@@ -1138,7 +1138,7 @@ function Zn({
|
|
|
1138
1138
|
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: [
|
|
1139
1139
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
|
|
1140
1140
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
|
|
1141
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
1141
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
1142
1142
|
] }) });
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
@@ -1185,15 +1185,15 @@ function Rt(e) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
const It = st(ce), at = It.right;
|
|
1187
1187
|
st(Rt).center;
|
|
1188
|
-
class
|
|
1188
|
+
class Ce extends Map {
|
|
1189
1189
|
constructor(t, n = Ht) {
|
|
1190
1190
|
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);
|
|
1191
1191
|
}
|
|
1192
1192
|
get(t) {
|
|
1193
|
-
return super.get(
|
|
1193
|
+
return super.get(Ge(this, t));
|
|
1194
1194
|
}
|
|
1195
1195
|
has(t) {
|
|
1196
|
-
return super.has(
|
|
1196
|
+
return super.has(Ge(this, t));
|
|
1197
1197
|
}
|
|
1198
1198
|
set(t, n) {
|
|
1199
1199
|
return super.set(_t(this, t), n);
|
|
@@ -1202,7 +1202,7 @@ class Ge extends Map {
|
|
|
1202
1202
|
return super.delete(Ot(this, t));
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Ge({ _intern: e, _key: t }, n) {
|
|
1206
1206
|
const r = t(n);
|
|
1207
1207
|
return e.has(r) ? e.get(r) : n;
|
|
1208
1208
|
}
|
|
@@ -1217,9 +1217,9 @@ function Ot({ _intern: e, _key: t }, n) {
|
|
|
1217
1217
|
function Ht(e) {
|
|
1218
1218
|
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
1219
1219
|
}
|
|
1220
|
-
const
|
|
1220
|
+
const Ct = Math.sqrt(50), Gt = Math.sqrt(10), Vt = Math.sqrt(2);
|
|
1221
1221
|
function de(e, t, n) {
|
|
1222
|
-
const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >=
|
|
1222
|
+
const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >= Ct ? 10 : l >= Gt ? 5 : l >= Vt ? 2 : 1;
|
|
1223
1223
|
let c, d, o;
|
|
1224
1224
|
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 ? de(e, t, n * 2) : [c, d, o];
|
|
1225
1225
|
}
|
|
@@ -1254,7 +1254,7 @@ function lt(e, t) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
function te() {
|
|
1256
1256
|
}
|
|
1257
|
-
var Z = 0.7, fe = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", I = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Kt = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Wt = new RegExp(`^rgb\\(${I},${I},${I}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Xt = new RegExp(`^rgba\\(${I},${I},${I},${J}\\)$`), Qt = new RegExp(`^hsl\\(${J},${I},${I}\\)$`), Zt = new RegExp(`^hsla\\(${J},${I},${I},${J}\\)$`),
|
|
1257
|
+
var Z = 0.7, fe = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", I = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Kt = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Wt = new RegExp(`^rgb\\(${I},${I},${I}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Xt = new RegExp(`^rgba\\(${I},${I},${I},${J}\\)$`), Qt = new RegExp(`^hsl\\(${J},${I},${I}\\)$`), Zt = new RegExp(`^hsla\\(${J},${I},${I},${J}\\)$`), Ve = {
|
|
1258
1258
|
aliceblue: 15792383,
|
|
1259
1259
|
antiquewhite: 16444375,
|
|
1260
1260
|
aqua: 65535,
|
|
@@ -1433,7 +1433,7 @@ function qe() {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
function P(e) {
|
|
1435
1435
|
var t, n;
|
|
1436
|
-
return e = (e + "").trim().toLowerCase(), (t = Kt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ke(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ae(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ae(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 = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Wt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ae(t[1], t[2], t[3], t[4]) : (t = Xt.exec(e)) ? ae(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Qt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, 1) : (t = Zt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, t[4]) :
|
|
1436
|
+
return e = (e + "").trim().toLowerCase(), (t = Kt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ke(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ae(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ae(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 = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Wt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ae(t[1], t[2], t[3], t[4]) : (t = Xt.exec(e)) ? ae(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Qt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, 1) : (t = Zt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, t[4]) : Ve.hasOwnProperty(e) ? Ke(Ve[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
|
|
1437
1437
|
}
|
|
1438
1438
|
function Ke(e) {
|
|
1439
1439
|
return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
@@ -1444,13 +1444,13 @@ function ae(e, t, n, r) {
|
|
|
1444
1444
|
function en(e) {
|
|
1445
1445
|
return e instanceof te || (e = P(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function ke(e, t, n, r) {
|
|
1448
1448
|
return arguments.length === 1 ? en(e) : new j(e, t, n, r ?? 1);
|
|
1449
1449
|
}
|
|
1450
1450
|
function j(e, t, n, r) {
|
|
1451
1451
|
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
1452
1452
|
}
|
|
1453
|
-
je(j,
|
|
1453
|
+
je(j, ke, lt(te, {
|
|
1454
1454
|
brighter(e) {
|
|
1455
1455
|
return e = e == null ? fe : Math.pow(fe, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1456
1456
|
},
|
|
@@ -1474,10 +1474,10 @@ je(j, Se, lt(te, {
|
|
|
1474
1474
|
toString: We
|
|
1475
1475
|
}));
|
|
1476
1476
|
function Be() {
|
|
1477
|
-
return `#${
|
|
1477
|
+
return `#${V(this.r)}${V(this.g)}${V(this.b)}`;
|
|
1478
1478
|
}
|
|
1479
1479
|
function tn() {
|
|
1480
|
-
return `#${
|
|
1480
|
+
return `#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1481
1481
|
}
|
|
1482
1482
|
function We() {
|
|
1483
1483
|
const e = ue(this.opacity);
|
|
@@ -1489,7 +1489,7 @@ function ue(e) {
|
|
|
1489
1489
|
function q(e) {
|
|
1490
1490
|
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function V(e) {
|
|
1493
1493
|
return e = q(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
1494
1494
|
}
|
|
1495
1495
|
function Ye(e, t, n, r) {
|
|
@@ -1568,7 +1568,7 @@ function ct(e, t) {
|
|
|
1568
1568
|
const Qe = (function e(t) {
|
|
1569
1569
|
var n = an(t);
|
|
1570
1570
|
function r(i, l) {
|
|
1571
|
-
var a = n((i =
|
|
1571
|
+
var a = n((i = ke(i)).r, (l = ke(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = ct(i.opacity, l.opacity);
|
|
1572
1572
|
return function(f) {
|
|
1573
1573
|
return i.r = a(f), i.g = c(f), i.b = d(f), i.opacity = o(f), i + "";
|
|
1574
1574
|
};
|
|
@@ -1616,7 +1616,7 @@ function fn(e, t) {
|
|
|
1616
1616
|
return r;
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
|
-
var
|
|
1619
|
+
var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp(Se.source, "g");
|
|
1620
1620
|
function un(e) {
|
|
1621
1621
|
return function() {
|
|
1622
1622
|
return e;
|
|
@@ -1627,9 +1627,9 @@ function mn(e) {
|
|
|
1627
1627
|
return e(t) + "";
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
var n =
|
|
1632
|
-
for (e = e + "", t = t + ""; (r =
|
|
1630
|
+
function xn(e, t) {
|
|
1631
|
+
var n = Se.lastIndex = we.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
|
|
1632
|
+
for (e = e + "", t = t + ""; (r = Se.exec(e)) && (i = we.exec(t)); )
|
|
1633
1633
|
(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: me(r, i) })), n = we.lastIndex;
|
|
1634
1634
|
return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ? mn(d[0].x) : un(t) : (t = d.length, function(o) {
|
|
1635
1635
|
for (var f = 0, u; f < t; ++f) c[(u = d[f]).i] = u.x(o);
|
|
@@ -1638,9 +1638,9 @@ function hn(e, t) {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
function Ee(e, t) {
|
|
1640
1640
|
var n = typeof t, r;
|
|
1641
|
-
return t == null || n === "boolean" ? ze(t) : (n === "number" ? me : n === "string" ? (r = P(t)) ? (t = r, Qe) :
|
|
1641
|
+
return t == null || n === "boolean" ? ze(t) : (n === "number" ? me : n === "string" ? (r = P(t)) ? (t = r, Qe) : xn : t instanceof P ? Qe : t instanceof Date ? dn : on(t) ? ln : Array.isArray(t) ? cn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? fn : me)(e, t);
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function hn(e, t) {
|
|
1644
1644
|
return e = +e, t = +t, function(n) {
|
|
1645
1645
|
return Math.round(e * (1 - n) + t * n);
|
|
1646
1646
|
};
|
|
@@ -1648,7 +1648,7 @@ function xn(e, t) {
|
|
|
1648
1648
|
function yn(e) {
|
|
1649
1649
|
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function xe(e, t) {
|
|
1652
1652
|
if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
|
|
1653
1653
|
var n, r = e.slice(0, n);
|
|
1654
1654
|
return [
|
|
@@ -1657,7 +1657,7 @@ function he(e, t) {
|
|
|
1657
1657
|
];
|
|
1658
1658
|
}
|
|
1659
1659
|
function Q(e) {
|
|
1660
|
-
return e =
|
|
1660
|
+
return e = xe(Math.abs(e)), e ? e[1] : NaN;
|
|
1661
1661
|
}
|
|
1662
1662
|
function gn(e, t) {
|
|
1663
1663
|
return function(n, r) {
|
|
@@ -1674,7 +1674,7 @@ function pn(e) {
|
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
1676
|
var vn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
1677
|
-
function
|
|
1677
|
+
function he(e) {
|
|
1678
1678
|
if (!(t = vn.exec(e))) throw new Error("invalid format: " + e);
|
|
1679
1679
|
var t;
|
|
1680
1680
|
return new De({
|
|
@@ -1690,7 +1690,7 @@ function xe(e) {
|
|
|
1690
1690
|
type: t[10]
|
|
1691
1691
|
});
|
|
1692
1692
|
}
|
|
1693
|
-
|
|
1693
|
+
he.prototype = De.prototype;
|
|
1694
1694
|
function De(e) {
|
|
1695
1695
|
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 + "";
|
|
1696
1696
|
}
|
|
@@ -1715,13 +1715,13 @@ function bn(e) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
var dt;
|
|
1717
1717
|
function wn(e, t) {
|
|
1718
|
-
var n =
|
|
1718
|
+
var n = xe(e, t);
|
|
1719
1719
|
if (!n) return e + "";
|
|
1720
1720
|
var r = n[0], i = n[1], l = i - (dt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
|
|
1721
|
-
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") +
|
|
1721
|
+
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") + xe(e, Math.max(0, t + l - 1))[0];
|
|
1722
1722
|
}
|
|
1723
1723
|
function Ze(e, t) {
|
|
1724
|
-
var n =
|
|
1724
|
+
var n = xe(e, t);
|
|
1725
1725
|
if (!n) return e + "";
|
|
1726
1726
|
var r = n[0], i = n[1];
|
|
1727
1727
|
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");
|
|
@@ -1748,52 +1748,52 @@ var et = Array.prototype.map, tt = ["y", "z", "a", "f", "p", "n", "µ", "m", "",
|
|
|
1748
1748
|
function Nn(e) {
|
|
1749
1749
|
var t = e.grouping === void 0 || e.thousands === void 0 ? Pe : gn(et.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 ? Pe : pn(et.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 + "";
|
|
1750
1750
|
function o(u) {
|
|
1751
|
-
u =
|
|
1752
|
-
var m = u.fill, v = u.align, p = u.sign, A = u.symbol,
|
|
1753
|
-
y === "n" ? ($ = !0, y = "g") : Je[y] || (
|
|
1751
|
+
u = he(u);
|
|
1752
|
+
var m = u.fill, v = u.align, p = u.sign, A = u.symbol, x = u.zero, k = u.width, $ = u.comma, h = u.precision, w = u.trim, y = u.type;
|
|
1753
|
+
y === "n" ? ($ = !0, y = "g") : Je[y] || (h === void 0 && (h = 12), w = !0, y = "g"), (x || m === "0" && v === "=") && (x = !0, m = "0", v = "=");
|
|
1754
1754
|
var g = A === "$" ? n : A === "#" && /[boxX]/.test(y) ? "0" + y.toLowerCase() : "", b = A === "$" ? r : /[%p]/.test(y) ? a : "", M = Je[y], L = /[defgprs%]/.test(y);
|
|
1755
|
-
|
|
1756
|
-
function F(
|
|
1755
|
+
h = h === void 0 ? 6 : /[gprs]/.test(y) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
|
|
1756
|
+
function F(S) {
|
|
1757
1757
|
var E = g, z = b, W, Ie, ne;
|
|
1758
1758
|
if (y === "c")
|
|
1759
|
-
z = M(
|
|
1759
|
+
z = M(S) + z, S = "";
|
|
1760
1760
|
else {
|
|
1761
|
-
|
|
1762
|
-
var re =
|
|
1763
|
-
if (
|
|
1764
|
-
for (W = -1, Ie =
|
|
1765
|
-
if (ne =
|
|
1766
|
-
z = (ne === 46 ? i +
|
|
1761
|
+
S = +S;
|
|
1762
|
+
var re = S < 0 || 1 / S < 0;
|
|
1763
|
+
if (S = isNaN(S) ? d : M(Math.abs(S), h), w && (S = bn(S)), re && +S == 0 && p !== "+" && (re = !1), E = (re ? p === "(" ? p : c : p === "-" || p === "(" ? "" : p) + E, z = (y === "s" ? tt[8 + dt / 3] : "") + z + (re && p === "(" ? ")" : ""), L) {
|
|
1764
|
+
for (W = -1, Ie = S.length; ++W < Ie; )
|
|
1765
|
+
if (ne = S.charCodeAt(W), 48 > ne || ne > 57) {
|
|
1766
|
+
z = (ne === 46 ? i + S.slice(W + 1) : S.slice(W)) + z, S = S.slice(0, W);
|
|
1767
1767
|
break;
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
|
-
$ && !
|
|
1772
|
-
var ie = E.length +
|
|
1773
|
-
switch ($ &&
|
|
1771
|
+
$ && !x && (S = t(S, 1 / 0));
|
|
1772
|
+
var ie = E.length + S.length + z.length, _ = ie < k ? new Array(k - ie + 1).join(m) : "";
|
|
1773
|
+
switch ($ && x && (S = t(_ + S, _.length ? k - z.length : 1 / 0), _ = ""), v) {
|
|
1774
1774
|
case "<":
|
|
1775
|
-
|
|
1775
|
+
S = E + S + z + _;
|
|
1776
1776
|
break;
|
|
1777
1777
|
case "=":
|
|
1778
|
-
|
|
1778
|
+
S = E + _ + S + z;
|
|
1779
1779
|
break;
|
|
1780
1780
|
case "^":
|
|
1781
|
-
|
|
1781
|
+
S = _.slice(0, ie = _.length >> 1) + E + S + z + _.slice(ie);
|
|
1782
1782
|
break;
|
|
1783
1783
|
default:
|
|
1784
|
-
|
|
1784
|
+
S = _ + E + S + z;
|
|
1785
1785
|
break;
|
|
1786
1786
|
}
|
|
1787
|
-
return l(
|
|
1787
|
+
return l(S);
|
|
1788
1788
|
}
|
|
1789
1789
|
return F.toString = function() {
|
|
1790
1790
|
return u + "";
|
|
1791
1791
|
}, F;
|
|
1792
1792
|
}
|
|
1793
1793
|
function f(u, m) {
|
|
1794
|
-
var v = o((u =
|
|
1795
|
-
return function(
|
|
1796
|
-
return v(A *
|
|
1794
|
+
var v = o((u = he(u), u.type = "f", u)), p = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, A = Math.pow(10, -p), x = tt[8 + p / 3];
|
|
1795
|
+
return function(k) {
|
|
1796
|
+
return v(A * k) + x;
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
1799
|
return {
|
|
@@ -1810,10 +1810,10 @@ An({
|
|
|
1810
1810
|
function An(e) {
|
|
1811
1811
|
return oe = Nn(e), ft = oe.format, ut = oe.formatPrefix, oe;
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function kn(e) {
|
|
1814
1814
|
return Math.max(0, -Q(Math.abs(e)));
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Sn(e, t) {
|
|
1817
1817
|
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Q(t) / 3))) * 3 - Q(Math.abs(e)));
|
|
1818
1818
|
}
|
|
1819
1819
|
function Mn(e, t) {
|
|
@@ -1834,7 +1834,7 @@ function Re(e, t) {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
const nt = Symbol("implicit");
|
|
1836
1836
|
function mt() {
|
|
1837
|
-
var e = new
|
|
1837
|
+
var e = new Ce(), t = [], n = [], r = nt;
|
|
1838
1838
|
function i(l) {
|
|
1839
1839
|
let a = e.get(l);
|
|
1840
1840
|
if (a === void 0) {
|
|
@@ -1845,7 +1845,7 @@ function mt() {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
return i.domain = function(l) {
|
|
1847
1847
|
if (!arguments.length) return t.slice();
|
|
1848
|
-
t = [], e = new
|
|
1848
|
+
t = [], e = new Ce();
|
|
1849
1849
|
for (const a of l)
|
|
1850
1850
|
e.has(a) || e.set(a, t.push(a) - 1);
|
|
1851
1851
|
return i;
|
|
@@ -1914,7 +1914,7 @@ function En() {
|
|
|
1914
1914
|
}, u.range = function(m) {
|
|
1915
1915
|
return arguments.length ? (t = Array.from(m), f()) : t.slice();
|
|
1916
1916
|
}, u.rangeRound = function(m) {
|
|
1917
|
-
return t = Array.from(m), n =
|
|
1917
|
+
return t = Array.from(m), n = hn, f();
|
|
1918
1918
|
}, u.clamp = function(m) {
|
|
1919
1919
|
return arguments.length ? (a = m ? !0 : Y, f()) : a !== Y;
|
|
1920
1920
|
}, u.interpolate = function(m) {
|
|
@@ -1930,10 +1930,10 @@ function Dn() {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
function Rn(e, t, n, r) {
|
|
1932
1932
|
var i = qt(e, t, n), l;
|
|
1933
|
-
switch (r =
|
|
1933
|
+
switch (r = he(r ?? ",f"), r.type) {
|
|
1934
1934
|
case "s": {
|
|
1935
1935
|
var a = Math.max(Math.abs(e), Math.abs(t));
|
|
1936
|
-
return r.precision == null && !isNaN(l =
|
|
1936
|
+
return r.precision == null && !isNaN(l = Sn(i, a)) && (r.precision = l), ut(r, a);
|
|
1937
1937
|
}
|
|
1938
1938
|
case "":
|
|
1939
1939
|
case "e":
|
|
@@ -1945,13 +1945,13 @@ function Rn(e, t, n, r) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
case "f":
|
|
1947
1947
|
case "%": {
|
|
1948
|
-
r.precision == null && !isNaN(l =
|
|
1948
|
+
r.precision == null && !isNaN(l = kn(i)) && (r.precision = l - (r.type === "%") * 2);
|
|
1949
1949
|
break;
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
return ft(r);
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function xt(e) {
|
|
1955
1955
|
var t = e.domain;
|
|
1956
1956
|
return e.ticks = function(n) {
|
|
1957
1957
|
var r = t();
|
|
@@ -1980,9 +1980,9 @@ function In() {
|
|
|
1980
1980
|
var e = Dn();
|
|
1981
1981
|
return e.copy = function() {
|
|
1982
1982
|
return zn(e, In());
|
|
1983
|
-
}, Re.apply(e, arguments),
|
|
1983
|
+
}, Re.apply(e, arguments), xt(e);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function ht() {
|
|
1986
1986
|
var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], l;
|
|
1987
1987
|
function a(d) {
|
|
1988
1988
|
return d != null && d <= d ? i[at(r, d, 0, n)] : l;
|
|
@@ -2004,8 +2004,8 @@ function xt() {
|
|
|
2004
2004
|
}, a.thresholds = function() {
|
|
2005
2005
|
return r.slice();
|
|
2006
2006
|
}, a.copy = function() {
|
|
2007
|
-
return
|
|
2008
|
-
}, Re.apply(
|
|
2007
|
+
return ht().domain([e, t]).range(i).unknown(l);
|
|
2008
|
+
}, Re.apply(xt(a), arguments);
|
|
2009
2009
|
}
|
|
2010
2010
|
function Jn({
|
|
2011
2011
|
data: e,
|
|
@@ -2022,26 +2022,26 @@ function Jn({
|
|
|
2022
2022
|
showLegend: n?.showLegend ?? !0
|
|
2023
2023
|
};
|
|
2024
2024
|
if (!e || e.length === 0)
|
|
2025
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
2025
|
+
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: [
|
|
2026
2026
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
2027
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data points to display in treemap chart" })
|
|
2027
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
|
|
2028
2028
|
] }) });
|
|
2029
2029
|
let f, u = !1, m;
|
|
2030
2030
|
if (t?.xAxis && t?.yAxis) {
|
|
2031
|
-
const
|
|
2031
|
+
const h = t.xAxis[0], w = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
|
|
2032
2032
|
m = Array.isArray(t.series) ? t.series[0] : t.series;
|
|
2033
|
-
const y = O(r,
|
|
2033
|
+
const y = O(r, h);
|
|
2034
2034
|
if (m) {
|
|
2035
2035
|
const g = e.map((b) => {
|
|
2036
2036
|
const M = b[m];
|
|
2037
2037
|
return typeof M == "string" ? parseFloat(M) : M;
|
|
2038
2038
|
}).filter((b) => !isNaN(b));
|
|
2039
2039
|
if (u = g.length === e.length && g.every((b) => typeof b == "number"), u) {
|
|
2040
|
-
const b = Math.min(...g), M = Math.max(...g), L =
|
|
2040
|
+
const b = Math.min(...g), M = Math.max(...g), L = ht().domain([b, M]).range(se);
|
|
2041
2041
|
f = e.map((F) => {
|
|
2042
|
-
const
|
|
2042
|
+
const S = typeof F[m] == "string" ? parseFloat(F[m]) : F[m], E = L(S);
|
|
2043
2043
|
return {
|
|
2044
|
-
name: R(F[
|
|
2044
|
+
name: R(F[h], y) || String(F[h]) || "Unknown",
|
|
2045
2045
|
size: typeof F[w] == "string" ? parseFloat(F[w]) : F[w] || 0,
|
|
2046
2046
|
fill: E,
|
|
2047
2047
|
series: String(F[m])
|
|
@@ -2050,7 +2050,7 @@ function Jn({
|
|
|
2050
2050
|
} else {
|
|
2051
2051
|
const b = [...new Set(e.map((L) => String(L[m])))], M = mt().domain(b).range(l?.colors || T);
|
|
2052
2052
|
f = e.map((L) => ({
|
|
2053
|
-
name: R(L[
|
|
2053
|
+
name: R(L[h], y) || String(L[h]) || "Unknown",
|
|
2054
2054
|
size: typeof L[w] == "string" ? parseFloat(L[w]) : L[w] || 0,
|
|
2055
2055
|
fill: M(String(L[m])),
|
|
2056
2056
|
series: String(L[m])
|
|
@@ -2058,15 +2058,15 @@ function Jn({
|
|
|
2058
2058
|
}
|
|
2059
2059
|
} else
|
|
2060
2060
|
f = e.map((g, b) => ({
|
|
2061
|
-
name: R(g[
|
|
2061
|
+
name: R(g[h], y) || String(g[h]) || "Unknown",
|
|
2062
2062
|
size: typeof g[w] == "string" ? parseFloat(g[w]) : g[w] || 0,
|
|
2063
2063
|
fill: l?.colors && l.colors[b % l.colors.length] || T[b % T.length]
|
|
2064
2064
|
}));
|
|
2065
2065
|
} else {
|
|
2066
|
-
const
|
|
2067
|
-
(b) => typeof
|
|
2066
|
+
const h = e[0], w = Object.keys(h), y = w.find(
|
|
2067
|
+
(b) => typeof h[b] == "string" || b.toLowerCase().includes("name") || b.toLowerCase().includes("label") || b.toLowerCase().includes("category")
|
|
2068
2068
|
) || w[0], g = w.find((b) => b.toLowerCase().includes("size")) || w.find(
|
|
2069
|
-
(b) => typeof
|
|
2069
|
+
(b) => typeof h[b] == "number" && b !== y
|
|
2070
2070
|
) || w[1];
|
|
2071
2071
|
if (!g)
|
|
2072
2072
|
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: [
|
|
@@ -2082,13 +2082,13 @@ function Jn({
|
|
|
2082
2082
|
};
|
|
2083
2083
|
});
|
|
2084
2084
|
}
|
|
2085
|
-
if (f = f.filter((
|
|
2086
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-
|
|
2085
|
+
if (f = f.filter((h) => h.size != null && h.size > 0), f.length === 0)
|
|
2086
|
+
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: [
|
|
2087
2087
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
2088
|
-
/* @__PURE__ */ s("div", { className: "text-xs", children: "No valid data points for treemap chart after transformation" })
|
|
2088
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
|
|
2089
2089
|
] }) });
|
|
2090
|
-
const v = (
|
|
2091
|
-
const { x: w, y, width: g, height: b, index: M, name: L, size: F } =
|
|
2090
|
+
const v = (h) => {
|
|
2091
|
+
const { x: w, y, width: g, height: b, index: M, name: L, size: F } = h;
|
|
2092
2092
|
return g < 20 || b < 20 ? null : /* @__PURE__ */ N("g", { children: [
|
|
2093
2093
|
/* @__PURE__ */ s(
|
|
2094
2094
|
"rect",
|
|
@@ -2166,33 +2166,33 @@ function Jn({
|
|
|
2166
2166
|
}
|
|
2167
2167
|
)
|
|
2168
2168
|
] });
|
|
2169
|
-
}, A = f.some((
|
|
2170
|
-
let
|
|
2169
|
+
}, A = f.some((h) => "series" in h) ? [...new Set(f.map((h) => h.series).filter(Boolean))] : [];
|
|
2170
|
+
let x = [];
|
|
2171
2171
|
if (o.showLegend && m)
|
|
2172
2172
|
if (u) {
|
|
2173
|
-
const
|
|
2173
|
+
const h = Math.min(...e.map((y) => {
|
|
2174
2174
|
const g = y[m];
|
|
2175
2175
|
return typeof g == "string" ? parseFloat(g) : g;
|
|
2176
2176
|
})), w = Math.max(...e.map((y) => {
|
|
2177
2177
|
const g = y[m];
|
|
2178
2178
|
return typeof g == "string" ? parseFloat(g) : g;
|
|
2179
2179
|
}));
|
|
2180
|
-
|
|
2180
|
+
x = se.map((y, g) => {
|
|
2181
2181
|
const b = g / (se.length - 1);
|
|
2182
2182
|
return {
|
|
2183
|
-
value: (
|
|
2183
|
+
value: (h + (w - h) * b).toFixed(2),
|
|
2184
2184
|
type: "rect",
|
|
2185
2185
|
color: y
|
|
2186
2186
|
};
|
|
2187
2187
|
});
|
|
2188
|
-
} else A.length > 1 && (
|
|
2189
|
-
value:
|
|
2188
|
+
} else A.length > 1 && (x = A.map((h, w) => ({
|
|
2189
|
+
value: h,
|
|
2190
2190
|
type: "rect",
|
|
2191
2191
|
color: T[w % T.length]
|
|
2192
2192
|
})));
|
|
2193
|
-
const
|
|
2193
|
+
const k = o.showLegend && x.length > 0, $ = k ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
|
|
2194
2194
|
return /* @__PURE__ */ N("div", { className: "w-full", style: { height: $ }, children: [
|
|
2195
|
-
/* @__PURE__ */ s(
|
|
2195
|
+
/* @__PURE__ */ s(C, { height: k ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
|
|
2196
2196
|
Ft,
|
|
2197
2197
|
{
|
|
2198
2198
|
data: f,
|
|
@@ -2200,16 +2200,16 @@ function Jn({
|
|
|
2200
2200
|
aspectRatio: 4 / 3,
|
|
2201
2201
|
stroke: "#fff",
|
|
2202
2202
|
content: /* @__PURE__ */ s(v, {}),
|
|
2203
|
-
children: o.showTooltip && /* @__PURE__ */ s(
|
|
2203
|
+
children: o.showTooltip && /* @__PURE__ */ s(G, {})
|
|
2204
2204
|
}
|
|
2205
2205
|
) }),
|
|
2206
|
-
|
|
2206
|
+
k && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
|
|
2207
2207
|
// Gradient legend for numeric series
|
|
2208
2208
|
/* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
|
|
2209
|
-
/* @__PURE__ */ s("div", { className: "text-xs font-semibold text-
|
|
2209
|
+
/* @__PURE__ */ s("div", { className: "text-xs font-semibold text-dc-text-primary mb-2", children: m ? d(m) : "" }),
|
|
2210
2210
|
/* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
|
|
2211
|
-
/* @__PURE__ */ s("span", { className: "text-xs text-
|
|
2212
|
-
const w =
|
|
2211
|
+
/* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((h) => {
|
|
2212
|
+
const w = h[m];
|
|
2213
2213
|
return typeof w == "string" ? parseFloat(w) : w;
|
|
2214
2214
|
})).toFixed(2) }),
|
|
2215
2215
|
/* @__PURE__ */ s(
|
|
@@ -2222,23 +2222,23 @@ function Jn({
|
|
|
2222
2222
|
}
|
|
2223
2223
|
}
|
|
2224
2224
|
),
|
|
2225
|
-
/* @__PURE__ */ s("span", { className: "text-xs text-
|
|
2226
|
-
const w =
|
|
2225
|
+
/* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((h) => {
|
|
2226
|
+
const w = h[m];
|
|
2227
2227
|
return typeof w == "string" ? parseFloat(w) : w;
|
|
2228
2228
|
})).toFixed(2) })
|
|
2229
2229
|
] })
|
|
2230
2230
|
] })
|
|
2231
2231
|
) : (
|
|
2232
2232
|
// Discrete legend for categorical series
|
|
2233
|
-
/* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children:
|
|
2233
|
+
/* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: x.map((h, w) => /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
|
|
2234
2234
|
/* @__PURE__ */ s(
|
|
2235
2235
|
"div",
|
|
2236
2236
|
{
|
|
2237
2237
|
className: "w-3 h-3 rounded-xs",
|
|
2238
|
-
style: { backgroundColor:
|
|
2238
|
+
style: { backgroundColor: h.color }
|
|
2239
2239
|
}
|
|
2240
2240
|
),
|
|
2241
|
-
/* @__PURE__ */ s("span", { className: "text-xs text-
|
|
2241
|
+
/* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: h.value })
|
|
2242
2242
|
] }, w)) })
|
|
2243
2243
|
) })
|
|
2244
2244
|
] });
|
|
@@ -2246,7 +2246,7 @@ function Jn({
|
|
|
2246
2246
|
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: [
|
|
2247
2247
|
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
|
|
2248
2248
|
/* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
2249
|
-
/* @__PURE__ */ s("div", { className: "text-xs text-
|
|
2249
|
+
/* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
|
|
2250
2250
|
] }) });
|
|
2251
2251
|
}
|
|
2252
2252
|
}
|
|
@@ -2257,27 +2257,51 @@ function Pn({
|
|
|
2257
2257
|
}) {
|
|
2258
2258
|
const { getFieldLabel: r } = B();
|
|
2259
2259
|
if (!e || e.length === 0)
|
|
2260
|
-
return /* @__PURE__ */ s(
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2260
|
+
return /* @__PURE__ */ s(
|
|
2261
|
+
"div",
|
|
2262
|
+
{
|
|
2263
|
+
className: "flex items-center justify-center w-full",
|
|
2264
|
+
style: {
|
|
2265
|
+
height: n,
|
|
2266
|
+
backgroundColor: "var(--dc-warning-bg)",
|
|
2267
|
+
color: "var(--dc-warning)",
|
|
2268
|
+
borderColor: "var(--dc-warning-border)"
|
|
2269
|
+
},
|
|
2270
|
+
children: /* @__PURE__ */ N("div", { className: "text-center", children: [
|
|
2271
|
+
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
2272
|
+
/* @__PURE__ */ s("div", { className: "text-xs", children: "No data to display in table" })
|
|
2273
|
+
] })
|
|
2274
|
+
}
|
|
2275
|
+
);
|
|
2264
2276
|
const i = Object.keys(e[0] || {}), l = t?.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((a) => i.includes(a)) : i;
|
|
2265
|
-
return l.length === 0 ? /* @__PURE__ */ s(
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2277
|
+
return l.length === 0 ? /* @__PURE__ */ s(
|
|
2278
|
+
"div",
|
|
2279
|
+
{
|
|
2280
|
+
className: "flex items-center justify-center w-full",
|
|
2281
|
+
style: {
|
|
2282
|
+
height: n,
|
|
2283
|
+
backgroundColor: "var(--dc-warning-bg)",
|
|
2284
|
+
color: "var(--dc-warning)",
|
|
2285
|
+
borderColor: "var(--dc-warning-border)"
|
|
2286
|
+
},
|
|
2287
|
+
children: /* @__PURE__ */ N("div", { className: "text-center", children: [
|
|
2288
|
+
/* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
|
|
2289
|
+
/* @__PURE__ */ s("div", { className: "text-xs", children: "Data structure is invalid" })
|
|
2290
|
+
] })
|
|
2291
|
+
}
|
|
2292
|
+
) : /* @__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: [
|
|
2293
|
+
/* @__PURE__ */ s("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ s("tr", { children: l.map((a) => /* @__PURE__ */ s(
|
|
2270
2294
|
"th",
|
|
2271
2295
|
{
|
|
2272
|
-
className: "px-3 py-2 text-left text-xs font-medium text-
|
|
2296
|
+
className: "px-3 py-2 text-left text-xs font-medium text-dc-text-muted uppercase tracking-wider",
|
|
2273
2297
|
children: r(a)
|
|
2274
2298
|
},
|
|
2275
2299
|
a
|
|
2276
2300
|
)) }) }),
|
|
2277
|
-
/* @__PURE__ */ s("tbody", { className: "bg-
|
|
2301
|
+
/* @__PURE__ */ s("tbody", { className: "bg-dc-surface divide-y border-dc-border", children: e.map((a, c) => /* @__PURE__ */ s("tr", { className: "hover:bg-dc-surface-secondary", children: l.map((d) => /* @__PURE__ */ s(
|
|
2278
2302
|
"td",
|
|
2279
2303
|
{
|
|
2280
|
-
className: "px-3 py-2 whitespace-nowrap text-sm text-
|
|
2304
|
+
className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
|
|
2281
2305
|
children: _n(a[d])
|
|
2282
2306
|
},
|
|
2283
2307
|
d
|
|
@@ -2375,7 +2399,7 @@ export {
|
|
|
2375
2399
|
Zn as a,
|
|
2376
2400
|
Qe as b,
|
|
2377
2401
|
er as c,
|
|
2378
|
-
|
|
2402
|
+
xn as d,
|
|
2379
2403
|
P as e,
|
|
2380
2404
|
tr as f,
|
|
2381
2405
|
zn as g,
|
|
@@ -2383,14 +2407,14 @@ export {
|
|
|
2383
2407
|
me as i,
|
|
2384
2408
|
Y as j,
|
|
2385
2409
|
O as k,
|
|
2386
|
-
|
|
2410
|
+
xt as l,
|
|
2387
2411
|
R as m,
|
|
2388
2412
|
In as n,
|
|
2389
2413
|
se as o,
|
|
2390
2414
|
mt as p,
|
|
2391
|
-
|
|
2415
|
+
ht as q,
|
|
2392
2416
|
T as r,
|
|
2393
|
-
|
|
2417
|
+
C as s,
|
|
2394
2418
|
En as t,
|
|
2395
2419
|
Te as u,
|
|
2396
2420
|
qn as v,
|
|
@@ -2399,4 +2423,4 @@ export {
|
|
|
2399
2423
|
nr as y,
|
|
2400
2424
|
rr as z
|
|
2401
2425
|
};
|
|
2402
|
-
//# sourceMappingURL=charts-
|
|
2426
|
+
//# sourceMappingURL=charts-D4v7aUDh.js.map
|