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.
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-CC85023I.js → charts-C4AUz_2H.js} +932 -873
- package/dist/client/chunks/charts-C4AUz_2H.js.map +1 -0
- package/dist/client/chunks/{components-DfRFk04_.js → components-CoVc8US7.js} +2 -2
- package/dist/client/chunks/{components-DfRFk04_.js.map → components-CoVc8US7.js.map} +1 -1
- package/dist/client/components.js +2 -2
- package/dist/client/index.js +2 -2
- package/dist/client/utils/chartUtils.d.ts +1 -0
- package/dist/client-bundle-stats.html +1 -1
- package/package.json +1 -1
- package/dist/client/chunks/charts-CC85023I.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ResponsiveContainer as
|
|
4
|
-
import { u as
|
|
5
|
-
function
|
|
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(
|
|
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(
|
|
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__ */
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
123
|
-
if (c === "01" && d === 0 && o === 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 &&
|
|
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
|
|
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 =
|
|
105
|
+
const l = I(r, t);
|
|
155
106
|
return e.map((a) => {
|
|
156
107
|
const c = {
|
|
157
|
-
name:
|
|
108
|
+
name: z(a[t], l) || a[t] || "Unknown"
|
|
158
109
|
};
|
|
159
110
|
return n.forEach((d) => {
|
|
160
|
-
const o =
|
|
161
|
-
c[o] =
|
|
111
|
+
const o = Me(d, i);
|
|
112
|
+
c[o] = ee(a[d]);
|
|
162
113
|
}), c;
|
|
163
114
|
});
|
|
164
115
|
}
|
|
165
|
-
function
|
|
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((
|
|
171
|
-
], d = a.measures || [], o = n.filter((
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
e.forEach((
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
} else
|
|
182
|
-
}),
|
|
183
|
-
const
|
|
184
|
-
if (
|
|
185
|
-
const
|
|
186
|
-
(
|
|
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 (
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
} else
|
|
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
|
|
149
|
+
const w = Object.values(v), b = Array.from(new Set(
|
|
199
150
|
e.flatMap(
|
|
200
|
-
(
|
|
201
|
-
const
|
|
202
|
-
return
|
|
203
|
-
}).filter((
|
|
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:
|
|
208
|
-
seriesKeys:
|
|
158
|
+
data: w,
|
|
159
|
+
seriesKeys: b,
|
|
209
160
|
hasDimensions: !0
|
|
210
161
|
};
|
|
211
162
|
}
|
|
212
|
-
const
|
|
163
|
+
const f = Rt(e, t, n, r, l), m = n.map((v) => Me(v, l));
|
|
213
164
|
return {
|
|
214
|
-
data:
|
|
165
|
+
data: f,
|
|
215
166
|
seriesKeys: m,
|
|
216
167
|
hasDimensions: !1
|
|
217
168
|
};
|
|
218
169
|
}
|
|
219
|
-
|
|
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
|
|
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
|
|
260
|
+
function Xn(e, t = 1) {
|
|
255
261
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
256
262
|
}
|
|
257
|
-
function
|
|
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] =
|
|
271
|
+
const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
|
|
266
272
|
try {
|
|
267
|
-
const
|
|
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__ */
|
|
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
|
|
284
|
+
let f, m, v = [];
|
|
279
285
|
if (t?.xAxis && t?.yAxis)
|
|
280
|
-
|
|
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
|
-
|
|
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__ */
|
|
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 (!
|
|
289
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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:
|
|
299
|
+
const { data: w, seriesKeys: b } = ie(
|
|
294
300
|
e,
|
|
295
|
-
|
|
301
|
+
f,
|
|
296
302
|
m,
|
|
297
303
|
r,
|
|
298
|
-
|
|
304
|
+
v,
|
|
299
305
|
d
|
|
300
|
-
), { chartData:
|
|
301
|
-
const
|
|
302
|
-
return { chartData:
|
|
303
|
-
}, [
|
|
304
|
-
const L =
|
|
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
|
-
}),
|
|
307
|
-
...
|
|
312
|
+
}), S = u.showLegend, p = {
|
|
313
|
+
...we,
|
|
308
314
|
left: 40
|
|
309
315
|
// Increased from 20 to 40 for Y-axis label space
|
|
310
|
-
},
|
|
311
|
-
let
|
|
312
|
-
return
|
|
313
|
-
...
|
|
314
|
-
__target:
|
|
315
|
-
}))), !
|
|
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__ */
|
|
319
|
-
/* @__PURE__ */ s(
|
|
320
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
339
|
-
|
|
344
|
+
u.showTooltip && /* @__PURE__ */ s(
|
|
345
|
+
X,
|
|
340
346
|
{
|
|
341
|
-
formatter: (
|
|
347
|
+
formatter: (A, L) => A == null ? ["No data", L] : L === "Target" ? [O(A), "Target Value"] : [O(A), L]
|
|
342
348
|
}
|
|
343
349
|
),
|
|
344
|
-
|
|
345
|
-
|
|
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: (
|
|
359
|
+
onMouseEnter: (A) => c(String(A.dataKey || "")),
|
|
354
360
|
onMouseLeave: () => c(null)
|
|
355
361
|
}
|
|
356
362
|
),
|
|
357
|
-
|
|
358
|
-
|
|
363
|
+
b.map((A, L) => /* @__PURE__ */ s(
|
|
364
|
+
Nt,
|
|
359
365
|
{
|
|
360
|
-
dataKey:
|
|
361
|
-
stackId:
|
|
362
|
-
fill:
|
|
363
|
-
fillOpacity: a ? a ===
|
|
364
|
-
children:
|
|
365
|
-
const
|
|
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
|
-
|
|
373
|
+
Ee,
|
|
368
374
|
{
|
|
369
|
-
fill:
|
|
370
|
-
fillOpacity: a ? a ===
|
|
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
|
-
|
|
382
|
+
A
|
|
377
383
|
)),
|
|
378
|
-
|
|
384
|
+
y.length > 0 && /* @__PURE__ */ g(De, { children: [
|
|
379
385
|
/* @__PURE__ */ s(
|
|
380
|
-
|
|
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
|
-
|
|
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
|
-
|
|
408
|
-
|
|
413
|
+
$ > 0 && /* @__PURE__ */ g("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
|
|
414
|
+
$,
|
|
409
415
|
" data point",
|
|
410
|
-
|
|
416
|
+
$ !== 1 ? "s" : "",
|
|
411
417
|
" with no values hidden"
|
|
412
418
|
] })
|
|
413
419
|
] });
|
|
414
|
-
} catch (
|
|
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__ */
|
|
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:
|
|
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
|
|
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] =
|
|
436
|
+
const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
|
|
431
437
|
try {
|
|
432
|
-
const
|
|
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__ */
|
|
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
|
|
448
|
+
let f, m, v = [];
|
|
443
449
|
if (t?.xAxis && t?.yAxis)
|
|
444
|
-
|
|
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
|
-
|
|
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__ */
|
|
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 (!
|
|
453
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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:
|
|
463
|
+
const { data: w, seriesKeys: b } = ie(
|
|
458
464
|
e,
|
|
459
|
-
|
|
465
|
+
f,
|
|
460
466
|
m,
|
|
461
467
|
r,
|
|
462
|
-
|
|
468
|
+
v,
|
|
463
469
|
d
|
|
464
|
-
),
|
|
465
|
-
...
|
|
470
|
+
), h = u.showLegend, $ = {
|
|
471
|
+
...we,
|
|
466
472
|
left: 40
|
|
467
473
|
// Increased from 20 to 40 for Y-axis label space
|
|
468
|
-
},
|
|
469
|
-
let
|
|
470
|
-
return
|
|
471
|
-
...
|
|
472
|
-
__target:
|
|
473
|
-
}))), !
|
|
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(
|
|
477
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
496
|
-
|
|
501
|
+
u.showTooltip && /* @__PURE__ */ s(
|
|
502
|
+
X,
|
|
497
503
|
{
|
|
498
|
-
formatter: (
|
|
504
|
+
formatter: (p, x) => p == null ? ["No data", x] : x === "Target" ? [O(p), "Target Value"] : [O(p), x]
|
|
499
505
|
}
|
|
500
506
|
),
|
|
501
|
-
|
|
502
|
-
|
|
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: (
|
|
516
|
+
onMouseEnter: (p) => c(String(p.dataKey || "")),
|
|
511
517
|
onMouseLeave: () => c(null)
|
|
512
518
|
}
|
|
513
519
|
),
|
|
514
|
-
|
|
515
|
-
|
|
520
|
+
b.map((p, x) => /* @__PURE__ */ s(
|
|
521
|
+
K,
|
|
516
522
|
{
|
|
517
523
|
type: "monotone",
|
|
518
|
-
dataKey:
|
|
519
|
-
stroke: l?.colors && l.colors[
|
|
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 ===
|
|
529
|
+
strokeOpacity: a ? a === p ? 1 : 0.3 : 1,
|
|
524
530
|
connectNulls: !1
|
|
525
531
|
},
|
|
526
|
-
|
|
532
|
+
p
|
|
527
533
|
)),
|
|
528
|
-
|
|
534
|
+
N.length > 0 && /* @__PURE__ */ g(De, { children: [
|
|
529
535
|
/* @__PURE__ */ s(
|
|
530
|
-
|
|
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
|
-
|
|
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 (
|
|
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__ */
|
|
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:
|
|
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
|
|
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] =
|
|
579
|
+
const [a, c] = G(null), { labelMap: d, getFieldLabel: o } = Y();
|
|
574
580
|
try {
|
|
575
|
-
const
|
|
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__ */
|
|
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
|
|
592
|
+
let f, m, v = [];
|
|
587
593
|
if (t?.xAxis && t?.yAxis)
|
|
588
|
-
|
|
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
|
-
|
|
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__ */
|
|
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 (!
|
|
597
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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:
|
|
607
|
+
const { data: w, seriesKeys: b } = ie(
|
|
602
608
|
e,
|
|
603
|
-
|
|
609
|
+
f,
|
|
604
610
|
m,
|
|
605
611
|
r,
|
|
606
|
-
|
|
612
|
+
v,
|
|
607
613
|
d
|
|
608
|
-
),
|
|
609
|
-
...
|
|
614
|
+
), h = u.showLegend, $ = {
|
|
615
|
+
...we,
|
|
610
616
|
left: 40
|
|
611
617
|
// Increased from 20 to 40 for Y-axis label space
|
|
612
|
-
},
|
|
613
|
-
let
|
|
614
|
-
return
|
|
615
|
-
...
|
|
616
|
-
__target:
|
|
617
|
-
}))), !
|
|
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(
|
|
621
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
640
|
-
|
|
645
|
+
u.showTooltip && /* @__PURE__ */ s(
|
|
646
|
+
X,
|
|
641
647
|
{
|
|
642
|
-
formatter: (
|
|
648
|
+
formatter: (p, x) => p == null ? ["No data", x] : x === "Target" ? [O(p), "Target Value"] : [O(p), x]
|
|
643
649
|
}
|
|
644
650
|
),
|
|
645
|
-
|
|
646
|
-
|
|
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: (
|
|
660
|
+
onMouseEnter: (p) => c(String(p.dataKey || "")),
|
|
655
661
|
onMouseLeave: () => c(null)
|
|
656
662
|
}
|
|
657
663
|
),
|
|
658
|
-
|
|
659
|
-
|
|
664
|
+
b.map((p, x) => /* @__PURE__ */ s(
|
|
665
|
+
At,
|
|
660
666
|
{
|
|
661
667
|
type: "monotone",
|
|
662
|
-
dataKey:
|
|
663
|
-
stackId:
|
|
664
|
-
stroke: l?.colors && l.colors[
|
|
665
|
-
fill: l?.colors && l.colors[
|
|
666
|
-
fillOpacity: a ? a ===
|
|
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 ===
|
|
674
|
+
strokeOpacity: a ? a === p ? 1 : 0.3 : 1,
|
|
669
675
|
connectNulls: !1
|
|
670
676
|
},
|
|
671
|
-
|
|
677
|
+
p
|
|
672
678
|
)),
|
|
673
|
-
|
|
679
|
+
N.length > 0 && /* @__PURE__ */ g(De, { children: [
|
|
674
680
|
/* @__PURE__ */ s(
|
|
675
|
-
|
|
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
|
-
|
|
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 (
|
|
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__ */
|
|
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:
|
|
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
|
|
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] =
|
|
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__ */
|
|
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
|
|
735
|
+
let u, f, m, v = [];
|
|
730
736
|
if (t?.xAxis && t?.yAxis)
|
|
731
|
-
|
|
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
|
-
|
|
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__ */
|
|
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 (!
|
|
740
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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 (
|
|
745
|
-
const { data:
|
|
750
|
+
if (v.length > 0) {
|
|
751
|
+
const { data: b } = ie(
|
|
746
752
|
e,
|
|
747
|
-
|
|
753
|
+
f,
|
|
748
754
|
m,
|
|
749
755
|
r,
|
|
750
|
-
|
|
756
|
+
v,
|
|
751
757
|
d
|
|
752
758
|
);
|
|
753
|
-
if (
|
|
754
|
-
const
|
|
755
|
-
Object.keys(
|
|
756
|
-
|
|
757
|
-
name: String(
|
|
758
|
-
value:
|
|
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
|
|
764
|
-
|
|
765
|
-
let
|
|
766
|
-
return typeof
|
|
767
|
-
name:
|
|
768
|
-
value: typeof
|
|
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
|
|
773
|
-
return
|
|
774
|
-
(
|
|
775
|
-
),
|
|
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:
|
|
778
|
-
] }) }) : /* @__PURE__ */ s(
|
|
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:
|
|
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:
|
|
788
|
-
children:
|
|
789
|
-
|
|
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[
|
|
792
|
-
fillOpacity: a ? a ===
|
|
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-${
|
|
800
|
+
`cell-${h}`
|
|
795
801
|
))
|
|
796
802
|
}
|
|
797
803
|
),
|
|
798
|
-
o.showTooltip && /* @__PURE__ */ s(
|
|
804
|
+
o.showTooltip && /* @__PURE__ */ s(X, {}),
|
|
799
805
|
o.showLegend && /* @__PURE__ */ s(
|
|
800
|
-
|
|
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: (
|
|
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__ */
|
|
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
|
|
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] =
|
|
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__ */
|
|
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
|
|
842
|
-
if (t?.xAxis && t?.yAxis)
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
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__ */
|
|
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 (!
|
|
852
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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
|
-
|
|
864
|
+
const w = (r?.timeDimensions || []).map((x) => x.dimension);
|
|
865
|
+
let b, h = {};
|
|
857
866
|
if (m.length > 0) {
|
|
858
|
-
const
|
|
859
|
-
e.forEach((
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
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
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
return {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
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((
|
|
905
|
+
}).filter((y) => y.isValid);
|
|
882
906
|
}
|
|
883
|
-
if (!
|
|
884
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */
|
|
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
|
|
889
|
-
...
|
|
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(
|
|
894
|
-
o.showGrid && /* @__PURE__ */ s(
|
|
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
|
-
|
|
920
|
+
be,
|
|
897
921
|
{
|
|
898
922
|
type: "number",
|
|
899
923
|
dataKey: "x",
|
|
900
|
-
name: d(
|
|
924
|
+
name: d(u),
|
|
901
925
|
tick: { fontSize: 12 }
|
|
902
926
|
}
|
|
903
927
|
),
|
|
904
928
|
/* @__PURE__ */ s(
|
|
905
|
-
|
|
929
|
+
Ne,
|
|
906
930
|
{
|
|
907
931
|
type: "number",
|
|
908
932
|
dataKey: "y",
|
|
909
|
-
name: d(
|
|
933
|
+
name: d(f),
|
|
910
934
|
tick: { fontSize: 12 },
|
|
911
|
-
label: { value: d(
|
|
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
|
-
|
|
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: (
|
|
983
|
+
onMouseEnter: (x) => c(String(x.dataKey || "")),
|
|
925
984
|
onMouseLeave: () => c(null)
|
|
926
985
|
}
|
|
927
986
|
),
|
|
928
|
-
|
|
987
|
+
N ? (
|
|
929
988
|
// Multiple series
|
|
930
|
-
|
|
931
|
-
|
|
989
|
+
$.map((x, y) => /* @__PURE__ */ s(
|
|
990
|
+
Ge,
|
|
932
991
|
{
|
|
933
|
-
name:
|
|
934
|
-
data:
|
|
935
|
-
fill: l?.colors && l.colors[
|
|
936
|
-
fillOpacity: a ? a ===
|
|
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
|
-
|
|
997
|
+
x
|
|
939
998
|
))
|
|
940
999
|
) : (
|
|
941
1000
|
// Single series
|
|
942
1001
|
/* @__PURE__ */ s(
|
|
943
|
-
|
|
1002
|
+
Ge,
|
|
944
1003
|
{
|
|
945
1004
|
name: "Data",
|
|
946
|
-
data:
|
|
947
|
-
fill: l?.colors && l.colors[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__ */
|
|
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
|
|
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] =
|
|
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__ */
|
|
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,
|
|
1039
|
+
let o, u = [];
|
|
981
1040
|
if (t?.xAxis && t?.yAxis) {
|
|
982
|
-
const
|
|
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
|
-
|
|
1043
|
+
f,
|
|
985
1044
|
m,
|
|
986
1045
|
r,
|
|
987
|
-
|
|
1046
|
+
v
|
|
988
1047
|
);
|
|
989
|
-
o =
|
|
1048
|
+
o = w, u = b;
|
|
990
1049
|
} else {
|
|
991
|
-
const
|
|
992
|
-
(
|
|
993
|
-
) || m[0],
|
|
994
|
-
(
|
|
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 (
|
|
997
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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 (
|
|
1002
|
-
const
|
|
1003
|
-
o = e.map((
|
|
1004
|
-
const
|
|
1005
|
-
name:
|
|
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
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
}),
|
|
1011
|
-
}),
|
|
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((
|
|
1014
|
-
name: String(
|
|
1015
|
-
value: typeof w[
|
|
1016
|
-
})),
|
|
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__ */
|
|
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(
|
|
1022
|
-
d.showGrid && /* @__PURE__ */ s(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
1039
|
-
d.showLegend &&
|
|
1040
|
-
|
|
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: (
|
|
1107
|
+
onMouseEnter: (f) => c(String(f.dataKey || "")),
|
|
1049
1108
|
onMouseLeave: () => c(null)
|
|
1050
1109
|
}
|
|
1051
1110
|
),
|
|
1052
|
-
|
|
1053
|
-
|
|
1111
|
+
u.map((f, m) => /* @__PURE__ */ s(
|
|
1112
|
+
Dt,
|
|
1054
1113
|
{
|
|
1055
|
-
name:
|
|
1056
|
-
dataKey:
|
|
1057
|
-
stroke: l?.colors && l.colors[m % l.colors.length] ||
|
|
1058
|
-
fill: l?.colors && l.colors[m % l.colors.length] ||
|
|
1059
|
-
fillOpacity: a ? a ===
|
|
1060
|
-
strokeOpacity: a ? a ===
|
|
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
|
-
|
|
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__ */
|
|
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
|
|
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] =
|
|
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__ */
|
|
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
|
|
1096
|
-
o = e.map((
|
|
1097
|
-
name:
|
|
1098
|
-
value: typeof
|
|
1099
|
-
fill: l?.colors && l.colors[
|
|
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
|
|
1103
|
-
(
|
|
1104
|
-
) ||
|
|
1105
|
-
(
|
|
1106
|
-
) ||
|
|
1107
|
-
if (!
|
|
1108
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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((
|
|
1113
|
-
let
|
|
1114
|
-
return typeof
|
|
1115
|
-
name:
|
|
1116
|
-
value: typeof v
|
|
1117
|
-
fill: l?.colors && l.colors[
|
|
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((
|
|
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(
|
|
1125
|
-
|
|
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(
|
|
1191
|
+
d.showTooltip && /* @__PURE__ */ s(X, {}),
|
|
1133
1192
|
d.showLegend && /* @__PURE__ */ s(
|
|
1134
|
-
|
|
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: (
|
|
1201
|
+
onMouseEnter: (u) => c(String(u.value || "")),
|
|
1143
1202
|
onMouseLeave: () => c(null)
|
|
1144
1203
|
}
|
|
1145
1204
|
),
|
|
1146
1205
|
/* @__PURE__ */ s(
|
|
1147
|
-
|
|
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((
|
|
1153
|
-
|
|
1211
|
+
children: o.map((u, f) => /* @__PURE__ */ s(
|
|
1212
|
+
Ee,
|
|
1154
1213
|
{
|
|
1155
|
-
fill:
|
|
1156
|
-
fillOpacity: a ? a ===
|
|
1214
|
+
fill: u.fill,
|
|
1215
|
+
fillOpacity: a ? a === u.name ? 1 : 0.3 : 1
|
|
1157
1216
|
},
|
|
1158
|
-
`cell-${
|
|
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__ */
|
|
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
|
|
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
|
|
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
|
|
1238
|
+
function ct(e) {
|
|
1180
1239
|
let t, n, r;
|
|
1181
|
-
e.length !== 2 ? (t =
|
|
1182
|
-
function i(c, d, o = 0,
|
|
1183
|
-
if (o <
|
|
1184
|
-
if (t(d, d) !== 0) return
|
|
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
|
|
1187
|
-
n(c[
|
|
1188
|
-
} while (o <
|
|
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,
|
|
1193
|
-
if (o <
|
|
1194
|
-
if (t(d, d) !== 0) return
|
|
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
|
|
1197
|
-
n(c[
|
|
1198
|
-
} while (o <
|
|
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,
|
|
1203
|
-
const
|
|
1204
|
-
return
|
|
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
|
|
1267
|
+
function Ht() {
|
|
1209
1268
|
return 0;
|
|
1210
1269
|
}
|
|
1211
|
-
function
|
|
1270
|
+
function Ot(e) {
|
|
1212
1271
|
return e === null ? NaN : +e;
|
|
1213
1272
|
}
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
class
|
|
1217
|
-
constructor(t, n =
|
|
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(
|
|
1280
|
+
return super.get(Be(this, t));
|
|
1222
1281
|
}
|
|
1223
1282
|
has(t) {
|
|
1224
|
-
return super.has(
|
|
1283
|
+
return super.has(Be(this, t));
|
|
1225
1284
|
}
|
|
1226
1285
|
set(t, n) {
|
|
1227
|
-
return super.set(
|
|
1286
|
+
return super.set(Ut(this, t), n);
|
|
1228
1287
|
}
|
|
1229
1288
|
delete(t) {
|
|
1230
|
-
return super.delete(
|
|
1289
|
+
return super.delete(qt(this, t));
|
|
1231
1290
|
}
|
|
1232
1291
|
}
|
|
1233
|
-
function
|
|
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
|
|
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
|
|
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
|
|
1304
|
+
function Bt(e) {
|
|
1246
1305
|
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
1247
1306
|
}
|
|
1248
|
-
const
|
|
1249
|
-
function
|
|
1250
|
-
const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >=
|
|
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 ?
|
|
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
|
|
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 ?
|
|
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
|
|
1268
|
-
return t = +t, e = +e, n = +n,
|
|
1326
|
+
function $e(e, t, n) {
|
|
1327
|
+
return t = +t, e = +e, n = +n, me(e, t, n)[2];
|
|
1269
1328
|
}
|
|
1270
|
-
function
|
|
1329
|
+
function Xt(e, t, n) {
|
|
1271
1330
|
t = +t, e = +e, n = +n;
|
|
1272
|
-
const r = t < e, i = r ?
|
|
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
|
|
1334
|
+
function Re(e, t, n) {
|
|
1276
1335
|
e.prototype = t.prototype = n, n.constructor = e;
|
|
1277
1336
|
}
|
|
1278
|
-
function
|
|
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
|
|
1342
|
+
function se() {
|
|
1284
1343
|
}
|
|
1285
|
-
var
|
|
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
|
-
|
|
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:
|
|
1501
|
+
hex: Ce,
|
|
1443
1502
|
// Deprecated! Use color.formatHex.
|
|
1444
|
-
formatHex:
|
|
1445
|
-
formatHex8:
|
|
1446
|
-
formatHsl:
|
|
1447
|
-
formatRgb:
|
|
1448
|
-
toString:
|
|
1503
|
+
formatHex: Ce,
|
|
1504
|
+
formatHex8: rn,
|
|
1505
|
+
formatHsl: sn,
|
|
1506
|
+
formatRgb: We,
|
|
1507
|
+
toString: We
|
|
1449
1508
|
});
|
|
1450
|
-
function
|
|
1509
|
+
function Ce() {
|
|
1451
1510
|
return this.rgb().formatHex();
|
|
1452
1511
|
}
|
|
1453
|
-
function
|
|
1512
|
+
function rn() {
|
|
1454
1513
|
return this.rgb().formatHex8();
|
|
1455
1514
|
}
|
|
1456
|
-
function
|
|
1457
|
-
return
|
|
1515
|
+
function sn() {
|
|
1516
|
+
return ft(this).formatHsl();
|
|
1458
1517
|
}
|
|
1459
|
-
function
|
|
1518
|
+
function We() {
|
|
1460
1519
|
return this.rgb().formatRgb();
|
|
1461
1520
|
}
|
|
1462
|
-
function
|
|
1521
|
+
function re(e) {
|
|
1463
1522
|
var t, n;
|
|
1464
|
-
return e = (e + "").trim().toLowerCase(), (t =
|
|
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
|
|
1467
|
-
return new
|
|
1525
|
+
function Ye(e) {
|
|
1526
|
+
return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
1468
1527
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return r <= 0 && (e = t = n = NaN), new
|
|
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
|
|
1473
|
-
return e instanceof
|
|
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
|
|
1476
|
-
return arguments.length === 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
|
|
1537
|
+
function j(e, t, n, r) {
|
|
1479
1538
|
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
1480
1539
|
}
|
|
1481
|
-
|
|
1540
|
+
Re(j, Le, ut(se, {
|
|
1482
1541
|
brighter(e) {
|
|
1483
|
-
return e = e == null ?
|
|
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 ?
|
|
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
|
|
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:
|
|
1556
|
+
hex: Xe,
|
|
1498
1557
|
// Deprecated! Use color.formatHex.
|
|
1499
|
-
formatHex:
|
|
1500
|
-
formatHex8:
|
|
1501
|
-
formatRgb:
|
|
1502
|
-
toString:
|
|
1558
|
+
formatHex: Xe,
|
|
1559
|
+
formatHex8: ln,
|
|
1560
|
+
formatRgb: Qe,
|
|
1561
|
+
toString: Qe
|
|
1503
1562
|
}));
|
|
1504
|
-
function
|
|
1505
|
-
return `#${
|
|
1563
|
+
function Xe() {
|
|
1564
|
+
return `#${B(this.r)}${B(this.g)}${B(this.b)}`;
|
|
1506
1565
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return `#${
|
|
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
|
|
1511
|
-
const e =
|
|
1512
|
-
return `${e === 1 ? "rgb(" : "rgba("}${
|
|
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
|
|
1573
|
+
function he(e) {
|
|
1515
1574
|
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
1516
1575
|
}
|
|
1517
|
-
function
|
|
1576
|
+
function C(e) {
|
|
1518
1577
|
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
1519
1578
|
}
|
|
1520
|
-
function
|
|
1521
|
-
return e =
|
|
1579
|
+
function B(e) {
|
|
1580
|
+
return e = C(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
1522
1581
|
}
|
|
1523
|
-
function
|
|
1524
|
-
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new
|
|
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
|
|
1527
|
-
if (e instanceof
|
|
1528
|
-
if (e instanceof
|
|
1529
|
-
if (e instanceof
|
|
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
|
|
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
|
|
1535
|
-
return arguments.length === 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
|
|
1596
|
+
function V(e, t, n, r) {
|
|
1538
1597
|
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
1539
1598
|
}
|
|
1540
|
-
|
|
1599
|
+
Re(V, on, ut(se, {
|
|
1541
1600
|
brighter(e) {
|
|
1542
|
-
return e = e == null ?
|
|
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 ?
|
|
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
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
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
|
|
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 =
|
|
1564
|
-
return `${e === 1 ? "hsl(" : "hsla("}${
|
|
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
|
|
1626
|
+
function Je(e) {
|
|
1568
1627
|
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
1569
1628
|
}
|
|
1570
|
-
function
|
|
1629
|
+
function de(e) {
|
|
1571
1630
|
return Math.max(0, Math.min(1, e || 0));
|
|
1572
1631
|
}
|
|
1573
|
-
function
|
|
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
|
|
1577
|
-
function
|
|
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
|
|
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
|
|
1588
|
-
return (e = +e) == 1 ?
|
|
1589
|
-
return 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
|
|
1651
|
+
function mt(e, t) {
|
|
1593
1652
|
var n = t - e;
|
|
1594
|
-
return n ?
|
|
1653
|
+
return n ? cn(e, n) : Ve(isNaN(e) ? t : e);
|
|
1595
1654
|
}
|
|
1596
|
-
const
|
|
1597
|
-
var n =
|
|
1655
|
+
const Pe = (function e(t) {
|
|
1656
|
+
var n = un(t);
|
|
1598
1657
|
function r(i, l) {
|
|
1599
|
-
var a = n((i =
|
|
1600
|
-
return function(
|
|
1601
|
-
return i.r = a(
|
|
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
|
|
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
|
|
1673
|
+
function mn(e) {
|
|
1615
1674
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
1616
1675
|
}
|
|
1617
|
-
function
|
|
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] =
|
|
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
|
|
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
|
|
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
|
|
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] =
|
|
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
|
|
1648
|
-
function
|
|
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
|
|
1712
|
+
function gn(e) {
|
|
1654
1713
|
return function(t) {
|
|
1655
1714
|
return e(t) + "";
|
|
1656
1715
|
};
|
|
1657
1716
|
}
|
|
1658
|
-
function
|
|
1659
|
-
var n =
|
|
1660
|
-
for (e = e + "", t = t + ""; (r =
|
|
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:
|
|
1662
|
-
return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ?
|
|
1663
|
-
for (var
|
|
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
|
|
1726
|
+
function Ie(e, t) {
|
|
1668
1727
|
var n = typeof t, r;
|
|
1669
|
-
return t == null || n === "boolean" ?
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1688
|
-
return e =
|
|
1746
|
+
function P(e) {
|
|
1747
|
+
return e = pe(Math.abs(e)), e ? e[1] : NaN;
|
|
1689
1748
|
}
|
|
1690
|
-
function
|
|
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
|
|
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
|
|
1705
|
-
function
|
|
1706
|
-
if (!(t =
|
|
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
|
|
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
|
-
|
|
1722
|
-
function
|
|
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
|
-
|
|
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
|
|
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
|
|
1745
|
-
function
|
|
1746
|
-
var n =
|
|
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 - (
|
|
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") +
|
|
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
|
|
1752
|
-
var n =
|
|
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
|
|
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:
|
|
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) =>
|
|
1767
|
-
r:
|
|
1768
|
-
s:
|
|
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
|
|
1831
|
+
function nt(e) {
|
|
1773
1832
|
return e;
|
|
1774
1833
|
}
|
|
1775
|
-
var
|
|
1776
|
-
function
|
|
1777
|
-
var t = e.grouping === void 0 || e.thousands === void 0 ?
|
|
1778
|
-
function o(
|
|
1779
|
-
|
|
1780
|
-
var m =
|
|
1781
|
-
|
|
1782
|
-
var
|
|
1783
|
-
|
|
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 =
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
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
|
|
1791
|
-
if (M = isNaN(M) ? d :
|
|
1792
|
-
for (
|
|
1793
|
-
if (
|
|
1794
|
-
|
|
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
|
-
|
|
1800
|
-
var
|
|
1801
|
-
switch (
|
|
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 +
|
|
1862
|
+
M = D + M + E + H;
|
|
1804
1863
|
break;
|
|
1805
1864
|
case "=":
|
|
1806
|
-
M = D +
|
|
1865
|
+
M = D + H + M + E;
|
|
1807
1866
|
break;
|
|
1808
1867
|
case "^":
|
|
1809
|
-
M =
|
|
1868
|
+
M = H.slice(0, le = H.length >> 1) + D + M + E + H.slice(le);
|
|
1810
1869
|
break;
|
|
1811
1870
|
default:
|
|
1812
|
-
M =
|
|
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
|
|
1877
|
+
return f + "";
|
|
1819
1878
|
}, L;
|
|
1820
1879
|
}
|
|
1821
|
-
function f
|
|
1822
|
-
var
|
|
1823
|
-
return function(
|
|
1824
|
-
return
|
|
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:
|
|
1888
|
+
formatPrefix: u
|
|
1830
1889
|
};
|
|
1831
1890
|
}
|
|
1832
|
-
var
|
|
1833
|
-
|
|
1891
|
+
var ue, ht, yt;
|
|
1892
|
+
Ln({
|
|
1834
1893
|
thousands: ",",
|
|
1835
1894
|
grouping: [3],
|
|
1836
1895
|
currency: ["$", ""]
|
|
1837
1896
|
});
|
|
1838
|
-
function
|
|
1839
|
-
return
|
|
1897
|
+
function Ln(e) {
|
|
1898
|
+
return ue = $n(e), ht = ue.format, yt = ue.formatPrefix, ue;
|
|
1840
1899
|
}
|
|
1841
|
-
function
|
|
1842
|
-
return Math.max(0, -
|
|
1900
|
+
function Tn(e) {
|
|
1901
|
+
return Math.max(0, -P(Math.abs(e)));
|
|
1843
1902
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(
|
|
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
|
|
1848
|
-
return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0,
|
|
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
|
|
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
|
|
1864
|
-
function
|
|
1865
|
-
var e = new
|
|
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 !==
|
|
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
|
|
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
|
|
1886
|
-
},
|
|
1944
|
+
return pt(t, n).unknown(r);
|
|
1945
|
+
}, He.apply(i, arguments), i;
|
|
1887
1946
|
}
|
|
1888
|
-
function
|
|
1947
|
+
function En(e) {
|
|
1889
1948
|
return function() {
|
|
1890
1949
|
return e;
|
|
1891
1950
|
};
|
|
1892
1951
|
}
|
|
1893
|
-
function
|
|
1952
|
+
function jn(e) {
|
|
1894
1953
|
return +e;
|
|
1895
1954
|
}
|
|
1896
|
-
var
|
|
1897
|
-
function
|
|
1955
|
+
var at = [0, 1];
|
|
1956
|
+
function Z(e) {
|
|
1898
1957
|
return e;
|
|
1899
1958
|
}
|
|
1900
|
-
function
|
|
1959
|
+
function Fe(e, t) {
|
|
1901
1960
|
return (t -= e = +e) ? function(n) {
|
|
1902
1961
|
return (n - e) / t;
|
|
1903
|
-
} :
|
|
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
|
|
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 =
|
|
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
|
|
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] =
|
|
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 =
|
|
1981
|
+
var d = dt(e, c, 1, r) - 1;
|
|
1923
1982
|
return l[d](i[d](c));
|
|
1924
1983
|
};
|
|
1925
1984
|
}
|
|
1926
|
-
function
|
|
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
|
|
1930
|
-
var e =
|
|
1931
|
-
function
|
|
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 !==
|
|
1992
|
+
return a !== Z && (a = zn(e[0], e[m - 1])), c = m > 2 ? Vn : Rn, d = o = null, f;
|
|
1934
1993
|
}
|
|
1935
|
-
function
|
|
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
|
|
1939
|
-
return a(i((o || (o = c(t, e.map(r),
|
|
1940
|
-
},
|
|
1941
|
-
return arguments.length ? (e = Array.from(m,
|
|
1942
|
-
},
|
|
1943
|
-
return arguments.length ? (t = Array.from(m),
|
|
1944
|
-
},
|
|
1945
|
-
return t = Array.from(m), n =
|
|
1946
|
-
},
|
|
1947
|
-
return arguments.length ? (a = m ? !0 :
|
|
1948
|
-
},
|
|
1949
|
-
return arguments.length ? (n = m,
|
|
1950
|
-
},
|
|
1951
|
-
return arguments.length ? (l = m,
|
|
1952
|
-
}, function(m,
|
|
1953
|
-
return r = m, i =
|
|
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
|
|
1957
|
-
return
|
|
2015
|
+
function Hn() {
|
|
2016
|
+
return _n()(Z, Z);
|
|
1958
2017
|
}
|
|
1959
|
-
function
|
|
1960
|
-
var i =
|
|
1961
|
-
switch (r =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
2035
|
+
r.precision == null && !isNaN(l = Tn(i)) && (r.precision = l - (r.type === "%") * 2);
|
|
1977
2036
|
break;
|
|
1978
2037
|
}
|
|
1979
2038
|
}
|
|
1980
|
-
return
|
|
2039
|
+
return ht(r);
|
|
1981
2040
|
}
|
|
1982
|
-
function
|
|
2041
|
+
function gt(e) {
|
|
1983
2042
|
var t = e.domain;
|
|
1984
2043
|
return e.ticks = function(n) {
|
|
1985
2044
|
var r = t();
|
|
1986
|
-
return
|
|
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
|
|
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,
|
|
1993
|
-
for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o);
|
|
1994
|
-
if (o =
|
|
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
|
|
2008
|
-
var e =
|
|
2066
|
+
function Gn() {
|
|
2067
|
+
var e = Hn();
|
|
2009
2068
|
return e.copy = function() {
|
|
2010
|
-
return
|
|
2011
|
-
},
|
|
2069
|
+
return In(e, Gn());
|
|
2070
|
+
}, He.apply(e, arguments), gt(e);
|
|
2012
2071
|
}
|
|
2013
|
-
function
|
|
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[
|
|
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
|
|
2036
|
-
},
|
|
2094
|
+
return vt().domain([e, t]).range(i).unknown(l);
|
|
2095
|
+
}, He.apply(gt(a), arguments);
|
|
2037
2096
|
}
|
|
2038
|
-
function
|
|
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] =
|
|
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__ */
|
|
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
|
|
2116
|
+
let u, f = !1, m;
|
|
2058
2117
|
if (t?.xAxis && t?.yAxis) {
|
|
2059
|
-
const
|
|
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
|
|
2120
|
+
const p = I(r, N);
|
|
2062
2121
|
if (m) {
|
|
2063
|
-
const
|
|
2064
|
-
const
|
|
2065
|
-
return typeof
|
|
2066
|
-
}).filter((
|
|
2067
|
-
if (
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
const M = typeof L[m] == "string" ? parseFloat(L[m]) : L[m], D =
|
|
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:
|
|
2073
|
-
size: typeof L[
|
|
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
|
|
2080
|
-
|
|
2081
|
-
name:
|
|
2082
|
-
size: typeof
|
|
2083
|
-
fill:
|
|
2084
|
-
series: String(
|
|
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
|
-
|
|
2089
|
-
name:
|
|
2090
|
-
size: typeof
|
|
2091
|
-
fill: l?.colors && l.colors[
|
|
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
|
|
2095
|
-
(
|
|
2096
|
-
) ||
|
|
2097
|
-
(
|
|
2098
|
-
) ||
|
|
2099
|
-
if (!
|
|
2100
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */
|
|
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
|
-
|
|
2105
|
-
let
|
|
2106
|
-
return typeof
|
|
2107
|
-
name:
|
|
2108
|
-
size: typeof
|
|
2109
|
-
fill: l?.colors && l.colors[
|
|
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 (
|
|
2114
|
-
return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */
|
|
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
|
|
2119
|
-
const { x:
|
|
2120
|
-
return
|
|
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:
|
|
2125
|
-
y:
|
|
2126
|
-
width:
|
|
2127
|
-
height:
|
|
2183
|
+
x: S,
|
|
2184
|
+
y: p,
|
|
2185
|
+
width: x,
|
|
2186
|
+
height: y,
|
|
2128
2187
|
style: {
|
|
2129
|
-
fill:
|
|
2130
|
-
fillOpacity: a !== null ? a ===
|
|
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(
|
|
2194
|
+
onMouseEnter: () => c(k),
|
|
2136
2195
|
onMouseLeave: () => c(null)
|
|
2137
2196
|
}
|
|
2138
2197
|
),
|
|
2139
2198
|
/* @__PURE__ */ s(
|
|
2140
2199
|
"foreignObject",
|
|
2141
2200
|
{
|
|
2142
|
-
x:
|
|
2143
|
-
y:
|
|
2144
|
-
width:
|
|
2145
|
-
height:
|
|
2201
|
+
x: S,
|
|
2202
|
+
y: p,
|
|
2203
|
+
width: x,
|
|
2204
|
+
height: y,
|
|
2146
2205
|
style: { pointerEvents: "none", overflow: "visible" },
|
|
2147
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
2224
|
+
x > 40 && y > 30 && /* @__PURE__ */ s(
|
|
2166
2225
|
"div",
|
|
2167
2226
|
{
|
|
2168
2227
|
style: {
|
|
2169
|
-
fontSize: `${Math.max(10, Math.min(
|
|
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:
|
|
2232
|
+
marginBottom: x > 60 && y > 45 ? "4px" : "0",
|
|
2174
2233
|
wordBreak: "break-word",
|
|
2175
2234
|
hyphens: "auto"
|
|
2176
2235
|
},
|
|
2177
|
-
children:
|
|
2236
|
+
children: A
|
|
2178
2237
|
}
|
|
2179
2238
|
),
|
|
2180
|
-
|
|
2239
|
+
x > 60 && y > 45 && /* @__PURE__ */ s(
|
|
2181
2240
|
"div",
|
|
2182
2241
|
{
|
|
2183
2242
|
style: {
|
|
2184
|
-
fontSize: `${Math.max(8, Math.min(
|
|
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
|
-
},
|
|
2198
|
-
let
|
|
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 (
|
|
2201
|
-
const
|
|
2202
|
-
const
|
|
2203
|
-
return typeof
|
|
2204
|
-
})),
|
|
2205
|
-
const
|
|
2206
|
-
return typeof
|
|
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
|
-
|
|
2209
|
-
const
|
|
2267
|
+
h = oe.map((p, x) => {
|
|
2268
|
+
const y = x / (oe.length - 1);
|
|
2210
2269
|
return {
|
|
2211
|
-
value: (
|
|
2270
|
+
value: (N + (S - N) * y).toFixed(2),
|
|
2212
2271
|
type: "rect",
|
|
2213
|
-
color:
|
|
2272
|
+
color: p
|
|
2214
2273
|
};
|
|
2215
2274
|
});
|
|
2216
|
-
} else
|
|
2217
|
-
value:
|
|
2275
|
+
} else b.length > 1 && (h = b.map((N, S) => ({
|
|
2276
|
+
value: N,
|
|
2218
2277
|
type: "rect",
|
|
2219
|
-
color:
|
|
2278
|
+
color: F[S % F.length]
|
|
2220
2279
|
})));
|
|
2221
|
-
const
|
|
2222
|
-
return /* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */ s(
|
|
2224
|
-
|
|
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:
|
|
2285
|
+
data: u,
|
|
2227
2286
|
dataKey: "size",
|
|
2228
2287
|
aspectRatio: 4 / 3,
|
|
2229
2288
|
stroke: "#fff",
|
|
2230
|
-
content: /* @__PURE__ */ s(
|
|
2231
|
-
children: o.showTooltip && /* @__PURE__ */ s(
|
|
2289
|
+
content: /* @__PURE__ */ s(v, {}),
|
|
2290
|
+
children: o.showTooltip && /* @__PURE__ */ s(X, {})
|
|
2232
2291
|
}
|
|
2233
2292
|
) }),
|
|
2234
|
-
|
|
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__ */
|
|
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__ */
|
|
2239
|
-
/* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((
|
|
2240
|
-
const
|
|
2241
|
-
return typeof
|
|
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, ${
|
|
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((
|
|
2254
|
-
const
|
|
2255
|
-
return typeof
|
|
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:
|
|
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:
|
|
2325
|
+
style: { backgroundColor: N.color }
|
|
2267
2326
|
}
|
|
2268
2327
|
),
|
|
2269
|
-
/* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children:
|
|
2270
|
-
] },
|
|
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__ */
|
|
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
|
|
2340
|
+
function ir({
|
|
2282
2341
|
data: e,
|
|
2283
2342
|
chartConfig: t,
|
|
2284
2343
|
height: n = 300
|
|
2285
2344
|
}) {
|
|
2286
|
-
const { getFieldLabel: r } =
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
2382
|
+
children: Un(a[d])
|
|
2324
2383
|
},
|
|
2325
2384
|
d
|
|
2326
2385
|
)) }, c)) })
|
|
2327
2386
|
] }) });
|
|
2328
2387
|
}
|
|
2329
|
-
function
|
|
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
|
|
2333
|
-
const t =
|
|
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
|
|
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
|
|
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
|
|
2425
|
+
function lr() {
|
|
2367
2426
|
return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2368
2427
|
}
|
|
2369
|
-
function
|
|
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
|
|
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
|
|
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
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
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-
|
|
2504
|
+
//# sourceMappingURL=charts-C4AUz_2H.js.map
|