drizzle-cube 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/compiler-CMwSRhTS.cjs +22 -0
- package/dist/adapters/{compiler-gcKytLwd.js → compiler-DrkCCzf0.js} +16 -11
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +8 -8
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +9 -9
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +11 -11
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +59 -59
- package/dist/client/charts/chartConfigs.d.ts +3 -1
- package/dist/client/charts.js +11 -11
- package/dist/client/chunks/{chart-activitygridchart-C1ts13cL.js → chart-activitygridchart-CUGN9Xq9.js} +848 -738
- package/dist/client/chunks/chart-activitygridchart-CUGN9Xq9.js.map +1 -0
- package/dist/client/chunks/chart-areachart-B4tknnsY.js +239 -0
- package/dist/client/chunks/chart-areachart-B4tknnsY.js.map +1 -0
- package/dist/client/chunks/{chart-areachart-config-0ICuIaRP.js → chart-areachart-config-D9pPUKHZ.js} +15 -2
- package/dist/client/chunks/chart-areachart-config-D9pPUKHZ.js.map +1 -0
- package/dist/client/chunks/chart-axisformatcontrols-Ch_IYF94.js +196 -0
- package/dist/client/chunks/chart-axisformatcontrols-Ch_IYF94.js.map +1 -0
- package/dist/client/chunks/chart-barchart-D_op06r-.js +216 -0
- package/dist/client/chunks/chart-barchart-D_op06r-.js.map +1 -0
- package/dist/client/chunks/{chart-barchart-config-DalFHdmP.js → chart-barchart-config-iniz62ni.js} +15 -2
- package/dist/client/chunks/chart-barchart-config-iniz62ni.js.map +1 -0
- package/dist/client/chunks/chart-bubblechart-BsaIXUbS.js +214 -0
- package/dist/client/chunks/chart-bubblechart-BsaIXUbS.js.map +1 -0
- package/dist/client/chunks/{chart-bubblechart-config-WjiDlqnP.js → chart-bubblechart-config-yLq2oyR3.js} +18 -4
- package/dist/client/chunks/{chart-bubblechart-config-WjiDlqnP.js.map → chart-bubblechart-config-yLq2oyR3.js.map} +1 -1
- package/dist/client/chunks/{chart-charttooltip-5tzcFRt0.js → chart-charttooltip-Bx3I8jQv.js} +4 -4
- package/dist/client/chunks/{chart-charttooltip-5tzcFRt0.js.map → chart-charttooltip-Bx3I8jQv.js.map} +1 -1
- package/dist/client/chunks/chart-datatable-C7MS9q4Y.js +283 -0
- package/dist/client/chunks/chart-datatable-C7MS9q4Y.js.map +1 -0
- package/dist/client/chunks/{chart-datatable-config-C7TgMD3u.js → chart-datatable-config-DmEA3A-7.js} +10 -2
- package/dist/client/chunks/{chart-datatable-config-C7TgMD3u.js.map → chart-datatable-config-DmEA3A-7.js.map} +1 -1
- package/dist/client/chunks/{chart-kpidelta-D_VuZaVL.js → chart-kpidelta-7-KOmb3w.js} +62 -60
- package/dist/client/chunks/chart-kpidelta-7-KOmb3w.js.map +1 -0
- package/dist/client/chunks/{chart-kpinumber-DeCkVi2e.js → chart-kpinumber-HOPfcK2N.js} +4 -4
- package/dist/client/chunks/{chart-kpinumber-DeCkVi2e.js.map → chart-kpinumber-HOPfcK2N.js.map} +1 -1
- package/dist/client/chunks/{chart-kpitext-D8OpA0CY.js → chart-kpitext-BZkC9u3A.js} +24 -24
- package/dist/client/chunks/{chart-kpitext-D8OpA0CY.js.map → chart-kpitext-BZkC9u3A.js.map} +1 -1
- package/dist/client/chunks/chart-linechart-DqFmLbRe.js +198 -0
- package/dist/client/chunks/chart-linechart-DqFmLbRe.js.map +1 -0
- package/dist/client/chunks/{chart-linechart-config-C5tpU_2u.js → chart-linechart-config-DLVS2Zxc.js} +17 -4
- package/dist/client/chunks/chart-linechart-config-DLVS2Zxc.js.map +1 -0
- package/dist/client/chunks/chart-markdownchart-9n_TemoB.js +256 -0
- package/dist/client/chunks/chart-markdownchart-9n_TemoB.js.map +1 -0
- package/dist/client/chunks/{chart-piechart-CiFJQtC8.js → chart-piechart-CrXFd9pE.js} +61 -55
- package/dist/client/chunks/chart-piechart-CrXFd9pE.js.map +1 -0
- package/dist/client/chunks/{chart-piechart-config-CtP_JkGm.js → chart-piechart-config-DgwOeKHr.js} +12 -4
- package/dist/client/chunks/{chart-piechart-config-CtP_JkGm.js.map → chart-piechart-config-DgwOeKHr.js.map} +1 -1
- package/dist/client/chunks/{chart-radarchart-config-BkD_6Khq.js → chart-radarchart-config-BAV8D5PR.js} +12 -4
- package/dist/client/chunks/{chart-radarchart-config-BkD_6Khq.js.map → chart-radarchart-config-BAV8D5PR.js.map} +1 -1
- package/dist/client/chunks/chart-radarchart-tar2GBkO.js +131 -0
- package/dist/client/chunks/chart-radarchart-tar2GBkO.js.map +1 -0
- package/dist/client/chunks/chart-radialbarchart-ab8Swtal.js +120 -0
- package/dist/client/chunks/chart-radialbarchart-ab8Swtal.js.map +1 -0
- package/dist/client/chunks/{chart-radialbarchart-config-CBZDlB2k.js → chart-radialbarchart-config-CKozBBEC.js} +10 -2
- package/dist/client/chunks/{chart-radialbarchart-config-CBZDlB2k.js.map → chart-radialbarchart-config-CKozBBEC.js.map} +1 -1
- package/dist/client/chunks/{chart-scatterchart-DeGqPbYm.js → chart-scatterchart-BP06BeU5.js} +89 -87
- package/dist/client/chunks/chart-scatterchart-BP06BeU5.js.map +1 -0
- package/dist/client/chunks/{chart-scatterchart-config-DsdmlpHr.js → chart-scatterchart-config-UdHmbZ3s.js} +18 -4
- package/dist/client/chunks/{chart-scatterchart-config-DsdmlpHr.js.map → chart-scatterchart-config-UdHmbZ3s.js.map} +1 -1
- package/dist/client/chunks/chart-treemapchart-DAiixITm.js +265 -0
- package/dist/client/chunks/chart-treemapchart-DAiixITm.js.map +1 -0
- package/dist/client/chunks/{chart-treemapchart-config-CdF9NvPP.js → chart-treemapchart-config-D17VOwTM.js} +12 -4
- package/dist/client/chunks/{chart-treemapchart-config-CdF9NvPP.js.map → chart-treemapchart-config-D17VOwTM.js.map} +1 -1
- package/dist/client/chunks/{charts-DY7pF_-4.js → charts-CHzWeaY1.js} +36 -36
- package/dist/client/chunks/charts-CHzWeaY1.js.map +1 -0
- package/dist/client/chunks/components-DnM9CCUS.js +13931 -0
- package/dist/client/chunks/components-DnM9CCUS.js.map +1 -0
- package/dist/client/chunks/{index-DH5abYWH.js → index-DlsvcKXf.js} +135 -135
- package/dist/client/chunks/index-DlsvcKXf.js.map +1 -0
- package/dist/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +25 -0
- package/dist/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +8 -6
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +2 -5
- package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +9 -0
- package/dist/client/components/AnalysisBuilder/SectionHeading.d.ts +12 -0
- package/dist/client/components/AnalysisBuilder/types.d.ts +38 -9
- package/dist/client/components/charts/AxisFormatControls.d.ts +35 -0
- package/dist/client/components.js +2 -2
- package/dist/client/hooks/useResponsiveDashboard.d.ts +2 -8
- package/dist/client/hooks.js +10 -10
- package/dist/client/hooks.js.map +1 -1
- package/dist/client/icons/types.d.ts +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/providers.js +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/types.d.ts +12 -0
- package/dist/client/utils/chartUtils.d.ts +20 -0
- package/dist/client/utils/pivotUtils.d.ts +11 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.js +16 -11
- package/package.json +4 -3
- package/dist/adapters/compiler-DP1pPIcg.cjs +0 -22
- package/dist/client/chunks/chart-activitygridchart-C1ts13cL.js.map +0 -1
- package/dist/client/chunks/chart-areachart-config-0ICuIaRP.js.map +0 -1
- package/dist/client/chunks/chart-areachart-fOi6lwUq.js +0 -204
- package/dist/client/chunks/chart-areachart-fOi6lwUq.js.map +0 -1
- package/dist/client/chunks/chart-barchart-CJfPZQin.js +0 -171
- package/dist/client/chunks/chart-barchart-CJfPZQin.js.map +0 -1
- package/dist/client/chunks/chart-barchart-config-DalFHdmP.js.map +0 -1
- package/dist/client/chunks/chart-bubblechart-BVk_qFly.js +0 -210
- package/dist/client/chunks/chart-bubblechart-BVk_qFly.js.map +0 -1
- package/dist/client/chunks/chart-datatable-BW_dWRbb.js +0 -249
- package/dist/client/chunks/chart-datatable-BW_dWRbb.js.map +0 -1
- package/dist/client/chunks/chart-kpidelta-D_VuZaVL.js.map +0 -1
- package/dist/client/chunks/chart-linechart-BdfBVl3m.js +0 -155
- package/dist/client/chunks/chart-linechart-BdfBVl3m.js.map +0 -1
- package/dist/client/chunks/chart-linechart-config-C5tpU_2u.js.map +0 -1
- package/dist/client/chunks/chart-markdownchart-C3FAQFuO.js +0 -254
- package/dist/client/chunks/chart-markdownchart-C3FAQFuO.js.map +0 -1
- package/dist/client/chunks/chart-piechart-CiFJQtC8.js.map +0 -1
- package/dist/client/chunks/chart-radarchart-CJ4kpk5J.js +0 -124
- package/dist/client/chunks/chart-radarchart-CJ4kpk5J.js.map +0 -1
- package/dist/client/chunks/chart-radialbarchart-DLQqN_1Z.js +0 -109
- package/dist/client/chunks/chart-radialbarchart-DLQqN_1Z.js.map +0 -1
- package/dist/client/chunks/chart-scatterchart-DeGqPbYm.js.map +0 -1
- package/dist/client/chunks/chart-treemapchart-ClXsAOjr.js +0 -253
- package/dist/client/chunks/chart-treemapchart-ClXsAOjr.js.map +0 -1
- package/dist/client/chunks/charts-DY7pF_-4.js.map +0 -1
- package/dist/client/chunks/components-DAOVOiM_.js +0 -13429
- package/dist/client/chunks/components-DAOVOiM_.js.map +0 -1
- package/dist/client/chunks/index-DH5abYWH.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as U, jsxs as yt } from "react/jsx-runtime";
|
|
2
|
+
import { useState as Q, useCallback as Tt, useEffect as bt, useContext as ln, createContext as fn, useMemo as ae, useRef as oe, useLayoutEffect as hn } from "react";
|
|
3
3
|
class dn {
|
|
4
4
|
apiUrl;
|
|
5
5
|
headers;
|
|
@@ -36,7 +36,7 @@ class dn {
|
|
|
36
36
|
throw new Error(s);
|
|
37
37
|
}
|
|
38
38
|
const o = await a.json();
|
|
39
|
-
return new
|
|
39
|
+
return new Dt(o);
|
|
40
40
|
}
|
|
41
41
|
async meta() {
|
|
42
42
|
const e = `${this.apiUrl}/meta`, n = await fetch(e, {
|
|
@@ -112,12 +112,12 @@ class dn {
|
|
|
112
112
|
throw new Error(a);
|
|
113
113
|
}
|
|
114
114
|
return (await r.json()).results.map((a) => !a.success && a.error ? {
|
|
115
|
-
...new
|
|
115
|
+
...new Dt({ data: [], annotation: {} }),
|
|
116
116
|
error: a.error
|
|
117
|
-
} : new
|
|
117
|
+
} : new Dt(a));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class Dt {
|
|
121
121
|
loadResponse;
|
|
122
122
|
constructor(e) {
|
|
123
123
|
this.loadResponse = e;
|
|
@@ -140,7 +140,7 @@ function mn(t, e = {}) {
|
|
|
140
140
|
}
|
|
141
141
|
const gn = 900 * 1e3;
|
|
142
142
|
let j = null;
|
|
143
|
-
function
|
|
143
|
+
function yn(t) {
|
|
144
144
|
const e = {};
|
|
145
145
|
return t.cubes.forEach((n) => {
|
|
146
146
|
n.measures.forEach((r) => {
|
|
@@ -152,26 +152,26 @@ function pn(t) {
|
|
|
152
152
|
});
|
|
153
153
|
}), e;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function pn() {
|
|
156
156
|
return j ? Date.now() - j.timestamp < gn : !1;
|
|
157
157
|
}
|
|
158
158
|
function xn(t) {
|
|
159
|
-
const [e, n] =
|
|
160
|
-
if (
|
|
159
|
+
const [e, n] = Q(null), [r, i] = Q({}), [a, o] = Q(!0), [s, c] = Q(null), u = Tt(async () => {
|
|
160
|
+
if (pn() && j) {
|
|
161
161
|
n(j.data), i(j.labelMap), o(!1), c(null);
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
try {
|
|
165
165
|
o(!0), c(null);
|
|
166
|
-
const l = await t.meta(),
|
|
166
|
+
const l = await t.meta(), h = yn(l);
|
|
167
167
|
j = {
|
|
168
168
|
data: l,
|
|
169
|
-
labelMap:
|
|
169
|
+
labelMap: h,
|
|
170
170
|
timestamp: Date.now()
|
|
171
|
-
}, n(l), i(
|
|
171
|
+
}, n(l), i(h);
|
|
172
172
|
} catch (l) {
|
|
173
|
-
const
|
|
174
|
-
c(
|
|
173
|
+
const h = l instanceof Error ? l.message : "Failed to fetch metadata";
|
|
174
|
+
c(h), console.error("Failed to fetch cube metadata:", l);
|
|
175
175
|
} finally {
|
|
176
176
|
o(!1);
|
|
177
177
|
}
|
|
@@ -179,7 +179,7 @@ function xn(t) {
|
|
|
179
179
|
bt(() => {
|
|
180
180
|
u();
|
|
181
181
|
}, [u]);
|
|
182
|
-
const f =
|
|
182
|
+
const f = Tt((l) => r[l] || l, [r]), d = Tt(() => {
|
|
183
183
|
j = null, u();
|
|
184
184
|
}, [u]);
|
|
185
185
|
return {
|
|
@@ -187,7 +187,7 @@ function xn(t) {
|
|
|
187
187
|
labelMap: r,
|
|
188
188
|
loading: a,
|
|
189
189
|
error: s,
|
|
190
|
-
refetch:
|
|
190
|
+
refetch: d,
|
|
191
191
|
getFieldLabel: f
|
|
192
192
|
};
|
|
193
193
|
}
|
|
@@ -250,7 +250,7 @@ class wn {
|
|
|
250
250
|
this.queue = [], this.flushScheduled = !1;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const Ce = fn(null);
|
|
254
254
|
function ka({
|
|
255
255
|
cubeApi: t,
|
|
256
256
|
apiOptions: e,
|
|
@@ -265,59 +265,167 @@ function ka({
|
|
|
265
265
|
// Default 100ms batch window
|
|
266
266
|
children: c
|
|
267
267
|
}) {
|
|
268
|
-
const [u, f] =
|
|
268
|
+
const [u, f] = Q(null), d = u || {
|
|
269
269
|
apiOptions: e || { apiUrl: "/cubejs-api/v1" },
|
|
270
270
|
token: n
|
|
271
|
-
}, l = ae(() => t && !e && !n ? t : mn(
|
|
271
|
+
}, l = ae(() => t && !e && !n ? t : mn(d.token, d.apiOptions), [t, e, n, d.apiOptions, d.token]), h = ae(() => {
|
|
272
272
|
if (!o)
|
|
273
273
|
return null;
|
|
274
|
-
const
|
|
275
|
-
return new wn(
|
|
276
|
-
}, [o, l, s]), { meta:
|
|
274
|
+
const F = (E) => l.batchLoad(E);
|
|
275
|
+
return new wn(F, s);
|
|
276
|
+
}, [o, l, s]), { meta: b, labelMap: A, loading: S, error: R, getFieldLabel: v, refetch: k } = xn(l), M = {
|
|
277
277
|
cubeApi: l,
|
|
278
278
|
options: r,
|
|
279
|
-
meta:
|
|
280
|
-
labelMap:
|
|
281
|
-
metaLoading:
|
|
282
|
-
metaError:
|
|
283
|
-
getFieldLabel:
|
|
284
|
-
refetchMeta:
|
|
285
|
-
updateApiConfig: (
|
|
279
|
+
meta: b,
|
|
280
|
+
labelMap: A,
|
|
281
|
+
metaLoading: S,
|
|
282
|
+
metaError: R,
|
|
283
|
+
getFieldLabel: v,
|
|
284
|
+
refetchMeta: k,
|
|
285
|
+
updateApiConfig: (F, E) => {
|
|
286
286
|
f({
|
|
287
|
-
apiOptions:
|
|
288
|
-
token:
|
|
287
|
+
apiOptions: F,
|
|
288
|
+
token: E
|
|
289
289
|
});
|
|
290
290
|
},
|
|
291
291
|
features: i,
|
|
292
|
-
batchCoordinator:
|
|
292
|
+
batchCoordinator: h,
|
|
293
293
|
enableBatching: o,
|
|
294
294
|
dashboardModes: a
|
|
295
295
|
};
|
|
296
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ U(Ce.Provider, { value: M, children: c });
|
|
297
297
|
}
|
|
298
298
|
function bn() {
|
|
299
|
-
const t = ln(
|
|
299
|
+
const t = ln(Ce);
|
|
300
300
|
if (!t)
|
|
301
301
|
throw new Error("useCubeContext must be used within a CubeProvider");
|
|
302
302
|
return t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function $a(t) {
|
|
305
305
|
return t != null && !isNaN(Number(t));
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function It(t) {
|
|
308
308
|
if (t == null) return null;
|
|
309
309
|
const e = typeof t == "string" ? parseFloat(t) : Number(t);
|
|
310
310
|
return isNaN(e) ? null : e;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function vn(t) {
|
|
313
313
|
if (t == null) return "No data";
|
|
314
314
|
const e = typeof t == "number" ? t : parseFloat(t);
|
|
315
315
|
return isNaN(e) ? String(t) : Number.isInteger(e) ? e.toLocaleString() : parseFloat(e.toFixed(2)).toLocaleString();
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Aa(t, e, n) {
|
|
318
|
+
if (t == null)
|
|
319
|
+
return "No data";
|
|
320
|
+
const r = typeof t == "number" ? t : parseFloat(String(t));
|
|
321
|
+
if (isNaN(r))
|
|
322
|
+
return String(t);
|
|
323
|
+
if (!isFinite(r))
|
|
324
|
+
return r > 0 ? "∞" : "-∞";
|
|
325
|
+
const i = typeof navigator < "u" ? navigator.language : "en-US";
|
|
326
|
+
if (!e)
|
|
327
|
+
return vn(t);
|
|
328
|
+
const { unit: a, abbreviate: o = !0, decimals: s, customPrefix: c, customSuffix: u } = e;
|
|
329
|
+
let f = r, d = "";
|
|
330
|
+
if (o) {
|
|
331
|
+
const h = Math.abs(r);
|
|
332
|
+
h >= 1e9 ? (f = r / 1e9, d = "B") : h >= 1e6 ? (f = r / 1e6, d = "M") : h >= 1e3 && (f = r / 1e3, d = "K");
|
|
333
|
+
}
|
|
334
|
+
const l = s !== void 0 ? s : Number.isInteger(f) ? 0 : 2;
|
|
335
|
+
switch (a) {
|
|
336
|
+
case "currency": {
|
|
337
|
+
const h = Mn(i);
|
|
338
|
+
if (o && d) {
|
|
339
|
+
const b = new Intl.NumberFormat(i, {
|
|
340
|
+
style: "currency",
|
|
341
|
+
currency: h,
|
|
342
|
+
minimumFractionDigits: l,
|
|
343
|
+
maximumFractionDigits: l
|
|
344
|
+
}).format(f), A = new Intl.NumberFormat(i, {
|
|
345
|
+
style: "currency",
|
|
346
|
+
currency: h
|
|
347
|
+
}).formatToParts(f);
|
|
348
|
+
return A[A.length - 1]?.type === "currency" ? b.replace(/(\s*[^\d\s]+)$/, d + "$1") : b + d;
|
|
349
|
+
}
|
|
350
|
+
return new Intl.NumberFormat(i, {
|
|
351
|
+
style: "currency",
|
|
352
|
+
currency: h,
|
|
353
|
+
minimumFractionDigits: l,
|
|
354
|
+
maximumFractionDigits: l
|
|
355
|
+
}).format(f);
|
|
356
|
+
}
|
|
357
|
+
case "percent": {
|
|
358
|
+
const h = Math.abs(f) <= 1 && !o ? f * 100 : f;
|
|
359
|
+
return new Intl.NumberFormat(i, {
|
|
360
|
+
minimumFractionDigits: l,
|
|
361
|
+
maximumFractionDigits: l
|
|
362
|
+
}).format(h) + d + "%";
|
|
363
|
+
}
|
|
364
|
+
case "custom": {
|
|
365
|
+
const h = c || "", b = u || "", A = new Intl.NumberFormat(i, {
|
|
366
|
+
minimumFractionDigits: l,
|
|
367
|
+
maximumFractionDigits: l
|
|
368
|
+
}).format(f);
|
|
369
|
+
return h + A + d + b;
|
|
370
|
+
}
|
|
371
|
+
default:
|
|
372
|
+
return new Intl.NumberFormat(i, {
|
|
373
|
+
minimumFractionDigits: l,
|
|
374
|
+
maximumFractionDigits: l
|
|
375
|
+
}).format(f) + d;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function Mn(t) {
|
|
379
|
+
const n = t.split("-")[1]?.toUpperCase();
|
|
380
|
+
return {
|
|
381
|
+
US: "USD",
|
|
382
|
+
CA: "CAD",
|
|
383
|
+
GB: "GBP",
|
|
384
|
+
UK: "GBP",
|
|
385
|
+
AU: "AUD",
|
|
386
|
+
NZ: "NZD",
|
|
387
|
+
EU: "EUR",
|
|
388
|
+
DE: "EUR",
|
|
389
|
+
FR: "EUR",
|
|
390
|
+
IT: "EUR",
|
|
391
|
+
ES: "EUR",
|
|
392
|
+
NL: "EUR",
|
|
393
|
+
BE: "EUR",
|
|
394
|
+
AT: "EUR",
|
|
395
|
+
IE: "EUR",
|
|
396
|
+
PT: "EUR",
|
|
397
|
+
FI: "EUR",
|
|
398
|
+
JP: "JPY",
|
|
399
|
+
CN: "CNY",
|
|
400
|
+
KR: "KRW",
|
|
401
|
+
IN: "INR",
|
|
402
|
+
BR: "BRL",
|
|
403
|
+
MX: "MXN",
|
|
404
|
+
CH: "CHF",
|
|
405
|
+
SE: "SEK",
|
|
406
|
+
NO: "NOK",
|
|
407
|
+
DK: "DKK",
|
|
408
|
+
PL: "PLN",
|
|
409
|
+
RU: "RUB",
|
|
410
|
+
ZA: "ZAR",
|
|
411
|
+
SG: "SGD",
|
|
412
|
+
HK: "HKD",
|
|
413
|
+
TW: "TWD",
|
|
414
|
+
TH: "THB",
|
|
415
|
+
MY: "MYR",
|
|
416
|
+
PH: "PHP",
|
|
417
|
+
ID: "IDR",
|
|
418
|
+
VN: "VND",
|
|
419
|
+
AE: "AED",
|
|
420
|
+
SA: "SAR",
|
|
421
|
+
IL: "ILS",
|
|
422
|
+
TR: "TRY"
|
|
423
|
+
}[n] || "USD";
|
|
424
|
+
}
|
|
425
|
+
function qt(t, e) {
|
|
318
426
|
return e[t] || t;
|
|
319
427
|
}
|
|
320
|
-
function
|
|
428
|
+
function Xt(t, e) {
|
|
321
429
|
if (!t) return String(t || "Unknown");
|
|
322
430
|
const n = String(t);
|
|
323
431
|
if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
|
|
@@ -331,9 +439,10 @@ function Qt(t, e) {
|
|
|
331
439
|
switch (e.toLowerCase()) {
|
|
332
440
|
case "year":
|
|
333
441
|
return `${a}`;
|
|
334
|
-
case "quarter":
|
|
442
|
+
case "quarter": {
|
|
335
443
|
const l = Math.floor(i.getUTCMonth() / 3) + 1;
|
|
336
444
|
return `${a}-Q${l}`;
|
|
445
|
+
}
|
|
337
446
|
case "month":
|
|
338
447
|
return `${a}-${o}`;
|
|
339
448
|
case "week":
|
|
@@ -345,19 +454,19 @@ function Qt(t, e) {
|
|
|
345
454
|
case "minute":
|
|
346
455
|
return `${a}-${o}-${s} ${String(c).padStart(2, "0")}:${String(u).padStart(2, "0")}`;
|
|
347
456
|
}
|
|
348
|
-
const f = i.getUTCSeconds(),
|
|
349
|
-
if (s === "01" && c === 0 && u === 0 && f === 0 &&
|
|
457
|
+
const f = i.getUTCSeconds(), d = i.getUTCMilliseconds();
|
|
458
|
+
if (s === "01" && c === 0 && u === 0 && f === 0 && d === 0) {
|
|
350
459
|
if (o === "01" || o === "04" || o === "07" || o === "10") {
|
|
351
460
|
const l = Math.floor(i.getUTCMonth() / 3) + 1;
|
|
352
461
|
return `${a}-Q${l}`;
|
|
353
462
|
}
|
|
354
463
|
return `${a}-${o}`;
|
|
355
464
|
}
|
|
356
|
-
return c === 0 && u === 0 && f === 0 &&
|
|
465
|
+
return c === 0 && u === 0 && f === 0 && d === 0 ? `${a}-${o}-${s}` : u === 0 && f === 0 && d === 0 ? `${a}-${o}-${s} ${String(c).padStart(2, "0")}:00` : `${a}-${o}-${s} ${String(c).padStart(2, "0")}:${String(u).padStart(2, "0")}`;
|
|
357
466
|
}
|
|
358
467
|
return n;
|
|
359
468
|
}
|
|
360
|
-
function
|
|
469
|
+
function Fe(t, e) {
|
|
361
470
|
try {
|
|
362
471
|
if (t?.timeDimensions) {
|
|
363
472
|
const r = t.timeDimensions.find((i) => e === i.dimension || e.startsWith(i.dimension.replace(".", "_")) || e === `${i.dimension}_${i.granularity}`);
|
|
@@ -375,74 +484,74 @@ function Te(t, e) {
|
|
|
375
484
|
return;
|
|
376
485
|
}
|
|
377
486
|
}
|
|
378
|
-
function
|
|
487
|
+
function _n(t, e, n, r, i = {}) {
|
|
379
488
|
if (!t || t.length === 0) return [];
|
|
380
|
-
const a =
|
|
489
|
+
const a = Fe(r, e);
|
|
381
490
|
return t.map((o) => {
|
|
382
491
|
const s = {
|
|
383
|
-
name:
|
|
492
|
+
name: Xt(o[e], a) || o[e] || "Unknown"
|
|
384
493
|
};
|
|
385
494
|
return n.forEach((c) => {
|
|
386
|
-
const u =
|
|
387
|
-
s[u] =
|
|
495
|
+
const u = qt(c, i);
|
|
496
|
+
s[u] = It(o[c]);
|
|
388
497
|
}), s;
|
|
389
498
|
});
|
|
390
499
|
}
|
|
391
|
-
function
|
|
500
|
+
function Ea(t, e, n, r, i, a = {}) {
|
|
392
501
|
if (!t || t.length === 0)
|
|
393
502
|
return { data: [], seriesKeys: [], hasDimensions: !1 };
|
|
394
503
|
const o = r || {}, s = [
|
|
395
504
|
...o.dimensions || [],
|
|
396
|
-
...o.timeDimensions?.map((
|
|
397
|
-
], c = o.measures || [], u = n.filter((
|
|
505
|
+
...o.timeDimensions?.map((h) => h.dimension) || []
|
|
506
|
+
], c = o.measures || [], u = n.filter((h) => c.includes(h)), f = (i || []).filter((h) => s.includes(h));
|
|
398
507
|
if (f.length > 0) {
|
|
399
|
-
const
|
|
400
|
-
t.forEach((
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
const C =
|
|
404
|
-
if (
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
} else C in
|
|
408
|
-
}), f.forEach((
|
|
409
|
-
const C =
|
|
508
|
+
const h = {};
|
|
509
|
+
t.forEach((S) => {
|
|
510
|
+
const R = Fe(r, e), v = Xt(S[e], R) || S[e] || "Unknown";
|
|
511
|
+
h[v] || (h[v] = { name: String(v) }), u.forEach((k) => {
|
|
512
|
+
const C = qt(k, a), M = It(S[k]);
|
|
513
|
+
if (M !== null) {
|
|
514
|
+
const F = h[v][C];
|
|
515
|
+
h[v][C] = F == null ? M : F + M;
|
|
516
|
+
} else C in h[v] || (h[v][C] = null);
|
|
517
|
+
}), f.forEach((k) => {
|
|
518
|
+
const C = S[k];
|
|
410
519
|
if (C != null) {
|
|
411
|
-
const
|
|
412
|
-
(
|
|
520
|
+
const M = String(C), F = u[0] || c.find(
|
|
521
|
+
(E) => E.includes("totalCost") || E.includes("count") || E.includes("sum")
|
|
413
522
|
) || c[0];
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
const x =
|
|
418
|
-
|
|
419
|
-
} else
|
|
523
|
+
if (F) {
|
|
524
|
+
const E = It(S[F]);
|
|
525
|
+
if (E !== null) {
|
|
526
|
+
const x = h[v][M];
|
|
527
|
+
h[v][M] = x == null ? E : x + E;
|
|
528
|
+
} else M in h[v] || (h[v][M] = null);
|
|
420
529
|
}
|
|
421
530
|
}
|
|
422
531
|
});
|
|
423
532
|
});
|
|
424
|
-
const
|
|
533
|
+
const b = Object.values(h), A = Array.from(new Set(
|
|
425
534
|
t.flatMap(
|
|
426
|
-
(
|
|
427
|
-
const
|
|
428
|
-
return
|
|
429
|
-
}).filter((
|
|
535
|
+
(S) => f.map((R) => {
|
|
536
|
+
const v = S[R];
|
|
537
|
+
return v != null ? String(v) : null;
|
|
538
|
+
}).filter((R) => R !== null)
|
|
430
539
|
)
|
|
431
540
|
));
|
|
432
541
|
return {
|
|
433
|
-
data:
|
|
434
|
-
seriesKeys:
|
|
542
|
+
data: b,
|
|
543
|
+
seriesKeys: A,
|
|
435
544
|
hasDimensions: !0
|
|
436
545
|
};
|
|
437
546
|
}
|
|
438
|
-
const
|
|
547
|
+
const d = _n(t, e, n, r, a), l = n.map((h) => qt(h, a));
|
|
439
548
|
return {
|
|
440
|
-
data:
|
|
549
|
+
data: d,
|
|
441
550
|
seriesKeys: l,
|
|
442
551
|
hasDimensions: !1
|
|
443
552
|
};
|
|
444
553
|
}
|
|
445
|
-
const
|
|
554
|
+
const Ca = [
|
|
446
555
|
"#3b82f6",
|
|
447
556
|
// blue
|
|
448
557
|
"#10b981",
|
|
@@ -459,7 +568,7 @@ const Aa = [
|
|
|
459
568
|
// cyan
|
|
460
569
|
"#84cc16"
|
|
461
570
|
// lime
|
|
462
|
-
],
|
|
571
|
+
], Nn = [
|
|
463
572
|
"#440154",
|
|
464
573
|
// dark purple
|
|
465
574
|
"#414487",
|
|
@@ -472,34 +581,34 @@ const Aa = [
|
|
|
472
581
|
// green
|
|
473
582
|
"#fde725"
|
|
474
583
|
// yellow
|
|
475
|
-
],
|
|
584
|
+
], Fa = "#10b981", Ra = "#ef4444", Ta = {
|
|
476
585
|
top: 5,
|
|
477
586
|
right: 30,
|
|
478
587
|
left: 20,
|
|
479
588
|
bottom: 5
|
|
480
589
|
};
|
|
481
|
-
function
|
|
590
|
+
function Da(t) {
|
|
482
591
|
return typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(`--dc-${t}`).trim();
|
|
483
592
|
}
|
|
484
|
-
function
|
|
593
|
+
function Sn(t, e) {
|
|
485
594
|
typeof window > "u" || document.documentElement.style.setProperty(`--dc-${t}`, e);
|
|
486
595
|
}
|
|
487
|
-
function
|
|
596
|
+
function La(t) {
|
|
488
597
|
typeof window > "u" || Object.entries(t.colors).forEach(([e, n]) => {
|
|
489
598
|
if (n) {
|
|
490
599
|
const r = e.replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
|
|
491
|
-
|
|
600
|
+
Sn(r, n);
|
|
492
601
|
}
|
|
493
602
|
});
|
|
494
603
|
}
|
|
495
|
-
function
|
|
604
|
+
function Ha() {
|
|
496
605
|
if (typeof window > "u") return;
|
|
497
606
|
const t = document.documentElement.style;
|
|
498
607
|
Array.from(t).forEach((n) => {
|
|
499
608
|
n.startsWith("--dc-") && t.removeProperty(n);
|
|
500
609
|
});
|
|
501
610
|
}
|
|
502
|
-
function
|
|
611
|
+
function Mt() {
|
|
503
612
|
if (typeof window > "u") return "light";
|
|
504
613
|
const t = localStorage.getItem("theme");
|
|
505
614
|
if (t === "dark" || t === "neon" || t === "light")
|
|
@@ -507,29 +616,29 @@ function _t() {
|
|
|
507
616
|
const e = document.documentElement.getAttribute("data-theme");
|
|
508
617
|
return e === "dark" || e === "neon" ? e : document.documentElement.classList.contains("dark") || document.body.classList.contains("dark") ? "dark" : document.documentElement.classList.contains("neon") || document.body.classList.contains("neon") ? "neon" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
509
618
|
}
|
|
510
|
-
function
|
|
619
|
+
function Pa(t) {
|
|
511
620
|
typeof window > "u" || (document.documentElement.classList.remove("dark", "neon"), document.documentElement.setAttribute("data-theme", t), (t === "dark" || t === "neon") && document.documentElement.classList.add(t), localStorage.setItem("theme", t));
|
|
512
621
|
}
|
|
513
|
-
function
|
|
514
|
-
const t =
|
|
622
|
+
function Ua() {
|
|
623
|
+
const t = Mt();
|
|
515
624
|
return t === "dark" || t === "neon";
|
|
516
625
|
}
|
|
517
626
|
function kn(t) {
|
|
518
627
|
if (typeof window > "u") return () => {
|
|
519
628
|
};
|
|
520
629
|
const e = new MutationObserver(() => {
|
|
521
|
-
t(
|
|
630
|
+
t(Mt());
|
|
522
631
|
});
|
|
523
632
|
e.observe(document.documentElement, {
|
|
524
633
|
attributes: !0,
|
|
525
634
|
attributeFilter: ["class", "data-theme"]
|
|
526
635
|
});
|
|
527
|
-
const n = window.matchMedia("(prefers-color-scheme: dark)"), r = () => t(
|
|
636
|
+
const n = window.matchMedia("(prefers-color-scheme: dark)"), r = () => t(Mt());
|
|
528
637
|
return n.addEventListener("change", r), () => {
|
|
529
638
|
e.disconnect(), n.removeEventListener("change", r);
|
|
530
639
|
};
|
|
531
640
|
}
|
|
532
|
-
const
|
|
641
|
+
const Ia = {
|
|
533
642
|
light: {
|
|
534
643
|
name: "light",
|
|
535
644
|
colors: {
|
|
@@ -581,18 +690,18 @@ const qa = {
|
|
|
581
690
|
function vt(t, e) {
|
|
582
691
|
return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
583
692
|
}
|
|
584
|
-
function
|
|
693
|
+
function $n(t, e) {
|
|
585
694
|
return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
586
695
|
}
|
|
587
|
-
function
|
|
696
|
+
function Re(t) {
|
|
588
697
|
let e, n, r;
|
|
589
|
-
t.length !== 2 ? (e = vt, n = (s, c) => vt(t(s), c), r = (s, c) => t(s) - c) : (e = t === vt || t ===
|
|
698
|
+
t.length !== 2 ? (e = vt, n = (s, c) => vt(t(s), c), r = (s, c) => t(s) - c) : (e = t === vt || t === $n ? t : An, n = t, r = t);
|
|
590
699
|
function i(s, c, u = 0, f = s.length) {
|
|
591
700
|
if (u < f) {
|
|
592
701
|
if (e(c, c) !== 0) return f;
|
|
593
702
|
do {
|
|
594
|
-
const
|
|
595
|
-
n(s[
|
|
703
|
+
const d = u + f >>> 1;
|
|
704
|
+
n(s[d], c) < 0 ? u = d + 1 : f = d;
|
|
596
705
|
} while (u < f);
|
|
597
706
|
}
|
|
598
707
|
return u;
|
|
@@ -601,27 +710,27 @@ function Fe(t) {
|
|
|
601
710
|
if (u < f) {
|
|
602
711
|
if (e(c, c) !== 0) return f;
|
|
603
712
|
do {
|
|
604
|
-
const
|
|
605
|
-
n(s[
|
|
713
|
+
const d = u + f >>> 1;
|
|
714
|
+
n(s[d], c) <= 0 ? u = d + 1 : f = d;
|
|
606
715
|
} while (u < f);
|
|
607
716
|
}
|
|
608
717
|
return u;
|
|
609
718
|
}
|
|
610
719
|
function o(s, c, u = 0, f = s.length) {
|
|
611
|
-
const
|
|
612
|
-
return
|
|
720
|
+
const d = i(s, c, u, f - 1);
|
|
721
|
+
return d > u && r(s[d - 1], c) > -r(s[d], c) ? d - 1 : d;
|
|
613
722
|
}
|
|
614
723
|
return { left: i, center: o, right: a };
|
|
615
724
|
}
|
|
616
|
-
function
|
|
725
|
+
function An() {
|
|
617
726
|
return 0;
|
|
618
727
|
}
|
|
619
|
-
function
|
|
728
|
+
function En(t) {
|
|
620
729
|
return t === null ? NaN : +t;
|
|
621
730
|
}
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
function
|
|
731
|
+
const Cn = Re(vt), Te = Cn.right;
|
|
732
|
+
Re(En).center;
|
|
733
|
+
function qa(t, e) {
|
|
625
734
|
let n, r;
|
|
626
735
|
if (e === void 0)
|
|
627
736
|
for (const i of t)
|
|
@@ -644,37 +753,37 @@ class se extends Map {
|
|
|
644
753
|
return super.has(ce(this, e));
|
|
645
754
|
}
|
|
646
755
|
set(e, n) {
|
|
647
|
-
return super.set(
|
|
756
|
+
return super.set(Fn(this, e), n);
|
|
648
757
|
}
|
|
649
758
|
delete(e) {
|
|
650
|
-
return super.delete(
|
|
759
|
+
return super.delete(Rn(this, e));
|
|
651
760
|
}
|
|
652
761
|
}
|
|
653
762
|
function ce({ _intern: t, _key: e }, n) {
|
|
654
763
|
const r = e(n);
|
|
655
764
|
return t.has(r) ? t.get(r) : n;
|
|
656
765
|
}
|
|
657
|
-
function
|
|
766
|
+
function Fn({ _intern: t, _key: e }, n) {
|
|
658
767
|
const r = e(n);
|
|
659
768
|
return t.has(r) ? t.get(r) : (t.set(r, n), n);
|
|
660
769
|
}
|
|
661
|
-
function
|
|
770
|
+
function Rn({ _intern: t, _key: e }, n) {
|
|
662
771
|
const r = e(n);
|
|
663
772
|
return t.has(r) && (n = t.get(r), t.delete(r)), n;
|
|
664
773
|
}
|
|
665
774
|
function Tn(t) {
|
|
666
775
|
return t !== null && typeof t == "object" ? t.valueOf() : t;
|
|
667
776
|
}
|
|
668
|
-
const
|
|
669
|
-
function
|
|
670
|
-
const r = (e - t) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >=
|
|
777
|
+
const Dn = Math.sqrt(50), Ln = Math.sqrt(10), Hn = Math.sqrt(2);
|
|
778
|
+
function _t(t, e, n) {
|
|
779
|
+
const r = (e - t) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >= Dn ? 10 : a >= Ln ? 5 : a >= Hn ? 2 : 1;
|
|
671
780
|
let s, c, u;
|
|
672
|
-
return i < 0 ? (u = Math.pow(10, -i) / o, s = Math.round(t * u), c = Math.round(e * u), s / u < t && ++s, c / u > e && --c, u = -u) : (u = Math.pow(10, i) * o, s = Math.round(t / u), c = Math.round(e / u), s * u < t && ++s, c * u > e && --c), c < s && 0.5 <= n && n < 2 ?
|
|
781
|
+
return i < 0 ? (u = Math.pow(10, -i) / o, s = Math.round(t * u), c = Math.round(e * u), s / u < t && ++s, c / u > e && --c, u = -u) : (u = Math.pow(10, i) * o, s = Math.round(t / u), c = Math.round(e / u), s * u < t && ++s, c * u > e && --c), c < s && 0.5 <= n && n < 2 ? _t(t, e, n * 2) : [s, c, u];
|
|
673
782
|
}
|
|
674
|
-
function
|
|
783
|
+
function Pn(t, e, n) {
|
|
675
784
|
if (e = +e, t = +t, n = +n, !(n > 0)) return [];
|
|
676
785
|
if (t === e) return [t];
|
|
677
|
-
const r = e < t, [i, a, o] = r ?
|
|
786
|
+
const r = e < t, [i, a, o] = r ? _t(e, t, n) : _t(t, e, n);
|
|
678
787
|
if (!(a >= i)) return [];
|
|
679
788
|
const s = a - i + 1, c = new Array(s);
|
|
680
789
|
if (r)
|
|
@@ -684,12 +793,12 @@ function Dn(t, e, n) {
|
|
|
684
793
|
else for (let u = 0; u < s; ++u) c[u] = (i + u) * o;
|
|
685
794
|
return c;
|
|
686
795
|
}
|
|
687
|
-
function
|
|
688
|
-
return e = +e, t = +t, n = +n,
|
|
796
|
+
function Vt(t, e, n) {
|
|
797
|
+
return e = +e, t = +t, n = +n, _t(t, e, n)[2];
|
|
689
798
|
}
|
|
690
|
-
function
|
|
799
|
+
function Un(t, e, n) {
|
|
691
800
|
e = +e, t = +t, n = +n;
|
|
692
|
-
const r = e < t, i = r ?
|
|
801
|
+
const r = e < t, i = r ? Vt(e, t, n) : Vt(t, e, n);
|
|
693
802
|
return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
|
|
694
803
|
}
|
|
695
804
|
function ue(t, e) {
|
|
@@ -716,184 +825,184 @@ function le(t, e) {
|
|
|
716
825
|
}
|
|
717
826
|
return n;
|
|
718
827
|
}
|
|
719
|
-
function
|
|
828
|
+
function In(t) {
|
|
720
829
|
return t;
|
|
721
830
|
}
|
|
722
|
-
var
|
|
723
|
-
function
|
|
831
|
+
var Lt = 1, Ht = 2, Ot = 3, ut = 4, fe = 1e-6;
|
|
832
|
+
function qn(t) {
|
|
724
833
|
return "translate(" + t + ",0)";
|
|
725
834
|
}
|
|
726
|
-
function
|
|
835
|
+
function Vn(t) {
|
|
727
836
|
return "translate(0," + t + ")";
|
|
728
837
|
}
|
|
729
|
-
function
|
|
838
|
+
function On(t) {
|
|
730
839
|
return (e) => +t(e);
|
|
731
840
|
}
|
|
732
841
|
function zn(t, e) {
|
|
733
842
|
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
|
|
734
843
|
}
|
|
735
|
-
function
|
|
844
|
+
function Wn() {
|
|
736
845
|
return !this.__axis;
|
|
737
846
|
}
|
|
738
|
-
function
|
|
739
|
-
var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t ===
|
|
740
|
-
function l(
|
|
741
|
-
var
|
|
742
|
-
|
|
743
|
-
return isFinite(w = C(w)) ?
|
|
744
|
-
}),
|
|
745
|
-
var
|
|
746
|
-
return
|
|
747
|
-
})), x.remove(),
|
|
748
|
-
return
|
|
749
|
-
}), _.attr(f + "2", u * a), g.attr(f, u *
|
|
847
|
+
function De(t, e) {
|
|
848
|
+
var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === Lt || t === ut ? -1 : 1, f = t === ut || t === Ht ? "x" : "y", d = t === Lt || t === Ot ? qn : Vn;
|
|
849
|
+
function l(h) {
|
|
850
|
+
var b = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), A = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : In), S = Math.max(a, 0) + s, R = e.range(), v = +R[0] + c, k = +R[R.length - 1] + c, C = (e.bandwidth ? zn : On)(e.copy(), c), M = h.selection ? h.selection() : h, F = M.selectAll(".domain").data([null]), E = M.selectAll(".tick").data(b, e).order(), x = E.exit(), m = E.enter().append("g").attr("class", "tick"), _ = E.select("line"), g = E.select("text");
|
|
851
|
+
F = F.merge(F.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), E = E.merge(m), _ = _.merge(m.append("line").attr("stroke", "currentColor").attr(f + "2", u * a)), g = g.merge(m.append("text").attr("fill", "currentColor").attr(f, u * S).attr("dy", t === Lt ? "0em" : t === Ot ? "0.71em" : "0.32em")), h !== M && (F = F.transition(h), E = E.transition(h), _ = _.transition(h), g = g.transition(h), x = x.transition(h).attr("opacity", fe).attr("transform", function(w) {
|
|
852
|
+
return isFinite(w = C(w)) ? d(w + c) : this.getAttribute("transform");
|
|
853
|
+
}), m.attr("opacity", fe).attr("transform", function(w) {
|
|
854
|
+
var N = this.parentNode.__axis;
|
|
855
|
+
return d((N && isFinite(N = N(w)) ? N : C(w)) + c);
|
|
856
|
+
})), x.remove(), F.attr("d", t === ut || t === Ht ? o ? "M" + u * o + "," + v + "H" + c + "V" + k + "H" + u * o : "M" + c + "," + v + "V" + k : o ? "M" + v + "," + u * o + "V" + c + "H" + k + "V" + u * o : "M" + v + "," + c + "H" + k), E.attr("opacity", 1).attr("transform", function(w) {
|
|
857
|
+
return d(C(w) + c);
|
|
858
|
+
}), _.attr(f + "2", u * a), g.attr(f, u * S).text(A), M.filter(Wn).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Ht ? "start" : t === ut ? "end" : "middle"), M.each(function() {
|
|
750
859
|
this.__axis = C;
|
|
751
860
|
});
|
|
752
861
|
}
|
|
753
|
-
return l.scale = function(
|
|
754
|
-
return arguments.length ? (e =
|
|
862
|
+
return l.scale = function(h) {
|
|
863
|
+
return arguments.length ? (e = h, l) : e;
|
|
755
864
|
}, l.ticks = function() {
|
|
756
865
|
return n = Array.from(arguments), l;
|
|
757
|
-
}, l.tickArguments = function(
|
|
758
|
-
return arguments.length ? (n =
|
|
759
|
-
}, l.tickValues = function(
|
|
760
|
-
return arguments.length ? (r =
|
|
761
|
-
}, l.tickFormat = function(
|
|
762
|
-
return arguments.length ? (i =
|
|
763
|
-
}, l.tickSize = function(
|
|
764
|
-
return arguments.length ? (a = o = +
|
|
765
|
-
}, l.tickSizeInner = function(
|
|
766
|
-
return arguments.length ? (a = +
|
|
767
|
-
}, l.tickSizeOuter = function(
|
|
768
|
-
return arguments.length ? (o = +
|
|
769
|
-
}, l.tickPadding = function(
|
|
770
|
-
return arguments.length ? (s = +
|
|
771
|
-
}, l.offset = function(
|
|
772
|
-
return arguments.length ? (c = +
|
|
866
|
+
}, l.tickArguments = function(h) {
|
|
867
|
+
return arguments.length ? (n = h == null ? [] : Array.from(h), l) : n.slice();
|
|
868
|
+
}, l.tickValues = function(h) {
|
|
869
|
+
return arguments.length ? (r = h == null ? null : Array.from(h), l) : r && r.slice();
|
|
870
|
+
}, l.tickFormat = function(h) {
|
|
871
|
+
return arguments.length ? (i = h, l) : i;
|
|
872
|
+
}, l.tickSize = function(h) {
|
|
873
|
+
return arguments.length ? (a = o = +h, l) : a;
|
|
874
|
+
}, l.tickSizeInner = function(h) {
|
|
875
|
+
return arguments.length ? (a = +h, l) : a;
|
|
876
|
+
}, l.tickSizeOuter = function(h) {
|
|
877
|
+
return arguments.length ? (o = +h, l) : o;
|
|
878
|
+
}, l.tickPadding = function(h) {
|
|
879
|
+
return arguments.length ? (s = +h, l) : s;
|
|
880
|
+
}, l.offset = function(h) {
|
|
881
|
+
return arguments.length ? (c = +h, l) : c;
|
|
773
882
|
}, l;
|
|
774
883
|
}
|
|
775
|
-
function Pa(t) {
|
|
776
|
-
return Le(It, t);
|
|
777
|
-
}
|
|
778
884
|
function Va(t) {
|
|
779
|
-
return
|
|
885
|
+
return De(Ot, t);
|
|
886
|
+
}
|
|
887
|
+
function Oa(t) {
|
|
888
|
+
return De(ut, t);
|
|
780
889
|
}
|
|
781
|
-
var
|
|
890
|
+
var zt = "http://www.w3.org/1999/xhtml";
|
|
782
891
|
const he = {
|
|
783
892
|
svg: "http://www.w3.org/2000/svg",
|
|
784
|
-
xhtml:
|
|
893
|
+
xhtml: zt,
|
|
785
894
|
xlink: "http://www.w3.org/1999/xlink",
|
|
786
895
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
787
896
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
788
897
|
};
|
|
789
|
-
function
|
|
898
|
+
function Le(t) {
|
|
790
899
|
var e = t += "", n = e.indexOf(":");
|
|
791
900
|
return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), he.hasOwnProperty(e) ? { space: he[e], local: t } : t;
|
|
792
901
|
}
|
|
793
|
-
function
|
|
902
|
+
function Yn(t) {
|
|
794
903
|
return function() {
|
|
795
904
|
var e = this.ownerDocument, n = this.namespaceURI;
|
|
796
|
-
return n ===
|
|
905
|
+
return n === zt && e.documentElement.namespaceURI === zt ? e.createElement(t) : e.createElementNS(n, t);
|
|
797
906
|
};
|
|
798
907
|
}
|
|
799
|
-
function
|
|
908
|
+
function Bn(t) {
|
|
800
909
|
return function() {
|
|
801
910
|
return this.ownerDocument.createElementNS(t.space, t.local);
|
|
802
911
|
};
|
|
803
912
|
}
|
|
804
913
|
function He(t) {
|
|
805
|
-
var e =
|
|
806
|
-
return (e.local ?
|
|
914
|
+
var e = Le(t);
|
|
915
|
+
return (e.local ? Bn : Yn)(e);
|
|
807
916
|
}
|
|
808
|
-
function
|
|
917
|
+
function Xn() {
|
|
809
918
|
}
|
|
810
|
-
function
|
|
811
|
-
return t == null ?
|
|
919
|
+
function Pe(t) {
|
|
920
|
+
return t == null ? Xn : function() {
|
|
812
921
|
return this.querySelector(t);
|
|
813
922
|
};
|
|
814
923
|
}
|
|
815
|
-
function
|
|
816
|
-
typeof t != "function" && (t =
|
|
924
|
+
function Gn(t) {
|
|
925
|
+
typeof t != "function" && (t = Pe(t));
|
|
817
926
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
818
927
|
for (var a = e[i], o = a.length, s = r[i] = new Array(o), c, u, f = 0; f < o; ++f)
|
|
819
928
|
(c = a[f]) && (u = t.call(c, c.__data__, f, a)) && ("__data__" in c && (u.__data__ = c.__data__), s[f] = u);
|
|
820
|
-
return new
|
|
929
|
+
return new O(r, this._parents);
|
|
821
930
|
}
|
|
822
931
|
function Qn(t) {
|
|
823
932
|
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
|
824
933
|
}
|
|
825
|
-
function
|
|
934
|
+
function Kn() {
|
|
826
935
|
return [];
|
|
827
936
|
}
|
|
828
|
-
function
|
|
829
|
-
return t == null ?
|
|
937
|
+
function Jn(t) {
|
|
938
|
+
return t == null ? Kn : function() {
|
|
830
939
|
return this.querySelectorAll(t);
|
|
831
940
|
};
|
|
832
941
|
}
|
|
833
|
-
function
|
|
942
|
+
function Zn(t) {
|
|
834
943
|
return function() {
|
|
835
944
|
return Qn(t.apply(this, arguments));
|
|
836
945
|
};
|
|
837
946
|
}
|
|
838
|
-
function
|
|
839
|
-
typeof t == "function" ? t =
|
|
947
|
+
function jn(t) {
|
|
948
|
+
typeof t == "function" ? t = Zn(t) : t = Jn(t);
|
|
840
949
|
for (var e = this._groups, n = e.length, r = [], i = [], a = 0; a < n; ++a)
|
|
841
950
|
for (var o = e[a], s = o.length, c, u = 0; u < s; ++u)
|
|
842
951
|
(c = o[u]) && (r.push(t.call(c, c.__data__, u, o)), i.push(c));
|
|
843
|
-
return new
|
|
952
|
+
return new O(r, i);
|
|
844
953
|
}
|
|
845
|
-
function
|
|
954
|
+
function tr(t) {
|
|
846
955
|
return function() {
|
|
847
956
|
return this.matches(t);
|
|
848
957
|
};
|
|
849
958
|
}
|
|
850
|
-
function
|
|
959
|
+
function Ue(t) {
|
|
851
960
|
return function(e) {
|
|
852
961
|
return e.matches(t);
|
|
853
962
|
};
|
|
854
963
|
}
|
|
855
|
-
var
|
|
856
|
-
function
|
|
964
|
+
var er = Array.prototype.find;
|
|
965
|
+
function nr(t) {
|
|
857
966
|
return function() {
|
|
858
|
-
return
|
|
967
|
+
return er.call(this.children, t);
|
|
859
968
|
};
|
|
860
969
|
}
|
|
861
|
-
function
|
|
970
|
+
function rr() {
|
|
862
971
|
return this.firstElementChild;
|
|
863
972
|
}
|
|
864
|
-
function
|
|
865
|
-
return this.select(t == null ?
|
|
973
|
+
function ir(t) {
|
|
974
|
+
return this.select(t == null ? rr : nr(typeof t == "function" ? t : Ue(t)));
|
|
866
975
|
}
|
|
867
|
-
var
|
|
868
|
-
function
|
|
976
|
+
var ar = Array.prototype.filter;
|
|
977
|
+
function or() {
|
|
869
978
|
return Array.from(this.children);
|
|
870
979
|
}
|
|
871
|
-
function
|
|
980
|
+
function sr(t) {
|
|
872
981
|
return function() {
|
|
873
|
-
return
|
|
982
|
+
return ar.call(this.children, t);
|
|
874
983
|
};
|
|
875
984
|
}
|
|
876
|
-
function
|
|
877
|
-
return this.selectAll(t == null ?
|
|
985
|
+
function cr(t) {
|
|
986
|
+
return this.selectAll(t == null ? or : sr(typeof t == "function" ? t : Ue(t)));
|
|
878
987
|
}
|
|
879
|
-
function
|
|
880
|
-
typeof t != "function" && (t =
|
|
988
|
+
function ur(t) {
|
|
989
|
+
typeof t != "function" && (t = tr(t));
|
|
881
990
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
882
991
|
for (var a = e[i], o = a.length, s = r[i] = [], c, u = 0; u < o; ++u)
|
|
883
992
|
(c = a[u]) && t.call(c, c.__data__, u, a) && s.push(c);
|
|
884
|
-
return new
|
|
993
|
+
return new O(r, this._parents);
|
|
885
994
|
}
|
|
886
|
-
function
|
|
995
|
+
function Ie(t) {
|
|
887
996
|
return new Array(t.length);
|
|
888
997
|
}
|
|
889
|
-
function
|
|
890
|
-
return new
|
|
998
|
+
function lr() {
|
|
999
|
+
return new O(this._enter || this._groups.map(Ie), this._parents);
|
|
891
1000
|
}
|
|
892
|
-
function
|
|
1001
|
+
function Nt(t, e) {
|
|
893
1002
|
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
|
894
1003
|
}
|
|
895
|
-
|
|
896
|
-
constructor:
|
|
1004
|
+
Nt.prototype = {
|
|
1005
|
+
constructor: Nt,
|
|
897
1006
|
appendChild: function(t) {
|
|
898
1007
|
return this._parent.insertBefore(t, this._next);
|
|
899
1008
|
},
|
|
@@ -907,91 +1016,91 @@ kt.prototype = {
|
|
|
907
1016
|
return this._parent.querySelectorAll(t);
|
|
908
1017
|
}
|
|
909
1018
|
};
|
|
910
|
-
function
|
|
1019
|
+
function fr(t) {
|
|
911
1020
|
return function() {
|
|
912
1021
|
return t;
|
|
913
1022
|
};
|
|
914
1023
|
}
|
|
915
|
-
function
|
|
1024
|
+
function hr(t, e, n, r, i, a) {
|
|
916
1025
|
for (var o = 0, s, c = e.length, u = a.length; o < u; ++o)
|
|
917
|
-
(s = e[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new
|
|
1026
|
+
(s = e[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new Nt(t, a[o]);
|
|
918
1027
|
for (; o < c; ++o)
|
|
919
1028
|
(s = e[o]) && (i[o] = s);
|
|
920
1029
|
}
|
|
921
|
-
function
|
|
922
|
-
var s, c, u = /* @__PURE__ */ new Map(), f = e.length,
|
|
1030
|
+
function dr(t, e, n, r, i, a, o) {
|
|
1031
|
+
var s, c, u = /* @__PURE__ */ new Map(), f = e.length, d = a.length, l = new Array(f), h;
|
|
923
1032
|
for (s = 0; s < f; ++s)
|
|
924
|
-
(c = e[s]) && (l[s] =
|
|
925
|
-
for (s = 0; s <
|
|
926
|
-
|
|
1033
|
+
(c = e[s]) && (l[s] = h = o.call(c, c.__data__, s, e) + "", u.has(h) ? i[s] = c : u.set(h, c));
|
|
1034
|
+
for (s = 0; s < d; ++s)
|
|
1035
|
+
h = o.call(t, a[s], s, a) + "", (c = u.get(h)) ? (r[s] = c, c.__data__ = a[s], u.delete(h)) : n[s] = new Nt(t, a[s]);
|
|
927
1036
|
for (s = 0; s < f; ++s)
|
|
928
1037
|
(c = e[s]) && u.get(l[s]) === c && (i[s] = c);
|
|
929
1038
|
}
|
|
930
|
-
function
|
|
1039
|
+
function mr(t) {
|
|
931
1040
|
return t.__data__;
|
|
932
1041
|
}
|
|
933
|
-
function
|
|
934
|
-
if (!arguments.length) return Array.from(this,
|
|
935
|
-
var n = e ?
|
|
936
|
-
typeof t != "function" && (t =
|
|
1042
|
+
function gr(t, e) {
|
|
1043
|
+
if (!arguments.length) return Array.from(this, mr);
|
|
1044
|
+
var n = e ? dr : hr, r = this._parents, i = this._groups;
|
|
1045
|
+
typeof t != "function" && (t = fr(t));
|
|
937
1046
|
for (var a = i.length, o = new Array(a), s = new Array(a), c = new Array(a), u = 0; u < a; ++u) {
|
|
938
|
-
var f = r[u],
|
|
939
|
-
n(f,
|
|
940
|
-
for (var
|
|
941
|
-
if (C =
|
|
942
|
-
for (
|
|
943
|
-
C._next =
|
|
1047
|
+
var f = r[u], d = i[u], l = d.length, h = yr(t.call(f, f && f.__data__, u, r)), b = h.length, A = s[u] = new Array(b), S = o[u] = new Array(b), R = c[u] = new Array(l);
|
|
1048
|
+
n(f, d, A, S, R, h, e);
|
|
1049
|
+
for (var v = 0, k = 0, C, M; v < b; ++v)
|
|
1050
|
+
if (C = A[v]) {
|
|
1051
|
+
for (v >= k && (k = v + 1); !(M = S[k]) && ++k < b; ) ;
|
|
1052
|
+
C._next = M || null;
|
|
944
1053
|
}
|
|
945
1054
|
}
|
|
946
|
-
return o = new
|
|
1055
|
+
return o = new O(o, r), o._enter = s, o._exit = c, o;
|
|
947
1056
|
}
|
|
948
|
-
function
|
|
1057
|
+
function yr(t) {
|
|
949
1058
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
950
1059
|
}
|
|
951
|
-
function
|
|
952
|
-
return new
|
|
1060
|
+
function pr() {
|
|
1061
|
+
return new O(this._exit || this._groups.map(Ie), this._parents);
|
|
953
1062
|
}
|
|
954
|
-
function
|
|
1063
|
+
function xr(t, e, n) {
|
|
955
1064
|
var r = this.enter(), i = this, a = this.exit();
|
|
956
1065
|
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
957
1066
|
}
|
|
958
|
-
function
|
|
1067
|
+
function wr(t) {
|
|
959
1068
|
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, o = Math.min(i, a), s = new Array(i), c = 0; c < o; ++c)
|
|
960
|
-
for (var u = n[c], f = r[c],
|
|
961
|
-
(
|
|
1069
|
+
for (var u = n[c], f = r[c], d = u.length, l = s[c] = new Array(d), h, b = 0; b < d; ++b)
|
|
1070
|
+
(h = u[b] || f[b]) && (l[b] = h);
|
|
962
1071
|
for (; c < i; ++c)
|
|
963
1072
|
s[c] = n[c];
|
|
964
|
-
return new
|
|
1073
|
+
return new O(s, this._parents);
|
|
965
1074
|
}
|
|
966
|
-
function
|
|
1075
|
+
function br() {
|
|
967
1076
|
for (var t = this._groups, e = -1, n = t.length; ++e < n; )
|
|
968
1077
|
for (var r = t[e], i = r.length - 1, a = r[i], o; --i >= 0; )
|
|
969
1078
|
(o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
970
1079
|
return this;
|
|
971
1080
|
}
|
|
972
|
-
function
|
|
973
|
-
t || (t =
|
|
974
|
-
function e(
|
|
975
|
-
return
|
|
1081
|
+
function vr(t) {
|
|
1082
|
+
t || (t = Mr);
|
|
1083
|
+
function e(d, l) {
|
|
1084
|
+
return d && l ? t(d.__data__, l.__data__) : !d - !l;
|
|
976
1085
|
}
|
|
977
1086
|
for (var n = this._groups, r = n.length, i = new Array(r), a = 0; a < r; ++a) {
|
|
978
1087
|
for (var o = n[a], s = o.length, c = i[a] = new Array(s), u, f = 0; f < s; ++f)
|
|
979
1088
|
(u = o[f]) && (c[f] = u);
|
|
980
1089
|
c.sort(e);
|
|
981
1090
|
}
|
|
982
|
-
return new
|
|
1091
|
+
return new O(i, this._parents).order();
|
|
983
1092
|
}
|
|
984
|
-
function
|
|
1093
|
+
function Mr(t, e) {
|
|
985
1094
|
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
986
1095
|
}
|
|
987
|
-
function
|
|
1096
|
+
function _r() {
|
|
988
1097
|
var t = arguments[0];
|
|
989
1098
|
return arguments[0] = this, t.apply(null, arguments), this;
|
|
990
1099
|
}
|
|
991
|
-
function
|
|
1100
|
+
function Nr() {
|
|
992
1101
|
return Array.from(this);
|
|
993
1102
|
}
|
|
994
|
-
function
|
|
1103
|
+
function Sr() {
|
|
995
1104
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
996
1105
|
for (var r = t[e], i = 0, a = r.length; i < a; ++i) {
|
|
997
1106
|
var o = r[i];
|
|
@@ -1004,31 +1113,31 @@ function kr() {
|
|
|
1004
1113
|
for (const e of this) ++t;
|
|
1005
1114
|
return t;
|
|
1006
1115
|
}
|
|
1007
|
-
function
|
|
1116
|
+
function $r() {
|
|
1008
1117
|
return !this.node();
|
|
1009
1118
|
}
|
|
1010
|
-
function
|
|
1119
|
+
function Ar(t) {
|
|
1011
1120
|
for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
|
|
1012
1121
|
for (var i = e[n], a = 0, o = i.length, s; a < o; ++a)
|
|
1013
1122
|
(s = i[a]) && t.call(s, s.__data__, a, i);
|
|
1014
1123
|
return this;
|
|
1015
1124
|
}
|
|
1016
|
-
function
|
|
1125
|
+
function Er(t) {
|
|
1017
1126
|
return function() {
|
|
1018
1127
|
this.removeAttribute(t);
|
|
1019
1128
|
};
|
|
1020
1129
|
}
|
|
1021
|
-
function
|
|
1130
|
+
function Cr(t) {
|
|
1022
1131
|
return function() {
|
|
1023
1132
|
this.removeAttributeNS(t.space, t.local);
|
|
1024
1133
|
};
|
|
1025
1134
|
}
|
|
1026
|
-
function
|
|
1135
|
+
function Fr(t, e) {
|
|
1027
1136
|
return function() {
|
|
1028
1137
|
this.setAttribute(t, e);
|
|
1029
1138
|
};
|
|
1030
1139
|
}
|
|
1031
|
-
function
|
|
1140
|
+
function Rr(t, e) {
|
|
1032
1141
|
return function() {
|
|
1033
1142
|
this.setAttributeNS(t.space, t.local, e);
|
|
1034
1143
|
};
|
|
@@ -1039,51 +1148,51 @@ function Tr(t, e) {
|
|
|
1039
1148
|
n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
|
|
1040
1149
|
};
|
|
1041
1150
|
}
|
|
1042
|
-
function
|
|
1151
|
+
function Dr(t, e) {
|
|
1043
1152
|
return function() {
|
|
1044
1153
|
var n = e.apply(this, arguments);
|
|
1045
1154
|
n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
|
|
1046
1155
|
};
|
|
1047
1156
|
}
|
|
1048
|
-
function
|
|
1049
|
-
var n =
|
|
1157
|
+
function Lr(t, e) {
|
|
1158
|
+
var n = Le(t);
|
|
1050
1159
|
if (arguments.length < 2) {
|
|
1051
1160
|
var r = this.node();
|
|
1052
1161
|
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
1053
1162
|
}
|
|
1054
|
-
return this.each((e == null ? n.local ?
|
|
1163
|
+
return this.each((e == null ? n.local ? Cr : Er : typeof e == "function" ? n.local ? Dr : Tr : n.local ? Rr : Fr)(n, e));
|
|
1055
1164
|
}
|
|
1056
|
-
function
|
|
1165
|
+
function qe(t) {
|
|
1057
1166
|
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
|
1058
1167
|
}
|
|
1059
|
-
function
|
|
1168
|
+
function Hr(t) {
|
|
1060
1169
|
return function() {
|
|
1061
1170
|
this.style.removeProperty(t);
|
|
1062
1171
|
};
|
|
1063
1172
|
}
|
|
1064
|
-
function
|
|
1173
|
+
function Pr(t, e, n) {
|
|
1065
1174
|
return function() {
|
|
1066
1175
|
this.style.setProperty(t, e, n);
|
|
1067
1176
|
};
|
|
1068
1177
|
}
|
|
1069
|
-
function
|
|
1178
|
+
function Ur(t, e, n) {
|
|
1070
1179
|
return function() {
|
|
1071
1180
|
var r = e.apply(this, arguments);
|
|
1072
1181
|
r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
|
|
1073
1182
|
};
|
|
1074
1183
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
1184
|
+
function Ir(t, e, n) {
|
|
1185
|
+
return arguments.length > 1 ? this.each((e == null ? Hr : typeof e == "function" ? Ur : Pr)(t, e, n ?? "")) : qr(this.node(), t);
|
|
1077
1186
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return t.style.getPropertyValue(e) ||
|
|
1187
|
+
function qr(t, e) {
|
|
1188
|
+
return t.style.getPropertyValue(e) || qe(t).getComputedStyle(t, null).getPropertyValue(e);
|
|
1080
1189
|
}
|
|
1081
|
-
function
|
|
1190
|
+
function Vr(t) {
|
|
1082
1191
|
return function() {
|
|
1083
1192
|
delete this[t];
|
|
1084
1193
|
};
|
|
1085
1194
|
}
|
|
1086
|
-
function
|
|
1195
|
+
function Or(t, e) {
|
|
1087
1196
|
return function() {
|
|
1088
1197
|
this[t] = e;
|
|
1089
1198
|
};
|
|
@@ -1094,19 +1203,19 @@ function zr(t, e) {
|
|
|
1094
1203
|
n == null ? delete this[t] : this[t] = n;
|
|
1095
1204
|
};
|
|
1096
1205
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
1206
|
+
function Wr(t, e) {
|
|
1207
|
+
return arguments.length > 1 ? this.each((e == null ? Vr : typeof e == "function" ? zr : Or)(t, e)) : this.node()[t];
|
|
1099
1208
|
}
|
|
1100
|
-
function
|
|
1209
|
+
function Ve(t) {
|
|
1101
1210
|
return t.trim().split(/^|\s+/);
|
|
1102
1211
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return t.classList || new
|
|
1212
|
+
function Gt(t) {
|
|
1213
|
+
return t.classList || new Oe(t);
|
|
1105
1214
|
}
|
|
1106
|
-
function
|
|
1107
|
-
this._node = t, this._names =
|
|
1215
|
+
function Oe(t) {
|
|
1216
|
+
this._node = t, this._names = Ve(t.getAttribute("class") || "");
|
|
1108
1217
|
}
|
|
1109
|
-
|
|
1218
|
+
Oe.prototype = {
|
|
1110
1219
|
add: function(t) {
|
|
1111
1220
|
var e = this._names.indexOf(t);
|
|
1112
1221
|
e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
|
|
@@ -1119,129 +1228,129 @@ Ie.prototype = {
|
|
|
1119
1228
|
return this._names.indexOf(t) >= 0;
|
|
1120
1229
|
}
|
|
1121
1230
|
};
|
|
1122
|
-
function
|
|
1123
|
-
for (var n =
|
|
1231
|
+
function ze(t, e) {
|
|
1232
|
+
for (var n = Gt(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
1124
1233
|
}
|
|
1125
|
-
function
|
|
1126
|
-
for (var n =
|
|
1234
|
+
function We(t, e) {
|
|
1235
|
+
for (var n = Gt(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
|
1127
1236
|
}
|
|
1128
|
-
function
|
|
1237
|
+
function Yr(t) {
|
|
1129
1238
|
return function() {
|
|
1130
|
-
|
|
1239
|
+
ze(this, t);
|
|
1131
1240
|
};
|
|
1132
1241
|
}
|
|
1133
|
-
function
|
|
1242
|
+
function Br(t) {
|
|
1134
1243
|
return function() {
|
|
1135
|
-
|
|
1244
|
+
We(this, t);
|
|
1136
1245
|
};
|
|
1137
1246
|
}
|
|
1138
|
-
function
|
|
1247
|
+
function Xr(t, e) {
|
|
1139
1248
|
return function() {
|
|
1140
|
-
(e.apply(this, arguments) ?
|
|
1249
|
+
(e.apply(this, arguments) ? ze : We)(this, t);
|
|
1141
1250
|
};
|
|
1142
1251
|
}
|
|
1143
|
-
function
|
|
1144
|
-
var n =
|
|
1252
|
+
function Gr(t, e) {
|
|
1253
|
+
var n = Ve(t + "");
|
|
1145
1254
|
if (arguments.length < 2) {
|
|
1146
|
-
for (var r =
|
|
1255
|
+
for (var r = Gt(this.node()), i = -1, a = n.length; ++i < a; ) if (!r.contains(n[i])) return !1;
|
|
1147
1256
|
return !0;
|
|
1148
1257
|
}
|
|
1149
|
-
return this.each((typeof e == "function" ?
|
|
1258
|
+
return this.each((typeof e == "function" ? Xr : e ? Yr : Br)(n, e));
|
|
1150
1259
|
}
|
|
1151
1260
|
function Qr() {
|
|
1152
1261
|
this.textContent = "";
|
|
1153
1262
|
}
|
|
1154
|
-
function
|
|
1263
|
+
function Kr(t) {
|
|
1155
1264
|
return function() {
|
|
1156
1265
|
this.textContent = t;
|
|
1157
1266
|
};
|
|
1158
1267
|
}
|
|
1159
|
-
function
|
|
1268
|
+
function Jr(t) {
|
|
1160
1269
|
return function() {
|
|
1161
1270
|
var e = t.apply(this, arguments);
|
|
1162
1271
|
this.textContent = e ?? "";
|
|
1163
1272
|
};
|
|
1164
1273
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return arguments.length ? this.each(t == null ? Qr : (typeof t == "function" ?
|
|
1274
|
+
function Zr(t) {
|
|
1275
|
+
return arguments.length ? this.each(t == null ? Qr : (typeof t == "function" ? Jr : Kr)(t)) : this.node().textContent;
|
|
1167
1276
|
}
|
|
1168
|
-
function
|
|
1277
|
+
function jr() {
|
|
1169
1278
|
this.innerHTML = "";
|
|
1170
1279
|
}
|
|
1171
|
-
function
|
|
1280
|
+
function ti(t) {
|
|
1172
1281
|
return function() {
|
|
1173
1282
|
this.innerHTML = t;
|
|
1174
1283
|
};
|
|
1175
1284
|
}
|
|
1176
|
-
function
|
|
1285
|
+
function ei(t) {
|
|
1177
1286
|
return function() {
|
|
1178
1287
|
var e = t.apply(this, arguments);
|
|
1179
1288
|
this.innerHTML = e ?? "";
|
|
1180
1289
|
};
|
|
1181
1290
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return arguments.length ? this.each(t == null ?
|
|
1291
|
+
function ni(t) {
|
|
1292
|
+
return arguments.length ? this.each(t == null ? jr : (typeof t == "function" ? ei : ti)(t)) : this.node().innerHTML;
|
|
1184
1293
|
}
|
|
1185
|
-
function
|
|
1294
|
+
function ri() {
|
|
1186
1295
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
1187
1296
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return this.each(
|
|
1297
|
+
function ii() {
|
|
1298
|
+
return this.each(ri);
|
|
1190
1299
|
}
|
|
1191
|
-
function
|
|
1300
|
+
function ai() {
|
|
1192
1301
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
1193
1302
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return this.each(
|
|
1303
|
+
function oi() {
|
|
1304
|
+
return this.each(ai);
|
|
1196
1305
|
}
|
|
1197
|
-
function
|
|
1306
|
+
function si(t) {
|
|
1198
1307
|
var e = typeof t == "function" ? t : He(t);
|
|
1199
1308
|
return this.select(function() {
|
|
1200
1309
|
return this.appendChild(e.apply(this, arguments));
|
|
1201
1310
|
});
|
|
1202
1311
|
}
|
|
1203
|
-
function
|
|
1312
|
+
function ci() {
|
|
1204
1313
|
return null;
|
|
1205
1314
|
}
|
|
1206
|
-
function
|
|
1207
|
-
var n = typeof t == "function" ? t : He(t), r = e == null ?
|
|
1315
|
+
function ui(t, e) {
|
|
1316
|
+
var n = typeof t == "function" ? t : He(t), r = e == null ? ci : typeof e == "function" ? e : Pe(e);
|
|
1208
1317
|
return this.select(function() {
|
|
1209
1318
|
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
1210
1319
|
});
|
|
1211
1320
|
}
|
|
1212
|
-
function
|
|
1321
|
+
function li() {
|
|
1213
1322
|
var t = this.parentNode;
|
|
1214
1323
|
t && t.removeChild(this);
|
|
1215
1324
|
}
|
|
1216
|
-
function
|
|
1217
|
-
return this.each(
|
|
1325
|
+
function fi() {
|
|
1326
|
+
return this.each(li);
|
|
1218
1327
|
}
|
|
1219
|
-
function
|
|
1328
|
+
function hi() {
|
|
1220
1329
|
var t = this.cloneNode(!1), e = this.parentNode;
|
|
1221
1330
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
1222
1331
|
}
|
|
1223
|
-
function
|
|
1332
|
+
function di() {
|
|
1224
1333
|
var t = this.cloneNode(!0), e = this.parentNode;
|
|
1225
1334
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
1226
1335
|
}
|
|
1227
|
-
function
|
|
1228
|
-
return this.select(t ?
|
|
1336
|
+
function mi(t) {
|
|
1337
|
+
return this.select(t ? di : hi);
|
|
1229
1338
|
}
|
|
1230
|
-
function
|
|
1339
|
+
function gi(t) {
|
|
1231
1340
|
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
|
1232
1341
|
}
|
|
1233
|
-
function
|
|
1342
|
+
function yi(t) {
|
|
1234
1343
|
return function(e) {
|
|
1235
1344
|
t.call(this, e, this.__data__);
|
|
1236
1345
|
};
|
|
1237
1346
|
}
|
|
1238
|
-
function
|
|
1347
|
+
function pi(t) {
|
|
1239
1348
|
return t.trim().split(/^|\s+/).map(function(e) {
|
|
1240
1349
|
var n = "", r = e.indexOf(".");
|
|
1241
1350
|
return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
|
|
1242
1351
|
});
|
|
1243
1352
|
}
|
|
1244
|
-
function
|
|
1353
|
+
function xi(t) {
|
|
1245
1354
|
return function() {
|
|
1246
1355
|
var e = this.__on;
|
|
1247
1356
|
if (e) {
|
|
@@ -1251,9 +1360,9 @@ function pi(t) {
|
|
|
1251
1360
|
}
|
|
1252
1361
|
};
|
|
1253
1362
|
}
|
|
1254
|
-
function
|
|
1363
|
+
function wi(t, e, n) {
|
|
1255
1364
|
return function() {
|
|
1256
|
-
var r = this.__on, i, a =
|
|
1365
|
+
var r = this.__on, i, a = yi(e);
|
|
1257
1366
|
if (r) {
|
|
1258
1367
|
for (var o = 0, s = r.length; o < s; ++o)
|
|
1259
1368
|
if ((i = r[o]).type === t.type && i.name === t.name) {
|
|
@@ -1264,8 +1373,8 @@ function yi(t, e, n) {
|
|
|
1264
1373
|
this.addEventListener(t.type, a, n), i = { type: t.type, name: t.name, value: e, listener: a, options: n }, r ? r.push(i) : this.__on = [i];
|
|
1265
1374
|
};
|
|
1266
1375
|
}
|
|
1267
|
-
function
|
|
1268
|
-
var r =
|
|
1376
|
+
function bi(t, e, n) {
|
|
1377
|
+
var r = pi(t + ""), i, a = r.length, o;
|
|
1269
1378
|
if (arguments.length < 2) {
|
|
1270
1379
|
var s = this.node().__on;
|
|
1271
1380
|
if (s) {
|
|
@@ -1276,90 +1385,90 @@ function xi(t, e, n) {
|
|
|
1276
1385
|
}
|
|
1277
1386
|
return;
|
|
1278
1387
|
}
|
|
1279
|
-
for (s = e ?
|
|
1388
|
+
for (s = e ? wi : xi, i = 0; i < a; ++i) this.each(s(r[i], e, n));
|
|
1280
1389
|
return this;
|
|
1281
1390
|
}
|
|
1282
1391
|
function Ye(t, e, n) {
|
|
1283
|
-
var r =
|
|
1392
|
+
var r = qe(t), i = r.CustomEvent;
|
|
1284
1393
|
typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
|
|
1285
1394
|
}
|
|
1286
|
-
function
|
|
1395
|
+
function vi(t, e) {
|
|
1287
1396
|
return function() {
|
|
1288
1397
|
return Ye(this, t, e);
|
|
1289
1398
|
};
|
|
1290
1399
|
}
|
|
1291
|
-
function
|
|
1400
|
+
function Mi(t, e) {
|
|
1292
1401
|
return function() {
|
|
1293
1402
|
return Ye(this, t, e.apply(this, arguments));
|
|
1294
1403
|
};
|
|
1295
1404
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return this.each((typeof e == "function" ?
|
|
1405
|
+
function _i(t, e) {
|
|
1406
|
+
return this.each((typeof e == "function" ? Mi : vi)(t, e));
|
|
1298
1407
|
}
|
|
1299
|
-
function*
|
|
1408
|
+
function* Ni() {
|
|
1300
1409
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
1301
1410
|
for (var r = t[e], i = 0, a = r.length, o; i < a; ++i)
|
|
1302
1411
|
(o = r[i]) && (yield o);
|
|
1303
1412
|
}
|
|
1304
|
-
var
|
|
1305
|
-
function
|
|
1413
|
+
var Si = [null];
|
|
1414
|
+
function O(t, e) {
|
|
1306
1415
|
this._groups = t, this._parents = e;
|
|
1307
1416
|
}
|
|
1308
1417
|
function ki() {
|
|
1309
1418
|
return this;
|
|
1310
1419
|
}
|
|
1311
|
-
|
|
1312
|
-
constructor:
|
|
1313
|
-
select:
|
|
1314
|
-
selectAll:
|
|
1315
|
-
selectChild:
|
|
1316
|
-
selectChildren:
|
|
1317
|
-
filter:
|
|
1318
|
-
data:
|
|
1319
|
-
enter:
|
|
1320
|
-
exit:
|
|
1321
|
-
join:
|
|
1322
|
-
merge:
|
|
1420
|
+
O.prototype = {
|
|
1421
|
+
constructor: O,
|
|
1422
|
+
select: Gn,
|
|
1423
|
+
selectAll: jn,
|
|
1424
|
+
selectChild: ir,
|
|
1425
|
+
selectChildren: cr,
|
|
1426
|
+
filter: ur,
|
|
1427
|
+
data: gr,
|
|
1428
|
+
enter: lr,
|
|
1429
|
+
exit: pr,
|
|
1430
|
+
join: xr,
|
|
1431
|
+
merge: wr,
|
|
1323
1432
|
selection: ki,
|
|
1324
|
-
order:
|
|
1325
|
-
sort:
|
|
1326
|
-
call:
|
|
1327
|
-
nodes:
|
|
1328
|
-
node:
|
|
1433
|
+
order: br,
|
|
1434
|
+
sort: vr,
|
|
1435
|
+
call: _r,
|
|
1436
|
+
nodes: Nr,
|
|
1437
|
+
node: Sr,
|
|
1329
1438
|
size: kr,
|
|
1330
|
-
empty:
|
|
1331
|
-
each:
|
|
1332
|
-
attr:
|
|
1333
|
-
style:
|
|
1334
|
-
property:
|
|
1335
|
-
classed:
|
|
1336
|
-
text:
|
|
1337
|
-
html:
|
|
1338
|
-
raise:
|
|
1339
|
-
lower:
|
|
1340
|
-
append:
|
|
1341
|
-
insert:
|
|
1342
|
-
remove:
|
|
1343
|
-
clone:
|
|
1344
|
-
datum:
|
|
1345
|
-
on:
|
|
1346
|
-
dispatch:
|
|
1347
|
-
[Symbol.iterator]:
|
|
1439
|
+
empty: $r,
|
|
1440
|
+
each: Ar,
|
|
1441
|
+
attr: Lr,
|
|
1442
|
+
style: Ir,
|
|
1443
|
+
property: Wr,
|
|
1444
|
+
classed: Gr,
|
|
1445
|
+
text: Zr,
|
|
1446
|
+
html: ni,
|
|
1447
|
+
raise: ii,
|
|
1448
|
+
lower: oi,
|
|
1449
|
+
append: si,
|
|
1450
|
+
insert: ui,
|
|
1451
|
+
remove: fi,
|
|
1452
|
+
clone: mi,
|
|
1453
|
+
datum: gi,
|
|
1454
|
+
on: bi,
|
|
1455
|
+
dispatch: _i,
|
|
1456
|
+
[Symbol.iterator]: Ni
|
|
1348
1457
|
};
|
|
1349
1458
|
function ct(t) {
|
|
1350
|
-
return typeof t == "string" ? new
|
|
1459
|
+
return typeof t == "string" ? new O([[document.querySelector(t)]], [document.documentElement]) : new O([[t]], Si);
|
|
1351
1460
|
}
|
|
1352
|
-
function
|
|
1461
|
+
function Qt(t, e, n) {
|
|
1353
1462
|
t.prototype = e.prototype = n, n.constructor = t;
|
|
1354
1463
|
}
|
|
1355
|
-
function
|
|
1464
|
+
function Be(t, e) {
|
|
1356
1465
|
var n = Object.create(t.prototype);
|
|
1357
1466
|
for (var r in e) n[r] = e[r];
|
|
1358
1467
|
return n;
|
|
1359
1468
|
}
|
|
1360
1469
|
function dt() {
|
|
1361
1470
|
}
|
|
1362
|
-
var lt = 0.7,
|
|
1471
|
+
var lt = 0.7, St = 1 / lt, it = "\\s*([+-]?\\d+)\\s*", ft = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Y = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $i = /^#([0-9a-f]{3,8})$/, Ai = new RegExp(`^rgb\\(${it},${it},${it}\\)$`), Ei = new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`), Ci = new RegExp(`^rgba\\(${it},${it},${it},${ft}\\)$`), Fi = new RegExp(`^rgba\\(${Y},${Y},${Y},${ft}\\)$`), Ri = new RegExp(`^hsl\\(${ft},${Y},${Y}\\)$`), Ti = new RegExp(`^hsla\\(${ft},${Y},${Y},${ft}\\)$`), de = {
|
|
1363
1472
|
aliceblue: 15792383,
|
|
1364
1473
|
antiquewhite: 16444375,
|
|
1365
1474
|
aqua: 65535,
|
|
@@ -1509,7 +1618,7 @@ var lt = 0.7, Nt = 1 / lt, it = "\\s*([+-]?\\d+)\\s*", ft = "\\s*([+-]?(?:\\d*\\
|
|
|
1509
1618
|
yellow: 16776960,
|
|
1510
1619
|
yellowgreen: 10145074
|
|
1511
1620
|
};
|
|
1512
|
-
|
|
1621
|
+
Qt(dt, ht, {
|
|
1513
1622
|
copy(t) {
|
|
1514
1623
|
return Object.assign(new this.constructor(), this, t);
|
|
1515
1624
|
},
|
|
@@ -1519,76 +1628,76 @@ Gt(dt, ht, {
|
|
|
1519
1628
|
hex: me,
|
|
1520
1629
|
// Deprecated! Use color.formatHex.
|
|
1521
1630
|
formatHex: me,
|
|
1522
|
-
formatHex8:
|
|
1523
|
-
formatHsl:
|
|
1631
|
+
formatHex8: Di,
|
|
1632
|
+
formatHsl: Li,
|
|
1524
1633
|
formatRgb: ge,
|
|
1525
1634
|
toString: ge
|
|
1526
1635
|
});
|
|
1527
1636
|
function me() {
|
|
1528
1637
|
return this.rgb().formatHex();
|
|
1529
1638
|
}
|
|
1530
|
-
function
|
|
1639
|
+
function Di() {
|
|
1531
1640
|
return this.rgb().formatHex8();
|
|
1532
1641
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return
|
|
1642
|
+
function Li() {
|
|
1643
|
+
return Xe(this).formatHsl();
|
|
1535
1644
|
}
|
|
1536
1645
|
function ge() {
|
|
1537
1646
|
return this.rgb().formatRgb();
|
|
1538
1647
|
}
|
|
1539
1648
|
function ht(t) {
|
|
1540
1649
|
var e, n;
|
|
1541
|
-
return t = (t + "").trim().toLowerCase(), (e =
|
|
1650
|
+
return t = (t + "").trim().toLowerCase(), (e = $i.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? ye(e) : n === 3 ? new I(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? pt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? pt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = Ai.exec(t)) ? new I(e[1], e[2], e[3], 1) : (e = Ei.exec(t)) ? new I(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Ci.exec(t)) ? pt(e[1], e[2], e[3], e[4]) : (e = Fi.exec(t)) ? pt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Ri.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, 1) : (e = Ti.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, e[4]) : de.hasOwnProperty(t) ? ye(de[t]) : t === "transparent" ? new I(NaN, NaN, NaN, 0) : null;
|
|
1542
1651
|
}
|
|
1543
|
-
function
|
|
1544
|
-
return new
|
|
1652
|
+
function ye(t) {
|
|
1653
|
+
return new I(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
|
|
1545
1654
|
}
|
|
1546
|
-
function
|
|
1547
|
-
return r <= 0 && (t = e = n = NaN), new
|
|
1655
|
+
function pt(t, e, n, r) {
|
|
1656
|
+
return r <= 0 && (t = e = n = NaN), new I(t, e, n, r);
|
|
1548
1657
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return t instanceof dt || (t = ht(t)), t ? (t = t.rgb(), new
|
|
1658
|
+
function Hi(t) {
|
|
1659
|
+
return t instanceof dt || (t = ht(t)), t ? (t = t.rgb(), new I(t.r, t.g, t.b, t.opacity)) : new I();
|
|
1551
1660
|
}
|
|
1552
|
-
function
|
|
1553
|
-
return arguments.length === 1 ?
|
|
1661
|
+
function Wt(t, e, n, r) {
|
|
1662
|
+
return arguments.length === 1 ? Hi(t) : new I(t, e, n, r ?? 1);
|
|
1554
1663
|
}
|
|
1555
|
-
function
|
|
1664
|
+
function I(t, e, n, r) {
|
|
1556
1665
|
this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
|
|
1557
1666
|
}
|
|
1558
|
-
|
|
1667
|
+
Qt(I, Wt, Be(dt, {
|
|
1559
1668
|
brighter(t) {
|
|
1560
|
-
return t = t == null ?
|
|
1669
|
+
return t = t == null ? St : Math.pow(St, t), new I(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
1561
1670
|
},
|
|
1562
1671
|
darker(t) {
|
|
1563
|
-
return t = t == null ? lt : Math.pow(lt, t), new
|
|
1672
|
+
return t = t == null ? lt : Math.pow(lt, t), new I(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
1564
1673
|
},
|
|
1565
1674
|
rgb() {
|
|
1566
1675
|
return this;
|
|
1567
1676
|
},
|
|
1568
1677
|
clamp() {
|
|
1569
|
-
return new
|
|
1678
|
+
return new I(et(this.r), et(this.g), et(this.b), kt(this.opacity));
|
|
1570
1679
|
},
|
|
1571
1680
|
displayable() {
|
|
1572
1681
|
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;
|
|
1573
1682
|
},
|
|
1574
|
-
hex:
|
|
1683
|
+
hex: pe,
|
|
1575
1684
|
// Deprecated! Use color.formatHex.
|
|
1576
|
-
formatHex:
|
|
1577
|
-
formatHex8:
|
|
1685
|
+
formatHex: pe,
|
|
1686
|
+
formatHex8: Pi,
|
|
1578
1687
|
formatRgb: xe,
|
|
1579
1688
|
toString: xe
|
|
1580
1689
|
}));
|
|
1581
|
-
function
|
|
1690
|
+
function pe() {
|
|
1582
1691
|
return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}`;
|
|
1583
1692
|
}
|
|
1584
|
-
function
|
|
1693
|
+
function Pi() {
|
|
1585
1694
|
return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}${tt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1586
1695
|
}
|
|
1587
1696
|
function xe() {
|
|
1588
|
-
const t =
|
|
1697
|
+
const t = kt(this.opacity);
|
|
1589
1698
|
return `${t === 1 ? "rgb(" : "rgba("}${et(this.r)}, ${et(this.g)}, ${et(this.b)}${t === 1 ? ")" : `, ${t})`}`;
|
|
1590
1699
|
}
|
|
1591
|
-
function
|
|
1700
|
+
function kt(t) {
|
|
1592
1701
|
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
|
|
1593
1702
|
}
|
|
1594
1703
|
function et(t) {
|
|
@@ -1598,46 +1707,46 @@ function tt(t) {
|
|
|
1598
1707
|
return t = et(t), (t < 16 ? "0" : "") + t.toString(16);
|
|
1599
1708
|
}
|
|
1600
1709
|
function we(t, e, n, r) {
|
|
1601
|
-
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new
|
|
1710
|
+
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new z(t, e, n, r);
|
|
1602
1711
|
}
|
|
1603
|
-
function
|
|
1604
|
-
if (t instanceof
|
|
1605
|
-
if (t instanceof dt || (t = ht(t)), !t) return new
|
|
1606
|
-
if (t instanceof
|
|
1712
|
+
function Xe(t) {
|
|
1713
|
+
if (t instanceof z) return new z(t.h, t.s, t.l, t.opacity);
|
|
1714
|
+
if (t instanceof dt || (t = ht(t)), !t) return new z();
|
|
1715
|
+
if (t instanceof z) return t;
|
|
1607
1716
|
t = t.rgb();
|
|
1608
1717
|
var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = NaN, s = a - i, c = (a + i) / 2;
|
|
1609
|
-
return s ? (e === a ? o = (n - r) / s + (n < r) * 6 : n === a ? o = (r - e) / s + 2 : o = (e - n) / s + 4, s /= c < 0.5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new
|
|
1718
|
+
return s ? (e === a ? o = (n - r) / s + (n < r) * 6 : n === a ? o = (r - e) / s + 2 : o = (e - n) / s + 4, s /= c < 0.5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new z(o, s, c, t.opacity);
|
|
1610
1719
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return arguments.length === 1 ?
|
|
1720
|
+
function Ui(t, e, n, r) {
|
|
1721
|
+
return arguments.length === 1 ? Xe(t) : new z(t, e, n, r ?? 1);
|
|
1613
1722
|
}
|
|
1614
|
-
function
|
|
1723
|
+
function z(t, e, n, r) {
|
|
1615
1724
|
this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
|
|
1616
1725
|
}
|
|
1617
|
-
|
|
1726
|
+
Qt(z, Ui, Be(dt, {
|
|
1618
1727
|
brighter(t) {
|
|
1619
|
-
return t = t == null ?
|
|
1728
|
+
return t = t == null ? St : Math.pow(St, t), new z(this.h, this.s, this.l * t, this.opacity);
|
|
1620
1729
|
},
|
|
1621
1730
|
darker(t) {
|
|
1622
|
-
return t = t == null ? lt : Math.pow(lt, t), new
|
|
1731
|
+
return t = t == null ? lt : Math.pow(lt, t), new z(this.h, this.s, this.l * t, this.opacity);
|
|
1623
1732
|
},
|
|
1624
1733
|
rgb() {
|
|
1625
1734
|
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
|
|
1626
|
-
return new
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1735
|
+
return new I(
|
|
1736
|
+
Pt(t >= 240 ? t - 240 : t + 120, i, r),
|
|
1737
|
+
Pt(t, i, r),
|
|
1738
|
+
Pt(t < 120 ? t + 240 : t - 120, i, r),
|
|
1630
1739
|
this.opacity
|
|
1631
1740
|
);
|
|
1632
1741
|
},
|
|
1633
1742
|
clamp() {
|
|
1634
|
-
return new
|
|
1743
|
+
return new z(be(this.h), xt(this.s), xt(this.l), kt(this.opacity));
|
|
1635
1744
|
},
|
|
1636
1745
|
displayable() {
|
|
1637
1746
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
1638
1747
|
},
|
|
1639
1748
|
formatHsl() {
|
|
1640
|
-
const t =
|
|
1749
|
+
const t = kt(this.opacity);
|
|
1641
1750
|
return `${t === 1 ? "hsl(" : "hsla("}${be(this.h)}, ${xt(this.s) * 100}%, ${xt(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
|
|
1642
1751
|
}
|
|
1643
1752
|
}));
|
|
@@ -1647,40 +1756,40 @@ function be(t) {
|
|
|
1647
1756
|
function xt(t) {
|
|
1648
1757
|
return Math.max(0, Math.min(1, t || 0));
|
|
1649
1758
|
}
|
|
1650
|
-
function
|
|
1759
|
+
function Pt(t, e, n) {
|
|
1651
1760
|
return (t < 60 ? e + (n - e) * t / 60 : t < 180 ? n : t < 240 ? e + (n - e) * (240 - t) / 60 : e) * 255;
|
|
1652
1761
|
}
|
|
1653
|
-
const
|
|
1654
|
-
function
|
|
1762
|
+
const Kt = (t) => () => t;
|
|
1763
|
+
function Ii(t, e) {
|
|
1655
1764
|
return function(n) {
|
|
1656
1765
|
return t + n * e;
|
|
1657
1766
|
};
|
|
1658
1767
|
}
|
|
1659
|
-
function
|
|
1768
|
+
function qi(t, e, n) {
|
|
1660
1769
|
return t = Math.pow(t, n), e = Math.pow(e, n) - t, n = 1 / n, function(r) {
|
|
1661
1770
|
return Math.pow(t + r * e, n);
|
|
1662
1771
|
};
|
|
1663
1772
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return (t = +t) == 1 ?
|
|
1666
|
-
return n - e ?
|
|
1773
|
+
function Vi(t) {
|
|
1774
|
+
return (t = +t) == 1 ? Ge : function(e, n) {
|
|
1775
|
+
return n - e ? qi(e, n, t) : Kt(isNaN(e) ? n : e);
|
|
1667
1776
|
};
|
|
1668
1777
|
}
|
|
1669
|
-
function
|
|
1778
|
+
function Ge(t, e) {
|
|
1670
1779
|
var n = e - t;
|
|
1671
|
-
return n ?
|
|
1780
|
+
return n ? Ii(t, n) : Kt(isNaN(t) ? e : t);
|
|
1672
1781
|
}
|
|
1673
1782
|
const ve = (function t(e) {
|
|
1674
|
-
var n =
|
|
1783
|
+
var n = Vi(e);
|
|
1675
1784
|
function r(i, a) {
|
|
1676
|
-
var o = n((i =
|
|
1785
|
+
var o = n((i = Wt(i)).r, (a = Wt(a)).r), s = n(i.g, a.g), c = n(i.b, a.b), u = Ge(i.opacity, a.opacity);
|
|
1677
1786
|
return function(f) {
|
|
1678
1787
|
return i.r = o(f), i.g = s(f), i.b = c(f), i.opacity = u(f), i + "";
|
|
1679
1788
|
};
|
|
1680
1789
|
}
|
|
1681
1790
|
return r.gamma = t, r;
|
|
1682
1791
|
})(1);
|
|
1683
|
-
function
|
|
1792
|
+
function Oi(t, e) {
|
|
1684
1793
|
e || (e = []);
|
|
1685
1794
|
var n = t ? Math.min(e.length, t.length) : 0, r = e.slice(), i;
|
|
1686
1795
|
return function(a) {
|
|
@@ -1691,16 +1800,16 @@ function Vi(t, e) {
|
|
|
1691
1800
|
function zi(t) {
|
|
1692
1801
|
return ArrayBuffer.isView(t) && !(t instanceof DataView);
|
|
1693
1802
|
}
|
|
1694
|
-
function
|
|
1803
|
+
function Wi(t, e) {
|
|
1695
1804
|
var n = e ? e.length : 0, r = t ? Math.min(n, t.length) : 0, i = new Array(r), a = new Array(n), o;
|
|
1696
|
-
for (o = 0; o < r; ++o) i[o] =
|
|
1805
|
+
for (o = 0; o < r; ++o) i[o] = Jt(t[o], e[o]);
|
|
1697
1806
|
for (; o < n; ++o) a[o] = e[o];
|
|
1698
1807
|
return function(s) {
|
|
1699
1808
|
for (o = 0; o < r; ++o) a[o] = i[o](s);
|
|
1700
1809
|
return a;
|
|
1701
1810
|
};
|
|
1702
1811
|
}
|
|
1703
|
-
function
|
|
1812
|
+
function Yi(t, e) {
|
|
1704
1813
|
var n = /* @__PURE__ */ new Date();
|
|
1705
1814
|
return t = +t, e = +e, function(r) {
|
|
1706
1815
|
return n.setTime(t * (1 - r) + e * r), n;
|
|
@@ -1711,46 +1820,46 @@ function $t(t, e) {
|
|
|
1711
1820
|
return t * (1 - n) + e * n;
|
|
1712
1821
|
};
|
|
1713
1822
|
}
|
|
1714
|
-
function
|
|
1823
|
+
function Bi(t, e) {
|
|
1715
1824
|
var n = {}, r = {}, i;
|
|
1716
1825
|
(t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
|
|
1717
1826
|
for (i in e)
|
|
1718
|
-
i in t ? n[i] =
|
|
1827
|
+
i in t ? n[i] = Jt(t[i], e[i]) : r[i] = e[i];
|
|
1719
1828
|
return function(a) {
|
|
1720
1829
|
for (i in n) r[i] = n[i](a);
|
|
1721
1830
|
return r;
|
|
1722
1831
|
};
|
|
1723
1832
|
}
|
|
1724
|
-
var Yt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
1725
|
-
function
|
|
1833
|
+
var Yt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ut = new RegExp(Yt.source, "g");
|
|
1834
|
+
function Xi(t) {
|
|
1726
1835
|
return function() {
|
|
1727
1836
|
return t;
|
|
1728
1837
|
};
|
|
1729
1838
|
}
|
|
1730
|
-
function
|
|
1839
|
+
function Gi(t) {
|
|
1731
1840
|
return function(e) {
|
|
1732
1841
|
return t(e) + "";
|
|
1733
1842
|
};
|
|
1734
1843
|
}
|
|
1735
1844
|
function Qi(t, e) {
|
|
1736
|
-
var n = Yt.lastIndex =
|
|
1737
|
-
for (t = t + "", e = e + ""; (r = Yt.exec(t)) && (i =
|
|
1738
|
-
(a = i.index) > n && (a = e.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({ i: o, x: $t(r, i) })), n =
|
|
1739
|
-
return n < e.length && (a = e.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ?
|
|
1740
|
-
for (var f = 0,
|
|
1845
|
+
var n = Yt.lastIndex = Ut.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
|
|
1846
|
+
for (t = t + "", e = e + ""; (r = Yt.exec(t)) && (i = Ut.exec(e)); )
|
|
1847
|
+
(a = i.index) > n && (a = e.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({ i: o, x: $t(r, i) })), n = Ut.lastIndex;
|
|
1848
|
+
return n < e.length && (a = e.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Gi(c[0].x) : Xi(e) : (e = c.length, function(u) {
|
|
1849
|
+
for (var f = 0, d; f < e; ++f) s[(d = c[f]).i] = d.x(u);
|
|
1741
1850
|
return s.join("");
|
|
1742
1851
|
});
|
|
1743
1852
|
}
|
|
1744
|
-
function
|
|
1853
|
+
function Jt(t, e) {
|
|
1745
1854
|
var n = typeof e, r;
|
|
1746
|
-
return e == null || n === "boolean" ?
|
|
1855
|
+
return e == null || n === "boolean" ? Kt(e) : (n === "number" ? $t : n === "string" ? (r = ht(e)) ? (e = r, ve) : Qi : e instanceof ht ? ve : e instanceof Date ? Yi : zi(e) ? Oi : Array.isArray(e) ? Wi : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Bi : $t)(t, e);
|
|
1747
1856
|
}
|
|
1748
|
-
function
|
|
1857
|
+
function Ki(t, e) {
|
|
1749
1858
|
return t = +t, e = +e, function(n) {
|
|
1750
1859
|
return Math.round(t * (1 - n) + e * n);
|
|
1751
1860
|
};
|
|
1752
1861
|
}
|
|
1753
|
-
function
|
|
1862
|
+
function Ji(t) {
|
|
1754
1863
|
return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
|
|
1755
1864
|
}
|
|
1756
1865
|
function At(t, e) {
|
|
@@ -1764,25 +1873,25 @@ function At(t, e) {
|
|
|
1764
1873
|
function at(t) {
|
|
1765
1874
|
return t = At(Math.abs(t)), t ? t[1] : NaN;
|
|
1766
1875
|
}
|
|
1767
|
-
function
|
|
1876
|
+
function Zi(t, e) {
|
|
1768
1877
|
return function(n, r) {
|
|
1769
1878
|
for (var i = n.length, a = [], o = 0, s = t[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r)); )
|
|
1770
1879
|
s = t[o = (o + 1) % t.length];
|
|
1771
1880
|
return a.reverse().join(e);
|
|
1772
1881
|
};
|
|
1773
1882
|
}
|
|
1774
|
-
function
|
|
1883
|
+
function ji(t) {
|
|
1775
1884
|
return function(e) {
|
|
1776
1885
|
return e.replace(/[0-9]/g, function(n) {
|
|
1777
1886
|
return t[+n];
|
|
1778
1887
|
});
|
|
1779
1888
|
};
|
|
1780
1889
|
}
|
|
1781
|
-
var
|
|
1782
|
-
function
|
|
1783
|
-
if (!(e =
|
|
1890
|
+
var ta = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
1891
|
+
function Et(t) {
|
|
1892
|
+
if (!(e = ta.exec(t))) throw new Error("invalid format: " + t);
|
|
1784
1893
|
var e;
|
|
1785
|
-
return new
|
|
1894
|
+
return new Zt({
|
|
1786
1895
|
fill: e[1],
|
|
1787
1896
|
align: e[2],
|
|
1788
1897
|
sign: e[3],
|
|
@@ -1795,14 +1904,14 @@ function Ct(t) {
|
|
|
1795
1904
|
type: e[10]
|
|
1796
1905
|
});
|
|
1797
1906
|
}
|
|
1798
|
-
|
|
1799
|
-
function
|
|
1907
|
+
Et.prototype = Zt.prototype;
|
|
1908
|
+
function Zt(t) {
|
|
1800
1909
|
this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
|
|
1801
1910
|
}
|
|
1802
|
-
|
|
1911
|
+
Zt.prototype.toString = function() {
|
|
1803
1912
|
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;
|
|
1804
1913
|
};
|
|
1805
|
-
function
|
|
1914
|
+
function ea(t) {
|
|
1806
1915
|
t: for (var e = t.length, n = 1, r = -1, i; n < e; ++n)
|
|
1807
1916
|
switch (t[n]) {
|
|
1808
1917
|
case ".":
|
|
@@ -1818,87 +1927,87 @@ function ji(t) {
|
|
|
1818
1927
|
}
|
|
1819
1928
|
return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
|
|
1820
1929
|
}
|
|
1821
|
-
var
|
|
1822
|
-
function
|
|
1930
|
+
var Qe;
|
|
1931
|
+
function na(t, e) {
|
|
1823
1932
|
var n = At(t, e);
|
|
1824
1933
|
if (!n) return t + "";
|
|
1825
|
-
var r = n[0], i = n[1], a = i - (
|
|
1934
|
+
var r = n[0], i = n[1], a = i - (Qe = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
|
|
1826
1935
|
return a === o ? r : a > o ? r + new Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + At(t, Math.max(0, e + a - 1))[0];
|
|
1827
1936
|
}
|
|
1828
|
-
function
|
|
1937
|
+
function Me(t, e) {
|
|
1829
1938
|
var n = At(t, e);
|
|
1830
1939
|
if (!n) return t + "";
|
|
1831
1940
|
var r = n[0], i = n[1];
|
|
1832
1941
|
return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
|
|
1833
1942
|
}
|
|
1834
|
-
const
|
|
1943
|
+
const _e = {
|
|
1835
1944
|
"%": (t, e) => (t * 100).toFixed(e),
|
|
1836
1945
|
b: (t) => Math.round(t).toString(2),
|
|
1837
1946
|
c: (t) => t + "",
|
|
1838
|
-
d:
|
|
1947
|
+
d: Ji,
|
|
1839
1948
|
e: (t, e) => t.toExponential(e),
|
|
1840
1949
|
f: (t, e) => t.toFixed(e),
|
|
1841
1950
|
g: (t, e) => t.toPrecision(e),
|
|
1842
1951
|
o: (t) => Math.round(t).toString(8),
|
|
1843
|
-
p: (t, e) =>
|
|
1844
|
-
r:
|
|
1845
|
-
s:
|
|
1952
|
+
p: (t, e) => Me(t * 100, e),
|
|
1953
|
+
r: Me,
|
|
1954
|
+
s: na,
|
|
1846
1955
|
X: (t) => Math.round(t).toString(16).toUpperCase(),
|
|
1847
1956
|
x: (t) => Math.round(t).toString(16)
|
|
1848
1957
|
};
|
|
1849
|
-
function
|
|
1958
|
+
function Ne(t) {
|
|
1850
1959
|
return t;
|
|
1851
1960
|
}
|
|
1852
|
-
var
|
|
1853
|
-
function
|
|
1854
|
-
var e = t.grouping === void 0 || t.thousands === void 0 ?
|
|
1855
|
-
function u(
|
|
1856
|
-
|
|
1857
|
-
var l =
|
|
1858
|
-
|
|
1859
|
-
var
|
|
1860
|
-
|
|
1961
|
+
var Se = Array.prototype.map, ke = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
1962
|
+
function ra(t) {
|
|
1963
|
+
var e = t.grouping === void 0 || t.thousands === void 0 ? Ne : Zi(Se.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Ne : ji(Se.call(t.numerals, String)), o = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
|
|
1964
|
+
function u(d) {
|
|
1965
|
+
d = Et(d);
|
|
1966
|
+
var l = d.fill, h = d.align, b = d.sign, A = d.symbol, S = d.zero, R = d.width, v = d.comma, k = d.precision, C = d.trim, M = d.type;
|
|
1967
|
+
M === "n" ? (v = !0, M = "g") : _e[M] || (k === void 0 && (k = 12), C = !0, M = "g"), (S || l === "0" && h === "=") && (S = !0, l = "0", h = "=");
|
|
1968
|
+
var F = A === "$" ? n : A === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : "", E = A === "$" ? r : /[%p]/.test(M) ? o : "", x = _e[M], m = /[defgprs%]/.test(M);
|
|
1969
|
+
k = k === void 0 ? 6 : /[gprs]/.test(M) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
|
|
1861
1970
|
function _(g) {
|
|
1862
|
-
var w =
|
|
1863
|
-
if (
|
|
1864
|
-
|
|
1971
|
+
var w = F, N = E, T, q, ot;
|
|
1972
|
+
if (M === "c")
|
|
1973
|
+
N = x(g) + N, g = "";
|
|
1865
1974
|
else {
|
|
1866
1975
|
g = +g;
|
|
1867
|
-
var
|
|
1868
|
-
if (g = isNaN(g) ? c : x(Math.abs(g),
|
|
1869
|
-
for (
|
|
1870
|
-
if (ot = g.charCodeAt(
|
|
1871
|
-
|
|
1976
|
+
var L = g < 0 || 1 / g < 0;
|
|
1977
|
+
if (g = isNaN(g) ? c : x(Math.abs(g), k), C && (g = ea(g)), L && +g == 0 && b !== "+" && (L = !1), w = (L ? b === "(" ? b : s : b === "-" || b === "(" ? "" : b) + w, N = (M === "s" ? ke[8 + Qe / 3] : "") + N + (L && b === "(" ? ")" : ""), m) {
|
|
1978
|
+
for (T = -1, q = g.length; ++T < q; )
|
|
1979
|
+
if (ot = g.charCodeAt(T), 48 > ot || ot > 57) {
|
|
1980
|
+
N = (ot === 46 ? i + g.slice(T + 1) : g.slice(T)) + N, g = g.slice(0, T);
|
|
1872
1981
|
break;
|
|
1873
1982
|
}
|
|
1874
1983
|
}
|
|
1875
1984
|
}
|
|
1876
|
-
|
|
1877
|
-
var
|
|
1878
|
-
switch (
|
|
1985
|
+
v && !S && (g = e(g, 1 / 0));
|
|
1986
|
+
var K = w.length + g.length + N.length, V = K < R ? new Array(R - K + 1).join(l) : "";
|
|
1987
|
+
switch (v && S && (g = e(V + g, V.length ? R - N.length : 1 / 0), V = ""), h) {
|
|
1879
1988
|
case "<":
|
|
1880
|
-
g = w + g +
|
|
1989
|
+
g = w + g + N + V;
|
|
1881
1990
|
break;
|
|
1882
1991
|
case "=":
|
|
1883
|
-
g = w +
|
|
1992
|
+
g = w + V + g + N;
|
|
1884
1993
|
break;
|
|
1885
1994
|
case "^":
|
|
1886
|
-
g =
|
|
1995
|
+
g = V.slice(0, K = V.length >> 1) + w + g + N + V.slice(K);
|
|
1887
1996
|
break;
|
|
1888
1997
|
default:
|
|
1889
|
-
g =
|
|
1998
|
+
g = V + w + g + N;
|
|
1890
1999
|
break;
|
|
1891
2000
|
}
|
|
1892
2001
|
return a(g);
|
|
1893
2002
|
}
|
|
1894
2003
|
return _.toString = function() {
|
|
1895
|
-
return
|
|
2004
|
+
return d + "";
|
|
1896
2005
|
}, _;
|
|
1897
2006
|
}
|
|
1898
|
-
function f(
|
|
1899
|
-
var
|
|
1900
|
-
return function(
|
|
1901
|
-
return
|
|
2007
|
+
function f(d, l) {
|
|
2008
|
+
var h = u((d = Et(d), d.type = "f", d)), b = Math.max(-8, Math.min(8, Math.floor(at(l) / 3))) * 3, A = Math.pow(10, -b), S = ke[8 + b / 3];
|
|
2009
|
+
return function(R) {
|
|
2010
|
+
return h(A * R) + S;
|
|
1902
2011
|
};
|
|
1903
2012
|
}
|
|
1904
2013
|
return {
|
|
@@ -1906,25 +2015,25 @@ function ea(t) {
|
|
|
1906
2015
|
formatPrefix: f
|
|
1907
2016
|
};
|
|
1908
2017
|
}
|
|
1909
|
-
var wt,
|
|
1910
|
-
|
|
2018
|
+
var wt, Ke, Je;
|
|
2019
|
+
ia({
|
|
1911
2020
|
thousands: ",",
|
|
1912
2021
|
grouping: [3],
|
|
1913
2022
|
currency: ["$", ""]
|
|
1914
2023
|
});
|
|
1915
|
-
function
|
|
1916
|
-
return wt =
|
|
2024
|
+
function ia(t) {
|
|
2025
|
+
return wt = ra(t), Ke = wt.format, Je = wt.formatPrefix, wt;
|
|
1917
2026
|
}
|
|
1918
|
-
function
|
|
2027
|
+
function aa(t) {
|
|
1919
2028
|
return Math.max(0, -at(Math.abs(t)));
|
|
1920
2029
|
}
|
|
1921
|
-
function
|
|
2030
|
+
function oa(t, e) {
|
|
1922
2031
|
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(at(e) / 3))) * 3 - at(Math.abs(t)));
|
|
1923
2032
|
}
|
|
1924
|
-
function
|
|
2033
|
+
function sa(t, e) {
|
|
1925
2034
|
return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, at(e) - at(t)) + 1;
|
|
1926
2035
|
}
|
|
1927
|
-
function
|
|
2036
|
+
function Ct(t, e) {
|
|
1928
2037
|
switch (arguments.length) {
|
|
1929
2038
|
case 0:
|
|
1930
2039
|
break;
|
|
@@ -1938,7 +2047,7 @@ function Et(t, e) {
|
|
|
1938
2047
|
return this;
|
|
1939
2048
|
}
|
|
1940
2049
|
const $e = /* @__PURE__ */ Symbol("implicit");
|
|
1941
|
-
function
|
|
2050
|
+
function ca() {
|
|
1942
2051
|
var t = new se(), e = [], n = [], r = $e;
|
|
1943
2052
|
function i(a) {
|
|
1944
2053
|
let o = t.get(a);
|
|
@@ -1959,116 +2068,116 @@ function oa() {
|
|
|
1959
2068
|
}, i.unknown = function(a) {
|
|
1960
2069
|
return arguments.length ? (r = a, i) : r;
|
|
1961
2070
|
}, i.copy = function() {
|
|
1962
|
-
return
|
|
1963
|
-
},
|
|
2071
|
+
return ca(e, n).unknown(r);
|
|
2072
|
+
}, Ct.apply(i, arguments), i;
|
|
1964
2073
|
}
|
|
1965
|
-
function
|
|
2074
|
+
function ua(t) {
|
|
1966
2075
|
return function() {
|
|
1967
2076
|
return t;
|
|
1968
2077
|
};
|
|
1969
2078
|
}
|
|
1970
|
-
function
|
|
2079
|
+
function la(t) {
|
|
1971
2080
|
return +t;
|
|
1972
2081
|
}
|
|
1973
2082
|
var Ae = [0, 1];
|
|
1974
|
-
function
|
|
2083
|
+
function W(t) {
|
|
1975
2084
|
return t;
|
|
1976
2085
|
}
|
|
1977
|
-
function
|
|
2086
|
+
function Bt(t, e) {
|
|
1978
2087
|
return (e -= t = +t) ? function(n) {
|
|
1979
2088
|
return (n - t) / e;
|
|
1980
|
-
} :
|
|
2089
|
+
} : ua(isNaN(e) ? NaN : 0.5);
|
|
1981
2090
|
}
|
|
1982
|
-
function
|
|
2091
|
+
function fa(t, e) {
|
|
1983
2092
|
var n;
|
|
1984
2093
|
return t > e && (n = t, t = e, e = n), function(r) {
|
|
1985
2094
|
return Math.max(t, Math.min(e, r));
|
|
1986
2095
|
};
|
|
1987
2096
|
}
|
|
1988
|
-
function
|
|
2097
|
+
function ha(t, e, n) {
|
|
1989
2098
|
var r = t[0], i = t[1], a = e[0], o = e[1];
|
|
1990
|
-
return i < r ? (r =
|
|
2099
|
+
return i < r ? (r = Bt(i, r), a = n(o, a)) : (r = Bt(r, i), a = n(a, o)), function(s) {
|
|
1991
2100
|
return a(r(s));
|
|
1992
2101
|
};
|
|
1993
2102
|
}
|
|
1994
|
-
function
|
|
2103
|
+
function da(t, e, n) {
|
|
1995
2104
|
var r = Math.min(t.length, e.length) - 1, i = new Array(r), a = new Array(r), o = -1;
|
|
1996
2105
|
for (t[r] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++o < r; )
|
|
1997
|
-
i[o] =
|
|
2106
|
+
i[o] = Bt(t[o], t[o + 1]), a[o] = n(e[o], e[o + 1]);
|
|
1998
2107
|
return function(s) {
|
|
1999
|
-
var c =
|
|
2108
|
+
var c = Te(t, s, 1, r) - 1;
|
|
2000
2109
|
return a[c](i[c](s));
|
|
2001
2110
|
};
|
|
2002
2111
|
}
|
|
2003
|
-
function
|
|
2112
|
+
function Ze(t, e) {
|
|
2004
2113
|
return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
|
|
2005
2114
|
}
|
|
2006
2115
|
function je() {
|
|
2007
|
-
var t = Ae, e = Ae, n =
|
|
2116
|
+
var t = Ae, e = Ae, n = Jt, r, i, a, o = W, s, c, u;
|
|
2008
2117
|
function f() {
|
|
2009
2118
|
var l = Math.min(t.length, e.length);
|
|
2010
|
-
return o !==
|
|
2119
|
+
return o !== W && (o = fa(t[0], t[l - 1])), s = l > 2 ? da : ha, c = u = null, d;
|
|
2011
2120
|
}
|
|
2012
|
-
function
|
|
2121
|
+
function d(l) {
|
|
2013
2122
|
return l == null || isNaN(l = +l) ? a : (c || (c = s(t.map(r), e, n)))(r(o(l)));
|
|
2014
2123
|
}
|
|
2015
|
-
return
|
|
2124
|
+
return d.invert = function(l) {
|
|
2016
2125
|
return o(i((u || (u = s(e, t.map(r), $t)))(l)));
|
|
2017
|
-
},
|
|
2018
|
-
return arguments.length ? (t = Array.from(l,
|
|
2019
|
-
},
|
|
2126
|
+
}, d.domain = function(l) {
|
|
2127
|
+
return arguments.length ? (t = Array.from(l, la), f()) : t.slice();
|
|
2128
|
+
}, d.range = function(l) {
|
|
2020
2129
|
return arguments.length ? (e = Array.from(l), f()) : e.slice();
|
|
2021
|
-
},
|
|
2022
|
-
return e = Array.from(l), n =
|
|
2023
|
-
},
|
|
2024
|
-
return arguments.length ? (o = l ? !0 :
|
|
2025
|
-
},
|
|
2130
|
+
}, d.rangeRound = function(l) {
|
|
2131
|
+
return e = Array.from(l), n = Ki, f();
|
|
2132
|
+
}, d.clamp = function(l) {
|
|
2133
|
+
return arguments.length ? (o = l ? !0 : W, f()) : o !== W;
|
|
2134
|
+
}, d.interpolate = function(l) {
|
|
2026
2135
|
return arguments.length ? (n = l, f()) : n;
|
|
2027
|
-
},
|
|
2028
|
-
return arguments.length ? (a = l,
|
|
2029
|
-
}, function(l,
|
|
2030
|
-
return r = l, i =
|
|
2136
|
+
}, d.unknown = function(l) {
|
|
2137
|
+
return arguments.length ? (a = l, d) : a;
|
|
2138
|
+
}, function(l, h) {
|
|
2139
|
+
return r = l, i = h, f();
|
|
2031
2140
|
};
|
|
2032
2141
|
}
|
|
2033
|
-
function
|
|
2034
|
-
return je()(
|
|
2142
|
+
function ma() {
|
|
2143
|
+
return je()(W, W);
|
|
2035
2144
|
}
|
|
2036
|
-
function
|
|
2037
|
-
var i =
|
|
2038
|
-
switch (r =
|
|
2145
|
+
function ga(t, e, n, r) {
|
|
2146
|
+
var i = Un(t, e, n), a;
|
|
2147
|
+
switch (r = Et(r ?? ",f"), r.type) {
|
|
2039
2148
|
case "s": {
|
|
2040
2149
|
var o = Math.max(Math.abs(t), Math.abs(e));
|
|
2041
|
-
return r.precision == null && !isNaN(a =
|
|
2150
|
+
return r.precision == null && !isNaN(a = oa(i, o)) && (r.precision = a), Je(r, o);
|
|
2042
2151
|
}
|
|
2043
2152
|
case "":
|
|
2044
2153
|
case "e":
|
|
2045
2154
|
case "g":
|
|
2046
2155
|
case "p":
|
|
2047
2156
|
case "r": {
|
|
2048
|
-
r.precision == null && !isNaN(a =
|
|
2157
|
+
r.precision == null && !isNaN(a = sa(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = a - (r.type === "e"));
|
|
2049
2158
|
break;
|
|
2050
2159
|
}
|
|
2051
2160
|
case "f":
|
|
2052
2161
|
case "%": {
|
|
2053
|
-
r.precision == null && !isNaN(a =
|
|
2162
|
+
r.precision == null && !isNaN(a = aa(i)) && (r.precision = a - (r.type === "%") * 2);
|
|
2054
2163
|
break;
|
|
2055
2164
|
}
|
|
2056
2165
|
}
|
|
2057
|
-
return
|
|
2166
|
+
return Ke(r);
|
|
2058
2167
|
}
|
|
2059
2168
|
function jt(t) {
|
|
2060
2169
|
var e = t.domain;
|
|
2061
2170
|
return t.ticks = function(n) {
|
|
2062
2171
|
var r = e();
|
|
2063
|
-
return
|
|
2172
|
+
return Pn(r[0], r[r.length - 1], n ?? 10);
|
|
2064
2173
|
}, t.tickFormat = function(n, r) {
|
|
2065
2174
|
var i = e();
|
|
2066
|
-
return
|
|
2175
|
+
return ga(i[0], i[i.length - 1], n ?? 10, r);
|
|
2067
2176
|
}, t.nice = function(n) {
|
|
2068
2177
|
n == null && (n = 10);
|
|
2069
2178
|
var r = e(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, u, f = 10;
|
|
2070
2179
|
for (s < o && (u = o, o = s, s = u, u = i, i = a, a = u); f-- > 0; ) {
|
|
2071
|
-
if (u =
|
|
2180
|
+
if (u = Vt(o, s, n), u === c)
|
|
2072
2181
|
return r[i] = o, r[a] = s, e(r);
|
|
2073
2182
|
if (u > 0)
|
|
2074
2183
|
o = Math.floor(o / u) * u, s = Math.ceil(s / u) * u;
|
|
@@ -2081,37 +2190,37 @@ function jt(t) {
|
|
|
2081
2190
|
return t;
|
|
2082
2191
|
}, t;
|
|
2083
2192
|
}
|
|
2084
|
-
function
|
|
2085
|
-
var t =
|
|
2193
|
+
function ya() {
|
|
2194
|
+
var t = ma();
|
|
2086
2195
|
return t.copy = function() {
|
|
2087
|
-
return
|
|
2088
|
-
},
|
|
2196
|
+
return Ze(t, ya());
|
|
2197
|
+
}, Ct.apply(t, arguments), jt(t);
|
|
2089
2198
|
}
|
|
2090
|
-
function
|
|
2199
|
+
function Ee(t) {
|
|
2091
2200
|
return function(e) {
|
|
2092
2201
|
return e < 0 ? -Math.pow(-e, t) : Math.pow(e, t);
|
|
2093
2202
|
};
|
|
2094
2203
|
}
|
|
2095
|
-
function
|
|
2204
|
+
function pa(t) {
|
|
2096
2205
|
return t < 0 ? -Math.sqrt(-t) : Math.sqrt(t);
|
|
2097
2206
|
}
|
|
2098
|
-
function
|
|
2207
|
+
function xa(t) {
|
|
2099
2208
|
return t < 0 ? -t * t : t * t;
|
|
2100
2209
|
}
|
|
2101
|
-
function
|
|
2102
|
-
var e = t(
|
|
2210
|
+
function wa(t) {
|
|
2211
|
+
var e = t(W, W), n = 1;
|
|
2103
2212
|
function r() {
|
|
2104
|
-
return n === 1 ? t(
|
|
2213
|
+
return n === 1 ? t(W, W) : n === 0.5 ? t(pa, xa) : t(Ee(n), Ee(1 / n));
|
|
2105
2214
|
}
|
|
2106
2215
|
return e.exponent = function(i) {
|
|
2107
2216
|
return arguments.length ? (n = +i, r()) : n;
|
|
2108
2217
|
}, jt(e);
|
|
2109
2218
|
}
|
|
2110
2219
|
function tn() {
|
|
2111
|
-
var t =
|
|
2220
|
+
var t = wa(je());
|
|
2112
2221
|
return t.copy = function() {
|
|
2113
|
-
return
|
|
2114
|
-
},
|
|
2222
|
+
return Ze(t, tn()).exponent(t.exponent());
|
|
2223
|
+
}, Ct.apply(t, arguments), t;
|
|
2115
2224
|
}
|
|
2116
2225
|
function za() {
|
|
2117
2226
|
return tn.apply(null, arguments).exponent(0.5);
|
|
@@ -2119,7 +2228,7 @@ function za() {
|
|
|
2119
2228
|
function en() {
|
|
2120
2229
|
var t = 0, e = 1, n = 1, r = [0.5], i = [0, 1], a;
|
|
2121
2230
|
function o(c) {
|
|
2122
|
-
return c != null && c <= c ? i[
|
|
2231
|
+
return c != null && c <= c ? i[Te(r, c, 0, n)] : a;
|
|
2123
2232
|
}
|
|
2124
2233
|
function s() {
|
|
2125
2234
|
var c = -1;
|
|
@@ -2139,9 +2248,9 @@ function en() {
|
|
|
2139
2248
|
return r.slice();
|
|
2140
2249
|
}, o.copy = function() {
|
|
2141
2250
|
return en().domain([t, e]).range(i).unknown(a);
|
|
2142
|
-
},
|
|
2251
|
+
}, Ct.apply(jt(o), arguments);
|
|
2143
2252
|
}
|
|
2144
|
-
function
|
|
2253
|
+
function ba({
|
|
2145
2254
|
data: t,
|
|
2146
2255
|
chartConfig: e,
|
|
2147
2256
|
displayConfig: n = {},
|
|
@@ -2149,206 +2258,206 @@ function xa({
|
|
|
2149
2258
|
height: i = "100%",
|
|
2150
2259
|
colorPalette: a
|
|
2151
2260
|
}) {
|
|
2152
|
-
const o = oe(null), s = oe(null), [c, u] =
|
|
2153
|
-
bt(() => (
|
|
2154
|
-
|
|
2261
|
+
const o = oe(null), s = oe(null), [c, u] = Q({ width: 0, height: 0 }), [f, d] = Q(!1), [l, h] = Q("light"), { getFieldLabel: b } = bn();
|
|
2262
|
+
bt(() => (h(Mt()), kn((m) => {
|
|
2263
|
+
h(m);
|
|
2155
2264
|
})), []);
|
|
2156
|
-
const
|
|
2265
|
+
const A = {
|
|
2157
2266
|
showTooltip: n?.showTooltip ?? !0,
|
|
2158
2267
|
showLabels: n?.showLabels ?? !0,
|
|
2159
2268
|
fitToWidth: n?.fitToWidth ?? !1
|
|
2160
2269
|
};
|
|
2161
2270
|
hn(() => {
|
|
2162
2271
|
let x = 0;
|
|
2163
|
-
const
|
|
2272
|
+
const m = 10;
|
|
2164
2273
|
let _, g;
|
|
2165
2274
|
const w = () => {
|
|
2166
2275
|
if (s.current) {
|
|
2167
|
-
const { width:
|
|
2168
|
-
if (
|
|
2169
|
-
return u({ width:
|
|
2276
|
+
const { width: T, height: q } = s.current.getBoundingClientRect();
|
|
2277
|
+
if (T > 0 && q > 0)
|
|
2278
|
+
return u({ width: T, height: q }), d(!0), !0;
|
|
2170
2279
|
}
|
|
2171
2280
|
return !1;
|
|
2172
2281
|
};
|
|
2173
|
-
if (!w() && x <
|
|
2174
|
-
const
|
|
2175
|
-
!w() && x <
|
|
2176
|
-
_ = requestAnimationFrame(
|
|
2282
|
+
if (!w() && x < m) {
|
|
2283
|
+
const T = () => {
|
|
2284
|
+
!w() && x < m && (x++, g = setTimeout(() => {
|
|
2285
|
+
_ = requestAnimationFrame(T);
|
|
2177
2286
|
}, 50 * x));
|
|
2178
2287
|
};
|
|
2179
|
-
_ = requestAnimationFrame(
|
|
2288
|
+
_ = requestAnimationFrame(T);
|
|
2180
2289
|
}
|
|
2181
2290
|
return () => {
|
|
2182
2291
|
_ && cancelAnimationFrame(_), g && clearTimeout(g);
|
|
2183
2292
|
};
|
|
2184
2293
|
}, []), bt(() => {
|
|
2185
2294
|
let x = null;
|
|
2186
|
-
const
|
|
2295
|
+
const m = () => {
|
|
2187
2296
|
if (s.current) {
|
|
2188
2297
|
const { width: _, height: g } = s.current.getBoundingClientRect();
|
|
2189
|
-
_ > 0 && g > 0 && (u({ width: _, height: g }), f ||
|
|
2298
|
+
_ > 0 && g > 0 && (u({ width: _, height: g }), f || d(!0));
|
|
2190
2299
|
}
|
|
2191
2300
|
};
|
|
2192
|
-
return s.current && (x = new ResizeObserver(() =>
|
|
2193
|
-
x && x.disconnect(), window.removeEventListener("resize",
|
|
2301
|
+
return s.current && (x = new ResizeObserver(() => m()), x.observe(s.current), m()), window.addEventListener("resize", m), () => {
|
|
2302
|
+
x && x.disconnect(), window.removeEventListener("resize", m);
|
|
2194
2303
|
};
|
|
2195
2304
|
}, [f]);
|
|
2196
|
-
const
|
|
2197
|
-
const
|
|
2198
|
-
return Math.floor((
|
|
2199
|
-
},
|
|
2305
|
+
const S = (x) => Math.floor(x.getMonth() / 3) + 1, R = (x) => x.getMonth() % 3 + 1, v = (x) => {
|
|
2306
|
+
const m = x.getDate();
|
|
2307
|
+
return Math.floor((m - 1) / 7) + 1;
|
|
2308
|
+
}, k = (x) => {
|
|
2200
2309
|
switch (x?.toLowerCase()) {
|
|
2201
2310
|
case "year":
|
|
2202
2311
|
return null;
|
|
2203
2312
|
case "quarter":
|
|
2204
2313
|
return {
|
|
2205
|
-
extractX: (
|
|
2206
|
-
extractY: (
|
|
2314
|
+
extractX: (m) => m.getFullYear(),
|
|
2315
|
+
extractY: (m) => S(m) - 1,
|
|
2207
2316
|
// 0-3 for indexing
|
|
2208
2317
|
xLabels: [],
|
|
2209
2318
|
// Will be determined from data
|
|
2210
2319
|
yLabels: ["Q1", "Q2", "Q3", "Q4"],
|
|
2211
|
-
xFormat: (
|
|
2320
|
+
xFormat: (m) => `'${m.toString().slice(-2)}`,
|
|
2212
2321
|
// '24 instead of 2024
|
|
2213
|
-
yFormat: (
|
|
2322
|
+
yFormat: (m) => ["Q1", "Q2", "Q3", "Q4"][m] || "",
|
|
2214
2323
|
cellWidth: 16,
|
|
2215
2324
|
cellHeight: 16
|
|
2216
2325
|
};
|
|
2217
2326
|
case "month":
|
|
2218
2327
|
return {
|
|
2219
|
-
extractX: (
|
|
2220
|
-
const _ =
|
|
2328
|
+
extractX: (m) => {
|
|
2329
|
+
const _ = m.getFullYear(), g = S(m);
|
|
2221
2330
|
return _ * 10 + g;
|
|
2222
2331
|
},
|
|
2223
|
-
extractY: (
|
|
2332
|
+
extractY: (m) => R(m) - 1,
|
|
2224
2333
|
// 0-2 for indexing
|
|
2225
2334
|
xLabels: [],
|
|
2226
2335
|
// Will be determined from data
|
|
2227
2336
|
yLabels: ["Month 1", "Month 2", "Month 3"],
|
|
2228
|
-
xFormat: (
|
|
2229
|
-
yFormat: (
|
|
2337
|
+
xFormat: (m) => `Q${m % 10}`,
|
|
2338
|
+
yFormat: (m) => ["Month 1", "Month 2", "Month 3"][m] || "",
|
|
2230
2339
|
cellWidth: 16,
|
|
2231
2340
|
cellHeight: 16,
|
|
2232
2341
|
hasHierarchicalLabels: !0,
|
|
2233
2342
|
// Flag to indicate we need special handling
|
|
2234
|
-
getYearFromX: (
|
|
2343
|
+
getYearFromX: (m) => Math.floor(m / 10)
|
|
2235
2344
|
// Helper to get year for grouping
|
|
2236
2345
|
};
|
|
2237
2346
|
case "week":
|
|
2238
2347
|
return {
|
|
2239
|
-
extractX: (
|
|
2240
|
-
const _ =
|
|
2348
|
+
extractX: (m) => {
|
|
2349
|
+
const _ = m.getFullYear(), g = m.getMonth() + 1;
|
|
2241
2350
|
return _ * 100 + g;
|
|
2242
2351
|
},
|
|
2243
|
-
extractY: (
|
|
2352
|
+
extractY: (m) => v(m) - 1,
|
|
2244
2353
|
// 0-5 for indexing
|
|
2245
2354
|
xLabels: [],
|
|
2246
2355
|
// Will be determined from data
|
|
2247
2356
|
yLabels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"],
|
|
2248
|
-
xFormat: (
|
|
2249
|
-
const _ =
|
|
2357
|
+
xFormat: (m) => {
|
|
2358
|
+
const _ = m % 100;
|
|
2250
2359
|
return ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"][_ - 1] || "";
|
|
2251
2360
|
},
|
|
2252
|
-
yFormat: (
|
|
2361
|
+
yFormat: (m) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][m] || "",
|
|
2253
2362
|
cellWidth: 16,
|
|
2254
2363
|
cellHeight: 16,
|
|
2255
2364
|
hasHierarchicalLabels: !0,
|
|
2256
2365
|
// Add hierarchical labels like month view
|
|
2257
|
-
getYearFromX: (
|
|
2366
|
+
getYearFromX: (m) => Math.floor(m / 100)
|
|
2258
2367
|
// Helper to get year for grouping
|
|
2259
2368
|
};
|
|
2260
2369
|
case "day":
|
|
2261
2370
|
return {
|
|
2262
|
-
extractX: (
|
|
2263
|
-
const { year: _, week: g } = C(
|
|
2371
|
+
extractX: (m) => {
|
|
2372
|
+
const { year: _, week: g } = C(m);
|
|
2264
2373
|
return _ * 100 + g;
|
|
2265
2374
|
},
|
|
2266
|
-
extractY: (
|
|
2375
|
+
extractY: (m) => m.getDay(),
|
|
2267
2376
|
// 0-6 (Sun-Sat)
|
|
2268
2377
|
xLabels: [],
|
|
2269
2378
|
// Will be determined from data
|
|
2270
2379
|
yLabels: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2271
|
-
xFormat: (
|
|
2272
|
-
yFormat: (
|
|
2380
|
+
xFormat: (m) => `${m % 100}`,
|
|
2381
|
+
yFormat: (m) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][m] || "",
|
|
2273
2382
|
cellWidth: 16,
|
|
2274
2383
|
cellHeight: 16,
|
|
2275
2384
|
hasHierarchicalLabels: !0,
|
|
2276
2385
|
// Add hierarchical labels
|
|
2277
|
-
getYearFromX: (
|
|
2386
|
+
getYearFromX: (m) => Math.floor(m / 100)
|
|
2278
2387
|
// Helper to get year for grouping
|
|
2279
2388
|
};
|
|
2280
2389
|
case "hour":
|
|
2281
2390
|
return {
|
|
2282
|
-
extractX: (
|
|
2283
|
-
const _ =
|
|
2391
|
+
extractX: (m) => {
|
|
2392
|
+
const _ = m.getFullYear(), g = m.getMonth() + 1, w = m.getDate();
|
|
2284
2393
|
return _ * 1e4 + g * 100 + w;
|
|
2285
2394
|
},
|
|
2286
|
-
extractY: (
|
|
2395
|
+
extractY: (m) => Math.floor(m.getHours() / 3),
|
|
2287
2396
|
// 0-7 for 8 three-hour blocks
|
|
2288
2397
|
xLabels: [],
|
|
2289
2398
|
// Will be determined from data
|
|
2290
2399
|
yLabels: ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"],
|
|
2291
|
-
xFormat: (
|
|
2292
|
-
yFormat: (
|
|
2400
|
+
xFormat: (m) => `${m % 100}`,
|
|
2401
|
+
yFormat: (m) => ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"][m] || "",
|
|
2293
2402
|
cellWidth: 16,
|
|
2294
2403
|
cellHeight: 16,
|
|
2295
2404
|
hasHierarchicalLabels: !0,
|
|
2296
2405
|
// Show year/month grouping above
|
|
2297
|
-
getYearFromX: (
|
|
2406
|
+
getYearFromX: (m) => Math.floor(m / 100)
|
|
2298
2407
|
// Extract YYYYMM for month grouping
|
|
2299
2408
|
};
|
|
2300
2409
|
default:
|
|
2301
2410
|
return null;
|
|
2302
2411
|
}
|
|
2303
2412
|
}, C = (x) => {
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
const g =
|
|
2307
|
-
return { year: g, week:
|
|
2413
|
+
const m = new Date(Date.UTC(x.getFullYear(), x.getMonth(), x.getDate())), _ = m.getUTCDay() || 7;
|
|
2414
|
+
m.setUTCDate(m.getUTCDate() + 4 - _);
|
|
2415
|
+
const g = m.getUTCFullYear(), w = new Date(Date.UTC(g, 0, 1)), N = Math.ceil(((m.getTime() - w.getTime()) / 864e5 + 1) / 7);
|
|
2416
|
+
return { year: g, week: N };
|
|
2308
2417
|
};
|
|
2309
2418
|
if (bt(() => {
|
|
2310
2419
|
if (!t || t.length === 0 || !o.current || !f || c.width === 0 || (ct(o.current).selectAll("*").remove(), !e?.dateField || !e?.valueField))
|
|
2311
2420
|
return;
|
|
2312
|
-
const x = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField,
|
|
2313
|
-
if (!x || !
|
|
2421
|
+
const x = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField, m = Array.isArray(e.valueField) ? e.valueField[0] : e.valueField;
|
|
2422
|
+
if (!x || !m)
|
|
2314
2423
|
return;
|
|
2315
2424
|
const g = (() => {
|
|
2316
2425
|
if (!r?.timeDimensions || r.timeDimensions.length === 0)
|
|
2317
2426
|
return "day";
|
|
2318
|
-
const
|
|
2319
|
-
(
|
|
2427
|
+
const y = r.timeDimensions.find(
|
|
2428
|
+
($) => $.dimension === x || $.dimension.includes(x)
|
|
2320
2429
|
);
|
|
2321
|
-
if (
|
|
2322
|
-
return
|
|
2323
|
-
const
|
|
2324
|
-
return
|
|
2325
|
-
})(), w =
|
|
2430
|
+
if (y && y.granularity)
|
|
2431
|
+
return y.granularity;
|
|
2432
|
+
const p = r.timeDimensions[0];
|
|
2433
|
+
return p && p.granularity ? p.granularity : "day";
|
|
2434
|
+
})(), w = k(g);
|
|
2326
2435
|
if (!w)
|
|
2327
2436
|
return;
|
|
2328
|
-
const
|
|
2329
|
-
const
|
|
2330
|
-
let
|
|
2331
|
-
if (typeof
|
|
2332
|
-
let
|
|
2333
|
-
|
|
2437
|
+
const N = t.map((y) => {
|
|
2438
|
+
const p = y[x], $ = typeof y[m] == "string" ? parseFloat(y[m]) : y[m] || 0;
|
|
2439
|
+
let D;
|
|
2440
|
+
if (typeof p == "string") {
|
|
2441
|
+
let P = p;
|
|
2442
|
+
p.includes(" ") && (P = p.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !P.endsWith("Z") && !P.includes("+") && (P = P + "Z"), D = new Date(P);
|
|
2334
2443
|
} else
|
|
2335
|
-
|
|
2336
|
-
if (isNaN(
|
|
2444
|
+
D = new Date(p);
|
|
2445
|
+
if (isNaN(D.getTime()))
|
|
2337
2446
|
return null;
|
|
2338
|
-
const
|
|
2447
|
+
const X = w.extractX(D), G = w.extractY(D);
|
|
2339
2448
|
return {
|
|
2340
|
-
x:
|
|
2341
|
-
y:
|
|
2342
|
-
value:
|
|
2343
|
-
date:
|
|
2344
|
-
label:
|
|
2449
|
+
x: X,
|
|
2450
|
+
y: G,
|
|
2451
|
+
value: $,
|
|
2452
|
+
date: D,
|
|
2453
|
+
label: Xt(p, g)
|
|
2345
2454
|
};
|
|
2346
|
-
}).filter((
|
|
2347
|
-
if (
|
|
2348
|
-
const
|
|
2349
|
-
const
|
|
2350
|
-
return
|
|
2351
|
-
})(),
|
|
2455
|
+
}).filter((y) => y !== null);
|
|
2456
|
+
if (N.length === 0) return;
|
|
2457
|
+
const T = ue(N, (y) => y.y) || 0, q = le(N, (y) => y.y) || 0, L = (() => {
|
|
2458
|
+
const y = [...new Set(N.map((p) => p.x))].sort();
|
|
2459
|
+
return y;
|
|
2460
|
+
})(), K = L.length * w.cellWidth + (L.length - 1) * 4, V = (T - q + 1) * w.cellHeight + (T - q) * 4, B = {
|
|
2352
2461
|
left: 60,
|
|
2353
2462
|
// Space for Y-axis labels
|
|
2354
2463
|
bottom: 10,
|
|
@@ -2356,157 +2465,158 @@ function xa({
|
|
|
2356
2465
|
top: w.hasHierarchicalLabels ? 40 : 25,
|
|
2357
2466
|
// Extra space for hierarchical labels
|
|
2358
2467
|
right: 10
|
|
2359
|
-
},
|
|
2468
|
+
}, Ft = c.width - B.left - B.right, te = c.height - B.top - B.bottom;
|
|
2360
2469
|
let H, nt;
|
|
2361
|
-
if (
|
|
2362
|
-
const
|
|
2363
|
-
H = w.cellWidth *
|
|
2470
|
+
if (A.fitToWidth) {
|
|
2471
|
+
const y = Ft / K, p = te / V, $ = Math.min(y, p);
|
|
2472
|
+
H = w.cellWidth * $, nt = w.cellHeight * $;
|
|
2364
2473
|
} else {
|
|
2365
|
-
const
|
|
2366
|
-
H = Math.max(
|
|
2474
|
+
const p = { width: 16, height: 16 }, $ = 24, D = Ft / K, X = te / V, G = Math.min(D, X);
|
|
2475
|
+
H = Math.max(p.width, Math.min($, w.cellWidth * G)), nt = Math.max(p.height, Math.min($, w.cellHeight * G)), g === "week" && H < p.width && (H = p.width);
|
|
2367
2476
|
}
|
|
2368
|
-
const ee =
|
|
2369
|
-
|
|
2370
|
-
const
|
|
2371
|
-
re.set(
|
|
2477
|
+
const ee = L.length * H + (L.length - 1) * 4, nn = ee > Ft ? ee + B.left + B.right : c.width, rt = ct(o.current).attr("width", nn).attr("height", c.height).append("g").attr("transform", `translate(${B.left},${B.top})`), ne = N.map((y) => y.value), rn = le(ne) || 0, an = ue(ne) || 1, on = en().domain([rn, an]).range(a?.gradient || Nn), re = /* @__PURE__ */ new Map();
|
|
2478
|
+
N.forEach((y) => {
|
|
2479
|
+
const p = `${y.x}-${y.y}`;
|
|
2480
|
+
re.set(p, y);
|
|
2372
2481
|
});
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
st.set(
|
|
2482
|
+
const J = (y, p) => getComputedStyle(document.documentElement).getPropertyValue(y).trim() || p, Rt = l !== "light", mt = Rt ? J("--dc-text-muted", "#cbd5e1") : J("--dc-text-secondary", "#374151"), sn = J("--dc-border", "#e5e7eb"), cn = Rt ? J("--dc-bg-secondary", "#1e293b") : J("--dc-bg-secondary", "#f3f4f6"), ie = Rt ? J("--dc-border", "#334155") : J("--dc-bg", "#ffffff"), gt = ct("body").append("div").attr("class", "activity-grid-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), st = /* @__PURE__ */ new Map();
|
|
2483
|
+
L.forEach((y, p) => {
|
|
2484
|
+
st.set(y, p);
|
|
2376
2485
|
});
|
|
2377
|
-
for (const
|
|
2378
|
-
for (let
|
|
2379
|
-
const
|
|
2380
|
-
|
|
2381
|
-
if (ct(this).style("stroke", "#000").style("stroke-width", 2),
|
|
2382
|
-
const
|
|
2383
|
-
`<strong>${
|
|
2384
|
-
`${
|
|
2486
|
+
for (const y of L)
|
|
2487
|
+
for (let p = q; p <= T; p++) {
|
|
2488
|
+
const $ = `${y}-${p}`, D = re.get($), X = st.get(y) || 0, G = rt.append("rect").attr("x", X * (H + 4)).attr("y", (p - q) * (nt + 4)).attr("width", H).attr("height", nt).attr("rx", 2).attr("ry", 2).style("fill", D ? on(D.value) : cn).style("stroke", ie).style("stroke-width", 1);
|
|
2489
|
+
A.showTooltip && G.style("cursor", "pointer").on("mouseover", function(P) {
|
|
2490
|
+
if (ct(this).style("stroke", "#000").style("stroke-width", 2), D) {
|
|
2491
|
+
const Z = [
|
|
2492
|
+
`<strong>${D.label}</strong>`,
|
|
2493
|
+
`${b(m)}: ${D.value}`
|
|
2385
2494
|
].join("<br>");
|
|
2386
|
-
gt.html(
|
|
2495
|
+
gt.html(Z).style("left", P.pageX + 10 + "px").style("top", P.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
|
|
2387
2496
|
}
|
|
2388
|
-
}).on("mousemove", function(
|
|
2389
|
-
gt.style("left",
|
|
2497
|
+
}).on("mousemove", function(P) {
|
|
2498
|
+
gt.style("left", P.pageX + 10 + "px").style("top", P.pageY - 10 + "px");
|
|
2390
2499
|
}).on("mouseout", function() {
|
|
2391
2500
|
ct(this).style("stroke", ie).style("stroke-width", 1), gt.transition().duration(200).style("opacity", 0);
|
|
2392
2501
|
});
|
|
2393
2502
|
}
|
|
2394
|
-
if (
|
|
2503
|
+
if (A.showLabels) {
|
|
2395
2504
|
if (w.hasHierarchicalLabels && w.getYearFromX) {
|
|
2396
|
-
const
|
|
2397
|
-
for (const
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2505
|
+
const y = /* @__PURE__ */ new Map();
|
|
2506
|
+
for (const p of L) {
|
|
2507
|
+
const $ = w.getYearFromX(p);
|
|
2508
|
+
y.has($) || y.set($, []), y.get($).push(p);
|
|
2400
2509
|
}
|
|
2401
|
-
for (const
|
|
2402
|
-
const
|
|
2403
|
-
rt.append("text").attr("x",
|
|
2510
|
+
for (const p of L) {
|
|
2511
|
+
const $ = st.get(p) || 0;
|
|
2512
|
+
rt.append("text").attr("x", $ * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat(p));
|
|
2404
2513
|
}
|
|
2405
|
-
for (const [
|
|
2406
|
-
if (
|
|
2407
|
-
const
|
|
2408
|
-
let
|
|
2409
|
-
if (
|
|
2410
|
-
const
|
|
2411
|
-
|
|
2514
|
+
for (const [p, $] of y)
|
|
2515
|
+
if ($.length > 0) {
|
|
2516
|
+
const D = Math.min(...$.map((Z) => st.get(Z) || 0)), X = Math.max(...$.map((Z) => st.get(Z) || 0)), G = (D + X) / 2;
|
|
2517
|
+
let P = "";
|
|
2518
|
+
if (p > 9999) {
|
|
2519
|
+
const Z = Math.floor(p / 100), un = p % 100;
|
|
2520
|
+
P = `${["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][un - 1]} '${Z.toString().slice(-2)}`;
|
|
2412
2521
|
} else
|
|
2413
|
-
|
|
2414
|
-
rt.append("text").attr("x",
|
|
2522
|
+
P = `'${p.toString().slice(-2)}`;
|
|
2523
|
+
rt.append("text").attr("x", G * (H + 4) + H / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", mt).text(P), $.length > 1 && rt.append("line").attr("x1", D * (H + 4)).attr("x2", X * (H + 4) + H).attr("y1", -20).attr("y2", -20).style("stroke", sn).style("stroke-width", 1).style("opacity", 0.3);
|
|
2415
2524
|
}
|
|
2416
2525
|
} else {
|
|
2417
|
-
const
|
|
2418
|
-
for (let
|
|
2419
|
-
const
|
|
2420
|
-
rt.append("text").attr("x",
|
|
2526
|
+
const y = Math.max(1, Math.floor(L.length / 10));
|
|
2527
|
+
for (let p = 0; p < L.length; p += y) {
|
|
2528
|
+
const $ = L[p];
|
|
2529
|
+
rt.append("text").attr("x", p * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat($));
|
|
2421
2530
|
}
|
|
2422
2531
|
}
|
|
2423
|
-
for (let
|
|
2424
|
-
rt.append("text").attr("x", -8).attr("y", (
|
|
2532
|
+
for (let y = q; y <= T; y++)
|
|
2533
|
+
rt.append("text").attr("x", -8).attr("y", (y - q) * (nt + 4) + nt / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", mt).text(w.yFormat(y));
|
|
2425
2534
|
}
|
|
2426
2535
|
return () => {
|
|
2427
2536
|
gt.remove();
|
|
2428
2537
|
};
|
|
2429
|
-
}, [t, e, n, r, c, f,
|
|
2430
|
-
return /* @__PURE__ */
|
|
2538
|
+
}, [t, e, n, r, c, f, A.showTooltip, A.showLabels, a, l]), !t || t.length === 0)
|
|
2539
|
+
return /* @__PURE__ */ U(
|
|
2431
2540
|
"div",
|
|
2432
2541
|
{
|
|
2433
2542
|
className: "flex items-center justify-center w-full",
|
|
2434
2543
|
style: { height: i },
|
|
2435
|
-
children: /* @__PURE__ */
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
/* @__PURE__ */
|
|
2544
|
+
children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
|
|
2545
|
+
/* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
2546
|
+
/* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in activity grid" })
|
|
2438
2547
|
] })
|
|
2439
2548
|
}
|
|
2440
2549
|
);
|
|
2441
2550
|
if (!(e?.dateField && e?.valueField))
|
|
2442
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ U(
|
|
2443
2552
|
"div",
|
|
2444
2553
|
{
|
|
2445
2554
|
className: "flex items-center justify-center w-full",
|
|
2446
2555
|
style: { height: i },
|
|
2447
|
-
children: /* @__PURE__ */
|
|
2448
|
-
/* @__PURE__ */
|
|
2449
|
-
/* @__PURE__ */
|
|
2556
|
+
children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
|
|
2557
|
+
/* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
|
|
2558
|
+
/* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "Activity grid requires a time dimension and a measure" })
|
|
2450
2559
|
] })
|
|
2451
2560
|
}
|
|
2452
2561
|
);
|
|
2453
|
-
const
|
|
2562
|
+
const F = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField;
|
|
2454
2563
|
return (r?.timeDimensions?.find(
|
|
2455
|
-
(x) => x.dimension ===
|
|
2456
|
-
)?.granularity || "day")?.toLowerCase() === "year" ? /* @__PURE__ */
|
|
2564
|
+
(x) => x.dimension === F || x.dimension.includes(F)
|
|
2565
|
+
)?.granularity || "day")?.toLowerCase() === "year" ? /* @__PURE__ */ U(
|
|
2457
2566
|
"div",
|
|
2458
2567
|
{
|
|
2459
2568
|
className: "flex items-center justify-center w-full",
|
|
2460
2569
|
style: { height: i },
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2462
|
-
/* @__PURE__ */
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2570
|
+
children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
|
|
2571
|
+
/* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "Granularity Too High" }),
|
|
2572
|
+
/* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "Activity grids work best with hour, day, week, month, or quarter granularity" }),
|
|
2573
|
+
/* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary mt-1", children: "Please choose a lower granularity for your time dimension" })
|
|
2465
2574
|
] })
|
|
2466
2575
|
}
|
|
2467
|
-
) : /* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2469
|
-
!f && /* @__PURE__ */
|
|
2576
|
+
) : /* @__PURE__ */ U("div", { className: "w-full flex flex-col relative", style: { height: i, minHeight: "250px", overflow: "hidden", width: "100%" }, children: /* @__PURE__ */ yt("div", { ref: s, className: "w-full h-full relative overflow-x-auto", style: { width: "100%" }, children: [
|
|
2577
|
+
/* @__PURE__ */ U("svg", { ref: o, className: "h-full" }),
|
|
2578
|
+
!f && /* @__PURE__ */ U("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ U("div", { className: "text-dc-text-muted text-sm", children: "Measuring chart dimensions..." }) })
|
|
2470
2579
|
] }) });
|
|
2471
2580
|
}
|
|
2472
|
-
const
|
|
2581
|
+
const Wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2473
2582
|
__proto__: null,
|
|
2474
|
-
default:
|
|
2583
|
+
default: ba
|
|
2475
2584
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2476
2585
|
export {
|
|
2477
|
-
|
|
2478
|
-
|
|
2586
|
+
Ha as A,
|
|
2587
|
+
Pa as B,
|
|
2479
2588
|
Ta as C,
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2589
|
+
Ua as D,
|
|
2590
|
+
xn as E,
|
|
2591
|
+
Wa as F,
|
|
2592
|
+
Ra as N,
|
|
2593
|
+
Fa as P,
|
|
2594
|
+
Ia as T,
|
|
2595
|
+
Ca as a,
|
|
2596
|
+
Fe as b,
|
|
2597
|
+
Xt as c,
|
|
2488
2598
|
za as d,
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2599
|
+
qa as e,
|
|
2600
|
+
Aa as f,
|
|
2601
|
+
Mt as g,
|
|
2602
|
+
Nn as h,
|
|
2603
|
+
$a as i,
|
|
2604
|
+
Va as j,
|
|
2605
|
+
Oa as k,
|
|
2606
|
+
ya as l,
|
|
2497
2607
|
ue as m,
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2608
|
+
vn as n,
|
|
2609
|
+
ca as o,
|
|
2610
|
+
It as p,
|
|
2501
2611
|
en as q,
|
|
2502
|
-
|
|
2612
|
+
ka as r,
|
|
2503
2613
|
ct as s,
|
|
2504
|
-
|
|
2614
|
+
Ea as t,
|
|
2505
2615
|
bn as u,
|
|
2506
|
-
|
|
2616
|
+
mn as v,
|
|
2507
2617
|
kn as w,
|
|
2508
|
-
|
|
2509
|
-
|
|
2618
|
+
Da as x,
|
|
2619
|
+
Sn as y,
|
|
2510
2620
|
La as z
|
|
2511
2621
|
};
|
|
2512
|
-
//# sourceMappingURL=chart-activitygridchart-
|
|
2622
|
+
//# sourceMappingURL=chart-activitygridchart-CUGN9Xq9.js.map
|