@mickyballadelli/react-things 0.1.0 → 0.1.2
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/README.md +1 -0
- package/dist/components/DataCardGrid.d.ts +28 -0
- package/dist/index.d.ts +2 -0
- package/dist/react-things-ui.cjs +21 -21
- package/dist/react-things-ui.js +1130 -977
- package/package.json +1 -1
package/dist/react-things-ui.js
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
2
|
-
import { Box as ne, Typography as
|
|
3
|
-
import { useRef as oe, useState as
|
|
4
|
-
import
|
|
5
|
-
import { alpha as
|
|
1
|
+
import { jsxs as m, jsx as t, Fragment as Ye } from "react/jsx-runtime";
|
|
2
|
+
import { Box as ne, Typography as Ce } from "@mui/material";
|
|
3
|
+
import { useRef as oe, useState as W, useLayoutEffect as Fe, useId as je, useMemo as Ie, useEffect as ge, useCallback as Ve } from "react";
|
|
4
|
+
import d from "@mui/material/Box";
|
|
5
|
+
import { alpha as Y } from "@mui/material/styles";
|
|
6
6
|
import ie from "@mui/material/Tooltip";
|
|
7
|
-
import
|
|
7
|
+
import E from "@mui/material/Typography";
|
|
8
8
|
import Ge from "@mui/material/Collapse";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
9
|
+
import qe from "@mui/material/InputBase";
|
|
10
|
+
import Ue from "@mui/material/List";
|
|
11
|
+
import Le from "@mui/material/ListItemButton";
|
|
12
|
+
import Ze from "@mui/material/ListItemIcon";
|
|
13
|
+
import Pe from "@mui/material/ListItemText";
|
|
14
14
|
import _e from "@mui/icons-material/AddBox";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
15
|
+
import Qe from "@mui/icons-material/AddLink";
|
|
16
|
+
import Je from "@mui/icons-material/Close";
|
|
17
|
+
import Ke from "@mui/icons-material/Delete";
|
|
18
|
+
import et from "@mui/icons-material/LinkOff";
|
|
19
19
|
import ue from "@mui/material/IconButton";
|
|
20
20
|
import pe from "@mui/material/MenuItem";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
21
|
+
import V from "@mui/material/Stack";
|
|
22
|
+
import _ from "@mui/material/TextField";
|
|
23
|
+
import tt from "@mui/icons-material/DragIndicator";
|
|
24
24
|
import ae from "@mui/material/Button";
|
|
25
|
-
import
|
|
25
|
+
import rt from "@mui/material/Checkbox";
|
|
26
26
|
import we from "@mui/material/Chip";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
|
|
27
|
+
import nt from "@mui/material/Divider";
|
|
28
|
+
import ot from "@mui/material/FormControlLabel";
|
|
29
|
+
import Me from "@mui/material/Paper";
|
|
30
|
+
import Ne from "@mui/material/Slider";
|
|
31
|
+
import it from "@mui/material/InputAdornment";
|
|
32
|
+
import at from "@mui/icons-material/ContentCopy";
|
|
33
|
+
import lt from "@mui/icons-material/PushPin";
|
|
34
|
+
import st from "@mui/icons-material/PushPinOutlined";
|
|
35
|
+
import ct from "@mui/material/ClickAwayListener";
|
|
36
|
+
import dt from "@mui/material/Popper";
|
|
37
|
+
import ut from "@mui/material/LinearProgress";
|
|
38
|
+
function br({ title: e = "React Things", children: n }) {
|
|
38
39
|
return /* @__PURE__ */ m(
|
|
39
40
|
ne,
|
|
40
41
|
{
|
|
@@ -46,13 +47,13 @@ function lr({ title: t = "React Things", children: n }) {
|
|
|
46
47
|
bgcolor: "background.paper"
|
|
47
48
|
},
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
n ? /* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ t(Ce, { variant: "subtitle1", fontWeight: 700, children: e }),
|
|
51
|
+
n ? /* @__PURE__ */ t(ne, { sx: { mt: 1 }, children: n }) : null
|
|
51
52
|
]
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
const
|
|
56
|
+
const $e = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", Te = 12, pt = {
|
|
56
57
|
c: "#659ad2",
|
|
57
58
|
cpp: "#00599c",
|
|
58
59
|
cplusplus: "#00599c",
|
|
@@ -90,26 +91,26 @@ const ve = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", L
|
|
|
90
91
|
css: "#1572b6",
|
|
91
92
|
dart: "#0175c2"
|
|
92
93
|
};
|
|
93
|
-
function
|
|
94
|
-
return
|
|
94
|
+
function ht(e) {
|
|
95
|
+
return e.trim().replace(/^\./, "").toLowerCase().replace(/\s+/g, "");
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
97
|
+
function ft(e) {
|
|
98
|
+
return pt[ht(e)] ?? "#93c5fd";
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
-
return
|
|
100
|
+
function gt(e) {
|
|
101
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
-
const n =
|
|
104
|
-
return /^['"`]/.test(
|
|
103
|
+
function bt(e) {
|
|
104
|
+
const n = gt(e), l = /^(import|from|export|function|return|const|let|var|type|interface|class|extends|new|if|else|for|while|switch|case|break|continue|async|await|try|catch|finally|throw|fn|pub|use|mod|impl|trait|struct|enum|match|mut|let|where|package|func|defer|go|select|range|map|chan|SELECT|FROM|WHERE|AS|AND|OR|INSERT|UPDATE|DELETE|CREATE|TABLE|ORDER|BY|GROUP|LIMIT|select|from|where|as|and|or|insert|update|delete|create|table|order|by|group|limit)\b/;
|
|
105
|
+
return /^['"`]/.test(e) ? `<span style="color:#86efac">${n}</span>` : /^\d/.test(e) ? `<span style="color:#fbbf24">${n}</span>` : /^<\/?[A-Z][\w.]*/.test(e) ? `<span style="color:#67e8f9">${n}</span>` : l.test(e) ? `<span style="color:#c084fc">${n}</span>` : /^[$#][\w-]+$|^\.[\w-]+$/.test(e) ? `<span style="color:#f9a8d4">${n}</span>` : /^[A-Z][\w.]*$/.test(e) ? `<span style="color:#93c5fd">${n}</span>` : /^[a-z][\w-]*(?==|:)/.test(e) ? `<span style="color:#f9a8d4">${n}</span>` : /^[{}()[\].,:;=<>/]+$/.test(e) ? `<span style="color:#94a3b8">${n}</span>` : n;
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
107
|
+
function mt(e) {
|
|
108
|
+
return e.split(/(\s+|<\/?[A-Z][\w.]*|['"`][^'"`]*['"`]|\d*\.?\d+|[A-Za-z_$][\w$-]*|[{}()[\].,:;=<>/]+)/g).map((n) => bt(n)).join("");
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
const
|
|
111
|
-
`).length, 1),
|
|
112
|
-
`),
|
|
110
|
+
function mr({ label: e, language: n, value: l, onChange: s, minHeight: f = 360 }) {
|
|
111
|
+
const u = l ?? "", x = Math.max(u.split(`
|
|
112
|
+
`).length, 1), p = Array.from({ length: x }, (g, w) => w + 1).join(`
|
|
113
|
+
`), i = mt(u), y = ft(n);
|
|
113
114
|
return /* @__PURE__ */ m(ne, { children: [
|
|
114
115
|
/* @__PURE__ */ m(
|
|
115
116
|
ne,
|
|
@@ -126,14 +127,14 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
126
127
|
borderTopRightRadius: 4
|
|
127
128
|
},
|
|
128
129
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
|
|
130
|
+
/* @__PURE__ */ t(Ce, { variant: "caption", fontWeight: 800, children: e }),
|
|
131
|
+
/* @__PURE__ */ t(
|
|
132
|
+
Ce,
|
|
132
133
|
{
|
|
133
134
|
variant: "caption",
|
|
134
135
|
sx: {
|
|
135
136
|
fontFamily: "monospace",
|
|
136
|
-
color:
|
|
137
|
+
color: y,
|
|
137
138
|
textTransform: "lowercase"
|
|
138
139
|
},
|
|
139
140
|
children: n
|
|
@@ -148,14 +149,14 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
148
149
|
sx: {
|
|
149
150
|
display: "grid",
|
|
150
151
|
gridTemplateColumns: "48px 1fr",
|
|
151
|
-
minHeight:
|
|
152
|
+
minHeight: f,
|
|
152
153
|
bgcolor: "#0f172a",
|
|
153
154
|
borderBottomLeftRadius: 4,
|
|
154
155
|
borderBottomRightRadius: 4,
|
|
155
156
|
overflow: "hidden"
|
|
156
157
|
},
|
|
157
158
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ t(
|
|
159
160
|
ne,
|
|
160
161
|
{
|
|
161
162
|
component: "pre",
|
|
@@ -166,13 +167,13 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
166
167
|
py: 1.5,
|
|
167
168
|
color: "#64748b",
|
|
168
169
|
bgcolor: "#111827",
|
|
169
|
-
fontFamily:
|
|
170
|
+
fontFamily: $e,
|
|
170
171
|
fontSize: 14,
|
|
171
172
|
lineHeight: 1.6,
|
|
172
173
|
textAlign: "right",
|
|
173
174
|
userSelect: "none"
|
|
174
175
|
},
|
|
175
|
-
children:
|
|
176
|
+
children: p
|
|
176
177
|
}
|
|
177
178
|
),
|
|
178
179
|
/* @__PURE__ */ m(
|
|
@@ -180,26 +181,26 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
180
181
|
{
|
|
181
182
|
sx: {
|
|
182
183
|
position: "relative",
|
|
183
|
-
minHeight:
|
|
184
|
+
minHeight: f,
|
|
184
185
|
bgcolor: "#0f172a",
|
|
185
186
|
overflow: "auto"
|
|
186
187
|
},
|
|
187
188
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ t(
|
|
189
190
|
ne,
|
|
190
191
|
{
|
|
191
192
|
component: "pre",
|
|
192
193
|
"aria-hidden": "true",
|
|
193
|
-
dangerouslySetInnerHTML: { __html:
|
|
194
|
+
dangerouslySetInnerHTML: { __html: i },
|
|
194
195
|
sx: {
|
|
195
196
|
position: "absolute",
|
|
196
197
|
inset: 0,
|
|
197
198
|
m: 0,
|
|
198
|
-
p: `${
|
|
199
|
+
p: `${Te}px`,
|
|
199
200
|
boxSizing: "border-box",
|
|
200
201
|
pointerEvents: "none",
|
|
201
202
|
color: "#e5e7eb",
|
|
202
|
-
fontFamily:
|
|
203
|
+
fontFamily: $e,
|
|
203
204
|
fontSize: 14,
|
|
204
205
|
lineHeight: 1.6,
|
|
205
206
|
tabSize: 2,
|
|
@@ -208,29 +209,29 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ t(
|
|
212
213
|
ne,
|
|
213
214
|
{
|
|
214
215
|
component: "textarea",
|
|
215
|
-
"aria-label": `${
|
|
216
|
+
"aria-label": `${e} code editor`,
|
|
216
217
|
spellCheck: !1,
|
|
217
|
-
value:
|
|
218
|
-
onChange: (
|
|
218
|
+
value: u,
|
|
219
|
+
onChange: (g) => s(g.target.value),
|
|
219
220
|
sx: {
|
|
220
221
|
position: "relative",
|
|
221
222
|
width: "100%",
|
|
222
223
|
minWidth: 0,
|
|
223
|
-
minHeight:
|
|
224
|
+
minHeight: f,
|
|
224
225
|
resize: "vertical",
|
|
225
226
|
border: 0,
|
|
226
227
|
outline: 0,
|
|
227
|
-
p: `${
|
|
228
|
+
p: `${Te}px`,
|
|
228
229
|
boxSizing: "border-box",
|
|
229
230
|
color: "transparent",
|
|
230
231
|
WebkitTextFillColor: "transparent",
|
|
231
232
|
bgcolor: "transparent",
|
|
232
233
|
caretColor: "#60a5fa",
|
|
233
|
-
fontFamily:
|
|
234
|
+
fontFamily: $e,
|
|
234
235
|
fontSize: 14,
|
|
235
236
|
lineHeight: 1.6,
|
|
236
237
|
tabSize: 2,
|
|
@@ -254,141 +255,141 @@ function sr({ label: t, language: n, value: d, onChange: s, minHeight: b = 360 }
|
|
|
254
255
|
)
|
|
255
256
|
] });
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
-
children:
|
|
258
|
+
function xr({
|
|
259
|
+
children: e,
|
|
259
260
|
initialPosition: n = { x: 50, y: 50 },
|
|
260
|
-
dragSx:
|
|
261
|
+
dragSx: l,
|
|
261
262
|
onPositionChange: s,
|
|
262
|
-
onDraggingChange:
|
|
263
|
-
sx:
|
|
264
|
-
...
|
|
263
|
+
onDraggingChange: f,
|
|
264
|
+
sx: u,
|
|
265
|
+
...x
|
|
265
266
|
}) {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
267
|
+
const p = oe(null), i = oe(null), [y, g] = W(n), [w, v] = W({ x: 0, y: 0 }), [P, C] = W(!1);
|
|
268
|
+
Fe(() => {
|
|
269
|
+
const h = p.current, M = i.current;
|
|
270
|
+
if (!h || !M)
|
|
270
271
|
return;
|
|
271
|
-
const
|
|
272
|
-
s?.(
|
|
273
|
-
containerWidth:
|
|
274
|
-
containerHeight:
|
|
275
|
-
draggableWidth:
|
|
276
|
-
draggableHeight:
|
|
277
|
-
draggableLeft:
|
|
278
|
-
draggableTop:
|
|
279
|
-
containerBackgroundImage:
|
|
280
|
-
containerBackgroundSize:
|
|
281
|
-
containerBackgroundPosition:
|
|
272
|
+
const N = h.getBoundingClientRect(), X = M.getBoundingClientRect(), k = window.getComputedStyle(h), D = y.x / 100 * N.width, $ = y.y / 100 * N.height;
|
|
273
|
+
s?.(y, {
|
|
274
|
+
containerWidth: N.width,
|
|
275
|
+
containerHeight: N.height,
|
|
276
|
+
draggableWidth: X.width,
|
|
277
|
+
draggableHeight: X.height,
|
|
278
|
+
draggableLeft: D - X.width / 2,
|
|
279
|
+
draggableTop: $ - X.height / 2,
|
|
280
|
+
containerBackgroundImage: k.backgroundImage,
|
|
281
|
+
containerBackgroundSize: k.backgroundSize,
|
|
282
|
+
containerBackgroundPosition: k.backgroundPosition
|
|
282
283
|
});
|
|
283
284
|
}, []);
|
|
284
|
-
function o(
|
|
285
|
-
|
|
285
|
+
function o(h, M) {
|
|
286
|
+
g(h), s?.(h, M);
|
|
286
287
|
}
|
|
287
|
-
function R(
|
|
288
|
-
const
|
|
289
|
-
if (!
|
|
288
|
+
function R(h, M, N = w) {
|
|
289
|
+
const X = p.current, k = i.current;
|
|
290
|
+
if (!X || !k)
|
|
290
291
|
return;
|
|
291
|
-
const
|
|
292
|
-
x: Math.min(Math.max(
|
|
293
|
-
y: Math.min(Math.max(
|
|
294
|
-
},
|
|
295
|
-
o(
|
|
296
|
-
containerWidth:
|
|
297
|
-
containerHeight:
|
|
298
|
-
draggableWidth:
|
|
299
|
-
draggableHeight:
|
|
300
|
-
draggableLeft:
|
|
301
|
-
draggableTop:
|
|
292
|
+
const D = X.getBoundingClientRect(), $ = k.getBoundingClientRect(), L = window.getComputedStyle(X), j = h - N.x + $.width / 2, O = M - N.y + $.height / 2, c = $.width / D.width * 50, S = $.height / D.height * 50, b = (j - D.left) / D.width * 100, z = (O - D.top) / D.height * 100, B = {
|
|
293
|
+
x: Math.min(Math.max(b, c), 100 - c),
|
|
294
|
+
y: Math.min(Math.max(z, S), 100 - S)
|
|
295
|
+
}, a = B.x / 100 * D.width, T = B.y / 100 * D.height;
|
|
296
|
+
o(B, {
|
|
297
|
+
containerWidth: D.width,
|
|
298
|
+
containerHeight: D.height,
|
|
299
|
+
draggableWidth: $.width,
|
|
300
|
+
draggableHeight: $.height,
|
|
301
|
+
draggableLeft: a - $.width / 2,
|
|
302
|
+
draggableTop: T - $.height / 2,
|
|
302
303
|
containerBackgroundImage: L.backgroundImage,
|
|
303
304
|
containerBackgroundSize: L.backgroundSize,
|
|
304
305
|
containerBackgroundPosition: L.backgroundPosition
|
|
305
306
|
});
|
|
306
307
|
}
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
|
|
308
|
+
return /* @__PURE__ */ t(
|
|
309
|
+
d,
|
|
309
310
|
{
|
|
310
|
-
...
|
|
311
|
-
ref:
|
|
311
|
+
...x,
|
|
312
|
+
ref: p,
|
|
312
313
|
sx: [
|
|
313
314
|
{
|
|
314
315
|
position: "relative",
|
|
315
316
|
overflow: "hidden",
|
|
316
317
|
touchAction: "none"
|
|
317
318
|
},
|
|
318
|
-
...Array.isArray(
|
|
319
|
+
...Array.isArray(u) ? u : u ? [u] : []
|
|
319
320
|
],
|
|
320
|
-
onPointerMove: (
|
|
321
|
-
|
|
321
|
+
onPointerMove: (h) => {
|
|
322
|
+
P && R(h.clientX, h.clientY);
|
|
322
323
|
},
|
|
323
|
-
onPointerUp: (
|
|
324
|
-
C(!1),
|
|
324
|
+
onPointerUp: (h) => {
|
|
325
|
+
C(!1), f?.(!1), h.currentTarget.releasePointerCapture(h.pointerId);
|
|
325
326
|
},
|
|
326
327
|
onPointerCancel: () => {
|
|
327
|
-
C(!1),
|
|
328
|
+
C(!1), f?.(!1);
|
|
328
329
|
},
|
|
329
|
-
children: /* @__PURE__ */
|
|
330
|
-
|
|
330
|
+
children: /* @__PURE__ */ t(
|
|
331
|
+
d,
|
|
331
332
|
{
|
|
332
|
-
ref:
|
|
333
|
+
ref: i,
|
|
333
334
|
sx: [
|
|
334
335
|
{
|
|
335
336
|
position: "absolute",
|
|
336
|
-
left: `${
|
|
337
|
-
top: `${
|
|
337
|
+
left: `${y.x}%`,
|
|
338
|
+
top: `${y.y}%`,
|
|
338
339
|
transform: "translate(-50%, -50%)",
|
|
339
|
-
cursor:
|
|
340
|
+
cursor: P ? "grabbing" : "grab",
|
|
340
341
|
userSelect: "none"
|
|
341
342
|
},
|
|
342
|
-
...Array.isArray(
|
|
343
|
+
...Array.isArray(l) ? l : l ? [l] : []
|
|
343
344
|
],
|
|
344
|
-
onPointerDown: (
|
|
345
|
-
const
|
|
346
|
-
x:
|
|
347
|
-
y:
|
|
345
|
+
onPointerDown: (h) => {
|
|
346
|
+
const M = h.currentTarget.getBoundingClientRect(), N = {
|
|
347
|
+
x: h.clientX - M.left,
|
|
348
|
+
y: h.clientY - M.top
|
|
348
349
|
};
|
|
349
|
-
C(!0),
|
|
350
|
+
C(!0), f?.(!0), v(N), h.currentTarget.setPointerCapture(h.pointerId), R(h.clientX, h.clientY, N);
|
|
350
351
|
},
|
|
351
|
-
children:
|
|
352
|
+
children: e
|
|
352
353
|
}
|
|
353
354
|
)
|
|
354
355
|
}
|
|
355
356
|
);
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
-
return Math.min(Math.max(
|
|
358
|
+
function We(e) {
|
|
359
|
+
return Math.min(Math.max(e, 0), 1);
|
|
359
360
|
}
|
|
360
|
-
function
|
|
361
|
-
transparency:
|
|
361
|
+
function yr({
|
|
362
|
+
transparency: e = 0.36,
|
|
362
363
|
fill: n = 0.72,
|
|
363
|
-
liquidColor:
|
|
364
|
+
liquidColor: l = "#39b8ff",
|
|
364
365
|
glassColor: s = "#ffffff",
|
|
365
|
-
motion:
|
|
366
|
-
refractionActive:
|
|
367
|
-
children:
|
|
368
|
-
sx:
|
|
369
|
-
...
|
|
366
|
+
motion: f = 0,
|
|
367
|
+
refractionActive: u = !0,
|
|
368
|
+
children: x,
|
|
369
|
+
sx: p,
|
|
370
|
+
...i
|
|
370
371
|
}) {
|
|
371
|
-
const
|
|
372
|
+
const g = `glass-liquid-${je().replace(/:/g, "")}`, w = 1 - We(e), v = We(e), C = `${(1 - Math.min(Math.max(n, 0), 1)) * 100}%`, o = Math.abs(Math.round(f * 8)) + 1, R = 0.012 + Math.abs(Math.sin(f / 17)) * 0.012, h = 18 + w * 18, M = u;
|
|
372
373
|
return /* @__PURE__ */ m(
|
|
373
|
-
|
|
374
|
+
d,
|
|
374
375
|
{
|
|
375
|
-
...
|
|
376
|
+
...i,
|
|
376
377
|
sx: [
|
|
377
378
|
{
|
|
378
379
|
position: "relative",
|
|
379
380
|
overflow: "hidden",
|
|
380
381
|
border: 1,
|
|
381
|
-
borderColor:
|
|
382
|
+
borderColor: Y(s, 0.48),
|
|
382
383
|
borderRadius: 2,
|
|
383
384
|
minHeight: 160,
|
|
384
385
|
p: 3,
|
|
385
386
|
color: "common.white",
|
|
386
|
-
bgcolor:
|
|
387
|
+
bgcolor: Y(s, 0.08 + v * 0.18),
|
|
387
388
|
boxShadow: `
|
|
388
|
-
inset 0 1px 0 ${
|
|
389
|
-
inset 14px 0 34px ${
|
|
390
|
-
inset -18px 0 32px ${
|
|
391
|
-
0 18px 48px ${
|
|
389
|
+
inset 0 1px 0 ${Y(s, 0.68)},
|
|
390
|
+
inset 14px 0 34px ${Y(s, 0.12)},
|
|
391
|
+
inset -18px 0 32px ${Y(l, w * 0.2)},
|
|
392
|
+
0 18px 48px ${Y("#0b2030", 0.18)}
|
|
392
393
|
`,
|
|
393
394
|
backdropFilter: "blur(12px) saturate(170%) contrast(108%)",
|
|
394
395
|
WebkitBackdropFilter: "blur(12px) saturate(170%) contrast(108%)",
|
|
@@ -400,12 +401,12 @@ function dr({
|
|
|
400
401
|
top: C,
|
|
401
402
|
bottom: 0,
|
|
402
403
|
background: `
|
|
403
|
-
linear-gradient(160deg, ${
|
|
404
|
+
linear-gradient(160deg, ${Y(s, w * 0.16)} 0%, ${Y(l, w * 0.28)} 42%, ${Y("#063451", w * 0.2)} 100%)
|
|
404
405
|
`,
|
|
405
406
|
opacity: 0.95,
|
|
406
407
|
boxShadow: `
|
|
407
|
-
inset 0 18px 28px ${
|
|
408
|
-
inset 0 -34px 44px ${
|
|
408
|
+
inset 0 18px 28px ${Y(s, 0.12 + w * 0.16)},
|
|
409
|
+
inset 0 -34px 44px ${Y("#032536", w * 0.22)}
|
|
409
410
|
`
|
|
410
411
|
},
|
|
411
412
|
"&::after": {
|
|
@@ -413,8 +414,8 @@ function dr({
|
|
|
413
414
|
position: "absolute",
|
|
414
415
|
inset: 0,
|
|
415
416
|
background: `
|
|
416
|
-
linear-gradient(105deg, ${
|
|
417
|
-
radial-gradient(circle at 18% 18%, ${
|
|
417
|
+
linear-gradient(105deg, ${Y(s, 0.34)} 0%, ${Y(s, 0.08)} 18%, ${Y(s, 0)} 34%),
|
|
418
|
+
radial-gradient(circle at 18% 18%, ${Y(s, 0.38)} 0 3%, ${Y(s, 0)} 18%)
|
|
418
419
|
`,
|
|
419
420
|
pointerEvents: "none"
|
|
420
421
|
},
|
|
@@ -427,8 +428,8 @@ function dr({
|
|
|
427
428
|
backgroundSize: "var(--glassbox-refraction-background-size, cover)",
|
|
428
429
|
backgroundPosition: "var(--glassbox-refraction-background-position, center)",
|
|
429
430
|
backgroundRepeat: "no-repeat",
|
|
430
|
-
filter: `url(#${
|
|
431
|
-
opacity:
|
|
431
|
+
filter: `url(#${g}) saturate(150%) contrast(112%)`,
|
|
432
|
+
opacity: M ? 0.72 : 0,
|
|
432
433
|
transition: "opacity 120ms ease-out",
|
|
433
434
|
maskImage: `linear-gradient(to bottom, transparent 0, transparent calc(${C} + 10px), black calc(${C} + 28px), black 100%)`,
|
|
434
435
|
WebkitMaskImage: `linear-gradient(to bottom, transparent 0, transparent calc(${C} + 10px), black calc(${C} + 28px), black 100%)`
|
|
@@ -438,12 +439,12 @@ function dr({
|
|
|
438
439
|
inset: 0,
|
|
439
440
|
zIndex: 2,
|
|
440
441
|
pointerEvents: "none",
|
|
441
|
-
opacity:
|
|
442
|
+
opacity: M ? 0.16 + v * 0.16 : 0,
|
|
442
443
|
backdropFilter: "blur(3px) saturate(190%)",
|
|
443
444
|
WebkitBackdropFilter: "blur(3px) saturate(190%)",
|
|
444
445
|
background: `
|
|
445
|
-
linear-gradient(180deg, ${
|
|
446
|
-
linear-gradient(90deg, ${
|
|
446
|
+
linear-gradient(180deg, ${Y(s, 0.2)} 0, ${Y(s, 0)} 20%),
|
|
447
|
+
linear-gradient(90deg, ${Y(s, 0)} 0 18%, ${Y(s, 0.14)} 26%, ${Y(s, 0)} 34% 58%, ${Y(s, 0.1)} 68%, ${Y(s, 0)} 76% 100%)
|
|
447
448
|
`,
|
|
448
449
|
transition: "opacity 120ms ease-out",
|
|
449
450
|
maskImage: `linear-gradient(to bottom, transparent 0, transparent ${C}, black calc(${C} + 18px), black 100%)`,
|
|
@@ -452,25 +453,25 @@ function dr({
|
|
|
452
453
|
"& .GlassBox-content": {
|
|
453
454
|
position: "relative",
|
|
454
455
|
zIndex: 3,
|
|
455
|
-
textShadow: `0 1px 10px ${
|
|
456
|
+
textShadow: `0 1px 10px ${Y("#00121d", 0.36)}`
|
|
456
457
|
},
|
|
457
458
|
"& > *": {
|
|
458
459
|
position: "relative",
|
|
459
460
|
zIndex: 3
|
|
460
461
|
}
|
|
461
462
|
},
|
|
462
|
-
...Array.isArray(
|
|
463
|
+
...Array.isArray(p) ? p : p ? [p] : []
|
|
463
464
|
],
|
|
464
465
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
|
|
466
|
+
/* @__PURE__ */ t(
|
|
467
|
+
d,
|
|
467
468
|
{
|
|
468
469
|
component: "svg",
|
|
469
470
|
"aria-hidden": "true",
|
|
470
471
|
focusable: "false",
|
|
471
472
|
sx: { position: "absolute", width: 0, height: 0, overflow: "hidden" },
|
|
472
|
-
children: /* @__PURE__ */ m("filter", { id:
|
|
473
|
-
/* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ m("filter", { id: g, children: [
|
|
474
|
+
/* @__PURE__ */ t(
|
|
474
475
|
"feTurbulence",
|
|
475
476
|
{
|
|
476
477
|
type: "fractalNoise",
|
|
@@ -480,12 +481,12 @@ function dr({
|
|
|
480
481
|
result: "liquidNoise"
|
|
481
482
|
}
|
|
482
483
|
),
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ t(
|
|
484
485
|
"feDisplacementMap",
|
|
485
486
|
{
|
|
486
487
|
in: "SourceGraphic",
|
|
487
488
|
in2: "liquidNoise",
|
|
488
|
-
scale:
|
|
489
|
+
scale: h,
|
|
489
490
|
xChannelSelector: "R",
|
|
490
491
|
yChannelSelector: "G"
|
|
491
492
|
}
|
|
@@ -493,30 +494,30 @@ function dr({
|
|
|
493
494
|
] })
|
|
494
495
|
}
|
|
495
496
|
),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ t(d, { className: "GlassBox-liquidLens" }),
|
|
498
|
+
/* @__PURE__ */ t(d, { className: "GlassBox-refractionOffset" }),
|
|
499
|
+
/* @__PURE__ */ t(d, { className: "GlassBox-content", children: x })
|
|
499
500
|
]
|
|
500
501
|
}
|
|
501
502
|
);
|
|
502
503
|
}
|
|
503
|
-
function
|
|
504
|
-
return Math.min(Math.max(
|
|
504
|
+
function xt(e, n, l) {
|
|
505
|
+
return Math.min(Math.max(e, n), l);
|
|
505
506
|
}
|
|
506
|
-
function
|
|
507
|
-
items:
|
|
507
|
+
function wr({
|
|
508
|
+
items: e,
|
|
508
509
|
iconSize: n = 52,
|
|
509
|
-
magnification:
|
|
510
|
+
magnification: l = 1.7,
|
|
510
511
|
gap: s = 10,
|
|
511
|
-
tooltip:
|
|
512
|
-
sx:
|
|
513
|
-
...
|
|
512
|
+
tooltip: f = !0,
|
|
513
|
+
sx: u,
|
|
514
|
+
...x
|
|
514
515
|
}) {
|
|
515
|
-
const [
|
|
516
|
-
return /* @__PURE__ */
|
|
517
|
-
|
|
516
|
+
const [p, i] = W(null);
|
|
517
|
+
return /* @__PURE__ */ t(
|
|
518
|
+
d,
|
|
518
519
|
{
|
|
519
|
-
...
|
|
520
|
+
...x,
|
|
520
521
|
role: "toolbar",
|
|
521
522
|
sx: [
|
|
522
523
|
{
|
|
@@ -532,18 +533,18 @@ function ur({
|
|
|
532
533
|
backdropFilter: "blur(18px) saturate(150%)",
|
|
533
534
|
WebkitBackdropFilter: "blur(18px) saturate(150%)"
|
|
534
535
|
},
|
|
535
|
-
...Array.isArray(
|
|
536
|
+
...Array.isArray(u) ? u : u ? [u] : []
|
|
536
537
|
],
|
|
537
|
-
onMouseLeave: () =>
|
|
538
|
-
children:
|
|
539
|
-
const
|
|
540
|
-
|
|
538
|
+
onMouseLeave: () => i(null),
|
|
539
|
+
children: e.map((y, g) => {
|
|
540
|
+
const w = p === null ? 4 : Math.abs(g - p), v = xt(1 - w / 3, 0, 1), P = 1 + (l - 1) * v, C = -18 * v, o = /* @__PURE__ */ t(
|
|
541
|
+
d,
|
|
541
542
|
{
|
|
542
543
|
component: "button",
|
|
543
544
|
type: "button",
|
|
544
|
-
"aria-label":
|
|
545
|
-
onClick:
|
|
546
|
-
onMouseEnter: () =>
|
|
545
|
+
"aria-label": y.label,
|
|
546
|
+
onClick: y.onClick,
|
|
547
|
+
onMouseEnter: () => i(g),
|
|
547
548
|
sx: {
|
|
548
549
|
width: n,
|
|
549
550
|
height: n,
|
|
@@ -557,7 +558,7 @@ function ur({
|
|
|
557
558
|
bgcolor: "rgba(255,255,255,0.72)",
|
|
558
559
|
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 18px rgba(15, 23, 42, 0.18)",
|
|
559
560
|
cursor: "pointer",
|
|
560
|
-
transform: `translateY(${C}px) scale(${
|
|
561
|
+
transform: `translateY(${C}px) scale(${P})`,
|
|
561
562
|
transformOrigin: "bottom center",
|
|
562
563
|
transition: "transform 130ms ease-out, background-color 130ms ease-out",
|
|
563
564
|
"&:focus-visible": {
|
|
@@ -568,8 +569,8 @@ function ur({
|
|
|
568
569
|
bgcolor: "rgba(255,255,255,0.9)"
|
|
569
570
|
}
|
|
570
571
|
},
|
|
571
|
-
children: /* @__PURE__ */
|
|
572
|
-
|
|
572
|
+
children: /* @__PURE__ */ t(
|
|
573
|
+
E,
|
|
573
574
|
{
|
|
574
575
|
component: "span",
|
|
575
576
|
"aria-hidden": "true",
|
|
@@ -579,72 +580,72 @@ function ur({
|
|
|
579
580
|
fontSize: Math.round(n * 0.52),
|
|
580
581
|
lineHeight: 1
|
|
581
582
|
},
|
|
582
|
-
children:
|
|
583
|
+
children: y.icon
|
|
583
584
|
}
|
|
584
585
|
)
|
|
585
586
|
},
|
|
586
|
-
|
|
587
|
+
y.id
|
|
587
588
|
);
|
|
588
|
-
return
|
|
589
|
+
return f ? /* @__PURE__ */ t(ie, { title: y.label, placement: "top", arrow: !0, children: o }, y.id) : o;
|
|
589
590
|
})
|
|
590
591
|
}
|
|
591
592
|
);
|
|
592
593
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
594
|
+
function Oe(e) {
|
|
595
|
+
return e.toLowerCase().trim();
|
|
595
596
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
...
|
|
597
|
+
function yt(e) {
|
|
598
|
+
return Oe([
|
|
599
|
+
e.label,
|
|
600
|
+
e.description,
|
|
601
|
+
e.group,
|
|
602
|
+
e.parentId,
|
|
603
|
+
...e.keywords ?? []
|
|
603
604
|
].filter(Boolean).join(" "));
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
-
return Array.from(new Set(
|
|
606
|
+
function De(e) {
|
|
607
|
+
return Array.from(new Set(e.map((n) => n.group).filter(Boolean)));
|
|
607
608
|
}
|
|
608
|
-
function
|
|
609
|
-
items:
|
|
609
|
+
function vr({
|
|
610
|
+
items: e,
|
|
610
611
|
variant: n = "list",
|
|
611
|
-
selectedId:
|
|
612
|
+
selectedId: l,
|
|
612
613
|
placeholder: s = "Search",
|
|
613
|
-
emptyText:
|
|
614
|
-
maxResults:
|
|
615
|
-
showSearch:
|
|
616
|
-
dense:
|
|
617
|
-
expandedGroups:
|
|
618
|
-
defaultExpandedGroups:
|
|
619
|
-
onExpandedGroupsChange:
|
|
620
|
-
onSelect:
|
|
614
|
+
emptyText: f = "No items found",
|
|
615
|
+
maxResults: u,
|
|
616
|
+
showSearch: x = !0,
|
|
617
|
+
dense: p = !1,
|
|
618
|
+
expandedGroups: i,
|
|
619
|
+
defaultExpandedGroups: y,
|
|
620
|
+
onExpandedGroupsChange: g,
|
|
621
|
+
onSelect: w,
|
|
621
622
|
sx: v,
|
|
622
|
-
...
|
|
623
|
+
...P
|
|
623
624
|
}) {
|
|
624
|
-
const C =
|
|
625
|
-
const
|
|
626
|
-
return typeof
|
|
627
|
-
}, [
|
|
628
|
-
function
|
|
629
|
-
|
|
625
|
+
const C = y ?? De(e), [o, R] = W(""), [h, M] = W(0), [N, X] = W(C), k = Oe(o), D = i ?? N, $ = Ie(() => {
|
|
626
|
+
const a = k ? e.filter((T) => yt(T).includes(k)) : e;
|
|
627
|
+
return typeof u == "number" ? a.slice(0, u) : a;
|
|
628
|
+
}, [e, u, k]), L = De($), j = $;
|
|
629
|
+
function O(a) {
|
|
630
|
+
a.onSelect?.(), w?.(a), R(""), M(0);
|
|
630
631
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
632
|
+
function c(a) {
|
|
633
|
+
i === void 0 && X(a), g?.(a);
|
|
633
634
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
635
|
+
function S(a) {
|
|
636
|
+
c(D.includes(a) ? D.filter((T) => T !== a) : [...D, a]);
|
|
636
637
|
}
|
|
637
|
-
function
|
|
638
|
-
const Q =
|
|
638
|
+
function b(a, T = 0) {
|
|
639
|
+
const Q = a.id === l;
|
|
639
640
|
return /* @__PURE__ */ m(
|
|
640
|
-
|
|
641
|
+
Le,
|
|
641
642
|
{
|
|
642
643
|
selected: Q,
|
|
643
|
-
dense:
|
|
644
|
-
onClick: () =>
|
|
644
|
+
dense: p,
|
|
645
|
+
onClick: () => O(a),
|
|
645
646
|
sx: {
|
|
646
647
|
borderRadius: 1,
|
|
647
|
-
pl: 1.25 +
|
|
648
|
+
pl: 1.25 + T * 2,
|
|
648
649
|
"&.Mui-selected": {
|
|
649
650
|
bgcolor: "action.selected",
|
|
650
651
|
color: "primary.main"
|
|
@@ -654,57 +655,57 @@ function pr({
|
|
|
654
655
|
}
|
|
655
656
|
},
|
|
656
657
|
children: [
|
|
657
|
-
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
|
|
658
|
+
a.icon ? /* @__PURE__ */ t(Ze, { sx: { minWidth: 34, color: "inherit" }, children: a.icon }) : null,
|
|
659
|
+
/* @__PURE__ */ t(
|
|
660
|
+
Pe,
|
|
660
661
|
{
|
|
661
|
-
primary:
|
|
662
|
-
secondary:
|
|
662
|
+
primary: a.label,
|
|
663
|
+
secondary: a.description,
|
|
663
664
|
primaryTypographyProps: { fontWeight: Q ? 850 : 700 },
|
|
664
665
|
secondaryTypographyProps: { color: "text.secondary" }
|
|
665
666
|
}
|
|
666
667
|
)
|
|
667
668
|
]
|
|
668
669
|
},
|
|
669
|
-
|
|
670
|
+
a.id
|
|
670
671
|
);
|
|
671
672
|
}
|
|
672
|
-
function
|
|
673
|
-
return
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
|
|
676
|
-
] },
|
|
673
|
+
function z() {
|
|
674
|
+
return $.length ? L.length ? L.map((a) => /* @__PURE__ */ m(d, { children: [
|
|
675
|
+
/* @__PURE__ */ t(E, { variant: "caption", fontWeight: 900, color: "text.secondary", sx: { display: "block", px: 1.25, pt: 1.5, pb: 0.5 }, children: a }),
|
|
676
|
+
$.filter((T) => T.group === a).map((T) => b(T))
|
|
677
|
+
] }, a)) : $.map((a) => b(a)) : /* @__PURE__ */ t(d, { sx: { px: 2, py: 4, textAlign: "center", color: "text.secondary" }, children: f });
|
|
677
678
|
}
|
|
678
|
-
function
|
|
679
|
-
return
|
|
680
|
-
const
|
|
681
|
-
return /* @__PURE__ */ m(
|
|
679
|
+
function B() {
|
|
680
|
+
return $.length ? L.length ? L.map((a) => {
|
|
681
|
+
const T = k || D.includes(a);
|
|
682
|
+
return /* @__PURE__ */ m(d, { children: [
|
|
682
683
|
/* @__PURE__ */ m(
|
|
683
|
-
|
|
684
|
+
Le,
|
|
684
685
|
{
|
|
685
|
-
dense:
|
|
686
|
-
onClick: () =>
|
|
686
|
+
dense: p,
|
|
687
|
+
onClick: () => S(a),
|
|
687
688
|
sx: { borderRadius: 1, px: 1.25 },
|
|
688
689
|
children: [
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
|
|
690
|
+
/* @__PURE__ */ t(E, { component: "span", "aria-hidden": "true", sx: { mr: 1, width: 16, color: "text.secondary" }, children: T ? "▾" : "▸" }),
|
|
691
|
+
/* @__PURE__ */ t(
|
|
692
|
+
Pe,
|
|
692
693
|
{
|
|
693
|
-
primary:
|
|
694
|
+
primary: a,
|
|
694
695
|
primaryTypographyProps: { fontWeight: 900 }
|
|
695
696
|
}
|
|
696
697
|
)
|
|
697
698
|
]
|
|
698
699
|
}
|
|
699
700
|
),
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
] },
|
|
702
|
-
}) :
|
|
701
|
+
/* @__PURE__ */ t(Ge, { in: !!T, timeout: "auto", unmountOnExit: !0, children: $.filter((Q) => Q.group === a).map((Q) => b(Q, 1)) })
|
|
702
|
+
] }, a);
|
|
703
|
+
}) : $.map((a) => b(a)) : /* @__PURE__ */ t(d, { sx: { px: 2, py: 4, textAlign: "center", color: "text.secondary" }, children: f });
|
|
703
704
|
}
|
|
704
705
|
return /* @__PURE__ */ m(
|
|
705
|
-
|
|
706
|
+
d,
|
|
706
707
|
{
|
|
707
|
-
...
|
|
708
|
+
...P,
|
|
708
709
|
sx: [
|
|
709
710
|
{
|
|
710
711
|
display: "flex",
|
|
@@ -715,8 +716,8 @@ function pr({
|
|
|
715
716
|
...Array.isArray(v) ? v : v ? [v] : []
|
|
716
717
|
],
|
|
717
718
|
children: [
|
|
718
|
-
|
|
719
|
-
|
|
719
|
+
x ? /* @__PURE__ */ t(
|
|
720
|
+
d,
|
|
720
721
|
{
|
|
721
722
|
sx: {
|
|
722
723
|
px: 1.25,
|
|
@@ -726,134 +727,134 @@ function pr({
|
|
|
726
727
|
borderRadius: 1,
|
|
727
728
|
bgcolor: "background.paper"
|
|
728
729
|
},
|
|
729
|
-
children: /* @__PURE__ */
|
|
730
|
-
|
|
730
|
+
children: /* @__PURE__ */ t(
|
|
731
|
+
qe,
|
|
731
732
|
{
|
|
732
733
|
fullWidth: !0,
|
|
733
734
|
value: o,
|
|
734
735
|
placeholder: s,
|
|
735
|
-
onChange: (
|
|
736
|
-
R(
|
|
736
|
+
onChange: (a) => {
|
|
737
|
+
R(a.target.value), M(0);
|
|
737
738
|
},
|
|
738
|
-
onKeyDown: (
|
|
739
|
-
|
|
739
|
+
onKeyDown: (a) => {
|
|
740
|
+
a.key === "ArrowDown" && (a.preventDefault(), M((T) => Math.min(T + 1, j.length - 1))), a.key === "ArrowUp" && (a.preventDefault(), M((T) => Math.max(T - 1, 0))), a.key === "Enter" && j[h] && (a.preventDefault(), O(j[h]));
|
|
740
741
|
},
|
|
741
742
|
sx: { fontSize: 14 }
|
|
742
743
|
}
|
|
743
744
|
)
|
|
744
745
|
}
|
|
745
746
|
) : null,
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ t(Ue, { disablePadding: !0, dense: p, sx: { overflow: "auto" }, children: n === "tree" ? B() : z() })
|
|
747
748
|
]
|
|
748
749
|
}
|
|
749
750
|
);
|
|
750
751
|
}
|
|
751
|
-
function
|
|
752
|
-
return Math.min(Math.max(
|
|
752
|
+
function Be(e, n, l) {
|
|
753
|
+
return Math.min(Math.max(e, n), l);
|
|
753
754
|
}
|
|
754
|
-
function
|
|
755
|
-
if (!
|
|
755
|
+
function wt(e) {
|
|
756
|
+
if (!e || typeof window > "u")
|
|
756
757
|
return null;
|
|
757
|
-
const n = window.localStorage.getItem(
|
|
758
|
-
return Number.isFinite(
|
|
758
|
+
const n = window.localStorage.getItem(e), l = n === null ? Number.NaN : Number(n);
|
|
759
|
+
return Number.isFinite(l) ? l : null;
|
|
759
760
|
}
|
|
760
|
-
function
|
|
761
|
-
first:
|
|
761
|
+
function $r({
|
|
762
|
+
first: e,
|
|
762
763
|
second: n,
|
|
763
|
-
orientation:
|
|
764
|
+
orientation: l = "horizontal",
|
|
764
765
|
initialSize: s = 50,
|
|
765
|
-
size:
|
|
766
|
-
defaultSize:
|
|
767
|
-
minSize:
|
|
768
|
-
maxSize:
|
|
769
|
-
dividerSize:
|
|
770
|
-
snapPoints:
|
|
771
|
-
snapThreshold:
|
|
772
|
-
resetSize:
|
|
766
|
+
size: f,
|
|
767
|
+
defaultSize: u,
|
|
768
|
+
minSize: x = 20,
|
|
769
|
+
maxSize: p = 80,
|
|
770
|
+
dividerSize: i = 8,
|
|
771
|
+
snapPoints: y = [],
|
|
772
|
+
snapThreshold: g = 4,
|
|
773
|
+
resetSize: w = u ?? s,
|
|
773
774
|
collapsed: v,
|
|
774
|
-
defaultCollapsed:
|
|
775
|
+
defaultCollapsed: P = null,
|
|
775
776
|
collapsedSize: C = 0,
|
|
776
777
|
persistKey: o,
|
|
777
778
|
keyboardStep: R = 5,
|
|
778
|
-
onSizeChange:
|
|
779
|
-
onCollapsedChange:
|
|
780
|
-
onDraggingChange:
|
|
781
|
-
dividerLabel:
|
|
782
|
-
sx:
|
|
783
|
-
...
|
|
779
|
+
onSizeChange: h,
|
|
780
|
+
onCollapsedChange: M,
|
|
781
|
+
onDraggingChange: N,
|
|
782
|
+
dividerLabel: X = "Resize panels",
|
|
783
|
+
sx: k,
|
|
784
|
+
...D
|
|
784
785
|
}) {
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
o && window.localStorage.setItem(o, String(
|
|
788
|
-
}, [o,
|
|
789
|
-
|
|
790
|
-
}, [
|
|
791
|
-
function
|
|
792
|
-
const te =
|
|
793
|
-
const
|
|
794
|
-
return Math.abs(
|
|
795
|
-
}, I), re = Math.abs(te - I) <=
|
|
796
|
-
|
|
786
|
+
const $ = oe(null), [L, j] = W(() => wt(o) ?? u ?? s), [O, c] = W(P), [S, b] = W(!1), z = l === "horizontal", a = Be(f ?? L, x, p), T = v ?? O, Q = T === "first" ? C : T === "second" ? 100 - C : a, le = T === "first" && C <= 0, se = T === "second" && C <= 0;
|
|
787
|
+
ge(() => {
|
|
788
|
+
o && window.localStorage.setItem(o, String(a));
|
|
789
|
+
}, [o, a]), ge(() => {
|
|
790
|
+
N?.(S);
|
|
791
|
+
}, [S, N]);
|
|
792
|
+
function q(I) {
|
|
793
|
+
const te = y.reduce((ce, me) => {
|
|
794
|
+
const xe = Math.abs(ce - I);
|
|
795
|
+
return Math.abs(me - I) < xe ? me : ce;
|
|
796
|
+
}, I), re = Math.abs(te - I) <= g, J = Be(re ? te : I, x, p);
|
|
797
|
+
f === void 0 && j(J), h?.(J), be(null);
|
|
797
798
|
}
|
|
798
799
|
function ee(I, te) {
|
|
799
|
-
const re =
|
|
800
|
+
const re = $.current;
|
|
800
801
|
if (!re)
|
|
801
802
|
return;
|
|
802
|
-
const J = re.getBoundingClientRect(), ce =
|
|
803
|
-
|
|
803
|
+
const J = re.getBoundingClientRect(), ce = z ? (I - J.left) / J.width * 100 : (te - J.top) / J.height * 100;
|
|
804
|
+
q(ce);
|
|
804
805
|
}
|
|
805
806
|
function U(I) {
|
|
806
|
-
|
|
807
|
+
q(a + I);
|
|
807
808
|
}
|
|
808
809
|
function K() {
|
|
809
|
-
|
|
810
|
+
q(w);
|
|
810
811
|
}
|
|
811
812
|
function he(I) {
|
|
812
|
-
be(
|
|
813
|
+
be(T === I ? null : I);
|
|
813
814
|
}
|
|
814
815
|
function be(I) {
|
|
815
|
-
v === void 0 &&
|
|
816
|
+
v === void 0 && c(I), M?.(I);
|
|
816
817
|
}
|
|
817
818
|
return /* @__PURE__ */ m(
|
|
818
|
-
|
|
819
|
+
d,
|
|
819
820
|
{
|
|
820
|
-
...
|
|
821
|
-
ref:
|
|
821
|
+
...D,
|
|
822
|
+
ref: $,
|
|
822
823
|
sx: [
|
|
823
824
|
{
|
|
824
825
|
display: "grid",
|
|
825
|
-
gridTemplateColumns:
|
|
826
|
-
gridTemplateRows:
|
|
826
|
+
gridTemplateColumns: z ? `${Q}% ${i}px 1fr` : "1fr",
|
|
827
|
+
gridTemplateRows: z ? "1fr" : `${Q}% ${i}px 1fr`,
|
|
827
828
|
minHeight: 280,
|
|
828
829
|
overflow: "hidden",
|
|
829
|
-
userSelect:
|
|
830
|
+
userSelect: S ? "none" : void 0
|
|
830
831
|
},
|
|
831
|
-
...Array.isArray(
|
|
832
|
+
...Array.isArray(k) ? k : k ? [k] : []
|
|
832
833
|
],
|
|
833
834
|
onPointerMove: (I) => {
|
|
834
|
-
|
|
835
|
+
S && ee(I.clientX, I.clientY);
|
|
835
836
|
},
|
|
836
837
|
onPointerUp: () => {
|
|
837
|
-
|
|
838
|
+
b(!1);
|
|
838
839
|
},
|
|
839
|
-
onPointerCancel: () =>
|
|
840
|
+
onPointerCancel: () => b(!1),
|
|
840
841
|
children: [
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
|
|
842
|
+
/* @__PURE__ */ t(d, { sx: { minWidth: 0, minHeight: 0, overflow: "auto", display: le ? "none" : void 0 }, children: e }),
|
|
843
|
+
/* @__PURE__ */ t(
|
|
844
|
+
d,
|
|
844
845
|
{
|
|
845
846
|
role: "separator",
|
|
846
|
-
"aria-label":
|
|
847
|
-
"aria-orientation":
|
|
848
|
-
"aria-valuemin":
|
|
849
|
-
"aria-valuemax":
|
|
850
|
-
"aria-valuenow": Math.round(
|
|
847
|
+
"aria-label": X,
|
|
848
|
+
"aria-orientation": z ? "vertical" : "horizontal",
|
|
849
|
+
"aria-valuemin": x,
|
|
850
|
+
"aria-valuemax": p,
|
|
851
|
+
"aria-valuenow": Math.round(a),
|
|
851
852
|
tabIndex: 0,
|
|
852
853
|
onPointerDown: (I) => {
|
|
853
|
-
|
|
854
|
+
b(!0), I.currentTarget.setPointerCapture(I.pointerId), ee(I.clientX, I.clientY);
|
|
854
855
|
},
|
|
855
856
|
onPointerUp: (I) => {
|
|
856
|
-
|
|
857
|
+
b(!1), I.currentTarget.releasePointerCapture(I.pointerId);
|
|
857
858
|
},
|
|
858
859
|
onDoubleClick: K,
|
|
859
860
|
onKeyDown: (I) => {
|
|
@@ -861,8 +862,8 @@ function hr({
|
|
|
861
862
|
},
|
|
862
863
|
sx: {
|
|
863
864
|
position: "relative",
|
|
864
|
-
bgcolor:
|
|
865
|
-
cursor:
|
|
865
|
+
bgcolor: S ? "primary.main" : "divider",
|
|
866
|
+
cursor: z ? "col-resize" : "row-resize",
|
|
866
867
|
touchAction: "none",
|
|
867
868
|
transition: "background-color 120ms ease",
|
|
868
869
|
"&:hover": {
|
|
@@ -876,63 +877,63 @@ function hr({
|
|
|
876
877
|
"&::after": {
|
|
877
878
|
content: '""',
|
|
878
879
|
position: "absolute",
|
|
879
|
-
inset:
|
|
880
|
+
inset: z ? "30% -4px" : "-4px 30%",
|
|
880
881
|
borderRadius: 999,
|
|
881
|
-
bgcolor:
|
|
882
|
+
bgcolor: S ? "primary.contrastText" : "text.disabled",
|
|
882
883
|
opacity: 0.55
|
|
883
884
|
}
|
|
884
885
|
}
|
|
885
886
|
}
|
|
886
887
|
),
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ t(d, { sx: { minWidth: 0, minHeight: 0, overflow: "auto", display: se ? "none" : void 0 }, children: n })
|
|
888
889
|
]
|
|
889
890
|
}
|
|
890
891
|
);
|
|
891
892
|
}
|
|
892
|
-
function
|
|
893
|
-
return n ??
|
|
893
|
+
function vt(e, n) {
|
|
894
|
+
return n ?? e?.getBoundingClientRect() ?? null;
|
|
894
895
|
}
|
|
895
|
-
function
|
|
896
|
-
open:
|
|
896
|
+
function kr({
|
|
897
|
+
open: e,
|
|
897
898
|
children: n,
|
|
898
|
-
anchorEl:
|
|
899
|
+
anchorEl: l,
|
|
899
900
|
anchorRect: s,
|
|
900
|
-
containerRef:
|
|
901
|
-
placement:
|
|
902
|
-
offset:
|
|
903
|
-
boundaryPadding:
|
|
904
|
-
autoUpdate:
|
|
905
|
-
arrow:
|
|
906
|
-
sx:
|
|
907
|
-
...
|
|
901
|
+
containerRef: f,
|
|
902
|
+
placement: u = "top",
|
|
903
|
+
offset: x = 8,
|
|
904
|
+
boundaryPadding: p = 8,
|
|
905
|
+
autoUpdate: i = !0,
|
|
906
|
+
arrow: y = !0,
|
|
907
|
+
sx: g,
|
|
908
|
+
...w
|
|
908
909
|
}) {
|
|
909
|
-
const v = oe(null), [
|
|
910
|
-
if (!
|
|
910
|
+
const v = oe(null), [P, C] = W({ left: -9999, top: -9999 }), o = Ve(() => {
|
|
911
|
+
if (!e)
|
|
911
912
|
return;
|
|
912
|
-
const R =
|
|
913
|
-
if (!R || !
|
|
913
|
+
const R = vt(l, s), h = v.current;
|
|
914
|
+
if (!R || !h)
|
|
914
915
|
return;
|
|
915
|
-
const
|
|
916
|
-
C({ left:
|
|
917
|
-
}, [
|
|
918
|
-
return
|
|
916
|
+
const M = f?.current?.getBoundingClientRect(), N = M?.left ?? 0, X = M?.top ?? 0, k = M?.width ?? window.innerWidth, D = M?.height ?? window.innerHeight, $ = h.offsetWidth / 2, L = h.offsetHeight, j = R.left - N + R.width / 2, O = u === "top" ? R.top - X - x : R.bottom - X + x, c = Math.min(Math.max(j, $ + p), k - $ - p), S = u === "top" ? Math.max(O, L + p) : Math.min(O, D - L - p);
|
|
917
|
+
C({ left: c, top: S });
|
|
918
|
+
}, [l, s, p, f, x, e, u]);
|
|
919
|
+
return Fe(() => {
|
|
919
920
|
o();
|
|
920
|
-
}, [o]),
|
|
921
|
-
if (!(!
|
|
921
|
+
}, [o]), ge(() => {
|
|
922
|
+
if (!(!e || !i))
|
|
922
923
|
return window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
923
924
|
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
|
|
924
925
|
};
|
|
925
|
-
}, [
|
|
926
|
-
|
|
926
|
+
}, [i, e, o]), e ? /* @__PURE__ */ t(
|
|
927
|
+
d,
|
|
927
928
|
{
|
|
928
|
-
...
|
|
929
|
+
...w,
|
|
929
930
|
ref: v,
|
|
930
931
|
role: "toolbar",
|
|
931
932
|
sx: [
|
|
932
933
|
{
|
|
933
|
-
position:
|
|
934
|
-
left:
|
|
935
|
-
top:
|
|
934
|
+
position: f ? "absolute" : "fixed",
|
|
935
|
+
left: P.left,
|
|
936
|
+
top: P.top,
|
|
936
937
|
zIndex: 1300,
|
|
937
938
|
display: "inline-flex",
|
|
938
939
|
alignItems: "center",
|
|
@@ -942,9 +943,9 @@ function fr({
|
|
|
942
943
|
bgcolor: "rgba(15,23,42,0.96)",
|
|
943
944
|
color: "#e5e7eb",
|
|
944
945
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.34)",
|
|
945
|
-
transform:
|
|
946
|
+
transform: u === "top" ? "translate(-50%, -100%)" : "translate(-50%, 0)",
|
|
946
947
|
backdropFilter: "blur(12px)",
|
|
947
|
-
"&::after":
|
|
948
|
+
"&::after": y ? {
|
|
948
949
|
content: '""',
|
|
949
950
|
position: "absolute",
|
|
950
951
|
left: "50%",
|
|
@@ -952,27 +953,27 @@ function fr({
|
|
|
952
953
|
height: 10,
|
|
953
954
|
bgcolor: "rgba(15,23,42,0.96)",
|
|
954
955
|
transform: "translateX(-50%) rotate(45deg)",
|
|
955
|
-
bottom:
|
|
956
|
-
top:
|
|
956
|
+
bottom: u === "top" ? -5 : void 0,
|
|
957
|
+
top: u === "bottom" ? -5 : void 0
|
|
957
958
|
} : void 0
|
|
958
959
|
},
|
|
959
|
-
...Array.isArray(
|
|
960
|
+
...Array.isArray(g) ? g : g ? [g] : []
|
|
960
961
|
],
|
|
961
962
|
children: n
|
|
962
963
|
}
|
|
963
964
|
) : null;
|
|
964
965
|
}
|
|
965
|
-
function
|
|
966
|
-
strength:
|
|
966
|
+
function Cr({
|
|
967
|
+
strength: e = 18,
|
|
967
968
|
tilt: n = 10,
|
|
968
|
-
lift:
|
|
969
|
+
lift: l = 10,
|
|
969
970
|
glare: s = !0,
|
|
970
|
-
perspective:
|
|
971
|
-
sx:
|
|
972
|
-
children:
|
|
973
|
-
...
|
|
971
|
+
perspective: f = 900,
|
|
972
|
+
sx: u,
|
|
973
|
+
children: x,
|
|
974
|
+
...p
|
|
974
975
|
}) {
|
|
975
|
-
const [
|
|
976
|
+
const [i, y] = W({
|
|
976
977
|
x: 0,
|
|
977
978
|
y: 0,
|
|
978
979
|
rotateX: 0,
|
|
@@ -981,23 +982,23 @@ function br({
|
|
|
981
982
|
glareY: 50,
|
|
982
983
|
active: !1
|
|
983
984
|
});
|
|
984
|
-
return /* @__PURE__ */
|
|
985
|
-
|
|
985
|
+
return /* @__PURE__ */ t(
|
|
986
|
+
d,
|
|
986
987
|
{
|
|
987
|
-
...
|
|
988
|
-
onMouseMove: (
|
|
989
|
-
const
|
|
990
|
-
|
|
988
|
+
...p,
|
|
989
|
+
onMouseMove: (g) => {
|
|
990
|
+
const w = g.currentTarget.getBoundingClientRect(), v = (g.clientX - w.left) / w.width, P = (g.clientY - w.top) / w.height, C = (v - 0.5) * e, o = (P - 0.5) * e;
|
|
991
|
+
y({
|
|
991
992
|
x: C,
|
|
992
993
|
y: o,
|
|
993
|
-
rotateX: (0.5 -
|
|
994
|
+
rotateX: (0.5 - P) * n,
|
|
994
995
|
rotateY: (v - 0.5) * n,
|
|
995
996
|
glareX: v * 100,
|
|
996
|
-
glareY:
|
|
997
|
+
glareY: P * 100,
|
|
997
998
|
active: !0
|
|
998
999
|
});
|
|
999
1000
|
},
|
|
1000
|
-
onMouseLeave: () =>
|
|
1001
|
+
onMouseLeave: () => y({
|
|
1001
1002
|
x: 0,
|
|
1002
1003
|
y: 0,
|
|
1003
1004
|
rotateX: 0,
|
|
@@ -1011,49 +1012,49 @@ function br({
|
|
|
1011
1012
|
position: "relative",
|
|
1012
1013
|
overflow: "hidden",
|
|
1013
1014
|
transform: `
|
|
1014
|
-
perspective(${
|
|
1015
|
-
translate3d(${
|
|
1016
|
-
rotateX(${
|
|
1017
|
-
rotateY(${
|
|
1015
|
+
perspective(${f}px)
|
|
1016
|
+
translate3d(${i.x}px, ${i.y}px, ${i.active ? -l : 0}px)
|
|
1017
|
+
rotateX(${i.rotateX}deg)
|
|
1018
|
+
rotateY(${i.rotateY}deg)
|
|
1018
1019
|
`,
|
|
1019
1020
|
transformStyle: "preserve-3d",
|
|
1020
|
-
transition:
|
|
1021
|
+
transition: i.active ? "transform 80ms ease-out, box-shadow 120ms ease-out" : "transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 260ms ease",
|
|
1021
1022
|
willChange: "transform",
|
|
1022
|
-
boxShadow:
|
|
1023
|
+
boxShadow: i.active ? "0 28px 70px rgba(15, 23, 42, 0.24)" : "0 14px 34px rgba(15, 23, 42, 0.12)",
|
|
1023
1024
|
"&::before": s ? {
|
|
1024
1025
|
content: '""',
|
|
1025
1026
|
position: "absolute",
|
|
1026
1027
|
inset: 0,
|
|
1027
1028
|
pointerEvents: "none",
|
|
1028
|
-
opacity:
|
|
1029
|
+
opacity: i.active ? 0.78 : 0,
|
|
1029
1030
|
transition: "opacity 160ms ease",
|
|
1030
|
-
background: `radial-gradient(circle at ${
|
|
1031
|
+
background: `radial-gradient(circle at ${i.glareX}% ${i.glareY}%, rgba(255,255,255,0.55), rgba(255,255,255,0.16) 22%, transparent 48%)`,
|
|
1031
1032
|
mixBlendMode: "screen"
|
|
1032
1033
|
} : void 0,
|
|
1033
1034
|
"& > *": {
|
|
1034
1035
|
position: "relative",
|
|
1035
1036
|
zIndex: 1,
|
|
1036
|
-
transform:
|
|
1037
|
+
transform: i.active ? "translateZ(24px)" : "translateZ(0)",
|
|
1037
1038
|
transition: "transform 180ms ease"
|
|
1038
1039
|
}
|
|
1039
1040
|
},
|
|
1040
|
-
...Array.isArray(
|
|
1041
|
+
...Array.isArray(u) ? u : u ? [u] : []
|
|
1041
1042
|
],
|
|
1042
|
-
children:
|
|
1043
|
+
children: x
|
|
1043
1044
|
}
|
|
1044
1045
|
);
|
|
1045
1046
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const [
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
|
|
1047
|
+
function Ir({ radius: e = 160, dim: n = 0.72, sx: l, children: s, ...f }) {
|
|
1048
|
+
const [u, x] = W({ x: 50, y: 50 });
|
|
1049
|
+
return /* @__PURE__ */ t(
|
|
1050
|
+
d,
|
|
1050
1051
|
{
|
|
1051
|
-
...
|
|
1052
|
-
onMouseMove: (
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1055
|
-
x: (
|
|
1056
|
-
y: (
|
|
1052
|
+
...f,
|
|
1053
|
+
onMouseMove: (p) => {
|
|
1054
|
+
const i = p.currentTarget.getBoundingClientRect();
|
|
1055
|
+
x({
|
|
1056
|
+
x: (p.clientX - i.left) / i.width * 100,
|
|
1057
|
+
y: (p.clientY - i.top) / i.height * 100
|
|
1057
1058
|
});
|
|
1058
1059
|
},
|
|
1059
1060
|
sx: [
|
|
@@ -1065,144 +1066,144 @@ function gr({ radius: t = 160, dim: n = 0.72, sx: d, children: s, ...b }) {
|
|
|
1065
1066
|
position: "absolute",
|
|
1066
1067
|
inset: 0,
|
|
1067
1068
|
pointerEvents: "none",
|
|
1068
|
-
background: `radial-gradient(circle ${
|
|
1069
|
+
background: `radial-gradient(circle ${e}px at ${u.x}% ${u.y}%, transparent 0, transparent 45%, rgba(0,0,0,${n}) 100%)`
|
|
1069
1070
|
}
|
|
1070
1071
|
},
|
|
1071
|
-
...Array.isArray(
|
|
1072
|
+
...Array.isArray(l) ? l : l ? [l] : []
|
|
1072
1073
|
],
|
|
1073
1074
|
children: s
|
|
1074
1075
|
}
|
|
1075
1076
|
);
|
|
1076
1077
|
}
|
|
1077
|
-
function
|
|
1078
|
-
return Math.round(
|
|
1078
|
+
function Ee(e, n) {
|
|
1079
|
+
return Math.round(e / n) * n;
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1083
|
-
const
|
|
1084
|
-
return `M ${
|
|
1081
|
+
function $t(e, n, l, s, f) {
|
|
1082
|
+
const u = e.x + l / 2, x = e.y + s / 2, p = n.x + l / 2, i = n.y + s / 2, y = (u + p) / 2;
|
|
1083
|
+
if (f === "ellipse") {
|
|
1084
|
+
const g = Math.max(Math.abs(p - u) / 2, 24), w = Math.max(Math.abs(i - x) / 2, 24);
|
|
1085
|
+
return `M ${u} ${x} A ${g} ${w} 0 0 1 ${p} ${i}`;
|
|
1085
1086
|
}
|
|
1086
|
-
return
|
|
1087
|
+
return f === "curved" ? `M ${u} ${x} C ${y} ${x}, ${y} ${i}, ${p} ${i}` : f === "step" ? `M ${u} ${x} L ${y} ${x} L ${y} ${i} L ${p} ${i}` : `M ${u} ${x} L ${p} ${i}`;
|
|
1087
1088
|
}
|
|
1088
|
-
function
|
|
1089
|
-
nodes:
|
|
1089
|
+
function Mr({
|
|
1090
|
+
nodes: e,
|
|
1090
1091
|
connections: n = [],
|
|
1091
|
-
nodeWidth:
|
|
1092
|
+
nodeWidth: l = 132,
|
|
1092
1093
|
nodeHeight: s = 52,
|
|
1093
|
-
mode:
|
|
1094
|
-
snapToGrid:
|
|
1095
|
-
gridSize:
|
|
1096
|
-
showGrid:
|
|
1097
|
-
selectedNodeId:
|
|
1098
|
-
connectionStyle:
|
|
1099
|
-
editableTools:
|
|
1100
|
-
linkTypes:
|
|
1094
|
+
mode: f = "edit",
|
|
1095
|
+
snapToGrid: u = !1,
|
|
1096
|
+
gridSize: x = 24,
|
|
1097
|
+
showGrid: p = !1,
|
|
1098
|
+
selectedNodeId: i,
|
|
1099
|
+
connectionStyle: y = "line",
|
|
1100
|
+
editableTools: g = !1,
|
|
1101
|
+
linkTypes: w = ["line", "curved", "step", "ellipse"],
|
|
1101
1102
|
renderNode: v,
|
|
1102
|
-
onNodesChange:
|
|
1103
|
+
onNodesChange: P,
|
|
1103
1104
|
onConnectionsChange: C,
|
|
1104
1105
|
onNodeMove: o,
|
|
1105
1106
|
onNodeSelect: R,
|
|
1106
|
-
sx:
|
|
1107
|
-
...
|
|
1107
|
+
sx: h,
|
|
1108
|
+
...M
|
|
1108
1109
|
}) {
|
|
1109
|
-
const [
|
|
1110
|
-
Object.fromEntries(
|
|
1111
|
-
), [
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
...Object.fromEntries(
|
|
1110
|
+
const [N, X] = W(e), [k, D] = W(n), $ = g ? N : e, L = g ? k : n, [j, O] = W(
|
|
1111
|
+
Object.fromEntries($.map((r) => [r.id, { x: r.x, y: r.y }]))
|
|
1112
|
+
), [c, S] = W(i ?? null), [b, z] = W(!1), [B, a] = W(""), [T, Q] = W(w[0] ?? "line"), [le, se] = W(""), [q, ee] = W(null), U = i ?? c, K = $.find((r) => r.id === U) ?? null, he = L.map((r, A) => ({ connection: r, index: A })).filter(({ connection: r }) => r.from === U || r.to === U), be = e.map((r) => `${r.id}:${r.label}:${r.x}:${r.y}:${r.color ?? ""}`).join("|"), I = n.map((r) => `${r.from}:${r.to}:${r.type ?? ""}:${r.label ?? ""}:${r.color ?? ""}`).join("|");
|
|
1113
|
+
ge(() => {
|
|
1114
|
+
g || X(e), O((r) => ({
|
|
1115
|
+
...Object.fromEntries(e.map((A) => [A.id, r[A.id] ?? { x: A.x, y: A.y }]))
|
|
1115
1116
|
}));
|
|
1116
|
-
}, [
|
|
1117
|
-
|
|
1118
|
-
}, [I,
|
|
1117
|
+
}, [g, be]), ge(() => {
|
|
1118
|
+
g || D(n);
|
|
1119
|
+
}, [I, g]);
|
|
1119
1120
|
function te(r) {
|
|
1120
|
-
|
|
1121
|
+
X(r), P?.(r);
|
|
1121
1122
|
}
|
|
1122
1123
|
function re(r) {
|
|
1123
|
-
|
|
1124
|
+
D(r), C?.(r);
|
|
1124
1125
|
}
|
|
1125
1126
|
function J(r, A) {
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1128
|
-
...
|
|
1129
|
-
[r]:
|
|
1130
|
-
})),
|
|
1127
|
+
const H = u ? { x: Ee(A.x, x), y: Ee(A.y, x) } : A;
|
|
1128
|
+
O((F) => ({
|
|
1129
|
+
...F,
|
|
1130
|
+
[r]: H
|
|
1131
|
+
})), g && te($.map((F) => F.id === r ? { ...F, ...H } : F)), o?.(r, H);
|
|
1131
1132
|
}
|
|
1132
1133
|
function ce() {
|
|
1133
|
-
const r =
|
|
1134
|
+
const r = $.length + 1, A = {
|
|
1134
1135
|
id: `node-${Date.now()}`,
|
|
1135
1136
|
label: `Box ${r}`,
|
|
1136
1137
|
x: 48 + r * 18,
|
|
1137
1138
|
y: 48 + r * 18,
|
|
1138
1139
|
color: "#ffffff"
|
|
1139
1140
|
};
|
|
1140
|
-
te([
|
|
1141
|
-
...
|
|
1141
|
+
te([...$, A]), O((H) => ({
|
|
1142
|
+
...H,
|
|
1142
1143
|
[A.id]: { x: A.x, y: A.y }
|
|
1143
|
-
})),
|
|
1144
|
+
})), S(A.id);
|
|
1144
1145
|
}
|
|
1145
|
-
function
|
|
1146
|
-
U && (te(
|
|
1146
|
+
function me() {
|
|
1147
|
+
U && (te($.filter((r) => r.id !== U)), re(L.filter((r) => r.from !== U && r.to !== U)), S(null), z(!1));
|
|
1147
1148
|
}
|
|
1148
|
-
function
|
|
1149
|
-
U && te(
|
|
1149
|
+
function xe(r) {
|
|
1150
|
+
U && te($.map((A) => A.id === U ? { ...A, ...r } : A));
|
|
1150
1151
|
}
|
|
1151
|
-
function
|
|
1152
|
-
if (!U || !
|
|
1152
|
+
function ze() {
|
|
1153
|
+
if (!U || !B || U === B)
|
|
1153
1154
|
return;
|
|
1154
1155
|
const r = {
|
|
1155
1156
|
from: U,
|
|
1156
|
-
to:
|
|
1157
|
-
type:
|
|
1157
|
+
to: B,
|
|
1158
|
+
type: T,
|
|
1158
1159
|
label: le,
|
|
1159
|
-
color:
|
|
1160
|
+
color: T === "ellipse" ? "#db2777" : T === "step" ? "#059669" : "#2563eb"
|
|
1160
1161
|
}, A = [
|
|
1161
|
-
...L.filter((
|
|
1162
|
+
...L.filter((H) => !(H.from === U && H.to === B)),
|
|
1162
1163
|
r
|
|
1163
1164
|
];
|
|
1164
|
-
re(A),
|
|
1165
|
+
re(A), a(""), se(""), ee(A.indexOf(r));
|
|
1165
1166
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
-
if (!
|
|
1167
|
+
function ye(r, A) {
|
|
1168
|
+
const H = L[r];
|
|
1169
|
+
if (!H)
|
|
1169
1170
|
return;
|
|
1170
|
-
const
|
|
1171
|
-
re(
|
|
1171
|
+
const F = { ...H, ...A }, Z = L.map((G, de) => de === r ? F : G).filter((G, de) => de === r || G.from !== F.from || G.to !== F.to);
|
|
1172
|
+
re(Z);
|
|
1172
1173
|
}
|
|
1173
|
-
function
|
|
1174
|
-
re(L.filter((A,
|
|
1174
|
+
function He(r) {
|
|
1175
|
+
re(L.filter((A, H) => H !== r)), ee(null);
|
|
1175
1176
|
}
|
|
1176
1177
|
return /* @__PURE__ */ m(
|
|
1177
|
-
|
|
1178
|
+
d,
|
|
1178
1179
|
{
|
|
1179
|
-
...
|
|
1180
|
+
...M,
|
|
1180
1181
|
sx: [
|
|
1181
1182
|
{
|
|
1182
1183
|
position: "relative",
|
|
1183
1184
|
minHeight: 360,
|
|
1184
1185
|
overflow: "hidden",
|
|
1185
1186
|
bgcolor: "#f8fafc",
|
|
1186
|
-
backgroundImage:
|
|
1187
|
-
backgroundSize:
|
|
1187
|
+
backgroundImage: p ? "linear-gradient(rgba(148,163,184,0.24) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,0.24) 1px, transparent 1px)" : void 0,
|
|
1188
|
+
backgroundSize: p ? `${x}px ${x}px` : void 0
|
|
1188
1189
|
},
|
|
1189
|
-
...Array.isArray(
|
|
1190
|
+
...Array.isArray(h) ? h : h ? [h] : []
|
|
1190
1191
|
],
|
|
1191
1192
|
children: [
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
const A = j[r.from],
|
|
1194
|
-
if (!A || !
|
|
1193
|
+
/* @__PURE__ */ t(d, { component: "svg", sx: { position: "absolute", inset: 0, width: "100%", height: "100%" }, children: L.map((r) => {
|
|
1194
|
+
const A = j[r.from], H = j[r.to];
|
|
1195
|
+
if (!A || !H)
|
|
1195
1196
|
return null;
|
|
1196
|
-
const
|
|
1197
|
+
const F = $t(A, H, l, s, r.type ?? y), Z = (A.x + H.x + l) / 2, G = (A.y + H.y + s) / 2;
|
|
1197
1198
|
return /* @__PURE__ */ m("g", { children: [
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
r.label ? /* @__PURE__ */
|
|
1199
|
+
/* @__PURE__ */ t("path", { d: F, fill: "none", stroke: r.color ?? "#94a3b8", strokeWidth: "2.5" }),
|
|
1200
|
+
r.label ? /* @__PURE__ */ t("text", { x: Z, y: G - 8, textAnchor: "middle", fill: r.color ?? "#64748b", fontSize: "11", fontWeight: "700", children: r.label }) : null
|
|
1200
1201
|
] }, `${r.from}-${r.to}-${r.type ?? r.label ?? "link"}`);
|
|
1201
1202
|
}) }),
|
|
1202
|
-
|
|
1203
|
-
const A = j[r.id],
|
|
1204
|
-
return /* @__PURE__ */
|
|
1205
|
-
|
|
1203
|
+
$.map((r) => {
|
|
1204
|
+
const A = j[r.id], H = r.id === U;
|
|
1205
|
+
return /* @__PURE__ */ t(
|
|
1206
|
+
d,
|
|
1206
1207
|
{
|
|
1207
1208
|
role: "button",
|
|
1208
1209
|
tabIndex: 0,
|
|
@@ -1210,48 +1211,48 @@ function mr({
|
|
|
1210
1211
|
position: "absolute",
|
|
1211
1212
|
left: A.x,
|
|
1212
1213
|
top: A.y,
|
|
1213
|
-
width:
|
|
1214
|
+
width: l,
|
|
1214
1215
|
height: s,
|
|
1215
1216
|
display: "grid",
|
|
1216
1217
|
placeItems: "center",
|
|
1217
|
-
border:
|
|
1218
|
-
borderColor:
|
|
1218
|
+
border: H ? 2 : 1,
|
|
1219
|
+
borderColor: H ? "primary.main" : "divider",
|
|
1219
1220
|
borderRadius: 1,
|
|
1220
1221
|
bgcolor: r.color ?? "background.paper",
|
|
1221
|
-
cursor:
|
|
1222
|
+
cursor: f === "edit" ? "grab" : "pointer",
|
|
1222
1223
|
userSelect: "none",
|
|
1223
|
-
boxShadow:
|
|
1224
|
+
boxShadow: H ? "0 18px 34px rgba(37,99,235,0.22)" : "0 12px 28px rgba(15,23,42,0.12)",
|
|
1224
1225
|
touchAction: "none"
|
|
1225
1226
|
},
|
|
1226
|
-
onPointerDown: (
|
|
1227
|
-
if (
|
|
1227
|
+
onPointerDown: (F) => {
|
|
1228
|
+
if (S(r.id), ee(null), g && z(!0), R?.(r), f === "readonly")
|
|
1228
1229
|
return;
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
function
|
|
1230
|
+
const Z = F.clientX, G = F.clientY, de = j[r.id];
|
|
1231
|
+
F.currentTarget.setPointerCapture(F.pointerId);
|
|
1232
|
+
function Se(Re) {
|
|
1232
1233
|
J(r.id, {
|
|
1233
|
-
x: de.x +
|
|
1234
|
-
y: de.y +
|
|
1234
|
+
x: de.x + Re.clientX - Z,
|
|
1235
|
+
y: de.y + Re.clientY - G
|
|
1235
1236
|
});
|
|
1236
1237
|
}
|
|
1237
|
-
function
|
|
1238
|
-
window.removeEventListener("pointermove",
|
|
1238
|
+
function Ae() {
|
|
1239
|
+
window.removeEventListener("pointermove", Se), window.removeEventListener("pointerup", Ae);
|
|
1239
1240
|
}
|
|
1240
|
-
window.addEventListener("pointermove",
|
|
1241
|
+
window.addEventListener("pointermove", Se), window.addEventListener("pointerup", Ae);
|
|
1241
1242
|
},
|
|
1242
|
-
onKeyDown: (
|
|
1243
|
-
if (
|
|
1243
|
+
onKeyDown: (F) => {
|
|
1244
|
+
if (f === "readonly")
|
|
1244
1245
|
return;
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1246
|
+
const Z = u ? x : 8, G = j[r.id];
|
|
1247
|
+
F.key === "ArrowLeft" && (J(r.id, { x: G.x - Z, y: G.y }), F.preventDefault()), F.key === "ArrowRight" && (J(r.id, { x: G.x + Z, y: G.y }), F.preventDefault()), F.key === "ArrowUp" && (J(r.id, { x: G.x, y: G.y - Z }), F.preventDefault()), F.key === "ArrowDown" && (J(r.id, { x: G.x, y: G.y + Z }), F.preventDefault());
|
|
1247
1248
|
},
|
|
1248
|
-
children: v ? v(r,
|
|
1249
|
+
children: v ? v(r, H) : /* @__PURE__ */ t(E, { fontWeight: 800, children: r.label })
|
|
1249
1250
|
},
|
|
1250
1251
|
r.id
|
|
1251
1252
|
);
|
|
1252
1253
|
}),
|
|
1253
|
-
|
|
1254
|
-
|
|
1254
|
+
g && K && b ? /* @__PURE__ */ t(
|
|
1255
|
+
d,
|
|
1255
1256
|
{
|
|
1256
1257
|
sx: {
|
|
1257
1258
|
position: "absolute",
|
|
@@ -1268,71 +1269,71 @@ function mr({
|
|
|
1268
1269
|
bgcolor: "background.paper",
|
|
1269
1270
|
boxShadow: "0 20px 48px rgba(15,23,42,0.22)"
|
|
1270
1271
|
},
|
|
1271
|
-
children: /* @__PURE__ */ m(
|
|
1272
|
-
/* @__PURE__ */ m(
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1272
|
+
children: /* @__PURE__ */ m(V, { spacing: 1.25, sx: { p: 1.5 }, children: [
|
|
1273
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 0.75, alignItems: "center", children: [
|
|
1274
|
+
/* @__PURE__ */ t(E, { variant: "subtitle2", fontWeight: 900, sx: { flex: 1 }, children: "Box editor" }),
|
|
1275
|
+
/* @__PURE__ */ t(ie, { title: "Add box", children: /* @__PURE__ */ t(ue, { size: "small", color: "primary", onClick: ce, children: /* @__PURE__ */ t(_e, { fontSize: "small" }) }) }),
|
|
1276
|
+
/* @__PURE__ */ t(ie, { title: "Remove box", children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(ue, { size: "small", color: "error", onClick: me, disabled: !K, children: /* @__PURE__ */ t(Ke, { fontSize: "small" }) }) }) }),
|
|
1277
|
+
/* @__PURE__ */ t(ie, { title: "Close editor", children: /* @__PURE__ */ t(ue, { size: "small", onClick: () => z(!1), children: /* @__PURE__ */ t(Je, { fontSize: "small" }) }) })
|
|
1277
1278
|
] }),
|
|
1278
|
-
/* @__PURE__ */ m(
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
|
|
1279
|
+
/* @__PURE__ */ m(d, { sx: { display: "grid", gridTemplateColumns: "1fr 96px", gap: 1 }, children: [
|
|
1280
|
+
/* @__PURE__ */ t(
|
|
1281
|
+
_,
|
|
1281
1282
|
{
|
|
1282
1283
|
size: "small",
|
|
1283
1284
|
label: "Label",
|
|
1284
1285
|
value: K?.label ?? "",
|
|
1285
1286
|
disabled: !K,
|
|
1286
|
-
onChange: (r) =>
|
|
1287
|
+
onChange: (r) => xe({ label: r.target.value })
|
|
1287
1288
|
}
|
|
1288
1289
|
),
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
|
|
1290
|
+
/* @__PURE__ */ t(
|
|
1291
|
+
_,
|
|
1291
1292
|
{
|
|
1292
1293
|
size: "small",
|
|
1293
1294
|
label: "Color",
|
|
1294
1295
|
type: "color",
|
|
1295
1296
|
value: K?.color ?? "#ffffff",
|
|
1296
1297
|
disabled: !K,
|
|
1297
|
-
onChange: (r) =>
|
|
1298
|
+
onChange: (r) => xe({ color: r.target.value })
|
|
1298
1299
|
}
|
|
1299
1300
|
)
|
|
1300
1301
|
] }),
|
|
1301
|
-
/* @__PURE__ */ m(
|
|
1302
|
-
/* @__PURE__ */ m(
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
/* @__PURE__ */ m(
|
|
1302
|
+
/* @__PURE__ */ m(d, { sx: { display: "grid", gridTemplateColumns: "1fr", gap: 1.25 }, children: [
|
|
1303
|
+
/* @__PURE__ */ m(V, { spacing: 1, children: [
|
|
1304
|
+
/* @__PURE__ */ t(E, { variant: "caption", fontWeight: 900, color: "text.secondary", children: "Links" }),
|
|
1305
|
+
/* @__PURE__ */ m(d, { sx: { display: "grid", gridTemplateColumns: "1fr 32px", gap: 0.5, alignItems: "center" }, children: [
|
|
1305
1306
|
/* @__PURE__ */ m(
|
|
1306
|
-
|
|
1307
|
+
_,
|
|
1307
1308
|
{
|
|
1308
1309
|
select: !0,
|
|
1309
1310
|
size: "small",
|
|
1310
1311
|
label: "To",
|
|
1311
|
-
value:
|
|
1312
|
+
value: B,
|
|
1312
1313
|
disabled: !K,
|
|
1313
|
-
onChange: (r) =>
|
|
1314
|
+
onChange: (r) => a(r.target.value),
|
|
1314
1315
|
children: [
|
|
1315
|
-
/* @__PURE__ */
|
|
1316
|
-
|
|
1316
|
+
/* @__PURE__ */ t(pe, { value: "", children: "Pick target" }),
|
|
1317
|
+
$.filter((r) => r.id !== U).map((r) => /* @__PURE__ */ t(pe, { value: r.id, children: r.label }, r.id))
|
|
1317
1318
|
]
|
|
1318
1319
|
}
|
|
1319
1320
|
),
|
|
1320
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ t(ie, { title: `Add link from ${K?.label ?? "box"}`, children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
1321
1322
|
ue,
|
|
1322
1323
|
{
|
|
1323
1324
|
size: "small",
|
|
1324
1325
|
color: "primary",
|
|
1325
|
-
disabled: !K || !
|
|
1326
|
-
onClick:
|
|
1326
|
+
disabled: !K || !B,
|
|
1327
|
+
onClick: ze,
|
|
1327
1328
|
sx: { width: 32, height: 32, border: 1, borderColor: "divider", borderRadius: 1 },
|
|
1328
|
-
children: /* @__PURE__ */
|
|
1329
|
+
children: /* @__PURE__ */ t(Qe, { fontSize: "small" })
|
|
1329
1330
|
}
|
|
1330
1331
|
) }) })
|
|
1331
1332
|
] }),
|
|
1332
1333
|
he.length ? he.map(({ connection: r, index: A }) => {
|
|
1333
|
-
const
|
|
1334
|
+
const H = $.find((G) => G.id === r.from), F = $.find((G) => G.id === r.to), Z = q === A;
|
|
1334
1335
|
return /* @__PURE__ */ m(
|
|
1335
|
-
|
|
1336
|
+
d,
|
|
1336
1337
|
{
|
|
1337
1338
|
sx: {
|
|
1338
1339
|
width: "100%",
|
|
@@ -1342,8 +1343,8 @@ function mr({
|
|
|
1342
1343
|
alignItems: "center"
|
|
1343
1344
|
},
|
|
1344
1345
|
children: [
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
|
|
1346
|
+
/* @__PURE__ */ t(
|
|
1347
|
+
d,
|
|
1347
1348
|
{
|
|
1348
1349
|
component: "button",
|
|
1349
1350
|
onClick: () => ee(A),
|
|
@@ -1352,72 +1353,72 @@ function mr({
|
|
|
1352
1353
|
py: 0.75,
|
|
1353
1354
|
minWidth: 0,
|
|
1354
1355
|
border: 1,
|
|
1355
|
-
borderColor:
|
|
1356
|
+
borderColor: Z ? "primary.main" : "divider",
|
|
1356
1357
|
borderRadius: 1,
|
|
1357
|
-
bgcolor:
|
|
1358
|
-
color:
|
|
1358
|
+
bgcolor: Z ? "primary.main" : "background.paper",
|
|
1359
|
+
color: Z ? "primary.contrastText" : "text.primary",
|
|
1359
1360
|
cursor: "pointer",
|
|
1360
1361
|
font: "inherit",
|
|
1361
1362
|
textAlign: "left"
|
|
1362
1363
|
},
|
|
1363
|
-
children: (
|
|
1364
|
+
children: (H?.label ?? r.from) + " -> " + (F?.label ?? r.to)
|
|
1364
1365
|
}
|
|
1365
1366
|
),
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ t(ie, { title: "Remove link", children: /* @__PURE__ */ t(ue, { size: "small", color: "error", onClick: () => He(A), sx: { width: 32, height: 32 }, children: /* @__PURE__ */ t(et, { fontSize: "small" }) }) })
|
|
1367
1368
|
]
|
|
1368
1369
|
},
|
|
1369
1370
|
`${r.from}-${r.to}-${A}`
|
|
1370
1371
|
);
|
|
1371
|
-
}) : /* @__PURE__ */
|
|
1372
|
+
}) : /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: "No linked boxes." })
|
|
1372
1373
|
] }),
|
|
1373
|
-
/* @__PURE__ */ m(
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
|
|
1376
|
-
/* @__PURE__ */
|
|
1377
|
-
|
|
1374
|
+
/* @__PURE__ */ m(V, { spacing: 1, children: [
|
|
1375
|
+
/* @__PURE__ */ t(E, { variant: "caption", fontWeight: 900, color: "text.secondary", children: "Link details" }),
|
|
1376
|
+
q !== null && L[q] ? /* @__PURE__ */ m(Ye, { children: [
|
|
1377
|
+
/* @__PURE__ */ t(
|
|
1378
|
+
_,
|
|
1378
1379
|
{
|
|
1379
1380
|
select: !0,
|
|
1380
1381
|
size: "small",
|
|
1381
1382
|
label: "From",
|
|
1382
|
-
value: L[
|
|
1383
|
-
onChange: (r) =>
|
|
1384
|
-
children:
|
|
1383
|
+
value: L[q].from,
|
|
1384
|
+
onChange: (r) => ye(q, { from: r.target.value }),
|
|
1385
|
+
children: $.filter((r) => r.id !== L[q].to).map((r) => /* @__PURE__ */ t(pe, { value: r.id, children: r.label }, r.id))
|
|
1385
1386
|
}
|
|
1386
1387
|
),
|
|
1387
|
-
/* @__PURE__ */ m(
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
|
|
1388
|
+
/* @__PURE__ */ m(d, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 1 }, children: [
|
|
1389
|
+
/* @__PURE__ */ t(
|
|
1390
|
+
_,
|
|
1390
1391
|
{
|
|
1391
1392
|
select: !0,
|
|
1392
1393
|
size: "small",
|
|
1393
1394
|
label: "To",
|
|
1394
|
-
value: L[
|
|
1395
|
-
onChange: (r) =>
|
|
1396
|
-
children:
|
|
1395
|
+
value: L[q].to,
|
|
1396
|
+
onChange: (r) => ye(q, { to: r.target.value }),
|
|
1397
|
+
children: $.filter((r) => r.id !== L[q].from).map((r) => /* @__PURE__ */ t(pe, { value: r.id, children: r.label }, r.id))
|
|
1397
1398
|
}
|
|
1398
1399
|
),
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
|
|
1400
|
+
/* @__PURE__ */ t(
|
|
1401
|
+
_,
|
|
1401
1402
|
{
|
|
1402
1403
|
select: !0,
|
|
1403
1404
|
size: "small",
|
|
1404
1405
|
label: "Shape",
|
|
1405
|
-
value: L[
|
|
1406
|
-
onChange: (r) =>
|
|
1407
|
-
children:
|
|
1406
|
+
value: L[q].type ?? y,
|
|
1407
|
+
onChange: (r) => ye(q, { type: r.target.value }),
|
|
1408
|
+
children: w.map((r) => /* @__PURE__ */ t(pe, { value: r, children: r }, r))
|
|
1408
1409
|
}
|
|
1409
1410
|
)
|
|
1410
1411
|
] }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
|
|
1412
|
+
/* @__PURE__ */ t(
|
|
1413
|
+
_,
|
|
1413
1414
|
{
|
|
1414
1415
|
size: "small",
|
|
1415
1416
|
label: "Label",
|
|
1416
|
-
value: L[
|
|
1417
|
-
onChange: (r) =>
|
|
1417
|
+
value: L[q].label ?? "",
|
|
1418
|
+
onChange: (r) => ye(q, { label: r.target.value })
|
|
1418
1419
|
}
|
|
1419
1420
|
)
|
|
1420
|
-
] }) : /* @__PURE__ */
|
|
1421
|
+
] }) : /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: "Pick a link." })
|
|
1421
1422
|
] })
|
|
1422
1423
|
] })
|
|
1423
1424
|
] })
|
|
@@ -1427,61 +1428,61 @@ function mr({
|
|
|
1427
1428
|
}
|
|
1428
1429
|
);
|
|
1429
1430
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const [
|
|
1431
|
+
function zr({ before: e, after: n, initialPosition: l = 50, sx: s, ...f }) {
|
|
1432
|
+
const [u, x] = W(l);
|
|
1432
1433
|
return /* @__PURE__ */ m(
|
|
1433
|
-
|
|
1434
|
+
d,
|
|
1434
1435
|
{
|
|
1435
|
-
...
|
|
1436
|
+
...f,
|
|
1436
1437
|
sx: [
|
|
1437
1438
|
{ position: "relative", overflow: "hidden", minHeight: 280 },
|
|
1438
1439
|
...Array.isArray(s) ? s : s ? [s] : []
|
|
1439
1440
|
],
|
|
1440
|
-
onPointerMove: (
|
|
1441
|
-
if (
|
|
1441
|
+
onPointerMove: (p) => {
|
|
1442
|
+
if (p.buttons !== 1)
|
|
1442
1443
|
return;
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1444
|
+
const i = p.currentTarget.getBoundingClientRect();
|
|
1445
|
+
x((p.clientX - i.left) / i.width * 100);
|
|
1445
1446
|
},
|
|
1446
1447
|
children: [
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ t(d, { sx: { position: "absolute", inset: 0 }, children: n }),
|
|
1449
|
+
/* @__PURE__ */ t(d, { sx: { position: "absolute", inset: 0, width: `${u}%`, overflow: "hidden" }, children: e }),
|
|
1450
|
+
/* @__PURE__ */ t(d, { sx: { position: "absolute", top: 0, bottom: 0, left: `${u}%`, width: 3, bgcolor: "#ffffff", boxShadow: "0 0 0 1px rgba(0,0,0,0.2)", cursor: "ew-resize" } })
|
|
1450
1451
|
]
|
|
1451
1452
|
}
|
|
1452
1453
|
);
|
|
1453
1454
|
}
|
|
1454
|
-
function
|
|
1455
|
-
initialWidth:
|
|
1455
|
+
function Sr({
|
|
1456
|
+
initialWidth: e = 320,
|
|
1456
1457
|
initialHeight: n = 220,
|
|
1457
|
-
minWidth:
|
|
1458
|
+
minWidth: l = 160,
|
|
1458
1459
|
minHeight: s = 120,
|
|
1459
|
-
sx:
|
|
1460
|
-
children:
|
|
1461
|
-
...
|
|
1460
|
+
sx: f,
|
|
1461
|
+
children: u,
|
|
1462
|
+
...x
|
|
1462
1463
|
}) {
|
|
1463
|
-
const [
|
|
1464
|
+
const [p, i] = W({ width: e, height: n });
|
|
1464
1465
|
return /* @__PURE__ */ m(
|
|
1465
|
-
|
|
1466
|
+
d,
|
|
1466
1467
|
{
|
|
1467
|
-
...
|
|
1468
|
+
...x,
|
|
1468
1469
|
sx: [
|
|
1469
1470
|
{
|
|
1470
1471
|
position: "relative",
|
|
1471
|
-
width:
|
|
1472
|
-
height:
|
|
1472
|
+
width: p.width,
|
|
1473
|
+
height: p.height,
|
|
1473
1474
|
overflow: "auto",
|
|
1474
1475
|
border: 1,
|
|
1475
1476
|
borderColor: "divider",
|
|
1476
1477
|
borderRadius: 1,
|
|
1477
1478
|
bgcolor: "background.paper"
|
|
1478
1479
|
},
|
|
1479
|
-
...Array.isArray(
|
|
1480
|
+
...Array.isArray(f) ? f : f ? [f] : []
|
|
1480
1481
|
],
|
|
1481
1482
|
children: [
|
|
1482
|
-
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
|
|
1483
|
+
u,
|
|
1484
|
+
/* @__PURE__ */ t(
|
|
1485
|
+
d,
|
|
1485
1486
|
{
|
|
1486
1487
|
sx: {
|
|
1487
1488
|
position: "absolute",
|
|
@@ -1499,91 +1500,91 @@ function yr({
|
|
|
1499
1500
|
borderRadius: 1,
|
|
1500
1501
|
boxShadow: "0 6px 16px rgba(15,23,42,0.14)"
|
|
1501
1502
|
},
|
|
1502
|
-
onPointerDown: (
|
|
1503
|
-
const
|
|
1504
|
-
function
|
|
1505
|
-
|
|
1506
|
-
width: Math.max(
|
|
1507
|
-
height: Math.max(s, v.height + o.clientY -
|
|
1503
|
+
onPointerDown: (y) => {
|
|
1504
|
+
const g = y.clientX, w = y.clientY, v = p;
|
|
1505
|
+
function P(o) {
|
|
1506
|
+
i({
|
|
1507
|
+
width: Math.max(l, v.width + o.clientX - g),
|
|
1508
|
+
height: Math.max(s, v.height + o.clientY - w)
|
|
1508
1509
|
});
|
|
1509
1510
|
}
|
|
1510
1511
|
function C() {
|
|
1511
|
-
window.removeEventListener("pointermove",
|
|
1512
|
+
window.removeEventListener("pointermove", P), window.removeEventListener("pointerup", C);
|
|
1512
1513
|
}
|
|
1513
|
-
window.addEventListener("pointermove",
|
|
1514
|
+
window.addEventListener("pointermove", P), window.addEventListener("pointerup", C);
|
|
1514
1515
|
},
|
|
1515
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ t(tt, { fontSize: "small" })
|
|
1516
1517
|
}
|
|
1517
1518
|
)
|
|
1518
1519
|
]
|
|
1519
1520
|
}
|
|
1520
1521
|
);
|
|
1521
1522
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1523
|
+
function kt(e) {
|
|
1524
|
+
return e.type === "boolean" ? e.value ? "On" : "Off" : `${e.value}${e.unit ? ` ${e.unit}` : ""}`;
|
|
1524
1525
|
}
|
|
1525
|
-
function
|
|
1526
|
-
return
|
|
1527
|
-
const s =
|
|
1526
|
+
function Ct(e) {
|
|
1527
|
+
return e.reduce((n, l) => {
|
|
1528
|
+
const s = l.group ?? "Settings";
|
|
1528
1529
|
return {
|
|
1529
1530
|
...n,
|
|
1530
|
-
[s]: [...n[s] ?? [],
|
|
1531
|
+
[s]: [...n[s] ?? [], l]
|
|
1531
1532
|
};
|
|
1532
1533
|
}, {});
|
|
1533
1534
|
}
|
|
1534
|
-
function
|
|
1535
|
-
fields:
|
|
1535
|
+
function Ar({
|
|
1536
|
+
fields: e,
|
|
1536
1537
|
onChange: n,
|
|
1537
|
-
title:
|
|
1538
|
+
title: l = "Inspector",
|
|
1538
1539
|
description: s,
|
|
1539
|
-
density:
|
|
1540
|
-
showValueSummary:
|
|
1541
|
-
showReset:
|
|
1542
|
-
sx:
|
|
1540
|
+
density: f = "comfortable",
|
|
1541
|
+
showValueSummary: u = !0,
|
|
1542
|
+
showReset: x = !0,
|
|
1543
|
+
sx: p
|
|
1543
1544
|
}) {
|
|
1544
|
-
const
|
|
1545
|
-
function
|
|
1545
|
+
const i = Ct(e), y = f === "compact" ? 1.25 : 2, g = f === "compact" ? "small" : "medium";
|
|
1546
|
+
function w(v) {
|
|
1546
1547
|
v.defaultValue !== void 0 && n?.(v.id, v.defaultValue);
|
|
1547
1548
|
}
|
|
1548
|
-
return /* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */ m(
|
|
1550
|
-
/* @__PURE__ */ m(
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
|
|
1549
|
+
return /* @__PURE__ */ t(Me, { variant: "outlined", sx: [{ p: f === "compact" ? 1.5 : 2, borderRadius: 1 }, ...Array.isArray(p) ? p : [p]], children: /* @__PURE__ */ m(V, { spacing: y, children: [
|
|
1550
|
+
/* @__PURE__ */ m(d, { children: [
|
|
1551
|
+
/* @__PURE__ */ m(V, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 1, children: [
|
|
1552
|
+
/* @__PURE__ */ t(E, { variant: "subtitle1", fontWeight: 850, children: l }),
|
|
1553
|
+
u ? /* @__PURE__ */ t(we, { size: "small", label: `${e.length} fields` }) : null
|
|
1553
1554
|
] }),
|
|
1554
|
-
s ? /* @__PURE__ */
|
|
1555
|
+
s ? /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", sx: { mt: 0.5 }, children: s }) : null
|
|
1555
1556
|
] }),
|
|
1556
|
-
Object.entries(
|
|
1557
|
-
C > 0 ? /* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
|
|
1560
|
-
const R =
|
|
1561
|
-
return o.type === "boolean" ? /* @__PURE__ */ m(
|
|
1562
|
-
/* @__PURE__ */ m(
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
|
|
1557
|
+
Object.entries(i).map(([v, P], C) => /* @__PURE__ */ m(V, { spacing: y, children: [
|
|
1558
|
+
C > 0 ? /* @__PURE__ */ t(nt, {}) : null,
|
|
1559
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", fontWeight: 850, sx: { textTransform: "uppercase" }, children: v }),
|
|
1560
|
+
P.map((o) => {
|
|
1561
|
+
const R = x && o.defaultValue !== void 0 && o.defaultValue !== o.value;
|
|
1562
|
+
return o.type === "boolean" ? /* @__PURE__ */ m(d, { children: [
|
|
1563
|
+
/* @__PURE__ */ m(V, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 1, children: [
|
|
1564
|
+
/* @__PURE__ */ t(
|
|
1565
|
+
ot,
|
|
1565
1566
|
{
|
|
1566
|
-
control: /* @__PURE__ */
|
|
1567
|
-
|
|
1567
|
+
control: /* @__PURE__ */ t(
|
|
1568
|
+
rt,
|
|
1568
1569
|
{
|
|
1569
1570
|
checked: !!o.value,
|
|
1570
1571
|
disabled: o.disabled,
|
|
1571
|
-
onChange: (
|
|
1572
|
+
onChange: (h) => n?.(o.id, h.target.checked)
|
|
1572
1573
|
}
|
|
1573
1574
|
),
|
|
1574
1575
|
label: o.label
|
|
1575
1576
|
}
|
|
1576
1577
|
),
|
|
1577
|
-
R ? /* @__PURE__ */
|
|
1578
|
+
R ? /* @__PURE__ */ t(ae, { size: "small", onClick: () => w(o), children: "Reset" }) : null
|
|
1578
1579
|
] }),
|
|
1579
|
-
o.description ? /* @__PURE__ */
|
|
1580
|
-
] }, o.id) : o.type === "number" ? /* @__PURE__ */ m(
|
|
1581
|
-
/* @__PURE__ */ m(
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
|
|
1580
|
+
o.description ? /* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", children: o.description }) : null
|
|
1581
|
+
] }, o.id) : o.type === "number" ? /* @__PURE__ */ m(V, { spacing: 1, children: [
|
|
1582
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", children: [
|
|
1583
|
+
/* @__PURE__ */ t(
|
|
1584
|
+
_,
|
|
1584
1585
|
{
|
|
1585
1586
|
fullWidth: !0,
|
|
1586
|
-
size:
|
|
1587
|
+
size: g,
|
|
1587
1588
|
label: o.label,
|
|
1588
1589
|
type: "number",
|
|
1589
1590
|
value: o.value,
|
|
@@ -1594,14 +1595,14 @@ function wr({
|
|
|
1594
1595
|
max: o.max,
|
|
1595
1596
|
step: o.step
|
|
1596
1597
|
},
|
|
1597
|
-
onChange: (
|
|
1598
|
+
onChange: (h) => n?.(o.id, Number(h.target.value))
|
|
1598
1599
|
}
|
|
1599
1600
|
),
|
|
1600
|
-
o.unit ? /* @__PURE__ */
|
|
1601
|
-
R ? /* @__PURE__ */
|
|
1601
|
+
o.unit ? /* @__PURE__ */ t(we, { label: o.unit, size: "small", sx: { mt: 1 } }) : null,
|
|
1602
|
+
R ? /* @__PURE__ */ t(ae, { size: "small", onClick: () => w(o), sx: { mt: 0.5 }, children: "Reset" }) : null
|
|
1602
1603
|
] }),
|
|
1603
|
-
o.min !== void 0 || o.max !== void 0 ? /* @__PURE__ */
|
|
1604
|
-
|
|
1604
|
+
o.min !== void 0 || o.max !== void 0 ? /* @__PURE__ */ t(
|
|
1605
|
+
Ne,
|
|
1605
1606
|
{
|
|
1606
1607
|
value: Number(o.value),
|
|
1607
1608
|
min: o.min ?? 0,
|
|
@@ -1609,45 +1610,45 @@ function wr({
|
|
|
1609
1610
|
step: o.step ?? 1,
|
|
1610
1611
|
disabled: o.disabled,
|
|
1611
1612
|
valueLabelDisplay: "auto",
|
|
1612
|
-
onChange: (
|
|
1613
|
+
onChange: (h, M) => n?.(o.id, Array.isArray(M) ? M[0] : M)
|
|
1613
1614
|
}
|
|
1614
1615
|
) : null
|
|
1615
|
-
] }, o.id) : o.type === "select" ? /* @__PURE__ */ m(
|
|
1616
|
-
/* @__PURE__ */
|
|
1617
|
-
|
|
1616
|
+
] }, o.id) : o.type === "select" ? /* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", children: [
|
|
1617
|
+
/* @__PURE__ */ t(
|
|
1618
|
+
_,
|
|
1618
1619
|
{
|
|
1619
1620
|
select: !0,
|
|
1620
1621
|
fullWidth: !0,
|
|
1621
|
-
size:
|
|
1622
|
+
size: g,
|
|
1622
1623
|
label: o.label,
|
|
1623
1624
|
value: o.value,
|
|
1624
1625
|
helperText: o.description,
|
|
1625
1626
|
disabled: o.disabled,
|
|
1626
|
-
onChange: (
|
|
1627
|
-
children: (o.options ?? []).map((
|
|
1627
|
+
onChange: (h) => n?.(o.id, h.target.value),
|
|
1628
|
+
children: (o.options ?? []).map((h) => /* @__PURE__ */ t(pe, { value: h.value, children: h.label }, h.value))
|
|
1628
1629
|
}
|
|
1629
1630
|
),
|
|
1630
|
-
R ? /* @__PURE__ */
|
|
1631
|
-
] }, o.id) : o.type === "color" ? /* @__PURE__ */ m(
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
|
|
1631
|
+
R ? /* @__PURE__ */ t(ae, { size: "small", onClick: () => w(o), sx: { mt: 0.5 }, children: "Reset" }) : null
|
|
1632
|
+
] }, o.id) : o.type === "color" ? /* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", children: [
|
|
1633
|
+
/* @__PURE__ */ t(
|
|
1634
|
+
_,
|
|
1634
1635
|
{
|
|
1635
1636
|
fullWidth: !0,
|
|
1636
|
-
size:
|
|
1637
|
+
size: g,
|
|
1637
1638
|
label: o.label,
|
|
1638
1639
|
value: o.value,
|
|
1639
1640
|
helperText: o.description,
|
|
1640
1641
|
disabled: o.disabled,
|
|
1641
|
-
onChange: (
|
|
1642
|
+
onChange: (h) => n?.(o.id, h.target.value),
|
|
1642
1643
|
InputProps: {
|
|
1643
|
-
startAdornment: /* @__PURE__ */
|
|
1644
|
-
|
|
1644
|
+
startAdornment: /* @__PURE__ */ t(
|
|
1645
|
+
d,
|
|
1645
1646
|
{
|
|
1646
1647
|
component: "input",
|
|
1647
1648
|
type: "color",
|
|
1648
1649
|
value: String(o.value),
|
|
1649
1650
|
disabled: o.disabled,
|
|
1650
|
-
onChange: (
|
|
1651
|
+
onChange: (h) => n?.(o.id, h.target.value),
|
|
1651
1652
|
sx: {
|
|
1652
1653
|
width: 28,
|
|
1653
1654
|
height: 28,
|
|
@@ -1662,42 +1663,42 @@ function wr({
|
|
|
1662
1663
|
}
|
|
1663
1664
|
}
|
|
1664
1665
|
),
|
|
1665
|
-
R ? /* @__PURE__ */
|
|
1666
|
-
] }, o.id) : /* @__PURE__ */ m(
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
|
|
1666
|
+
R ? /* @__PURE__ */ t(ae, { size: "small", onClick: () => w(o), sx: { mt: 0.5 }, children: "Reset" }) : null
|
|
1667
|
+
] }, o.id) : /* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", children: [
|
|
1668
|
+
/* @__PURE__ */ t(
|
|
1669
|
+
_,
|
|
1669
1670
|
{
|
|
1670
1671
|
fullWidth: !0,
|
|
1671
|
-
size:
|
|
1672
|
+
size: g,
|
|
1672
1673
|
label: o.label,
|
|
1673
1674
|
value: o.value,
|
|
1674
1675
|
helperText: o.description,
|
|
1675
1676
|
disabled: o.disabled,
|
|
1676
|
-
onChange: (
|
|
1677
|
+
onChange: (h) => n?.(o.id, h.target.value)
|
|
1677
1678
|
}
|
|
1678
1679
|
),
|
|
1679
|
-
R ? /* @__PURE__ */
|
|
1680
|
+
R ? /* @__PURE__ */ t(ae, { size: "small", onClick: () => w(o), sx: { mt: 0.5 }, children: "Reset" }) : null
|
|
1680
1681
|
] }, o.id);
|
|
1681
1682
|
})
|
|
1682
1683
|
] }, v)),
|
|
1683
|
-
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */
|
|
1684
|
+
u ? /* @__PURE__ */ m(d, { sx: { p: 1.25, borderRadius: 1, bgcolor: "action.hover" }, children: [
|
|
1685
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", fontWeight: 850, children: "Current values" }),
|
|
1686
|
+
/* @__PURE__ */ t(V, { direction: "row", flexWrap: "wrap", gap: 0.75, sx: { mt: 1 }, children: e.map((v) => /* @__PURE__ */ t(we, { size: "small", label: `${v.label}: ${kt(v)}` }, v.id)) })
|
|
1686
1687
|
] }) : null
|
|
1687
1688
|
] }) });
|
|
1688
1689
|
}
|
|
1689
|
-
function
|
|
1690
|
-
value:
|
|
1690
|
+
function Rr({
|
|
1691
|
+
value: e,
|
|
1691
1692
|
alpha: n = 1,
|
|
1692
|
-
swatches:
|
|
1693
|
+
swatches: l = ["#2563eb", "#7c3aed", "#db2777", "#dc2626", "#f59e0b", "#059669"],
|
|
1693
1694
|
showValue: s = !0,
|
|
1694
|
-
onChange:
|
|
1695
|
-
onAlphaChange:
|
|
1695
|
+
onChange: f,
|
|
1696
|
+
onAlphaChange: u
|
|
1696
1697
|
}) {
|
|
1697
|
-
const
|
|
1698
|
-
return /* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
|
|
1698
|
+
const x = Math.round(n * 100), p = `${e}${Math.round(n * 255).toString(16).padStart(2, "0")}`;
|
|
1699
|
+
return /* @__PURE__ */ t(Me, { variant: "outlined", sx: { p: 2, borderRadius: 1 }, children: /* @__PURE__ */ m(V, { spacing: 2, children: [
|
|
1700
|
+
/* @__PURE__ */ t(
|
|
1701
|
+
d,
|
|
1701
1702
|
{
|
|
1702
1703
|
sx: {
|
|
1703
1704
|
height: 96,
|
|
@@ -1708,97 +1709,97 @@ function vr({
|
|
|
1708
1709
|
backgroundSize: "18px 18px",
|
|
1709
1710
|
backgroundPosition: "0 0, 0 9px, 9px -9px, -9px 0"
|
|
1710
1711
|
},
|
|
1711
|
-
children: /* @__PURE__ */
|
|
1712
|
+
children: /* @__PURE__ */ t(d, { sx: { height: "100%", borderRadius: 1, bgcolor: e, opacity: n } })
|
|
1712
1713
|
}
|
|
1713
1714
|
),
|
|
1714
|
-
/* @__PURE__ */ m(
|
|
1715
|
-
/* @__PURE__ */
|
|
1716
|
-
|
|
1715
|
+
/* @__PURE__ */ m(V, { direction: { xs: "column", sm: "row" }, spacing: 1.5, children: [
|
|
1716
|
+
/* @__PURE__ */ t(
|
|
1717
|
+
_,
|
|
1717
1718
|
{
|
|
1718
1719
|
label: "Color",
|
|
1719
1720
|
type: "color",
|
|
1720
|
-
value:
|
|
1721
|
-
onChange: (
|
|
1721
|
+
value: e,
|
|
1722
|
+
onChange: (i) => f?.(i.target.value),
|
|
1722
1723
|
sx: { width: { xs: "100%", sm: 120 } }
|
|
1723
1724
|
}
|
|
1724
1725
|
),
|
|
1725
|
-
/* @__PURE__ */
|
|
1726
|
-
|
|
1726
|
+
/* @__PURE__ */ t(
|
|
1727
|
+
_,
|
|
1727
1728
|
{
|
|
1728
1729
|
label: "Hex",
|
|
1729
|
-
value:
|
|
1730
|
-
onChange: (
|
|
1730
|
+
value: e,
|
|
1731
|
+
onChange: (i) => f?.(i.target.value),
|
|
1731
1732
|
fullWidth: !0
|
|
1732
1733
|
}
|
|
1733
1734
|
)
|
|
1734
1735
|
] }),
|
|
1735
|
-
/* @__PURE__ */ m(
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
|
|
1736
|
+
/* @__PURE__ */ m(d, { children: [
|
|
1737
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", fontWeight: 800, children: "Alpha" }),
|
|
1738
|
+
/* @__PURE__ */ t(
|
|
1739
|
+
Ne,
|
|
1739
1740
|
{
|
|
1740
1741
|
min: 0,
|
|
1741
1742
|
max: 1,
|
|
1742
1743
|
step: 0.01,
|
|
1743
1744
|
value: n,
|
|
1744
|
-
onChange: (
|
|
1745
|
+
onChange: (i, y) => u?.(Array.isArray(y) ? y[0] : y),
|
|
1745
1746
|
valueLabelDisplay: "auto",
|
|
1746
|
-
valueLabelFormat: (
|
|
1747
|
+
valueLabelFormat: (i) => `${Math.round(i * 100)}%`
|
|
1747
1748
|
}
|
|
1748
1749
|
),
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
|
|
1750
|
+
/* @__PURE__ */ t(
|
|
1751
|
+
_,
|
|
1751
1752
|
{
|
|
1752
1753
|
label: "Alpha",
|
|
1753
1754
|
type: "number",
|
|
1754
|
-
value:
|
|
1755
|
-
onChange: (
|
|
1755
|
+
value: x,
|
|
1756
|
+
onChange: (i) => u?.(Math.min(Math.max(Number(i.target.value), 0), 100) / 100),
|
|
1756
1757
|
InputProps: {
|
|
1757
|
-
endAdornment: /* @__PURE__ */
|
|
1758
|
+
endAdornment: /* @__PURE__ */ t(it, { position: "end", children: "%" })
|
|
1758
1759
|
},
|
|
1759
1760
|
fullWidth: !0
|
|
1760
1761
|
}
|
|
1761
1762
|
)
|
|
1762
1763
|
] }),
|
|
1763
|
-
/* @__PURE__ */
|
|
1764
|
-
|
|
1764
|
+
/* @__PURE__ */ t(d, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: l.map((i) => /* @__PURE__ */ t(
|
|
1765
|
+
d,
|
|
1765
1766
|
{
|
|
1766
1767
|
component: "button",
|
|
1767
|
-
"aria-label":
|
|
1768
|
-
onClick: () =>
|
|
1768
|
+
"aria-label": i,
|
|
1769
|
+
onClick: () => f?.(i),
|
|
1769
1770
|
sx: {
|
|
1770
1771
|
width: 32,
|
|
1771
1772
|
height: 32,
|
|
1772
1773
|
borderRadius: "50%",
|
|
1773
1774
|
border: 2,
|
|
1774
|
-
borderColor:
|
|
1775
|
-
bgcolor:
|
|
1775
|
+
borderColor: i.toLowerCase() === e.toLowerCase() ? "text.primary" : "divider",
|
|
1776
|
+
bgcolor: i,
|
|
1776
1777
|
cursor: "pointer"
|
|
1777
1778
|
}
|
|
1778
1779
|
},
|
|
1779
|
-
|
|
1780
|
+
i
|
|
1780
1781
|
)) }),
|
|
1781
|
-
s ? /* @__PURE__ */ m(
|
|
1782
|
-
/* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1782
|
+
s ? /* @__PURE__ */ m(d, { sx: { p: 1.5, borderRadius: 1, bgcolor: "#0f172a", color: "#e5e7eb" }, children: [
|
|
1783
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "#94a3b8", children: "selected color" }),
|
|
1784
|
+
/* @__PURE__ */ t(E, { fontFamily: "monospace", children: p })
|
|
1784
1785
|
] }) : null
|
|
1785
1786
|
] }) });
|
|
1786
1787
|
}
|
|
1787
|
-
function
|
|
1788
|
-
const [s,
|
|
1789
|
-
function
|
|
1790
|
-
|
|
1788
|
+
function Lr({ onFiles: e, sx: n, ...l }) {
|
|
1789
|
+
const [s, f] = W(!1);
|
|
1790
|
+
function u(x) {
|
|
1791
|
+
x && e?.(Array.from(x));
|
|
1791
1792
|
}
|
|
1792
1793
|
return /* @__PURE__ */ m(
|
|
1793
|
-
|
|
1794
|
+
d,
|
|
1794
1795
|
{
|
|
1795
|
-
...
|
|
1796
|
-
onDragOver: (
|
|
1797
|
-
|
|
1796
|
+
...l,
|
|
1797
|
+
onDragOver: (x) => {
|
|
1798
|
+
x.preventDefault(), f(!0);
|
|
1798
1799
|
},
|
|
1799
|
-
onDragLeave: () =>
|
|
1800
|
-
onDrop: (
|
|
1801
|
-
|
|
1800
|
+
onDragLeave: () => f(!1),
|
|
1801
|
+
onDrop: (x) => {
|
|
1802
|
+
x.preventDefault(), f(!1), u(x.dataTransfer.files);
|
|
1802
1803
|
},
|
|
1803
1804
|
sx: [
|
|
1804
1805
|
{
|
|
@@ -1813,113 +1814,113 @@ function kr({ onFiles: t, sx: n, ...d }) {
|
|
|
1813
1814
|
...Array.isArray(n) ? n : n ? [n] : []
|
|
1814
1815
|
],
|
|
1815
1816
|
children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ t(E, { fontWeight: 800, children: "Drop files here" }),
|
|
1818
|
+
/* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: "Drag files into this zone" })
|
|
1818
1819
|
]
|
|
1819
1820
|
}
|
|
1820
1821
|
);
|
|
1821
1822
|
}
|
|
1822
|
-
function
|
|
1823
|
-
return Math.min(Math.max(
|
|
1823
|
+
function ve(e, n, l) {
|
|
1824
|
+
return Math.min(Math.max(e, n), l);
|
|
1824
1825
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const n = Math.floor(
|
|
1827
|
-
return `${n}:${String(
|
|
1826
|
+
function It(e) {
|
|
1827
|
+
const n = Math.floor(e / 60), l = Math.floor(e % 60);
|
|
1828
|
+
return `${n}:${String(l).padStart(2, "0")}`;
|
|
1828
1829
|
}
|
|
1829
|
-
function ke(
|
|
1830
|
-
return n > 0 ?
|
|
1830
|
+
function ke(e, n) {
|
|
1831
|
+
return n > 0 ? ve(e / n * 100, 0, 100) : 0;
|
|
1831
1832
|
}
|
|
1832
|
-
function
|
|
1833
|
-
return n.reduce((
|
|
1833
|
+
function Mt(e, n) {
|
|
1834
|
+
return n.reduce((l, s) => l ? Math.abs(s.time - e) < Math.abs(l.time - e) ? s : l : s, null);
|
|
1834
1835
|
}
|
|
1835
|
-
function
|
|
1836
|
-
duration:
|
|
1836
|
+
function Pr({
|
|
1837
|
+
duration: e,
|
|
1837
1838
|
value: n,
|
|
1838
|
-
defaultValue:
|
|
1839
|
+
defaultValue: l = 0,
|
|
1839
1840
|
markers: s = [],
|
|
1840
|
-
thumbnails:
|
|
1841
|
-
disabled:
|
|
1842
|
-
showTime:
|
|
1843
|
-
preview:
|
|
1844
|
-
step:
|
|
1845
|
-
formatTime:
|
|
1846
|
-
onChange:
|
|
1847
|
-
sx:
|
|
1841
|
+
thumbnails: f = [],
|
|
1842
|
+
disabled: u = !1,
|
|
1843
|
+
showTime: x = !0,
|
|
1844
|
+
preview: p = !0,
|
|
1845
|
+
step: i = 1,
|
|
1846
|
+
formatTime: y = It,
|
|
1847
|
+
onChange: g,
|
|
1848
|
+
sx: w,
|
|
1848
1849
|
...v
|
|
1849
1850
|
}) {
|
|
1850
|
-
const
|
|
1851
|
-
function
|
|
1852
|
-
const
|
|
1853
|
-
n === void 0 && o(
|
|
1851
|
+
const P = oe(null), [C, o] = W(l), [R, h] = W(!1), [M, N] = W(null), X = ve(n ?? C, 0, e), k = M === null ? X : M, D = ke(X, e), $ = ke(k, e), L = Ie(() => [...s].sort((b, z) => b.time - z.time), [s]), j = Mt(k, f);
|
|
1852
|
+
function O(b, z) {
|
|
1853
|
+
const B = i > 0 ? Math.round(b / i) * i : b, a = ve(B, 0, e);
|
|
1854
|
+
n === void 0 && o(a), g?.(a, z);
|
|
1854
1855
|
}
|
|
1855
|
-
function
|
|
1856
|
-
const
|
|
1857
|
-
if (!
|
|
1858
|
-
return
|
|
1859
|
-
const
|
|
1860
|
-
return
|
|
1856
|
+
function c(b) {
|
|
1857
|
+
const z = P.current;
|
|
1858
|
+
if (!z)
|
|
1859
|
+
return X;
|
|
1860
|
+
const B = z.getBoundingClientRect();
|
|
1861
|
+
return ve((b - B.left) / B.width, 0, 1) * e;
|
|
1861
1862
|
}
|
|
1862
|
-
function
|
|
1863
|
-
|
|
1863
|
+
function S(b) {
|
|
1864
|
+
N(c(b));
|
|
1864
1865
|
}
|
|
1865
1866
|
return /* @__PURE__ */ m(
|
|
1866
|
-
|
|
1867
|
+
d,
|
|
1867
1868
|
{
|
|
1868
1869
|
...v,
|
|
1869
1870
|
sx: [
|
|
1870
1871
|
{
|
|
1871
1872
|
width: "100%",
|
|
1872
|
-
color:
|
|
1873
|
+
color: u ? "text.disabled" : "text.primary",
|
|
1873
1874
|
userSelect: "none"
|
|
1874
1875
|
},
|
|
1875
|
-
...Array.isArray(
|
|
1876
|
+
...Array.isArray(w) ? w : w ? [w] : []
|
|
1876
1877
|
],
|
|
1877
1878
|
children: [
|
|
1878
|
-
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
/* @__PURE__ */
|
|
1879
|
+
x ? /* @__PURE__ */ m(d, { sx: { display: "flex", justifyContent: "space-between", mb: 1 }, children: [
|
|
1880
|
+
/* @__PURE__ */ t(E, { variant: "caption", fontWeight: 800, children: y(X) }),
|
|
1881
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", children: y(e) })
|
|
1881
1882
|
] }) : null,
|
|
1882
1883
|
/* @__PURE__ */ m(
|
|
1883
|
-
|
|
1884
|
+
d,
|
|
1884
1885
|
{
|
|
1885
|
-
ref:
|
|
1886
|
+
ref: P,
|
|
1886
1887
|
role: "slider",
|
|
1887
|
-
tabIndex:
|
|
1888
|
+
tabIndex: u ? -1 : 0,
|
|
1888
1889
|
"aria-valuemin": 0,
|
|
1889
|
-
"aria-valuemax":
|
|
1890
|
-
"aria-valuenow": Math.round(
|
|
1891
|
-
onPointerMove: (
|
|
1892
|
-
|
|
1890
|
+
"aria-valuemax": e,
|
|
1891
|
+
"aria-valuenow": Math.round(X),
|
|
1892
|
+
onPointerMove: (b) => {
|
|
1893
|
+
u || (S(b.clientX), R && O(c(b.clientX), "drag"));
|
|
1893
1894
|
},
|
|
1894
1895
|
onPointerLeave: () => {
|
|
1895
|
-
R ||
|
|
1896
|
+
R || N(null);
|
|
1896
1897
|
},
|
|
1897
|
-
onPointerDown: (
|
|
1898
|
-
|
|
1898
|
+
onPointerDown: (b) => {
|
|
1899
|
+
u || (h(!0), b.currentTarget.setPointerCapture(b.pointerId), O(c(b.clientX), "click"));
|
|
1899
1900
|
},
|
|
1900
|
-
onPointerUp: (
|
|
1901
|
-
|
|
1901
|
+
onPointerUp: (b) => {
|
|
1902
|
+
h(!1), b.currentTarget.releasePointerCapture(b.pointerId);
|
|
1902
1903
|
},
|
|
1903
|
-
onPointerCancel: () =>
|
|
1904
|
-
onKeyDown: (
|
|
1905
|
-
|
|
1904
|
+
onPointerCancel: () => h(!1),
|
|
1905
|
+
onKeyDown: (b) => {
|
|
1906
|
+
u || (b.key === "ArrowLeft" && (O(X - i, "keyboard"), b.preventDefault()), b.key === "ArrowRight" && (O(X + i, "keyboard"), b.preventDefault()), b.key === "Home" && (O(0, "keyboard"), b.preventDefault()), b.key === "End" && (O(e, "keyboard"), b.preventDefault()));
|
|
1906
1907
|
},
|
|
1907
1908
|
sx: {
|
|
1908
1909
|
position: "relative",
|
|
1909
1910
|
height: 86,
|
|
1910
|
-
cursor:
|
|
1911
|
+
cursor: u ? "default" : "pointer",
|
|
1911
1912
|
outline: "none",
|
|
1912
1913
|
"&:focus-visible .TimelineScrubber-track": {
|
|
1913
1914
|
boxShadow: "0 0 0 3px rgba(37,99,235,0.28)"
|
|
1914
1915
|
}
|
|
1915
1916
|
},
|
|
1916
1917
|
children: [
|
|
1917
|
-
|
|
1918
|
-
|
|
1918
|
+
p && M !== null ? /* @__PURE__ */ m(
|
|
1919
|
+
d,
|
|
1919
1920
|
{
|
|
1920
1921
|
sx: {
|
|
1921
1922
|
position: "absolute",
|
|
1922
|
-
left: `${
|
|
1923
|
+
left: `${$}%`,
|
|
1923
1924
|
top: 0,
|
|
1924
1925
|
transform: "translateX(-50%)",
|
|
1925
1926
|
width: 116,
|
|
@@ -1933,13 +1934,13 @@ function $r({
|
|
|
1933
1934
|
zIndex: 2
|
|
1934
1935
|
},
|
|
1935
1936
|
children: [
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ t(d, { sx: { height: 56, borderRadius: 0.75, overflow: "hidden", bgcolor: "#e5e7eb" }, children: j?.thumbnail ?? /* @__PURE__ */ t(d, { sx: { height: "100%", display: "grid", placeItems: "center", bgcolor: "#0f172a", color: "#fff" }, children: /* @__PURE__ */ t(E, { variant: "caption", fontWeight: 900, children: y(k) }) }) }),
|
|
1938
|
+
/* @__PURE__ */ t(E, { variant: "caption", fontWeight: 800, sx: { display: "block", mt: 0.5, textAlign: "center" }, children: y(k) })
|
|
1938
1939
|
]
|
|
1939
1940
|
}
|
|
1940
1941
|
) : null,
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
|
|
1942
|
+
/* @__PURE__ */ t(
|
|
1943
|
+
d,
|
|
1943
1944
|
{
|
|
1944
1945
|
className: "TimelineScrubber-track",
|
|
1945
1946
|
sx: {
|
|
@@ -1953,11 +1954,11 @@ function $r({
|
|
|
1953
1954
|
overflow: "hidden",
|
|
1954
1955
|
transition: "box-shadow 120ms ease"
|
|
1955
1956
|
},
|
|
1956
|
-
children: /* @__PURE__ */
|
|
1957
|
-
|
|
1957
|
+
children: /* @__PURE__ */ t(
|
|
1958
|
+
d,
|
|
1958
1959
|
{
|
|
1959
1960
|
sx: {
|
|
1960
|
-
width: `${
|
|
1961
|
+
width: `${D}%`,
|
|
1961
1962
|
height: "100%",
|
|
1962
1963
|
borderRadius: 999,
|
|
1963
1964
|
background: "linear-gradient(90deg, #2563eb, #06b6d4)"
|
|
@@ -1966,37 +1967,37 @@ function $r({
|
|
|
1966
1967
|
)
|
|
1967
1968
|
}
|
|
1968
1969
|
),
|
|
1969
|
-
L.map((
|
|
1970
|
-
const
|
|
1971
|
-
return /* @__PURE__ */
|
|
1972
|
-
|
|
1970
|
+
L.map((b) => {
|
|
1971
|
+
const z = ke(b.time, e);
|
|
1972
|
+
return /* @__PURE__ */ t(ie, { title: b.label ?? y(b.time), arrow: !0, children: /* @__PURE__ */ t(
|
|
1973
|
+
d,
|
|
1973
1974
|
{
|
|
1974
|
-
onPointerDown: (
|
|
1975
|
-
|
|
1975
|
+
onPointerDown: (B) => {
|
|
1976
|
+
B.stopPropagation(), O(b.time, "marker");
|
|
1976
1977
|
},
|
|
1977
1978
|
sx: {
|
|
1978
1979
|
position: "absolute",
|
|
1979
|
-
left: `${
|
|
1980
|
+
left: `${z}%`,
|
|
1980
1981
|
bottom: 11,
|
|
1981
1982
|
width: 12,
|
|
1982
1983
|
height: 26,
|
|
1983
1984
|
borderRadius: 999,
|
|
1984
1985
|
transform: "translateX(-50%)",
|
|
1985
|
-
bgcolor:
|
|
1986
|
+
bgcolor: b.color ?? "#f59e0b",
|
|
1986
1987
|
border: "2px solid",
|
|
1987
1988
|
borderColor: "background.paper",
|
|
1988
1989
|
boxShadow: "0 8px 18px rgba(15,23,42,0.2)",
|
|
1989
1990
|
zIndex: 1
|
|
1990
1991
|
}
|
|
1991
1992
|
}
|
|
1992
|
-
) },
|
|
1993
|
+
) }, b.id);
|
|
1993
1994
|
}),
|
|
1994
|
-
/* @__PURE__ */
|
|
1995
|
-
|
|
1995
|
+
/* @__PURE__ */ t(
|
|
1996
|
+
d,
|
|
1996
1997
|
{
|
|
1997
1998
|
sx: {
|
|
1998
1999
|
position: "absolute",
|
|
1999
|
-
left: `${
|
|
2000
|
+
left: `${D}%`,
|
|
2000
2001
|
bottom: 5,
|
|
2001
2002
|
width: 28,
|
|
2002
2003
|
height: 28,
|
|
@@ -2016,83 +2017,83 @@ function $r({
|
|
|
2016
2017
|
}
|
|
2017
2018
|
);
|
|
2018
2019
|
}
|
|
2019
|
-
function
|
|
2020
|
-
return Math.min(Math.max(
|
|
2020
|
+
function Xe(e, n, l) {
|
|
2021
|
+
return Math.min(Math.max(e, n), l);
|
|
2021
2022
|
}
|
|
2022
|
-
function
|
|
2023
|
-
items:
|
|
2023
|
+
function Tr({
|
|
2024
|
+
items: e = [],
|
|
2024
2025
|
defaultViewport: n = { x: 0, y: 0, zoom: 1 },
|
|
2025
|
-
viewport:
|
|
2026
|
+
viewport: l,
|
|
2026
2027
|
minZoom: s = 0.3,
|
|
2027
|
-
maxZoom:
|
|
2028
|
-
showGrid:
|
|
2029
|
-
showMinimap:
|
|
2030
|
-
selectedItemId:
|
|
2031
|
-
renderItem:
|
|
2032
|
-
onViewportChange:
|
|
2033
|
-
onItemMove:
|
|
2034
|
-
onItemSelect:
|
|
2028
|
+
maxZoom: f = 2.5,
|
|
2029
|
+
showGrid: u = !0,
|
|
2030
|
+
showMinimap: x = !0,
|
|
2031
|
+
selectedItemId: p,
|
|
2032
|
+
renderItem: i,
|
|
2033
|
+
onViewportChange: y,
|
|
2034
|
+
onItemMove: g,
|
|
2035
|
+
onItemSelect: w,
|
|
2035
2036
|
sx: v,
|
|
2036
|
-
...
|
|
2037
|
+
...P
|
|
2037
2038
|
}) {
|
|
2038
|
-
const C = oe(null), [o, R] =
|
|
2039
|
-
Object.fromEntries(
|
|
2040
|
-
), [
|
|
2041
|
-
const
|
|
2042
|
-
x:
|
|
2043
|
-
y:
|
|
2044
|
-
width:
|
|
2045
|
-
height:
|
|
2039
|
+
const C = oe(null), [o, R] = W(n), [h, M] = W(
|
|
2040
|
+
Object.fromEntries(e.map((c) => [c.id, { x: c.x, y: c.y }]))
|
|
2041
|
+
), [N, X] = W(p ?? null), k = l ?? o, D = p ?? N, $ = Ie(() => {
|
|
2042
|
+
const c = e.map((a) => ({
|
|
2043
|
+
x: h[a.id]?.x ?? a.x,
|
|
2044
|
+
y: h[a.id]?.y ?? a.y,
|
|
2045
|
+
width: a.width ?? 140,
|
|
2046
|
+
height: a.height ?? 80
|
|
2046
2047
|
}));
|
|
2047
|
-
if (!
|
|
2048
|
+
if (!c.length)
|
|
2048
2049
|
return { minX: -200, minY: -120, width: 400, height: 240 };
|
|
2049
|
-
const
|
|
2050
|
-
return { minX:
|
|
2051
|
-
}, [
|
|
2052
|
-
function L(
|
|
2053
|
-
const
|
|
2054
|
-
...
|
|
2055
|
-
zoom:
|
|
2050
|
+
const S = Math.min(...c.map((a) => a.x)) - 80, b = Math.min(...c.map((a) => a.y)) - 80, z = Math.max(...c.map((a) => a.x + a.width)) + 80, B = Math.max(...c.map((a) => a.y + a.height)) + 80;
|
|
2051
|
+
return { minX: S, minY: b, width: z - S, height: B - b };
|
|
2052
|
+
}, [h, e]);
|
|
2053
|
+
function L(c) {
|
|
2054
|
+
const S = {
|
|
2055
|
+
...c,
|
|
2056
|
+
zoom: Xe(c.zoom, s, f)
|
|
2056
2057
|
};
|
|
2057
|
-
|
|
2058
|
+
l === void 0 && R(S), y?.(S);
|
|
2058
2059
|
}
|
|
2059
|
-
function j(
|
|
2060
|
-
const
|
|
2060
|
+
function j(c, S) {
|
|
2061
|
+
const b = C.current?.getBoundingClientRect();
|
|
2061
2062
|
return {
|
|
2062
|
-
x: (
|
|
2063
|
-
y: (
|
|
2063
|
+
x: (c - (b?.left ?? 0) - k.x) / k.zoom,
|
|
2064
|
+
y: (S - (b?.top ?? 0) - k.y) / k.zoom
|
|
2064
2065
|
};
|
|
2065
2066
|
}
|
|
2066
|
-
function
|
|
2067
|
-
|
|
2067
|
+
function O(c) {
|
|
2068
|
+
X(c?.id ?? null), w?.(c);
|
|
2068
2069
|
}
|
|
2069
2070
|
return /* @__PURE__ */ m(
|
|
2070
|
-
|
|
2071
|
+
d,
|
|
2071
2072
|
{
|
|
2072
|
-
...
|
|
2073
|
+
...P,
|
|
2073
2074
|
ref: C,
|
|
2074
|
-
onWheel: (
|
|
2075
|
-
|
|
2076
|
-
const
|
|
2077
|
-
L({ x:
|
|
2075
|
+
onWheel: (c) => {
|
|
2076
|
+
c.preventDefault();
|
|
2077
|
+
const S = Xe(k.zoom * (c.deltaY > 0 ? 0.92 : 1.08), s, f), b = j(c.clientX, c.clientY), z = C.current?.getBoundingClientRect(), B = c.clientX - (z?.left ?? 0) - b.x * S, a = c.clientY - (z?.top ?? 0) - b.y * S;
|
|
2078
|
+
L({ x: B, y: a, zoom: S });
|
|
2078
2079
|
},
|
|
2079
|
-
onPointerDown: (
|
|
2080
|
-
if (
|
|
2080
|
+
onPointerDown: (c) => {
|
|
2081
|
+
if (c.target !== c.currentTarget)
|
|
2081
2082
|
return;
|
|
2082
|
-
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
function
|
|
2083
|
+
O(null);
|
|
2084
|
+
const S = c.clientX, b = c.clientY, z = k;
|
|
2085
|
+
c.currentTarget.setPointerCapture(c.pointerId);
|
|
2086
|
+
function B(T) {
|
|
2086
2087
|
L({
|
|
2087
|
-
...
|
|
2088
|
-
x:
|
|
2089
|
-
y:
|
|
2088
|
+
...z,
|
|
2089
|
+
x: z.x + T.clientX - S,
|
|
2090
|
+
y: z.y + T.clientY - b
|
|
2090
2091
|
});
|
|
2091
2092
|
}
|
|
2092
|
-
function
|
|
2093
|
-
window.removeEventListener("pointermove",
|
|
2093
|
+
function a() {
|
|
2094
|
+
window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", a);
|
|
2094
2095
|
}
|
|
2095
|
-
window.addEventListener("pointermove",
|
|
2096
|
+
window.addEventListener("pointermove", B), window.addEventListener("pointerup", a);
|
|
2096
2097
|
},
|
|
2097
2098
|
sx: [
|
|
2098
2099
|
{
|
|
@@ -2106,78 +2107,78 @@ function Cr({
|
|
|
2106
2107
|
...Array.isArray(v) ? v : v ? [v] : []
|
|
2107
2108
|
],
|
|
2108
2109
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
|
|
2110
|
+
/* @__PURE__ */ t(
|
|
2111
|
+
d,
|
|
2111
2112
|
{
|
|
2112
2113
|
sx: {
|
|
2113
2114
|
position: "absolute",
|
|
2114
2115
|
inset: 0,
|
|
2115
2116
|
pointerEvents: "none",
|
|
2116
|
-
backgroundImage:
|
|
2117
|
-
backgroundSize: `${32 *
|
|
2118
|
-
backgroundPosition: `${
|
|
2117
|
+
backgroundImage: u ? "linear-gradient(rgba(148,163,184,0.25) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,0.25) 1px, transparent 1px)" : void 0,
|
|
2118
|
+
backgroundSize: `${32 * k.zoom}px ${32 * k.zoom}px`,
|
|
2119
|
+
backgroundPosition: `${k.x}px ${k.y}px`
|
|
2119
2120
|
}
|
|
2120
2121
|
}
|
|
2121
2122
|
),
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
|
|
2123
|
+
/* @__PURE__ */ t(
|
|
2124
|
+
d,
|
|
2124
2125
|
{
|
|
2125
2126
|
sx: {
|
|
2126
2127
|
position: "absolute",
|
|
2127
|
-
left:
|
|
2128
|
-
top:
|
|
2129
|
-
transform: `scale(${
|
|
2128
|
+
left: k.x,
|
|
2129
|
+
top: k.y,
|
|
2130
|
+
transform: `scale(${k.zoom})`,
|
|
2130
2131
|
transformOrigin: "0 0"
|
|
2131
2132
|
},
|
|
2132
|
-
children:
|
|
2133
|
-
const
|
|
2134
|
-
return /* @__PURE__ */
|
|
2135
|
-
|
|
2133
|
+
children: e.map((c) => {
|
|
2134
|
+
const S = h[c.id] ?? { x: c.x, y: c.y }, b = c.id === D;
|
|
2135
|
+
return /* @__PURE__ */ t(
|
|
2136
|
+
d,
|
|
2136
2137
|
{
|
|
2137
|
-
onPointerDown: (
|
|
2138
|
-
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
function
|
|
2142
|
-
const se = j(le.clientX, le.clientY),
|
|
2143
|
-
x:
|
|
2144
|
-
y:
|
|
2138
|
+
onPointerDown: (z) => {
|
|
2139
|
+
z.stopPropagation(), O(c);
|
|
2140
|
+
const B = h[c.id] ?? { x: c.x, y: c.y }, a = j(z.clientX, z.clientY);
|
|
2141
|
+
z.currentTarget.setPointerCapture(z.pointerId);
|
|
2142
|
+
function T(le) {
|
|
2143
|
+
const se = j(le.clientX, le.clientY), q = {
|
|
2144
|
+
x: B.x + se.x - a.x,
|
|
2145
|
+
y: B.y + se.y - a.y
|
|
2145
2146
|
};
|
|
2146
|
-
|
|
2147
|
+
M((ee) => ({
|
|
2147
2148
|
...ee,
|
|
2148
|
-
[
|
|
2149
|
-
})),
|
|
2149
|
+
[c.id]: q
|
|
2150
|
+
})), g?.(c.id, q);
|
|
2150
2151
|
}
|
|
2151
2152
|
function Q() {
|
|
2152
|
-
window.removeEventListener("pointermove",
|
|
2153
|
+
window.removeEventListener("pointermove", T), window.removeEventListener("pointerup", Q);
|
|
2153
2154
|
}
|
|
2154
|
-
window.addEventListener("pointermove",
|
|
2155
|
+
window.addEventListener("pointermove", T), window.addEventListener("pointerup", Q);
|
|
2155
2156
|
},
|
|
2156
2157
|
sx: {
|
|
2157
2158
|
position: "absolute",
|
|
2158
|
-
left:
|
|
2159
|
-
top:
|
|
2160
|
-
width:
|
|
2161
|
-
height:
|
|
2159
|
+
left: S.x,
|
|
2160
|
+
top: S.y,
|
|
2161
|
+
width: c.width ?? 140,
|
|
2162
|
+
height: c.height ?? 80,
|
|
2162
2163
|
display: "grid",
|
|
2163
2164
|
placeItems: "center",
|
|
2164
|
-
border:
|
|
2165
|
-
borderColor:
|
|
2165
|
+
border: b ? 2 : 1,
|
|
2166
|
+
borderColor: b ? "primary.main" : "divider",
|
|
2166
2167
|
borderRadius: 1,
|
|
2167
|
-
bgcolor:
|
|
2168
|
-
boxShadow:
|
|
2168
|
+
bgcolor: c.color ?? "background.paper",
|
|
2169
|
+
boxShadow: b ? "0 18px 40px rgba(37,99,235,0.24)" : "0 12px 28px rgba(15,23,42,0.13)",
|
|
2169
2170
|
cursor: "grab",
|
|
2170
2171
|
userSelect: "none"
|
|
2171
2172
|
},
|
|
2172
|
-
children:
|
|
2173
|
+
children: i ? i(c, b) : /* @__PURE__ */ t(E, { fontWeight: 900, children: c.label ?? c.id })
|
|
2173
2174
|
},
|
|
2174
|
-
|
|
2175
|
+
c.id
|
|
2175
2176
|
);
|
|
2176
2177
|
})
|
|
2177
2178
|
}
|
|
2178
2179
|
),
|
|
2179
2180
|
/* @__PURE__ */ m(
|
|
2180
|
-
|
|
2181
|
+
d,
|
|
2181
2182
|
{
|
|
2182
2183
|
sx: {
|
|
2183
2184
|
position: "absolute",
|
|
@@ -2196,13 +2197,13 @@ function Cr({
|
|
|
2196
2197
|
fontWeight: 800
|
|
2197
2198
|
},
|
|
2198
2199
|
children: [
|
|
2199
|
-
Math.round(
|
|
2200
|
+
Math.round(k.zoom * 100),
|
|
2200
2201
|
"%"
|
|
2201
2202
|
]
|
|
2202
2203
|
}
|
|
2203
2204
|
),
|
|
2204
|
-
|
|
2205
|
-
|
|
2205
|
+
x ? /* @__PURE__ */ t(
|
|
2206
|
+
d,
|
|
2206
2207
|
{
|
|
2207
2208
|
sx: {
|
|
2208
2209
|
position: "absolute",
|
|
@@ -2216,24 +2217,24 @@ function Cr({
|
|
|
2216
2217
|
bgcolor: "rgba(255,255,255,0.9)",
|
|
2217
2218
|
overflow: "hidden"
|
|
2218
2219
|
},
|
|
2219
|
-
children:
|
|
2220
|
-
const
|
|
2221
|
-
return /* @__PURE__ */
|
|
2222
|
-
|
|
2220
|
+
children: e.map((c) => {
|
|
2221
|
+
const S = h[c.id] ?? { x: c.x, y: c.y }, b = (S.x - $.minX) / $.width * 100, z = (S.y - $.minY) / $.height * 100, B = (c.width ?? 140) / $.width * 100, a = (c.height ?? 80) / $.height * 100;
|
|
2222
|
+
return /* @__PURE__ */ t(
|
|
2223
|
+
d,
|
|
2223
2224
|
{
|
|
2224
2225
|
sx: {
|
|
2225
2226
|
position: "absolute",
|
|
2226
|
-
left: `${
|
|
2227
|
-
top: `${
|
|
2228
|
-
width: `${
|
|
2229
|
-
height: `${
|
|
2227
|
+
left: `${b}%`,
|
|
2228
|
+
top: `${z}%`,
|
|
2229
|
+
width: `${B}%`,
|
|
2230
|
+
height: `${a}%`,
|
|
2230
2231
|
minWidth: 6,
|
|
2231
2232
|
minHeight: 4,
|
|
2232
2233
|
borderRadius: 0.5,
|
|
2233
|
-
bgcolor:
|
|
2234
|
+
bgcolor: c.id === D ? "primary.main" : c.color ?? "#94a3b8"
|
|
2234
2235
|
}
|
|
2235
2236
|
},
|
|
2236
|
-
|
|
2237
|
+
c.id
|
|
2237
2238
|
);
|
|
2238
2239
|
})
|
|
2239
2240
|
}
|
|
@@ -2242,78 +2243,78 @@ function Cr({
|
|
|
2242
2243
|
}
|
|
2243
2244
|
);
|
|
2244
2245
|
}
|
|
2245
|
-
function
|
|
2246
|
-
children:
|
|
2246
|
+
function Wr({
|
|
2247
|
+
children: e,
|
|
2247
2248
|
title: n,
|
|
2248
|
-
content:
|
|
2249
|
+
content: l,
|
|
2249
2250
|
media: s,
|
|
2250
|
-
actions:
|
|
2251
|
-
copyText:
|
|
2252
|
-
placement:
|
|
2253
|
-
pinMode:
|
|
2254
|
-
defaultPinned:
|
|
2255
|
-
openDelay:
|
|
2256
|
-
sx:
|
|
2257
|
-
...
|
|
2251
|
+
actions: f = [],
|
|
2252
|
+
copyText: u,
|
|
2253
|
+
placement: x = "top",
|
|
2254
|
+
pinMode: p = !0,
|
|
2255
|
+
defaultPinned: i = !1,
|
|
2256
|
+
openDelay: y = 120,
|
|
2257
|
+
sx: g,
|
|
2258
|
+
...w
|
|
2258
2259
|
}) {
|
|
2259
|
-
const v = oe(null),
|
|
2260
|
-
function
|
|
2261
|
-
C.current && window.clearTimeout(C.current),
|
|
2260
|
+
const v = oe(null), P = oe(null), C = oe(null), [o, R] = W(i), [h, M] = W(i), [N, X] = W(!1);
|
|
2261
|
+
function k() {
|
|
2262
|
+
C.current && window.clearTimeout(C.current), P.current && window.clearTimeout(P.current);
|
|
2262
2263
|
}
|
|
2263
|
-
function
|
|
2264
|
-
|
|
2264
|
+
function D() {
|
|
2265
|
+
k(), !o && (C.current = window.setTimeout(() => R(!0), y));
|
|
2265
2266
|
}
|
|
2266
|
-
function
|
|
2267
|
-
|
|
2267
|
+
function $() {
|
|
2268
|
+
k(), R(!0);
|
|
2268
2269
|
}
|
|
2269
2270
|
function L() {
|
|
2270
|
-
|
|
2271
|
+
k(), h || (P.current = window.setTimeout(() => R(!1), 100));
|
|
2271
2272
|
}
|
|
2272
2273
|
function j() {
|
|
2273
|
-
const
|
|
2274
|
-
|
|
2274
|
+
const c = !h;
|
|
2275
|
+
M(c), R(c || o);
|
|
2275
2276
|
}
|
|
2276
|
-
async function
|
|
2277
|
-
|
|
2277
|
+
async function O() {
|
|
2278
|
+
u && (await navigator.clipboard?.writeText(u), X(!0), window.setTimeout(() => X(!1), 1100));
|
|
2278
2279
|
}
|
|
2279
|
-
return /* @__PURE__ */ m(
|
|
2280
|
-
/* @__PURE__ */
|
|
2281
|
-
|
|
2280
|
+
return /* @__PURE__ */ m(Ye, { children: [
|
|
2281
|
+
/* @__PURE__ */ t(
|
|
2282
|
+
d,
|
|
2282
2283
|
{
|
|
2283
2284
|
component: "span",
|
|
2284
2285
|
ref: v,
|
|
2285
|
-
onMouseEnter:
|
|
2286
|
+
onMouseEnter: D,
|
|
2286
2287
|
onMouseLeave: L,
|
|
2287
|
-
onFocus:
|
|
2288
|
+
onFocus: D,
|
|
2288
2289
|
onBlur: L,
|
|
2289
2290
|
onClick: () => {
|
|
2290
|
-
|
|
2291
|
+
p && (R(!0), M(!0));
|
|
2291
2292
|
},
|
|
2292
2293
|
sx: { display: "inline-flex" },
|
|
2293
|
-
children:
|
|
2294
|
+
children: e
|
|
2294
2295
|
}
|
|
2295
2296
|
),
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
|
|
2297
|
+
/* @__PURE__ */ t(
|
|
2298
|
+
dt,
|
|
2298
2299
|
{
|
|
2299
2300
|
open: o,
|
|
2300
2301
|
anchorEl: v.current,
|
|
2301
|
-
placement:
|
|
2302
|
+
placement: x,
|
|
2302
2303
|
modifiers: [
|
|
2303
2304
|
{ name: "offset", options: { offset: [0, 10] } },
|
|
2304
2305
|
{ name: "preventOverflow", options: { padding: 12 } }
|
|
2305
2306
|
],
|
|
2306
2307
|
sx: { zIndex: 1500 },
|
|
2307
|
-
children: /* @__PURE__ */
|
|
2308
|
-
|
|
2308
|
+
children: /* @__PURE__ */ t(
|
|
2309
|
+
ct,
|
|
2309
2310
|
{
|
|
2310
2311
|
onClickAway: () => {
|
|
2311
|
-
|
|
2312
|
+
h && (R(!1), M(!1));
|
|
2312
2313
|
},
|
|
2313
|
-
children: /* @__PURE__ */
|
|
2314
|
-
|
|
2314
|
+
children: /* @__PURE__ */ t(
|
|
2315
|
+
d,
|
|
2315
2316
|
{
|
|
2316
|
-
onMouseEnter:
|
|
2317
|
+
onMouseEnter: $,
|
|
2317
2318
|
onMouseLeave: L,
|
|
2318
2319
|
sx: {
|
|
2319
2320
|
width: 320,
|
|
@@ -2323,18 +2324,18 @@ function Ir({
|
|
|
2323
2324
|
boxShadow: "0 24px 64px rgba(15,23,42,0.28)",
|
|
2324
2325
|
bgcolor: "background.paper"
|
|
2325
2326
|
},
|
|
2326
|
-
children: /* @__PURE__ */
|
|
2327
|
-
s ? /* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */ m(
|
|
2329
|
-
/* @__PURE__ */ m(
|
|
2330
|
-
n ? /* @__PURE__ */
|
|
2331
|
-
|
|
2327
|
+
children: /* @__PURE__ */ t(d, { ...w, sx: [{ p: 1.25 }, ...Array.isArray(g) ? g : g ? [g] : []], children: /* @__PURE__ */ m(V, { spacing: 1.25, children: [
|
|
2328
|
+
s ? /* @__PURE__ */ t(d, { sx: { borderRadius: 1, overflow: "hidden", bgcolor: "#e5e7eb" }, children: s }) : null,
|
|
2329
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", children: [
|
|
2330
|
+
/* @__PURE__ */ m(d, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
2331
|
+
n ? /* @__PURE__ */ t(E, { fontWeight: 900, children: n }) : null,
|
|
2332
|
+
l ? /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", sx: { mt: n ? 0.25 : 0 }, children: l }) : null
|
|
2332
2333
|
] }),
|
|
2333
|
-
|
|
2334
|
+
p ? /* @__PURE__ */ t(ie, { title: h ? "Unpin" : "Pin", children: /* @__PURE__ */ t(ue, { size: "small", onClick: j, children: h ? /* @__PURE__ */ t(lt, { fontSize: "small" }) : /* @__PURE__ */ t(st, { fontSize: "small" }) }) }) : null
|
|
2334
2335
|
] }),
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2336
|
+
u || f.length ? /* @__PURE__ */ m(V, { direction: "row", spacing: 1, flexWrap: "wrap", children: [
|
|
2337
|
+
u ? /* @__PURE__ */ t(ae, { size: "small", variant: "outlined", startIcon: /* @__PURE__ */ t(at, {}), onClick: O, children: N ? "Copied" : "Copy" }) : null,
|
|
2338
|
+
f.map((c) => /* @__PURE__ */ t(ae, { size: "small", variant: "contained", startIcon: c.icon, onClick: c.onClick, children: c.label }, c.id))
|
|
2338
2339
|
] }) : null
|
|
2339
2340
|
] }) })
|
|
2340
2341
|
}
|
|
@@ -2345,24 +2346,176 @@ function Ir({
|
|
|
2345
2346
|
)
|
|
2346
2347
|
] });
|
|
2347
2348
|
}
|
|
2349
|
+
const fe = {
|
|
2350
|
+
neutral: "#64748b",
|
|
2351
|
+
good: "#059669",
|
|
2352
|
+
warning: "#d97706",
|
|
2353
|
+
danger: "#dc2626"
|
|
2354
|
+
};
|
|
2355
|
+
function zt(e, n, l) {
|
|
2356
|
+
return Math.min(Math.max(e, n), l);
|
|
2357
|
+
}
|
|
2358
|
+
function St(e) {
|
|
2359
|
+
return e.color ?? fe[e.status ?? "neutral"];
|
|
2360
|
+
}
|
|
2361
|
+
function At(e) {
|
|
2362
|
+
return typeof e.delta == "number" ? e.delta : typeof e.value == "number" && typeof e.previousValue == "number" && e.previousValue !== 0 ? (e.value - e.previousValue) / Math.abs(e.previousValue) * 100 : null;
|
|
2363
|
+
}
|
|
2364
|
+
function Rt(e) {
|
|
2365
|
+
return e.formatter ? e.formatter(e.value) : typeof e.value == "number" ? new Intl.NumberFormat("en", { maximumFractionDigits: 1 }).format(e.value) : e.value;
|
|
2366
|
+
}
|
|
2367
|
+
function Lt(e, n, l) {
|
|
2368
|
+
if (e.length < 2)
|
|
2369
|
+
return "";
|
|
2370
|
+
const s = Math.min(...e), u = Math.max(...e) - s || 1;
|
|
2371
|
+
return e.map((x, p) => {
|
|
2372
|
+
const i = p / (e.length - 1) * n, y = l - (x - s) / u * l;
|
|
2373
|
+
return `${p === 0 ? "M" : "L"} ${i.toFixed(2)} ${y.toFixed(2)}`;
|
|
2374
|
+
}).join(" ");
|
|
2375
|
+
}
|
|
2376
|
+
function Pt({ values: e, color: n }) {
|
|
2377
|
+
const f = Lt(e, 180, 54), u = f ? `${f} L 180 54 L 0 54 Z` : "";
|
|
2378
|
+
return /* @__PURE__ */ m(d, { component: "svg", viewBox: "0 0 180 54", sx: { display: "block", width: "100%", height: 54 }, children: [
|
|
2379
|
+
/* @__PURE__ */ t(d, { component: "path", d: u, sx: { fill: Y(n, 0.14) } }),
|
|
2380
|
+
/* @__PURE__ */ t(d, { component: "path", d: f, sx: { fill: "none", stroke: n, strokeWidth: 4, strokeLinecap: "round", strokeLinejoin: "round" } }),
|
|
2381
|
+
e.length ? /* @__PURE__ */ t(
|
|
2382
|
+
d,
|
|
2383
|
+
{
|
|
2384
|
+
component: "circle",
|
|
2385
|
+
cx: 180,
|
|
2386
|
+
cy: 54 - (e[e.length - 1] - Math.min(...e)) / (Math.max(...e) - Math.min(...e) || 1) * 54,
|
|
2387
|
+
r: 4,
|
|
2388
|
+
sx: { fill: n }
|
|
2389
|
+
}
|
|
2390
|
+
) : null
|
|
2391
|
+
] });
|
|
2392
|
+
}
|
|
2393
|
+
function Dr({
|
|
2394
|
+
metrics: e,
|
|
2395
|
+
title: n,
|
|
2396
|
+
subtitle: l,
|
|
2397
|
+
columns: s = 3,
|
|
2398
|
+
density: f = "comfortable",
|
|
2399
|
+
showSparklines: u = !0,
|
|
2400
|
+
showProgress: x = !0,
|
|
2401
|
+
sx: p,
|
|
2402
|
+
...i
|
|
2403
|
+
}) {
|
|
2404
|
+
const y = f === "compact";
|
|
2405
|
+
return /* @__PURE__ */ m(
|
|
2406
|
+
d,
|
|
2407
|
+
{
|
|
2408
|
+
...i,
|
|
2409
|
+
sx: [
|
|
2410
|
+
{
|
|
2411
|
+
width: "100%"
|
|
2412
|
+
},
|
|
2413
|
+
...Array.isArray(p) ? p : p ? [p] : []
|
|
2414
|
+
],
|
|
2415
|
+
children: [
|
|
2416
|
+
n || l ? /* @__PURE__ */ m(d, { sx: { mb: 2 }, children: [
|
|
2417
|
+
n ? /* @__PURE__ */ t(E, { variant: "h6", fontWeight: 900, children: n }) : null,
|
|
2418
|
+
l ? /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", children: l }) : null
|
|
2419
|
+
] }) : null,
|
|
2420
|
+
/* @__PURE__ */ t(
|
|
2421
|
+
d,
|
|
2422
|
+
{
|
|
2423
|
+
sx: {
|
|
2424
|
+
display: "grid",
|
|
2425
|
+
gridTemplateColumns: {
|
|
2426
|
+
xs: "1fr",
|
|
2427
|
+
sm: "repeat(2, minmax(0, 1fr))",
|
|
2428
|
+
lg: `repeat(${s}, minmax(0, 1fr))`
|
|
2429
|
+
},
|
|
2430
|
+
gap: y ? 1.25 : 2
|
|
2431
|
+
},
|
|
2432
|
+
children: e.map((g) => {
|
|
2433
|
+
const w = St(g), v = At(g), P = (v ?? 0) >= 0;
|
|
2434
|
+
return /* @__PURE__ */ t(
|
|
2435
|
+
Me,
|
|
2436
|
+
{
|
|
2437
|
+
variant: "outlined",
|
|
2438
|
+
sx: {
|
|
2439
|
+
p: y ? 1.5 : 2,
|
|
2440
|
+
borderRadius: 1,
|
|
2441
|
+
overflow: "hidden",
|
|
2442
|
+
position: "relative",
|
|
2443
|
+
borderColor: Y(w, 0.32),
|
|
2444
|
+
background: `linear-gradient(180deg, ${Y(w, 0.08)}, rgba(255,255,255,0) 42%)`
|
|
2445
|
+
},
|
|
2446
|
+
children: /* @__PURE__ */ m(V, { spacing: y ? 1 : 1.5, children: [
|
|
2447
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "flex-start", justifyContent: "space-between", children: [
|
|
2448
|
+
/* @__PURE__ */ m(d, { sx: { minWidth: 0 }, children: [
|
|
2449
|
+
/* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", fontWeight: 850, sx: { textTransform: "uppercase" }, children: g.label }),
|
|
2450
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 0.75, alignItems: "baseline", sx: { mt: 0.5 }, children: [
|
|
2451
|
+
/* @__PURE__ */ t(E, { variant: y ? "h5" : "h4", fontWeight: 950, sx: { lineHeight: 1 }, children: Rt(g) }),
|
|
2452
|
+
g.unit ? /* @__PURE__ */ t(E, { variant: "body2", color: "text.secondary", fontWeight: 800, children: g.unit }) : null
|
|
2453
|
+
] })
|
|
2454
|
+
] }),
|
|
2455
|
+
g.icon ? /* @__PURE__ */ t(d, { sx: { color: w, display: "grid", placeItems: "center", mt: 0.25 }, children: g.icon }) : null
|
|
2456
|
+
] }),
|
|
2457
|
+
/* @__PURE__ */ m(V, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
|
|
2458
|
+
v !== null ? /* @__PURE__ */ t(
|
|
2459
|
+
we,
|
|
2460
|
+
{
|
|
2461
|
+
size: "small",
|
|
2462
|
+
label: `${P ? "+" : ""}${v.toFixed(1)}%`,
|
|
2463
|
+
sx: {
|
|
2464
|
+
color: P ? fe.good : fe.danger,
|
|
2465
|
+
bgcolor: Y(P ? fe.good : fe.danger, 0.12),
|
|
2466
|
+
fontWeight: 850
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
) : /* @__PURE__ */ t(d, {}),
|
|
2470
|
+
g.helper ? /* @__PURE__ */ t(E, { variant: "caption", color: "text.secondary", textAlign: "right", children: g.helper }) : null
|
|
2471
|
+
] }),
|
|
2472
|
+
u && g.trend?.length ? /* @__PURE__ */ t(Pt, { values: g.trend, color: w }) : null,
|
|
2473
|
+
x && typeof g.progress == "number" ? /* @__PURE__ */ t(
|
|
2474
|
+
ut,
|
|
2475
|
+
{
|
|
2476
|
+
variant: "determinate",
|
|
2477
|
+
value: zt(g.progress, 0, 100),
|
|
2478
|
+
sx: {
|
|
2479
|
+
height: 8,
|
|
2480
|
+
borderRadius: 999,
|
|
2481
|
+
bgcolor: Y(w, 0.14),
|
|
2482
|
+
"& .MuiLinearProgress-bar": {
|
|
2483
|
+
bgcolor: w,
|
|
2484
|
+
borderRadius: 999
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
) : null
|
|
2489
|
+
] })
|
|
2490
|
+
},
|
|
2491
|
+
g.id
|
|
2492
|
+
);
|
|
2493
|
+
})
|
|
2494
|
+
}
|
|
2495
|
+
)
|
|
2496
|
+
]
|
|
2497
|
+
}
|
|
2498
|
+
);
|
|
2499
|
+
}
|
|
2348
2500
|
export {
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2501
|
+
zr as BeforeAfterSlider,
|
|
2502
|
+
mr as CodeViewer,
|
|
2503
|
+
Rr as ColorPicker,
|
|
2504
|
+
vr as CommandPalette,
|
|
2505
|
+
br as ComponentExample,
|
|
2506
|
+
Dr as DataCardGrid,
|
|
2507
|
+
wr as DockBar,
|
|
2508
|
+
xr as DraggableBox,
|
|
2509
|
+
Lr as FileDropZone,
|
|
2510
|
+
kr as FloatingToolbar,
|
|
2511
|
+
yr as GlassBox,
|
|
2512
|
+
Tr as InfiniteCanvas,
|
|
2513
|
+
Ar as InspectorPanel,
|
|
2514
|
+
Cr as MagneticCard,
|
|
2515
|
+
Mr as NodeCanvas,
|
|
2516
|
+
Sr as ResizableFrame,
|
|
2517
|
+
Wr as SmartTooltip,
|
|
2518
|
+
$r as SplitPane,
|
|
2519
|
+
Ir as SpotlightPanel,
|
|
2520
|
+
Pr as TimelineScrubber
|
|
2368
2521
|
};
|