@dcs-tech/ui 0.9.0 → 0.10.0
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/CHANGELOG.md +126 -0
- package/README.md +40 -5
- package/dist/{ChartImageMenu-DDVNJNc6.js → ChartImageMenu-3OfqNFyt.js} +557 -546
- package/dist/{ChartView-CW3m4Z_1.js → ChartView-n4G5_2ro.js} +35 -31
- package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-i6fOdrDM.js} +2 -2
- package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CCt5ozD9.js} +2 -2
- package/dist/{SummarySeeAll-BRHOMQRA.js → SummarySeeAll-BY8knsRe.js} +5 -5
- package/dist/{columnValue-DwUqueZ6.js → columnValue-74XDBcVF.js} +219 -192
- package/dist/{exportContext-BKFnNQ0q.js → exportContext-C52ZuHd8.js} +2 -2
- package/dist/{exportEngine-BFZD6djX.js → exportEngine-BmDly7iw.js} +1 -1
- package/dist/{geometry-yZmKN662.js → geometry-DG134nYI.js} +379 -273
- package/dist/index.js +12456 -9277
- package/dist/{labels-CnqqTrne.js → labels-BPItSeRU.js} +2 -0
- package/dist/scrollArea-D84Cwm4o.js +310 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-BiQYJbYZ.js} +8 -2
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +4 -3
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Charts/Funnel.d.ts +2 -1
- package/dist/types/components/Charts/chartImage.d.ts +1 -0
- package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
- package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
- package/dist/types/components/CommandPalette/index.d.ts +2 -0
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +2 -1
- package/dist/types/components/DataTable/TableView.d.ts +1 -0
- package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
- package/dist/types/components/DataTable/defaults.d.ts +4 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/labels.d.ts +2 -0
- package/dist/types/components/DataTable/types.d.ts +18 -2
- package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
- package/dist/types/components/DataTable/ui.d.ts +2 -1
- package/dist/types/components/DataTable/useTable.d.ts +1 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/types/components/FieldWrapper/index.d.ts +1 -1
- package/dist/types/components/Fields/index.d.ts +1 -1
- package/dist/types/components/Image/ImageEditor.d.ts +21 -0
- package/dist/types/components/Image/ImagePicker.d.ts +10 -1
- package/dist/types/components/Image/imageRender.d.ts +33 -0
- package/dist/types/components/Image/index.d.ts +3 -1
- package/dist/types/components/Image/prepareImage.d.ts +4 -3
- package/dist/types/components/Link/Link.d.ts +22 -0
- package/dist/types/components/Link/index.d.ts +2 -0
- package/dist/types/components/NavList/NavList.d.ts +13 -0
- package/dist/types/components/NavList/index.d.ts +2 -0
- package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
- package/dist/types/components/PageProgress/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +4 -0
- package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
- package/dist/types/components/ReorderList/ReorderList.d.ts +55 -0
- package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
- package/dist/types/components/ReorderList/index.d.ts +5 -0
- package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +86 -0
- package/dist/types/core/hooks/index.d.ts +1 -0
- package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
- package/dist/types/core/logic/alert.logic.d.ts +3 -0
- package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
- package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
- package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
- package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
- package/dist/types/core/logic/index.d.ts +9 -0
- package/dist/types/core/logic/inertProps.d.ts +3 -0
- package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
- package/dist/types/core/logic/pagination.logic.d.ts +7 -0
- package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
- package/dist/types/core/logic/reorder.logic.d.ts +49 -0
- package/dist/types/core/types/chipinput.types.d.ts +3 -1
- package/dist/types/core/types/collapsible.types.d.ts +3 -0
- package/dist/types/core/types/datePicker.types.d.ts +7 -0
- package/dist/types/core/types/field.types.d.ts +6 -3
- package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
- package/dist/types/core/types/fields.types.d.ts +6 -1
- package/dist/types/core/types/form.types.d.ts +1 -0
- package/dist/types/core/types/format.types.d.ts +2 -0
- package/dist/types/core/types/input.types.d.ts +2 -0
- package/dist/types/core/types/navigation.types.d.ts +1 -0
- package/dist/types/core/types/select.types.d.ts +2 -6
- package/dist/types/core/types/suggest.types.d.ts +2 -0
- package/dist/types/index.d.ts +24 -6
- package/package.json +1 -1
- package/dist/scrollArea-DbYFqbIH.js +0 -269
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, C as t, Cn as n, Dn as r, E as i, En as a, F as o, J as s, L as c, N as l, Nn as u, O as d, P as f, Q as p, R as m, S as h, T as g, Tn as _, Y as v, _ as y, b, c as x, d as S, et as C, ft as w, g as T, h as
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { createPortal as
|
|
2
|
+
import { A as e, C as t, Cn as n, Dn as r, E as i, En as a, F as o, J as s, L as c, N as l, Nn as u, O as d, P as f, Q as p, R as m, S as h, T as g, Tn as _, Y as v, _ as y, b, c as x, d as S, et as C, ft as w, g as T, h as E, i as D, j as ee, kn as te, l as ne, r as re, rt as ie, st as O, ut as ae, w as oe, y as se } from "./geometry-DG134nYI.js";
|
|
3
|
+
import { a as ce, l as le, n as ue, o as de, u as fe } from "./fileActions-CFNO14Aj.js";
|
|
4
|
+
import { t as pe } from "./runFileTask-BIZTFnZP.js";
|
|
5
|
+
import me, { cloneElement as he, createContext as ge, forwardRef as _e, useCallback as k, useContext as ve, useEffect as A, useId as ye, useLayoutEffect as be, useMemo as xe, useRef as j, useState as M, useSyncExternalStore as Se } from "react";
|
|
6
|
+
import { Fragment as Ce, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as we } from "react-dom";
|
|
8
8
|
// src/core/logic/button.logic.ts
|
|
9
|
-
function
|
|
9
|
+
function Te(e) {
|
|
10
10
|
let t = e.isIconOnly && e.shape === "rounded" ? "circle" : e.shape, n = [
|
|
11
11
|
"root",
|
|
12
12
|
`variant_${e.variant}`,
|
|
@@ -16,12 +16,12 @@ function De(e) {
|
|
|
16
16
|
];
|
|
17
17
|
return e.disabled && n.push("disabled"), e.loading && (n.push("loading"), n.push(`loading_${e.loadingPosition}`)), e.fullWidth && n.push("fullWidth"), e.disableTextTransform && n.push("disableTextTransform"), e.disableElevation && n.push("disableElevation"), e.showFocusRing && n.push("showFocusRing"), e.isIconOnly && n.push("iconOnly"), n;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ee(e) {
|
|
20
20
|
let t = ["group", `orientation_${e.orientation}`];
|
|
21
21
|
return e.fullWidth && t.push("groupFullWidth"), t;
|
|
22
22
|
}
|
|
23
23
|
// src/core/logic/press.logic.ts
|
|
24
|
-
function
|
|
24
|
+
function De(e, t) {
|
|
25
25
|
let n = t ? Math.min(Math.max(t.x, 0), e.width) : e.width / 2, r = t ? Math.min(Math.max(t.y, 0), e.height) : e.height / 2, i = Math.max(n, e.width - n), a = Math.max(r, e.height - r);
|
|
26
26
|
return {
|
|
27
27
|
x: n,
|
|
@@ -29,42 +29,42 @@ function ke(e, t) {
|
|
|
29
29
|
size: 2 * Math.hypot(i, a)
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Oe(e, t = 150) {
|
|
33
33
|
return Math.max(0, t - e);
|
|
34
34
|
}
|
|
35
35
|
// src/core/logic/fileQueue.logic.ts
|
|
36
|
-
var
|
|
36
|
+
var ke = {
|
|
37
37
|
concurrency: 2,
|
|
38
38
|
maxQueued: 20,
|
|
39
39
|
timeoutMs: 12e4,
|
|
40
40
|
keepFinished: 10,
|
|
41
41
|
workers: "auto"
|
|
42
42
|
};
|
|
43
|
-
function
|
|
43
|
+
function Ae(e = {}) {
|
|
44
44
|
let t = (e, t, n) => typeof e == "number" && Number.isFinite(e) && e >= n ? Math.floor(e) : t;
|
|
45
45
|
return {
|
|
46
|
-
concurrency: t(e.concurrency,
|
|
47
|
-
maxQueued: t(e.maxQueued,
|
|
48
|
-
timeoutMs: t(e.timeoutMs,
|
|
49
|
-
keepFinished: t(e.keepFinished,
|
|
46
|
+
concurrency: t(e.concurrency, ke.concurrency, 1),
|
|
47
|
+
maxQueued: t(e.maxQueued, ke.maxQueued, 0),
|
|
48
|
+
timeoutMs: t(e.timeoutMs, ke.timeoutMs, 1),
|
|
49
|
+
keepFinished: t(e.keepFinished, ke.keepFinished, 0),
|
|
50
50
|
workers: e.workers === "off" ? "off" : "auto"
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
var
|
|
53
|
+
var F = {
|
|
54
54
|
high: 0,
|
|
55
55
|
normal: 1,
|
|
56
56
|
low: 2
|
|
57
|
-
},
|
|
57
|
+
}, je = /* @__PURE__ */ new Set([
|
|
58
58
|
"delivered",
|
|
59
59
|
"failed",
|
|
60
60
|
"cancelled"
|
|
61
|
-
]),
|
|
62
|
-
function
|
|
61
|
+
]), I = (e) => je.has(e.status), Me = (e) => e.status === "queued" || e.status === "running";
|
|
62
|
+
function L(e, t) {
|
|
63
63
|
let n = e.filter((e) => e.status === "running").length, r = Math.max(0, t - n);
|
|
64
|
-
return r === 0 ? [] : e.filter((e) => e.status === "queued").sort((e, t) =>
|
|
64
|
+
return r === 0 ? [] : e.filter((e) => e.status === "queued").sort((e, t) => F[e.priority] - F[t.priority] || e.seq - t.seq).slice(0, r).map((e) => e.id);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
let r = t.dedupeKey ? e.filter((e) => e.dedupeKey === t.dedupeKey &&
|
|
66
|
+
function Ne(e, t, n) {
|
|
67
|
+
let r = t.dedupeKey ? e.filter((e) => e.dedupeKey === t.dedupeKey && Me(e)) : [];
|
|
68
68
|
if (r.length && !t.replace) return {
|
|
69
69
|
kind: "reuse",
|
|
70
70
|
id: r[0].id
|
|
@@ -78,55 +78,62 @@ function Fe(e, t, n) {
|
|
|
78
78
|
cancel: i
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
81
|
+
var Pe = (e) => e.attempts <= e.retry;
|
|
82
|
+
function Fe(e, t) {
|
|
83
83
|
if (!Number.isFinite(t)) return null;
|
|
84
84
|
let n = Math.min(1, Math.max(e, t));
|
|
85
85
|
return n === e || n < 1 && n - e < .01 ? null : n;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ie(e, t) {
|
|
88
88
|
return e === "download" || e === "none" ? "now" : t.activationActive === void 0 ? t.sinceSubmitMs <= 4e3 ? "now" : "wait" : t.activationActive ? "now" : "wait";
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return e.filter(
|
|
90
|
+
function Le(e, t) {
|
|
91
|
+
return e.filter(I).sort((e, t) => (t.finishedAt ?? 0) - (e.finishedAt ?? 0) || t.seq - e.seq).slice(t).map((e) => e.id);
|
|
92
92
|
}
|
|
93
93
|
// src/core/logic/useMergeRefs.ts
|
|
94
|
-
function
|
|
95
|
-
let t =
|
|
96
|
-
return t.current = e,
|
|
94
|
+
function Re(...e) {
|
|
95
|
+
let t = j(e);
|
|
96
|
+
return t.current = e, k((e) => {
|
|
97
97
|
for (let n of t.current) n && (typeof n == "function" ? n(e) : n.current = e);
|
|
98
98
|
}, []);
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
tooltip: "
|
|
102
|
-
open: "
|
|
103
|
-
tone_info: "
|
|
104
|
-
tone_success: "
|
|
105
|
-
tone_warning: "
|
|
106
|
-
tone_danger: "
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
var R = {
|
|
101
|
+
tooltip: "_tooltip_16wxf_14",
|
|
102
|
+
open: "_open_16wxf_42",
|
|
103
|
+
tone_info: "_tone_info_16wxf_53",
|
|
104
|
+
tone_success: "_tone_success_16wxf_54",
|
|
105
|
+
tone_warning: "_tone_warning_16wxf_55",
|
|
106
|
+
tone_danger: "_tone_danger_16wxf_56",
|
|
107
|
+
instant: "_instant_16wxf_82",
|
|
108
|
+
placement_top: "_placement_top_16wxf_93",
|
|
109
|
+
placement_bottom: "_placement_bottom_16wxf_94",
|
|
110
|
+
placement_left: "_placement_left_16wxf_95",
|
|
111
|
+
placement_right: "_placement_right_16wxf_96",
|
|
112
|
+
measured: "_measured_16wxf_102",
|
|
113
|
+
helpIcon: "_helpIcon_16wxf_110",
|
|
114
|
+
disabledAnchor: "_disabledAnchor_16wxf_143"
|
|
115
|
+
}, ze = 500, Be = 100, z = 8, Ve = 16, He = 300, Ue = 0, B = null, V = () => B !== null || Date.now() - Ue < He, We = () => V(), Ge = () => {
|
|
116
|
+
B?.hide(!0);
|
|
117
|
+
}, Ke = () => {
|
|
118
|
+
Ue = Date.now();
|
|
119
|
+
}, qe = 0, Je = () => {
|
|
120
|
+
Ue = qe = Date.now();
|
|
121
|
+
}, Ye = 50, Xe = () => typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --probe"), Ze = () => typeof HTMLElement < "u" && Object.prototype.hasOwnProperty.call(HTMLElement.prototype, "popover");
|
|
122
|
+
function Qe(e) {
|
|
123
|
+
let t = r(e), n = `tooltip-${ye().replace(/:/g, "")}`, [i, o] = M(!1), [s, c] = M(t?.placement || "top"), [l, u] = M(!1), [d, f] = M(!1), p = j(null), m = j(null), h = j(void 0), g = j(void 0), _ = j(null), v = j("pointer"), y = t?.placement || "top", b = t?.anchorTo || "auto", x = t?.delay ?? ze, S = t?.closeDelay ?? Be, C = k(() => {
|
|
124
|
+
let e = p.current, t = m.current;
|
|
118
125
|
if (!e || !t) return;
|
|
119
|
-
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i =
|
|
120
|
-
anchorTo:
|
|
121
|
-
openedBy:
|
|
126
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = _.current, o = !!i && te({
|
|
127
|
+
anchorTo: b,
|
|
128
|
+
openedBy: v.current,
|
|
122
129
|
anchorWidth: n.width,
|
|
123
130
|
tooltipWidth: r.width
|
|
124
131
|
}), s = a({
|
|
125
132
|
anchor: o && i ? {
|
|
126
|
-
top: i.y -
|
|
127
|
-
left: i.x -
|
|
128
|
-
width:
|
|
129
|
-
height:
|
|
133
|
+
top: i.y - Ve / 2,
|
|
134
|
+
left: i.x - Ve / 2,
|
|
135
|
+
width: Ve,
|
|
136
|
+
height: Ve
|
|
130
137
|
} : {
|
|
131
138
|
top: n.top,
|
|
132
139
|
left: n.left,
|
|
@@ -141,59 +148,63 @@ function Je(e) {
|
|
|
141
148
|
width: window.innerWidth,
|
|
142
149
|
height: window.innerHeight
|
|
143
150
|
},
|
|
144
|
-
placement:
|
|
145
|
-
offset:
|
|
151
|
+
placement: y,
|
|
152
|
+
offset: z
|
|
146
153
|
});
|
|
147
154
|
e.style.top = `${s.top}px`, e.style.left = `${s.left}px`, c(s.placement);
|
|
148
|
-
}, [
|
|
149
|
-
window.clearTimeout(
|
|
150
|
-
},
|
|
151
|
-
f
|
|
152
|
-
}, [
|
|
153
|
-
|
|
154
|
-
}, []),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
}, [y, b]), w = () => {
|
|
156
|
+
window.clearTimeout(h.current), window.clearTimeout(g.current);
|
|
157
|
+
}, T = k((e = !1) => {
|
|
158
|
+
w(), f(e), o(!1), B === E.current && (Ue = Date.now(), B = null);
|
|
159
|
+
}, []), E = j({ hide: (e) => T(e) }), D = k((e, t, r) => {
|
|
160
|
+
B && B !== E.current && B.hide(!0), B = E.current, f(r), m.current = e, v.current = t, u(t === "pointer" && b !== "element"), Xe() && e.style.setProperty("anchor-name", `--${n}`), o(!0);
|
|
161
|
+
}, [n, b]), ee = k((e, t) => {
|
|
162
|
+
if (w(), V()) {
|
|
163
|
+
let n = B !== null && B !== E.current;
|
|
164
|
+
D(e, t, n || Date.now() - qe < Ye);
|
|
165
|
+
} else h.current = window.setTimeout(() => D(e, t, !1), x);
|
|
166
|
+
}, [x, D]), ne = k(() => {
|
|
167
|
+
w(), g.current = window.setTimeout(() => T(), S);
|
|
168
|
+
}, [S, T]);
|
|
169
|
+
return A(() => {
|
|
170
|
+
let e = p.current;
|
|
163
171
|
if (!e) return;
|
|
164
172
|
if (!i) {
|
|
165
|
-
|
|
173
|
+
Ze() && e.matches(":popover-open") && e.hidePopover();
|
|
166
174
|
return;
|
|
167
175
|
}
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
let t = () =>
|
|
176
|
+
if (Ze() && !e.matches(":popover-open") && e.showPopover(), Xe() && !l) return;
|
|
177
|
+
C();
|
|
178
|
+
let t = () => C();
|
|
171
179
|
return window.addEventListener("scroll", t, !0), window.addEventListener("resize", t), () => {
|
|
172
180
|
window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", t);
|
|
173
181
|
};
|
|
174
182
|
}, [
|
|
175
183
|
i,
|
|
176
184
|
l,
|
|
177
|
-
|
|
178
|
-
]),
|
|
185
|
+
C
|
|
186
|
+
]), A(() => {
|
|
179
187
|
if (!i) return;
|
|
180
188
|
let e = (e) => {
|
|
181
|
-
e.key === "Escape" && (
|
|
189
|
+
e.key === "Escape" && T();
|
|
182
190
|
};
|
|
183
191
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
184
|
-
}, [i,
|
|
192
|
+
}, [i, T]), A(() => () => {
|
|
193
|
+
w(), B === E.current && (B = null);
|
|
194
|
+
}, []), t ? {
|
|
185
195
|
hasTooltip: !0,
|
|
186
|
-
tooltipNode: /* @__PURE__ */
|
|
187
|
-
ref:
|
|
196
|
+
tooltipNode: /* @__PURE__ */ N("div", {
|
|
197
|
+
ref: p,
|
|
188
198
|
id: n,
|
|
189
199
|
role: "tooltip",
|
|
190
|
-
popover:
|
|
200
|
+
popover: Ze() ? "manual" : void 0,
|
|
191
201
|
className: [
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
t.tone && t.tone !== "default" ?
|
|
195
|
-
i ?
|
|
196
|
-
|
|
202
|
+
R.tooltip,
|
|
203
|
+
R[`placement_${s}`],
|
|
204
|
+
t.tone && t.tone !== "default" ? R[`tone_${t.tone}`] : "",
|
|
205
|
+
i ? R.open : "",
|
|
206
|
+
d ? R.instant : "",
|
|
207
|
+
l ? R.measured : "",
|
|
197
208
|
t.className || ""
|
|
198
209
|
].filter(Boolean).join(" "),
|
|
199
210
|
style: { "--tooltip-anchor": `--${n}` },
|
|
@@ -201,22 +212,22 @@ function Je(e) {
|
|
|
201
212
|
}),
|
|
202
213
|
triggerProps: {
|
|
203
214
|
onPointerEnter: (e) => {
|
|
204
|
-
e.pointerType !== "touch" && (
|
|
215
|
+
e.pointerType !== "touch" && (_.current = {
|
|
205
216
|
x: e.clientX,
|
|
206
217
|
y: e.clientY
|
|
207
|
-
},
|
|
218
|
+
}, ee(e.currentTarget, "pointer"));
|
|
208
219
|
},
|
|
209
220
|
onPointerMove: (e) => {
|
|
210
|
-
e.pointerType === "touch" || i ||
|
|
221
|
+
e.pointerType === "touch" || i || h.current === void 0 || (_.current = {
|
|
211
222
|
x: e.clientX,
|
|
212
223
|
y: e.clientY
|
|
213
224
|
});
|
|
214
225
|
},
|
|
215
|
-
onPointerLeave:
|
|
226
|
+
onPointerLeave: ne,
|
|
216
227
|
onFocus: (e) => {
|
|
217
|
-
e.currentTarget.matches(":focus-visible") && (
|
|
228
|
+
e.currentTarget.matches(":focus-visible") && (_.current = null, ee(e.currentTarget, "focus"));
|
|
218
229
|
},
|
|
219
|
-
onBlur:
|
|
230
|
+
onBlur: ne,
|
|
220
231
|
"aria-describedby": i ? n : void 0
|
|
221
232
|
}
|
|
222
233
|
} : {
|
|
@@ -231,7 +242,7 @@ function Je(e) {
|
|
|
231
242
|
hasTooltip: !1
|
|
232
243
|
};
|
|
233
244
|
}
|
|
234
|
-
var
|
|
245
|
+
var $e = {
|
|
235
246
|
press: "_press_1iawn_23",
|
|
236
247
|
ripple: "_ripple_1iawn_60",
|
|
237
248
|
rippleHost: "_rippleHost_1iawn_70",
|
|
@@ -239,39 +250,39 @@ var Ye = {
|
|
|
239
250
|
waveGrow: "_waveGrow_1iawn_1",
|
|
240
251
|
waveFade: "_waveFade_1iawn_1",
|
|
241
252
|
waveAppear: "_waveAppear_1iawn_1"
|
|
242
|
-
},
|
|
243
|
-
function
|
|
253
|
+
}, et = 1500;
|
|
254
|
+
function tt(e) {
|
|
244
255
|
let t = e.querySelector(":scope > [data-press-ripples]");
|
|
245
256
|
if (t) return t;
|
|
246
257
|
let n = document.createElement("span");
|
|
247
|
-
return n.className =
|
|
258
|
+
return n.className = $e.rippleHost, n.setAttribute("data-press-ripples", ""), n.setAttribute("aria-hidden", "true"), e.appendChild(n), n;
|
|
248
259
|
}
|
|
249
|
-
function
|
|
250
|
-
let n = e.getBoundingClientRect(), r =
|
|
260
|
+
function nt(e, t) {
|
|
261
|
+
let n = e.getBoundingClientRect(), r = De(n, t && {
|
|
251
262
|
x: t.x - n.left,
|
|
252
263
|
y: t.y - n.top
|
|
253
264
|
}), i = document.createElement("span");
|
|
254
|
-
return i.className =
|
|
265
|
+
return i.className = $e.wave, i.style.left = `${r.x - r.size / 2}px`, i.style.top = `${r.y - r.size / 2}px`, i.style.width = `${r.size}px`, i.style.height = `${r.size}px`, i.appendChild(document.createElement("span")), tt(e).appendChild(i), () => {
|
|
255
266
|
i.setAttribute("data-leaving", "");
|
|
256
267
|
let e = () => i.remove();
|
|
257
|
-
i.firstElementChild?.addEventListener("animationend", e, { once: !0 }), setTimeout(e,
|
|
268
|
+
i.firstElementChild?.addEventListener("animationend", e, { once: !0 }), setTimeout(e, et);
|
|
258
269
|
};
|
|
259
270
|
}
|
|
260
|
-
function
|
|
261
|
-
let i =
|
|
262
|
-
|
|
271
|
+
function rt({ enabled: e = !0, ripple: t = !1, centered: n = !1, target: r } = {}) {
|
|
272
|
+
let i = j(null);
|
|
273
|
+
A(() => () => {
|
|
263
274
|
i.current && clearTimeout(i.current);
|
|
264
275
|
}, []);
|
|
265
|
-
let a =
|
|
276
|
+
let a = k((e, n) => {
|
|
266
277
|
if (e.matches(":disabled, [aria-disabled=\"true\"]")) return () => void 0;
|
|
267
278
|
i.current && clearTimeout(i.current);
|
|
268
279
|
let r = performance.now();
|
|
269
280
|
e.setAttribute("data-pressed", "");
|
|
270
|
-
let a = t ?
|
|
281
|
+
let a = t ? nt(e, n) : null, o = !1;
|
|
271
282
|
return () => {
|
|
272
|
-
o || (o = !0, a?.(), i.current = setTimeout(() => e.removeAttribute("data-pressed"),
|
|
283
|
+
o || (o = !0, a?.(), i.current = setTimeout(() => e.removeAttribute("data-pressed"), Oe(performance.now() - r)));
|
|
273
284
|
};
|
|
274
|
-
}, [t]), o =
|
|
285
|
+
}, [t]), o = k((t) => {
|
|
275
286
|
if (!e || t.button !== 0) return;
|
|
276
287
|
let i = t.currentTarget, o = a(r?.current ?? i, n ? null : {
|
|
277
288
|
x: t.clientX,
|
|
@@ -283,7 +294,7 @@ function $e({ enabled: e = !0, ripple: t = !1, centered: n = !1, target: r } = {
|
|
|
283
294
|
n,
|
|
284
295
|
r,
|
|
285
296
|
a
|
|
286
|
-
]), s =
|
|
297
|
+
]), s = k((t) => {
|
|
287
298
|
if (!e || t.repeat || t.key !== " " && t.key !== "Enter") return;
|
|
288
299
|
let n = t.currentTarget, i = a(r?.current ?? n, null);
|
|
289
300
|
t.key === "Enter" ? i() : n.addEventListener("keyup", i, { once: !0 });
|
|
@@ -292,224 +303,224 @@ function $e({ enabled: e = !0, ripple: t = !1, centered: n = !1, target: r } = {
|
|
|
292
303
|
r,
|
|
293
304
|
a
|
|
294
305
|
]);
|
|
295
|
-
return
|
|
306
|
+
return xe(() => ({
|
|
296
307
|
onPointerDown: o,
|
|
297
308
|
onKeyDown: s
|
|
298
309
|
}), [o, s]);
|
|
299
310
|
}
|
|
300
311
|
// src/components/Button/ButtonGroupContext.ts
|
|
301
|
-
var
|
|
302
|
-
function
|
|
303
|
-
return
|
|
312
|
+
var it = ge(null);
|
|
313
|
+
function at() {
|
|
314
|
+
return ve(it);
|
|
304
315
|
}
|
|
305
|
-
var
|
|
306
|
-
root: "
|
|
307
|
-
size_xxs: "
|
|
308
|
-
size_xs: "
|
|
309
|
-
size_small: "
|
|
310
|
-
size_medium: "
|
|
311
|
-
size_large: "
|
|
312
|
-
size_xl: "
|
|
313
|
-
iconOnly: "
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
loadingWrapper: "
|
|
342
|
-
loading_start: "
|
|
343
|
-
loading_end: "
|
|
344
|
-
spinner: "
|
|
345
|
-
spin: "
|
|
346
|
-
srOnly: "
|
|
347
|
-
group: "
|
|
348
|
-
orientation_horizontal: "
|
|
349
|
-
orientation_vertical: "
|
|
350
|
-
groupFullWidth: "
|
|
351
|
-
},
|
|
316
|
+
var H = {
|
|
317
|
+
root: "_root_bkmn0_6",
|
|
318
|
+
size_xxs: "_size_xxs_bkmn0_45",
|
|
319
|
+
size_xs: "_size_xs_bkmn0_52",
|
|
320
|
+
size_small: "_size_small_bkmn0_59",
|
|
321
|
+
size_medium: "_size_medium_bkmn0_66",
|
|
322
|
+
size_large: "_size_large_bkmn0_73",
|
|
323
|
+
size_xl: "_size_xl_bkmn0_80",
|
|
324
|
+
iconOnly: "_iconOnly_bkmn0_89",
|
|
325
|
+
icon: "_icon_bkmn0_89",
|
|
326
|
+
shape_rectangle: "_shape_rectangle_bkmn0_107",
|
|
327
|
+
shape_rounded: "_shape_rounded_bkmn0_111",
|
|
328
|
+
shape_pill: "_shape_pill_bkmn0_115",
|
|
329
|
+
shape_circle: "_shape_circle_bkmn0_119",
|
|
330
|
+
shape_square: "_shape_square_bkmn0_131",
|
|
331
|
+
color_primary: "_color_primary_bkmn0_149",
|
|
332
|
+
color_secondary: "_color_secondary_bkmn0_159",
|
|
333
|
+
color_success: "_color_success_bkmn0_169",
|
|
334
|
+
color_error: "_color_error_bkmn0_179",
|
|
335
|
+
color_warning: "_color_warning_bkmn0_189",
|
|
336
|
+
color_info: "_color_info_bkmn0_199",
|
|
337
|
+
color_neutral: "_color_neutral_bkmn0_209",
|
|
338
|
+
variant_filled: "_variant_filled_bkmn0_220",
|
|
339
|
+
disabled: "_disabled_bkmn0_226",
|
|
340
|
+
disableElevation: "_disableElevation_bkmn0_234",
|
|
341
|
+
variant_outlined: "_variant_outlined_bkmn0_244",
|
|
342
|
+
variant_text: "_variant_text_bkmn0_263",
|
|
343
|
+
variant_elevated: "_variant_elevated_bkmn0_279",
|
|
344
|
+
variant_tonal: "_variant_tonal_bkmn0_297",
|
|
345
|
+
loading: "_loading_bkmn0_321",
|
|
346
|
+
fullWidth: "_fullWidth_bkmn0_325",
|
|
347
|
+
disableTextTransform: "_disableTextTransform_bkmn0_329",
|
|
348
|
+
showFocusRing: "_showFocusRing_bkmn0_340",
|
|
349
|
+
content: "_content_bkmn0_347",
|
|
350
|
+
loading_overlay: "_loading_overlay_bkmn0_355",
|
|
351
|
+
loading_center: "_loading_center_bkmn0_356",
|
|
352
|
+
loadingWrapper: "_loadingWrapper_bkmn0_374",
|
|
353
|
+
loading_start: "_loading_start_bkmn0_386",
|
|
354
|
+
loading_end: "_loading_end_bkmn0_387",
|
|
355
|
+
spinner: "_spinner_bkmn0_392",
|
|
356
|
+
spin: "_spin_bkmn0_392",
|
|
357
|
+
srOnly: "_srOnly_bkmn0_403",
|
|
358
|
+
group: "_group_bkmn0_423",
|
|
359
|
+
orientation_horizontal: "_orientation_horizontal_bkmn0_428",
|
|
360
|
+
orientation_vertical: "_orientation_vertical_bkmn0_432",
|
|
361
|
+
groupFullWidth: "_groupFullWidth_bkmn0_436"
|
|
362
|
+
}, ot = () => {
|
|
352
363
|
let e = u();
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
className:
|
|
364
|
+
return /* @__PURE__ */ N("span", {
|
|
365
|
+
className: H.spinner,
|
|
355
366
|
role: "status",
|
|
356
367
|
"aria-label": e.common.loading,
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
className:
|
|
368
|
+
children: /* @__PURE__ */ N("span", {
|
|
369
|
+
className: H.srOnly,
|
|
359
370
|
children: e.common.loading
|
|
360
371
|
})
|
|
361
372
|
});
|
|
362
|
-
},
|
|
363
|
-
let
|
|
364
|
-
|
|
365
|
-
w &&
|
|
373
|
+
}, st = _e(({ type: e = "button", name: t, value: n, onClick: i, onFocus: a, onBlur: o, onMouseEnter: s, onMouseLeave: c, onPointerEnter: l, onPointerMove: u, onPointerLeave: d, onKeyDown: f, children: p, label: m, startIcon: h, endIcon: g, icon: _, tooltip: v, tooltipTrigger: y, disabled: b = !1, loading: x = !1, loadingPosition: S = "center", loadingIndicator: C, autoFocus: w = !1, tabIndex: T, preventDefault: E = !1, stopPropagation: D = !1, variant: ee = "elevated", size: te = "small", color: ne = "primary", shape: re = "rounded", className: ie = "", style: O = {}, fullWidth: ae = !1, disableTextTransform: oe = !1, disableElevation: se = !1, ripple: ce, feedback: le, showFocusRing: ue = !0, id: de, buttonRef: fe, href: pe, target: he, rel: ge, download: _e, component: ve, componentProps: A = {}, "aria-label": be, "aria-labelledby": M, "aria-describedby": Se, "aria-pressed": we, "aria-expanded": Ee, "aria-controls": De, "aria-haspopup": Oe, role: ke }, Ae) => {
|
|
374
|
+
let F = at(), je = F?.size || te, I = F?.variant || ee, Me = F?.color || ne, L = F?.disabled || b, Ne = ye(), Pe = de || Ne, Fe = j(null), Ie = Re(Ae, fe, Fe);
|
|
375
|
+
me.useEffect(() => {
|
|
376
|
+
w && Fe.current && Fe.current.focus();
|
|
366
377
|
}, [w]);
|
|
367
|
-
let
|
|
368
|
-
|
|
378
|
+
let Le = !!_ && !p && !m, ze = p || m || "", Be = k((e) => {
|
|
379
|
+
L || x || (E && e.preventDefault(), D && e.stopPropagation(), i?.(e));
|
|
369
380
|
}, [
|
|
370
|
-
|
|
381
|
+
L,
|
|
371
382
|
x,
|
|
372
|
-
|
|
373
|
-
|
|
383
|
+
E,
|
|
384
|
+
D,
|
|
374
385
|
i
|
|
375
|
-
]),
|
|
376
|
-
let e =
|
|
377
|
-
variant:
|
|
378
|
-
size:
|
|
379
|
-
color:
|
|
380
|
-
shape:
|
|
381
|
-
isIconOnly:
|
|
382
|
-
disabled:
|
|
386
|
+
]), z = le ?? (ce === !1 ? "none" : "ripple"), Ve = xe(() => {
|
|
387
|
+
let e = Te({
|
|
388
|
+
variant: I,
|
|
389
|
+
size: je,
|
|
390
|
+
color: Me,
|
|
391
|
+
shape: re,
|
|
392
|
+
isIconOnly: Le,
|
|
393
|
+
disabled: L,
|
|
383
394
|
loading: x,
|
|
384
395
|
loadingPosition: S,
|
|
385
|
-
fullWidth:
|
|
386
|
-
disableTextTransform:
|
|
387
|
-
disableElevation:
|
|
388
|
-
showFocusRing:
|
|
389
|
-
}).map((e) =>
|
|
390
|
-
return
|
|
396
|
+
fullWidth: ae,
|
|
397
|
+
disableTextTransform: oe,
|
|
398
|
+
disableElevation: se,
|
|
399
|
+
showFocusRing: ue
|
|
400
|
+
}).map((e) => H[e]).filter(Boolean);
|
|
401
|
+
return z !== "none" && e.push($e.press), z === "ripple" && e.push($e.ripple), ie && e.push(ie), e.join(" ");
|
|
391
402
|
}, [
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
403
|
+
I,
|
|
404
|
+
je,
|
|
405
|
+
Me,
|
|
406
|
+
re,
|
|
407
|
+
Le,
|
|
408
|
+
L,
|
|
398
409
|
x,
|
|
399
410
|
S,
|
|
400
|
-
|
|
401
|
-
ce,
|
|
402
|
-
le,
|
|
403
|
-
fe,
|
|
411
|
+
ae,
|
|
404
412
|
oe,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
})
|
|
427
|
-
className:
|
|
413
|
+
se,
|
|
414
|
+
ue,
|
|
415
|
+
ie,
|
|
416
|
+
z
|
|
417
|
+
]), He = rt({
|
|
418
|
+
enabled: z !== "none",
|
|
419
|
+
ripple: z === "ripple"
|
|
420
|
+
}), Ue = k((e) => {
|
|
421
|
+
He.onPointerDown(e), A.onPointerDown?.(e);
|
|
422
|
+
}, [He, A]), B = k((e) => {
|
|
423
|
+
He.onKeyDown(e), f?.(e);
|
|
424
|
+
}, [He, f]), { triggerProps: V, tooltipNode: We, hasTooltip: Ge } = Qe(v), Ke = r(v), qe = typeof Ke?.content == "string" ? Ke.content : void 0, Je = (L || x) && Ge, Ye = k((e) => {
|
|
425
|
+
a?.(e), V.onFocus(e);
|
|
426
|
+
}, [a, V]), Xe = k((e) => {
|
|
427
|
+
o?.(e), V.onBlur();
|
|
428
|
+
}, [o, V]), Ze = k((e) => {
|
|
429
|
+
l?.(e), V.onPointerEnter(e);
|
|
430
|
+
}, [l, V]), et = k((e) => {
|
|
431
|
+
u?.(e), V.onPointerMove(e);
|
|
432
|
+
}, [u, V]), tt = k((e) => {
|
|
433
|
+
d?.(e), V.onPointerLeave();
|
|
434
|
+
}, [d, V]), nt = C || /* @__PURE__ */ N(ot, {}), it = () => S === "overlay" || S === "center" ? /* @__PURE__ */ N("span", {
|
|
435
|
+
className: `${H.loadingWrapper} ${H[`loading_${S}`] || ""}`,
|
|
436
|
+
children: nt
|
|
437
|
+
}) : nt, st = () => Le ? /* @__PURE__ */ N("span", {
|
|
438
|
+
className: H.icon,
|
|
428
439
|
children: _
|
|
429
|
-
}) : /* @__PURE__ */
|
|
430
|
-
className:
|
|
440
|
+
}) : /* @__PURE__ */ P("span", {
|
|
441
|
+
className: H.content,
|
|
431
442
|
children: [
|
|
432
|
-
x && S === "start" && /* @__PURE__ */
|
|
433
|
-
className: `${
|
|
434
|
-
children:
|
|
443
|
+
x && S === "start" && /* @__PURE__ */ N("span", {
|
|
444
|
+
className: `${H.loadingWrapper} ${H.loading_start || ""}`,
|
|
445
|
+
children: it()
|
|
435
446
|
}),
|
|
436
|
-
h && !x && /* @__PURE__ */
|
|
437
|
-
className: `${
|
|
447
|
+
h && !x && /* @__PURE__ */ N("span", {
|
|
448
|
+
className: `${H.icon} ${H.iconStart || ""}`,
|
|
438
449
|
children: h
|
|
439
450
|
}),
|
|
440
|
-
|
|
441
|
-
g && !x && /* @__PURE__ */
|
|
442
|
-
className: `${
|
|
451
|
+
ze && /* @__PURE__ */ N("span", { children: ze }),
|
|
452
|
+
g && !x && /* @__PURE__ */ N("span", {
|
|
453
|
+
className: `${H.icon} ${H.iconEnd || ""}`,
|
|
443
454
|
children: g
|
|
444
455
|
}),
|
|
445
|
-
x && S === "end" && /* @__PURE__ */
|
|
446
|
-
className: `${
|
|
447
|
-
children:
|
|
456
|
+
x && S === "end" && /* @__PURE__ */ N("span", {
|
|
457
|
+
className: `${H.loadingWrapper} ${H.loading_end || ""}`,
|
|
458
|
+
children: it()
|
|
448
459
|
})
|
|
449
460
|
]
|
|
450
|
-
}),
|
|
451
|
-
ref:
|
|
452
|
-
id:
|
|
461
|
+
}), U = x && (S === "overlay" || S === "center"), ct = {
|
|
462
|
+
ref: Ie,
|
|
463
|
+
id: Pe,
|
|
453
464
|
name: t,
|
|
454
465
|
value: n,
|
|
455
|
-
disabled:
|
|
466
|
+
disabled: L || x,
|
|
456
467
|
tabIndex: T,
|
|
457
|
-
className:
|
|
458
|
-
style:
|
|
459
|
-
onClick:
|
|
460
|
-
onFocus:
|
|
461
|
-
onBlur:
|
|
468
|
+
className: Ve,
|
|
469
|
+
style: O,
|
|
470
|
+
onClick: Be,
|
|
471
|
+
onFocus: Ye,
|
|
472
|
+
onBlur: Xe,
|
|
462
473
|
onMouseEnter: s,
|
|
463
474
|
onMouseLeave: c,
|
|
464
|
-
onKeyDown:
|
|
465
|
-
"aria-label":
|
|
466
|
-
"aria-labelledby":
|
|
467
|
-
"aria-describedby":
|
|
468
|
-
onPointerEnter:
|
|
469
|
-
onPointerMove:
|
|
470
|
-
onPointerLeave:
|
|
471
|
-
"aria-pressed":
|
|
472
|
-
"aria-expanded":
|
|
473
|
-
"aria-controls":
|
|
474
|
-
"aria-haspopup":
|
|
475
|
+
onKeyDown: B,
|
|
476
|
+
"aria-label": be || (Le ? qe : void 0),
|
|
477
|
+
"aria-labelledby": M,
|
|
478
|
+
"aria-describedby": V["aria-describedby"] || Se,
|
|
479
|
+
onPointerEnter: Ze,
|
|
480
|
+
onPointerMove: et,
|
|
481
|
+
onPointerLeave: tt,
|
|
482
|
+
"aria-pressed": we,
|
|
483
|
+
"aria-expanded": Ee,
|
|
484
|
+
"aria-controls": De,
|
|
485
|
+
"aria-haspopup": Oe,
|
|
475
486
|
"aria-busy": x || void 0,
|
|
476
|
-
"aria-disabled":
|
|
477
|
-
role:
|
|
478
|
-
...
|
|
479
|
-
onPointerDown:
|
|
480
|
-
},
|
|
481
|
-
if (
|
|
482
|
-
let { disabled: e, ref: t, ...n } =
|
|
483
|
-
return /* @__PURE__ */
|
|
487
|
+
"aria-disabled": L || void 0,
|
|
488
|
+
role: ke || (pe ? "link" : void 0),
|
|
489
|
+
...A,
|
|
490
|
+
onPointerDown: Ue
|
|
491
|
+
}, W = /* @__PURE__ */ P(Ce, { children: [st(), U && it()] }), lt = () => {
|
|
492
|
+
if (pe) {
|
|
493
|
+
let { disabled: e, ref: t, ...n } = ct;
|
|
494
|
+
return /* @__PURE__ */ N("a", {
|
|
484
495
|
...n,
|
|
485
|
-
href:
|
|
486
|
-
target:
|
|
487
|
-
rel:
|
|
488
|
-
download:
|
|
489
|
-
children:
|
|
496
|
+
href: pe,
|
|
497
|
+
target: he,
|
|
498
|
+
rel: ge || (he === "_blank" ? "noopener noreferrer" : void 0),
|
|
499
|
+
download: _e,
|
|
500
|
+
children: W
|
|
490
501
|
});
|
|
491
502
|
}
|
|
492
|
-
return
|
|
493
|
-
...
|
|
503
|
+
return N(ve || "button", {
|
|
504
|
+
...ct,
|
|
494
505
|
type: e,
|
|
495
|
-
children:
|
|
506
|
+
children: W
|
|
496
507
|
});
|
|
497
508
|
};
|
|
498
|
-
return
|
|
499
|
-
className:
|
|
500
|
-
onPointerEnter:
|
|
501
|
-
onPointerLeave:
|
|
502
|
-
children:
|
|
503
|
-
}) :
|
|
509
|
+
return Ge ? /* @__PURE__ */ P(Ce, { children: [Je ? /* @__PURE__ */ N("span", {
|
|
510
|
+
className: R.disabledAnchor,
|
|
511
|
+
onPointerEnter: V.onPointerEnter,
|
|
512
|
+
onPointerLeave: V.onPointerLeave,
|
|
513
|
+
children: lt()
|
|
514
|
+
}) : lt(), We] }) : lt();
|
|
504
515
|
});
|
|
505
|
-
|
|
516
|
+
st.displayName = "Button";
|
|
506
517
|
// src/file/workerPool.ts
|
|
507
|
-
var
|
|
518
|
+
var U = class extends Error {
|
|
508
519
|
constructor(e, t) {
|
|
509
520
|
super(t), this.name = "WorkerFallback", this.reason = e;
|
|
510
521
|
}
|
|
511
522
|
};
|
|
512
|
-
function
|
|
523
|
+
function ct(e) {
|
|
513
524
|
let t = [], n = /* @__PURE__ */ new Set(), r = !1, i = 0, a = () => {
|
|
514
525
|
let t = e.create();
|
|
515
526
|
return e.init !== void 0 && t.postMessage(e.init), {
|
|
@@ -527,13 +538,13 @@ function it(e) {
|
|
|
527
538
|
},
|
|
528
539
|
run(e, { signal: c, progress: l }) {
|
|
529
540
|
return new Promise((u, d) => {
|
|
530
|
-
if (r) return d(new
|
|
541
|
+
if (r) return d(new U("unavailable", "Workers are unavailable"));
|
|
531
542
|
if (c.aborted) return d(new DOMException("Aborted", "AbortError"));
|
|
532
543
|
let f;
|
|
533
544
|
try {
|
|
534
545
|
f = t.pop() ?? a();
|
|
535
546
|
} catch (e) {
|
|
536
|
-
return r = !0, d(new
|
|
547
|
+
return r = !0, d(new U("unavailable", `Worker could not be created: ${String(e)}`));
|
|
537
548
|
}
|
|
538
549
|
n.add(f);
|
|
539
550
|
let p = ++i, m = () => {
|
|
@@ -545,7 +556,7 @@ function it(e) {
|
|
|
545
556
|
m(), o(f), t.type === "done" ? u(t.buffer) : d(Error(t.message));
|
|
546
557
|
}
|
|
547
558
|
}, g = (e) => {
|
|
548
|
-
e.preventDefault?.(), m(), s(f), f.started ? d(Error(e.message || "The file worker stopped unexpectedly")) : (r = !0, d(new
|
|
559
|
+
e.preventDefault?.(), m(), s(f), f.started ? d(Error(e.message || "The file worker stopped unexpectedly")) : (r = !0, d(new U("unavailable", e.message || "The file worker failed to start")));
|
|
549
560
|
}, _ = () => {
|
|
550
561
|
m(), s(f), d(/* @__PURE__ */ Error("The file worker sent a message that could not be read"));
|
|
551
562
|
}, v = () => {
|
|
@@ -559,7 +570,7 @@ function it(e) {
|
|
|
559
570
|
task: e
|
|
560
571
|
});
|
|
561
572
|
} catch (e) {
|
|
562
|
-
m(), o(f), d(new
|
|
573
|
+
m(), o(f), d(new U("uncloneable", e instanceof Error ? e.message : String(e)));
|
|
563
574
|
}
|
|
564
575
|
});
|
|
565
576
|
},
|
|
@@ -570,19 +581,19 @@ function it(e) {
|
|
|
570
581
|
};
|
|
571
582
|
}
|
|
572
583
|
// src/file/fileEngine.ts
|
|
573
|
-
var
|
|
584
|
+
var W = class extends Error {
|
|
574
585
|
constructor(e, t) {
|
|
575
586
|
super(t), this.name = "FileEngineError", this.code = e;
|
|
576
587
|
}
|
|
577
|
-
},
|
|
578
|
-
function
|
|
579
|
-
let t =
|
|
588
|
+
}, lt = (e, t, n) => ce(e, fe(t.filename) + de(t.format), t.format, n, t.title ?? t.filename), ut = () => typeof navigator > "u" ? void 0 : navigator.userActivation?.isActive, dt = (e) => e instanceof Error ? e.message : String(e), ft = () => new Worker(new URL("./assets/fileTask.worker--Q3rI3Bn.js", import.meta.url), { type: "module" }), pt = () => typeof Worker < "u", mt = 0;
|
|
589
|
+
function ht(e = {}) {
|
|
590
|
+
let t = Ae(e), n = e.deliver ?? lt, r = `file-${++mt}-`, i = [], a = 0, o = !1, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), d = null, f = t.workers === "auto" && (!!e.createWorker || pt()), p = () => {
|
|
580
591
|
if (!f) return null;
|
|
581
592
|
if (!d) {
|
|
582
593
|
let n = typeof navigator < "u" && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : t.concurrency;
|
|
583
|
-
d =
|
|
594
|
+
d = ct({
|
|
584
595
|
size: Math.max(1, Math.min(t.concurrency, n)),
|
|
585
|
-
create: e.createWorker ??
|
|
596
|
+
create: e.createWorker ?? ft,
|
|
586
597
|
...e.pdfFonts ? { init: {
|
|
587
598
|
type: "init",
|
|
588
599
|
pdfFonts: e.pdfFonts
|
|
@@ -595,17 +606,17 @@ function ut(e = {}) {
|
|
|
595
606
|
if (i && !i.broken) try {
|
|
596
607
|
a = await i.run(t, r);
|
|
597
608
|
} catch (n) {
|
|
598
|
-
if (!(n instanceof
|
|
599
|
-
a = await
|
|
609
|
+
if (!(n instanceof U)) throw n;
|
|
610
|
+
a = await pe(t, {
|
|
600
611
|
...r,
|
|
601
612
|
pdfFonts: e.pdfFonts
|
|
602
613
|
});
|
|
603
614
|
}
|
|
604
|
-
else a = await
|
|
615
|
+
else a = await pe(t, {
|
|
605
616
|
...r,
|
|
606
617
|
pdfFonts: e.pdfFonts
|
|
607
618
|
});
|
|
608
|
-
return new Blob([a], { type:
|
|
619
|
+
return new Blob([a], { type: ue[n] });
|
|
609
620
|
}, h = (e) => i.find((t) => t.id === e), g = () => u.forEach((e) => e()), _ = (e, t) => {
|
|
610
621
|
i = i.map((n) => n.id === e ? {
|
|
611
622
|
...n,
|
|
@@ -621,24 +632,24 @@ function ut(e = {}) {
|
|
|
621
632
|
let n = l.get(e);
|
|
622
633
|
n && (clearTimeout(n.timer), l.delete(e), t !== void 0 && n.controller.abort(t));
|
|
623
634
|
}, b = () => {
|
|
624
|
-
v(
|
|
635
|
+
v(Le(i, t.keepFinished)), o || L(i, t.concurrency).forEach(S), g();
|
|
625
636
|
}, x = (e, t) => {
|
|
626
637
|
let n = h(e);
|
|
627
|
-
n && (
|
|
638
|
+
n && (Pe(n) ? _(e, {
|
|
628
639
|
status: "queued",
|
|
629
640
|
progress: 0,
|
|
630
|
-
error:
|
|
641
|
+
error: dt(t)
|
|
631
642
|
}) : _(e, {
|
|
632
643
|
status: "failed",
|
|
633
644
|
finishedAt: Date.now(),
|
|
634
|
-
error:
|
|
645
|
+
error: dt(t)
|
|
635
646
|
}));
|
|
636
647
|
}, S = (e) => {
|
|
637
648
|
let n = s.get(e), r = h(e);
|
|
638
649
|
if (!n || !r) return;
|
|
639
650
|
let i = new AbortController(), a = setTimeout(() => {
|
|
640
651
|
if (!l.has(e)) return;
|
|
641
|
-
let n = new
|
|
652
|
+
let n = new W("timeout", `Timed out after ${t.timeoutMs} ms`);
|
|
642
653
|
y(e, n), x(e, n), b();
|
|
643
654
|
}, t.timeoutMs);
|
|
644
655
|
l.set(e, {
|
|
@@ -653,7 +664,7 @@ function ut(e = {}) {
|
|
|
653
664
|
});
|
|
654
665
|
let o = () => l.get(e)?.controller === i, u = (t) => {
|
|
655
666
|
if (!o()) return;
|
|
656
|
-
let n = h(e), r = n ?
|
|
667
|
+
let n = h(e), r = n ? Fe(n.progress, t) : null;
|
|
657
668
|
r !== null && (_(e, { progress: r }), g());
|
|
658
669
|
}, d;
|
|
659
670
|
try {
|
|
@@ -665,11 +676,11 @@ function ut(e = {}) {
|
|
|
665
676
|
} catch (e) {
|
|
666
677
|
d = Promise.reject(e);
|
|
667
678
|
}
|
|
668
|
-
Promise.resolve(d).then((e) => e instanceof Blob ? e :
|
|
679
|
+
Promise.resolve(d).then((e) => e instanceof Blob ? e : le(r.format, e)).then((t) => {
|
|
669
680
|
if (!o()) return;
|
|
670
681
|
y(e), c.set(e, t);
|
|
671
|
-
let i =
|
|
672
|
-
activationActive:
|
|
682
|
+
let i = Ie(r.action ?? "download", {
|
|
683
|
+
activationActive: ut(),
|
|
673
684
|
sinceSubmitMs: Date.now() - r.createdAt
|
|
674
685
|
});
|
|
675
686
|
_(e, {
|
|
@@ -688,9 +699,9 @@ function ut(e = {}) {
|
|
|
688
699
|
});
|
|
689
700
|
}, C = {
|
|
690
701
|
submit(e) {
|
|
691
|
-
if (o) throw new
|
|
692
|
-
let n =
|
|
693
|
-
if (n.kind === "reject") throw new
|
|
702
|
+
if (o) throw new W("disposed", "The file engine has been disposed");
|
|
703
|
+
let n = Ne(i, e, t.maxQueued);
|
|
704
|
+
if (n.kind === "reject") throw new W("queue-full", `The file queue is full (${t.maxQueued} waiting)`);
|
|
694
705
|
if (n.kind === "reuse") return n.id;
|
|
695
706
|
n.cancel.forEach((e) => C.cancel(e));
|
|
696
707
|
let c = r + ++a, l = Number.isInteger(e.retry) && e.retry > 0 ? e.retry : 0;
|
|
@@ -713,7 +724,7 @@ function ut(e = {}) {
|
|
|
713
724
|
},
|
|
714
725
|
cancel(e) {
|
|
715
726
|
let t = h(e);
|
|
716
|
-
t && !
|
|
727
|
+
t && !I(t) && (y(e, new DOMException("Cancelled", "AbortError")), c.delete(e), _(e, {
|
|
717
728
|
status: "cancelled",
|
|
718
729
|
finishedAt: Date.now(),
|
|
719
730
|
awaitingClick: !1
|
|
@@ -746,7 +757,7 @@ function ut(e = {}) {
|
|
|
746
757
|
c.delete(e), _(e, {
|
|
747
758
|
status: "failed",
|
|
748
759
|
finishedAt: Date.now(),
|
|
749
|
-
error:
|
|
760
|
+
error: dt(t),
|
|
750
761
|
awaitingClick: !1
|
|
751
762
|
});
|
|
752
763
|
}
|
|
@@ -755,7 +766,7 @@ function ut(e = {}) {
|
|
|
755
766
|
wait(e) {
|
|
756
767
|
let t = () => {
|
|
757
768
|
let t = h(e);
|
|
758
|
-
if (t) return
|
|
769
|
+
if (t) return I(t) || t.status === "ready" && t.awaitingClick ? t : null;
|
|
759
770
|
}, n = t();
|
|
760
771
|
return n === null ? new Promise((e) => {
|
|
761
772
|
let n = C.subscribe(() => {
|
|
@@ -765,7 +776,7 @@ function ut(e = {}) {
|
|
|
765
776
|
}) : Promise.resolve(n);
|
|
766
777
|
},
|
|
767
778
|
clear(e) {
|
|
768
|
-
v(i.filter((t) => (
|
|
779
|
+
v(i.filter((t) => (I(t) || e && t.status === "ready") && (!e || e(t))).map((e) => e.id)), g();
|
|
769
780
|
},
|
|
770
781
|
getJobs: () => i,
|
|
771
782
|
subscribe(e) {
|
|
@@ -790,32 +801,32 @@ function ut(e = {}) {
|
|
|
790
801
|
return C;
|
|
791
802
|
}
|
|
792
803
|
// src/components/FileEngine/FileEngineContext.ts
|
|
793
|
-
var
|
|
794
|
-
function
|
|
795
|
-
return
|
|
804
|
+
var gt = ge(null), _t = null;
|
|
805
|
+
function vt() {
|
|
806
|
+
return _t ||= ht(), _t;
|
|
796
807
|
}
|
|
797
|
-
function
|
|
798
|
-
return
|
|
808
|
+
function yt() {
|
|
809
|
+
return ve(gt) ?? vt();
|
|
799
810
|
}
|
|
800
|
-
function
|
|
801
|
-
let e =
|
|
811
|
+
function bt() {
|
|
812
|
+
let e = yt();
|
|
802
813
|
return {
|
|
803
|
-
jobs:
|
|
804
|
-
submit:
|
|
805
|
-
cancel:
|
|
806
|
-
retry:
|
|
807
|
-
deliver:
|
|
808
|
-
wait:
|
|
809
|
-
clear:
|
|
814
|
+
jobs: Se(e.subscribe, e.getJobs, e.getJobs),
|
|
815
|
+
submit: k((t) => e.submit(t), [e]),
|
|
816
|
+
cancel: k((t) => e.cancel(t), [e]),
|
|
817
|
+
retry: k((t) => e.retry(t), [e]),
|
|
818
|
+
deliver: k((t, n) => e.deliver(t, n), [e]),
|
|
819
|
+
wait: k((t) => e.wait(t), [e]),
|
|
820
|
+
clear: k((t) => e.clear(t), [e]),
|
|
810
821
|
engine: e
|
|
811
822
|
};
|
|
812
823
|
}
|
|
813
|
-
function
|
|
814
|
-
let t =
|
|
815
|
-
return
|
|
824
|
+
function xt(e) {
|
|
825
|
+
let t = yt(), n = k(() => e ? t.getJobs().find((t) => t.id === e) : void 0, [t, e]);
|
|
826
|
+
return Se(t.subscribe, n, n);
|
|
816
827
|
}
|
|
817
828
|
// src/components/Charts/menuPlacement.ts
|
|
818
|
-
function
|
|
829
|
+
function St(e, t, n, { align: r = "end", offset: i = 4, margin: a = 8 } = {}) {
|
|
819
830
|
let o = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n)), s = e.top + e.height, c = n.height - a - (s + i), l = e.top - i - a, u = t.height <= c || c >= l ? "below" : "above", d = u === "below" ? s + i : e.top - i - t.height;
|
|
820
831
|
return {
|
|
821
832
|
left: o(r === "end" ? e.left + e.width - t.width : e.left, a, n.width - t.width - a),
|
|
@@ -823,36 +834,36 @@ function _t(e, t, n, { align: r = "end", offset: i = 4, margin: a = 8 } = {}) {
|
|
|
823
834
|
side: u
|
|
824
835
|
};
|
|
825
836
|
}
|
|
826
|
-
function
|
|
837
|
+
function Ct(e, t, n) {
|
|
827
838
|
return {
|
|
828
839
|
x: e.left - t,
|
|
829
840
|
y: e.top - n
|
|
830
841
|
};
|
|
831
842
|
}
|
|
832
843
|
// src/components/Charts/AnchoredMenu.tsx
|
|
833
|
-
var
|
|
844
|
+
var wt = () => ({
|
|
834
845
|
width: document.documentElement.clientWidth || window.innerWidth,
|
|
835
846
|
height: document.documentElement.clientHeight || window.innerHeight
|
|
836
847
|
});
|
|
837
|
-
function
|
|
838
|
-
let a = _(), o =
|
|
848
|
+
function Tt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label": i }) {
|
|
849
|
+
let a = _(), o = j(null), s = j(null), c = j([]), [l, u] = M(!1), [d, f] = M(-1), p = k((e) => {
|
|
839
850
|
u(!1), f(-1), e && o.current?.querySelector("button")?.focus({ preventScroll: !0 });
|
|
840
|
-
}, []), m =
|
|
851
|
+
}, []), m = k(() => {
|
|
841
852
|
let e = o.current, t = s.current;
|
|
842
853
|
if (!e || !t) return;
|
|
843
|
-
let n =
|
|
854
|
+
let n = Ct(t.getBoundingClientRect(), parseFloat(t.style.left) || 0, parseFloat(t.style.top) || 0), i = St(e.getBoundingClientRect(), {
|
|
844
855
|
width: t.offsetWidth,
|
|
845
856
|
height: t.offsetHeight
|
|
846
|
-
},
|
|
857
|
+
}, wt(), { align: r });
|
|
847
858
|
t.style.left = `${Math.round(i.left - n.x)}px`, t.style.top = `${Math.round(i.top - n.y)}px`, t.style.visibility = "visible", t.dataset.side = i.side;
|
|
848
859
|
}, [r]);
|
|
849
|
-
|
|
860
|
+
be(() => {
|
|
850
861
|
l && m();
|
|
851
862
|
}, [
|
|
852
863
|
l,
|
|
853
864
|
m,
|
|
854
865
|
t.length
|
|
855
|
-
]),
|
|
866
|
+
]), A(() => {
|
|
856
867
|
if (!l) return;
|
|
857
868
|
let e = 0, t = () => {
|
|
858
869
|
cancelAnimationFrame(e), e = requestAnimationFrame(m);
|
|
@@ -867,16 +878,16 @@ function bt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label":
|
|
|
867
878
|
l,
|
|
868
879
|
m,
|
|
869
880
|
p
|
|
870
|
-
]),
|
|
881
|
+
]), A(() => {
|
|
871
882
|
l && d >= 0 && c.current[d]?.focus({ preventScroll: !0 });
|
|
872
883
|
}, [l, d]);
|
|
873
884
|
let h = (e) => {
|
|
874
885
|
u(!0), f(e && t.length ? 0 : -1);
|
|
875
886
|
}, g = (e) => f((n) => n < 0 ? e > 0 ? 0 : t.length - 1 : (n + e + t.length) % t.length);
|
|
876
|
-
return /* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ P(Ce, { children: [/* @__PURE__ */ N("span", {
|
|
877
888
|
ref: o,
|
|
878
889
|
className: "chart-menu-anchor",
|
|
879
|
-
children:
|
|
890
|
+
children: he(e, {
|
|
880
891
|
"aria-haspopup": "menu",
|
|
881
892
|
"aria-expanded": l,
|
|
882
893
|
onClick: (t) => {
|
|
@@ -886,7 +897,7 @@ function bt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label":
|
|
|
886
897
|
e.props.onKeyDown?.(t), l || t.key !== "ArrowDown" && t.key !== "Enter" && t.key !== " " || (t.preventDefault(), h(!0));
|
|
887
898
|
}
|
|
888
899
|
})
|
|
889
|
-
}), l && a &&
|
|
900
|
+
}), l && a && we(/* @__PURE__ */ N("div", {
|
|
890
901
|
ref: s,
|
|
891
902
|
className: "chart-menu",
|
|
892
903
|
role: "menu",
|
|
@@ -917,7 +928,7 @@ function bt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label":
|
|
|
917
928
|
case "Tab": p(!1);
|
|
918
929
|
}
|
|
919
930
|
},
|
|
920
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
931
|
+
children: t.map((e, t) => /* @__PURE__ */ P("button", {
|
|
921
932
|
ref: (e) => {
|
|
922
933
|
c.current[t] = e;
|
|
923
934
|
},
|
|
@@ -929,7 +940,7 @@ function bt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label":
|
|
|
929
940
|
onClick: () => {
|
|
930
941
|
p(!0), n(e.value);
|
|
931
942
|
},
|
|
932
|
-
children: [e.icon && /* @__PURE__ */
|
|
943
|
+
children: [e.icon && /* @__PURE__ */ N("span", {
|
|
933
944
|
className: "chart-menu-item-icon",
|
|
934
945
|
"aria-hidden": !0,
|
|
935
946
|
children: e.icon
|
|
@@ -938,24 +949,24 @@ function bt({ trigger: e, items: t, onSelect: n, align: r = "end", "aria-label":
|
|
|
938
949
|
}), a)] });
|
|
939
950
|
}
|
|
940
951
|
// src/components/Charts/chartImage.ts
|
|
941
|
-
var
|
|
952
|
+
var G = {
|
|
942
953
|
background: "#ffffff",
|
|
943
954
|
text: "#0f0f0f",
|
|
944
955
|
muted: "#616161",
|
|
945
956
|
faint: "#737373",
|
|
946
957
|
line: "#e6e6e6",
|
|
947
958
|
track: "#ebebeb",
|
|
948
|
-
slots:
|
|
959
|
+
slots: ie.light,
|
|
949
960
|
heat: C.light
|
|
950
|
-
},
|
|
951
|
-
title: `700 ${
|
|
952
|
-
report: `600 ${
|
|
953
|
-
big: `700 ${
|
|
954
|
-
bold: `700 ${
|
|
955
|
-
text: `400 ${
|
|
956
|
-
small: `400 ${
|
|
961
|
+
}, K = 28, q = 16, Et = 22, Dt = 14, Ot = 12, J = 20, Y = 28, X = 220, kt = 220, At = 44, jt = 80, Mt = 300, Nt = 36, Pt = 3, Ft = 10, It = 50, Z = 664, Lt = (e) => ({
|
|
962
|
+
title: `700 ${Et}px ${e}`,
|
|
963
|
+
report: `600 ${Dt}px ${e}`,
|
|
964
|
+
big: `700 ${At}px ${e}`,
|
|
965
|
+
bold: `700 ${Dt}px ${e}`,
|
|
966
|
+
text: `400 ${Dt}px ${e}`,
|
|
967
|
+
small: `400 ${Ot}px ${e}`
|
|
957
968
|
});
|
|
958
|
-
function
|
|
969
|
+
function Rt(e) {
|
|
959
970
|
if (e.format) return e.format;
|
|
960
971
|
let t;
|
|
961
972
|
try {
|
|
@@ -965,7 +976,7 @@ function Mt(e) {
|
|
|
965
976
|
}
|
|
966
977
|
return (e) => t.format(e);
|
|
967
978
|
}
|
|
968
|
-
function
|
|
979
|
+
function zt(e, t) {
|
|
969
980
|
try {
|
|
970
981
|
return new Intl.DateTimeFormat(t, {
|
|
971
982
|
dateStyle: "medium",
|
|
@@ -975,7 +986,7 @@ function Nt(e, t) {
|
|
|
975
986
|
return e.toLocaleString();
|
|
976
987
|
}
|
|
977
988
|
}
|
|
978
|
-
var
|
|
989
|
+
var Bt = (e, t) => {
|
|
979
990
|
let n = e.reduce((e, t) => e + t.value, 0);
|
|
980
991
|
return e.map((e) => ({
|
|
981
992
|
slot: e.slot,
|
|
@@ -983,31 +994,31 @@ var Pt = (e, t) => {
|
|
|
983
994
|
value: `${t(e.value)} · ${s(l(e.value, n))}`
|
|
984
995
|
}));
|
|
985
996
|
};
|
|
986
|
-
function
|
|
997
|
+
function Vt(e) {
|
|
987
998
|
switch (e.kind) {
|
|
988
999
|
case "donut":
|
|
989
|
-
case "pie": return Math.max(
|
|
990
|
-
case "stacked": return 48 + Math.ceil(e.slices.length / 2) *
|
|
991
|
-
case "bars": return (e.series.length > 1 ?
|
|
992
|
-
case "columns": return (e.series.length > 1 ? 44 + Math.ceil(e.series.length / 2) *
|
|
993
|
-
case "line": return 264 + Math.ceil(e.series.length / 2) *
|
|
994
|
-
case "progress": return Math.max(1, e.rows.length) *
|
|
995
|
-
case "number": return
|
|
996
|
-
case "gauge": return
|
|
997
|
-
case "funnel": return Math.max(1, e.steps.length) *
|
|
998
|
-
case "treemap": return 316 + Math.ceil(e.nodes.length / 2) *
|
|
1000
|
+
case "pie": return Math.max(X, e.slices.length * Y);
|
|
1001
|
+
case "stacked": return 48 + Math.ceil(e.slices.length / 2) * Y;
|
|
1002
|
+
case "bars": return (e.series.length > 1 ? Y : 0) + Math.max(1, e.data.length) * Y;
|
|
1003
|
+
case "columns": return (e.series.length > 1 ? 44 + Math.ceil(e.series.length / 2) * Y : 0) + kt + J + 8;
|
|
1004
|
+
case "line": return 264 + Math.ceil(e.series.length / 2) * Y;
|
|
1005
|
+
case "progress": return Math.max(1, e.rows.length) * It;
|
|
1006
|
+
case "number": return At + ((e.points?.length ?? 0) > 1 ? 116 : 0) + (e.previous === void 0 ? 0 : 24);
|
|
1007
|
+
case "gauge": return Wt(e.rows.length, e.variant ?? "half").height + 8 + 40;
|
|
1008
|
+
case "funnel": return Math.max(1, e.steps.length) * Nt;
|
|
1009
|
+
case "treemap": return 316 + Math.ceil(e.nodes.length / 2) * Y;
|
|
999
1010
|
case "calendar": {
|
|
1000
|
-
let { cell: t } =
|
|
1001
|
-
return
|
|
1011
|
+
let { cell: t } = Ut(S(e.days).weeks);
|
|
1012
|
+
return J + 7 * (t + Ht) + q + Y;
|
|
1002
1013
|
}
|
|
1003
1014
|
}
|
|
1004
1015
|
}
|
|
1005
|
-
var
|
|
1006
|
-
function
|
|
1007
|
-
return { cell: Math.max(4, Math.min(16, 608 / Math.max(1, e) -
|
|
1016
|
+
var Ht = 3;
|
|
1017
|
+
function Ut(e) {
|
|
1018
|
+
return { cell: Math.max(4, Math.min(16, 608 / Math.max(1, e) - Ht)) };
|
|
1008
1019
|
}
|
|
1009
|
-
function
|
|
1010
|
-
let n =
|
|
1020
|
+
function Wt(e, t) {
|
|
1021
|
+
let n = Z / Math.max(1, e), r = D[t], i = Math.min(t === "half" ? 260 : 200, n - 24);
|
|
1011
1022
|
return {
|
|
1012
1023
|
cell: n,
|
|
1013
1024
|
width: i,
|
|
@@ -1015,7 +1026,7 @@ function Rt(e, t) {
|
|
|
1015
1026
|
k: i / r.width
|
|
1016
1027
|
};
|
|
1017
1028
|
}
|
|
1018
|
-
function
|
|
1029
|
+
function Q(e, t, n) {
|
|
1019
1030
|
if (e.measureText(t).width <= n) return t;
|
|
1020
1031
|
let r = 0, i = t.length;
|
|
1021
1032
|
for (; r < i;) {
|
|
@@ -1024,91 +1035,91 @@ function Z(e, t, n) {
|
|
|
1024
1035
|
}
|
|
1025
1036
|
return `${t.slice(0, r)}…`;
|
|
1026
1037
|
}
|
|
1027
|
-
function
|
|
1028
|
-
if (r <= 1 || e.measureText(t).width <= n) return [
|
|
1038
|
+
function Gt(e, t, n, r = Pt) {
|
|
1039
|
+
if (r <= 1 || e.measureText(t).width <= n) return [Q(e, t, n)];
|
|
1029
1040
|
let i = t.split(" "), a = "", o = 0;
|
|
1030
1041
|
for (; o < i.length; o++) {
|
|
1031
1042
|
let t = a ? `${a} ${i[o]}` : i[o];
|
|
1032
1043
|
if (e.measureText(t).width > n) break;
|
|
1033
1044
|
a = t;
|
|
1034
1045
|
}
|
|
1035
|
-
return a ? [a, ...
|
|
1046
|
+
return a ? [a, ...Gt(e, i.slice(o).join(" "), n, r - 1)] : [Q(e, t, n)];
|
|
1036
1047
|
}
|
|
1037
|
-
function
|
|
1038
|
-
e.fillStyle =
|
|
1048
|
+
function Kt(e, t, n, r) {
|
|
1049
|
+
e.fillStyle = O(r, "light"), e.fillRect(t, n - 6, 12, 12);
|
|
1039
1050
|
}
|
|
1040
|
-
function
|
|
1041
|
-
let s = (a - (o - 1) *
|
|
1051
|
+
function $(e, t, n, r, i, a, o) {
|
|
1052
|
+
let s = (a - (o - 1) * q) / o;
|
|
1042
1053
|
t.forEach((t, a) => {
|
|
1043
|
-
let c = r + a % o * (s +
|
|
1044
|
-
|
|
1054
|
+
let c = r + a % o * (s + q), l = i + Math.floor(a / o) * Y + Y / 2;
|
|
1055
|
+
Kt(e, c, l, t.slot), e.font = n.bold, e.textAlign = "right", e.fillStyle = G.text, e.fillText(t.value, c + s, l);
|
|
1045
1056
|
let u = e.measureText(t.value).width;
|
|
1046
|
-
e.font = n.text, e.textAlign = "left", e.fillText(
|
|
1057
|
+
e.font = n.text, e.textAlign = "left", e.fillText(Q(e, t.label, s - 20 - u - 10), c + 20, l);
|
|
1047
1058
|
});
|
|
1048
1059
|
}
|
|
1049
|
-
function
|
|
1050
|
-
let c =
|
|
1060
|
+
function qt(e, n, r, i, a, o) {
|
|
1061
|
+
let c = X / 100, u = r + X / 2, d = 40 * c;
|
|
1051
1062
|
e.lineWidth = 16 * c, e.lineCap = "butt";
|
|
1052
|
-
let f = (e) => -Math.PI / 2 + e /
|
|
1053
|
-
p.length || (e.globalAlpha = .5, e.strokeStyle =
|
|
1054
|
-
for (let t of p) e.strokeStyle =
|
|
1063
|
+
let f = (e) => -Math.PI / 2 + e / re * 2 * Math.PI, p = t(n);
|
|
1064
|
+
p.length || (e.globalAlpha = .5, e.strokeStyle = G.slots.rest, e.beginPath(), e.arc(138, u, d, 0, 2 * Math.PI), e.stroke(), e.globalAlpha = 1);
|
|
1065
|
+
for (let t of p) e.strokeStyle = O(t.slice.slot, "light"), e.beginPath(), e.arc(138, u, d, f(t.start), f(t.start + t.length)), e.stroke();
|
|
1055
1066
|
let m = n.reduce((e, t) => e + t.value, 0), h = n[0];
|
|
1056
|
-
e.textAlign = "center", m > 0 && h ? (e.font = o.title, e.fillStyle =
|
|
1057
|
-
let g =
|
|
1058
|
-
|
|
1067
|
+
e.textAlign = "center", m > 0 && h ? (e.font = o.title, e.fillStyle = G.text, e.fillText(s(l(h.value, m)), 138, u - 6), e.font = o.small, e.fillStyle = G.muted, e.fillText(Q(e, h.label.toLowerCase(), d * 1.3), 138, u + 16)) : (e.font = o.small, e.fillStyle = G.muted, e.fillText(a.empty, 138, u));
|
|
1068
|
+
let g = Bt(n, i);
|
|
1069
|
+
$(e, g, o, 276, r + Math.max(0, (X - g.length * Y) / 2), 416, 1);
|
|
1059
1070
|
}
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1062
|
-
let c =
|
|
1063
|
-
u.length || (t.globalAlpha = .5, t.fillStyle =
|
|
1064
|
-
for (let e of u) t.fillStyle =
|
|
1071
|
+
var Jt = (e) => e - Math.PI / 2;
|
|
1072
|
+
function Yt(t, n, r, i, a, o) {
|
|
1073
|
+
let c = X / 100, l = r + X / 2, u = e(n);
|
|
1074
|
+
u.length || (t.globalAlpha = .5, t.fillStyle = G.slots.rest, t.beginPath(), t.arc(138, l, 48 * c, 0, 2 * Math.PI), t.fill(), t.globalAlpha = 1, t.font = o.small, t.textAlign = "center", t.fillStyle = G.text, t.fillText(a.empty, 138, l)), t.lineWidth = 2, t.lineJoin = "round";
|
|
1075
|
+
for (let e of u) t.fillStyle = O(e.slice.slot, "light"), t.strokeStyle = G.background, t.beginPath(), u.length > 1 && t.moveTo(138, l), t.arc(138, l, 48 * c, Jt(e.a0), Jt(e.a1)), t.closePath(), t.fill(), u.length > 1 && t.stroke();
|
|
1065
1076
|
t.font = o.bold, t.textAlign = "center";
|
|
1066
|
-
for (let e of u) e.label && (t.fillStyle =
|
|
1067
|
-
let d =
|
|
1068
|
-
|
|
1077
|
+
for (let e of u) e.label && (t.fillStyle = ae(O(e.slice.slot, "light")), t.fillText(s(e.share), K + e.label.x * c, r + e.label.y * c));
|
|
1078
|
+
let d = Bt(n, i);
|
|
1079
|
+
$(t, d, o, 276, r + Math.max(0, (X - d.length * Y) / 2), 416, 1);
|
|
1069
1080
|
}
|
|
1070
|
-
function
|
|
1071
|
-
let a = t.reduce((e, t) => e + t.value, 0), o = t.filter((e) => e.value > 0), s = Math.max(0, o.length - 1) * 2, c =
|
|
1072
|
-
e.fillStyle =
|
|
1081
|
+
function Xt(e, t, n, r, i) {
|
|
1082
|
+
let a = t.reduce((e, t) => e + t.value, 0), o = t.filter((e) => e.value > 0), s = Math.max(0, o.length - 1) * 2, c = K;
|
|
1083
|
+
e.fillStyle = G.track, a || e.fillRect(K, n, Z, 32);
|
|
1073
1084
|
for (let t of o) {
|
|
1074
|
-
let r = (
|
|
1075
|
-
e.fillStyle =
|
|
1085
|
+
let r = (Z - s) * t.value / a;
|
|
1086
|
+
e.fillStyle = O(t.slot, "light"), e.fillRect(c, n, r, 32), c += r + 2;
|
|
1076
1087
|
}
|
|
1077
|
-
|
|
1088
|
+
$(e, Bt(t, r), i, K, n + 32 + q, Z, 2);
|
|
1078
1089
|
}
|
|
1079
|
-
function
|
|
1080
|
-
let i =
|
|
1090
|
+
function Zt(e, t, n, r) {
|
|
1091
|
+
let i = K;
|
|
1081
1092
|
e.font = r.text, e.textAlign = "left";
|
|
1082
|
-
for (let r of t)
|
|
1093
|
+
for (let r of t) Kt(e, i, n, r.slot), e.fillStyle = G.text, e.fillText(r.label, i + 18, n), i += 18 + e.measureText(r.label).width + 24;
|
|
1083
1094
|
}
|
|
1084
|
-
function
|
|
1095
|
+
function Qt(e, t, n, r, i, a, o) {
|
|
1085
1096
|
let c = r;
|
|
1086
|
-
n.length > 1 && (
|
|
1087
|
-
let u = t.map((e) =>
|
|
1097
|
+
n.length > 1 && (Zt(e, n, c + Y / 2, o), c += Y);
|
|
1098
|
+
let u = t.map((e) => se(e, n)), d = u.reduce((e, t) => e + t, 0);
|
|
1088
1099
|
if (!d) {
|
|
1089
|
-
e.font = o.text, e.fillStyle =
|
|
1100
|
+
e.font = o.text, e.fillStyle = G.muted, e.textAlign = "left", e.fillText(a.empty, K, c + Y / 2);
|
|
1090
1101
|
return;
|
|
1091
1102
|
}
|
|
1092
|
-
let f =
|
|
1103
|
+
let f = ne(u), p = Math.min(200, Z * .3), m = 239.2, h = 310.8;
|
|
1093
1104
|
t.forEach((t, r) => {
|
|
1094
|
-
let a = c + r *
|
|
1095
|
-
e.font = o.text, e.textAlign = "left", e.fillStyle =
|
|
1105
|
+
let a = c + r * Y + Y / 2;
|
|
1106
|
+
e.font = o.text, e.textAlign = "left", e.fillStyle = G.text, e.fillText(Q(e, t.fullLabel ?? t.label, p), K, a), e.fillStyle = G.track, e.fillRect(m, a - 7, h, 14);
|
|
1096
1107
|
let g = m;
|
|
1097
1108
|
for (let r of n) {
|
|
1098
1109
|
let i = t.values[r.key] ?? 0;
|
|
1099
1110
|
if (!i) continue;
|
|
1100
1111
|
let o = i / f * h;
|
|
1101
|
-
e.fillStyle =
|
|
1112
|
+
e.fillStyle = O(n.length === 1 && t.slot ? t.slot : r.slot, "light"), e.fillRect(g, a - 7, o, 14), g += o;
|
|
1102
1113
|
}
|
|
1103
|
-
e.font = o.bold, e.textAlign = "right", e.fillStyle =
|
|
1114
|
+
e.font = o.bold, e.textAlign = "right", e.fillStyle = G.text, e.fillText(n.length === 1 ? `${i(u[r])} · ${s(l(u[r], d))}` : i(u[r]), 692, a);
|
|
1104
1115
|
});
|
|
1105
1116
|
}
|
|
1106
|
-
function
|
|
1107
|
-
let o = r +
|
|
1117
|
+
function $t(e, t, n, r, i, a) {
|
|
1118
|
+
let o = r + kt;
|
|
1108
1119
|
e.font = a.small, e.textAlign = "right", e.lineWidth = 1;
|
|
1109
1120
|
for (let r of t) {
|
|
1110
1121
|
let t = o - r / n * 204;
|
|
1111
|
-
e.fillStyle =
|
|
1122
|
+
e.fillStyle = G.faint, e.fillText(i(r), 76, t), e.strokeStyle = G.line, e.setLineDash(r === 0 ? [] : [4, 4]), e.beginPath(), e.moveTo(84, t), e.lineTo(692, t), e.stroke();
|
|
1112
1123
|
}
|
|
1113
1124
|
return e.setLineDash([]), {
|
|
1114
1125
|
plotX: 84,
|
|
@@ -1117,47 +1128,47 @@ function Kt(e, t, n, r, i, a) {
|
|
|
1117
1128
|
plotH: 204
|
|
1118
1129
|
};
|
|
1119
1130
|
}
|
|
1120
|
-
function
|
|
1121
|
-
let u = t.flatMap((e) => n.map((t) => e.values[t.key] ?? 0)), { max: f, ticks: p } = T(u), { plotX: m, plotW: h, bottom: g, plotH: _ } =
|
|
1122
|
-
if (!u.some((e) => e > 0)) e.textAlign = "center", e.fillStyle =
|
|
1131
|
+
function en(e, t, n, r, i, a, o, c) {
|
|
1132
|
+
let u = t.flatMap((e) => n.map((t) => e.values[t.key] ?? 0)), { max: f, ticks: p } = T(u), { plotX: m, plotW: h, bottom: g, plotH: _ } = $t(e, p, f, i, a, c);
|
|
1133
|
+
if (!u.some((e) => e > 0)) e.textAlign = "center", e.fillStyle = G.muted, e.fillText(o.empty, m + h / 2, i + kt / 2);
|
|
1123
1134
|
else {
|
|
1124
1135
|
e.lineWidth = 2, e.lineJoin = "round";
|
|
1125
1136
|
for (let i of n) {
|
|
1126
1137
|
let n = d(t.map((e) => e.values[i.key] ?? 0), h, _, f).map((e) => ({
|
|
1127
1138
|
x: m + e.x,
|
|
1128
1139
|
y: g - _ + e.y
|
|
1129
|
-
})), a =
|
|
1140
|
+
})), a = O(i.slot, "light");
|
|
1130
1141
|
r && n.length && (e.globalAlpha = .14, e.fillStyle = a, e.beginPath(), n.forEach((t, n) => n ? e.lineTo(t.x, t.y) : e.moveTo(t.x, t.y)), e.lineTo(n[n.length - 1].x, g), e.lineTo(n[0].x, g), e.closePath(), e.fill(), e.globalAlpha = 1), e.strokeStyle = a, e.beginPath(), n.forEach((t, n) => n ? e.lineTo(t.x, t.y) : e.moveTo(t.x, t.y)), e.stroke();
|
|
1131
1142
|
}
|
|
1132
1143
|
}
|
|
1133
|
-
e.font = c.small, e.fillStyle =
|
|
1144
|
+
e.font = c.small, e.fillStyle = G.muted;
|
|
1134
1145
|
let v = x(t.length, 6);
|
|
1135
1146
|
for (let n of v) {
|
|
1136
|
-
let r = m +
|
|
1137
|
-
e.textAlign = n === 0 ? "left" : n === t.length - 1 ? "right" : "center", e.fillText(
|
|
1147
|
+
let r = m + ee(n, t.length, h);
|
|
1148
|
+
e.textAlign = n === 0 ? "left" : n === t.length - 1 ? "right" : "center", e.fillText(Q(e, t[n].label, h / v.length), r, g + J / 2 + 4);
|
|
1138
1149
|
}
|
|
1139
1150
|
let y = n.map((e) => t.reduce((t, n) => t + (n.values[e.key] ?? 0), 0)), b = y.reduce((e, t) => e + t, 0);
|
|
1140
|
-
|
|
1151
|
+
$(e, n.map((e, t) => ({
|
|
1141
1152
|
slot: e.slot,
|
|
1142
1153
|
label: e.label,
|
|
1143
1154
|
value: n.length > 1 ? `${a(y[t])} · ${s(l(y[t], b))}` : `${o.total}: ${a(y[t])}`
|
|
1144
|
-
})), c,
|
|
1155
|
+
})), c, K, g + J + 8 + q, Z, 2);
|
|
1145
1156
|
}
|
|
1146
|
-
function
|
|
1157
|
+
function tn(e, t, n, r, a, o, c, u) {
|
|
1147
1158
|
let d = a;
|
|
1148
|
-
n.length > 1 && (
|
|
1149
|
-
let p = r === "grouped" && n.length > 1, m = t.map((e) =>
|
|
1159
|
+
n.length > 1 && (Zt(e, n, d + Y / 2, u), d += Y);
|
|
1160
|
+
let p = r === "grouped" && n.length > 1, m = t.map((e) => se(e, n)), { max: h, ticks: g } = T(y(t, n, p ? "grouped" : "stacked")), { plotX: _, plotW: v, bottom: b } = $t(e, g, h, d, o, u);
|
|
1150
1161
|
if (!m.some((e) => e > 0)) {
|
|
1151
|
-
e.textAlign = "center", e.fillStyle =
|
|
1162
|
+
e.textAlign = "center", e.fillStyle = G.muted, e.fillText(c.empty, _ + v / 2, d + kt / 2);
|
|
1152
1163
|
return;
|
|
1153
1164
|
}
|
|
1154
1165
|
if (n.length > 1) {
|
|
1155
1166
|
let r = n.map((e) => t.reduce((t, n) => t + (n.values[e.key] ?? 0), 0)), i = r.reduce((e, t) => e + t, 0);
|
|
1156
|
-
|
|
1167
|
+
$(e, n.map((e, t) => ({
|
|
1157
1168
|
slot: e.slot,
|
|
1158
1169
|
label: e.label,
|
|
1159
1170
|
value: `${o(r[t])} · ${s(l(r[t], i))}`
|
|
1160
|
-
})), u,
|
|
1171
|
+
})), u, K, b + J + 8 + q, Z, 2);
|
|
1161
1172
|
}
|
|
1162
1173
|
let x = v / Math.max(1, t.length), S = p ? Math.min(24 * n.length, x * .8) : Math.min(48, x * .6), C = i(n.length, S, 2);
|
|
1163
1174
|
t.forEach((r, i) => {
|
|
@@ -1166,46 +1177,46 @@ function Jt(e, t, n, r, a, o, c, u) {
|
|
|
1166
1177
|
let i = r.values[t.key] ?? 0;
|
|
1167
1178
|
if (!i) return;
|
|
1168
1179
|
let o = i / h * 204;
|
|
1169
|
-
e.fillStyle =
|
|
1170
|
-
}), e.textAlign = "center", m[i] && (e.font = u.small, e.fillStyle =
|
|
1180
|
+
e.fillStyle = O(t.slot, "light"), p ? (e.fillRect(a + C[n].x, b - o, C[n].width, o), s = Math.min(s, b - o)) : (e.fillRect(a, s - o, S, o), s -= o);
|
|
1181
|
+
}), e.textAlign = "center", m[i] && (e.font = u.small, e.fillStyle = G.text, e.fillText(o(m[i]), a + S / 2, s - 8)), f(i, t.length) && (e.font = u.small, e.fillStyle = G.muted, e.fillText(Q(e, r.label, x - 4), a + S / 2, b + J / 2 + 4));
|
|
1171
1182
|
});
|
|
1172
1183
|
}
|
|
1173
|
-
function
|
|
1184
|
+
function nn(e, t, n) {
|
|
1174
1185
|
e.beginPath(), t.forEach((t, n) => n ? e.lineTo(t.x, t.y) : e.moveTo(t.x, t.y)), n !== void 0 && t.length && (e.lineTo(t[t.length - 1].x, n), e.lineTo(t[0].x, n), e.closePath());
|
|
1175
1186
|
}
|
|
1176
|
-
function
|
|
1187
|
+
function rn(e, t, n, r, i, a) {
|
|
1177
1188
|
let c = t.points ?? [];
|
|
1178
|
-
e.textAlign = "left", e.font = a.big, e.fillStyle =
|
|
1189
|
+
e.textAlign = "left", e.font = a.big, e.fillStyle = G.text;
|
|
1179
1190
|
let l = r(t.value);
|
|
1180
|
-
e.fillText(l,
|
|
1181
|
-
let u = e.measureText(l).width, d = n +
|
|
1191
|
+
e.fillText(l, K, n + At / 2);
|
|
1192
|
+
let u = e.measureText(l).width, d = n + At;
|
|
1182
1193
|
if (t.previous !== void 0) {
|
|
1183
1194
|
let r = m(t.current ?? c.reduce((e, t) => e + t.value, 0), t.previous), o = h(r.direction, t.good ?? "up"), l = r.direction === "up" ? "▲" : r.direction === "down" ? "▼" : "=";
|
|
1184
|
-
e.font = a.bold, e.fillStyle =
|
|
1195
|
+
e.font = a.bold, e.fillStyle = O(o, "light"), e.fillText(`${l} ${r.percent === null ? i.deltaNew : s(Math.abs(r.percent))}`, K + u + 16, n + At / 2 + 6);
|
|
1185
1196
|
}
|
|
1186
1197
|
if (c.length > 1) {
|
|
1187
|
-
d +=
|
|
1188
|
-
let n =
|
|
1189
|
-
x:
|
|
1198
|
+
d += q;
|
|
1199
|
+
let n = O(t.slot ?? 1, "light"), r = o(c.map((e) => e.value), Z, jt).map((e) => ({
|
|
1200
|
+
x: K + e.x,
|
|
1190
1201
|
y: d + e.y
|
|
1191
1202
|
}));
|
|
1192
|
-
e.globalAlpha = .14, e.fillStyle = n,
|
|
1203
|
+
e.globalAlpha = .14, e.fillStyle = n, nn(e, r, d + jt), e.fill(), e.globalAlpha = 1, e.strokeStyle = n, e.lineWidth = 2, e.lineJoin = "round", nn(e, r), e.stroke(), d += jt, e.font = a.small, e.fillStyle = G.muted, e.fillText(c[0].label, K, d + J / 2), e.textAlign = "right", e.fillText(c[c.length - 1].label, 692, d + J / 2), e.textAlign = "left", d += J;
|
|
1193
1204
|
}
|
|
1194
|
-
t.previous !== void 0 && (e.font = a.small, e.fillStyle =
|
|
1205
|
+
t.previous !== void 0 && (e.font = a.small, e.fillStyle = G.faint, e.fillText(i.vsPrevious, K, d + 4 + J / 2));
|
|
1195
1206
|
}
|
|
1196
|
-
function
|
|
1207
|
+
function an(e, t, n, r, i, a) {
|
|
1197
1208
|
if (t.reduce((e, t) => e + Math.max(0, t.value), 0) <= 0) {
|
|
1198
|
-
e.font = a.text, e.fillStyle =
|
|
1209
|
+
e.font = a.text, e.fillStyle = G.muted, e.textAlign = "left", e.fillText(i.empty, K, n + J / 2);
|
|
1199
1210
|
return;
|
|
1200
1211
|
}
|
|
1201
|
-
let o = c(t,
|
|
1212
|
+
let o = c(t, Z, Mt);
|
|
1202
1213
|
for (let t of o) {
|
|
1203
|
-
let i = t.parent ?? t.node, o =
|
|
1204
|
-
t.parent && (e.globalAlpha =
|
|
1214
|
+
let i = t.parent ?? t.node, o = O(i.slot, "light"), s = !!t.node.children?.some((e) => e.value > 0);
|
|
1215
|
+
t.parent && (e.globalAlpha = E(t.parent.children.filter((e) => e.value > 0).indexOf(t.node))), e.fillStyle = o, e.fillRect(K + t.rect.x + 1, n + t.rect.y + 1, Math.max(0, t.rect.w - 2), Math.max(0, t.rect.h - 2)), e.globalAlpha = 1, t.label && (e.textAlign = "left", e.fillStyle = ae(o), e.font = a.bold, e.fillText(Q(e, t.node.label, t.rect.w - 12), K + t.rect.x + 6, n + t.rect.y + (s ? 9 : 12)), s || (e.font = a.small, e.fillText(Q(e, r(t.node.value), t.rect.w - 12), K + t.rect.x + 6, n + t.rect.y + 28)));
|
|
1205
1216
|
}
|
|
1206
|
-
|
|
1217
|
+
$(e, Bt(t, r), a, K, n + Mt + q, Z, 2);
|
|
1207
1218
|
}
|
|
1208
|
-
function
|
|
1219
|
+
function on(e, t) {
|
|
1209
1220
|
try {
|
|
1210
1221
|
return new Intl.DateTimeFormat(e, {
|
|
1211
1222
|
...t,
|
|
@@ -1218,121 +1229,121 @@ function Qt(e, t) {
|
|
|
1218
1229
|
});
|
|
1219
1230
|
}
|
|
1220
1231
|
}
|
|
1221
|
-
function
|
|
1222
|
-
let s = S(t), { cell: c } =
|
|
1223
|
-
e.font = a.small, e.textAlign = "left", e.fillStyle =
|
|
1224
|
-
let d =
|
|
1225
|
-
for (let t of s.months) e.fillText(d.format(b(`${t.month}-01`)), 84 + t.week * l, n +
|
|
1226
|
-
let f =
|
|
1227
|
-
for (let t = 0; t < 7; t += 2) e.fillText(
|
|
1228
|
-
for (let t of s.cells) e.fillStyle =
|
|
1229
|
-
let p = u + 7 * l +
|
|
1230
|
-
e.fillStyle =
|
|
1231
|
-
let m =
|
|
1232
|
-
for (let t of
|
|
1233
|
-
e.fillStyle =
|
|
1232
|
+
function sn(e, t, n, r, i, a, o) {
|
|
1233
|
+
let s = S(t), { cell: c } = Ut(s.weeks), l = c + Ht, u = n + J;
|
|
1234
|
+
e.font = a.small, e.textAlign = "left", e.fillStyle = G.muted;
|
|
1235
|
+
let d = on(o, { month: "short" });
|
|
1236
|
+
for (let t of s.months) e.fillText(d.format(b(`${t.month}-01`)), 84 + t.week * l, n + J / 2);
|
|
1237
|
+
let f = on(o, { weekday: "short" });
|
|
1238
|
+
for (let t = 0; t < 7; t += 2) e.fillText(Q(e, f.format(Date.UTC(2024, 0, 1 + t)), 50), K, u + t * l + c / 2);
|
|
1239
|
+
for (let t of s.cells) e.fillStyle = G.heat[t.level], e.fillRect(84 + t.week * l, u + t.weekday * l, c, c);
|
|
1240
|
+
let p = u + 7 * l + q + Y / 2;
|
|
1241
|
+
e.fillStyle = G.muted, e.fillText(i.less, K, p);
|
|
1242
|
+
let m = K + e.measureText(i.less).width + 8;
|
|
1243
|
+
for (let t of G.heat) e.fillStyle = t, e.fillRect(m, p - 6, 12, 12), m += 15;
|
|
1244
|
+
e.fillStyle = G.muted, e.fillText(i.more, m + 5, p);
|
|
1234
1245
|
let h = s.cells.reduce((e, t) => t.count > (e?.count ?? 0) ? t : e, null);
|
|
1235
|
-
e.textAlign = "right", e.font = a.bold, e.fillStyle =
|
|
1236
|
-
let g =
|
|
1246
|
+
e.textAlign = "right", e.font = a.bold, e.fillStyle = G.text;
|
|
1247
|
+
let g = on(o, { dateStyle: "medium" });
|
|
1237
1248
|
e.fillText(`${i.total}: ${r(s.total)}${h ? ` · ${i.busiest}: ${g.format(b(h.day))} (${r(h.count)})` : ""}`, 692, p);
|
|
1238
1249
|
}
|
|
1239
|
-
function
|
|
1250
|
+
function cn(e, t, n, r, i, a, o) {
|
|
1240
1251
|
if (!t.some((e) => e.value > 0)) {
|
|
1241
|
-
e.font =
|
|
1252
|
+
e.font = o.text, e.fillStyle = G.muted, e.textAlign = "left", e.fillText(a.empty, K, r + J / 2);
|
|
1242
1253
|
return;
|
|
1243
1254
|
}
|
|
1244
|
-
let
|
|
1245
|
-
|
|
1246
|
-
let
|
|
1247
|
-
e.font =
|
|
1248
|
-
let
|
|
1249
|
-
e.fillStyle =
|
|
1250
|
-
let
|
|
1251
|
-
e.measureText(
|
|
1255
|
+
let c = Math.min(180, Z * .26), l = 317.36;
|
|
1256
|
+
oe(t).forEach(({ step: t, width: a, ofFirst: u, drop: d }, f) => {
|
|
1257
|
+
let p = r + f * Nt + Nt / 2;
|
|
1258
|
+
e.font = o.bold, e.textAlign = "left", e.fillStyle = G.text, e.fillText(Q(e, t.label, c), K, p);
|
|
1259
|
+
let m = Math.max(2, l * a), h = 212.64000000000001 + (l - m) / 2, g = O(t.slot, "light");
|
|
1260
|
+
e.fillStyle = g, e.fillRect(h, p - 13, m, 26), e.textAlign = "center";
|
|
1261
|
+
let _ = i(t.value);
|
|
1262
|
+
e.measureText(_).width + 12 <= m ? (e.fillStyle = ae(g), e.fillText(_, h + m / 2, p)) : (e.fillStyle = G.text, e.textAlign = "left", e.fillText(_, h + m + 6, p)), e.textAlign = "right", n && d !== null && (e.fillStyle = d === 0 ? G.muted : O(d > 0 ? "negative" : "positive", "light"), e.fillText(v(d), 692, p - 7)), e.font = o.small, e.fillStyle = G.muted, n && e.fillText(s(u), 692, d === null ? p : p + 8);
|
|
1252
1263
|
});
|
|
1253
1264
|
}
|
|
1254
|
-
function
|
|
1255
|
-
let { cell: c, width: u, height: d, k: f } =
|
|
1265
|
+
function ln(e, t, n, r, i, a, o) {
|
|
1266
|
+
let { cell: c, width: u, height: d, k: f } = Wt(t.length, n), p = D[n];
|
|
1256
1267
|
t.length ? t.forEach((t, m) => {
|
|
1257
|
-
let h =
|
|
1258
|
-
e.lineWidth = 12 * f, e.lineCap = "round", e.strokeStyle =
|
|
1259
|
-
let S =
|
|
1260
|
-
e.font = o.bold, e.fillText(
|
|
1261
|
-
}) : (e.font = o.text, e.fillStyle =
|
|
1268
|
+
let h = K + m * c + (c - u) / 2 + p.cx * f, _ = r + p.cy * f, v = l(t.value, t.total), { a0: y, a1: b, end: x } = g(n, v);
|
|
1269
|
+
e.lineWidth = 12 * f, e.lineCap = "round", e.strokeStyle = G.track, e.beginPath(), e.arc(h, _, p.r * f, Jt(y), Jt(b)), e.stroke(), v > 0 && (e.strokeStyle = O(w(t.color ?? 1, v), "light"), e.beginPath(), e.arc(h, _, p.r * f, Jt(y), Jt(Math.max(x, y + .01))), e.stroke()), e.lineCap = "butt", e.textAlign = "center", e.font = o.title, e.fillStyle = G.text, e.fillText(s(v), h, n === "half" ? _ - Et / 2 : _);
|
|
1270
|
+
let S = K + m * c + c / 2;
|
|
1271
|
+
e.font = o.bold, e.fillText(Q(e, t.label, c - 8), S, r + d + 8 + J / 2), e.font = o.text, e.fillStyle = G.muted, e.fillText(Q(e, `${a.ofTotal(i(t.value), i(t.total))} · ${s(v)}`, c - 8), S, r + d + 8 + J * 1.5);
|
|
1272
|
+
}) : (e.font = o.text, e.fillStyle = G.muted, e.textAlign = "left", e.fillText(a.empty, K, r + J / 2));
|
|
1262
1273
|
}
|
|
1263
|
-
function
|
|
1274
|
+
function un(e, t, n, r, i, a) {
|
|
1264
1275
|
t.length ? t.forEach((t, o) => {
|
|
1265
|
-
let c = n + o *
|
|
1266
|
-
e.font = a.bold, e.textAlign = "right", e.fillStyle =
|
|
1276
|
+
let c = n + o * It, l = t.total > 0 ? t.value / t.total * 100 : 0, u = `${i.ofTotal(r(t.value), r(t.total))} · ${s(l)}`;
|
|
1277
|
+
e.font = a.bold, e.textAlign = "right", e.fillStyle = G.text, e.fillText(u, 692, c + J / 2);
|
|
1267
1278
|
let d = e.measureText(u).width;
|
|
1268
|
-
e.font = a.text, e.textAlign = "left", e.fillText(
|
|
1269
|
-
let f = c +
|
|
1270
|
-
e.fillStyle =
|
|
1271
|
-
}) : (e.font = a.text, e.fillStyle =
|
|
1279
|
+
e.font = a.text, e.textAlign = "left", e.fillText(Q(e, t.label, Z - d - 16), K, c + J / 2);
|
|
1280
|
+
let f = c + J + 4;
|
|
1281
|
+
e.fillStyle = G.track, e.fillRect(K, f, Z, Ft), e.fillStyle = O(w(t.color ?? 1, l), "light"), l > 0 && e.fillRect(K, f, Z * Math.min(100, l) / 100, Ft);
|
|
1282
|
+
}) : (e.font = a.text, e.fillStyle = G.muted, e.textAlign = "left", e.fillText(i.empty, K, n + J / 2));
|
|
1272
1283
|
}
|
|
1273
|
-
function
|
|
1284
|
+
function dn(e, t, n) {
|
|
1274
1285
|
let r = e.getContext("2d");
|
|
1275
1286
|
if (!r) throw Error("No 2D canvas");
|
|
1276
|
-
let i =
|
|
1287
|
+
let i = Lt(n.fontFamily), a = {
|
|
1277
1288
|
...p,
|
|
1278
1289
|
...t.labels
|
|
1279
|
-
}, o =
|
|
1290
|
+
}, o = Rt(t), s = n.pixelRatio ?? 2;
|
|
1280
1291
|
r.font = i.text;
|
|
1281
|
-
let c = t.context ?
|
|
1282
|
-
e.width = 720 * s, e.height = l * s, r.setTransform(s, 0, 0, s, 0, 0), r.textBaseline = "middle", r.fillStyle =
|
|
1283
|
-
let u =
|
|
1284
|
-
r.textAlign = "left", t.report && (r.font = i.report, r.fillStyle =
|
|
1285
|
-
for (let e of c) r.fillText(e,
|
|
1286
|
-
u +=
|
|
1292
|
+
let c = t.context ? Gt(r, t.context, Z) : [], l = K + ((t.report ? 24 : 0) + Et + 8 + c.length * J) + q + Vt(t.chart) + q + J + K;
|
|
1293
|
+
e.width = 720 * s, e.height = l * s, r.setTransform(s, 0, 0, s, 0, 0), r.textBaseline = "middle", r.fillStyle = G.background, r.fillRect(0, 0, 720, l);
|
|
1294
|
+
let u = K;
|
|
1295
|
+
r.textAlign = "left", t.report && (r.font = i.report, r.fillStyle = G.muted, r.fillText(Q(r, t.report, Z), K, u + J / 2), u += 24), r.font = i.title, r.fillStyle = G.text, r.fillText(Q(r, t.title, Z), K, u + Et / 2), u += 30, r.font = i.text, r.fillStyle = G.muted;
|
|
1296
|
+
for (let e of c) r.fillText(e, K, u + J / 2), u += J;
|
|
1297
|
+
u += q;
|
|
1287
1298
|
let d = t.chart;
|
|
1288
1299
|
switch (d.kind) {
|
|
1289
1300
|
case "donut":
|
|
1290
|
-
|
|
1301
|
+
qt(r, d.slices, u, o, a, i);
|
|
1291
1302
|
break;
|
|
1292
1303
|
case "pie":
|
|
1293
|
-
|
|
1304
|
+
Yt(r, d.slices, u, o, a, i);
|
|
1294
1305
|
break;
|
|
1295
1306
|
case "stacked":
|
|
1296
|
-
|
|
1307
|
+
Xt(r, d.slices, u, o, i);
|
|
1297
1308
|
break;
|
|
1298
1309
|
case "bars":
|
|
1299
|
-
|
|
1310
|
+
Qt(r, d.data, d.series, u, o, a, i);
|
|
1300
1311
|
break;
|
|
1301
1312
|
case "progress":
|
|
1302
|
-
|
|
1313
|
+
un(r, d.rows, u, o, a, i);
|
|
1303
1314
|
break;
|
|
1304
1315
|
case "columns":
|
|
1305
|
-
|
|
1316
|
+
tn(r, d.data, d.series, d.mode ?? "stacked", u, o, a, i);
|
|
1306
1317
|
break;
|
|
1307
1318
|
case "line":
|
|
1308
|
-
|
|
1319
|
+
en(r, d.data, d.series, !!d.area, u, o, a, i);
|
|
1309
1320
|
break;
|
|
1310
1321
|
case "number":
|
|
1311
|
-
|
|
1322
|
+
rn(r, d, u, o, a, i);
|
|
1312
1323
|
break;
|
|
1313
1324
|
case "gauge":
|
|
1314
|
-
|
|
1325
|
+
ln(r, d.rows, d.variant ?? "half", u, o, a, i);
|
|
1315
1326
|
break;
|
|
1316
1327
|
case "funnel":
|
|
1317
|
-
|
|
1328
|
+
cn(r, d.steps, d.showChange !== !1, u, o, a, i);
|
|
1318
1329
|
break;
|
|
1319
1330
|
case "calendar":
|
|
1320
|
-
|
|
1331
|
+
sn(r, d.days, u, o, a, i, t.locale);
|
|
1321
1332
|
break;
|
|
1322
|
-
case "treemap":
|
|
1333
|
+
case "treemap": an(r, d.nodes, u, o, a, i);
|
|
1323
1334
|
}
|
|
1324
|
-
u +=
|
|
1335
|
+
u += Vt(d) + q, r.font = i.small, r.fillStyle = G.faint, r.textAlign = "left", r.fillText(zt(t.at ?? /* @__PURE__ */ new Date(), t.locale), K, u + J / 2), t.branding && (r.textAlign = "right", r.fillText(Q(r, t.branding, Z / 2), 692, u + J / 2));
|
|
1325
1336
|
}
|
|
1326
|
-
function
|
|
1337
|
+
function fn(e) {
|
|
1327
1338
|
return [
|
|
1328
1339
|
e.report ?? "",
|
|
1329
1340
|
e.title,
|
|
1330
1341
|
e.context ?? "",
|
|
1331
1342
|
e.branding ?? "",
|
|
1332
|
-
...
|
|
1343
|
+
...pn(e.chart)
|
|
1333
1344
|
].join(" ");
|
|
1334
1345
|
}
|
|
1335
|
-
function
|
|
1346
|
+
function pn(e) {
|
|
1336
1347
|
switch (e.kind) {
|
|
1337
1348
|
case "donut":
|
|
1338
1349
|
case "pie":
|
|
@@ -1348,10 +1359,10 @@ function on(e) {
|
|
|
1348
1359
|
case "line": return [...e.data.map((e) => e.fullLabel ?? e.label), ...e.series.map((e) => e.label)];
|
|
1349
1360
|
}
|
|
1350
1361
|
}
|
|
1351
|
-
async function
|
|
1352
|
-
let n = t.fontFamily || (typeof document < "u" ? getComputedStyle(document.body).fontFamily : "") || "sans-serif", r =
|
|
1362
|
+
async function mn(e, t = {}) {
|
|
1363
|
+
let n = t.fontFamily || (typeof document < "u" ? getComputedStyle(document.body).fontFamily : "") || "sans-serif", r = Lt(n);
|
|
1353
1364
|
if (typeof document < "u" && document.fonts) {
|
|
1354
|
-
let t =
|
|
1365
|
+
let t = fn(e);
|
|
1355
1366
|
await Promise.all([
|
|
1356
1367
|
r.report,
|
|
1357
1368
|
r.title,
|
|
@@ -1360,15 +1371,15 @@ async function sn(e, t = {}) {
|
|
|
1360
1371
|
].map((e) => document.fonts.load(e, t).catch(() => []))), await document.fonts.ready;
|
|
1361
1372
|
}
|
|
1362
1373
|
let i = document.createElement("canvas");
|
|
1363
|
-
return
|
|
1374
|
+
return dn(i, e, { fontFamily: n }), new Promise((e, t) => i.toBlob((n) => n ? e(n) : t(/* @__PURE__ */ Error("No image")), "image/png"));
|
|
1364
1375
|
}
|
|
1365
|
-
function
|
|
1376
|
+
function hn(e, t = /* @__PURE__ */ new Date(), n) {
|
|
1366
1377
|
let r = [n, e].filter(Boolean).join(" ").trim().toLowerCase().replace(/[^\p{L}\p{M}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "") || "chart", i = (e) => String(e).padStart(2, "0");
|
|
1367
1378
|
return `${r}-${t.getFullYear()}-${i(t.getMonth() + 1)}-${i(t.getDate())}-${i(t.getHours())}${i(t.getMinutes())}.png`;
|
|
1368
1379
|
}
|
|
1369
1380
|
// src/components/Charts/ChartImageMenu.tsx
|
|
1370
|
-
var
|
|
1371
|
-
function
|
|
1381
|
+
var gn = 2e3;
|
|
1382
|
+
function _n() {
|
|
1372
1383
|
if (typeof navigator > "u") return {
|
|
1373
1384
|
copy: !1,
|
|
1374
1385
|
share: !1
|
|
@@ -1384,7 +1395,7 @@ function un() {
|
|
|
1384
1395
|
share: t
|
|
1385
1396
|
};
|
|
1386
1397
|
}
|
|
1387
|
-
var
|
|
1398
|
+
var vn = (e) => /* @__PURE__ */ N("svg", {
|
|
1388
1399
|
width: "16",
|
|
1389
1400
|
height: "16",
|
|
1390
1401
|
viewBox: "0 0 24 24",
|
|
@@ -1394,8 +1405,8 @@ var dn = (e) => /* @__PURE__ */ j("svg", {
|
|
|
1394
1405
|
strokeLinecap: "round",
|
|
1395
1406
|
strokeLinejoin: "round",
|
|
1396
1407
|
"aria-hidden": !0,
|
|
1397
|
-
children: /* @__PURE__ */
|
|
1398
|
-
}),
|
|
1408
|
+
children: /* @__PURE__ */ N("path", { d: e })
|
|
1409
|
+
}), yn = () => vn("M12 4v11M7 10l5 5 5-5M5 20h14"), bn = () => vn("M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1zM5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"), xn = () => /* @__PURE__ */ N("svg", {
|
|
1399
1410
|
width: "16",
|
|
1400
1411
|
height: "16",
|
|
1401
1412
|
viewBox: "0 0 24 24",
|
|
@@ -1405,38 +1416,38 @@ var dn = (e) => /* @__PURE__ */ j("svg", {
|
|
|
1405
1416
|
strokeLinecap: "round",
|
|
1406
1417
|
strokeLinejoin: "round",
|
|
1407
1418
|
"aria-hidden": !0,
|
|
1408
|
-
children: /* @__PURE__ */
|
|
1419
|
+
children: /* @__PURE__ */ N("path", { d: "M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M16 6l-4-4-4 4M12 2v13" })
|
|
1409
1420
|
});
|
|
1410
|
-
function
|
|
1421
|
+
function Sn(e) {
|
|
1411
1422
|
let t = {
|
|
1412
1423
|
...p,
|
|
1413
1424
|
...u().charts,
|
|
1414
1425
|
...e.labels
|
|
1415
|
-
}, r =
|
|
1416
|
-
|
|
1426
|
+
}, r = yt(), i = n().locale, a = xe(_n, []), o = j(null), [s, c] = M(null);
|
|
1427
|
+
A(() => {
|
|
1417
1428
|
if (!s) return;
|
|
1418
|
-
let e = setTimeout(() => c(null),
|
|
1429
|
+
let e = setTimeout(() => c(null), gn);
|
|
1419
1430
|
return () => clearTimeout(e);
|
|
1420
1431
|
}, [s]);
|
|
1421
1432
|
let l = [
|
|
1422
1433
|
{
|
|
1423
1434
|
value: "download",
|
|
1424
1435
|
label: t.imageDownload,
|
|
1425
|
-
icon: /* @__PURE__ */
|
|
1436
|
+
icon: /* @__PURE__ */ N(yn, {})
|
|
1426
1437
|
},
|
|
1427
1438
|
...a.copy ? [{
|
|
1428
1439
|
value: "copy",
|
|
1429
1440
|
label: t.imageCopy,
|
|
1430
|
-
icon: /* @__PURE__ */
|
|
1441
|
+
icon: /* @__PURE__ */ N(bn, {})
|
|
1431
1442
|
}] : [],
|
|
1432
1443
|
...a.share ? [{
|
|
1433
1444
|
value: "share",
|
|
1434
1445
|
label: t.imageShare,
|
|
1435
|
-
icon: /* @__PURE__ */
|
|
1446
|
+
icon: /* @__PURE__ */ N(xn, {})
|
|
1436
1447
|
}] : []
|
|
1437
1448
|
], d = async (n) => {
|
|
1438
1449
|
c(null);
|
|
1439
|
-
let a = /* @__PURE__ */ new Date(), s =
|
|
1450
|
+
let a = /* @__PURE__ */ new Date(), s = hn(e.title, a, e.report), l = () => mn({
|
|
1440
1451
|
...e,
|
|
1441
1452
|
locale: e.locale ?? i,
|
|
1442
1453
|
at: a
|
|
@@ -1469,31 +1480,31 @@ function hn(e) {
|
|
|
1469
1480
|
});
|
|
1470
1481
|
}
|
|
1471
1482
|
};
|
|
1472
|
-
return /* @__PURE__ */
|
|
1483
|
+
return /* @__PURE__ */ P("span", {
|
|
1473
1484
|
ref: o,
|
|
1474
1485
|
className: "chart-root chart-image-menu",
|
|
1475
|
-
children: [/* @__PURE__ */
|
|
1486
|
+
children: [/* @__PURE__ */ N(Tt, {
|
|
1476
1487
|
"aria-label": t.imageMenu,
|
|
1477
1488
|
items: l,
|
|
1478
1489
|
onSelect: (e) => void d(e),
|
|
1479
|
-
trigger: /* @__PURE__ */
|
|
1490
|
+
trigger: /* @__PURE__ */ N(st, {
|
|
1480
1491
|
variant: "text",
|
|
1481
1492
|
color: "neutral",
|
|
1482
1493
|
size: "xs",
|
|
1483
|
-
startIcon: /* @__PURE__ */
|
|
1494
|
+
startIcon: /* @__PURE__ */ N(xn, {}),
|
|
1484
1495
|
"aria-label": `${t.imageMenu}: ${e.title}`,
|
|
1485
1496
|
tooltip: t.imageMenu
|
|
1486
1497
|
})
|
|
1487
|
-
}), /* @__PURE__ */
|
|
1498
|
+
}), /* @__PURE__ */ N("span", {
|
|
1488
1499
|
className: "chart-image-status",
|
|
1489
1500
|
role: "status",
|
|
1490
1501
|
"aria-live": "polite",
|
|
1491
1502
|
"data-tone": s?.tone,
|
|
1492
|
-
children: s && /* @__PURE__ */
|
|
1503
|
+
children: s && /* @__PURE__ */ P(Ce, { children: [s.tone === "done" && /* @__PURE__ */ N("span", {
|
|
1493
1504
|
"aria-hidden": !0,
|
|
1494
1505
|
children: "✓"
|
|
1495
1506
|
}), s.text] })
|
|
1496
1507
|
})]
|
|
1497
1508
|
});
|
|
1498
1509
|
}
|
|
1499
|
-
export {
|
|
1510
|
+
export { Qe as C, Ee as D, Re as E, We as S, R as T, it as _, dn as a, Ge as b, St as c, yt as d, xt as f, H as g, st as h, hn as i, gt as l, ht as m, G as n, Tt as o, W as p, mn as r, Ct as s, Sn as t, bt as u, rt as v, Ke as w, Je as x, $e as y };
|