@carto/ps-react-ui 4.6.2 → 4.7.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/dist/{download-config-C3I0jWIL.js → download-config-DNLkypdN.js} +8 -7
- package/dist/{download-config-C3I0jWIL.js.map → download-config-DNLkypdN.js.map} +1 -1
- package/dist/options-CthfUJDz.js +46 -0
- package/dist/options-CthfUJDz.js.map +1 -0
- package/dist/shared-resize-observer-98b1SK1e.js +17 -0
- package/dist/shared-resize-observer-98b1SK1e.js.map +1 -0
- package/dist/styles-BYTyKQFP.js +142 -0
- package/dist/{styles-Y8q7Jff3.js.map → styles-BYTyKQFP.js.map} +1 -1
- package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +24 -0
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +15 -10
- package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +19 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.test.d.ts +1 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +8 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +35 -1
- package/dist/types/widgets/utils/chart-config/index.d.ts +1 -1
- package/dist/types/widgets/utils/chart-config/option-builders.d.ts +27 -0
- package/dist/widgets/actions.js +985 -772
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +34 -30
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +9 -8
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +79 -91
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/formula.js +43 -42
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +67 -63
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +15 -14
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +38 -37
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/scatterplot.js +31 -30
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/spread.js +47 -46
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +17 -16
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +35 -34
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/utils.js +2 -2
- package/package.json +3 -1
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +386 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +88 -152
- package/src/widgets/actions/brush-toggle/hit-test.test.ts +65 -0
- package/src/widgets/actions/brush-toggle/hit-test.ts +45 -0
- package/src/widgets/actions/brush-toggle/style.ts +32 -0
- package/src/widgets/actions/brush-toggle/types.ts +36 -1
- package/src/widgets/bar/config.ts +5 -0
- package/src/widgets/echart/options.ts +1 -4
- package/src/widgets/histogram/config.ts +9 -4
- package/src/widgets/pie/config.ts +2 -0
- package/src/widgets/scatterplot/config.ts +2 -0
- package/src/widgets/timeseries/config.ts +2 -0
- package/src/widgets/utils/chart-config/index.ts +2 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +105 -1
- package/src/widgets/utils/chart-config/option-builders.ts +56 -0
- package/dist/options-D9wflre6.js +0 -49
- package/dist/options-D9wflre6.js.map +0 -1
- package/dist/styles-Y8q7Jff3.js +0 -118
package/dist/widgets/actions.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { IconButton as
|
|
4
|
-
import { w as
|
|
5
|
-
import { u as
|
|
6
|
-
import { FullscreenOutlined as
|
|
7
|
-
import { useState as
|
|
8
|
-
import { a as
|
|
1
|
+
import { jsx as x, jsxs as oe, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import { c as J } from "react/compiler-runtime";
|
|
3
|
+
import { IconButton as Q, DialogContent as Me, Dialog as Ae, Typography as Be, DialogTitle as We, CircularProgress as Fe, MenuItem as Le, ListItemIcon as $e, ListItemText as ke, Menu as we, useTheme as Ne, Box as Pe, TextField as Ge, InputAdornment as pe, SvgIcon as Ze } from "@mui/material";
|
|
4
|
+
import { w as b, u as Ve } from "../widget-store-Bw5zRUGg.js";
|
|
5
|
+
import { u as te } from "../use-widget-selector-DFl2hW0R.js";
|
|
6
|
+
import { FullscreenOutlined as He, Close as je, FileDownloadOutlined as Ue, PercentOutlined as Xe, SubdirectoryArrowLeftOutlined as Ke, ZoomInOutlined as Ye, CheckBoxOutlined as qe, SearchOutlined as Re, ClearOutlined as Je, HighlightAltOutlined as Qe } from "@mui/icons-material";
|
|
7
|
+
import { useState as ie, useRef as le, useEffect as H, useSyncExternalStore as Se } from "react";
|
|
8
|
+
import { a as Pn, d as Rn } from "../exports-Cr43OCul.js";
|
|
9
9
|
import "../lasso-tool-BYbxrJ-7.js";
|
|
10
10
|
import "../cjs-D4KH3azB.js";
|
|
11
|
-
import { T as
|
|
12
|
-
import { b as
|
|
13
|
-
import { useSensors as
|
|
14
|
-
import { useSortable as
|
|
15
|
-
import { CSS as
|
|
11
|
+
import { T as re } from "../tooltip-BDnrRKrp.js";
|
|
12
|
+
import { b as et, a as tt, D as nt } from "../utils-BOhInag6.js";
|
|
13
|
+
import { useSensors as ot, useSensor as xe, PointerSensor as lt, KeyboardSensor as rt, DndContext as it, closestCenter as st } from "@dnd-kit/core";
|
|
14
|
+
import { useSortable as ct, sortableKeyboardCoordinates as at, arrayMove as dt, SortableContext as ut, verticalListSortingStrategy as ft } from "@dnd-kit/sortable";
|
|
15
|
+
import { CSS as mt } from "@dnd-kit/utilities";
|
|
16
|
+
import { createPortal as gt } from "react-dom";
|
|
17
|
+
import { o as ht } from "../shared-resize-observer-98b1SK1e.js";
|
|
16
18
|
const ve = {
|
|
17
19
|
title: {
|
|
18
20
|
container: {
|
|
@@ -29,302 +31,302 @@ const ve = {
|
|
|
29
31
|
spacing: n
|
|
30
32
|
}) => n(1)
|
|
31
33
|
}
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
-
const e =
|
|
34
|
+
}, bt = {};
|
|
35
|
+
function pn(n) {
|
|
36
|
+
const e = J(42), {
|
|
35
37
|
id: t,
|
|
36
|
-
labels:
|
|
37
|
-
children:
|
|
38
|
-
Icon:
|
|
39
|
-
IconButtonProps:
|
|
40
|
-
DialogContentProps:
|
|
41
|
-
DialogProps:
|
|
42
|
-
} = n, o =
|
|
43
|
-
let
|
|
38
|
+
labels: l,
|
|
39
|
+
children: u,
|
|
40
|
+
Icon: c,
|
|
41
|
+
IconButtonProps: p,
|
|
42
|
+
DialogContentProps: E,
|
|
43
|
+
DialogProps: S
|
|
44
|
+
} = n, o = E === void 0 ? bt : E;
|
|
45
|
+
let r, i;
|
|
44
46
|
e[0] !== o ? ({
|
|
45
|
-
sx:
|
|
46
|
-
...
|
|
47
|
-
} = o, e[0] = o, e[1] =
|
|
47
|
+
sx: i,
|
|
48
|
+
...r
|
|
49
|
+
} = o, e[0] = o, e[1] = r, e[2] = i) : (r = e[1], i = e[2]);
|
|
48
50
|
const {
|
|
49
|
-
isFullScreen:
|
|
50
|
-
title:
|
|
51
|
-
} =
|
|
52
|
-
let
|
|
53
|
-
e[3] !== t ? (
|
|
54
|
-
|
|
55
|
-
isFullScreen:
|
|
51
|
+
isFullScreen: a,
|
|
52
|
+
title: d
|
|
53
|
+
} = te(t, pt);
|
|
54
|
+
let g;
|
|
55
|
+
e[3] !== t ? (g = (B) => {
|
|
56
|
+
b.setWidget(t, {
|
|
57
|
+
isFullScreen: B.isFullScreen
|
|
56
58
|
});
|
|
57
|
-
}, e[3] = t, e[4] =
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
e[5] !==
|
|
59
|
+
}, e[3] = t, e[4] = g) : g = e[4];
|
|
60
|
+
const f = g;
|
|
61
|
+
let h;
|
|
62
|
+
e[5] !== f ? (h = () => f({
|
|
61
63
|
isFullScreen: !0
|
|
62
|
-
}), e[5] =
|
|
63
|
-
let
|
|
64
|
-
e[7] !==
|
|
65
|
-
let
|
|
66
|
-
e[9] !==
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
e[13] !==
|
|
64
|
+
}), e[5] = f, e[6] = h) : h = e[6];
|
|
65
|
+
let m;
|
|
66
|
+
e[7] !== c ? (m = c ?? /* @__PURE__ */ x(He, {}), e[7] = c, e[8] = m) : m = e[8];
|
|
67
|
+
let y;
|
|
68
|
+
e[9] !== p || e[10] !== h || e[11] !== m ? (y = /* @__PURE__ */ x(Q, { ...p, onClick: h, children: m }), e[9] = p, e[10] = h, e[11] = m, e[12] = y) : y = e[12];
|
|
69
|
+
const s = !!a, w = l?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
|
|
70
|
+
let C;
|
|
71
|
+
e[13] !== f ? (C = () => f({
|
|
70
72
|
isFullScreen: !1
|
|
71
|
-
}), e[13] =
|
|
72
|
-
const
|
|
73
|
-
let w;
|
|
74
|
-
e[15] !== a ? (w = /* @__PURE__ */ b(Pe, { variant: "subtitle1", component: "span", children: a }), e[15] = a, e[16] = w) : w = e[16];
|
|
73
|
+
}), e[13] = f, e[14] = C) : C = e[14];
|
|
74
|
+
const P = `fullscreen-dialog-title-${t}`;
|
|
75
75
|
let D;
|
|
76
|
-
e[
|
|
76
|
+
e[15] !== d ? (D = /* @__PURE__ */ x(Be, { variant: "subtitle1", component: "span", children: d }), e[15] = d, e[16] = D) : D = e[16];
|
|
77
|
+
let O;
|
|
78
|
+
e[17] !== f ? (O = () => f({
|
|
77
79
|
isFullScreen: !1
|
|
78
|
-
}), e[17] =
|
|
79
|
-
let
|
|
80
|
-
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
81
|
-
let
|
|
82
|
-
e[20] !==
|
|
83
|
-
let
|
|
84
|
-
e[22] !==
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
] }), e[22] =
|
|
88
|
-
let
|
|
89
|
-
e[26] !==
|
|
80
|
+
}), e[17] = f, e[18] = O) : O = e[18];
|
|
81
|
+
let T;
|
|
82
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ x(je, {}), e[19] = T) : T = e[19];
|
|
83
|
+
let R;
|
|
84
|
+
e[20] !== O ? (R = /* @__PURE__ */ x(Q, { onClick: O, children: T }), e[20] = O, e[21] = R) : R = e[21];
|
|
85
|
+
let L;
|
|
86
|
+
e[22] !== P || e[23] !== D || e[24] !== R ? (L = /* @__PURE__ */ oe(We, { id: P, sx: ve.title.container, children: [
|
|
87
|
+
D,
|
|
88
|
+
R
|
|
89
|
+
] }), e[22] = P, e[23] = D, e[24] = R, e[25] = L) : L = e[25];
|
|
90
|
+
let v;
|
|
91
|
+
e[26] !== i ? (v = {
|
|
90
92
|
...ve.content,
|
|
91
|
-
...
|
|
92
|
-
}, e[26] =
|
|
93
|
-
let
|
|
94
|
-
e[28] !==
|
|
93
|
+
...i
|
|
94
|
+
}, e[26] = i, e[27] = v) : v = e[27];
|
|
95
|
+
let _;
|
|
96
|
+
e[28] !== r || e[29] !== u || e[30] !== v ? (_ = /* @__PURE__ */ x(Me, { sx: v, ...r, children: u }), e[28] = r, e[29] = u, e[30] = v, e[31] = _) : _ = e[31];
|
|
95
97
|
let I;
|
|
96
|
-
e[32] !==
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
] }), e[32] =
|
|
100
|
-
let
|
|
101
|
-
return e[39] !== I || e[40] !==
|
|
102
|
-
|
|
98
|
+
e[32] !== S || e[33] !== L || e[34] !== _ || e[35] !== s || e[36] !== w || e[37] !== C ? (I = /* @__PURE__ */ oe(Ae, { maxWidth: !1, open: s, keepMounted: !0, "aria-labelledby": w, ...S, onClose: C, children: [
|
|
99
|
+
L,
|
|
100
|
+
_
|
|
101
|
+
] }), e[32] = S, e[33] = L, e[34] = _, e[35] = s, e[36] = w, e[37] = C, e[38] = I) : I = e[38];
|
|
102
|
+
let z;
|
|
103
|
+
return e[39] !== I || e[40] !== y ? (z = /* @__PURE__ */ oe(de, { children: [
|
|
104
|
+
y,
|
|
103
105
|
I
|
|
104
|
-
] }), e[39] = I, e[40] =
|
|
106
|
+
] }), e[39] = I, e[40] = y, e[41] = z) : z = e[41], z;
|
|
105
107
|
}
|
|
106
|
-
function
|
|
108
|
+
function pt(n) {
|
|
107
109
|
return {
|
|
108
110
|
isFullScreen: n?.isFullScreen,
|
|
109
111
|
title: n?.title
|
|
110
112
|
};
|
|
111
113
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
114
|
-
const e =
|
|
114
|
+
const St = {};
|
|
115
|
+
function Sn(n) {
|
|
116
|
+
const e = J(31), {
|
|
115
117
|
id: t,
|
|
116
|
-
items:
|
|
117
|
-
labels:
|
|
118
|
-
Icon:
|
|
119
|
-
IconButtonProps:
|
|
120
|
-
} = n,
|
|
121
|
-
data:
|
|
122
|
-
} =
|
|
123
|
-
let a;
|
|
124
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (W) => {
|
|
125
|
-
W.stopPropagation(), s(W.currentTarget);
|
|
126
|
-
}, e[0] = a) : a = e[0];
|
|
127
|
-
const u = a;
|
|
128
|
-
let i;
|
|
129
|
-
e[1] !== t ? (i = (W, P) => {
|
|
130
|
-
const B = document.createElement("a");
|
|
131
|
-
B.href = W, B.download = P.filename ?? t, B.style.display = "none", document.body.appendChild(B), B.click(), document.body.removeChild(B), P.callback?.(B.href);
|
|
132
|
-
}, e[1] = t, e[2] = i) : i = e[2];
|
|
133
|
-
const c = i;
|
|
118
|
+
items: l,
|
|
119
|
+
labels: u,
|
|
120
|
+
Icon: c,
|
|
121
|
+
IconButtonProps: p
|
|
122
|
+
} = n, E = u === void 0 ? St : u, {
|
|
123
|
+
data: S
|
|
124
|
+
} = te(t, xt), [o, r] = ie(!1), [i, a] = ie(null);
|
|
134
125
|
let d;
|
|
135
|
-
e[
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = (B) => {
|
|
127
|
+
B.stopPropagation(), a(B.currentTarget);
|
|
128
|
+
}, e[0] = d) : d = e[0];
|
|
129
|
+
const g = d;
|
|
130
|
+
let f;
|
|
131
|
+
e[1] !== t ? (f = (B, M) => {
|
|
132
|
+
const W = document.createElement("a");
|
|
133
|
+
W.href = B, W.download = M.filename ?? t, W.style.display = "none", document.body.appendChild(W), W.click(), document.body.removeChild(W), M.callback?.(W.href);
|
|
134
|
+
}, e[1] = t, e[2] = f) : f = e[2];
|
|
135
|
+
const h = f;
|
|
136
|
+
let m;
|
|
137
|
+
e[3] !== S || e[4] !== h ? (m = async (B, M) => {
|
|
138
|
+
B.stopPropagation(), r(!0), a(null);
|
|
139
|
+
const W = await M.modifier(S);
|
|
140
|
+
if (!W) {
|
|
141
|
+
r(!1);
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
|
-
|
|
143
|
-
}, e[3] =
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
e[6] !==
|
|
147
|
-
let
|
|
148
|
-
e[9] !==
|
|
149
|
-
let
|
|
150
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
144
|
+
h(W, M), r(!1);
|
|
145
|
+
}, e[3] = S, e[4] = h, e[5] = m) : m = e[5];
|
|
146
|
+
const y = m, s = E.ariaLabel ?? "download options", w = o || l.length === 0, C = o || i ? "active" : "";
|
|
147
|
+
let P;
|
|
148
|
+
e[6] !== c || e[7] !== o ? (P = o ? /* @__PURE__ */ x(Fe, { size: 18, color: "inherit" }) : c ?? /* @__PURE__ */ x(Ue, {}), e[6] = c, e[7] = o, e[8] = P) : P = e[8];
|
|
149
|
+
let D;
|
|
150
|
+
e[9] !== p || e[10] !== s || e[11] !== w || e[12] !== C || e[13] !== P ? (D = /* @__PURE__ */ x(Q, { size: "small", "aria-label": s, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: g, ...p, disabled: w, className: C, children: P }), e[9] = p, e[10] = s, e[11] = w, e[12] = C, e[13] = P, e[14] = D) : D = e[14];
|
|
151
|
+
let O, T;
|
|
152
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = {
|
|
151
153
|
vertical: "bottom",
|
|
152
154
|
horizontal: "right"
|
|
153
|
-
},
|
|
155
|
+
}, T = {
|
|
154
156
|
vertical: "top",
|
|
155
157
|
horizontal: "right"
|
|
156
|
-
}, e[15] =
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
158
|
+
}, e[15] = O, e[16] = T) : (O = e[15], T = e[16]);
|
|
159
|
+
const R = !!i;
|
|
160
|
+
let L, v;
|
|
161
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => a(null), v = {
|
|
160
162
|
sx: {
|
|
161
163
|
paddingBottom: 0
|
|
162
164
|
}
|
|
163
|
-
}, e[17] =
|
|
164
|
-
let
|
|
165
|
-
if (e[19] !==
|
|
166
|
-
let
|
|
167
|
-
e[22] !==
|
|
168
|
-
|
|
165
|
+
}, e[17] = L, e[18] = v) : (L = e[17], v = e[18]);
|
|
166
|
+
let _;
|
|
167
|
+
if (e[19] !== y || e[20] !== l) {
|
|
168
|
+
let B;
|
|
169
|
+
e[22] !== y ? (B = (M) => /* @__PURE__ */ oe(Le, { disabled: M.disabled, onClick: (W) => {
|
|
170
|
+
y(W, M);
|
|
169
171
|
}, children: [
|
|
170
|
-
|
|
172
|
+
M.icon && /* @__PURE__ */ x($e, { sx: {
|
|
171
173
|
color: "text.primary"
|
|
172
|
-
}, children:
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] },
|
|
174
|
+
}, children: M.icon }),
|
|
175
|
+
/* @__PURE__ */ x(ke, { children: M.label })
|
|
176
|
+
] }, M.id), e[22] = y, e[23] = B) : B = e[23], _ = l.map(B), e[19] = y, e[20] = l, e[21] = _;
|
|
175
177
|
} else
|
|
176
|
-
|
|
178
|
+
_ = e[21];
|
|
177
179
|
let I;
|
|
178
|
-
e[24] !==
|
|
179
|
-
let
|
|
180
|
-
return e[28] !== I || e[29] !==
|
|
181
|
-
|
|
180
|
+
e[24] !== i || e[25] !== R || e[26] !== _ ? (I = /* @__PURE__ */ x(we, { variant: "menu", elevation: 8, anchorOrigin: O, transformOrigin: T, anchorEl: i, open: R, onClose: L, MenuListProps: v, children: _ }), e[24] = i, e[25] = R, e[26] = _, e[27] = I) : I = e[27];
|
|
181
|
+
let z;
|
|
182
|
+
return e[28] !== I || e[29] !== D ? (z = /* @__PURE__ */ oe(de, { children: [
|
|
183
|
+
D,
|
|
182
184
|
I
|
|
183
|
-
] }), e[28] = I, e[29] =
|
|
185
|
+
] }), e[28] = I, e[29] = D, e[30] = z) : z = e[30], z;
|
|
184
186
|
}
|
|
185
|
-
function
|
|
187
|
+
function xt(n) {
|
|
186
188
|
return {
|
|
187
189
|
data: n?.data
|
|
188
190
|
};
|
|
189
191
|
}
|
|
190
|
-
const
|
|
192
|
+
const se = {
|
|
191
193
|
trigger: {
|
|
192
194
|
'&[data-active="true"]': {
|
|
193
195
|
background: (n) => n.palette.primary.relatedLight
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
};
|
|
197
|
-
function
|
|
198
|
-
return n.reduce((e, t) => t.reduce((
|
|
199
|
-
if (Array.isArray(
|
|
200
|
-
const
|
|
201
|
-
return typeof
|
|
199
|
+
function vt(n) {
|
|
200
|
+
return n.reduce((e, t) => t.reduce((l, u) => {
|
|
201
|
+
if (Array.isArray(u)) {
|
|
202
|
+
const c = u.at(-1);
|
|
203
|
+
return typeof c == "number" ? l + c : l;
|
|
202
204
|
}
|
|
203
|
-
return Object.entries(
|
|
205
|
+
return Object.entries(u).reduce((c, [p, E]) => p === "name" ? c : typeof E == "number" ? c + E : c, l);
|
|
204
206
|
}, e), 0);
|
|
205
207
|
}
|
|
206
|
-
function
|
|
207
|
-
return e === 0 ? n : n.map((t) => t.map((
|
|
208
|
-
if (Array.isArray(
|
|
209
|
-
return
|
|
210
|
-
const
|
|
211
|
-
for (const [
|
|
212
|
-
if (
|
|
213
|
-
|
|
208
|
+
function yt(n, e) {
|
|
209
|
+
return e === 0 ? n : n.map((t) => t.map((l) => {
|
|
210
|
+
if (Array.isArray(l))
|
|
211
|
+
return l.map((c, p) => p === l.length - 1 && typeof c == "number" ? c / e * 100 : c);
|
|
212
|
+
const u = {};
|
|
213
|
+
for (const [c, p] of Object.entries(l)) {
|
|
214
|
+
if (c === "name") {
|
|
215
|
+
u[c] = p;
|
|
214
216
|
continue;
|
|
215
217
|
}
|
|
216
|
-
|
|
218
|
+
u[c] = typeof p == "number" ? p / e * 100 : p;
|
|
217
219
|
}
|
|
218
|
-
return
|
|
220
|
+
return u;
|
|
219
221
|
}));
|
|
220
222
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
223
|
-
const e =
|
|
223
|
+
const fe = "relative-data", ye = "relative-data-config";
|
|
224
|
+
function xn(n) {
|
|
225
|
+
const e = J(36), {
|
|
224
226
|
id: t,
|
|
225
|
-
order:
|
|
226
|
-
defaultIsRelative:
|
|
227
|
-
labels:
|
|
228
|
-
Icon:
|
|
229
|
-
IconButtonProps:
|
|
230
|
-
} = n,
|
|
231
|
-
let
|
|
232
|
-
e[0] !== o ? (
|
|
233
|
-
isRelative:
|
|
234
|
-
}), e[0] = o, e[1] =
|
|
227
|
+
order: l,
|
|
228
|
+
defaultIsRelative: u,
|
|
229
|
+
labels: c,
|
|
230
|
+
Icon: p,
|
|
231
|
+
IconButtonProps: E
|
|
232
|
+
} = n, S = l === void 0 ? 10 : l, o = u === void 0 ? !1 : u, r = le(void 0);
|
|
233
|
+
let i;
|
|
234
|
+
e[0] !== o ? (i = (v) => ({
|
|
235
|
+
isRelative: v?.isRelative ?? o
|
|
236
|
+
}), e[0] = o, e[1] = i) : i = e[1];
|
|
235
237
|
const {
|
|
236
|
-
isRelative:
|
|
237
|
-
} =
|
|
238
|
-
let
|
|
239
|
-
e[2] !== o || e[3] !== t ? (
|
|
240
|
-
const
|
|
241
|
-
|
|
238
|
+
isRelative: a
|
|
239
|
+
} = te(t, i);
|
|
240
|
+
let d, g;
|
|
241
|
+
e[2] !== o || e[3] !== t ? (d = () => {
|
|
242
|
+
const v = b.getWidget(t);
|
|
243
|
+
v?.isRelative === void 0 && (o ? b.setWidget(t, {
|
|
242
244
|
isRelative: !0,
|
|
243
|
-
originalFormatter:
|
|
244
|
-
originalMax:
|
|
245
|
-
}) :
|
|
245
|
+
originalFormatter: v?.formatter,
|
|
246
|
+
originalMax: v?.max
|
|
247
|
+
}) : b.setWidget(t, {
|
|
246
248
|
isRelative: o
|
|
247
249
|
}));
|
|
248
|
-
},
|
|
249
|
-
let
|
|
250
|
-
e[6] !== o || e[7] !== t || e[8] !==
|
|
251
|
-
id:
|
|
252
|
-
order:
|
|
250
|
+
}, g = [t, o], e[2] = o, e[3] = t, e[4] = d, e[5] = g) : (d = e[4], g = e[5]), H(d, g);
|
|
251
|
+
let f, h;
|
|
252
|
+
e[6] !== o || e[7] !== t || e[8] !== S ? (f = () => (b.registerTool(t, {
|
|
253
|
+
id: fe,
|
|
254
|
+
order: S,
|
|
253
255
|
enabled: o,
|
|
254
|
-
fn:
|
|
255
|
-
}), () =>
|
|
256
|
-
let
|
|
257
|
-
e[11] !== t || e[12] !==
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
let
|
|
261
|
-
e[15] !== t || e[16] !==
|
|
262
|
-
id:
|
|
256
|
+
fn: It
|
|
257
|
+
}), () => b.unregisterTool(t, fe)), h = [t, S, o], e[6] = o, e[7] = t, e[8] = S, e[9] = f, e[10] = h) : (f = e[9], h = e[10]), H(f, h);
|
|
258
|
+
let m, y;
|
|
259
|
+
e[11] !== t || e[12] !== a ? (m = () => {
|
|
260
|
+
b.setToolEnabled(t, fe, a);
|
|
261
|
+
}, y = [t, a], e[11] = t, e[12] = a, e[13] = m, e[14] = y) : (m = e[13], y = e[14]), H(m, y);
|
|
262
|
+
let s;
|
|
263
|
+
e[15] !== t || e[16] !== S ? (s = () => (b.registerTool(t, {
|
|
264
|
+
id: ye,
|
|
263
265
|
type: "config",
|
|
264
|
-
order:
|
|
266
|
+
order: S,
|
|
265
267
|
enabled: !0,
|
|
266
|
-
fn: (
|
|
267
|
-
const
|
|
268
|
+
fn: (v) => {
|
|
269
|
+
const _ = v, I = b.getWidget(t), z = I?.sourceData != null && !(Array.isArray(I.sourceData) && I.sourceData.length === 0);
|
|
268
270
|
if (I?.isRelative) {
|
|
269
|
-
if (!
|
|
270
|
-
return
|
|
271
|
-
if (!
|
|
272
|
-
const
|
|
273
|
-
|
|
271
|
+
if (!z)
|
|
272
|
+
return _;
|
|
273
|
+
if (!r.current) {
|
|
274
|
+
const B = I?.locale;
|
|
275
|
+
r.current = (M) => new Intl.NumberFormat(B, {
|
|
274
276
|
style: "percent",
|
|
275
277
|
minimumFractionDigits: 1,
|
|
276
278
|
maximumFractionDigits: 1
|
|
277
|
-
}).format(
|
|
279
|
+
}).format(M / 100);
|
|
278
280
|
}
|
|
279
281
|
return {
|
|
280
|
-
...
|
|
281
|
-
formatter:
|
|
282
|
+
..._,
|
|
283
|
+
formatter: r.current,
|
|
282
284
|
max: 100
|
|
283
285
|
};
|
|
284
286
|
}
|
|
285
|
-
return
|
|
286
|
-
...
|
|
287
|
+
return r.current = void 0, I != null && "originalFormatter" in I ? {
|
|
288
|
+
..._,
|
|
287
289
|
formatter: I.originalFormatter,
|
|
288
290
|
max: I.originalMax
|
|
289
|
-
} :
|
|
291
|
+
} : _;
|
|
290
292
|
}
|
|
291
293
|
}), () => {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
formatter:
|
|
295
|
-
max:
|
|
296
|
-
}),
|
|
297
|
-
}), e[15] = t, e[16] =
|
|
294
|
+
const v = b.getWidget(t);
|
|
295
|
+
v?.isRelative && "originalFormatter" in v && b.setWidget(t, {
|
|
296
|
+
formatter: v.originalFormatter,
|
|
297
|
+
max: v.originalMax
|
|
298
|
+
}), r.current = void 0, b.unregisterTool(t, ye);
|
|
299
|
+
}), e[15] = t, e[16] = S, e[17] = s) : s = e[17];
|
|
300
|
+
let w;
|
|
301
|
+
e[18] !== o || e[19] !== t || e[20] !== S ? (w = [t, S, o], e[18] = o, e[19] = t, e[20] = S, e[21] = w) : w = e[21], H(s, w);
|
|
298
302
|
let C;
|
|
299
|
-
e[
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const h = g.getWidget(t);
|
|
305
|
-
g.setWidget(t, {
|
|
303
|
+
e[22] !== t || e[23] !== a ? (C = () => {
|
|
304
|
+
const v = !a;
|
|
305
|
+
if (r.current = void 0, v) {
|
|
306
|
+
const _ = b.getWidget(t);
|
|
307
|
+
b.setWidget(t, {
|
|
306
308
|
isRelative: !0,
|
|
307
|
-
originalFormatter:
|
|
308
|
-
originalMax:
|
|
309
|
+
originalFormatter: _?.formatter,
|
|
310
|
+
originalMax: _?.max
|
|
309
311
|
});
|
|
310
312
|
} else
|
|
311
|
-
|
|
313
|
+
b.setWidget(t, {
|
|
312
314
|
isRelative: !1
|
|
313
315
|
});
|
|
314
|
-
}, e[22] = t, e[23] =
|
|
315
|
-
const
|
|
316
|
-
let
|
|
317
|
-
e[25] !==
|
|
318
|
-
let
|
|
319
|
-
e[27] !==
|
|
320
|
-
let
|
|
321
|
-
return e[33] !==
|
|
316
|
+
}, e[22] = t, e[23] = a, e[24] = C) : C = e[24];
|
|
317
|
+
const P = C, D = a ? c?.absolute ?? "Show absolute values" : c?.relative ?? "Show relative values", O = c?.ariaLabel ?? D;
|
|
318
|
+
let T;
|
|
319
|
+
e[25] !== p ? (T = p ?? /* @__PURE__ */ x(Xe, {}), e[25] = p, e[26] = T) : T = e[26];
|
|
320
|
+
let R;
|
|
321
|
+
e[27] !== E || e[28] !== P || e[29] !== a || e[30] !== O || e[31] !== T ? (R = /* @__PURE__ */ x(Q, { size: "small", "aria-label": O, onClick: P, sx: se.trigger, "data-active": a, ...E, children: T }), e[27] = E, e[28] = P, e[29] = a, e[30] = O, e[31] = T, e[32] = R) : R = e[32];
|
|
322
|
+
let L;
|
|
323
|
+
return e[33] !== R || e[34] !== D ? (L = /* @__PURE__ */ x(re, { title: D, children: R }), e[33] = R, e[34] = D, e[35] = L) : L = e[35], L;
|
|
322
324
|
}
|
|
323
|
-
function
|
|
324
|
-
const e = n, t =
|
|
325
|
-
return
|
|
325
|
+
function It(n) {
|
|
326
|
+
const e = n, t = vt(e);
|
|
327
|
+
return yt(e, t);
|
|
326
328
|
}
|
|
327
|
-
const
|
|
329
|
+
const Ie = {
|
|
328
330
|
container: {
|
|
329
331
|
display: "flex",
|
|
330
332
|
alignItems: "center",
|
|
@@ -337,596 +339,596 @@ const ye = {
|
|
|
337
339
|
background: (n) => n.palette.primary.relatedLight
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
|
-
},
|
|
341
|
-
function
|
|
342
|
-
const e =
|
|
342
|
+
}, me = "zoom-toggle";
|
|
343
|
+
function vn(n) {
|
|
344
|
+
const e = J(63), {
|
|
343
345
|
id: t,
|
|
344
|
-
defaultZoom:
|
|
345
|
-
defaultZoomStart:
|
|
346
|
-
defaultZoomEnd:
|
|
347
|
-
labels:
|
|
348
|
-
Icon:
|
|
349
|
-
ResetIcon:
|
|
346
|
+
defaultZoom: l,
|
|
347
|
+
defaultZoomStart: u,
|
|
348
|
+
defaultZoomEnd: c,
|
|
349
|
+
labels: p,
|
|
350
|
+
Icon: E,
|
|
351
|
+
ResetIcon: S,
|
|
350
352
|
IconButtonProps: o
|
|
351
|
-
} = n,
|
|
352
|
-
let
|
|
353
|
-
e[0] !==
|
|
354
|
-
zoom:
|
|
355
|
-
zoomStart:
|
|
356
|
-
zoomEnd:
|
|
357
|
-
}), e[0] =
|
|
353
|
+
} = n, r = l === void 0 ? !1 : l, i = u === void 0 ? 0 : u, a = c === void 0 ? 100 : c, d = Ne();
|
|
354
|
+
let g;
|
|
355
|
+
e[0] !== r || e[1] !== a || e[2] !== i ? (g = (A) => ({
|
|
356
|
+
zoom: A?.zoom ?? r,
|
|
357
|
+
zoomStart: A?.zoomStart ?? i,
|
|
358
|
+
zoomEnd: A?.zoomEnd ?? a
|
|
359
|
+
}), e[0] = r, e[1] = a, e[2] = i, e[3] = g) : g = e[3];
|
|
358
360
|
const {
|
|
359
|
-
zoom:
|
|
360
|
-
zoomStart:
|
|
361
|
-
zoomEnd:
|
|
362
|
-
} =
|
|
363
|
-
let
|
|
364
|
-
e[4] !==
|
|
365
|
-
|
|
366
|
-
zoom:
|
|
367
|
-
zoomStart:
|
|
368
|
-
zoomEnd:
|
|
361
|
+
zoom: f,
|
|
362
|
+
zoomStart: h,
|
|
363
|
+
zoomEnd: m
|
|
364
|
+
} = te(t, g);
|
|
365
|
+
let y, s;
|
|
366
|
+
e[4] !== r || e[5] !== a || e[6] !== i || e[7] !== t ? (y = () => {
|
|
367
|
+
b.getWidget(t)?.zoom === void 0 && b.setWidget(t, {
|
|
368
|
+
zoom: r,
|
|
369
|
+
zoomStart: i,
|
|
370
|
+
zoomEnd: a
|
|
369
371
|
});
|
|
370
|
-
},
|
|
371
|
-
let
|
|
372
|
-
e[10] !== t ? (
|
|
373
|
-
const
|
|
374
|
-
|
|
372
|
+
}, s = [t, r, i, a], e[4] = r, e[5] = a, e[6] = i, e[7] = t, e[8] = y, e[9] = s) : (y = e[8], s = e[9]), H(y, s);
|
|
373
|
+
let w;
|
|
374
|
+
e[10] !== t ? (w = (A) => {
|
|
375
|
+
const N = A, V = N.start ?? N.batch?.[0]?.start, X = N.end ?? N.batch?.[0]?.end;
|
|
376
|
+
V !== void 0 && X !== void 0 && b.setWidget(t, {
|
|
375
377
|
zoom: !0,
|
|
376
|
-
zoomStart:
|
|
377
|
-
zoomEnd:
|
|
378
|
+
zoomStart: V,
|
|
379
|
+
zoomEnd: X
|
|
378
380
|
});
|
|
379
|
-
}, e[10] = t, e[11] =
|
|
380
|
-
const
|
|
381
|
-
let
|
|
382
|
-
e[12] !==
|
|
383
|
-
id:
|
|
381
|
+
}, e[10] = t, e[11] = w) : w = e[11];
|
|
382
|
+
const C = w;
|
|
383
|
+
let P;
|
|
384
|
+
e[12] !== r || e[13] !== C || e[14] !== t || e[15] !== d ? (P = () => (b.registerTool(t, {
|
|
385
|
+
id: me,
|
|
384
386
|
type: "config",
|
|
385
387
|
order: 20,
|
|
386
|
-
enabled:
|
|
387
|
-
fn: (
|
|
388
|
-
const
|
|
389
|
-
start:
|
|
390
|
-
end:
|
|
388
|
+
enabled: r,
|
|
389
|
+
fn: (A) => {
|
|
390
|
+
const N = A, V = N.option, X = N.onEvents ?? {}, K = b.getWidget(t), Y = K?.zoomStart ?? 0, ne = K?.zoomEnd ?? 100, q = V?.legend, ee = q?.show !== !1 && q !== void 0, ue = parseInt(d?.spacing?.(4) ?? "32"), De = et({
|
|
391
|
+
start: Y,
|
|
392
|
+
end: ne
|
|
391
393
|
}, {
|
|
392
394
|
inside: !0,
|
|
393
395
|
xSlider: !0,
|
|
394
396
|
ySlider: !1,
|
|
395
|
-
bottomOffset:
|
|
396
|
-
},
|
|
397
|
-
...
|
|
398
|
-
dataZoom:
|
|
397
|
+
bottomOffset: ee ? 28 : 0
|
|
398
|
+
}, d), ce = V?.grid, ze = (typeof ce?.bottom == "number" ? ce.bottom : parseInt(ce?.bottom ?? "24")) + ue + 8, Oe = {
|
|
399
|
+
...X,
|
|
400
|
+
dataZoom: C
|
|
399
401
|
};
|
|
400
402
|
return {
|
|
401
|
-
...
|
|
403
|
+
...N,
|
|
402
404
|
option: {
|
|
403
|
-
...
|
|
404
|
-
...
|
|
405
|
+
...V,
|
|
406
|
+
...De,
|
|
405
407
|
grid: {
|
|
406
|
-
...
|
|
407
|
-
bottom:
|
|
408
|
+
...ce,
|
|
409
|
+
bottom: ze
|
|
408
410
|
}
|
|
409
411
|
},
|
|
410
|
-
onEvents:
|
|
412
|
+
onEvents: Oe
|
|
411
413
|
};
|
|
412
414
|
}
|
|
413
|
-
}), () =>
|
|
414
|
-
let
|
|
415
|
-
e[17] !==
|
|
416
|
-
let
|
|
417
|
-
e[24] !== t || e[25] !==
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
let
|
|
421
|
-
e[28] !== t ? (
|
|
422
|
-
|
|
423
|
-
}, e[28] = t, e[29] =
|
|
424
|
-
let
|
|
425
|
-
e[30] !== t || e[31] !==
|
|
426
|
-
let
|
|
427
|
-
e[34] !== t || e[35] !==
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
zoom:
|
|
431
|
-
zoomStart:
|
|
432
|
-
zoomEnd:
|
|
415
|
+
}), () => b.unregisterTool(t, me)), e[12] = r, e[13] = C, e[14] = t, e[15] = d, e[16] = P) : P = e[16];
|
|
416
|
+
let D;
|
|
417
|
+
e[17] !== r || e[18] !== a || e[19] !== i || e[20] !== C || e[21] !== t || e[22] !== d ? (D = [t, d, C, r, i, a], e[17] = r, e[18] = a, e[19] = i, e[20] = C, e[21] = t, e[22] = d, e[23] = D) : D = e[23], H(P, D);
|
|
418
|
+
let O, T;
|
|
419
|
+
e[24] !== t || e[25] !== f ? (O = () => {
|
|
420
|
+
b.setToolEnabled(t, me, f);
|
|
421
|
+
}, T = [t, f], e[24] = t, e[25] = f, e[26] = O, e[27] = T) : (O = e[26], T = e[27]), H(O, T);
|
|
422
|
+
let R;
|
|
423
|
+
e[28] !== t ? (R = () => {
|
|
424
|
+
b.triggerToolPipeline(t);
|
|
425
|
+
}, e[28] = t, e[29] = R) : R = e[29];
|
|
426
|
+
let L;
|
|
427
|
+
e[30] !== t || e[31] !== m || e[32] !== h ? (L = [t, h, m], e[30] = t, e[31] = m, e[32] = h, e[33] = L) : L = e[33], H(R, L);
|
|
428
|
+
let v;
|
|
429
|
+
e[34] !== t || e[35] !== f || e[36] !== m || e[37] !== h ? (v = () => {
|
|
430
|
+
const A = !f;
|
|
431
|
+
b.setWidget(t, {
|
|
432
|
+
zoom: A,
|
|
433
|
+
zoomStart: A ? h : 0,
|
|
434
|
+
zoomEnd: A ? m : 100
|
|
433
435
|
});
|
|
434
|
-
}, e[34] = t, e[35] =
|
|
435
|
-
const
|
|
436
|
+
}, e[34] = t, e[35] = f, e[36] = m, e[37] = h, e[38] = v) : v = e[38];
|
|
437
|
+
const _ = v;
|
|
436
438
|
let I;
|
|
437
|
-
e[39] !==
|
|
438
|
-
|
|
439
|
+
e[39] !== a || e[40] !== i || e[41] !== t ? (I = () => {
|
|
440
|
+
b.setWidget(t, {
|
|
439
441
|
zoom: !0,
|
|
440
|
-
zoomStart:
|
|
441
|
-
zoomEnd:
|
|
442
|
+
zoomStart: i,
|
|
443
|
+
zoomEnd: a
|
|
442
444
|
});
|
|
443
|
-
}, e[39] =
|
|
444
|
-
const
|
|
445
|
-
let
|
|
446
|
-
e[43] !==
|
|
445
|
+
}, e[39] = a, e[40] = i, e[41] = t, e[42] = I) : I = e[42];
|
|
446
|
+
const z = I, B = p?.enable ?? "Enable zoom", M = p?.disable ?? "Disable zoom", W = p?.reset ?? "Reset zoom", j = f ? M : B, Z = p?.ariaLabel ?? j;
|
|
447
|
+
let $;
|
|
448
|
+
e[43] !== E ? ($ = E ?? /* @__PURE__ */ x(Ye, {}), e[43] = E, e[44] = $) : $ = e[44];
|
|
447
449
|
let G;
|
|
448
|
-
e[45] !== o || e[46] !==
|
|
449
|
-
let
|
|
450
|
-
e[51] !== G || e[52] !==
|
|
451
|
-
let
|
|
452
|
-
e[54] !== o || e[55] !==
|
|
453
|
-
let
|
|
454
|
-
return e[60] !==
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
] }), e[60] =
|
|
450
|
+
e[45] !== o || e[46] !== _ || e[47] !== Z || e[48] !== $ || e[49] !== f ? (G = /* @__PURE__ */ x(Q, { size: "small", "aria-label": Z, onClick: _, sx: Ie.trigger, "data-active": f, ...o, children: $ }), e[45] = o, e[46] = _, e[47] = Z, e[48] = $, e[49] = f, e[50] = G) : G = e[50];
|
|
451
|
+
let U;
|
|
452
|
+
e[51] !== G || e[52] !== j ? (U = /* @__PURE__ */ x(re, { title: j, children: G }), e[51] = G, e[52] = j, e[53] = U) : U = e[53];
|
|
453
|
+
let k;
|
|
454
|
+
e[54] !== o || e[55] !== S || e[56] !== z || e[57] !== W || e[58] !== f ? (k = f && /* @__PURE__ */ x(re, { title: W, children: /* @__PURE__ */ x(Q, { size: "small", "aria-label": W, onClick: z, ...o, children: S ?? /* @__PURE__ */ x(Ke, {}) }) }), e[54] = o, e[55] = S, e[56] = z, e[57] = W, e[58] = f, e[59] = k) : k = e[59];
|
|
455
|
+
let F;
|
|
456
|
+
return e[60] !== U || e[61] !== k ? (F = /* @__PURE__ */ oe(Pe, { sx: Ie.container, children: [
|
|
457
|
+
U,
|
|
458
|
+
k
|
|
459
|
+
] }), e[60] = U, e[61] = k, e[62] = F) : F = e[62], F;
|
|
458
460
|
}
|
|
459
|
-
const
|
|
460
|
-
const n =
|
|
461
|
+
const _t = () => {
|
|
462
|
+
const n = J(1);
|
|
461
463
|
let e;
|
|
462
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
463
|
-
},
|
|
464
|
-
function
|
|
465
|
-
const e =
|
|
464
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ x("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ x("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
|
|
465
|
+
}, ge = "stack-toggle";
|
|
466
|
+
function yn(n) {
|
|
467
|
+
const e = J(35), {
|
|
466
468
|
id: t,
|
|
467
|
-
defaultIsStacked:
|
|
468
|
-
labels:
|
|
469
|
-
Icon:
|
|
470
|
-
IconButtonProps:
|
|
471
|
-
} = n,
|
|
472
|
-
storeIsStacked:
|
|
469
|
+
defaultIsStacked: l,
|
|
470
|
+
labels: u,
|
|
471
|
+
Icon: c,
|
|
472
|
+
IconButtonProps: p
|
|
473
|
+
} = n, E = l === void 0 ? !1 : l, {
|
|
474
|
+
storeIsStacked: S,
|
|
473
475
|
option: o
|
|
474
|
-
} =
|
|
475
|
-
let
|
|
476
|
+
} = te(t, Lt);
|
|
477
|
+
let r;
|
|
476
478
|
e: {
|
|
477
479
|
if (!o) {
|
|
478
|
-
let
|
|
479
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
480
|
+
let M;
|
|
481
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
480
482
|
hasMultiSeries: !1,
|
|
481
483
|
hasStackInSeries: !1
|
|
482
|
-
}, e[0] =
|
|
484
|
+
}, e[0] = M) : M = e[0], r = M;
|
|
483
485
|
break e;
|
|
484
486
|
}
|
|
485
|
-
let
|
|
486
|
-
e[1] !== o.series ? (
|
|
487
|
-
const
|
|
488
|
-
let
|
|
489
|
-
e[3] !==
|
|
490
|
-
let
|
|
491
|
-
e[5] !== I || e[6] !==
|
|
487
|
+
let v;
|
|
488
|
+
e[1] !== o.series ? (v = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = v) : v = e[2];
|
|
489
|
+
const _ = v, I = _.length > 1;
|
|
490
|
+
let z;
|
|
491
|
+
e[3] !== _ ? (z = _.some(Ct), e[3] = _, e[4] = z) : z = e[4];
|
|
492
|
+
let B;
|
|
493
|
+
e[5] !== I || e[6] !== z ? (B = {
|
|
492
494
|
hasMultiSeries: I,
|
|
493
|
-
hasStackInSeries:
|
|
494
|
-
}, e[5] = I, e[6] =
|
|
495
|
+
hasStackInSeries: z
|
|
496
|
+
}, e[5] = I, e[6] = z, e[7] = B) : B = e[7], r = B;
|
|
495
497
|
}
|
|
496
498
|
const {
|
|
497
|
-
hasMultiSeries:
|
|
498
|
-
hasStackInSeries:
|
|
499
|
-
} =
|
|
500
|
-
let
|
|
501
|
-
e[8] !== t ? (
|
|
502
|
-
id:
|
|
499
|
+
hasMultiSeries: i,
|
|
500
|
+
hasStackInSeries: a
|
|
501
|
+
} = r, d = a || E, g = S ?? d;
|
|
502
|
+
let f, h;
|
|
503
|
+
e[8] !== t ? (f = () => (b.registerTool(t, {
|
|
504
|
+
id: ge,
|
|
503
505
|
type: "config",
|
|
504
506
|
order: 10,
|
|
505
507
|
enabled: !1,
|
|
506
|
-
fn:
|
|
507
|
-
}), () =>
|
|
508
|
-
let
|
|
509
|
-
e[11] !==
|
|
510
|
-
|
|
511
|
-
},
|
|
512
|
-
let
|
|
513
|
-
e[16] !==
|
|
514
|
-
|
|
515
|
-
isStacked:
|
|
508
|
+
fn: Tt
|
|
509
|
+
}), () => b.unregisterTool(t, ge)), h = [t], e[8] = t, e[9] = f, e[10] = h) : (f = e[9], h = e[10]), H(f, h);
|
|
510
|
+
let m, y;
|
|
511
|
+
e[11] !== i || e[12] !== t || e[13] !== g ? (m = () => {
|
|
512
|
+
b.setToolEnabled(t, ge, g && i);
|
|
513
|
+
}, y = [t, g, i], e[11] = i, e[12] = t, e[13] = g, e[14] = m, e[15] = y) : (m = e[14], y = e[15]), H(m, y);
|
|
514
|
+
let s, w;
|
|
515
|
+
e[16] !== d || e[17] !== t || e[18] !== S ? (s = () => {
|
|
516
|
+
S === void 0 && b.setWidget(t, {
|
|
517
|
+
isStacked: d
|
|
516
518
|
});
|
|
517
|
-
},
|
|
518
|
-
let
|
|
519
|
-
e[21] !== t || e[22] !==
|
|
520
|
-
|
|
521
|
-
isStacked: !
|
|
519
|
+
}, w = [d, t, S], e[16] = d, e[17] = t, e[18] = S, e[19] = s, e[20] = w) : (s = e[19], w = e[20]), H(s, w);
|
|
520
|
+
let C;
|
|
521
|
+
e[21] !== t || e[22] !== g ? (C = () => {
|
|
522
|
+
b.setWidget(t, {
|
|
523
|
+
isStacked: !g
|
|
522
524
|
});
|
|
523
|
-
}, e[21] = t, e[22] =
|
|
524
|
-
const
|
|
525
|
-
if (!
|
|
525
|
+
}, e[21] = t, e[22] = g, e[23] = C) : C = e[23];
|
|
526
|
+
const P = C, D = g ? u?.unstacked ?? "Disable stacking" : u?.stacked ?? "Enable stacking";
|
|
527
|
+
if (!i)
|
|
526
528
|
return null;
|
|
527
|
-
const
|
|
528
|
-
let
|
|
529
|
-
e[24] !==
|
|
530
|
-
let
|
|
531
|
-
e[26] !==
|
|
532
|
-
let
|
|
533
|
-
return e[32] !==
|
|
529
|
+
const O = u?.ariaLabel ?? D;
|
|
530
|
+
let T;
|
|
531
|
+
e[24] !== c ? (T = c ?? /* @__PURE__ */ x(_t, {}), e[24] = c, e[25] = T) : T = e[25];
|
|
532
|
+
let R;
|
|
533
|
+
e[26] !== p || e[27] !== P || e[28] !== g || e[29] !== O || e[30] !== T ? (R = /* @__PURE__ */ x(Q, { size: "small", "aria-label": O, onClick: P, sx: se.trigger, "data-active": g, ...p, children: T }), e[26] = p, e[27] = P, e[28] = g, e[29] = O, e[30] = T, e[31] = R) : R = e[31];
|
|
534
|
+
let L;
|
|
535
|
+
return e[32] !== R || e[33] !== D ? (L = /* @__PURE__ */ x(re, { title: D, children: R }), e[32] = R, e[33] = D, e[34] = L) : L = e[34], L;
|
|
534
536
|
}
|
|
535
|
-
function
|
|
537
|
+
function Tt(n) {
|
|
536
538
|
const e = n, t = e.option;
|
|
537
539
|
if (!t)
|
|
538
540
|
return n;
|
|
539
|
-
const
|
|
541
|
+
const u = (Array.isArray(t.series) ? t.series : [t.series]).map(Et);
|
|
540
542
|
return {
|
|
541
543
|
...e,
|
|
542
544
|
option: {
|
|
543
545
|
...t,
|
|
544
|
-
series:
|
|
546
|
+
series: u
|
|
545
547
|
}
|
|
546
548
|
};
|
|
547
549
|
}
|
|
548
|
-
function
|
|
550
|
+
function Et(n) {
|
|
549
551
|
const e = n?.stack;
|
|
550
552
|
return {
|
|
551
553
|
...n,
|
|
552
|
-
...
|
|
554
|
+
...tt(typeof e == "string" ? e : nt)
|
|
553
555
|
};
|
|
554
556
|
}
|
|
555
|
-
function
|
|
557
|
+
function Ct(n) {
|
|
556
558
|
return n?.stack;
|
|
557
559
|
}
|
|
558
|
-
function
|
|
560
|
+
function Lt(n) {
|
|
559
561
|
return {
|
|
560
562
|
storeIsStacked: n?.isStacked,
|
|
561
563
|
option: n?.option
|
|
562
564
|
};
|
|
563
565
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
566
|
-
const e =
|
|
566
|
+
const ae = "lock-selection";
|
|
567
|
+
function In(n) {
|
|
568
|
+
const e = J(24), {
|
|
567
569
|
id: t,
|
|
568
|
-
selectedItems:
|
|
569
|
-
order:
|
|
570
|
-
labels:
|
|
571
|
-
Icon:
|
|
572
|
-
IconButtonProps:
|
|
573
|
-
} = n,
|
|
570
|
+
selectedItems: l,
|
|
571
|
+
order: u,
|
|
572
|
+
labels: c,
|
|
573
|
+
Icon: p,
|
|
574
|
+
IconButtonProps: E
|
|
575
|
+
} = n, S = u === void 0 ? 30 : u, {
|
|
574
576
|
storeIsLocked: o
|
|
575
|
-
} =
|
|
576
|
-
let
|
|
577
|
-
e[0] !== t || e[1] !==
|
|
578
|
-
id:
|
|
579
|
-
order:
|
|
577
|
+
} = te(t, kt), r = o ?? !1;
|
|
578
|
+
let i, a;
|
|
579
|
+
e[0] !== t || e[1] !== S ? (i = () => (b.registerTool(t, {
|
|
580
|
+
id: ae,
|
|
581
|
+
order: S,
|
|
580
582
|
enabled: !1,
|
|
581
|
-
fn: (
|
|
582
|
-
const
|
|
583
|
-
return
|
|
583
|
+
fn: (P) => {
|
|
584
|
+
const O = b.getWidget(t)?.lockedItems ?? [];
|
|
585
|
+
return O.length === 0 ? P : wt(P, O);
|
|
584
586
|
}
|
|
585
|
-
}), () =>
|
|
586
|
-
let
|
|
587
|
-
e[4] !== t || e[5] !==
|
|
588
|
-
if (
|
|
589
|
-
|
|
587
|
+
}), () => b.unregisterTool(t, ae)), a = [t, S], e[0] = t, e[1] = S, e[2] = i, e[3] = a) : (i = e[2], a = e[3]), H(i, a);
|
|
588
|
+
let d, g;
|
|
589
|
+
e[4] !== t || e[5] !== r || e[6] !== l.length ? (d = () => {
|
|
590
|
+
if (r && l.length === 0) {
|
|
591
|
+
b.setWidget(t, {
|
|
590
592
|
isLocked: !1,
|
|
591
593
|
lockedItems: []
|
|
592
594
|
});
|
|
593
595
|
return;
|
|
594
596
|
}
|
|
595
|
-
|
|
596
|
-
},
|
|
597
|
-
let
|
|
598
|
-
e[9] !== t || e[10] !==
|
|
599
|
-
|
|
597
|
+
b.setToolEnabled(t, ae, r);
|
|
598
|
+
}, g = [t, r, l.length], e[4] = t, e[5] = r, e[6] = l.length, e[7] = d, e[8] = g) : (d = e[7], g = e[8]), H(d, g);
|
|
599
|
+
let f;
|
|
600
|
+
e[9] !== t || e[10] !== r || e[11] !== l ? (f = () => {
|
|
601
|
+
r ? b.setWidget(t, {
|
|
600
602
|
isLocked: !1,
|
|
601
603
|
lockedItems: []
|
|
602
|
-
}) :
|
|
604
|
+
}) : b.setWidget(t, {
|
|
603
605
|
isLocked: !0,
|
|
604
|
-
lockedItems:
|
|
606
|
+
lockedItems: l
|
|
605
607
|
});
|
|
606
|
-
}, e[9] = t, e[10] =
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
608
|
+
}, e[9] = t, e[10] = r, e[11] = l, e[12] = f) : f = e[12];
|
|
609
|
+
const h = f;
|
|
610
|
+
if (l.length === 0)
|
|
609
611
|
return null;
|
|
610
|
-
const
|
|
611
|
-
let
|
|
612
|
-
e[13] !==
|
|
612
|
+
const m = r ? c?.unlock ?? "Unlock selection" : c?.lock ?? "Lock selection", y = c?.ariaLabel ?? m;
|
|
613
|
+
let s;
|
|
614
|
+
e[13] !== p ? (s = p ?? /* @__PURE__ */ x(qe, { fontSize: "small" }), e[13] = p, e[14] = s) : s = e[14];
|
|
615
|
+
let w;
|
|
616
|
+
e[15] !== E || e[16] !== y || e[17] !== h || e[18] !== r || e[19] !== s ? (w = /* @__PURE__ */ x(Q, { size: "small", "aria-label": y, onClick: h, sx: se.trigger, "data-active": r, ...E, children: s }), e[15] = E, e[16] = y, e[17] = h, e[18] = r, e[19] = s, e[20] = w) : w = e[20];
|
|
613
617
|
let C;
|
|
614
|
-
|
|
615
|
-
let k;
|
|
616
|
-
return e[21] !== C || e[22] !== d ? (k = /* @__PURE__ */ b(ee, { title: d, children: C }), e[21] = C, e[22] = d, e[23] = k) : k = e[23], k;
|
|
618
|
+
return e[21] !== w || e[22] !== m ? (C = /* @__PURE__ */ x(re, { title: m, children: w }), e[21] = w, e[22] = m, e[23] = C) : C = e[23], C;
|
|
617
619
|
}
|
|
618
|
-
function
|
|
620
|
+
function kt(n) {
|
|
619
621
|
return {
|
|
620
622
|
storeIsLocked: n?.isLocked
|
|
621
623
|
};
|
|
622
624
|
}
|
|
623
|
-
function
|
|
624
|
-
return n.map((t) => t.filter((
|
|
625
|
-
const
|
|
626
|
-
return typeof
|
|
625
|
+
function wt(n, e) {
|
|
626
|
+
return n.map((t) => t.filter((l) => {
|
|
627
|
+
const u = l.name;
|
|
628
|
+
return typeof u == "string" && e.includes(u);
|
|
627
629
|
}));
|
|
628
630
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
const e =
|
|
631
|
+
const he = "searcher", Pt = 300;
|
|
632
|
+
function _n(n) {
|
|
633
|
+
const e = J(39), {
|
|
632
634
|
id: t,
|
|
633
|
-
filterFn:
|
|
634
|
-
order:
|
|
635
|
-
labels:
|
|
636
|
-
TextFieldProps:
|
|
637
|
-
ClearIcon:
|
|
638
|
-
debounceDelay:
|
|
639
|
-
} = n, o =
|
|
640
|
-
enabled:
|
|
641
|
-
searchText:
|
|
642
|
-
} =
|
|
643
|
-
let
|
|
644
|
-
e[0] !== t ? (
|
|
645
|
-
|
|
646
|
-
searchText:
|
|
635
|
+
filterFn: l,
|
|
636
|
+
order: u,
|
|
637
|
+
labels: c,
|
|
638
|
+
TextFieldProps: p,
|
|
639
|
+
ClearIcon: E,
|
|
640
|
+
debounceDelay: S
|
|
641
|
+
} = n, o = u === void 0 ? 20 : u, r = S === void 0 ? Pt : S, i = le(null), a = le(null), {
|
|
642
|
+
enabled: d,
|
|
643
|
+
searchText: g
|
|
644
|
+
} = te(t, Rt), f = le(d), h = l ?? Dt;
|
|
645
|
+
let m;
|
|
646
|
+
e[0] !== t ? (m = (U) => {
|
|
647
|
+
b.setWidget(t, {
|
|
648
|
+
searchText: U
|
|
647
649
|
});
|
|
648
|
-
}, e[0] = t, e[1] =
|
|
649
|
-
const
|
|
650
|
-
let
|
|
651
|
-
e[2] !==
|
|
652
|
-
id:
|
|
650
|
+
}, e[0] = t, e[1] = m) : m = e[1];
|
|
651
|
+
const y = m;
|
|
652
|
+
let s, w;
|
|
653
|
+
e[2] !== h || e[3] !== t || e[4] !== o ? (s = () => (b.registerTool(t, {
|
|
654
|
+
id: he,
|
|
653
655
|
order: o,
|
|
654
656
|
enabled: !1,
|
|
655
|
-
fn: async (
|
|
656
|
-
const
|
|
657
|
-
return
|
|
657
|
+
fn: async (U) => {
|
|
658
|
+
const F = b.getWidget(t)?.searchText ?? "";
|
|
659
|
+
return h(U, F);
|
|
658
660
|
},
|
|
659
|
-
disables: [
|
|
660
|
-
}), () =>
|
|
661
|
-
let
|
|
662
|
-
e[7] !==
|
|
663
|
-
|
|
664
|
-
},
|
|
665
|
-
let
|
|
666
|
-
e[11] !==
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
},
|
|
670
|
-
}, e[11] =
|
|
671
|
-
const
|
|
672
|
-
let
|
|
673
|
-
e[14] !==
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
let
|
|
677
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
678
|
-
|
|
679
|
-
},
|
|
680
|
-
let
|
|
681
|
-
e[19] !==
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
}, e[19] =
|
|
685
|
-
const I =
|
|
686
|
-
let
|
|
687
|
-
e[22] !== t || e[23] !==
|
|
688
|
-
|
|
689
|
-
}, e[22] = t, e[23] =
|
|
690
|
-
const
|
|
691
|
-
if (!
|
|
661
|
+
disables: [ae]
|
|
662
|
+
}), () => b.unregisterTool(t, he)), w = [t, o, h], e[2] = h, e[3] = t, e[4] = o, e[5] = s, e[6] = w) : (s = e[5], w = e[6]), H(s, w);
|
|
663
|
+
let C, P;
|
|
664
|
+
e[7] !== d || e[8] !== t ? (C = () => {
|
|
665
|
+
b.setToolEnabled(t, he, d);
|
|
666
|
+
}, P = [t, d], e[7] = d, e[8] = t, e[9] = C, e[10] = P) : (C = e[9], P = e[10]), H(C, P);
|
|
667
|
+
let D;
|
|
668
|
+
e[11] !== r || e[12] !== t ? (D = () => {
|
|
669
|
+
a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
670
|
+
b.triggerToolPipeline(t);
|
|
671
|
+
}, r);
|
|
672
|
+
}, e[11] = r, e[12] = t, e[13] = D) : D = e[13];
|
|
673
|
+
const O = D;
|
|
674
|
+
let T, R;
|
|
675
|
+
e[14] !== d ? (R = () => {
|
|
676
|
+
d && !f.current && i.current && i.current.focus(), f.current = d;
|
|
677
|
+
}, T = [d], e[14] = d, e[15] = T, e[16] = R) : (T = e[15], R = e[16]), H(R, T);
|
|
678
|
+
let L, v;
|
|
679
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => () => {
|
|
680
|
+
a.current && clearTimeout(a.current);
|
|
681
|
+
}, v = [], e[17] = L, e[18] = v) : (L = e[17], v = e[18]), H(L, v);
|
|
682
|
+
let _;
|
|
683
|
+
e[19] !== O || e[20] !== y ? (_ = (U) => {
|
|
684
|
+
const k = U.target.value;
|
|
685
|
+
y(k), O();
|
|
686
|
+
}, e[19] = O, e[20] = y, e[21] = _) : _ = e[21];
|
|
687
|
+
const I = _;
|
|
688
|
+
let z;
|
|
689
|
+
e[22] !== t || e[23] !== y ? (z = () => {
|
|
690
|
+
y(""), b.triggerToolPipeline(t), i.current && i.current.focus();
|
|
691
|
+
}, e[22] = t, e[23] = y, e[24] = z) : z = e[24];
|
|
692
|
+
const B = z;
|
|
693
|
+
if (!d)
|
|
692
694
|
return null;
|
|
693
|
-
const
|
|
694
|
-
let
|
|
695
|
-
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
695
|
+
const M = c?.placeholder ?? "Search...", W = c?.clearAriaLabel ?? "Clear search";
|
|
696
|
+
let j;
|
|
697
|
+
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ x(pe, { position: "start", children: /* @__PURE__ */ x(Re, {}) }), e[25] = j) : j = e[25];
|
|
696
698
|
let Z;
|
|
697
|
-
e[26] !==
|
|
698
|
-
let
|
|
699
|
-
e[31] !== Z ? (
|
|
700
|
-
startAdornment:
|
|
699
|
+
e[26] !== E || e[27] !== W || e[28] !== B || e[29] !== g ? (Z = g ? /* @__PURE__ */ x(pe, { position: "end", children: /* @__PURE__ */ x(Q, { size: "small", "aria-label": W, onClick: B, edge: "end", children: E ?? /* @__PURE__ */ x(Je, { fontSize: "small" }) }) }) : null, e[26] = E, e[27] = W, e[28] = B, e[29] = g, e[30] = Z) : Z = e[30];
|
|
700
|
+
let $;
|
|
701
|
+
e[31] !== Z ? ($ = {
|
|
702
|
+
startAdornment: j,
|
|
701
703
|
endAdornment: Z
|
|
702
|
-
}, e[31] = Z, e[32] =
|
|
704
|
+
}, e[31] = Z, e[32] = $) : $ = e[32];
|
|
703
705
|
let G;
|
|
704
|
-
return e[33] !==
|
|
706
|
+
return e[33] !== p || e[34] !== I || e[35] !== M || e[36] !== g || e[37] !== $ ? (G = /* @__PURE__ */ x(Ge, { inputRef: i, size: "small", fullWidth: !0, variant: "filled", placeholder: M, value: g, onChange: I, InputProps: $, ...p }), e[33] = p, e[34] = I, e[35] = M, e[36] = g, e[37] = $, e[38] = G) : G = e[38], G;
|
|
705
707
|
}
|
|
706
|
-
function
|
|
708
|
+
function Rt(n) {
|
|
707
709
|
return {
|
|
708
710
|
enabled: n?.isSearchEnabled ?? !1,
|
|
709
711
|
searchText: n?.searchText ?? ""
|
|
710
712
|
};
|
|
711
713
|
}
|
|
712
|
-
const
|
|
714
|
+
const Dt = (n, e) => {
|
|
713
715
|
if (!e.trim()) return Promise.resolve(n);
|
|
714
716
|
const t = e.toLowerCase();
|
|
715
|
-
return Promise.resolve(n.map((
|
|
717
|
+
return Promise.resolve(n.map((l) => l.filter((u) => Object.values(u).some((c) => String(c).toLowerCase().includes(t)))));
|
|
716
718
|
};
|
|
717
|
-
function
|
|
718
|
-
const e =
|
|
719
|
+
function Tn(n) {
|
|
720
|
+
const e = J(18), {
|
|
719
721
|
id: t,
|
|
720
|
-
defaultEnabled:
|
|
721
|
-
labels:
|
|
722
|
-
Icon:
|
|
723
|
-
IconButtonProps:
|
|
724
|
-
} = n,
|
|
725
|
-
storeIsEnabled:
|
|
726
|
-
} =
|
|
727
|
-
let
|
|
728
|
-
e[0] !==
|
|
729
|
-
|
|
730
|
-
isSearchEnabled:
|
|
722
|
+
defaultEnabled: l,
|
|
723
|
+
labels: u,
|
|
724
|
+
Icon: c,
|
|
725
|
+
IconButtonProps: p
|
|
726
|
+
} = n, E = l === void 0 ? !1 : l, {
|
|
727
|
+
storeIsEnabled: S
|
|
728
|
+
} = te(t, zt), o = S ?? E;
|
|
729
|
+
let r, i;
|
|
730
|
+
e[0] !== E || e[1] !== t ? (r = () => {
|
|
731
|
+
b.getWidget(t)?.isSearchEnabled === void 0 && b.setWidget(t, {
|
|
732
|
+
isSearchEnabled: E
|
|
731
733
|
});
|
|
732
|
-
},
|
|
733
|
-
let
|
|
734
|
-
e[4] !== t || e[5] !== o ? (
|
|
735
|
-
|
|
734
|
+
}, i = [E, t], e[0] = E, e[1] = t, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), H(r, i);
|
|
735
|
+
let a;
|
|
736
|
+
e[4] !== t || e[5] !== o ? (a = () => {
|
|
737
|
+
b.setWidget(t, {
|
|
736
738
|
isSearchEnabled: !o
|
|
737
739
|
});
|
|
738
|
-
}, e[4] = t, e[5] = o, e[6] =
|
|
739
|
-
const
|
|
740
|
-
let
|
|
741
|
-
e[7] !==
|
|
742
|
-
let
|
|
743
|
-
e[9] !==
|
|
744
|
-
let
|
|
745
|
-
return e[15] !==
|
|
740
|
+
}, e[4] = t, e[5] = o, e[6] = a) : a = e[6];
|
|
741
|
+
const d = a, g = o ? u?.disable ?? "Disable search" : u?.enable ?? "Enable search", f = u?.ariaLabel ?? g;
|
|
742
|
+
let h;
|
|
743
|
+
e[7] !== c ? (h = c ?? /* @__PURE__ */ x(Re, { fontSize: "small" }), e[7] = c, e[8] = h) : h = e[8];
|
|
744
|
+
let m;
|
|
745
|
+
e[9] !== p || e[10] !== f || e[11] !== d || e[12] !== o || e[13] !== h ? (m = /* @__PURE__ */ x(Q, { size: "small", "aria-label": f, onClick: d, sx: se.trigger, "data-active": o, ...p, children: h }), e[9] = p, e[10] = f, e[11] = d, e[12] = o, e[13] = h, e[14] = m) : m = e[14];
|
|
746
|
+
let y;
|
|
747
|
+
return e[15] !== m || e[16] !== g ? (y = /* @__PURE__ */ x(re, { title: g, children: m }), e[15] = m, e[16] = g, e[17] = y) : y = e[17], y;
|
|
746
748
|
}
|
|
747
|
-
function
|
|
749
|
+
function zt(n) {
|
|
748
750
|
return {
|
|
749
751
|
storeIsEnabled: n?.isSearchEnabled
|
|
750
752
|
};
|
|
751
753
|
}
|
|
752
754
|
const Ot = () => {
|
|
753
|
-
const n =
|
|
755
|
+
const n = J(1);
|
|
754
756
|
let e;
|
|
755
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
757
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ x("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ x("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
|
|
756
758
|
};
|
|
757
|
-
function
|
|
758
|
-
const e =
|
|
759
|
+
function Mt(n) {
|
|
760
|
+
const e = J(18), {
|
|
759
761
|
column: t
|
|
760
762
|
} = n;
|
|
761
|
-
let
|
|
762
|
-
e[0] !== t.id ? (
|
|
763
|
+
let l;
|
|
764
|
+
e[0] !== t.id ? (l = {
|
|
763
765
|
id: t.id
|
|
764
|
-
}, e[0] = t.id, e[1] =
|
|
766
|
+
}, e[0] = t.id, e[1] = l) : l = e[1];
|
|
765
767
|
const {
|
|
766
|
-
attributes:
|
|
767
|
-
listeners:
|
|
768
|
-
setNodeRef:
|
|
769
|
-
transform:
|
|
770
|
-
transition:
|
|
768
|
+
attributes: u,
|
|
769
|
+
listeners: c,
|
|
770
|
+
setNodeRef: p,
|
|
771
|
+
transform: E,
|
|
772
|
+
transition: S,
|
|
771
773
|
isDragging: o
|
|
772
|
-
} =
|
|
773
|
-
let
|
|
774
|
-
e[2] !==
|
|
775
|
-
...
|
|
774
|
+
} = ct(l);
|
|
775
|
+
let r;
|
|
776
|
+
e[2] !== E ? (r = mt.Transform.toString(E ? {
|
|
777
|
+
...E,
|
|
776
778
|
x: 0
|
|
777
|
-
} : null), e[2] =
|
|
778
|
-
const
|
|
779
|
-
let
|
|
780
|
-
e[4] !==
|
|
781
|
-
transform:
|
|
782
|
-
transition:
|
|
783
|
-
opacity:
|
|
784
|
-
cursor:
|
|
785
|
-
}, e[4] =
|
|
786
|
-
const
|
|
787
|
-
let
|
|
788
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
779
|
+
} : null), e[2] = E, e[3] = r) : r = e[3];
|
|
780
|
+
const i = o ? 0.5 : 1, a = o ? "grabbing" : "grab";
|
|
781
|
+
let d;
|
|
782
|
+
e[4] !== r || e[5] !== i || e[6] !== a || e[7] !== S ? (d = {
|
|
783
|
+
transform: r,
|
|
784
|
+
transition: S,
|
|
785
|
+
opacity: i,
|
|
786
|
+
cursor: a
|
|
787
|
+
}, e[4] = r, e[5] = i, e[6] = a, e[7] = S, e[8] = d) : d = e[8];
|
|
788
|
+
const g = d;
|
|
789
|
+
let f;
|
|
790
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
789
791
|
"&:focus-visible": {
|
|
790
|
-
outline:
|
|
792
|
+
outline: At,
|
|
791
793
|
outlineOffset: -2
|
|
792
794
|
}
|
|
793
|
-
}, e[9] =
|
|
794
|
-
let
|
|
795
|
-
e[10] !== t.label ? (
|
|
796
|
-
let
|
|
797
|
-
return e[12] !==
|
|
795
|
+
}, e[9] = f) : f = e[9];
|
|
796
|
+
let h;
|
|
797
|
+
e[10] !== t.label ? (h = /* @__PURE__ */ x(ke, { children: t.label }), e[10] = t.label, e[11] = h) : h = e[11];
|
|
798
|
+
let m;
|
|
799
|
+
return e[12] !== u || e[13] !== c || e[14] !== p || e[15] !== g || e[16] !== h ? (m = /* @__PURE__ */ x(Le, { ref: p, style: g, ...u, ...c, role: "menuitem", tabIndex: 0, sx: f, children: h }), e[12] = u, e[13] = c, e[14] = p, e[15] = g, e[16] = h, e[17] = m) : m = e[17], m;
|
|
798
800
|
}
|
|
799
|
-
function
|
|
801
|
+
function At(n) {
|
|
800
802
|
return `2px solid ${n.palette.primary.main}`;
|
|
801
803
|
}
|
|
802
|
-
const
|
|
803
|
-
function
|
|
804
|
-
const e =
|
|
804
|
+
const _e = "change-column";
|
|
805
|
+
function En(n) {
|
|
806
|
+
const e = J(46), {
|
|
805
807
|
id: t,
|
|
806
|
-
labels:
|
|
807
|
-
Icon:
|
|
808
|
-
IconButtonProps:
|
|
809
|
-
MenuProps:
|
|
810
|
-
} = n, [
|
|
808
|
+
labels: l,
|
|
809
|
+
Icon: u,
|
|
810
|
+
IconButtonProps: c,
|
|
811
|
+
MenuProps: p
|
|
812
|
+
} = n, [E, S] = ie(null), {
|
|
811
813
|
columns: o
|
|
812
|
-
} =
|
|
813
|
-
let
|
|
814
|
-
e[0] !== t ? (
|
|
815
|
-
const
|
|
816
|
-
if (!
|
|
817
|
-
return
|
|
818
|
-
const
|
|
819
|
-
if (!
|
|
820
|
-
return
|
|
821
|
-
const
|
|
822
|
-
for (const q of
|
|
823
|
-
const
|
|
824
|
-
|
|
814
|
+
} = te(t, $t);
|
|
815
|
+
let r;
|
|
816
|
+
e[0] !== t ? (r = (k) => {
|
|
817
|
+
const A = b.getWidget(t)?.columns;
|
|
818
|
+
if (!A || A.length === 0)
|
|
819
|
+
return k;
|
|
820
|
+
const N = k, V = N.columns;
|
|
821
|
+
if (!V || V.length === 0 || V.length === A.length && V.every((q, ee) => q.id === A[ee]?.id))
|
|
822
|
+
return k;
|
|
823
|
+
const K = new Map(V.map(Ft)), Y = [];
|
|
824
|
+
for (const q of A) {
|
|
825
|
+
const ee = K.get(q.id);
|
|
826
|
+
ee && (Y.push(ee), K.delete(q.id));
|
|
825
827
|
}
|
|
826
|
-
for (const q of
|
|
827
|
-
|
|
828
|
-
const
|
|
828
|
+
for (const q of K.values())
|
|
829
|
+
Y.push(q);
|
|
830
|
+
const ne = Y.length === A.length && Y.every((q, ee) => q.id === A[ee]?.id);
|
|
829
831
|
return {
|
|
830
|
-
...
|
|
831
|
-
columns:
|
|
832
|
+
...N,
|
|
833
|
+
columns: ne ? A : Y
|
|
832
834
|
};
|
|
833
|
-
}, e[0] = t, e[1] =
|
|
834
|
-
const
|
|
835
|
-
let
|
|
836
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
837
|
-
coordinateGetter:
|
|
838
|
-
}, e[2] =
|
|
839
|
-
const
|
|
840
|
-
let
|
|
841
|
-
e[3] !== o ? (
|
|
842
|
-
const
|
|
843
|
-
let
|
|
844
|
-
e[5] !== t || e[6] !==
|
|
845
|
-
id:
|
|
835
|
+
}, e[0] = t, e[1] = r) : r = e[1];
|
|
836
|
+
const i = r;
|
|
837
|
+
let a;
|
|
838
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = {
|
|
839
|
+
coordinateGetter: at
|
|
840
|
+
}, e[2] = a) : a = e[2];
|
|
841
|
+
const d = ot(xe(lt), xe(rt, a));
|
|
842
|
+
let g;
|
|
843
|
+
e[3] !== o ? (g = o?.map(Wt) ?? [], e[3] = o, e[4] = g) : g = e[4];
|
|
844
|
+
const f = g;
|
|
845
|
+
let h, m;
|
|
846
|
+
e[5] !== t || e[6] !== i ? (h = () => (b.registerTool(t, {
|
|
847
|
+
id: _e,
|
|
846
848
|
type: "config",
|
|
847
849
|
order: 100,
|
|
848
850
|
enabled: !0,
|
|
849
|
-
fn:
|
|
850
|
-
}), () =>
|
|
851
|
-
let
|
|
852
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
853
|
-
|
|
854
|
-
}, e[9] =
|
|
855
|
-
const
|
|
856
|
-
let
|
|
857
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
858
|
-
|
|
859
|
-
}, e[10] =
|
|
860
|
-
const
|
|
861
|
-
let
|
|
862
|
-
e[11] !== o || e[12] !== t ? (
|
|
851
|
+
fn: i
|
|
852
|
+
}), () => b.unregisterTool(t, _e)), m = [t, i], e[5] = t, e[6] = i, e[7] = h, e[8] = m) : (h = e[7], m = e[8]), H(h, m);
|
|
853
|
+
let y;
|
|
854
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = (k) => {
|
|
855
|
+
k.stopPropagation(), S(k.currentTarget);
|
|
856
|
+
}, e[9] = y) : y = e[9];
|
|
857
|
+
const s = y;
|
|
858
|
+
let w;
|
|
859
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
860
|
+
S(null);
|
|
861
|
+
}, e[10] = w) : w = e[10];
|
|
862
|
+
const C = w;
|
|
863
|
+
let P;
|
|
864
|
+
e[11] !== o || e[12] !== t ? (P = (k) => {
|
|
863
865
|
const {
|
|
864
|
-
active:
|
|
865
|
-
over:
|
|
866
|
-
} =
|
|
867
|
-
if (!
|
|
866
|
+
active: F,
|
|
867
|
+
over: A
|
|
868
|
+
} = k;
|
|
869
|
+
if (!A || F.id === A.id || !o)
|
|
868
870
|
return;
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
columns:
|
|
871
|
+
const N = o.findIndex((X) => X.id === F.id), V = o.findIndex((X) => X.id === A.id);
|
|
872
|
+
if (N !== -1 && V !== -1) {
|
|
873
|
+
const X = dt(o, N, V);
|
|
874
|
+
b.setWidget(t, {
|
|
875
|
+
columns: X
|
|
874
876
|
});
|
|
875
877
|
}
|
|
876
|
-
}, e[11] = o, e[12] = t, e[13] =
|
|
877
|
-
const
|
|
878
|
+
}, e[11] = o, e[12] = t, e[13] = P) : P = e[13];
|
|
879
|
+
const D = P;
|
|
878
880
|
if (!o || o.length < 2)
|
|
879
881
|
return null;
|
|
880
|
-
const
|
|
881
|
-
let
|
|
882
|
-
e[14] !==
|
|
882
|
+
const O = l?.tooltip ?? "Change column", T = !!E, R = l?.ariaLabel ?? O, L = T ? "change-column-menu" : void 0, v = T ? "true" : void 0;
|
|
883
|
+
let _;
|
|
884
|
+
e[14] !== u ? (_ = u ?? /* @__PURE__ */ x(Ze, { children: /* @__PURE__ */ x(Ot, {}) }), e[14] = u, e[15] = _) : _ = e[15];
|
|
883
885
|
let I;
|
|
884
|
-
e[16] !==
|
|
885
|
-
let
|
|
886
|
-
e[23] !== I || e[24] !==
|
|
887
|
-
let
|
|
888
|
-
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
886
|
+
e[16] !== c || e[17] !== T || e[18] !== L || e[19] !== v || e[20] !== _ || e[21] !== R ? (I = /* @__PURE__ */ x(Q, { size: "small", "aria-label": R, "aria-controls": L, "aria-haspopup": "true", "aria-expanded": v, onClick: s, "data-active": T, sx: se.trigger, ...c, children: _ }), e[16] = c, e[17] = T, e[18] = L, e[19] = v, e[20] = _, e[21] = R, e[22] = I) : I = e[22];
|
|
887
|
+
let z;
|
|
888
|
+
e[23] !== I || e[24] !== O ? (z = /* @__PURE__ */ x(re, { title: O, children: I }), e[23] = I, e[24] = O, e[25] = z) : z = e[25];
|
|
889
|
+
let B, M, W;
|
|
890
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = {
|
|
889
891
|
vertical: "bottom",
|
|
890
892
|
horizontal: "right"
|
|
891
|
-
},
|
|
893
|
+
}, M = {
|
|
892
894
|
vertical: "top",
|
|
893
895
|
horizontal: "right"
|
|
894
|
-
},
|
|
896
|
+
}, W = {
|
|
895
897
|
paper: {
|
|
896
898
|
sx: {
|
|
897
899
|
overflow: "hidden"
|
|
898
900
|
}
|
|
899
901
|
}
|
|
900
|
-
}, e[26] =
|
|
901
|
-
let
|
|
902
|
-
e[29] !== o ? (
|
|
902
|
+
}, e[26] = B, e[27] = M, e[28] = W) : (B = e[26], M = e[27], W = e[28]);
|
|
903
|
+
let j;
|
|
904
|
+
e[29] !== o ? (j = o.map(Bt), e[29] = o, e[30] = j) : j = e[30];
|
|
903
905
|
let Z;
|
|
904
|
-
e[31] !==
|
|
905
|
-
let
|
|
906
|
-
e[34] !==
|
|
906
|
+
e[31] !== f || e[32] !== j ? (Z = /* @__PURE__ */ x(ut, { items: f, strategy: ft, children: j }), e[31] = f, e[32] = j, e[33] = Z) : Z = e[33];
|
|
907
|
+
let $;
|
|
908
|
+
e[34] !== p || e[35] !== E || e[36] !== T || e[37] !== Z ? ($ = /* @__PURE__ */ x(we, { id: "change-column-menu", anchorEl: E, open: T, onClose: C, anchorOrigin: B, transformOrigin: M, slotProps: W, ...p, children: Z }), e[34] = p, e[35] = E, e[36] = T, e[37] = Z, e[38] = $) : $ = e[38];
|
|
907
909
|
let G;
|
|
908
|
-
e[39] !==
|
|
909
|
-
let
|
|
910
|
-
return e[43] !==
|
|
911
|
-
|
|
910
|
+
e[39] !== D || e[40] !== d || e[41] !== $ ? (G = /* @__PURE__ */ x(it, { sensors: d, collisionDetection: st, onDragEnd: D, children: $ }), e[39] = D, e[40] = d, e[41] = $, e[42] = G) : G = e[42];
|
|
911
|
+
let U;
|
|
912
|
+
return e[43] !== z || e[44] !== G ? (U = /* @__PURE__ */ oe(de, { children: [
|
|
913
|
+
z,
|
|
912
914
|
G
|
|
913
|
-
] }), e[43] =
|
|
915
|
+
] }), e[43] = z, e[44] = G, e[45] = U) : U = e[45], U;
|
|
914
916
|
}
|
|
915
|
-
function
|
|
916
|
-
return /* @__PURE__ */
|
|
917
|
+
function Bt(n) {
|
|
918
|
+
return /* @__PURE__ */ x(Mt, { column: n }, n.id);
|
|
917
919
|
}
|
|
918
|
-
function
|
|
920
|
+
function Wt(n) {
|
|
919
921
|
return n.id;
|
|
920
922
|
}
|
|
921
|
-
function
|
|
923
|
+
function Ft(n) {
|
|
922
924
|
return [n.id, n];
|
|
923
925
|
}
|
|
924
|
-
function
|
|
926
|
+
function $t(n) {
|
|
925
927
|
return {
|
|
926
928
|
columns: n?.columns
|
|
927
929
|
};
|
|
928
930
|
}
|
|
929
|
-
const
|
|
931
|
+
const Te = {
|
|
930
932
|
container: {
|
|
931
933
|
display: "flex",
|
|
932
934
|
alignItems: "center",
|
|
@@ -939,145 +941,356 @@ const _e = {
|
|
|
939
941
|
background: (n) => n.palette.primary.relatedLight
|
|
940
942
|
}
|
|
941
943
|
}
|
|
942
|
-
},
|
|
943
|
-
|
|
944
|
-
|
|
944
|
+
}, Ee = {
|
|
945
|
+
// `top` and `height` are filled in at render time from the chart's plot
|
|
946
|
+
// rect so rectangles don't bleed over the legend / axis labels.
|
|
947
|
+
//
|
|
948
|
+
// Colors track ECharts 6's `backgroundTint` token (used by the default
|
|
949
|
+
// brush) — a barely-visible pale blue-gray translucent fill that washes
|
|
950
|
+
// bars underneath rather than masking them. Border is a hairline dark
|
|
951
|
+
// alpha so the selection edges are just findable, not prominent.
|
|
952
|
+
rect: {
|
|
953
|
+
position: "absolute",
|
|
954
|
+
background: "rgba(234, 237, 245, 0.2)",
|
|
955
|
+
border: "1px dashed rgba(0, 0, 0, 0.15)",
|
|
956
|
+
pointerEvents: "none"
|
|
957
|
+
},
|
|
958
|
+
// Live drag preview — identical to committed rect (no "in-progress" vs
|
|
959
|
+
// "committed" visual distinction; the preview just disappears on
|
|
960
|
+
// `pointerup` as the rect takes its place).
|
|
961
|
+
rectPreview: {
|
|
962
|
+
position: "absolute",
|
|
963
|
+
background: "rgba(234, 237, 245, 0.6)",
|
|
964
|
+
border: "1px dashed rgba(0, 0, 0, 0.15)",
|
|
965
|
+
pointerEvents: "none"
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
function Nt(n, e, t) {
|
|
969
|
+
if (t <= 0) return [];
|
|
970
|
+
const [l, u] = n <= e ? [n, e] : [e, n], c = Math.max(0, Math.floor(l)), p = Math.min(t - 1, Math.ceil(u));
|
|
971
|
+
if (c > p) return [];
|
|
972
|
+
const E = [];
|
|
973
|
+
for (let S = c; S <= p; S += 1) E.push(S);
|
|
974
|
+
return E;
|
|
975
|
+
}
|
|
976
|
+
function Gt(n, e) {
|
|
977
|
+
if (n.length === 0) return [];
|
|
978
|
+
const t = /* @__PURE__ */ new Set();
|
|
979
|
+
for (const l of n)
|
|
980
|
+
for (const u of Nt(l.xStart, l.xEnd, e))
|
|
981
|
+
t.add(u);
|
|
982
|
+
return Array.from(t).sort((l, u) => l - u);
|
|
983
|
+
}
|
|
984
|
+
const Zt = 2, Vt = Object.freeze([]), Ce = Object.freeze([]);
|
|
985
|
+
function Ht(n) {
|
|
986
|
+
try {
|
|
987
|
+
const l = n.getModel().getComponent("grid", 0)?.coordinateSystem?.getRect();
|
|
988
|
+
return !l || !Number.isFinite(l.x) || !Number.isFinite(l.y) || !Number.isFinite(l.width) || !Number.isFinite(l.height) ? null : {
|
|
989
|
+
x: l.x,
|
|
990
|
+
y: l.y,
|
|
991
|
+
width: l.width,
|
|
992
|
+
height: l.height
|
|
993
|
+
};
|
|
994
|
+
} catch {
|
|
995
|
+
return null;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
function jt(n, e) {
|
|
999
|
+
return n === e ? !0 : !n || !e ? !1 : n.x === e.x && n.y === e.y && n.width === e.width && n.height === e.height;
|
|
1000
|
+
}
|
|
1001
|
+
function Ut(n) {
|
|
1002
|
+
const e = J(50), {
|
|
945
1003
|
id: t,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
e[1] !== o || e[2] !== t || e[3] !== f ? (l = () => {
|
|
961
|
-
const h = !o;
|
|
962
|
-
g.setWidget(t, {
|
|
963
|
-
brush: h
|
|
964
|
-
}), h && f?.({
|
|
965
|
-
dataIndex: [],
|
|
966
|
-
seriesIndex: 0
|
|
967
|
-
});
|
|
968
|
-
}, e[1] = o, e[2] = t, e[3] = f, e[4] = l) : l = e[4];
|
|
969
|
-
const r = l;
|
|
970
|
-
let s, a;
|
|
971
|
-
e[5] !== o || e[6] !== t ? (s = () => {
|
|
1004
|
+
multiBrush: l
|
|
1005
|
+
} = n, {
|
|
1006
|
+
enabled: u,
|
|
1007
|
+
rects: c,
|
|
1008
|
+
dataLength: p
|
|
1009
|
+
} = te(t, qt), E = Yt;
|
|
1010
|
+
let S;
|
|
1011
|
+
e[0] !== t ? (S = () => b.getWidget(t)?.refUI?.current ?? null, e[0] = t, e[1] = S) : S = e[1];
|
|
1012
|
+
const o = Se(E, S, Kt);
|
|
1013
|
+
let r;
|
|
1014
|
+
e[2] !== t ? (r = () => b.getWidget(t)?.instance?.current ?? null, e[2] = t, e[3] = r) : r = e[3];
|
|
1015
|
+
const i = Se(E, r, Xt), a = le(null), d = le(null), g = le(null), [f, h] = ie(Ce), [m, y] = ie(null), [s, w] = ie(null);
|
|
1016
|
+
let C, P;
|
|
1017
|
+
e[4] !== o || e[5] !== t ? (C = () => {
|
|
972
1018
|
if (!o)
|
|
973
1019
|
return;
|
|
974
|
-
const
|
|
975
|
-
if (!
|
|
1020
|
+
const k = document.getElementById(t);
|
|
1021
|
+
if (!k)
|
|
976
1022
|
return;
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
type: "takeGlobalCursor",
|
|
981
|
-
key: "brush",
|
|
982
|
-
brushOption: {
|
|
983
|
-
brushType: L.brush.brushType,
|
|
984
|
-
brushMode: L.brush.brushMode
|
|
985
|
-
}
|
|
986
|
-
});
|
|
1023
|
+
const F = k.style.position;
|
|
1024
|
+
return F || (k.style.position = "relative"), () => {
|
|
1025
|
+
F || (k.style.position = "");
|
|
987
1026
|
};
|
|
988
|
-
|
|
989
|
-
|
|
1027
|
+
}, P = [t, o], e[4] = o, e[5] = t, e[6] = C, e[7] = P) : (C = e[6], P = e[7]), H(C, P);
|
|
1028
|
+
let D, O;
|
|
1029
|
+
e[8] !== o || e[9] !== i || e[10] !== c ? (D = () => {
|
|
1030
|
+
if (!i || !o)
|
|
1031
|
+
return;
|
|
1032
|
+
const k = () => {
|
|
1033
|
+
const A = Ht(i);
|
|
1034
|
+
if (w((V) => jt(V, A) ? V : A), !A)
|
|
1035
|
+
return;
|
|
1036
|
+
const N = [];
|
|
1037
|
+
for (const V of c) {
|
|
1038
|
+
const X = i.convertToPixel({
|
|
1039
|
+
xAxisIndex: 0
|
|
1040
|
+
}, V.xStart), K = i.convertToPixel({
|
|
1041
|
+
xAxisIndex: 0
|
|
1042
|
+
}, V.xEnd);
|
|
1043
|
+
if (typeof X != "number" || typeof K != "number" || !Number.isFinite(X) || !Number.isFinite(K))
|
|
1044
|
+
continue;
|
|
1045
|
+
const Y = Math.max(A.x, Math.min(X, K)), ne = Math.min(A.x + A.width, Math.max(X, K));
|
|
1046
|
+
ne <= Y || N.push({
|
|
1047
|
+
left: Y,
|
|
1048
|
+
right: ne
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
h(N.length === 0 ? Ce : N);
|
|
990
1052
|
};
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1053
|
+
k(), i.on("finished", k);
|
|
1054
|
+
const F = ht(o, k);
|
|
1055
|
+
return () => {
|
|
1056
|
+
i.off("finished", k), F();
|
|
1057
|
+
};
|
|
1058
|
+
}, O = [i, o, c], e[8] = o, e[9] = i, e[10] = c, e[11] = D, e[12] = O) : (D = e[11], O = e[12]), H(D, O);
|
|
1059
|
+
let T;
|
|
1060
|
+
e[13] !== o || e[14] !== u || e[15] !== s ? (T = (k) => {
|
|
1061
|
+
if (!u || !o || !s)
|
|
1062
|
+
return;
|
|
1063
|
+
const F = a.current;
|
|
1064
|
+
if (!F)
|
|
1000
1065
|
return;
|
|
1066
|
+
k.preventDefault(), F.setPointerCapture(k.pointerId), g.current = k.pointerId;
|
|
1067
|
+
const A = o.getBoundingClientRect(), N = be(k.clientX - A.left, s);
|
|
1068
|
+
d.current = N, y({
|
|
1069
|
+
left: N,
|
|
1070
|
+
right: N
|
|
1071
|
+
});
|
|
1072
|
+
}, e[13] = o, e[14] = u, e[15] = s, e[16] = T) : T = e[16];
|
|
1073
|
+
const R = T;
|
|
1074
|
+
let L;
|
|
1075
|
+
e[17] !== o || e[18] !== s ? (L = (k) => {
|
|
1076
|
+
if (g.current !== k.pointerId)
|
|
1077
|
+
return;
|
|
1078
|
+
const F = d.current;
|
|
1079
|
+
if (F === null || !o || !s)
|
|
1080
|
+
return;
|
|
1081
|
+
const A = o.getBoundingClientRect(), N = be(k.clientX - A.left, s);
|
|
1082
|
+
y({
|
|
1083
|
+
left: Math.min(F, N),
|
|
1084
|
+
right: Math.max(F, N)
|
|
1085
|
+
});
|
|
1086
|
+
}, e[17] = o, e[18] = s, e[19] = L) : L = e[19];
|
|
1087
|
+
const v = L;
|
|
1088
|
+
let _;
|
|
1089
|
+
e[20] !== o || e[21] !== p || e[22] !== t || e[23] !== i || e[24] !== l || e[25] !== s || e[26] !== c ? (_ = (k) => {
|
|
1090
|
+
if (g.current !== k.pointerId)
|
|
1091
|
+
return;
|
|
1092
|
+
const F = d.current, A = a.current;
|
|
1093
|
+
if (g.current = null, d.current = null, y(null), F === null || !A || !i || !o || !s)
|
|
1094
|
+
return;
|
|
1095
|
+
try {
|
|
1096
|
+
A.releasePointerCapture(k.pointerId);
|
|
1097
|
+
} catch {
|
|
1001
1098
|
}
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1099
|
+
const N = o.getBoundingClientRect(), V = be(k.clientX - N.left, s), X = Math.min(F, V), K = Math.max(F, V);
|
|
1100
|
+
if (K - X < Zt)
|
|
1101
|
+
return;
|
|
1102
|
+
const Y = i.convertFromPixel({
|
|
1103
|
+
xAxisIndex: 0
|
|
1104
|
+
}, X), ne = i.convertFromPixel({
|
|
1105
|
+
xAxisIndex: 0
|
|
1106
|
+
}, K);
|
|
1107
|
+
if (typeof Y != "number" || typeof ne != "number" || !Number.isFinite(Y) || !Number.isFinite(ne))
|
|
1108
|
+
return;
|
|
1109
|
+
const q = {
|
|
1110
|
+
xStart: Y,
|
|
1111
|
+
xEnd: ne
|
|
1112
|
+
}, ee = l ? [...c, q] : [q], ue = {
|
|
1113
|
+
dataIndex: Gt(ee, p),
|
|
1114
|
+
seriesIndex: 0
|
|
1006
1115
|
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1116
|
+
b.setWidget(t, {
|
|
1117
|
+
brushRects: ee,
|
|
1118
|
+
brushSelection: ue,
|
|
1119
|
+
...l ? {} : {
|
|
1120
|
+
brush: !1
|
|
1121
|
+
}
|
|
1013
1122
|
});
|
|
1014
|
-
}, e[
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
id: me,
|
|
1019
|
-
type: "config",
|
|
1020
|
-
order: 25,
|
|
1021
|
-
enabled: !1,
|
|
1022
|
-
fn: (h) => {
|
|
1023
|
-
const I = h, L = I.option, W = I.onEvents ?? {}, P = pe(), B = {
|
|
1024
|
-
...W,
|
|
1025
|
-
brushSelected: i,
|
|
1026
|
-
brushEnd: d
|
|
1027
|
-
};
|
|
1028
|
-
return {
|
|
1029
|
-
...I,
|
|
1030
|
-
option: {
|
|
1031
|
-
...L,
|
|
1032
|
-
...P
|
|
1033
|
-
},
|
|
1034
|
-
onEvents: B
|
|
1035
|
-
};
|
|
1036
|
-
}
|
|
1037
|
-
}), () => g.unregisterTool(t, me)), O = [t, i, d], e[13] = d, e[14] = t, e[15] = v, e[16] = O) : (v = e[15], O = e[16]), $(v, O);
|
|
1038
|
-
let C, k;
|
|
1039
|
-
e[17] !== o || e[18] !== t ? (k = () => {
|
|
1040
|
-
g.setToolEnabled(t, me, o);
|
|
1041
|
-
}, C = [t, o], e[17] = o, e[18] = t, e[19] = C, e[20] = k) : (C = e[19], k = e[20]), $(k, C);
|
|
1042
|
-
const A = p?.enable ?? "Enable brush selection", w = p?.disable ?? "Disable brush selection", D = o ? w : A, x = p?.ariaLabel ?? D;
|
|
1043
|
-
let E;
|
|
1044
|
-
e[21] !== m ? (E = m ?? /* @__PURE__ */ b(qe, {}), e[21] = m, e[22] = E) : E = e[22];
|
|
1123
|
+
}, e[20] = o, e[21] = p, e[22] = t, e[23] = i, e[24] = l, e[25] = s, e[26] = c, e[27] = _) : _ = e[27];
|
|
1124
|
+
const I = _;
|
|
1125
|
+
if (!o)
|
|
1126
|
+
return null;
|
|
1045
1127
|
let z;
|
|
1046
|
-
e[
|
|
1047
|
-
|
|
1048
|
-
|
|
1128
|
+
e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
1129
|
+
position: "absolute",
|
|
1130
|
+
inset: 0,
|
|
1131
|
+
pointerEvents: "none",
|
|
1132
|
+
zIndex: 1
|
|
1133
|
+
}, e[28] = z) : z = e[28];
|
|
1134
|
+
const B = z;
|
|
1135
|
+
let M;
|
|
1136
|
+
e[29] !== u || e[30] !== s ? (M = s ? {
|
|
1137
|
+
position: "absolute",
|
|
1138
|
+
left: s.x,
|
|
1139
|
+
top: s.y,
|
|
1140
|
+
width: s.width,
|
|
1141
|
+
height: s.height,
|
|
1142
|
+
pointerEvents: u ? "auto" : "none",
|
|
1143
|
+
cursor: u ? "crosshair" : "default",
|
|
1144
|
+
userSelect: "none",
|
|
1145
|
+
touchAction: "none"
|
|
1146
|
+
} : void 0, e[29] = u, e[30] = s, e[31] = M) : M = e[31];
|
|
1147
|
+
const W = M;
|
|
1148
|
+
let j;
|
|
1149
|
+
e[32] !== W || e[33] !== R || e[34] !== v || e[35] !== I ? (j = W && /* @__PURE__ */ x("div", { ref: a, style: W, onPointerDown: R, onPointerMove: v, onPointerUp: I, onPointerCancel: I }), e[32] = W, e[33] = R, e[34] = v, e[35] = I, e[36] = j) : j = e[36];
|
|
1150
|
+
let Z;
|
|
1151
|
+
e[37] !== s || e[38] !== f ? (Z = s && f.map((k, F) => /* @__PURE__ */ x("div", { style: {
|
|
1152
|
+
...Ee.rect,
|
|
1153
|
+
left: k.left,
|
|
1154
|
+
width: Math.max(0, k.right - k.left),
|
|
1155
|
+
top: s.y,
|
|
1156
|
+
height: s.height
|
|
1157
|
+
} }, `${k.left}-${k.right}-${F}`)), e[37] = s, e[38] = f, e[39] = Z) : Z = e[39];
|
|
1158
|
+
let $;
|
|
1159
|
+
e[40] !== m || e[41] !== s ? ($ = s && m && /* @__PURE__ */ x("div", { style: {
|
|
1160
|
+
...Ee.rectPreview,
|
|
1161
|
+
left: m.left,
|
|
1162
|
+
width: Math.max(0, m.right - m.left),
|
|
1163
|
+
top: s.y,
|
|
1164
|
+
height: s.height
|
|
1165
|
+
} }), e[40] = m, e[41] = s, e[42] = $) : $ = e[42];
|
|
1166
|
+
let G;
|
|
1167
|
+
e[43] !== j || e[44] !== Z || e[45] !== $ ? (G = /* @__PURE__ */ oe("div", { style: B, children: [
|
|
1168
|
+
j,
|
|
1169
|
+
Z,
|
|
1170
|
+
$
|
|
1171
|
+
] }), e[43] = j, e[44] = Z, e[45] = $, e[46] = G) : G = e[46];
|
|
1172
|
+
let U;
|
|
1173
|
+
return e[47] !== o || e[48] !== G ? (U = gt(G, o), e[47] = o, e[48] = G, e[49] = U) : U = e[49], U;
|
|
1049
1174
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1175
|
+
function Xt() {
|
|
1176
|
+
return null;
|
|
1052
1177
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1178
|
+
function Kt() {
|
|
1179
|
+
return null;
|
|
1055
1180
|
}
|
|
1056
|
-
function
|
|
1181
|
+
function Yt(n) {
|
|
1182
|
+
return Ve.subscribe(n);
|
|
1183
|
+
}
|
|
1184
|
+
function qt(n) {
|
|
1185
|
+
const e = n, l = n?.data?.[0], u = Array.isArray(l) ? l.length : 0;
|
|
1057
1186
|
return {
|
|
1058
|
-
|
|
1187
|
+
enabled: e?.brush ?? !1,
|
|
1188
|
+
rects: e?.brushRects ?? Vt,
|
|
1189
|
+
dataLength: u
|
|
1059
1190
|
};
|
|
1060
1191
|
}
|
|
1192
|
+
function be(n, e) {
|
|
1193
|
+
return Math.max(e.x, Math.min(e.x + e.width, n));
|
|
1194
|
+
}
|
|
1195
|
+
const Cn = "brush-toggle";
|
|
1196
|
+
function Ln(n) {
|
|
1197
|
+
const e = J(35), {
|
|
1198
|
+
id: t,
|
|
1199
|
+
onBrushSelected: l,
|
|
1200
|
+
multiBrush: u,
|
|
1201
|
+
selections: c,
|
|
1202
|
+
defaultEnabled: p,
|
|
1203
|
+
labels: E,
|
|
1204
|
+
Icon: S,
|
|
1205
|
+
IconButtonProps: o
|
|
1206
|
+
} = n, r = p === void 0 ? !1 : p;
|
|
1207
|
+
let i;
|
|
1208
|
+
e[0] !== r ? (i = (B) => {
|
|
1209
|
+
const M = B;
|
|
1210
|
+
return {
|
|
1211
|
+
brush: M?.brush ?? r,
|
|
1212
|
+
selection: M?.brushSelection
|
|
1213
|
+
};
|
|
1214
|
+
}, e[0] = r, e[1] = i) : i = e[1];
|
|
1215
|
+
const {
|
|
1216
|
+
brush: a,
|
|
1217
|
+
selection: d
|
|
1218
|
+
} = te(t, i);
|
|
1219
|
+
let g, f;
|
|
1220
|
+
e[2] !== r || e[3] !== t ? (g = () => {
|
|
1221
|
+
b.getWidget(t)?.brush === void 0 && b.setWidget(t, {
|
|
1222
|
+
brush: r
|
|
1223
|
+
});
|
|
1224
|
+
}, f = [t, r], e[2] = r, e[3] = t, e[4] = g, e[5] = f) : (g = e[4], f = e[5]), H(g, f);
|
|
1225
|
+
let h;
|
|
1226
|
+
e[6] !== a || e[7] !== t || e[8] !== l ? (h = () => {
|
|
1227
|
+
a ? b.setWidget(t, {
|
|
1228
|
+
brush: !1
|
|
1229
|
+
}) : (b.setWidget(t, {
|
|
1230
|
+
brush: !0,
|
|
1231
|
+
brushRects: [],
|
|
1232
|
+
brushSelection: {
|
|
1233
|
+
dataIndex: [],
|
|
1234
|
+
seriesIndex: 0
|
|
1235
|
+
}
|
|
1236
|
+
}), l?.({
|
|
1237
|
+
dataIndex: [],
|
|
1238
|
+
seriesIndex: 0
|
|
1239
|
+
}));
|
|
1240
|
+
}, e[6] = a, e[7] = t, e[8] = l, e[9] = h) : h = e[9];
|
|
1241
|
+
const m = h, y = le(void 0);
|
|
1242
|
+
let s, w;
|
|
1243
|
+
e[10] !== l || e[11] !== d ? (s = () => {
|
|
1244
|
+
d && y.current !== d && (y.current = d, l?.(d));
|
|
1245
|
+
}, w = [d, l], e[10] = l, e[11] = d, e[12] = s, e[13] = w) : (s = e[12], w = e[13]), H(s, w);
|
|
1246
|
+
let C, P;
|
|
1247
|
+
e[14] !== t || e[15] !== c ? (C = () => {
|
|
1248
|
+
if (c !== 0)
|
|
1249
|
+
return;
|
|
1250
|
+
const B = b.getWidget(t), M = (B?.brushRects?.length ?? 0) > 0, W = (B?.brushSelection?.dataIndex?.length ?? 0) > 0;
|
|
1251
|
+
!M && !W || b.setWidget(t, {
|
|
1252
|
+
brushRects: [],
|
|
1253
|
+
brushSelection: {
|
|
1254
|
+
dataIndex: [],
|
|
1255
|
+
seriesIndex: 0
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
}, P = [c, t], e[14] = t, e[15] = c, e[16] = C, e[17] = P) : (C = e[16], P = e[17]), H(C, P);
|
|
1259
|
+
const D = E?.enable ?? "Enable brush selection", O = E?.disable ?? "Disable brush selection", T = a ? O : D, R = E?.ariaLabel ?? T;
|
|
1260
|
+
let L;
|
|
1261
|
+
e[18] !== S ? (L = S ?? /* @__PURE__ */ x(Qe, {}), e[18] = S, e[19] = L) : L = e[19];
|
|
1262
|
+
let v;
|
|
1263
|
+
e[20] !== o || e[21] !== a || e[22] !== m || e[23] !== R || e[24] !== L ? (v = /* @__PURE__ */ x(Q, { size: "small", "aria-label": R, onClick: m, sx: Te.trigger, "data-active": a, ...o, children: L }), e[20] = o, e[21] = a, e[22] = m, e[23] = R, e[24] = L, e[25] = v) : v = e[25];
|
|
1264
|
+
let _;
|
|
1265
|
+
e[26] !== v || e[27] !== T ? (_ = /* @__PURE__ */ x(Pe, { sx: Te.container, children: /* @__PURE__ */ x(re, { title: T, children: v }) }), e[26] = v, e[27] = T, e[28] = _) : _ = e[28];
|
|
1266
|
+
let I;
|
|
1267
|
+
e[29] !== t || e[30] !== u ? (I = /* @__PURE__ */ x(Ut, { id: t, multiBrush: u }), e[29] = t, e[30] = u, e[31] = I) : I = e[31];
|
|
1268
|
+
let z;
|
|
1269
|
+
return e[32] !== _ || e[33] !== I ? (z = /* @__PURE__ */ oe(de, { children: [
|
|
1270
|
+
_,
|
|
1271
|
+
I
|
|
1272
|
+
] }), e[32] = _, e[33] = I, e[34] = z) : z = e[34], z;
|
|
1273
|
+
}
|
|
1061
1274
|
export {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1275
|
+
Cn as BRUSH_TOGGLE_TOOL_ID,
|
|
1276
|
+
Ln as BrushToggle,
|
|
1277
|
+
_e as CHANGE_COLUMN_TOOL_ID,
|
|
1278
|
+
En as ChangeColumn,
|
|
1279
|
+
Sn as Download,
|
|
1280
|
+
pn as FullScreen,
|
|
1281
|
+
ae as LOCK_SELECTION_TOOL_ID,
|
|
1282
|
+
In as LockSelection,
|
|
1283
|
+
ye as RELATIVE_DATA_CONFIG_TOOL_ID,
|
|
1284
|
+
fe as RELATIVE_DATA_TOOL_ID,
|
|
1285
|
+
xn as RelativeData,
|
|
1286
|
+
he as SEARCHER_TOOL_ID,
|
|
1287
|
+
ge as STACK_TOGGLE_TOOL_ID,
|
|
1288
|
+
_n as Searcher,
|
|
1289
|
+
Tn as SearcherToggle,
|
|
1290
|
+
yn as StackToggle,
|
|
1291
|
+
me as ZOOM_TOGGLE_TOOL_ID,
|
|
1292
|
+
vn as ZoomToggle,
|
|
1293
|
+
Pn as downloadToCSV,
|
|
1294
|
+
Rn as downloadToPNG
|
|
1082
1295
|
};
|
|
1083
1296
|
//# sourceMappingURL=actions.js.map
|