drizzle-cube 0.1.25 → 0.1.26
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/chartConfigs.d.ts +2 -0
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-Dx3asDBi.js → charts-JUvTF2xT.js} +593 -614
- package/dist/client/chunks/charts-JUvTF2xT.js.map +1 -0
- package/dist/client/chunks/{icons-BMGOKdZb.js → icons-ChgBIaCg.js} +366 -356
- package/dist/client/chunks/icons-ChgBIaCg.js.map +1 -0
- package/dist/client/components/AxisDropZone.d.ts +8 -2
- package/dist/client/components/charts/KpiDelta.config.d.ts +5 -0
- package/dist/client/components/charts/KpiDelta.d.ts +2 -0
- package/dist/client/components/charts/MarkdownChart.config.d.ts +5 -0
- package/dist/client/components/charts/MarkdownChart.d.ts +2 -0
- package/dist/client/components/charts/index.d.ts +2 -0
- package/dist/client/components.js +7060 -6363
- package/dist/client/components.js.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/types.d.ts +8 -1
- package/dist/client-bundle-stats.html +1 -1
- package/package.json +1 -1
- package/dist/client/chunks/charts-Dx3asDBi.js.map +0 -1
- package/dist/client/chunks/icons-BMGOKdZb.js.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { useState as G } from "react";
|
|
3
|
-
import { ResponsiveContainer as ze, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as
|
|
3
|
+
import { ResponsiveContainer as ze, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as B, Bar as mt, Cell as ke, LineChart as xt, Line as ht, AreaChart as yt, Area as pt, PieChart as vt, Pie as bt, ScatterChart as gt, Scatter as Re, RadarChart as wt, PolarGrid as Nt, PolarAngleAxis as At, PolarRadiusAxis as St, Radar as Mt, RadialBarChart as kt, RadialBar as $t, Treemap as Lt } from "recharts";
|
|
4
4
|
import { u as K } from "./providers-B7MVnAAt.js";
|
|
5
5
|
function U({ children: e, height: t = "100%" }) {
|
|
6
6
|
try {
|
|
7
7
|
if (t === "100%")
|
|
8
8
|
return /* @__PURE__ */ i("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
|
|
9
|
-
const
|
|
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__ */ i("div", { className: "w-full flex flex-col relative", style: { ...
|
|
15
|
-
} catch (
|
|
16
|
-
return
|
|
14
|
+
return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
|
|
15
|
+
} catch (n) {
|
|
16
|
+
return /* @__PURE__ */ b(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border-2 border-dashed border-yellow-300 rounded-lg bg-yellow-50",
|
|
20
20
|
style: { height: t },
|
|
21
21
|
children: [
|
|
22
22
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold text-yellow-600 mb-1", children: "Chart Container Error" }),
|
|
23
|
-
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children:
|
|
23
|
+
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: n instanceof Error ? n.message : "Failed to create responsive container" })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function q({ formatter: e, labelFormatter: t }) {
|
|
30
30
|
return /* @__PURE__ */ i(
|
|
31
31
|
ut,
|
|
32
32
|
{
|
|
@@ -83,15 +83,15 @@ const T = [
|
|
|
83
83
|
function we(e, t) {
|
|
84
84
|
return t[e] || e;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function R(e, t) {
|
|
87
87
|
if (!e) return String(e || "Unknown");
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
let
|
|
91
|
-
|
|
92
|
-
const s = new Date(
|
|
88
|
+
const n = String(e);
|
|
89
|
+
if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
|
|
90
|
+
let r = n;
|
|
91
|
+
n.includes(" ") && (r = n.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !r.endsWith("Z") && !r.includes("+") && (r = r + "Z");
|
|
92
|
+
const s = new Date(r);
|
|
93
93
|
if (isNaN(s.getTime()))
|
|
94
|
-
return
|
|
94
|
+
return n;
|
|
95
95
|
const a = s.getUTCFullYear(), l = String(s.getUTCMonth() + 1).padStart(2, "0"), c = String(s.getUTCDate()).padStart(2, "0"), d = s.getUTCHours(), o = s.getUTCMinutes();
|
|
96
96
|
if (t)
|
|
97
97
|
switch (t.toLowerCase()) {
|
|
@@ -121,73 +121,73 @@ function D(e, t) {
|
|
|
121
121
|
}
|
|
122
122
|
return d === 0 && o === 0 && u === 0 && f === 0 ? `${a}-${l}-${c}` : o === 0 && u === 0 && f === 0 ? `${a}-${l}-${c} ${String(d).padStart(2, "0")}:00` : `${a}-${l}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return n;
|
|
125
125
|
}
|
|
126
126
|
function O(e, t) {
|
|
127
127
|
try {
|
|
128
128
|
if (e != null && e.timeDimensions) {
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
return
|
|
129
|
+
const r = e.timeDimensions.find((s) => t === s.dimension || t.startsWith(s.dimension.replace(".", "_")) || t === `${s.dimension}_${s.granularity}`);
|
|
130
|
+
if (r != null && r.granularity)
|
|
131
|
+
return r.granularity;
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
const
|
|
136
|
-
if (["year", "quarter", "month", "week", "day", "hour", "minute", "second"].includes(
|
|
137
|
-
return
|
|
133
|
+
const n = t.match(/_([a-z]+)$/);
|
|
134
|
+
if (n) {
|
|
135
|
+
const r = n[1];
|
|
136
|
+
if (["year", "quarter", "month", "week", "day", "hour", "minute", "second"].includes(r))
|
|
137
|
+
return r;
|
|
138
138
|
}
|
|
139
139
|
return;
|
|
140
140
|
} catch {
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
function Ft(e, t,
|
|
144
|
+
function Ft(e, t, n, r, s = {}) {
|
|
145
145
|
if (!e || e.length === 0) return [];
|
|
146
|
-
const a = O(
|
|
146
|
+
const a = O(r, t);
|
|
147
147
|
return e.map((l) => {
|
|
148
148
|
const c = {
|
|
149
|
-
name:
|
|
149
|
+
name: R(l[t], a) || l[t] || "Unknown"
|
|
150
150
|
};
|
|
151
|
-
return
|
|
151
|
+
return n.forEach((d) => {
|
|
152
152
|
const o = we(d, s);
|
|
153
153
|
c[o] = typeof l[d] == "string" ? parseFloat(l[d]) : l[d] || 0;
|
|
154
154
|
}), c;
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
function C(e, t,
|
|
158
|
-
var
|
|
157
|
+
function C(e, t, n, r, s, a = {}) {
|
|
158
|
+
var w;
|
|
159
159
|
if (!e || e.length === 0)
|
|
160
160
|
return { data: [], seriesKeys: [], hasDimensions: !1 };
|
|
161
|
-
const l =
|
|
161
|
+
const l = r || {}, c = [
|
|
162
162
|
...l.dimensions || [],
|
|
163
|
-
...((
|
|
164
|
-
], d = l.measures || [], o =
|
|
163
|
+
...((w = l.timeDimensions) == null ? void 0 : w.map((x) => x.dimension)) || []
|
|
164
|
+
], d = l.measures || [], o = n.filter((x) => d.includes(x)), u = (s || []).filter((x) => c.includes(x));
|
|
165
165
|
if (u.length > 0) {
|
|
166
166
|
const x = {};
|
|
167
167
|
e.forEach((S) => {
|
|
168
|
-
const
|
|
168
|
+
const k = O(r, t), h = R(S[t], k) || S[t] || "Unknown";
|
|
169
169
|
x[h] || (x[h] = { name: String(h) }), o.forEach((y) => {
|
|
170
|
-
const
|
|
171
|
-
x[h][
|
|
170
|
+
const g = we(y, a);
|
|
171
|
+
x[h][g] = (x[h][g] || 0) + (typeof S[y] == "string" ? parseFloat(S[y]) : S[y] || 0);
|
|
172
172
|
}), u.forEach((y) => {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
(
|
|
173
|
+
const g = S[y];
|
|
174
|
+
if (g != null) {
|
|
175
|
+
const N = String(g), A = o[0] || d.find(
|
|
176
|
+
($) => $.includes("totalCost") || $.includes("count") || $.includes("sum")
|
|
177
177
|
) || d[0];
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
x[h][
|
|
178
|
+
if (A) {
|
|
179
|
+
const $ = typeof S[A] == "string" ? parseFloat(S[A]) : S[A] || 0;
|
|
180
|
+
x[h][N] = (x[h][N] || 0) + $;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
185
|
const v = Object.values(x), p = Array.from(new Set(
|
|
186
186
|
e.flatMap(
|
|
187
|
-
(S) => u.map((
|
|
188
|
-
const h = S[
|
|
187
|
+
(S) => u.map((k) => {
|
|
188
|
+
const h = S[k];
|
|
189
189
|
return h != null ? String(h) : null;
|
|
190
|
-
}).filter((
|
|
190
|
+
}).filter((k) => k !== null)
|
|
191
191
|
)
|
|
192
192
|
));
|
|
193
193
|
return {
|
|
@@ -196,46 +196,46 @@ function C(e, t, r, n, s, a = {}) {
|
|
|
196
196
|
hasDimensions: !0
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
const f = Ft(e, t,
|
|
199
|
+
const f = Ft(e, t, n, r, a), m = n.map((x) => we(x, a));
|
|
200
200
|
return {
|
|
201
201
|
data: f,
|
|
202
202
|
seriesKeys: m,
|
|
203
203
|
hasDimensions: !1
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function qn({
|
|
207
207
|
data: e,
|
|
208
208
|
chartConfig: t,
|
|
209
|
-
displayConfig:
|
|
210
|
-
queryObject:
|
|
209
|
+
displayConfig: n = {},
|
|
210
|
+
queryObject: r,
|
|
211
211
|
height: s = "100%",
|
|
212
212
|
colorPalette: a
|
|
213
213
|
}) {
|
|
214
214
|
const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
|
|
215
215
|
try {
|
|
216
216
|
const u = {
|
|
217
|
-
showLegend: (
|
|
218
|
-
showGrid: (
|
|
219
|
-
showTooltip: (
|
|
220
|
-
stacked: (
|
|
217
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
218
|
+
showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
|
|
219
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
|
|
220
|
+
stacked: (n == null ? void 0 : n.stacked) ?? !1
|
|
221
221
|
};
|
|
222
222
|
if (!e || e.length === 0)
|
|
223
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
224
224
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
225
225
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in bar chart" })
|
|
226
226
|
] }) });
|
|
227
|
-
let f, m,
|
|
227
|
+
let f, m, w = [];
|
|
228
228
|
if (t != null && t.xAxis && (t != null && t.yAxis))
|
|
229
|
-
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis],
|
|
229
|
+
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
|
|
230
230
|
else if (t != null && t.x && (t != null && t.y))
|
|
231
231
|
f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
|
|
232
232
|
else
|
|
233
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
234
234
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
235
235
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
|
|
236
236
|
] }) });
|
|
237
237
|
if (!f || !m || m.length === 0)
|
|
238
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
238
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
239
239
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
240
240
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
|
|
241
241
|
] }) });
|
|
@@ -243,21 +243,21 @@ function Ur({
|
|
|
243
243
|
e,
|
|
244
244
|
f,
|
|
245
245
|
m,
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
r,
|
|
247
|
+
w,
|
|
248
248
|
d
|
|
249
249
|
), p = u.stacked === !0, S = v.length === 1 && x.some((y) => {
|
|
250
|
-
const
|
|
251
|
-
return typeof
|
|
252
|
-
}),
|
|
250
|
+
const g = y[v[0]];
|
|
251
|
+
return typeof g == "number" && g < 0;
|
|
252
|
+
}), k = u.showLegend, h = {
|
|
253
253
|
...ve,
|
|
254
254
|
left: 40
|
|
255
255
|
// Increased from 20 to 40 for Y-axis label space
|
|
256
256
|
};
|
|
257
|
-
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
257
|
+
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
258
258
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
259
259
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for bar chart after transformation" })
|
|
260
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
260
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(ft, { data: x, margin: h, children: [
|
|
261
261
|
u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
|
|
262
262
|
/* @__PURE__ */ i(
|
|
263
263
|
ye,
|
|
@@ -276,9 +276,9 @@ function Ur({
|
|
|
276
276
|
label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
|
|
277
277
|
}
|
|
278
278
|
),
|
|
279
|
-
u.showTooltip && /* @__PURE__ */ i(
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
u.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
280
|
+
k && /* @__PURE__ */ i(
|
|
281
|
+
B,
|
|
282
282
|
{
|
|
283
283
|
wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
|
|
284
284
|
iconType: "rect",
|
|
@@ -290,22 +290,22 @@ function Ur({
|
|
|
290
290
|
onMouseLeave: () => c(null)
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
|
-
v.map((y,
|
|
293
|
+
v.map((y, g) => /* @__PURE__ */ i(
|
|
294
294
|
mt,
|
|
295
295
|
{
|
|
296
296
|
dataKey: y,
|
|
297
297
|
stackId: p ? "stack" : void 0,
|
|
298
|
-
fill: S ? De : (a == null ? void 0 : a.colors) && a.colors[
|
|
298
|
+
fill: S ? De : (a == null ? void 0 : a.colors) && a.colors[g % a.colors.length] || T[g % T.length],
|
|
299
299
|
fillOpacity: l ? l === y ? 1 : 0.3 : 1,
|
|
300
|
-
children: S && x.map((
|
|
301
|
-
const
|
|
300
|
+
children: S && x.map((N, A) => {
|
|
301
|
+
const $ = N[y], L = typeof $ == "number" && $ < 0 ? Tt : De;
|
|
302
302
|
return /* @__PURE__ */ i(
|
|
303
303
|
ke,
|
|
304
304
|
{
|
|
305
305
|
fill: L,
|
|
306
306
|
fillOpacity: l ? l === y ? 1 : 0.3 : 1
|
|
307
307
|
},
|
|
308
|
-
`cell-${
|
|
308
|
+
`cell-${A}`
|
|
309
309
|
);
|
|
310
310
|
})
|
|
311
311
|
},
|
|
@@ -313,45 +313,45 @@ function Ur({
|
|
|
313
313
|
))
|
|
314
314
|
] }) });
|
|
315
315
|
} catch (u) {
|
|
316
|
-
return
|
|
316
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
317
317
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
|
|
318
318
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
|
|
319
319
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
320
320
|
] }) });
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Vn({
|
|
324
324
|
data: e,
|
|
325
325
|
chartConfig: t,
|
|
326
|
-
displayConfig:
|
|
327
|
-
queryObject:
|
|
326
|
+
displayConfig: n = {},
|
|
327
|
+
queryObject: r,
|
|
328
328
|
height: s = "100%",
|
|
329
329
|
colorPalette: a
|
|
330
330
|
}) {
|
|
331
331
|
const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
|
|
332
332
|
try {
|
|
333
333
|
const u = {
|
|
334
|
-
showLegend: (
|
|
335
|
-
showGrid: (
|
|
336
|
-
showTooltip: (
|
|
334
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
335
|
+
showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
|
|
336
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
|
|
337
337
|
};
|
|
338
338
|
if (!e || e.length === 0)
|
|
339
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
340
340
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
341
341
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in line chart" })
|
|
342
342
|
] }) });
|
|
343
|
-
let f, m,
|
|
343
|
+
let f, m, w = [];
|
|
344
344
|
if (t != null && t.xAxis && (t != null && t.yAxis))
|
|
345
|
-
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis],
|
|
345
|
+
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
|
|
346
346
|
else if (t != null && t.x && (t != null && t.y))
|
|
347
347
|
f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
|
|
348
348
|
else
|
|
349
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
350
350
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
351
351
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
|
|
352
352
|
] }) });
|
|
353
353
|
if (!f || !m || m.length === 0)
|
|
354
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
355
355
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
356
356
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
|
|
357
357
|
] }) });
|
|
@@ -359,18 +359,18 @@ function Vr({
|
|
|
359
359
|
e,
|
|
360
360
|
f,
|
|
361
361
|
m,
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
r,
|
|
363
|
+
w,
|
|
364
364
|
d
|
|
365
365
|
), p = u.showLegend, S = {
|
|
366
366
|
...ve,
|
|
367
367
|
left: 40
|
|
368
368
|
// Increased from 20 to 40 for Y-axis label space
|
|
369
369
|
};
|
|
370
|
-
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
370
|
+
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
371
371
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
372
372
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for line chart after transformation" })
|
|
373
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
373
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(xt, { data: x, margin: S, children: [
|
|
374
374
|
u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
|
|
375
375
|
/* @__PURE__ */ i(
|
|
376
376
|
ye,
|
|
@@ -389,9 +389,9 @@ function Vr({
|
|
|
389
389
|
label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
|
-
u.showTooltip && /* @__PURE__ */ i(
|
|
392
|
+
u.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
393
393
|
p && /* @__PURE__ */ i(
|
|
394
|
-
|
|
394
|
+
B,
|
|
395
395
|
{
|
|
396
396
|
wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
|
|
397
397
|
iconType: "line",
|
|
@@ -399,65 +399,65 @@ function Vr({
|
|
|
399
399
|
layout: "horizontal",
|
|
400
400
|
align: "center",
|
|
401
401
|
verticalAlign: "bottom",
|
|
402
|
-
onMouseEnter: (
|
|
402
|
+
onMouseEnter: (k) => c(String(k.dataKey || "")),
|
|
403
403
|
onMouseLeave: () => c(null)
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
v.map((
|
|
406
|
+
v.map((k, h) => /* @__PURE__ */ i(
|
|
407
407
|
ht,
|
|
408
408
|
{
|
|
409
409
|
type: "monotone",
|
|
410
|
-
dataKey:
|
|
410
|
+
dataKey: k,
|
|
411
411
|
stroke: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
|
|
412
412
|
strokeWidth: 2,
|
|
413
413
|
dot: { r: 3 },
|
|
414
414
|
activeDot: { r: 5 },
|
|
415
|
-
strokeOpacity: l ? l ===
|
|
415
|
+
strokeOpacity: l ? l === k ? 1 : 0.3 : 1
|
|
416
416
|
},
|
|
417
|
-
|
|
417
|
+
k
|
|
418
418
|
))
|
|
419
419
|
] }) });
|
|
420
420
|
} catch (u) {
|
|
421
|
-
return
|
|
421
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
422
422
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
|
|
423
423
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
|
|
424
424
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
425
425
|
] }) });
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function _n({
|
|
429
429
|
data: e,
|
|
430
430
|
chartConfig: t,
|
|
431
|
-
displayConfig:
|
|
432
|
-
queryObject:
|
|
431
|
+
displayConfig: n = {},
|
|
432
|
+
queryObject: r,
|
|
433
433
|
height: s = "100%",
|
|
434
434
|
colorPalette: a
|
|
435
435
|
}) {
|
|
436
436
|
const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
|
|
437
437
|
try {
|
|
438
438
|
const u = {
|
|
439
|
-
showLegend: (
|
|
440
|
-
showGrid: (
|
|
441
|
-
showTooltip: (
|
|
442
|
-
stacked: (
|
|
439
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
440
|
+
showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
|
|
441
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
|
|
442
|
+
stacked: (n == null ? void 0 : n.stacked) ?? !1
|
|
443
443
|
};
|
|
444
444
|
if (!e || e.length === 0)
|
|
445
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
446
446
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
447
447
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in area chart" })
|
|
448
448
|
] }) });
|
|
449
|
-
let f, m,
|
|
449
|
+
let f, m, w = [];
|
|
450
450
|
if (t != null && t.xAxis && (t != null && t.yAxis))
|
|
451
|
-
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis],
|
|
451
|
+
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
|
|
452
452
|
else if (t != null && t.x && (t != null && t.y))
|
|
453
453
|
f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
|
|
454
454
|
else
|
|
455
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
455
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
456
456
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
457
457
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
|
|
458
458
|
] }) });
|
|
459
459
|
if (!f || !m || m.length === 0)
|
|
460
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
460
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
461
461
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
462
462
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
|
|
463
463
|
] }) });
|
|
@@ -465,18 +465,18 @@ function qr({
|
|
|
465
465
|
e,
|
|
466
466
|
f,
|
|
467
467
|
m,
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
r,
|
|
469
|
+
w,
|
|
470
470
|
d
|
|
471
471
|
), p = u.showLegend, S = {
|
|
472
472
|
...ve,
|
|
473
473
|
left: 40
|
|
474
474
|
// Increased from 20 to 40 for Y-axis label space
|
|
475
475
|
};
|
|
476
|
-
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
476
|
+
return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
477
477
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
478
478
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for area chart after transformation" })
|
|
479
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
479
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(yt, { data: x, margin: S, children: [
|
|
480
480
|
u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
|
|
481
481
|
/* @__PURE__ */ i(
|
|
482
482
|
ye,
|
|
@@ -495,9 +495,9 @@ function qr({
|
|
|
495
495
|
label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
|
|
496
496
|
}
|
|
497
497
|
),
|
|
498
|
-
u.showTooltip && /* @__PURE__ */ i(
|
|
498
|
+
u.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
499
499
|
p && /* @__PURE__ */ i(
|
|
500
|
-
|
|
500
|
+
B,
|
|
501
501
|
{
|
|
502
502
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
503
503
|
iconType: "rect",
|
|
@@ -505,74 +505,74 @@ function qr({
|
|
|
505
505
|
layout: "horizontal",
|
|
506
506
|
align: "center",
|
|
507
507
|
verticalAlign: "bottom",
|
|
508
|
-
onMouseEnter: (
|
|
508
|
+
onMouseEnter: (k) => c(String(k.dataKey || "")),
|
|
509
509
|
onMouseLeave: () => c(null)
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
v.map((
|
|
512
|
+
v.map((k, h) => /* @__PURE__ */ i(
|
|
513
513
|
pt,
|
|
514
514
|
{
|
|
515
515
|
type: "monotone",
|
|
516
|
-
dataKey:
|
|
516
|
+
dataKey: k,
|
|
517
517
|
stackId: u.stacked ? "stack" : void 0,
|
|
518
518
|
stroke: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
|
|
519
519
|
fill: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
|
|
520
|
-
fillOpacity: l ? l ===
|
|
520
|
+
fillOpacity: l ? l === k ? 0.6 : 0.1 : 0.3,
|
|
521
521
|
strokeWidth: 2,
|
|
522
|
-
strokeOpacity: l ? l ===
|
|
522
|
+
strokeOpacity: l ? l === k ? 1 : 0.3 : 1
|
|
523
523
|
},
|
|
524
|
-
|
|
524
|
+
k
|
|
525
525
|
))
|
|
526
526
|
] }) });
|
|
527
527
|
} catch (u) {
|
|
528
|
-
return
|
|
528
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
529
529
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
|
|
530
530
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
|
|
531
531
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
532
532
|
] }) });
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Bn({
|
|
536
536
|
data: e,
|
|
537
537
|
chartConfig: t,
|
|
538
|
-
displayConfig:
|
|
539
|
-
queryObject:
|
|
538
|
+
displayConfig: n = {},
|
|
539
|
+
queryObject: r,
|
|
540
540
|
height: s = "100%",
|
|
541
541
|
colorPalette: a
|
|
542
542
|
}) {
|
|
543
543
|
const [l, c] = G(null), { labelMap: d } = K();
|
|
544
544
|
try {
|
|
545
545
|
const o = {
|
|
546
|
-
showLegend: (
|
|
547
|
-
showTooltip: (
|
|
546
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
547
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
|
|
548
548
|
};
|
|
549
549
|
if (!e || e.length === 0)
|
|
550
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
551
551
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
552
552
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in pie chart" })
|
|
553
553
|
] }) });
|
|
554
|
-
let u, f, m,
|
|
554
|
+
let u, f, m, w = [];
|
|
555
555
|
if (t != null && t.xAxis && (t != null && t.yAxis))
|
|
556
|
-
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis],
|
|
556
|
+
f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
|
|
557
557
|
else if (t != null && t.x && (t != null && t.y))
|
|
558
558
|
f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
|
|
559
559
|
else
|
|
560
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
561
561
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
562
562
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
|
|
563
563
|
] }) });
|
|
564
564
|
if (!f || !m || m.length === 0)
|
|
565
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
565
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
566
566
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
567
567
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
|
|
568
568
|
] }) });
|
|
569
|
-
if (
|
|
569
|
+
if (w.length > 0) {
|
|
570
570
|
const { data: v } = C(
|
|
571
571
|
e,
|
|
572
572
|
f,
|
|
573
573
|
m,
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
r,
|
|
575
|
+
w,
|
|
576
576
|
d
|
|
577
577
|
);
|
|
578
578
|
if (u = [], v.length > 0) {
|
|
@@ -585,9 +585,9 @@ function Br({
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
} else {
|
|
588
|
-
const v = O(
|
|
588
|
+
const v = O(r, f);
|
|
589
589
|
u = e.map((p) => {
|
|
590
|
-
let S =
|
|
590
|
+
let S = R(p[f], v) || String(p[f]) || "Unknown";
|
|
591
591
|
return typeof p[f] == "boolean" ? S = p[f] ? "Active" : "Inactive" : (S === "true" || S === "false") && (S = S === "true" ? "Active" : "Inactive"), {
|
|
592
592
|
name: S,
|
|
593
593
|
value: typeof p[m[0]] == "string" ? parseFloat(p[m[0]]) : p[m[0]] || 0
|
|
@@ -597,12 +597,12 @@ function Br({
|
|
|
597
597
|
const x = u.length;
|
|
598
598
|
return u = u.filter(
|
|
599
599
|
(v) => v.value != null && !isNaN(v.value) && v.value !== 0 && v.value > 0
|
|
600
|
-
), u.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
600
|
+
), u.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
601
601
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
602
602
|
/* @__PURE__ */ i("div", { className: "text-xs", children: x > 0 ? `Filtered out ${x} data points (zero or invalid values)` : "No data points to display in pie chart" })
|
|
603
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
603
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(vt, { children: [
|
|
604
604
|
/* @__PURE__ */ i(
|
|
605
|
-
|
|
605
|
+
bt,
|
|
606
606
|
{
|
|
607
607
|
data: u,
|
|
608
608
|
cx: "50%",
|
|
@@ -620,9 +620,9 @@ function Br({
|
|
|
620
620
|
))
|
|
621
621
|
}
|
|
622
622
|
),
|
|
623
|
-
o.showTooltip && /* @__PURE__ */ i(
|
|
623
|
+
o.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
624
624
|
o.showLegend && /* @__PURE__ */ i(
|
|
625
|
-
|
|
625
|
+
B,
|
|
626
626
|
{
|
|
627
627
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
628
628
|
iconType: "circle",
|
|
@@ -636,30 +636,30 @@ function Br({
|
|
|
636
636
|
)
|
|
637
637
|
] }) });
|
|
638
638
|
} catch (o) {
|
|
639
|
-
return
|
|
639
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
640
640
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
|
|
641
641
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
642
642
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
643
643
|
] }) });
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Kn({
|
|
647
647
|
data: e,
|
|
648
648
|
chartConfig: t,
|
|
649
|
-
displayConfig:
|
|
650
|
-
queryObject:
|
|
649
|
+
displayConfig: n = {},
|
|
650
|
+
queryObject: r,
|
|
651
651
|
height: s = "100%",
|
|
652
652
|
colorPalette: a
|
|
653
653
|
}) {
|
|
654
654
|
const [l, c] = G(null), { getFieldLabel: d } = K();
|
|
655
655
|
try {
|
|
656
656
|
const o = {
|
|
657
|
-
showLegend: (
|
|
658
|
-
showGrid: (
|
|
659
|
-
showTooltip: (
|
|
657
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
658
|
+
showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
|
|
659
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
|
|
660
660
|
};
|
|
661
661
|
if (!e || e.length === 0)
|
|
662
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
663
663
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
664
664
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in scatter chart" })
|
|
665
665
|
] }) });
|
|
@@ -669,52 +669,52 @@ function _r({
|
|
|
669
669
|
else if (t != null && t.x && (t != null && t.y))
|
|
670
670
|
u = t.x, f = Array.isArray(t.y) ? t.y[0] : t.y;
|
|
671
671
|
else
|
|
672
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
673
673
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
674
674
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
|
|
675
675
|
] }) });
|
|
676
676
|
if (!u || !f)
|
|
677
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
677
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
678
678
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
679
679
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
|
|
680
680
|
] }) });
|
|
681
|
-
let
|
|
681
|
+
let w, x = {};
|
|
682
682
|
if (m.length > 0) {
|
|
683
683
|
const h = m[0];
|
|
684
|
-
e.forEach((
|
|
685
|
-
const
|
|
686
|
-
x[
|
|
687
|
-
const
|
|
688
|
-
x[
|
|
689
|
-
x: typeof
|
|
684
|
+
e.forEach((g) => {
|
|
685
|
+
const N = String(g[h] || "Default");
|
|
686
|
+
x[N] || (x[N] = []);
|
|
687
|
+
const A = O(r, u), $ = R(g[u], A) || g[u], L = typeof g[f] == "string" ? parseFloat(g[f]) : g[f] || 0;
|
|
688
|
+
x[N].push({
|
|
689
|
+
x: typeof $ == "string" ? parseFloat($) || 0 : $,
|
|
690
690
|
y: L,
|
|
691
|
-
name: `${
|
|
691
|
+
name: `${N} (${$}, ${L})`
|
|
692
692
|
});
|
|
693
693
|
});
|
|
694
694
|
const y = Object.keys(x);
|
|
695
|
-
|
|
695
|
+
w = x[y[0]] || [];
|
|
696
696
|
} else {
|
|
697
|
-
const h = O(
|
|
698
|
-
|
|
699
|
-
const
|
|
697
|
+
const h = O(r, u);
|
|
698
|
+
w = e.map((y) => {
|
|
699
|
+
const g = R(y[u], h) || y[u], N = typeof y[f] == "string" ? parseFloat(y[f]) : y[f] || 0;
|
|
700
700
|
return {
|
|
701
|
-
x: typeof
|
|
702
|
-
y:
|
|
703
|
-
name: `(${
|
|
701
|
+
x: typeof g == "string" ? parseFloat(g) || 0 : g,
|
|
702
|
+
y: N,
|
|
703
|
+
name: `(${g}, ${N})`
|
|
704
704
|
};
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
|
-
if (!
|
|
708
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
707
|
+
if (!w || w.length === 0)
|
|
708
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
709
709
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
710
710
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for scatter chart after transformation" })
|
|
711
711
|
] }) });
|
|
712
|
-
const v = Object.keys(x), p = v.length > 1, S = o.showLegend && p,
|
|
712
|
+
const v = Object.keys(x), p = v.length > 1, S = o.showLegend && p, k = {
|
|
713
713
|
...ve,
|
|
714
714
|
left: 40
|
|
715
715
|
// Increased from 20 to 40 for Y-axis label space
|
|
716
716
|
};
|
|
717
|
-
return /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
717
|
+
return /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(gt, { data: w, margin: k, children: [
|
|
718
718
|
o.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
|
|
719
719
|
/* @__PURE__ */ i(
|
|
720
720
|
ye,
|
|
@@ -735,9 +735,9 @@ function _r({
|
|
|
735
735
|
label: { value: d(f), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
|
|
736
736
|
}
|
|
737
737
|
),
|
|
738
|
-
o.showTooltip && /* @__PURE__ */ i(
|
|
738
|
+
o.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
739
739
|
S && /* @__PURE__ */ i(
|
|
740
|
-
|
|
740
|
+
B,
|
|
741
741
|
{
|
|
742
742
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
743
743
|
iconType: "circle",
|
|
@@ -767,70 +767,70 @@ function _r({
|
|
|
767
767
|
Re,
|
|
768
768
|
{
|
|
769
769
|
name: "Data",
|
|
770
|
-
data:
|
|
770
|
+
data: w,
|
|
771
771
|
fill: (a == null ? void 0 : a.colors) && a.colors[0] || T[0]
|
|
772
772
|
}
|
|
773
773
|
)
|
|
774
774
|
)
|
|
775
775
|
] }) });
|
|
776
776
|
} catch (o) {
|
|
777
|
-
return
|
|
777
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
778
778
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
|
|
779
779
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
780
780
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
781
781
|
] }) });
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function Yn({
|
|
785
785
|
data: e,
|
|
786
786
|
chartConfig: t,
|
|
787
|
-
displayConfig:
|
|
788
|
-
queryObject:
|
|
787
|
+
displayConfig: n = {},
|
|
788
|
+
queryObject: r,
|
|
789
789
|
height: s = "100%",
|
|
790
790
|
colorPalette: a
|
|
791
791
|
}) {
|
|
792
792
|
const [l, c] = G(null);
|
|
793
793
|
try {
|
|
794
794
|
const d = {
|
|
795
|
-
showLegend: (
|
|
796
|
-
showTooltip: (
|
|
797
|
-
showGrid: (
|
|
795
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
796
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
|
|
797
|
+
showGrid: (n == null ? void 0 : n.showGrid) ?? !0
|
|
798
798
|
};
|
|
799
799
|
if (!e || e.length === 0)
|
|
800
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
800
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
801
801
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
802
802
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in radar chart" })
|
|
803
803
|
] }) });
|
|
804
804
|
let o, u = [];
|
|
805
805
|
if (t != null && t.xAxis && (t != null && t.yAxis)) {
|
|
806
|
-
const f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis],
|
|
806
|
+
const f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [], { data: x, seriesKeys: v } = C(
|
|
807
807
|
e,
|
|
808
808
|
f,
|
|
809
809
|
m,
|
|
810
|
-
|
|
811
|
-
|
|
810
|
+
r,
|
|
811
|
+
w
|
|
812
812
|
);
|
|
813
813
|
o = x, u = v;
|
|
814
814
|
} else {
|
|
815
|
-
const f = e[0], m = Object.keys(f),
|
|
815
|
+
const f = e[0], m = Object.keys(f), w = m.find(
|
|
816
816
|
(v) => typeof f[v] == "string" || v.toLowerCase().includes("subject") || v.toLowerCase().includes("name") || v.toLowerCase().includes("category")
|
|
817
817
|
) || m[0], x = m.filter(
|
|
818
|
-
(v) => typeof f[v] == "number" && v !==
|
|
818
|
+
(v) => typeof f[v] == "number" && v !== w
|
|
819
819
|
);
|
|
820
820
|
if (x.length === 0)
|
|
821
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
821
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
822
822
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
823
823
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
|
|
824
824
|
] }) });
|
|
825
|
-
if (
|
|
826
|
-
const v = O(
|
|
825
|
+
if (w) {
|
|
826
|
+
const v = O(r, w);
|
|
827
827
|
o = e.map((p) => {
|
|
828
828
|
const S = {
|
|
829
|
-
name:
|
|
829
|
+
name: R(p[w], v) || String(p[w]) || "Unknown"
|
|
830
830
|
};
|
|
831
|
-
return x.forEach((
|
|
832
|
-
const h =
|
|
833
|
-
S[h] = typeof p[
|
|
831
|
+
return x.forEach((k) => {
|
|
832
|
+
const h = k.split(".").pop() || k;
|
|
833
|
+
S[h] = typeof p[k] == "string" ? parseFloat(p[k]) : p[k] || 0;
|
|
834
834
|
}), S;
|
|
835
835
|
}), u = x.map((p) => p.split(".").pop() || p);
|
|
836
836
|
} else
|
|
@@ -839,10 +839,10 @@ function Kr({
|
|
|
839
839
|
value: typeof v[x[0]] == "string" ? parseFloat(v[x[0]]) : v[x[0]] || 0
|
|
840
840
|
})), u = ["value"];
|
|
841
841
|
}
|
|
842
|
-
return !o || o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
842
|
+
return !o || o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
843
843
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
844
844
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for radar chart after transformation" })
|
|
845
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
845
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(wt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
|
|
846
846
|
d.showGrid && /* @__PURE__ */ i(Nt, {}),
|
|
847
847
|
/* @__PURE__ */ i(
|
|
848
848
|
At,
|
|
@@ -859,9 +859,9 @@ function Kr({
|
|
|
859
859
|
className: "text-gray-600"
|
|
860
860
|
}
|
|
861
861
|
),
|
|
862
|
-
d.showTooltip && /* @__PURE__ */ i(
|
|
862
|
+
d.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
863
863
|
d.showLegend && u.length > 1 && /* @__PURE__ */ i(
|
|
864
|
-
|
|
864
|
+
B,
|
|
865
865
|
{
|
|
866
866
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
867
867
|
iconType: "rect",
|
|
@@ -888,48 +888,48 @@ function Kr({
|
|
|
888
888
|
))
|
|
889
889
|
] }) });
|
|
890
890
|
} catch (d) {
|
|
891
|
-
return
|
|
891
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
892
892
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
|
|
893
893
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
|
|
894
894
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
895
895
|
] }) });
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Wn({
|
|
899
899
|
data: e,
|
|
900
900
|
chartConfig: t,
|
|
901
|
-
displayConfig:
|
|
902
|
-
queryObject:
|
|
901
|
+
displayConfig: n = {},
|
|
902
|
+
queryObject: r,
|
|
903
903
|
height: s = "100%",
|
|
904
904
|
colorPalette: a
|
|
905
905
|
}) {
|
|
906
906
|
const [l, c] = G(null);
|
|
907
907
|
try {
|
|
908
908
|
const d = {
|
|
909
|
-
showLegend: (
|
|
910
|
-
showTooltip: (
|
|
909
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
|
|
910
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
|
|
911
911
|
};
|
|
912
912
|
if (!e || e.length === 0)
|
|
913
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
913
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
914
914
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
915
915
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in radial bar chart" })
|
|
916
916
|
] }) });
|
|
917
917
|
let o;
|
|
918
918
|
if (t != null && t.xAxis && (t != null && t.yAxis)) {
|
|
919
|
-
const u = t.xAxis[0], f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = O(
|
|
920
|
-
o = e.map((
|
|
921
|
-
name:
|
|
922
|
-
value: typeof
|
|
919
|
+
const u = t.xAxis[0], f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = O(r, u);
|
|
920
|
+
o = e.map((w, x) => ({
|
|
921
|
+
name: R(w[u], m) || String(w[u]) || "Unknown",
|
|
922
|
+
value: typeof w[f] == "string" ? parseFloat(w[f]) : w[f] || 0,
|
|
923
923
|
fill: (a == null ? void 0 : a.colors) && a.colors[x % a.colors.length] || T[x % T.length]
|
|
924
924
|
}));
|
|
925
925
|
} else {
|
|
926
926
|
const u = e[0], f = Object.keys(u), m = f.find(
|
|
927
927
|
(x) => typeof u[x] == "string" || x.toLowerCase().includes("name") || x.toLowerCase().includes("label") || x.toLowerCase().includes("category")
|
|
928
|
-
) || f[0],
|
|
928
|
+
) || f[0], w = f.find(
|
|
929
929
|
(x) => typeof u[x] == "number" && x !== m
|
|
930
930
|
) || f[1];
|
|
931
|
-
if (!
|
|
932
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
931
|
+
if (!w)
|
|
932
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
933
933
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
934
934
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
|
|
935
935
|
] }) });
|
|
@@ -937,15 +937,15 @@ function Yr({
|
|
|
937
937
|
let p = x[m];
|
|
938
938
|
return typeof p == "boolean" ? p = p ? "Active" : "Inactive" : p === "true" || p === "false" ? p = p === "true" ? "Active" : "Inactive" : p = String(p), {
|
|
939
939
|
name: p,
|
|
940
|
-
value: typeof x[
|
|
940
|
+
value: typeof x[w] == "string" ? parseFloat(x[w]) : x[w] || 0,
|
|
941
941
|
fill: (a == null ? void 0 : a.colors) && a.colors[v % a.colors.length] || T[v % T.length]
|
|
942
942
|
};
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
|
-
return o = o.filter((u) => u.value != null && u.value !== 0), o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
945
|
+
return o = o.filter((u) => u.value != null && u.value !== 0), o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
946
946
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
947
947
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for radial bar chart after transformation" })
|
|
948
|
-
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */
|
|
948
|
+
] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(
|
|
949
949
|
kt,
|
|
950
950
|
{
|
|
951
951
|
data: o,
|
|
@@ -953,9 +953,9 @@ function Yr({
|
|
|
953
953
|
outerRadius: "80%",
|
|
954
954
|
margin: { top: 20, right: 30, bottom: 20, left: 30 },
|
|
955
955
|
children: [
|
|
956
|
-
d.showTooltip && /* @__PURE__ */ i(
|
|
956
|
+
d.showTooltip && /* @__PURE__ */ i(q, {}),
|
|
957
957
|
d.showLegend && /* @__PURE__ */ i(
|
|
958
|
-
|
|
958
|
+
B,
|
|
959
959
|
{
|
|
960
960
|
wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
|
|
961
961
|
iconType: "circle",
|
|
@@ -987,7 +987,7 @@ function Yr({
|
|
|
987
987
|
}
|
|
988
988
|
) });
|
|
989
989
|
} catch (d) {
|
|
990
|
-
return
|
|
990
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
991
991
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
|
|
992
992
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
|
|
993
993
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
@@ -1001,14 +1001,14 @@ function jt(e, t) {
|
|
|
1001
1001
|
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
1002
1002
|
}
|
|
1003
1003
|
function et(e) {
|
|
1004
|
-
let t,
|
|
1005
|
-
e.length !== 2 ? (t = oe,
|
|
1004
|
+
let t, n, r;
|
|
1005
|
+
e.length !== 2 ? (t = oe, n = (c, d) => oe(e(c), d), r = (c, d) => e(c) - d) : (t = e === oe || e === jt ? e : Et, n = e, r = e);
|
|
1006
1006
|
function s(c, d, o = 0, u = c.length) {
|
|
1007
1007
|
if (o < u) {
|
|
1008
1008
|
if (t(d, d) !== 0) return u;
|
|
1009
1009
|
do {
|
|
1010
1010
|
const f = o + u >>> 1;
|
|
1011
|
-
|
|
1011
|
+
n(c[f], d) < 0 ? o = f + 1 : u = f;
|
|
1012
1012
|
} while (o < u);
|
|
1013
1013
|
}
|
|
1014
1014
|
return o;
|
|
@@ -1018,14 +1018,14 @@ function et(e) {
|
|
|
1018
1018
|
if (t(d, d) !== 0) return u;
|
|
1019
1019
|
do {
|
|
1020
1020
|
const f = o + u >>> 1;
|
|
1021
|
-
|
|
1021
|
+
n(c[f], d) <= 0 ? o = f + 1 : u = f;
|
|
1022
1022
|
} while (o < u);
|
|
1023
1023
|
}
|
|
1024
1024
|
return o;
|
|
1025
1025
|
}
|
|
1026
1026
|
function l(c, d, o = 0, u = c.length) {
|
|
1027
1027
|
const f = s(c, d, o, u - 1);
|
|
1028
|
-
return f > o &&
|
|
1028
|
+
return f > o && r(c[f - 1], d) > -r(c[f], d) ? f - 1 : f;
|
|
1029
1029
|
}
|
|
1030
1030
|
return { left: s, center: l, right: a };
|
|
1031
1031
|
}
|
|
@@ -1038,8 +1038,8 @@ function zt(e) {
|
|
|
1038
1038
|
const Rt = et(oe), tt = Rt.right;
|
|
1039
1039
|
et(zt).center;
|
|
1040
1040
|
class He extends Map {
|
|
1041
|
-
constructor(t,
|
|
1042
|
-
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value:
|
|
1041
|
+
constructor(t, n = It) {
|
|
1042
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, s] of t) this.set(r, s);
|
|
1043
1043
|
}
|
|
1044
1044
|
get(t) {
|
|
1045
1045
|
return super.get(Ie(this, t));
|
|
@@ -1047,66 +1047,66 @@ class He extends Map {
|
|
|
1047
1047
|
has(t) {
|
|
1048
1048
|
return super.has(Ie(this, t));
|
|
1049
1049
|
}
|
|
1050
|
-
set(t,
|
|
1051
|
-
return super.set(Dt(this, t),
|
|
1050
|
+
set(t, n) {
|
|
1051
|
+
return super.set(Dt(this, t), n);
|
|
1052
1052
|
}
|
|
1053
1053
|
delete(t) {
|
|
1054
1054
|
return super.delete(Ht(this, t));
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
function Ie({ _intern: e, _key: t },
|
|
1058
|
-
const
|
|
1059
|
-
return e.has(
|
|
1057
|
+
function Ie({ _intern: e, _key: t }, n) {
|
|
1058
|
+
const r = t(n);
|
|
1059
|
+
return e.has(r) ? e.get(r) : n;
|
|
1060
1060
|
}
|
|
1061
|
-
function Dt({ _intern: e, _key: t },
|
|
1062
|
-
const
|
|
1063
|
-
return e.has(
|
|
1061
|
+
function Dt({ _intern: e, _key: t }, n) {
|
|
1062
|
+
const r = t(n);
|
|
1063
|
+
return e.has(r) ? e.get(r) : (e.set(r, n), n);
|
|
1064
1064
|
}
|
|
1065
|
-
function Ht({ _intern: e, _key: t },
|
|
1066
|
-
const
|
|
1067
|
-
return e.has(
|
|
1065
|
+
function Ht({ _intern: e, _key: t }, n) {
|
|
1066
|
+
const r = t(n);
|
|
1067
|
+
return e.has(r) && (n = e.get(r), e.delete(r)), n;
|
|
1068
1068
|
}
|
|
1069
1069
|
function It(e) {
|
|
1070
1070
|
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
1071
1071
|
}
|
|
1072
1072
|
const Ot = Math.sqrt(50), Gt = Math.sqrt(10), Ut = Math.sqrt(2);
|
|
1073
|
-
function ce(e, t,
|
|
1074
|
-
const
|
|
1073
|
+
function ce(e, t, n) {
|
|
1074
|
+
const r = (t - e) / Math.max(0, n), s = Math.floor(Math.log10(r)), a = r / Math.pow(10, s), l = a >= Ot ? 10 : a >= Gt ? 5 : a >= Ut ? 2 : 1;
|
|
1075
1075
|
let c, d, o;
|
|
1076
|
-
return s < 0 ? (o = Math.pow(10, -s) / l, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, s) * l, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <=
|
|
1076
|
+
return s < 0 ? (o = Math.pow(10, -s) / l, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, s) * l, 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 ? ce(e, t, n * 2) : [c, d, o];
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
if (t = +t, e = +e,
|
|
1078
|
+
function qt(e, t, n) {
|
|
1079
|
+
if (t = +t, e = +e, n = +n, !(n > 0)) return [];
|
|
1080
1080
|
if (e === t) return [e];
|
|
1081
|
-
const
|
|
1081
|
+
const r = t < e, [s, a, l] = r ? ce(t, e, n) : ce(e, t, n);
|
|
1082
1082
|
if (!(a >= s)) return [];
|
|
1083
1083
|
const c = a - s + 1, d = new Array(c);
|
|
1084
|
-
if (
|
|
1084
|
+
if (r)
|
|
1085
1085
|
if (l < 0) for (let o = 0; o < c; ++o) d[o] = (a - o) / -l;
|
|
1086
1086
|
else for (let o = 0; o < c; ++o) d[o] = (a - o) * l;
|
|
1087
1087
|
else if (l < 0) for (let o = 0; o < c; ++o) d[o] = (s + o) / -l;
|
|
1088
1088
|
else for (let o = 0; o < c; ++o) d[o] = (s + o) * l;
|
|
1089
1089
|
return d;
|
|
1090
1090
|
}
|
|
1091
|
-
function Ne(e, t,
|
|
1092
|
-
return t = +t, e = +e,
|
|
1091
|
+
function Ne(e, t, n) {
|
|
1092
|
+
return t = +t, e = +e, n = +n, ce(e, t, n)[2];
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
t = +t, e = +e,
|
|
1096
|
-
const
|
|
1097
|
-
return (
|
|
1094
|
+
function Vt(e, t, n) {
|
|
1095
|
+
t = +t, e = +e, n = +n;
|
|
1096
|
+
const r = t < e, s = r ? Ne(t, e, n) : Ne(e, t, n);
|
|
1097
|
+
return (r ? -1 : 1) * (s < 0 ? 1 / -s : s);
|
|
1098
1098
|
}
|
|
1099
|
-
function $e(e, t,
|
|
1100
|
-
e.prototype = t.prototype =
|
|
1099
|
+
function $e(e, t, n) {
|
|
1100
|
+
e.prototype = t.prototype = n, n.constructor = e;
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
var
|
|
1104
|
-
for (var
|
|
1105
|
-
return
|
|
1102
|
+
function nt(e, t) {
|
|
1103
|
+
var n = Object.create(e.prototype);
|
|
1104
|
+
for (var r in t) n[r] = t[r];
|
|
1105
|
+
return n;
|
|
1106
1106
|
}
|
|
1107
1107
|
function ee() {
|
|
1108
1108
|
}
|
|
1109
|
-
var Z = 0.7, de = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1109
|
+
var Z = 0.7, de = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", D = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", _t = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Kt = new RegExp(`^rgb\\(${D},${D},${D}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Wt = new RegExp(`^rgba\\(${D},${D},${D},${J}\\)$`), Xt = new RegExp(`^hsl\\(${J},${D},${D}\\)$`), Qt = new RegExp(`^hsla\\(${J},${D},${D},${J}\\)$`), Oe = {
|
|
1110
1110
|
aliceblue: 15792383,
|
|
1111
1111
|
antiquewhite: 16444375,
|
|
1112
1112
|
aqua: 65535,
|
|
@@ -1278,31 +1278,31 @@ function Zt() {
|
|
|
1278
1278
|
return this.rgb().formatHex8();
|
|
1279
1279
|
}
|
|
1280
1280
|
function Jt() {
|
|
1281
|
-
return
|
|
1281
|
+
return rt(this).formatHsl();
|
|
1282
1282
|
}
|
|
1283
1283
|
function Ue() {
|
|
1284
1284
|
return this.rgb().formatRgb();
|
|
1285
1285
|
}
|
|
1286
1286
|
function P(e) {
|
|
1287
|
-
var t,
|
|
1288
|
-
return e = (e + "").trim().toLowerCase(), (t =
|
|
1287
|
+
var t, n;
|
|
1288
|
+
return e = (e + "").trim().toLowerCase(), (t = _t.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? qe(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ie(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ie(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Kt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ie(t[1], t[2], t[3], t[4]) : (t = Wt.exec(e)) ? ie(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Xt.exec(e)) ? Be(t[1], t[2] / 100, t[3] / 100, 1) : (t = Qt.exec(e)) ? Be(t[1], t[2] / 100, t[3] / 100, t[4]) : Oe.hasOwnProperty(e) ? qe(Oe[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function qe(e) {
|
|
1291
1291
|
return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
1292
1292
|
}
|
|
1293
|
-
function ie(e, t,
|
|
1294
|
-
return
|
|
1293
|
+
function ie(e, t, n, r) {
|
|
1294
|
+
return r <= 0 && (e = t = n = NaN), new j(e, t, n, r);
|
|
1295
1295
|
}
|
|
1296
1296
|
function Pt(e) {
|
|
1297
1297
|
return e instanceof ee || (e = P(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
|
|
1298
1298
|
}
|
|
1299
|
-
function Ae(e, t,
|
|
1300
|
-
return arguments.length === 1 ? Pt(e) : new j(e, t,
|
|
1299
|
+
function Ae(e, t, n, r) {
|
|
1300
|
+
return arguments.length === 1 ? Pt(e) : new j(e, t, n, r ?? 1);
|
|
1301
1301
|
}
|
|
1302
|
-
function j(e, t,
|
|
1303
|
-
this.r = +e, this.g = +t, this.b = +
|
|
1302
|
+
function j(e, t, n, r) {
|
|
1303
|
+
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
1304
1304
|
}
|
|
1305
|
-
$e(j, Ae,
|
|
1305
|
+
$e(j, Ae, nt(ee, {
|
|
1306
1306
|
brighter(e) {
|
|
1307
1307
|
return e = e == null ? de : Math.pow(de, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1308
1308
|
},
|
|
@@ -1313,55 +1313,55 @@ $e(j, Ae, rt(ee, {
|
|
|
1313
1313
|
return this;
|
|
1314
1314
|
},
|
|
1315
1315
|
clamp() {
|
|
1316
|
-
return new j(
|
|
1316
|
+
return new j(_(this.r), _(this.g), _(this.b), ue(this.opacity));
|
|
1317
1317
|
},
|
|
1318
1318
|
displayable() {
|
|
1319
1319
|
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;
|
|
1320
1320
|
},
|
|
1321
|
-
hex:
|
|
1321
|
+
hex: Ve,
|
|
1322
1322
|
// Deprecated! Use color.formatHex.
|
|
1323
|
-
formatHex:
|
|
1323
|
+
formatHex: Ve,
|
|
1324
1324
|
formatHex8: Ct,
|
|
1325
|
-
formatRgb:
|
|
1326
|
-
toString:
|
|
1325
|
+
formatRgb: _e,
|
|
1326
|
+
toString: _e
|
|
1327
1327
|
}));
|
|
1328
|
-
function
|
|
1329
|
-
return `#${
|
|
1328
|
+
function Ve() {
|
|
1329
|
+
return `#${V(this.r)}${V(this.g)}${V(this.b)}`;
|
|
1330
1330
|
}
|
|
1331
1331
|
function Ct() {
|
|
1332
|
-
return `#${
|
|
1332
|
+
return `#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function _e() {
|
|
1335
1335
|
const e = ue(this.opacity);
|
|
1336
|
-
return `${e === 1 ? "rgb(" : "rgba("}${
|
|
1336
|
+
return `${e === 1 ? "rgb(" : "rgba("}${_(this.r)}, ${_(this.g)}, ${_(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
1337
1337
|
}
|
|
1338
1338
|
function ue(e) {
|
|
1339
1339
|
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function _(e) {
|
|
1342
1342
|
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return e =
|
|
1344
|
+
function V(e) {
|
|
1345
|
+
return e = _(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1347
|
+
function Be(e, t, n, r) {
|
|
1348
|
+
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new z(e, t, n, r);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function rt(e) {
|
|
1351
1351
|
if (e instanceof z) return new z(e.h, e.s, e.l, e.opacity);
|
|
1352
1352
|
if (e instanceof ee || (e = P(e)), !e) return new z();
|
|
1353
1353
|
if (e instanceof z) return e;
|
|
1354
1354
|
e = e.rgb();
|
|
1355
|
-
var t = e.r / 255,
|
|
1356
|
-
return c ? (t === a ? l = (
|
|
1355
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, s = Math.min(t, n, r), a = Math.max(t, n, r), l = NaN, c = a - s, d = (a + s) / 2;
|
|
1356
|
+
return c ? (t === a ? l = (n - r) / c + (n < r) * 6 : n === a ? l = (r - t) / c + 2 : l = (t - n) / c + 4, c /= d < 0.5 ? a + s : 2 - a - s, l *= 60) : c = d > 0 && d < 1 ? 0 : l, new z(l, c, d, e.opacity);
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return arguments.length === 1 ?
|
|
1358
|
+
function en(e, t, n, r) {
|
|
1359
|
+
return arguments.length === 1 ? rt(e) : new z(e, t, n, r ?? 1);
|
|
1360
1360
|
}
|
|
1361
|
-
function z(e, t,
|
|
1362
|
-
this.h = +e, this.s = +t, this.l = +
|
|
1361
|
+
function z(e, t, n, r) {
|
|
1362
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
1363
1363
|
}
|
|
1364
|
-
$e(z,
|
|
1364
|
+
$e(z, en, nt(ee, {
|
|
1365
1365
|
brighter(e) {
|
|
1366
1366
|
return e = e == null ? de : Math.pow(de, e), new z(this.h, this.s, this.l * e, this.opacity);
|
|
1367
1367
|
},
|
|
@@ -1369,11 +1369,11 @@ $e(z, er, rt(ee, {
|
|
|
1369
1369
|
return e = e == null ? Z : Math.pow(Z, e), new z(this.h, this.s, this.l * e, this.opacity);
|
|
1370
1370
|
},
|
|
1371
1371
|
rgb() {
|
|
1372
|
-
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s,
|
|
1372
|
+
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, s = 2 * n - r;
|
|
1373
1373
|
return new j(
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1374
|
+
be(e >= 240 ? e - 240 : e + 120, s, r),
|
|
1375
|
+
be(e, s, r),
|
|
1376
|
+
be(e < 120 ? e + 240 : e - 120, s, r),
|
|
1377
1377
|
this.opacity
|
|
1378
1378
|
);
|
|
1379
1379
|
},
|
|
@@ -1394,140 +1394,140 @@ function Ke(e) {
|
|
|
1394
1394
|
function ae(e) {
|
|
1395
1395
|
return Math.max(0, Math.min(1, e || 0));
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return (e < 60 ? t + (
|
|
1397
|
+
function be(e, t, n) {
|
|
1398
|
+
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
1399
1399
|
}
|
|
1400
1400
|
const Le = (e) => () => e;
|
|
1401
|
-
function
|
|
1402
|
-
return function(
|
|
1403
|
-
return e +
|
|
1401
|
+
function tn(e, t) {
|
|
1402
|
+
return function(n) {
|
|
1403
|
+
return e + n * t;
|
|
1404
1404
|
};
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
return e = Math.pow(e,
|
|
1408
|
-
return Math.pow(e +
|
|
1406
|
+
function nn(e, t, n) {
|
|
1407
|
+
return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
|
|
1408
|
+
return Math.pow(e + r * t, n);
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return (e = +e) == 1 ? st : function(t,
|
|
1413
|
-
return
|
|
1411
|
+
function rn(e) {
|
|
1412
|
+
return (e = +e) == 1 ? st : function(t, n) {
|
|
1413
|
+
return n - t ? nn(t, n, e) : Le(isNaN(t) ? n : t);
|
|
1414
1414
|
};
|
|
1415
1415
|
}
|
|
1416
1416
|
function st(e, t) {
|
|
1417
|
-
var
|
|
1418
|
-
return
|
|
1417
|
+
var n = t - e;
|
|
1418
|
+
return n ? tn(e, n) : Le(isNaN(e) ? t : e);
|
|
1419
1419
|
}
|
|
1420
1420
|
const Ye = function e(t) {
|
|
1421
|
-
var
|
|
1422
|
-
function
|
|
1423
|
-
var l =
|
|
1421
|
+
var n = rn(t);
|
|
1422
|
+
function r(s, a) {
|
|
1423
|
+
var l = n((s = Ae(s)).r, (a = Ae(a)).r), c = n(s.g, a.g), d = n(s.b, a.b), o = st(s.opacity, a.opacity);
|
|
1424
1424
|
return function(u) {
|
|
1425
1425
|
return s.r = l(u), s.g = c(u), s.b = d(u), s.opacity = o(u), s + "";
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
|
-
return
|
|
1428
|
+
return r.gamma = e, r;
|
|
1429
1429
|
}(1);
|
|
1430
|
-
function
|
|
1430
|
+
function sn(e, t) {
|
|
1431
1431
|
t || (t = []);
|
|
1432
|
-
var
|
|
1432
|
+
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), s;
|
|
1433
1433
|
return function(a) {
|
|
1434
|
-
for (s = 0; s <
|
|
1435
|
-
return
|
|
1434
|
+
for (s = 0; s < n; ++s) r[s] = e[s] * (1 - a) + t[s] * a;
|
|
1435
|
+
return r;
|
|
1436
1436
|
};
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function an(e) {
|
|
1439
1439
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1442
|
-
var
|
|
1443
|
-
for (l = 0; l <
|
|
1444
|
-
for (; l <
|
|
1441
|
+
function ln(e, t) {
|
|
1442
|
+
var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, s = new Array(r), a = new Array(n), l;
|
|
1443
|
+
for (l = 0; l < r; ++l) s[l] = Te(e[l], t[l]);
|
|
1444
|
+
for (; l < n; ++l) a[l] = t[l];
|
|
1445
1445
|
return function(c) {
|
|
1446
|
-
for (l = 0; l <
|
|
1446
|
+
for (l = 0; l < r; ++l) a[l] = s[l](c);
|
|
1447
1447
|
return a;
|
|
1448
1448
|
};
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1451
|
-
var
|
|
1452
|
-
return e = +e, t = +t, function(
|
|
1453
|
-
return
|
|
1450
|
+
function on(e, t) {
|
|
1451
|
+
var n = /* @__PURE__ */ new Date();
|
|
1452
|
+
return e = +e, t = +t, function(r) {
|
|
1453
|
+
return n.setTime(e * (1 - r) + t * r), n;
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
1456
|
function fe(e, t) {
|
|
1457
|
-
return e = +e, t = +t, function(
|
|
1458
|
-
return e * (1 -
|
|
1457
|
+
return e = +e, t = +t, function(n) {
|
|
1458
|
+
return e * (1 - n) + t * n;
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
var
|
|
1461
|
+
function cn(e, t) {
|
|
1462
|
+
var n = {}, r = {}, s;
|
|
1463
1463
|
(e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
|
|
1464
1464
|
for (s in t)
|
|
1465
|
-
s in e ?
|
|
1465
|
+
s in e ? n[s] = Te(e[s], t[s]) : r[s] = t[s];
|
|
1466
1466
|
return function(a) {
|
|
1467
|
-
for (s in
|
|
1468
|
-
return
|
|
1467
|
+
for (s in n) r[s] = n[s](a);
|
|
1468
|
+
return r;
|
|
1469
1469
|
};
|
|
1470
1470
|
}
|
|
1471
|
-
var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
1472
|
-
function
|
|
1471
|
+
var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, ge = new RegExp(Se.source, "g");
|
|
1472
|
+
function dn(e) {
|
|
1473
1473
|
return function() {
|
|
1474
1474
|
return e;
|
|
1475
1475
|
};
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function un(e) {
|
|
1478
1478
|
return function(t) {
|
|
1479
1479
|
return e(t) + "";
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1483
|
-
var
|
|
1484
|
-
for (e = e + "", t = t + ""; (
|
|
1485
|
-
(a = s.index) >
|
|
1486
|
-
return
|
|
1482
|
+
function fn(e, t) {
|
|
1483
|
+
var n = Se.lastIndex = ge.lastIndex = 0, r, s, a, l = -1, c = [], d = [];
|
|
1484
|
+
for (e = e + "", t = t + ""; (r = Se.exec(e)) && (s = ge.exec(t)); )
|
|
1485
|
+
(a = s.index) > n && (a = t.slice(n, a), c[l] ? c[l] += a : c[++l] = a), (r = r[0]) === (s = s[0]) ? c[l] ? c[l] += s : c[++l] = s : (c[++l] = null, d.push({ i: l, x: fe(r, s) })), n = ge.lastIndex;
|
|
1486
|
+
return n < t.length && (a = t.slice(n), c[l] ? c[l] += a : c[++l] = a), c.length < 2 ? d[0] ? un(d[0].x) : dn(t) : (t = d.length, function(o) {
|
|
1487
1487
|
for (var u = 0, f; u < t; ++u) c[(f = d[u]).i] = f.x(o);
|
|
1488
1488
|
return c.join("");
|
|
1489
1489
|
});
|
|
1490
1490
|
}
|
|
1491
1491
|
function Te(e, t) {
|
|
1492
|
-
var
|
|
1493
|
-
return t == null ||
|
|
1492
|
+
var n = typeof t, r;
|
|
1493
|
+
return t == null || n === "boolean" ? Le(t) : (n === "number" ? fe : n === "string" ? (r = P(t)) ? (t = r, Ye) : fn : t instanceof P ? Ye : t instanceof Date ? on : an(t) ? sn : Array.isArray(t) ? ln : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? cn : fe)(e, t);
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1496
|
-
return e = +e, t = +t, function(
|
|
1497
|
-
return Math.round(e * (1 -
|
|
1495
|
+
function mn(e, t) {
|
|
1496
|
+
return e = +e, t = +t, function(n) {
|
|
1497
|
+
return Math.round(e * (1 - n) + t * n);
|
|
1498
1498
|
};
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function xn(e) {
|
|
1501
1501
|
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
1502
1502
|
}
|
|
1503
1503
|
function me(e, t) {
|
|
1504
|
-
if ((
|
|
1505
|
-
var
|
|
1504
|
+
if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
|
|
1505
|
+
var n, r = e.slice(0, n);
|
|
1506
1506
|
return [
|
|
1507
|
-
|
|
1508
|
-
+e.slice(
|
|
1507
|
+
r.length > 1 ? r[0] + r.slice(2) : r,
|
|
1508
|
+
+e.slice(n + 1)
|
|
1509
1509
|
];
|
|
1510
1510
|
}
|
|
1511
1511
|
function Q(e) {
|
|
1512
1512
|
return e = me(Math.abs(e)), e ? e[1] : NaN;
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1515
|
-
return function(
|
|
1516
|
-
for (var s =
|
|
1514
|
+
function hn(e, t) {
|
|
1515
|
+
return function(n, r) {
|
|
1516
|
+
for (var s = n.length, a = [], l = 0, c = e[0], d = 0; s > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), a.push(n.substring(s -= c, s + c)), !((d += c + 1) > r)); )
|
|
1517
1517
|
c = e[l = (l + 1) % e.length];
|
|
1518
1518
|
return a.reverse().join(t);
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1521
|
+
function yn(e) {
|
|
1522
1522
|
return function(t) {
|
|
1523
|
-
return t.replace(/[0-9]/g, function(
|
|
1524
|
-
return e[+
|
|
1523
|
+
return t.replace(/[0-9]/g, function(n) {
|
|
1524
|
+
return e[+n];
|
|
1525
1525
|
});
|
|
1526
1526
|
};
|
|
1527
1527
|
}
|
|
1528
|
-
var
|
|
1528
|
+
var pn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
1529
1529
|
function xe(e) {
|
|
1530
|
-
if (!(t =
|
|
1530
|
+
if (!(t = pn.exec(e))) throw new Error("invalid format: " + e);
|
|
1531
1531
|
var t;
|
|
1532
1532
|
return new Fe({
|
|
1533
1533
|
fill: t[1],
|
|
@@ -1549,47 +1549,47 @@ function Fe(e) {
|
|
|
1549
1549
|
Fe.prototype.toString = function() {
|
|
1550
1550
|
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;
|
|
1551
1551
|
};
|
|
1552
|
-
function
|
|
1553
|
-
e: for (var t = e.length,
|
|
1554
|
-
switch (e[
|
|
1552
|
+
function vn(e) {
|
|
1553
|
+
e: for (var t = e.length, n = 1, r = -1, s; n < t; ++n)
|
|
1554
|
+
switch (e[n]) {
|
|
1555
1555
|
case ".":
|
|
1556
|
-
|
|
1556
|
+
r = s = n;
|
|
1557
1557
|
break;
|
|
1558
1558
|
case "0":
|
|
1559
|
-
|
|
1559
|
+
r === 0 && (r = n), s = n;
|
|
1560
1560
|
break;
|
|
1561
1561
|
default:
|
|
1562
|
-
if (!+e[
|
|
1563
|
-
|
|
1562
|
+
if (!+e[n]) break e;
|
|
1563
|
+
r > 0 && (r = 0);
|
|
1564
1564
|
break;
|
|
1565
1565
|
}
|
|
1566
|
-
return
|
|
1566
|
+
return r > 0 ? e.slice(0, r) + e.slice(s + 1) : e;
|
|
1567
1567
|
}
|
|
1568
1568
|
var it;
|
|
1569
|
-
function
|
|
1570
|
-
var
|
|
1571
|
-
if (!
|
|
1572
|
-
var
|
|
1573
|
-
return a === l ?
|
|
1569
|
+
function bn(e, t) {
|
|
1570
|
+
var n = me(e, t);
|
|
1571
|
+
if (!n) return e + "";
|
|
1572
|
+
var r = n[0], s = n[1], a = s - (it = Math.max(-8, Math.min(8, Math.floor(s / 3))) * 3) + 1, l = r.length;
|
|
1573
|
+
return a === l ? r : a > l ? r + new Array(a - l + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + me(e, Math.max(0, t + a - 1))[0];
|
|
1574
1574
|
}
|
|
1575
1575
|
function We(e, t) {
|
|
1576
|
-
var
|
|
1577
|
-
if (!
|
|
1578
|
-
var
|
|
1579
|
-
return s < 0 ? "0." + new Array(-s).join("0") +
|
|
1576
|
+
var n = me(e, t);
|
|
1577
|
+
if (!n) return e + "";
|
|
1578
|
+
var r = n[0], s = n[1];
|
|
1579
|
+
return s < 0 ? "0." + new Array(-s).join("0") + r : r.length > s + 1 ? r.slice(0, s + 1) + "." + r.slice(s + 1) : r + new Array(s - r.length + 2).join("0");
|
|
1580
1580
|
}
|
|
1581
1581
|
const Xe = {
|
|
1582
1582
|
"%": (e, t) => (e * 100).toFixed(t),
|
|
1583
1583
|
b: (e) => Math.round(e).toString(2),
|
|
1584
1584
|
c: (e) => e + "",
|
|
1585
|
-
d:
|
|
1585
|
+
d: xn,
|
|
1586
1586
|
e: (e, t) => e.toExponential(t),
|
|
1587
1587
|
f: (e, t) => e.toFixed(t),
|
|
1588
1588
|
g: (e, t) => e.toPrecision(t),
|
|
1589
1589
|
o: (e) => Math.round(e).toString(8),
|
|
1590
1590
|
p: (e, t) => We(e * 100, t),
|
|
1591
1591
|
r: We,
|
|
1592
|
-
s:
|
|
1592
|
+
s: bn,
|
|
1593
1593
|
X: (e) => Math.round(e).toString(16).toUpperCase(),
|
|
1594
1594
|
x: (e) => Math.round(e).toString(16)
|
|
1595
1595
|
};
|
|
@@ -1597,22 +1597,22 @@ function Qe(e) {
|
|
|
1597
1597
|
return e;
|
|
1598
1598
|
}
|
|
1599
1599
|
var Ze = Array.prototype.map, Je = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
1600
|
-
function
|
|
1601
|
-
var t = e.grouping === void 0 || e.thousands === void 0 ? Qe :
|
|
1600
|
+
function gn(e) {
|
|
1601
|
+
var t = e.grouping === void 0 || e.thousands === void 0 ? Qe : hn(Ze.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", s = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? Qe : yn(Ze.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
|
|
1602
1602
|
function o(f) {
|
|
1603
1603
|
f = xe(f);
|
|
1604
|
-
var m = f.fill,
|
|
1605
|
-
|
|
1606
|
-
var
|
|
1607
|
-
h = h === void 0 ? 6 : /[gprs]/.test(
|
|
1604
|
+
var m = f.fill, w = f.align, x = f.sign, v = f.symbol, p = f.zero, S = f.width, k = f.comma, h = f.precision, y = f.trim, g = f.type;
|
|
1605
|
+
g === "n" ? (k = !0, g = "g") : Xe[g] || (h === void 0 && (h = 12), y = !0, g = "g"), (p || m === "0" && w === "=") && (p = !0, m = "0", w = "=");
|
|
1606
|
+
var N = v === "$" ? n : v === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", A = v === "$" ? r : /[%p]/.test(g) ? l : "", $ = Xe[g], L = /[defgprs%]/.test(g);
|
|
1607
|
+
h = h === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
|
|
1608
1608
|
function F(M) {
|
|
1609
|
-
var
|
|
1610
|
-
if (
|
|
1611
|
-
E =
|
|
1609
|
+
var H = N, E = A, Y, Ee, te;
|
|
1610
|
+
if (g === "c")
|
|
1611
|
+
E = $(M) + E, M = "";
|
|
1612
1612
|
else {
|
|
1613
1613
|
M = +M;
|
|
1614
|
-
var
|
|
1615
|
-
if (M = isNaN(M) ? d :
|
|
1614
|
+
var ne = M < 0 || 1 / M < 0;
|
|
1615
|
+
if (M = isNaN(M) ? d : $(Math.abs(M), h), y && (M = vn(M)), ne && +M == 0 && x !== "+" && (ne = !1), H = (ne ? x === "(" ? x : c : x === "-" || x === "(" ? "" : x) + H, E = (g === "s" ? Je[8 + it / 3] : "") + E + (ne && x === "(" ? ")" : ""), L) {
|
|
1616
1616
|
for (Y = -1, Ee = M.length; ++Y < Ee; )
|
|
1617
1617
|
if (te = M.charCodeAt(Y), 48 > te || te > 57) {
|
|
1618
1618
|
E = (te === 46 ? s + M.slice(Y + 1) : M.slice(Y)) + E, M = M.slice(0, Y);
|
|
@@ -1620,20 +1620,20 @@ function gr(e) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
|
|
1624
|
-
var
|
|
1625
|
-
switch (
|
|
1623
|
+
k && !p && (M = t(M, 1 / 0));
|
|
1624
|
+
var re = H.length + M.length + E.length, I = re < S ? new Array(S - re + 1).join(m) : "";
|
|
1625
|
+
switch (k && p && (M = t(I + M, I.length ? S - E.length : 1 / 0), I = ""), w) {
|
|
1626
1626
|
case "<":
|
|
1627
|
-
M =
|
|
1627
|
+
M = H + M + E + I;
|
|
1628
1628
|
break;
|
|
1629
1629
|
case "=":
|
|
1630
|
-
M =
|
|
1630
|
+
M = H + I + M + E;
|
|
1631
1631
|
break;
|
|
1632
1632
|
case "^":
|
|
1633
|
-
M = I.slice(0,
|
|
1633
|
+
M = I.slice(0, re = I.length >> 1) + H + M + E + I.slice(re);
|
|
1634
1634
|
break;
|
|
1635
1635
|
default:
|
|
1636
|
-
M = I +
|
|
1636
|
+
M = I + H + M + E;
|
|
1637
1637
|
break;
|
|
1638
1638
|
}
|
|
1639
1639
|
return a(M);
|
|
@@ -1643,9 +1643,9 @@ function gr(e) {
|
|
|
1643
1643
|
}, F;
|
|
1644
1644
|
}
|
|
1645
1645
|
function u(f, m) {
|
|
1646
|
-
var
|
|
1646
|
+
var w = o((f = xe(f), f.type = "f", f)), x = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, v = Math.pow(10, -x), p = Je[8 + x / 3];
|
|
1647
1647
|
return function(S) {
|
|
1648
|
-
return
|
|
1648
|
+
return w(v * S) + p;
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
1651
1651
|
return {
|
|
@@ -1654,21 +1654,21 @@ function gr(e) {
|
|
|
1654
1654
|
};
|
|
1655
1655
|
}
|
|
1656
1656
|
var le, at, lt;
|
|
1657
|
-
|
|
1657
|
+
wn({
|
|
1658
1658
|
thousands: ",",
|
|
1659
1659
|
grouping: [3],
|
|
1660
1660
|
currency: ["$", ""]
|
|
1661
1661
|
});
|
|
1662
|
-
function
|
|
1663
|
-
return le =
|
|
1662
|
+
function wn(e) {
|
|
1663
|
+
return le = gn(e), at = le.format, lt = le.formatPrefix, le;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function Nn(e) {
|
|
1666
1666
|
return Math.max(0, -Q(Math.abs(e)));
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function An(e, t) {
|
|
1669
1669
|
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Q(t) / 3))) * 3 - Q(Math.abs(e)));
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function Sn(e, t) {
|
|
1672
1672
|
return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Q(t) - Q(e)) + 1;
|
|
1673
1673
|
}
|
|
1674
1674
|
function je(e, t) {
|
|
@@ -1686,14 +1686,14 @@ function je(e, t) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
const Pe = Symbol("implicit");
|
|
1688
1688
|
function ot() {
|
|
1689
|
-
var e = new He(), t = [],
|
|
1689
|
+
var e = new He(), t = [], n = [], r = Pe;
|
|
1690
1690
|
function s(a) {
|
|
1691
1691
|
let l = e.get(a);
|
|
1692
1692
|
if (l === void 0) {
|
|
1693
|
-
if (
|
|
1693
|
+
if (r !== Pe) return r;
|
|
1694
1694
|
e.set(a, l = t.push(a) - 1);
|
|
1695
1695
|
}
|
|
1696
|
-
return
|
|
1696
|
+
return n[l % n.length];
|
|
1697
1697
|
}
|
|
1698
1698
|
return s.domain = function(a) {
|
|
1699
1699
|
if (!arguments.length) return t.slice();
|
|
@@ -1702,19 +1702,19 @@ function ot() {
|
|
|
1702
1702
|
e.has(l) || e.set(l, t.push(l) - 1);
|
|
1703
1703
|
return s;
|
|
1704
1704
|
}, s.range = function(a) {
|
|
1705
|
-
return arguments.length ? (
|
|
1705
|
+
return arguments.length ? (n = Array.from(a), s) : n.slice();
|
|
1706
1706
|
}, s.unknown = function(a) {
|
|
1707
|
-
return arguments.length ? (
|
|
1707
|
+
return arguments.length ? (r = a, s) : r;
|
|
1708
1708
|
}, s.copy = function() {
|
|
1709
|
-
return ot(t,
|
|
1709
|
+
return ot(t, n).unknown(r);
|
|
1710
1710
|
}, je.apply(s, arguments), s;
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function Mn(e) {
|
|
1713
1713
|
return function() {
|
|
1714
1714
|
return e;
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function kn(e) {
|
|
1718
1718
|
return +e;
|
|
1719
1719
|
}
|
|
1720
1720
|
var Ce = [0, 1];
|
|
@@ -1722,101 +1722,101 @@ function W(e) {
|
|
|
1722
1722
|
return e;
|
|
1723
1723
|
}
|
|
1724
1724
|
function Me(e, t) {
|
|
1725
|
-
return (t -= e = +e) ? function(
|
|
1726
|
-
return (
|
|
1727
|
-
} :
|
|
1728
|
-
}
|
|
1729
|
-
function
|
|
1730
|
-
var
|
|
1731
|
-
return e > t && (
|
|
1732
|
-
return Math.max(e, Math.min(t,
|
|
1725
|
+
return (t -= e = +e) ? function(n) {
|
|
1726
|
+
return (n - e) / t;
|
|
1727
|
+
} : Mn(isNaN(t) ? NaN : 0.5);
|
|
1728
|
+
}
|
|
1729
|
+
function $n(e, t) {
|
|
1730
|
+
var n;
|
|
1731
|
+
return e > t && (n = e, e = t, t = n), function(r) {
|
|
1732
|
+
return Math.max(e, Math.min(t, r));
|
|
1733
1733
|
};
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1736
|
-
var
|
|
1737
|
-
return s <
|
|
1738
|
-
return a(
|
|
1735
|
+
function Ln(e, t, n) {
|
|
1736
|
+
var r = e[0], s = e[1], a = t[0], l = t[1];
|
|
1737
|
+
return s < r ? (r = Me(s, r), a = n(l, a)) : (r = Me(r, s), a = n(a, l)), function(c) {
|
|
1738
|
+
return a(r(c));
|
|
1739
1739
|
};
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1742
|
-
var
|
|
1743
|
-
for (e[
|
|
1744
|
-
s[l] = Me(e[l], e[l + 1]), a[l] =
|
|
1741
|
+
function Tn(e, t, n) {
|
|
1742
|
+
var r = Math.min(e.length, t.length) - 1, s = new Array(r), a = new Array(r), l = -1;
|
|
1743
|
+
for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++l < r; )
|
|
1744
|
+
s[l] = Me(e[l], e[l + 1]), a[l] = n(t[l], t[l + 1]);
|
|
1745
1745
|
return function(c) {
|
|
1746
|
-
var d = tt(e, c, 1,
|
|
1746
|
+
var d = tt(e, c, 1, r) - 1;
|
|
1747
1747
|
return a[d](s[d](c));
|
|
1748
1748
|
};
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Fn(e, t) {
|
|
1751
1751
|
return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1754
|
-
var e = Ce, t = Ce,
|
|
1753
|
+
function jn() {
|
|
1754
|
+
var e = Ce, t = Ce, n = Te, r, s, a, l = W, c, d, o;
|
|
1755
1755
|
function u() {
|
|
1756
1756
|
var m = Math.min(e.length, t.length);
|
|
1757
|
-
return l !== W && (l =
|
|
1757
|
+
return l !== W && (l = $n(e[0], e[m - 1])), c = m > 2 ? Tn : Ln, d = o = null, f;
|
|
1758
1758
|
}
|
|
1759
1759
|
function f(m) {
|
|
1760
|
-
return m == null || isNaN(m = +m) ? a : (d || (d = c(e.map(
|
|
1760
|
+
return m == null || isNaN(m = +m) ? a : (d || (d = c(e.map(r), t, n)))(r(l(m)));
|
|
1761
1761
|
}
|
|
1762
1762
|
return f.invert = function(m) {
|
|
1763
|
-
return l(s((o || (o = c(t, e.map(
|
|
1763
|
+
return l(s((o || (o = c(t, e.map(r), fe)))(m)));
|
|
1764
1764
|
}, f.domain = function(m) {
|
|
1765
|
-
return arguments.length ? (e = Array.from(m,
|
|
1765
|
+
return arguments.length ? (e = Array.from(m, kn), u()) : e.slice();
|
|
1766
1766
|
}, f.range = function(m) {
|
|
1767
1767
|
return arguments.length ? (t = Array.from(m), u()) : t.slice();
|
|
1768
1768
|
}, f.rangeRound = function(m) {
|
|
1769
|
-
return t = Array.from(m),
|
|
1769
|
+
return t = Array.from(m), n = mn, u();
|
|
1770
1770
|
}, f.clamp = function(m) {
|
|
1771
1771
|
return arguments.length ? (l = m ? !0 : W, u()) : l !== W;
|
|
1772
1772
|
}, f.interpolate = function(m) {
|
|
1773
|
-
return arguments.length ? (
|
|
1773
|
+
return arguments.length ? (n = m, u()) : n;
|
|
1774
1774
|
}, f.unknown = function(m) {
|
|
1775
1775
|
return arguments.length ? (a = m, f) : a;
|
|
1776
|
-
}, function(m,
|
|
1777
|
-
return
|
|
1776
|
+
}, function(m, w) {
|
|
1777
|
+
return r = m, s = w, u();
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1780
|
+
function En() {
|
|
1781
|
+
return jn()(W, W);
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
var s =
|
|
1785
|
-
switch (
|
|
1783
|
+
function zn(e, t, n, r) {
|
|
1784
|
+
var s = Vt(e, t, n), a;
|
|
1785
|
+
switch (r = xe(r ?? ",f"), r.type) {
|
|
1786
1786
|
case "s": {
|
|
1787
1787
|
var l = Math.max(Math.abs(e), Math.abs(t));
|
|
1788
|
-
return
|
|
1788
|
+
return r.precision == null && !isNaN(a = An(s, l)) && (r.precision = a), lt(r, l);
|
|
1789
1789
|
}
|
|
1790
1790
|
case "":
|
|
1791
1791
|
case "e":
|
|
1792
1792
|
case "g":
|
|
1793
1793
|
case "p":
|
|
1794
1794
|
case "r": {
|
|
1795
|
-
|
|
1795
|
+
r.precision == null && !isNaN(a = Sn(s, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
1798
|
case "f":
|
|
1799
1799
|
case "%": {
|
|
1800
|
-
|
|
1800
|
+
r.precision == null && !isNaN(a = Nn(s)) && (r.precision = a - (r.type === "%") * 2);
|
|
1801
1801
|
break;
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
|
-
return at(
|
|
1804
|
+
return at(r);
|
|
1805
1805
|
}
|
|
1806
1806
|
function ct(e) {
|
|
1807
1807
|
var t = e.domain;
|
|
1808
|
-
return e.ticks = function(
|
|
1809
|
-
var
|
|
1810
|
-
return
|
|
1811
|
-
}, e.tickFormat = function(
|
|
1808
|
+
return e.ticks = function(n) {
|
|
1809
|
+
var r = t();
|
|
1810
|
+
return qt(r[0], r[r.length - 1], n ?? 10);
|
|
1811
|
+
}, e.tickFormat = function(n, r) {
|
|
1812
1812
|
var s = t();
|
|
1813
|
-
return
|
|
1814
|
-
}, e.nice = function(
|
|
1815
|
-
|
|
1816
|
-
var
|
|
1813
|
+
return zn(s[0], s[s.length - 1], n ?? 10, r);
|
|
1814
|
+
}, e.nice = function(n) {
|
|
1815
|
+
n == null && (n = 10);
|
|
1816
|
+
var r = t(), s = 0, a = r.length - 1, l = r[s], c = r[a], d, o, u = 10;
|
|
1817
1817
|
for (c < l && (o = l, l = c, c = o, o = s, s = a, a = o); u-- > 0; ) {
|
|
1818
|
-
if (o = Ne(l, c,
|
|
1819
|
-
return
|
|
1818
|
+
if (o = Ne(l, c, n), o === d)
|
|
1819
|
+
return r[s] = l, r[a] = c, t(r);
|
|
1820
1820
|
if (o > 0)
|
|
1821
1821
|
l = Math.floor(l / o) * o, c = Math.ceil(c / o) * o;
|
|
1822
1822
|
else if (o < 0)
|
|
@@ -1828,53 +1828,53 @@ function ct(e) {
|
|
|
1828
1828
|
return e;
|
|
1829
1829
|
}, e;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
var e =
|
|
1831
|
+
function Rn() {
|
|
1832
|
+
var e = En();
|
|
1833
1833
|
return e.copy = function() {
|
|
1834
|
-
return
|
|
1834
|
+
return Fn(e, Rn());
|
|
1835
1835
|
}, je.apply(e, arguments), ct(e);
|
|
1836
1836
|
}
|
|
1837
1837
|
function dt() {
|
|
1838
|
-
var e = 0, t = 1,
|
|
1838
|
+
var e = 0, t = 1, n = 1, r = [0.5], s = [0, 1], a;
|
|
1839
1839
|
function l(d) {
|
|
1840
|
-
return d != null && d <= d ? s[tt(
|
|
1840
|
+
return d != null && d <= d ? s[tt(r, d, 0, n)] : a;
|
|
1841
1841
|
}
|
|
1842
1842
|
function c() {
|
|
1843
1843
|
var d = -1;
|
|
1844
|
-
for (
|
|
1844
|
+
for (r = new Array(n); ++d < n; ) r[d] = ((d + 1) * t - (d - n) * e) / (n + 1);
|
|
1845
1845
|
return l;
|
|
1846
1846
|
}
|
|
1847
1847
|
return l.domain = function(d) {
|
|
1848
1848
|
return arguments.length ? ([e, t] = d, e = +e, t = +t, c()) : [e, t];
|
|
1849
1849
|
}, l.range = function(d) {
|
|
1850
|
-
return arguments.length ? (
|
|
1850
|
+
return arguments.length ? (n = (s = Array.from(d)).length - 1, c()) : s.slice();
|
|
1851
1851
|
}, l.invertExtent = function(d) {
|
|
1852
1852
|
var o = s.indexOf(d);
|
|
1853
|
-
return o < 0 ? [NaN, NaN] : o < 1 ? [e,
|
|
1853
|
+
return o < 0 ? [NaN, NaN] : o < 1 ? [e, r[0]] : o >= n ? [r[n - 1], t] : [r[o - 1], r[o]];
|
|
1854
1854
|
}, l.unknown = function(d) {
|
|
1855
1855
|
return arguments.length && (a = d), l;
|
|
1856
1856
|
}, l.thresholds = function() {
|
|
1857
|
-
return
|
|
1857
|
+
return r.slice();
|
|
1858
1858
|
}, l.copy = function() {
|
|
1859
1859
|
return dt().domain([e, t]).range(s).unknown(a);
|
|
1860
1860
|
}, je.apply(ct(l), arguments);
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function Xn({
|
|
1863
1863
|
data: e,
|
|
1864
1864
|
chartConfig: t,
|
|
1865
|
-
displayConfig:
|
|
1866
|
-
queryObject:
|
|
1865
|
+
displayConfig: n = {},
|
|
1866
|
+
queryObject: r,
|
|
1867
1867
|
height: s = "100%",
|
|
1868
1868
|
colorPalette: a
|
|
1869
1869
|
}) {
|
|
1870
1870
|
const [l, c] = G(null), { getFieldLabel: d } = K();
|
|
1871
1871
|
try {
|
|
1872
1872
|
const o = {
|
|
1873
|
-
showTooltip: (
|
|
1874
|
-
showLegend: (
|
|
1873
|
+
showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
|
|
1874
|
+
showLegend: (n == null ? void 0 : n.showLegend) ?? !0
|
|
1875
1875
|
};
|
|
1876
1876
|
if (!e || e.length === 0)
|
|
1877
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
1877
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
1878
1878
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
1879
1879
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in treemap chart" })
|
|
1880
1880
|
] }) });
|
|
@@ -1882,94 +1882,82 @@ function Wr({
|
|
|
1882
1882
|
if (t != null && t.xAxis && (t != null && t.yAxis)) {
|
|
1883
1883
|
const h = t.xAxis[0], y = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
|
|
1884
1884
|
m = Array.isArray(t.series) ? t.series[0] : t.series;
|
|
1885
|
-
const
|
|
1885
|
+
const g = O(r, h);
|
|
1886
1886
|
if (m) {
|
|
1887
|
-
const
|
|
1888
|
-
const
|
|
1889
|
-
return typeof
|
|
1890
|
-
}).filter((
|
|
1891
|
-
if (f =
|
|
1892
|
-
|
|
1893
|
-
data: e,
|
|
1894
|
-
seriesValues: A,
|
|
1895
|
-
isNumericSeries: f,
|
|
1896
|
-
rawValues: e.map((w) => w[m])
|
|
1897
|
-
}), f) {
|
|
1898
|
-
const w = Math.min(...A), k = Math.max(...A), L = dt().domain([w, k]).range(se);
|
|
1887
|
+
const N = e.map((A) => {
|
|
1888
|
+
const $ = A[m];
|
|
1889
|
+
return typeof $ == "string" ? parseFloat($) : $;
|
|
1890
|
+
}).filter((A) => !isNaN(A));
|
|
1891
|
+
if (f = N.length === e.length && N.every((A) => typeof A == "number"), f) {
|
|
1892
|
+
const A = Math.min(...N), $ = Math.max(...N), L = dt().domain([A, $]).range(se);
|
|
1899
1893
|
u = e.map((F) => {
|
|
1900
|
-
const M = typeof F[m] == "string" ? parseFloat(F[m]) : F[m],
|
|
1901
|
-
return
|
|
1902
|
-
|
|
1903
|
-
seriesValue: M,
|
|
1904
|
-
color: R,
|
|
1905
|
-
minValue: w,
|
|
1906
|
-
maxValue: k
|
|
1907
|
-
}), {
|
|
1908
|
-
name: D(F[h], b) || String(F[h]) || "Unknown",
|
|
1894
|
+
const M = typeof F[m] == "string" ? parseFloat(F[m]) : F[m], H = L(M);
|
|
1895
|
+
return {
|
|
1896
|
+
name: R(F[h], g) || String(F[h]) || "Unknown",
|
|
1909
1897
|
size: typeof F[y] == "string" ? parseFloat(F[y]) : F[y] || 0,
|
|
1910
|
-
fill:
|
|
1898
|
+
fill: H,
|
|
1911
1899
|
series: String(F[m])
|
|
1912
1900
|
};
|
|
1913
1901
|
});
|
|
1914
1902
|
} else {
|
|
1915
|
-
const
|
|
1903
|
+
const A = [...new Set(e.map((L) => String(L[m])))], $ = ot().domain(A).range((a == null ? void 0 : a.colors) || T);
|
|
1916
1904
|
u = e.map((L) => ({
|
|
1917
|
-
name:
|
|
1905
|
+
name: R(L[h], g) || String(L[h]) || "Unknown",
|
|
1918
1906
|
size: typeof L[y] == "string" ? parseFloat(L[y]) : L[y] || 0,
|
|
1919
|
-
fill:
|
|
1907
|
+
fill: $(String(L[m])),
|
|
1920
1908
|
series: String(L[m])
|
|
1921
1909
|
}));
|
|
1922
1910
|
}
|
|
1923
1911
|
} else
|
|
1924
|
-
u = e.map((
|
|
1925
|
-
name:
|
|
1926
|
-
size: typeof
|
|
1927
|
-
fill: (a == null ? void 0 : a.colors) && a.colors[
|
|
1912
|
+
u = e.map((N, A) => ({
|
|
1913
|
+
name: R(N[h], g) || String(N[h]) || "Unknown",
|
|
1914
|
+
size: typeof N[y] == "string" ? parseFloat(N[y]) : N[y] || 0,
|
|
1915
|
+
fill: (a == null ? void 0 : a.colors) && a.colors[A % a.colors.length] || T[A % T.length]
|
|
1928
1916
|
}));
|
|
1929
1917
|
} else {
|
|
1930
|
-
const h = e[0], y = Object.keys(h),
|
|
1931
|
-
(
|
|
1932
|
-
) || y[0],
|
|
1933
|
-
(
|
|
1918
|
+
const h = e[0], y = Object.keys(h), g = y.find(
|
|
1919
|
+
(A) => typeof h[A] == "string" || A.toLowerCase().includes("name") || A.toLowerCase().includes("label") || A.toLowerCase().includes("category")
|
|
1920
|
+
) || y[0], N = y.find((A) => A.toLowerCase().includes("size")) || y.find(
|
|
1921
|
+
(A) => typeof h[A] == "number" && A !== g
|
|
1934
1922
|
) || y[1];
|
|
1935
|
-
if (!
|
|
1936
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */
|
|
1923
|
+
if (!N)
|
|
1924
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
1937
1925
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
1938
1926
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
|
|
1939
1927
|
] }) });
|
|
1940
|
-
u = e.map((
|
|
1941
|
-
let L =
|
|
1928
|
+
u = e.map((A, $) => {
|
|
1929
|
+
let L = A[g];
|
|
1942
1930
|
return typeof L == "boolean" ? L = L ? "Active" : "Inactive" : L === "true" || L === "false" ? L = L === "true" ? "Active" : "Inactive" : L = String(L), {
|
|
1943
1931
|
name: L,
|
|
1944
|
-
size: typeof
|
|
1945
|
-
fill: (a == null ? void 0 : a.colors) && a.colors[
|
|
1932
|
+
size: typeof A[N] == "string" ? parseFloat(A[N]) : A[N] || 0,
|
|
1933
|
+
fill: (a == null ? void 0 : a.colors) && a.colors[$ % a.colors.length] || T[$ % T.length]
|
|
1946
1934
|
};
|
|
1947
1935
|
});
|
|
1948
1936
|
}
|
|
1949
1937
|
if (u = u.filter((h) => h.size != null && h.size > 0), u.length === 0)
|
|
1950
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */
|
|
1938
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
1951
1939
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
|
|
1952
1940
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for treemap chart after transformation" })
|
|
1953
1941
|
] }) });
|
|
1954
|
-
const
|
|
1942
|
+
const w = (h) => {
|
|
1955
1943
|
var M;
|
|
1956
|
-
const { x: y, y:
|
|
1957
|
-
return
|
|
1944
|
+
const { x: y, y: g, width: N, height: A, index: $, name: L, size: F } = h;
|
|
1945
|
+
return N < 20 || A < 20 ? null : /* @__PURE__ */ b("g", { children: [
|
|
1958
1946
|
/* @__PURE__ */ i(
|
|
1959
1947
|
"rect",
|
|
1960
1948
|
{
|
|
1961
1949
|
x: y,
|
|
1962
|
-
y:
|
|
1963
|
-
width:
|
|
1964
|
-
height:
|
|
1950
|
+
y: g,
|
|
1951
|
+
width: N,
|
|
1952
|
+
height: A,
|
|
1965
1953
|
style: {
|
|
1966
|
-
fill: ((M = u[
|
|
1967
|
-
fillOpacity: l !== null ? l ===
|
|
1954
|
+
fill: ((M = u[$]) == null ? void 0 : M.fill) || (a == null ? void 0 : a.colors) && a.colors[$ % a.colors.length] || T[$ % T.length],
|
|
1955
|
+
fillOpacity: l !== null ? l === $ ? 1 : 0.6 : 0.8,
|
|
1968
1956
|
stroke: "#fff",
|
|
1969
1957
|
strokeWidth: 2,
|
|
1970
1958
|
cursor: "pointer"
|
|
1971
1959
|
},
|
|
1972
|
-
onMouseEnter: () => c(
|
|
1960
|
+
onMouseEnter: () => c($),
|
|
1973
1961
|
onMouseLeave: () => c(null)
|
|
1974
1962
|
}
|
|
1975
1963
|
),
|
|
@@ -1977,11 +1965,11 @@ function Wr({
|
|
|
1977
1965
|
"foreignObject",
|
|
1978
1966
|
{
|
|
1979
1967
|
x: y,
|
|
1980
|
-
y:
|
|
1981
|
-
width:
|
|
1982
|
-
height:
|
|
1968
|
+
y: g,
|
|
1969
|
+
width: N,
|
|
1970
|
+
height: A,
|
|
1983
1971
|
style: { pointerEvents: "none", overflow: "visible" },
|
|
1984
|
-
children: /* @__PURE__ */
|
|
1972
|
+
children: /* @__PURE__ */ b(
|
|
1985
1973
|
"div",
|
|
1986
1974
|
{
|
|
1987
1975
|
style: {
|
|
@@ -1999,26 +1987,26 @@ function Wr({
|
|
|
1999
1987
|
overflow: "hidden"
|
|
2000
1988
|
},
|
|
2001
1989
|
children: [
|
|
2002
|
-
|
|
1990
|
+
N > 40 && A > 30 && /* @__PURE__ */ i(
|
|
2003
1991
|
"div",
|
|
2004
1992
|
{
|
|
2005
1993
|
style: {
|
|
2006
|
-
fontSize: `${Math.max(10, Math.min(
|
|
1994
|
+
fontSize: `${Math.max(10, Math.min(N / 8, A / 8, 16))}px`,
|
|
2007
1995
|
fontWeight: "600",
|
|
2008
1996
|
textAlign: "center",
|
|
2009
1997
|
lineHeight: "1.2",
|
|
2010
|
-
marginBottom:
|
|
1998
|
+
marginBottom: N > 60 && A > 45 ? "4px" : "0",
|
|
2011
1999
|
wordBreak: "break-word",
|
|
2012
2000
|
hyphens: "auto"
|
|
2013
2001
|
},
|
|
2014
2002
|
children: L
|
|
2015
2003
|
}
|
|
2016
2004
|
),
|
|
2017
|
-
|
|
2005
|
+
N > 60 && A > 45 && /* @__PURE__ */ i(
|
|
2018
2006
|
"div",
|
|
2019
2007
|
{
|
|
2020
2008
|
style: {
|
|
2021
|
-
fontSize: `${Math.max(8, Math.min(
|
|
2009
|
+
fontSize: `${Math.max(8, Math.min(N / 10, A / 10, 14))}px`,
|
|
2022
2010
|
textAlign: "center",
|
|
2023
2011
|
opacity: 0.9
|
|
2024
2012
|
},
|
|
@@ -2033,39 +2021,30 @@ function Wr({
|
|
|
2033
2021
|
] });
|
|
2034
2022
|
}, v = u.some((h) => "series" in h) ? [...new Set(u.map((h) => h.series).filter(Boolean))] : [];
|
|
2035
2023
|
let p = [];
|
|
2036
|
-
if (o.showLegend && m)
|
|
2037
|
-
if (
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
}), f) {
|
|
2045
|
-
const h = Math.min(...e.map((b) => {
|
|
2046
|
-
const A = b[m];
|
|
2047
|
-
return typeof A == "string" ? parseFloat(A) : A;
|
|
2048
|
-
})), y = Math.max(...e.map((b) => {
|
|
2049
|
-
const A = b[m];
|
|
2050
|
-
return typeof A == "string" ? parseFloat(A) : A;
|
|
2024
|
+
if (o.showLegend && m)
|
|
2025
|
+
if (f) {
|
|
2026
|
+
const h = Math.min(...e.map((g) => {
|
|
2027
|
+
const N = g[m];
|
|
2028
|
+
return typeof N == "string" ? parseFloat(N) : N;
|
|
2029
|
+
})), y = Math.max(...e.map((g) => {
|
|
2030
|
+
const N = g[m];
|
|
2031
|
+
return typeof N == "string" ? parseFloat(N) : N;
|
|
2051
2032
|
}));
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2033
|
+
p = se.map((g, N) => {
|
|
2034
|
+
const A = N / (se.length - 1);
|
|
2054
2035
|
return {
|
|
2055
|
-
value: (h + (y - h) *
|
|
2036
|
+
value: (h + (y - h) * A).toFixed(2),
|
|
2056
2037
|
type: "rect",
|
|
2057
|
-
color:
|
|
2038
|
+
color: g
|
|
2058
2039
|
};
|
|
2059
2040
|
});
|
|
2060
|
-
} else v.length > 1 && (
|
|
2041
|
+
} else v.length > 1 && (p = v.map((h, y) => ({
|
|
2061
2042
|
value: h,
|
|
2062
2043
|
type: "rect",
|
|
2063
2044
|
color: T[y % T.length]
|
|
2064
2045
|
})));
|
|
2065
|
-
|
|
2066
|
-
}
|
|
2067
|
-
const S = o.showLegend && p.length > 0, $ = S ? typeof s == "string" && s.includes("%") ? s : typeof s == "number" ? s + 60 : `calc(${s} + 60px)` : s;
|
|
2068
|
-
return /* @__PURE__ */ g("div", { className: "w-full", style: { height: $ }, children: [
|
|
2046
|
+
const S = o.showLegend && p.length > 0, k = S ? typeof s == "string" && s.includes("%") ? s : typeof s == "number" ? s + 60 : `calc(${s} + 60px)` : s;
|
|
2047
|
+
return /* @__PURE__ */ b("div", { className: "w-full", style: { height: k }, children: [
|
|
2069
2048
|
/* @__PURE__ */ i(U, { height: S ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ i(
|
|
2070
2049
|
Lt,
|
|
2071
2050
|
{
|
|
@@ -2073,15 +2052,15 @@ function Wr({
|
|
|
2073
2052
|
dataKey: "size",
|
|
2074
2053
|
aspectRatio: 4 / 3,
|
|
2075
2054
|
stroke: "#fff",
|
|
2076
|
-
content: /* @__PURE__ */ i(
|
|
2077
|
-
children: o.showTooltip && /* @__PURE__ */ i(
|
|
2055
|
+
content: /* @__PURE__ */ i(w, {}),
|
|
2056
|
+
children: o.showTooltip && /* @__PURE__ */ i(q, {})
|
|
2078
2057
|
}
|
|
2079
2058
|
) }),
|
|
2080
2059
|
S && /* @__PURE__ */ i("div", { className: "flex justify-center items-center mt-4 pb-2", children: f ? (
|
|
2081
2060
|
// Gradient legend for numeric series
|
|
2082
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ b("div", { className: "flex flex-col items-center", children: [
|
|
2083
2062
|
/* @__PURE__ */ i("div", { className: "text-xs font-semibold text-gray-700 mb-2", children: m ? d(m) : "" }),
|
|
2084
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
|
|
2085
2064
|
/* @__PURE__ */ i("span", { className: "text-xs text-gray-600", children: Math.min(...e.map((h) => {
|
|
2086
2065
|
const y = h[m];
|
|
2087
2066
|
return typeof y == "string" ? parseFloat(y) : y;
|
|
@@ -2104,7 +2083,7 @@ function Wr({
|
|
|
2104
2083
|
] })
|
|
2105
2084
|
) : (
|
|
2106
2085
|
// Discrete legend for categorical series
|
|
2107
|
-
/* @__PURE__ */ i("div", { className: "flex flex-wrap justify-center gap-4", children: p.map((h, y) => /* @__PURE__ */
|
|
2086
|
+
/* @__PURE__ */ i("div", { className: "flex flex-wrap justify-center gap-4", children: p.map((h, y) => /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
|
|
2108
2087
|
/* @__PURE__ */ i(
|
|
2109
2088
|
"div",
|
|
2110
2089
|
{
|
|
@@ -2117,34 +2096,34 @@ function Wr({
|
|
|
2117
2096
|
) })
|
|
2118
2097
|
] });
|
|
2119
2098
|
} catch (o) {
|
|
2120
|
-
return
|
|
2099
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
2121
2100
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
|
|
2122
2101
|
/* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
|
|
2123
2102
|
/* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
|
|
2124
2103
|
] }) });
|
|
2125
2104
|
}
|
|
2126
2105
|
}
|
|
2127
|
-
function
|
|
2106
|
+
function Qn({
|
|
2128
2107
|
data: e,
|
|
2129
2108
|
chartConfig: t,
|
|
2130
|
-
height:
|
|
2109
|
+
height: n = 300
|
|
2131
2110
|
}) {
|
|
2132
|
-
const { getFieldLabel:
|
|
2111
|
+
const { getFieldLabel: r } = K();
|
|
2133
2112
|
if (!e || e.length === 0)
|
|
2134
|
-
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height:
|
|
2113
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: n }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
2135
2114
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
2136
2115
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "No data to display in table" })
|
|
2137
2116
|
] }) });
|
|
2138
2117
|
const s = Object.keys(e[0] || {}), a = t != null && t.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((l) => s.includes(l)) : s;
|
|
2139
|
-
return a.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height:
|
|
2118
|
+
return a.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: n }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
|
|
2140
2119
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
|
|
2141
2120
|
/* @__PURE__ */ i("div", { className: "text-xs", children: "Data structure is invalid" })
|
|
2142
|
-
] }) }) : /* @__PURE__ */ i("div", { className: "w-full overflow-auto", style: { height:
|
|
2121
|
+
] }) }) : /* @__PURE__ */ i("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ b("table", { className: "min-w-full divide-y divide-gray-200", children: [
|
|
2143
2122
|
/* @__PURE__ */ i("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ i("tr", { children: a.map((l) => /* @__PURE__ */ i(
|
|
2144
2123
|
"th",
|
|
2145
2124
|
{
|
|
2146
2125
|
className: "px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",
|
|
2147
|
-
children:
|
|
2126
|
+
children: r(l)
|
|
2148
2127
|
},
|
|
2149
2128
|
l
|
|
2150
2129
|
)) }) }),
|
|
@@ -2152,56 +2131,56 @@ function Xr({
|
|
|
2152
2131
|
"td",
|
|
2153
2132
|
{
|
|
2154
2133
|
className: "px-3 py-2 whitespace-nowrap text-sm text-gray-900",
|
|
2155
|
-
children:
|
|
2134
|
+
children: Dn(l[d])
|
|
2156
2135
|
},
|
|
2157
2136
|
d
|
|
2158
2137
|
)) }, c)) })
|
|
2159
2138
|
] }) });
|
|
2160
2139
|
}
|
|
2161
|
-
function
|
|
2140
|
+
function Dn(e) {
|
|
2162
2141
|
return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
|
|
2163
2142
|
}
|
|
2164
|
-
function
|
|
2165
|
-
const t =
|
|
2143
|
+
function Zn(e) {
|
|
2144
|
+
const t = Hn(e);
|
|
2166
2145
|
return {
|
|
2167
2146
|
portlets: e,
|
|
2168
2147
|
layouts: t
|
|
2169
2148
|
};
|
|
2170
2149
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const t = e.map((
|
|
2173
|
-
i:
|
|
2174
|
-
x:
|
|
2175
|
-
y:
|
|
2176
|
-
w:
|
|
2177
|
-
h:
|
|
2150
|
+
function Hn(e) {
|
|
2151
|
+
const t = e.map((n) => ({
|
|
2152
|
+
i: n.id,
|
|
2153
|
+
x: n.x,
|
|
2154
|
+
y: n.y,
|
|
2155
|
+
w: n.w,
|
|
2156
|
+
h: n.h,
|
|
2178
2157
|
minW: 3,
|
|
2179
2158
|
minH: 3
|
|
2180
2159
|
}));
|
|
2181
2160
|
return {
|
|
2182
2161
|
lg: t,
|
|
2183
|
-
md: t.map((
|
|
2184
|
-
sm: t.map((
|
|
2185
|
-
xs: t.map((
|
|
2186
|
-
xxs: t.map((
|
|
2162
|
+
md: t.map((n) => ({ ...n, w: Math.min(n.w, 8) })),
|
|
2163
|
+
sm: t.map((n) => ({ ...n, w: Math.min(n.w, 6) })),
|
|
2164
|
+
xs: t.map((n) => ({ ...n, w: Math.min(n.w, 4) })),
|
|
2165
|
+
xxs: t.map((n) => ({ ...n, w: 2 }))
|
|
2187
2166
|
};
|
|
2188
2167
|
}
|
|
2189
|
-
function
|
|
2190
|
-
const { formatNumbers:
|
|
2191
|
-
return
|
|
2168
|
+
function Jn(e, t = {}) {
|
|
2169
|
+
const { formatNumbers: n = !0, precision: r = 2 } = t;
|
|
2170
|
+
return n ? e.map((s) => {
|
|
2192
2171
|
const a = {};
|
|
2193
2172
|
for (const [l, c] of Object.entries(s))
|
|
2194
|
-
typeof c == "number" ? a[l] = Number(c.toFixed(
|
|
2173
|
+
typeof c == "number" ? a[l] = Number(c.toFixed(r)) : a[l] = c;
|
|
2195
2174
|
return a;
|
|
2196
2175
|
}) : e;
|
|
2197
2176
|
}
|
|
2198
|
-
function
|
|
2177
|
+
function Pn() {
|
|
2199
2178
|
return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2200
2179
|
}
|
|
2201
|
-
function
|
|
2180
|
+
function Cn(e, t = 6, n = 4) {
|
|
2202
2181
|
return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((s) => s.y + s.h)) };
|
|
2203
2182
|
}
|
|
2204
|
-
function
|
|
2183
|
+
function er(e) {
|
|
2205
2184
|
try {
|
|
2206
2185
|
const t = JSON.parse(e);
|
|
2207
2186
|
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 };
|
|
@@ -2209,7 +2188,7 @@ function Cr(e) {
|
|
|
2209
2188
|
return { valid: !1, error: "Invalid JSON format" };
|
|
2210
2189
|
}
|
|
2211
2190
|
}
|
|
2212
|
-
function
|
|
2191
|
+
function tr() {
|
|
2213
2192
|
return {
|
|
2214
2193
|
title: "Sample Chart",
|
|
2215
2194
|
query: JSON.stringify({
|
|
@@ -2233,37 +2212,37 @@ function en() {
|
|
|
2233
2212
|
};
|
|
2234
2213
|
}
|
|
2235
2214
|
export {
|
|
2236
|
-
|
|
2237
|
-
|
|
2215
|
+
_n as A,
|
|
2216
|
+
qn as B,
|
|
2238
2217
|
ve as C,
|
|
2239
|
-
|
|
2240
|
-
|
|
2218
|
+
Qn as D,
|
|
2219
|
+
Vn as L,
|
|
2241
2220
|
Tt as N,
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2221
|
+
Bn as P,
|
|
2222
|
+
Yn as R,
|
|
2223
|
+
Kn as S,
|
|
2224
|
+
Xn as T,
|
|
2225
|
+
Wn as a,
|
|
2226
|
+
Fn as b,
|
|
2227
|
+
Zn as c,
|
|
2249
2228
|
W as d,
|
|
2250
|
-
|
|
2251
|
-
|
|
2229
|
+
R as e,
|
|
2230
|
+
Jn as f,
|
|
2252
2231
|
O as g,
|
|
2253
|
-
|
|
2232
|
+
Rn as h,
|
|
2254
2233
|
je as i,
|
|
2255
2234
|
se as j,
|
|
2256
2235
|
T as k,
|
|
2257
2236
|
ct as l,
|
|
2258
2237
|
U as m,
|
|
2259
|
-
|
|
2238
|
+
Hn as n,
|
|
2260
2239
|
ot as o,
|
|
2261
|
-
|
|
2240
|
+
Pn as p,
|
|
2262
2241
|
dt as q,
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2242
|
+
Cn as r,
|
|
2243
|
+
tr as s,
|
|
2244
|
+
jn as t,
|
|
2266
2245
|
De as u,
|
|
2267
|
-
|
|
2246
|
+
er as v
|
|
2268
2247
|
};
|
|
2269
|
-
//# sourceMappingURL=charts-
|
|
2248
|
+
//# sourceMappingURL=charts-JUvTF2xT.js.map
|