@sheetxl/utils-mui 0.7.13 → 0.7.14
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/browser/cjs/{DNyaE39SbtmF-UDK.cjs → DTu7X4NVQR5Imqxw.cjs} +2 -2
- package/browser/cjs/{DBKNbW_UZGIFdc_s.cjs → DlwQQFN_mRiIrttG.cjs} +6 -6
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{BfOux96gs0sl6o1o.mjs → BEjEVDP4wDSgmkji.mjs} +2 -2
- package/browser/esm/{B2ZgR_6AzHI4l5DU.mjs → BQAx8mHWow5_y9KO.mjs} +562 -554
- package/browser/esm/index.mjs +2 -2
- package/node/esm/index.mjs +165 -157
- package/node/esm/{B8AkLqu0SQMq831k.mjs → mzf6ST9951mHAaux.mjs} +1 -1
- package/package.json +3 -3
package/node/esm/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
7
|
import { jsx as e, jsxs as t, Fragment as o } from "react/jsx-runtime";
|
|
8
|
-
import r, { memo as n, forwardRef as i, useMemo as
|
|
8
|
+
import r, { memo as n, forwardRef as i, useMemo as l, useRef as a, useEffect as s, useState as c, useImperativeHandle as d, useCallback as p, useLayoutEffect as u, useReducer as m } from "react";
|
|
9
9
|
import h from "clsx";
|
|
10
10
|
import { alpha as f, darken as x, lighten as b } from "@mui/system";
|
|
11
11
|
import { IconButton as g, Divider as y, Box as v, Typography as k, Paper as w, Chip as C, Popper as M, Grow as S, Tooltip as P, ListItemIcon as R, MenuItem as D, Fade as E, Backdrop as T, DialogTitle as $, Button as z, DialogContent as O, DialogActions as I, Input as N, Toolbar as B } from "@mui/material";
|
|
@@ -16,8 +16,8 @@ import { deepmerge as te } from "@mui/utils";
|
|
|
16
16
|
import { detectOverflow as oe } from "@popperjs/core";
|
|
17
17
|
import { mergeRefs as re } from "react-merge-refs";
|
|
18
18
|
import { useIsomorphicLayoutEffect as ne, useMeasure as ie } from "react-use";
|
|
19
|
-
import
|
|
20
|
-
import { useModal as
|
|
19
|
+
import le from "tiny-invariant";
|
|
20
|
+
import { useModal as ae } from "mui-modal-provider";
|
|
21
21
|
export * from "mui-modal-provider";
|
|
22
22
|
import { default as default2 } from "mui-modal-provider";
|
|
23
23
|
import { createPortal as se } from "react-dom";
|
|
@@ -29,34 +29,34 @@ const he = (e2) => {
|
|
|
29
29
|
const t2 = { style: { cursor: "pointer" }, ...e2 };
|
|
30
30
|
return A(t2);
|
|
31
31
|
}, fe = (t2, o2, r2, n2) => {
|
|
32
|
-
const { style: i2, ...
|
|
33
|
-
return e(gt, { title: t2.disabled ? r2 : n2, enterDelay: 800, enterNextDelay: 1600, children: t2.disabled ? e("div", { style: { display: "flex" }, children:
|
|
32
|
+
const { style: i2, ...l2 } = t2, a2 = e(g, { component: "div", ...l2, style: { ...i2, padding: "0px" }, sx: { padding: "0" }, color: t2.disabled ? void 0 : "primary", "aria-label": r2, size: "small", children: o2 });
|
|
33
|
+
return e(gt, { title: t2.disabled ? r2 : n2, enterDelay: 800, enterNextDelay: 1600, children: t2.disabled ? e("div", { style: { display: "flex" }, children: a2 }) : a2 });
|
|
34
34
|
}, xe = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowLeft", size: "small" }) : e(W, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === H.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), be = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowRight", size: "small" }) : e(W, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Right" : "Down"), `Scroll ${t2.orientation === H.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ge = n(i((t2, o2) => {
|
|
35
|
-
const { orientation: r2 = "vertical", sx: n2, ...i2 } = t2,
|
|
36
|
-
return e(y, { ref: o2, sx: { marginLeft:
|
|
35
|
+
const { orientation: r2 = "vertical", sx: n2, ...i2 } = t2, l2 = "vertical" === r2;
|
|
36
|
+
return e(y, { ref: o2, sx: { marginLeft: l2 ? "2px" : void 0, marginRight: l2 ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: l2 ? "1em" : void 0, minWidth: l2 ? void 0 : "1em", borderColor: (e2) => e2.palette.divider, ...n2 }, orientation: r2, variant: "middle", flexItem: true, ...i2 });
|
|
37
37
|
})), ye = "_traverse-ellipsis_14l1h_1", ve = n((o2) => {
|
|
38
|
-
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...
|
|
39
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], fill: "none" }, ...r2 }, ...
|
|
38
|
+
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...l2 } = o2;
|
|
39
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], fill: "none" }, ...r2 }, ...l2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "48" }), e("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "85", y2: "50.5", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) }), e("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "49.5", y2: "74", children: e("animateTransform", { attributeName: "transform", dur: 7.5 * n2 + "s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
|
|
40
40
|
}), ke = n((o2) => {
|
|
41
|
-
const { sx: r2, speed: n2 = 1.5, size: i2 = 70, ...
|
|
42
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600] }, "& .secondary": { stroke: (e2) => e2.palette.grey[600], fill: "none", opacity: 0.5 }, ...r2 }, ...
|
|
41
|
+
const { sx: r2, speed: n2 = 1.5, size: i2 = 70, ...l2 } = o2;
|
|
42
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600] }, "& .secondary": { stroke: (e2) => e2.palette.grey[600], fill: "none", opacity: 0.5 }, ...r2 }, ...l2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "secondary", strokeWidth: "4", cx: "50", cy: "50", r: "21" }), e("path", { className: "primary", d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50", children: e("animateTransform", { attributeName: "transform", type: "rotate", dur: 1 * n2 + "s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
|
|
43
43
|
}), we = n((o2) => {
|
|
44
|
-
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...
|
|
45
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, ...r2 }, ...
|
|
44
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...l2 } = o2;
|
|
45
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, ...r2 }, ...l2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.1" }) }), e("circle", { className: "primary", cx: "26", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.2" }) }), e("circle", { className: "primary", cx: "46", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.3" }) })] }) });
|
|
46
46
|
}), Ce = n((o2) => {
|
|
47
|
-
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...
|
|
48
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600], stroke: "none" }, ...r2 }, ...
|
|
47
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...l2 } = o2;
|
|
48
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600], stroke: "none" }, ...r2 }, ...l2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 15 ; 0 -15; 0 15", repeatCount: "indefinite", begin: "0.1" }) }), e("circle", { className: "primary", cx: "30", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 10 ; 0 -10; 0 10", repeatCount: "indefinite", begin: "0.2" }) }), e("circle", { className: "primary", cx: "54", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" }) })] }) });
|
|
49
49
|
}), Me = n((o2) => {
|
|
50
|
-
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...
|
|
51
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (e2) => e2.palette.grey[600], opacity: 0.8, stroke: (e2) => e2.palette.background.paper }, ...r2 }, ...
|
|
50
|
+
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...l2 } = o2;
|
|
51
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (e2) => e2.palette.grey[600], opacity: 0.8, stroke: (e2) => e2.palette.background.paper }, ...r2 }, ...l2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "44" }), e("circle", { className: "secondary", strokeWidth: "3", cx: "8", cy: "54", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "rotate", from: "0 50 48", to: "360 50 52", repeatCount: "indefinite" }) })] }) });
|
|
52
52
|
}), Se = n((o2) => {
|
|
53
|
-
const { sx: r2, speed: n2 = 1, size: i2 = 13, width:
|
|
54
|
-
return t(v, { sx: { width: `${
|
|
53
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 13, width: l2 = 64, height: a2 = 17, ...s2 } = o2;
|
|
54
|
+
return t(v, { sx: { width: `${l2}px`, height: `${a2}px`, "& .primary": { backgroundColor: (e2) => e2.palette.grey[600], top: `${(a2 - i2) / 2}px`, width: () => `${i2}px`, height: () => `${i2}px` }, ...r2 }, className: h(ye, "animated-icon"), ...s2, children: [e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" })] });
|
|
55
55
|
}), Pe = e(ke, {}), Re = n(i((o2, r2) => {
|
|
56
|
-
const { sx: n2, style: i2, onMount: c2, onUnmount: d2, transitionDelay: p2 = "1200ms", panel: u2 = false, transparentBackground: m2 = true, icon: h2 = Pe, label: x2, ...b2 } = o2, g2 =
|
|
56
|
+
const { sx: n2, style: i2, onMount: c2, onUnmount: d2, transitionDelay: p2 = "1200ms", panel: u2 = false, transparentBackground: m2 = true, icon: h2 = Pe, label: x2, ...b2 } = o2, g2 = l(() => "string" == typeof x2 ? e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: x2 }) : x2, [x2]), y2 = a(null), C2 = l(() => {
|
|
57
57
|
let o3 = t(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [g2, h2] });
|
|
58
58
|
return true === u2 && (o3 = e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.info.light, color: (e2) => e2.palette.info.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(1), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${f(e2.palette.info.contrastText, 0.9)} !important`, boxShadow: (e2) => `0 0 0 1px ${"dark" === e2.palette.mode ? e2.palette.text.secondary : e2.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: o3 })), e(v, { ref: re([y2, r2]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: m2 ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: p2, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n2, ...i2 }, ...b2, children: t(v, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(v, { className: "backdrop", sx: { opacity: (e2) => m2 ? 1.5 * e2.palette.action.disabledOpacity : void 0, background: (e2) => m2 ? void 0 : e2.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), o3] }) });
|
|
59
|
-
}, [n2, u2]), M2 =
|
|
59
|
+
}, [n2, u2]), M2 = a(false), S2 = a(false);
|
|
60
60
|
return ne(() => {
|
|
61
61
|
if (y2.current && !M2.current && !S2.current) {
|
|
62
62
|
if (S2.current = true, y2.current.classList.contains("animatable") && !y2.current.classList.contains("animating")) {
|
|
@@ -84,10 +84,10 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
84
84
|
}
|
|
85
85
|
return e2 = (e2 = e2.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
|
|
86
86
|
}, $e = n(({ error: o2, maxLines: r2 = Number.MAX_SAFE_INTEGER, hideLineNumbers: n2 = false }) => {
|
|
87
|
-
const [i2,
|
|
87
|
+
const [i2, l2] = c(null);
|
|
88
88
|
if (!o2?.stack) return null;
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const a2 = L.collectErrorChain(o2).reverse(), s2 = [];
|
|
90
|
+
a2.forEach(({ error: e2 }, t2) => {
|
|
91
91
|
const o3 = (e2.stack || "").split("\n").filter(Boolean).map((e3) => {
|
|
92
92
|
let t3 = e3.match(De);
|
|
93
93
|
if (t3) {
|
|
@@ -95,15 +95,15 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
95
95
|
return { line: `at ${e4 ? e4 + " " : ""}${o4}`, location: `${Te(r3).split(/[\\/]/).pop()}:${n3}:${i3}` };
|
|
96
96
|
}
|
|
97
97
|
if (t3 = e3.match(Ee), t3) {
|
|
98
|
-
const [, e4 = "", o4, r3, n3] = t3, i3 = Te(o4),
|
|
99
|
-
return { line: `at ${e4 ? e4 + " " : ""}${
|
|
98
|
+
const [, e4 = "", o4, r3, n3] = t3, i3 = Te(o4), l3 = `${i3.split(/[\\/]/).pop()}:${r3}:${n3}`;
|
|
99
|
+
return { line: `at ${e4 ? e4 + " " : ""}${l3}`, location: i3 !== l3 ? `${i3}:${r3}:${n3}` : void 0 };
|
|
100
100
|
}
|
|
101
101
|
return { line: e3.trim() };
|
|
102
102
|
});
|
|
103
103
|
o3.length && (s2.push({ line: t2 ? `Caused by: ${o3[0].line}` : o3[0].line, isBoundary: true }), s2.push(...o3.slice(1)));
|
|
104
104
|
});
|
|
105
105
|
const d2 = r2 ? s2.slice(0, r2) : s2, p2 = r2 && s2.length > r2;
|
|
106
|
-
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(",
|
|
106
|
+
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", a2.length > 1 ? ` (${a2.length} frames)` : "", ")"] }), e(v, { sx: { flex: 1 } }), i2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: i2 }), e(g, { size: "small", onClick: async () => {
|
|
107
107
|
try {
|
|
108
108
|
let e2 = 0;
|
|
109
109
|
const t2 = s2.map((t3) => {
|
|
@@ -112,72 +112,72 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
112
112
|
let o3 = t3.location && t3.line !== t3.location ? `${t3.line} (${t3.location})` : t3.line;
|
|
113
113
|
return e2 >= 1 && (o3 = ` ${o3}`), o3;
|
|
114
114
|
}).join("\n");
|
|
115
|
-
await navigator.clipboard.writeText(t2),
|
|
115
|
+
await navigator.clipboard.writeText(t2), l2("Copied!"), setTimeout(() => l2(null), 2e3);
|
|
116
116
|
} catch (e2) {
|
|
117
|
-
|
|
117
|
+
l2("Can't copy!"), console.warn("Failed to copy stack trace:", e2);
|
|
118
118
|
}
|
|
119
119
|
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(W, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), e(g, { size: "small", onClick: () => {
|
|
120
|
-
|
|
120
|
+
l2("Logged!"), setTimeout(() => l2(null), 2e3), console.log(o2);
|
|
121
121
|
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(W, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), t(v, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [d2.map((o3, r3) => o3.isBoundary ? e(v, { sx: { py: 1, mt: r3 > 0 ? 1 : 0, mb: 0.5, borderTop: r3 > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (e2) => o3.isBoundary ? e2.palette.text.primary : e2.palette.text.secondary, display: "block" }, children: o3.line }) }, `error-${r3}`) : t(v, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: r3 + 1 }), t(v, { sx: { flex: 1, overflow: "hidden" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: o3.line }), o3.location && o3.line !== o3.location && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: o3.location })] })] }, `stack-${r3}`)), p2 && t(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", s2.length - r2, " more frames"] })] })] });
|
|
122
122
|
});
|
|
123
123
|
$e.displayName = "StackTrace";
|
|
124
124
|
const ze = (o2, n2 = false, i2 = false) => {
|
|
125
125
|
if (r.isValidElement(o2)) return o2;
|
|
126
126
|
if (o2 instanceof Error) return t(v, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: o2.message }), o2.cause ? t(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", o2.cause instanceof Error ? o2.cause.message : String(o2.cause)] }) : null, !n2 && e($e, { error: o2, hideLineNumbers: true })] });
|
|
127
|
-
const
|
|
128
|
-
return e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children:
|
|
127
|
+
const l2 = "string" === o2 ? o2 : `Unknown Error: ${String(o2)}`;
|
|
128
|
+
return e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: l2 });
|
|
129
129
|
}, Oe = n(i((o2, r2) => {
|
|
130
|
-
const { sx: n2, icon: i2 = e(W, { iconKey: "Error", style: { fontSize: 48 } }), error:
|
|
131
|
-
return
|
|
130
|
+
const { sx: n2, icon: i2 = e(W, { iconKey: "Error", style: { fontSize: 48 } }), error: a2, hideStackTrace: s2 = false, stackTraceExpanded: c2 = false, ...d2 } = o2, p2 = l(() => ze(a2, s2, c2), [a2, s2, c2]);
|
|
131
|
+
return l(() => e(v, { ref: r2, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n2 }, ...d2, children: t(v, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(v, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.error.light, color: (e2) => e2.palette.error.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(2), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${e2.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: e(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (e2) => e2.spacing(2), width: "100%", maxWidth: "600px" }, children: t(v, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (e2) => e2.spacing(2) }, children: [i2, p2] }) }) })] }) }), [n2]);
|
|
132
132
|
}));
|
|
133
133
|
Oe.displayName = "ErrorPanel";
|
|
134
134
|
const Ie = n(i((t2, o2) => {
|
|
135
|
-
const { chips: n2, sx: i2, ...
|
|
135
|
+
const { chips: n2, sx: i2, ...l2 } = t2, a2 = r.useMemo(() => {
|
|
136
136
|
if (!n2) return null;
|
|
137
137
|
let t3 = null;
|
|
138
138
|
t3 = Array.isArray(n2) ? n2 : [n2];
|
|
139
139
|
const o3 = [], i3 = t3.length;
|
|
140
140
|
for (let n3 = 0; n3 < i3; n3++) {
|
|
141
141
|
const i4 = t3[n3];
|
|
142
|
-
let
|
|
143
|
-
"string" == typeof i4 ?
|
|
142
|
+
let l3 = null;
|
|
143
|
+
"string" == typeof i4 ? l3 = e(C, { label: i4, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + n3) : r.cloneElement(i4, { key: "chip-" + n3 }), o3.push(l3);
|
|
144
144
|
}
|
|
145
145
|
return o3;
|
|
146
146
|
}, [n2]);
|
|
147
|
-
return e(v, { ref: o2, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...i2 }, ...
|
|
147
|
+
return e(v, { ref: o2, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...i2 }, ...l2, children: a2 });
|
|
148
148
|
})), Ne = { name: "maxSize", enabled: true, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e2) {
|
|
149
|
-
var t2 = e2.state, o2 = e2.name, r2 = e2.options, n2 = oe(t2, r2), i2 = t2.modifiersData.preventOverflow || { x: 0, y: 0 },
|
|
149
|
+
var t2 = e2.state, o2 = e2.name, r2 = e2.options, n2 = oe(t2, r2), i2 = t2.modifiersData.preventOverflow || { x: 0, y: 0 }, l2 = i2.x, a2 = i2.y;
|
|
150
150
|
let s2 = t2.rects.popper, c2 = s2.width, d2 = s2.height, p2 = t2.placement.split("-")[0], u2 = "left" === p2 ? "left" : "right", m2 = "top" === p2 ? "top" : "bottom";
|
|
151
|
-
t2.modifiersData[o2] = { width: c2 - n2[u2] -
|
|
151
|
+
t2.modifiersData[o2] = { width: c2 - n2[u2] - l2, height: d2 - n2[m2] - a2 };
|
|
152
152
|
} }, Be = [0, 2], Le = n(i((t2, o2) => {
|
|
153
|
-
const { sx: n2, open: i2, children:
|
|
154
|
-
if (Array.isArray(
|
|
153
|
+
const { sx: n2, open: i2, children: a2, label: p2, offsets: u2 = Be, anchorEl: m2, anchorPosition: h2, onMount: f2, onOpening: x2, onOpen: b2, onClosing: g2, onClose: y2, resizeOnOverflow: v2 = true, ...k2 } = t2;
|
|
154
|
+
if (Array.isArray(a2)) throw new Error("children can not be an array");
|
|
155
155
|
const w2 = Y(), C2 = { name: "applyMaxSize", enabled: true, phase: "beforeWrite", requires: ["maxSize"], fn({ state: e2 }) {
|
|
156
156
|
const { height: t3 } = e2.modifiersData.maxSize;
|
|
157
157
|
e2.styles.popper.maxHeight = t3 - 10 + "px";
|
|
158
|
-
} }, P2 =
|
|
158
|
+
} }, P2 = l(() => {
|
|
159
159
|
const e2 = [{ name: "offset", options: { offset: u2 } }, { name: "flip", enabled: true, options: { rootBoundary: "document" } }];
|
|
160
160
|
return v2 && e2.unshift(Ne, C2), e2;
|
|
161
161
|
}, [v2, u2]), [R2, D2] = c(false), E2 = r.useRef(null), T2 = K(() => {
|
|
162
162
|
f2?.(L2.current, E2.current);
|
|
163
163
|
}, [x2]), $2 = K(x2, [x2]), z2 = K(b2, [b2]), O2 = K(g2, [g2]), I2 = K(() => {
|
|
164
164
|
D2(false), y2?.();
|
|
165
|
-
}, [y2]), [N2, B2] = c(false), L2 = r.useRef(null), A2 = r.useRef(true), H2 =
|
|
165
|
+
}, [y2]), [N2, B2] = c(false), L2 = r.useRef(null), A2 = r.useRef(true), H2 = l(() => ({ onFirstUpdate: () => {
|
|
166
166
|
A2.current && (B2(true), T2?.(), A2.current = false);
|
|
167
167
|
} }), [i2, R2]);
|
|
168
168
|
s(() => {
|
|
169
169
|
i2 && N2 ? $2?.() : !i2 && R2 && O2?.(), i2 && D2(i2);
|
|
170
170
|
}, [i2, N2]);
|
|
171
|
-
const W2 =
|
|
171
|
+
const W2 = l(() => ({ getBoundingClientRect: () => h2 ? new DOMRect(h2?.left || 0, h2?.top || 0, 0, 0) : m2.getBoundingClientRect() }), [h2, m2]);
|
|
172
172
|
d(o2, () => ({ instance: () => E2.current, element: () => L2.current }), []);
|
|
173
|
-
const { getPortalContainer: q2 } = V(), _2 =
|
|
173
|
+
const { getPortalContainer: q2 } = V(), _2 = l(() => ({ zIndex: i2 ? "1300" : "1299", display: "flex", pointerEvents: R2 && i2 ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...n2 }), [n2, i2, R2]);
|
|
174
174
|
return e(M, { ref: L2, popperRef: E2, container: q2, anchorEl: W2, open: R2, role: void 0, popperOptions: H2, transition: true, sx: _2, placement: "bottom-start", modifiers: P2, ...k2, children: ({ TransitionProps: t3, placement: o3, ...r2 }) => {
|
|
175
|
-
const { in: n3, onEnter:
|
|
175
|
+
const { in: n3, onEnter: l2, onExited: s2, ...c2 } = t3 ?? {};
|
|
176
176
|
return e(S, { ...c2, in: i2, onEnter: () => {
|
|
177
|
-
|
|
177
|
+
l2?.(), z2();
|
|
178
178
|
}, onExited: () => {
|
|
179
179
|
s2?.(), I2();
|
|
180
|
-
}, timeout: { enter: w2.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: "bottom-start" === o3 ? "left top" : "center bottom" }, children: "function" == typeof
|
|
180
|
+
}, timeout: { enter: w2.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: "bottom-start" === o3 ? "left top" : "center bottom" }, children: "function" == typeof a2 ? a2({ TransitionProps: t3, placement: o3, ...r2 }) : a2 || F.EmptyArray });
|
|
181
181
|
} });
|
|
182
182
|
}));
|
|
183
183
|
Le.displayName = "ExhibitPopper";
|
|
@@ -189,9 +189,9 @@ const Fe = (e2) => {
|
|
|
189
189
|
const o2 = "dark" === t2.palette.mode ? t2.palette.text.primary : t2.palette.divider;
|
|
190
190
|
return `drop-shadow(0px 0px ${e2}px ${o2})`;
|
|
191
191
|
}, He = (t2) => e(W, { ...t2, iconKey: "ArrowDownOutline" }), We = (t2) => e(W, { ...t2, iconKey: "ArrowRightOutline" }), Ke = J(n(i((t2, o2) => {
|
|
192
|
-
const { sx: r2, size: n2 = "small", activeColor: i2, children:
|
|
192
|
+
const { sx: r2, size: n2 = "small", activeColor: i2, children: l2, className: a2, ...s2 } = t2;
|
|
193
193
|
let c2 = "1rem", d2 = "1rem";
|
|
194
|
-
return "medium" === n2 ? (c2 = "1.25rem", d2 = "1.25rem") : "large" === n2 && (c2 = "1.5rem", d2 = "1.5rem"), e(v, { ref: o2, className: h("icon",
|
|
194
|
+
return "medium" === n2 ? (c2 = "1.25rem", d2 = "1.25rem") : "large" === n2 && (c2 = "1.5rem", d2 = "1.5rem"), e(v, { ref: o2, className: h("icon", a2), sx: { width: c2, height: d2, ...r2 }, ...s2, children: l2 });
|
|
195
195
|
})))(({ theme: e2 }) => ({ fill: "currentColor", "& .activeColor": { fill: e2.palette.primary.main }, "& .styled.high_contrast": { fill: e2.palette.primary.main }, "& .styled.background": { fill: e2.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e2.palette.secondary.main }, "& .styled.secondary_dark": { fill: e2.palette.secondary.dark }, "& .styled.secondary_light": { fill: e2.palette.secondary.light }, "& .styled.info": { fill: e2.palette.info.main }, "& .styled.info.stroked": { stroke: e2.palette.info.main }, "& .styled.info_dark": { fill: e2.palette.info.dark }, "& .styled.info_light": { fill: e2.palette.info.light }, "& .styled.warning": { fill: e2.palette.warning.main }, "& .styled.warning.stroked": { stroke: e2.palette.warning.main }, "& .styled.warning_dark": { fill: e2.palette.warning.dark }, "& .styled.warning_light": { fill: e2.palette.warning.light }, "& .styled.error.info": { fill: e2.palette.error.main }, "& .styled.error.stroked": { stroke: e2.palette.error.main }, "& .styled.error_dark": { fill: e2.palette.error.dark }, "& .styled.error_light": { fill: e2.palette.error.light }, "& .styled.success": { fill: e2.palette.success.main }, "& .styled.success_dark": { fill: e2.palette.success.dark }, "& .styled.success_light": { fill: e2.palette.success.light }, "& .styled.grey": { fill: e2.palette.text.icon ?? e2.palette.action.active } })), Ve = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, qe = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, _e = function(e2, t2 = null) {
|
|
196
196
|
if (!e2) return e2;
|
|
197
197
|
e2 = e2.replace(Ve, function(e3, t3, o3, r2) {
|
|
@@ -245,9 +245,9 @@ function Je(e2) {
|
|
|
245
245
|
}
|
|
246
246
|
}, n2 = new MutationObserver(e3), i2 = [document.documentElement, document.body].filter(Boolean);
|
|
247
247
|
for (const e4 of i2) n2.observe(e4, { attributes: true, attributeFilter: ["class"] });
|
|
248
|
-
const
|
|
249
|
-
return
|
|
250
|
-
n2.disconnect(),
|
|
248
|
+
const l2 = window.matchMedia("(prefers-color-scheme: dark)");
|
|
249
|
+
return l2.addEventListener("change", e3), e3(), () => {
|
|
250
|
+
n2.disconnect(), l2.removeEventListener("change", e3);
|
|
251
251
|
};
|
|
252
252
|
}, [t2]), o2;
|
|
253
253
|
}
|
|
@@ -260,22 +260,22 @@ function et() {
|
|
|
260
260
|
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
261
261
|
}
|
|
262
262
|
const tt = { Popup: "popup", Anchor: "anchor" }, ot = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, rt = { Toolbar: "toolbar", Menuitem: "menuitem" }, nt = (t2) => {
|
|
263
|
-
const { closeFloat: o2, closeFloatAll: r2, floatReference: n2, popupContainer: i2, children:
|
|
264
|
-
return e(v, { className: h("menu",
|
|
263
|
+
const { closeFloat: o2, closeFloatAll: r2, floatReference: n2, popupContainer: i2, children: l2, className: a2, sx: s2, ...c2 } = t2;
|
|
264
|
+
return e(v, { className: h("menu", a2), sx: { display: "flex", flexDirection: "column", ...s2 }, ...c2, children: l2 });
|
|
265
265
|
}, it = (t2, o2, r2) => {
|
|
266
266
|
let n2;
|
|
267
267
|
return r2 && (n2 = (n2 ? n2 + " " : "") + "rotate(180deg)"), e(He, { style: { marginLeft: t2 ? void 0 : o2 ? "-0.25rem" : "-3px", marginRight: t2 ? void 0 : o2 ? "-0.25rem" : "-6px", transform: n2 }, color: "inherit" });
|
|
268
|
-
},
|
|
269
|
-
const { open: r2, anchorEl: n2, anchorPosition: i2, label: s2, floatReference: d2, createPopupPanel: p2 = nt, popperProps: u2, onMount: m2, onClosing: h2, onClose: f2, onOpening: x2, onOpen: b2, children: g2, sx: y2, ...v2 } = t2, k2 = K(h2, [h2]), C2 = K(f2, [f2]), M2 = K(x2, [x2]), S2 = K(b2, [b2]), [P2, R2] = c(), D2 =
|
|
268
|
+
}, lt = n(i((t2, o2) => {
|
|
269
|
+
const { open: r2, anchorEl: n2, anchorPosition: i2, label: s2, floatReference: d2, createPopupPanel: p2 = nt, popperProps: u2, onMount: m2, onClosing: h2, onClose: f2, onOpening: x2, onOpen: b2, children: g2, sx: y2, ...v2 } = t2, k2 = K(h2, [h2]), C2 = K(f2, [f2]), M2 = K(x2, [x2]), S2 = K(b2, [b2]), [P2, R2] = c(), D2 = a(null), E2 = K((e2, t3) => {
|
|
270
270
|
R2(e2), m2?.(D2.current, t3);
|
|
271
|
-
}, [m2]), T2 =
|
|
271
|
+
}, [m2]), T2 = l(() => {
|
|
272
272
|
const t3 = { popupContainer: P2, floatReference: d2, children: g2, ...v2 }, o3 = p2(t3);
|
|
273
273
|
return e(w, { elevation: 8, ref: D2, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (e2) => Xe(e2) }, tabIndex: 0, children: o3 });
|
|
274
274
|
}, [p2, g2, P2, d2]);
|
|
275
275
|
return e(Le, { ref: o2, anchorEl: n2, anchorPosition: i2, label: s2, open: r2, onMount: E2, onOpening: M2, onOpen: S2, onClosing: k2, onClose: C2, ...u2, children: T2 });
|
|
276
276
|
}));
|
|
277
|
-
|
|
278
|
-
const
|
|
277
|
+
lt.displayName = "ExhibitFloatPanel";
|
|
278
|
+
const at = /* @__PURE__ */ new Map();
|
|
279
279
|
let st = null;
|
|
280
280
|
const ct = /* @__PURE__ */ new Map();
|
|
281
281
|
let dt = null;
|
|
@@ -287,7 +287,7 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
287
287
|
}, ut = (e2, t2) => {
|
|
288
288
|
if (null === t2) return;
|
|
289
289
|
e2.add(t2);
|
|
290
|
-
const o2 =
|
|
290
|
+
const o2 = at.get(t2.key);
|
|
291
291
|
if (!o2) return;
|
|
292
292
|
const r2 = ct.get(o2);
|
|
293
293
|
r2 && ut(e2, r2);
|
|
@@ -295,14 +295,14 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
295
295
|
const t2 = /* @__PURE__ */ new Set();
|
|
296
296
|
return ut(t2, e2), t2;
|
|
297
297
|
}, ht = (t2) => {
|
|
298
|
-
const { anchor: o2, label: n2 = null, parentFloat: i2 = null, onOpen:
|
|
298
|
+
const { anchor: o2, label: n2 = null, parentFloat: i2 = null, onOpen: a2, onClose: d2, popperProps: u2, createPopupPanel: m2 = nt } = t2 ?? {}, h2 = K(a2, [a2]), f2 = K(d2, [d2]), [x2, b2] = c(null), [g2, y2] = c(false), [v2, k2] = c(false), w2 = l(() => null === i2 ? (null === st && (st = { key: { label: "root" }, isRoot: true, parent: null, open: () => null, close: (e2) => null, closeChild: (e2) => null, onChildVisible: () => {
|
|
299
299
|
}, onChildHidden: () => {
|
|
300
|
-
}, closeAll: () => F2(0), floatElement: () => null, anchorElement: () => null }), st) : i2, []), C2 =
|
|
300
|
+
}, closeAll: () => F2(0), floatElement: () => null, anchorElement: () => null }), st) : i2, []), C2 = l(() => ({ label: n2 }), []), M2 = r.useRef(null), S2 = r.useRef(o2);
|
|
301
301
|
s(() => {
|
|
302
302
|
S2.current = o2;
|
|
303
303
|
}, [o2]);
|
|
304
304
|
const P2 = (e2) => {
|
|
305
|
-
const t3 =
|
|
305
|
+
const t3 = at.get(e2);
|
|
306
306
|
let o3 = null;
|
|
307
307
|
if (t3) {
|
|
308
308
|
const e3 = ct.get(t3);
|
|
@@ -314,7 +314,7 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
314
314
|
const e2 = new Promise((e3, t3) => {
|
|
315
315
|
E2((o3) => ({ resolve: e3, reject: t3 }));
|
|
316
316
|
});
|
|
317
|
-
return R2(),
|
|
317
|
+
return R2(), at.delete(w2.key), b2(false), e2;
|
|
318
318
|
};
|
|
319
319
|
s(() => {
|
|
320
320
|
D2 && (D2.resolve(), E2(null));
|
|
@@ -329,18 +329,18 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
329
329
|
const e3 = ct.get(w2.key);
|
|
330
330
|
e3?.open(0);
|
|
331
331
|
}
|
|
332
|
-
const e2 =
|
|
332
|
+
const e2 = at.get(w2.key);
|
|
333
333
|
if (e2 && e2 !== C2) {
|
|
334
334
|
const t3 = ct.get(e2);
|
|
335
335
|
t3?.close(0);
|
|
336
336
|
}
|
|
337
337
|
requestAnimationFrame(() => {
|
|
338
|
-
|
|
338
|
+
at.set(w2.key, W2.key), b2(true);
|
|
339
339
|
});
|
|
340
340
|
}, [O2, I2] = r.useReducer((e2) => e2 + 1, 0), N2 = p((e2) => null === m2 ? null : m2({ closeFloat: F2, closeFloatAll: H2, ...e2 }), [m2]), B2 = null === m2, L2 = K((e2 = 120) => pt(e2, z2, /* @__PURE__ */ new Set([W2]), false)(), [z2]), F2 = K((e2 = 60) => pt(e2, T2, mt(W2), true)(), [T2]), A2 = K((e2 = 360) => pt(e2, R2, mt(((e3) => {
|
|
341
|
-
const t3 =
|
|
341
|
+
const t3 = at.get(e3.key);
|
|
342
342
|
return t3 && ct.get(t3) || null;
|
|
343
|
-
})(W2)), true)(), [R2]), H2 = K($2, [$2]), W2 =
|
|
343
|
+
})(W2)), true)(), [R2]), H2 = K($2, [$2]), W2 = l(() => ({ key: C2, isRoot: false, label: n2, parent: w2, onChildVisible: () => {
|
|
344
344
|
k2(true);
|
|
345
345
|
}, onChildHidden: () => {
|
|
346
346
|
k2(false);
|
|
@@ -370,7 +370,7 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
370
370
|
});
|
|
371
371
|
}, []), [Q2, G2] = c();
|
|
372
372
|
s(() => {
|
|
373
|
-
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(g2 ? e(
|
|
373
|
+
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(g2 ? e(lt, { floatReference: W2, open: x2, label: n2, anchorEl: o2, onOpening: () => {
|
|
374
374
|
h2?.(), w2.onChildVisible();
|
|
375
375
|
}, onClosing: j2, onClose: () => {
|
|
376
376
|
y2(false), w2.onChildHidden();
|
|
@@ -379,9 +379,9 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
379
379
|
}, ...u2 }, createPopupPanel: N2 }) : null);
|
|
380
380
|
}, [g2, x2, n2, B2, u2, N2, O2]);
|
|
381
381
|
const X2 = K((e2) => {
|
|
382
|
-
if (0 ===
|
|
382
|
+
if (0 === at.size) return;
|
|
383
383
|
let t3 = false;
|
|
384
|
-
|
|
384
|
+
at.forEach((o3) => {
|
|
385
385
|
const r2 = ct.get(o3);
|
|
386
386
|
if (t3) return;
|
|
387
387
|
if (!r2) return;
|
|
@@ -401,20 +401,20 @@ const pt = (e2 = null, t2, o2, r2) => {
|
|
|
401
401
|
};
|
|
402
402
|
}, [x2, w2]), { component: Q2, reference: W2 };
|
|
403
403
|
}, ft = n(i((o2, r2) => {
|
|
404
|
-
const { nestedChildren: n2, variant: i2, disabled:
|
|
404
|
+
const { nestedChildren: n2, variant: i2, disabled: l2 = false, createPopupPanel: a2, ...s2 } = o2, c2 = { disabled: l2, createPopupPanel: K((o3) => {
|
|
405
405
|
if (!n2 || 0 === n2.length) return null;
|
|
406
|
-
const { popupContainer: i3, floatReference:
|
|
406
|
+
const { popupContainer: i3, floatReference: l3, ref: a3, ...s3 } = o3, c3 = [];
|
|
407
407
|
for (let t2 = 0; t2 < n2.length; t2++) {
|
|
408
408
|
const o4 = n2[t2];
|
|
409
|
-
o4 && c3.push(e(ft, { parentFloat:
|
|
409
|
+
o4 && c3.push(e(ft, { parentFloat: l3, ...s3, ...o4 }, t2));
|
|
410
410
|
}
|
|
411
|
-
return t(v, { ref: r2, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", c3, e(Dt, { parentFloat:
|
|
411
|
+
return t(v, { ref: r2, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", c3, e(Dt, { parentFloat: l3, children: "Close other children" })] });
|
|
412
412
|
}, [n2]), ...s2 };
|
|
413
413
|
return e(i2 === rt.Toolbar ? Tt : zt, { ...c2 });
|
|
414
414
|
})), xt = { placement: "right-start" }, bt = n(i((e2, n2) => {
|
|
415
|
-
const { children: i2, sx:
|
|
416
|
-
|
|
417
|
-
const h2 = i2, f2 =
|
|
415
|
+
const { children: i2, sx: a2, parentFloat: c2, createPopupPanel: d2, popperProps: p2 = xt, label: u2, ...m2 } = e2;
|
|
416
|
+
le(r.isValidElement(i2), "Must supply a child component to enable a context menu.");
|
|
417
|
+
const h2 = i2, f2 = l(() => ({ ...h2?.props, ...m2, onContextMenu: (e3) => {
|
|
418
418
|
h2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (g2(e3), e3.preventDefault()));
|
|
419
419
|
} }), [m2, h2?.props]), x2 = K(d2, [d2]), [b2, g2] = r.useState(null), { reference: y2, component: v2 } = ht({ label: u2 ?? "contextMenu", popperProps: p2, parentFloat: c2, anchor: { getBoundingClientRect: () => new DOMRect(b2?.clientX || 0, b2?.clientY || 0) }, onClose: () => g2(null), createPopupPanel: x2 });
|
|
420
420
|
return s(() => {
|
|
@@ -440,21 +440,21 @@ const yt = n((t2) => {
|
|
|
440
440
|
const i2 = [];
|
|
441
441
|
return n2?.[_.Ctrl] && (i2.push(e(yt, { modifier: o2 ? "^" : e("div", { style: { paddingRight: "1px" }, children: vt }) }, "ctrl")), i2.push("+")), n2?.[_.Alt] && (i2.push(e(yt, { modifier: o2 ? "⌥" : "Alt" }, "alt")), i2.push("+")), n2?.[_.Shift] && (i2.push(e(yt, { modifier: o2 ? "⇧" : e("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), i2.push("+")), n2?.[_.Meta] && (i2.push(e(yt, { modifier: o2 ? e("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), i2.push("+")), i2.push(e(yt, { modifier: j.toPrettyKeyCode(t2.key) }, "character")), e(v, { sx: { display: "flex", alignItems: "center" }, children: i2 }, r2);
|
|
442
442
|
}, wt = n(i((r2, n2) => {
|
|
443
|
-
const { disabled: i2 = false, label:
|
|
443
|
+
const { disabled: i2 = false, label: l2, shortcut: a2, chips: d2, description: p2, maxWidth: u2 = 280, useModifierSymbols: m2 = false, children: h2, simple: f2, componentDisabled: x2 = false, sx: b2, ...g2 } = r2;
|
|
444
444
|
let y2 = null;
|
|
445
|
-
|
|
445
|
+
a2 && (y2 = kt(a2, m2));
|
|
446
446
|
const [w2, C2] = c(null);
|
|
447
447
|
s(() => {
|
|
448
|
-
Promise.resolve(
|
|
448
|
+
Promise.resolve(l2).then((e2) => {
|
|
449
449
|
C2(e2);
|
|
450
450
|
});
|
|
451
|
-
}, [
|
|
451
|
+
}, [l2]);
|
|
452
452
|
return e(gt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...b2 }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !i2 && w2 ? t(v, { sx: { maxWidth: `${u2}px` }, ref: n2, children: [t(v, { sx: { display: "flex", flexDirection: "row", marginBottom: p2 ? "4px" : "0px" }, children: [e(k, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: w2 }), d2 ? e(Ie, { chips: d2 }) : null, y2 ? e(v, { sx: { marginLeft: "8px" } }, "leadingSpace") : e(o, {}), y2] }), p2 ? e(k, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: p2 }) : e(o, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: true, ...g2, children: e("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: h2 }) });
|
|
453
453
|
})), Ct = e(W, {}), Mt = e(W, { iconKey: "Check" }), St = n(i((o2, r2) => {
|
|
454
|
-
const { dense: n2 = true, outlined: i2 = false, disableHover:
|
|
454
|
+
const { dense: n2 = true, outlined: i2 = false, disableHover: a2 = false, parentFloat: s2, selected: d2, icon: p2, tooltipProps: u2, children: m2, primary: x2, sx: b2, disabled: y2, className: k2, onFocus: w2, onBlur: C2, ...M2 } = o2, [S2, P2] = c(false), R2 = { marginRight: "0px", padding: n2 ? "2px" : "7px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, color: (e2) => x2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active, border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (e2) => `${e2.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity), border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, "&.Mui-disabled": { border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...b2 }, D2 = { "&:hover:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary, border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity + e2.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e2) => `solid ${e2.palette.primary.main} 1px`, border: (e2) => `1px solid ${e2.palette?.primary?.main}`, zIndex: 1 } };
|
|
455
455
|
let E2 = R2;
|
|
456
|
-
|
|
457
|
-
const T2 =
|
|
456
|
+
a2 || (E2 = F.mergeContentful(R2, D2));
|
|
457
|
+
const T2 = l(() => {
|
|
458
458
|
let e2 = "function" == typeof p2 ? p2() : p2;
|
|
459
459
|
return null === e2 ? e2 : e2 || (void 0 === d2 ? Ct : Mt);
|
|
460
460
|
}, [p2, d2]);
|
|
@@ -464,12 +464,12 @@ const yt = n((t2) => {
|
|
|
464
464
|
P2(false), C2?.(e2);
|
|
465
465
|
}, size: "small", TouchRippleProps: { center: false }, sx: E2, edge: "end", ...M2, disabled: y2 || false, children: [T2, m2] });
|
|
466
466
|
if (u2) if (u2.simple && u2.label && !u2.disabled) {
|
|
467
|
-
const { label: t2, description: o3, maxWidth: r3, shortcut: n3, useModifierSymbols: i3, componentDisabled:
|
|
467
|
+
const { label: t2, description: o3, maxWidth: r3, shortcut: n3, useModifierSymbols: i3, componentDisabled: l2, simple: a3, chips: s3, ref: c2, ...d3 } = u2;
|
|
468
468
|
$2 = e(gt, { disableInteractive: true, title: t2 ?? "", ...d3, children: e(v, { sx: { display: "flex" }, children: $2 }) });
|
|
469
469
|
} else $2 = e(wt, { children: $2, ...u2 });
|
|
470
470
|
return $2;
|
|
471
471
|
})), Pt = e(W, {}), Rt = (e2) => e2.icon, Dt = n(i((o2, r2) => {
|
|
472
|
-
const { icon: n2 = Pt, renderIcon: i2 = Rt, parentFloat:
|
|
472
|
+
const { icon: n2 = Pt, renderIcon: i2 = Rt, parentFloat: a2, className: s2, onFocus: d2, selected: p2, onBlur: u2, onMouseOver: m2, onMouseOut: f2, onMouseEnter: x2, disabled: b2, children: g2, sx: y2, tooltipProps: v2, chips: k2, primary: w2, ...C2 } = o2, [M2, S2] = c(false), [P2, E2] = c(false), T2 = l(() => {
|
|
473
473
|
const t2 = i2?.({ icon: n2, disabled: b2, selected: p2 });
|
|
474
474
|
return t2 ? e(R, { className: h({ "Mui-focusVisible": M2, "Mui-hovered": P2 }), sx: { "& .MuiSvgIcon-root": { color: (e2) => w2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (e2) => e2.palette.text.primary } } }, children: t2 }) : null;
|
|
475
475
|
}, [i2, b2, n2, M2, P2, w2, p2]);
|
|
@@ -478,7 +478,7 @@ const yt = n((t2) => {
|
|
|
478
478
|
}, onMouseOut: (e2) => {
|
|
479
479
|
f2?.(e2), e2.isDefaultPrevented() || E2(false);
|
|
480
480
|
}, onMouseEnter: (e2) => {
|
|
481
|
-
x2?.(e2), e2.isDefaultPrevented() ||
|
|
481
|
+
x2?.(e2), e2.isDefaultPrevented() || a2?.closeChild();
|
|
482
482
|
}, TouchRippleProps: { center: false }, className: h({ "Mui-focusVisible": M2, "Mui-hovered": P2 }, s2), onFocus: (e2) => {
|
|
483
483
|
d2?.(e2), S2(true);
|
|
484
484
|
}, onBlur: (e2) => {
|
|
@@ -486,16 +486,16 @@ const yt = n((t2) => {
|
|
|
486
486
|
}, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (e2) => e2.palette.text.primary }, color: (e2) => e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...y2 }, ...C2, children: [T2, g2, k2 ? e(Ie, { chips: k2 }) : null] });
|
|
487
487
|
return v2 && ($2 = e(wt, { children: $2, placement: "right-start", ...v2 })), $2;
|
|
488
488
|
})), Et = n(i((t2, r2) => {
|
|
489
|
-
const { children: n2, sx: i2, primary:
|
|
490
|
-
return e(o, { children: e(k, { ref: r2, variant:
|
|
489
|
+
const { children: n2, sx: i2, primary: l2 = false, variant: a2 = "subtitle1", ...s2 } = t2;
|
|
490
|
+
return e(o, { children: e(k, { ref: r2, variant: a2, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: "subtitle1" === a2 ? "2px" : void 0, paddingBottom: "subtitle1" === a2 ? "2px" : void 0, color: (e2) => l2 ? void 0 : e2.palette.text.secondary, ...i2 }, ...s2, children: n2 }) });
|
|
491
491
|
})), Tt = n(i((r2, n2) => {
|
|
492
|
-
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, popupProps: b2, onPopupOpen: y2, onPopupClose: k2, quickButtonProps: w2, createQuickButton: C2, tooltip: M2 = "", createTooltip: S2, icon: P2, disabled: R2, buttonProps: D2 = F.EmptyObject, disableHover: E2, touchRippleRef: T2, primary: $2, children: z2, sx: O2, className: I2, ...N2 } = r2, B2 = Y(), L2 =
|
|
492
|
+
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, popupProps: b2, onPopupOpen: y2, onPopupClose: k2, quickButtonProps: w2, createQuickButton: C2, tooltip: M2 = "", createTooltip: S2, icon: P2, disabled: R2, buttonProps: D2 = F.EmptyObject, disableHover: E2, touchRippleRef: T2, primary: $2, children: z2, sx: O2, className: I2, ...N2 } = r2, B2 = Y(), L2 = l(() => {
|
|
493
493
|
const e2 = (e3, t2, o2, r3 = o2) => {
|
|
494
494
|
const n3 = "boolean" == typeof s2 ? null : s2[e3];
|
|
495
495
|
return "function" == typeof n3 ? n3(t2) : n3 || (s2 ? o2 : r3);
|
|
496
496
|
};
|
|
497
497
|
return { outline: { color: (t2) => e2("color", t2, t2.palette.divider, "transparent"), hoverColor: (t2) => e2("hoverColor", t2, t2.palette.text?.primary, t2.palette.divider), focusColor: (t2) => e2("focusColor", t2, t2.palette?.primary?.main) }, active: "dark" === B2.palette.mode ? B2.palette.text.secondary : B2.palette.text.primary, text: B2.palette.text.icon ?? B2.palette.action.active };
|
|
498
|
-
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, j2] = c(false), U2 =
|
|
498
|
+
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, j2] = c(false), U2 = a(null), Q2 = a(null), G2 = ht({ anchor: U2.current, label: d2, createPopupPanel: x2, parentFloat: m2, popperProps: b2?.popperProps, onClose: () => {
|
|
499
499
|
H2(false), k2?.();
|
|
500
500
|
}, onOpen: () => {
|
|
501
501
|
H2(true), y2?.();
|
|
@@ -503,45 +503,45 @@ const yt = n((t2) => {
|
|
|
503
503
|
u2?.(e2), G2.reference.close(0);
|
|
504
504
|
}, [u2, G2]), J2 = K(() => {
|
|
505
505
|
A2 ? G2.reference.close(0) : G2.reference.open(0);
|
|
506
|
-
}, [A2, G2, m2, d2]), Z2 =
|
|
507
|
-
const e2 = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (e3) => L2.outline.color(e3), "&.Mui-focusVisible": { border: (e3) => `1px solid ${L2.outline.focusColor(e3)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => E2 ? "transparent" : void 0, backgroundColor: () => E2 ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.left": { borderTopLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (e3) => L2.outline.color(e3) }, "&.right": { borderTopRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (e3) => `${e3.shape.borderRadius}px !important` } }, t2 = { "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity) } } } }, o2 = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (e3) => e3.palette.text.primary }, backgroundColor: () => E2 ? "transparent" : void 0, color: (e3) => e3.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => i2 ? "2px 3px" : "7px", marginRight: "0" }, r3 = F.mergeContentful(o2, e2), n3 = F.mergeContentful(r3, t2),
|
|
508
|
-
return { quickButtonStyling: r3, openQuickButtonStyling: n3, compoundStyling:
|
|
506
|
+
}, [A2, G2, m2, d2]), Z2 = l(() => {
|
|
507
|
+
const e2 = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (e3) => L2.outline.color(e3), "&.Mui-focusVisible": { border: (e3) => `1px solid ${L2.outline.focusColor(e3)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => E2 ? "transparent" : void 0, backgroundColor: () => E2 ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.left": { borderTopLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (e3) => L2.outline.color(e3) }, "&.right": { borderTopRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (e3) => `${e3.shape.borderRadius}px !important` } }, t2 = { "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity) } } } }, o2 = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (e3) => e3.palette.text.primary }, backgroundColor: () => E2 ? "transparent" : void 0, color: (e3) => e3.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => i2 ? "2px 3px" : "7px", marginRight: "0" }, r3 = F.mergeContentful(o2, e2), n3 = F.mergeContentful(r3, t2), l2 = F.mergeContentful(o2, e2);
|
|
508
|
+
return { quickButtonStyling: r3, openQuickButtonStyling: n3, compoundStyling: l2, openCompoundStyling: F.mergeContentful(l2, t2) };
|
|
509
509
|
}, [L2, E2]), ee2 = K((t2) => {
|
|
510
510
|
const { children: o2, ref: r3, ...n3 } = t2;
|
|
511
511
|
return e(gt, { ref: r3, ...n3, disableInteractive: true, children: o2 });
|
|
512
512
|
}, []), te2 = u2 || C2, oe2 = te2 && (w2?.tooltip || w2?.createTooltip), re2 = (t2) => {
|
|
513
513
|
const { tooltip: o2, createTooltip: r3, sx: n3, ...i3 } = t2;
|
|
514
|
-
let
|
|
515
|
-
return oe2 ? (
|
|
514
|
+
let l2 = e(g, { sx: { ...n3 }, component: "div", ...i3 });
|
|
515
|
+
return oe2 ? (l2 = (r3 ?? ee2)({ title: A2 ? "" : o2 ?? M2, children: e("div", { children: l2 }) }, A2), l2) : l2;
|
|
516
516
|
}, ne2 = { onKeyDown: (e2) => {
|
|
517
517
|
e2.keyCode === q.Space ? J2() : e2.keyCode === q.F4 || e2.keyCode === q.Down ? G2.reference.open(0) : e2.keyCode === q.Up && G2.reference.close(0);
|
|
518
518
|
} };
|
|
519
519
|
let ie2 = e(o, {});
|
|
520
|
-
const
|
|
520
|
+
const le2 = l(() => "function" == typeof P2 ? P2() : P2, [P2]);
|
|
521
521
|
if (te2) {
|
|
522
522
|
let r3 = A2 ? Z2.openQuickButtonStyling : Z2.quickButtonStyling;
|
|
523
523
|
const n3 = (C2 || re2)({ tabIndex: -1, disabled: R2, size: "small", edge: "end", onMouseEnter: () => {
|
|
524
524
|
G2.reference.parent.closeChild();
|
|
525
525
|
}, onMouseDown: (e2) => {
|
|
526
526
|
0 === e2.button && (e2.preventDefault(), X2(e2));
|
|
527
|
-
}, touchRippleRef: T2, children:
|
|
528
|
-
let
|
|
529
|
-
oe2 && (
|
|
527
|
+
}, touchRippleRef: T2, children: le2, ...w2, className: h({ "Mui-focusVisible": W2 || A2, "Mui-selected": p2, "Mui-hovered": _2 || A2, "Mui-disabled": R2, bordered: true, left: true, "hard-right": true }, w2?.className), sx: { ...Z2.quickButtonStyling, height: "100%", ...w2?.sx } });
|
|
528
|
+
let l2 = it(true, i2, A2);
|
|
529
|
+
oe2 && (l2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: l2 }, A2)), ie2 = t(o, { children: [n3, e(g, { ref: Q2, component: "div", className: h({ "Mui-selected": A2, "Mui-hovered": _2 || A2, "Mui-disabled": R2, "Mui-focusVisible": W2 || A2, bordered: true, right: true, divider: true }), sx: { paddingLeft: (i2 ? 0 : 2) + "px", paddingRight: (i2 ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...Z2.quickButtonStyling, ...r3 }, TouchRippleProps: { center: false }, tabIndex: -1, disabled: R2, size: "small", edge: "end", onMouseDown: (e2) => {
|
|
530
530
|
0 === e2.button && (e2.preventDefault(), J2());
|
|
531
|
-
}, children:
|
|
531
|
+
}, children: l2 })] });
|
|
532
532
|
} else {
|
|
533
533
|
let t2 = A2 ? Z2.openCompoundStyling : Z2.compoundStyling;
|
|
534
|
-
ie2 = e(St, { ref: Q2, tabIndex: -1, disabled: R2, size: "small", icon:
|
|
534
|
+
ie2 = e(St, { ref: Q2, tabIndex: -1, disabled: R2, size: "small", icon: le2, className: h({ "Mui-selected": A2 || p2, "Mui-hovered": _2, "Mui-disabled": R2, "Mui-focusVisible": W2 || A2, bordered: true, left: true, right: true }), sx: { ...Z2.quickButtonStyling, ...t2 }, onMouseDown: (e2) => {
|
|
535
535
|
0 === e2.button && (e2.preventDefault(), J2());
|
|
536
536
|
}, children: it(false, i2, A2) });
|
|
537
537
|
}
|
|
538
|
-
const { className:
|
|
539
|
-
let de2 = e(v, { onFocus: () => V2(true), onBlur: () => V2(false), onMouseOver: () => j2(true), onMouseOut: () => j2(false), ...ne2, "aria-label": "split button", ref: U2, tabIndex: R2 ? void 0 : 0, className: h(
|
|
538
|
+
const { className: ae2, sx: se2, ...ce2 } = D2;
|
|
539
|
+
let de2 = e(v, { onFocus: () => V2(true), onBlur: () => V2(false), onMouseOver: () => j2(true), onMouseOut: () => j2(false), ...ne2, "aria-label": "split button", ref: U2, tabIndex: R2 ? void 0 : 0, className: h(ae2, "split-button-root", { "Mui-focusVisible": W2 || A2, "Mui-selected": A2 || p2, "Mui-hovered": _2, "Mui-disabled": R2 }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: s2 ? "1px" : "0px", marginRight: s2 ? "1px" : "0px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (e2) => `solid ${e2.palette.primary.main} 1px`, zIndex: 2 }, ...se2 }, ...ce2, children: ie2 });
|
|
540
540
|
return oe2 || (de2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: de2 }, A2)), t(v, { className: h(I2, "popupIconButton"), ref: n2, ...N2, sx: { zIndex: W2 || A2 ? 2 : void 0, display: "flex", alignItems: "center", ...O2 }, children: [de2, G2.component] });
|
|
541
541
|
}));
|
|
542
542
|
Tt.displayName = "ExhibitPopupIconButton";
|
|
543
543
|
const $t = {}, zt = n(i((r2, n2) => {
|
|
544
|
-
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, popupProps: f2 = $t, onPopupOpen: x2, onPopupClose: b2, quickButtonProps: g2, createQuickButton: k2, tooltip: w2 = "", createTooltip: C2, icon: M2, disabled: S2, touchRippleRef: P2, primary: R2, children: E2, sx: T2, ...$2 } = r2, [z2, O2] = c(false), [I2, N2] = c(false), [B2, L2] = c(false), [F2, A2] = c(false), H2 =
|
|
544
|
+
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, popupProps: f2 = $t, onPopupOpen: x2, onPopupClose: b2, quickButtonProps: g2, createQuickButton: k2, tooltip: w2 = "", createTooltip: C2, icon: M2, disabled: S2, touchRippleRef: P2, primary: R2, children: E2, sx: T2, ...$2 } = r2, [z2, O2] = c(false), [I2, N2] = c(false), [B2, L2] = c(false), [F2, A2] = c(false), H2 = a(null), W2 = a(null), V2 = l(() => {
|
|
545
545
|
if (!f2) return;
|
|
546
546
|
const { popperProps: e2 } = f2;
|
|
547
547
|
return { placement: "right-start", offsets: [-4, -2], ...e2 };
|
|
@@ -588,30 +588,30 @@ const $t = {}, zt = n(i((r2, n2) => {
|
|
|
588
588
|
let Z2 = e(v, { "aria-label": "split button", ref: H2, tabIndex: S2 ? void 0 : 0, className: h({ "Mui-disabled": S2, "Mui-selected": z2, "Mui-focusVisible": I2 || z2, "Mui-hovered": B2 }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...T2 }, ...$2, children: J2 });
|
|
589
589
|
return G2 && !F2 && (g2?.tooltip || g2?.createTooltip) && (Z2 = (g2?.createTooltip ?? Q2)({ title: z2 ? "" : Z2 ?? g2?.tooltip, children: Z2 }, z2)), t(v, { ref: n2, sx: { zIndex: I2 || z2 ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [Z2, q2.component] });
|
|
590
590
|
})), Ot = n(i((t2, o2) => {
|
|
591
|
-
const { onSelectToggle: r2, selected: n2 = false, label: i2, shortcut:
|
|
592
|
-
return e(wt, { label: i2, shortcut:
|
|
591
|
+
const { onSelectToggle: r2, selected: n2 = false, label: i2, shortcut: l2, tabIndex: a2 = 0, preventFocus: s2 = false, ...c2 } = t2;
|
|
592
|
+
return e(wt, { label: i2, shortcut: l2, children: e(St, { ref: o2, outlined: false, tabIndex: a2, selected: n2, onMouseDown: (e2) => {
|
|
593
593
|
s2 && e2.preventDefault();
|
|
594
594
|
}, onClick: () => {
|
|
595
595
|
r2?.(!n2);
|
|
596
596
|
}, ...c2 }) });
|
|
597
597
|
})), It = e(W, {}), Nt = e(W, { iconKey: "Check" }), Bt = n(i((t2, o2) => {
|
|
598
|
-
const { children: r2, selected: n2 = true, outlined: i2 = true, sx:
|
|
598
|
+
const { children: r2, selected: n2 = true, outlined: i2 = true, sx: l2, ...a2 } = t2;
|
|
599
599
|
let s2 = r2;
|
|
600
600
|
return null === s2 && (s2 = It), s2 || (s2 = Nt), e(v, { ref: o2, sx: { ...{ display: "flex", border: (e2) => n2 ? `solid ${i2 ? e2.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, backgroundColor: (e2) => {
|
|
601
601
|
if (n2) return f(e2.palette.text.icon ?? e2.palette.action.active, e2.palette.action.selectedOpacity);
|
|
602
|
-
} }, ...
|
|
602
|
+
} }, ...l2 }, ...a2, children: s2 });
|
|
603
603
|
}));
|
|
604
604
|
function Lt(e2) {
|
|
605
|
-
const [t2, o2] = c(() => /* @__PURE__ */ new Map()), { showModal: n2, updateModal: i2, destroyModal:
|
|
605
|
+
const [t2, o2] = c(() => /* @__PURE__ */ new Map()), { showModal: n2, updateModal: i2, destroyModal: l2, hideModal: a2 } = ae({ disableAutoDestroy: true });
|
|
606
606
|
return (s2, c2, d2, p2) => new Promise((u2, m2) => {
|
|
607
607
|
let h2 = false;
|
|
608
608
|
void 0 !== d2?.disableAutoDestroy && (h2 = d2.disableAutoDestroy, delete (d2 = { ...d2 }).disableAutoDestroy);
|
|
609
609
|
const f2 = { ...e2, ...d2, ...p2, onHide: () => {
|
|
610
610
|
const e3 = t2.get(s2);
|
|
611
|
-
p2?.onHide?.(), o2((e4) => (e4.delete(s2), e4)),
|
|
611
|
+
p2?.onHide?.(), o2((e4) => (e4.delete(s2), e4)), a2(e3.id);
|
|
612
612
|
}, onDone: (e3) => {
|
|
613
613
|
const r2 = t2.get(s2);
|
|
614
|
-
o2((e4) => (e4.delete(s2), e4)), p2?.onDone?.(e3), r2 && r2.id && !h2 &&
|
|
614
|
+
o2((e4) => (e4.delete(s2), e4)), p2?.onDone?.(e3), r2 && r2.id && !h2 && l2(r2.id);
|
|
615
615
|
}, onShown: (e3) => {
|
|
616
616
|
o2((t3) => {
|
|
617
617
|
const o3 = t3.get(s2);
|
|
@@ -625,7 +625,7 @@ function Lt(e2) {
|
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
628
|
-
const { defaultPosition: r2 = Ft, PaperComponent: n2 = w, onDragStop: i2, rootSel: d2 = ".MuiModal-root", handleSel: p2 = ".draggable-title", titleSize: m2, rootSize: h2, ...f2 } = t2, x2 =
|
|
628
|
+
const { defaultPosition: r2 = Ft, PaperComponent: n2 = w, onDragStop: i2, rootSel: d2 = ".MuiModal-root", handleSel: p2 = ".draggable-title", titleSize: m2, rootSize: h2, ...f2 } = t2, x2 = a(null), b2 = l(() => m2 && h2 ? { left: 0, top: 0, right: h2.width - m2.width, bottom: h2.height - m2.height } : null, [m2, h2]), [g2, y2] = c(null), [v2, k2] = c(null), [C2, M2] = c(null);
|
|
629
629
|
return u(() => {
|
|
630
630
|
!g2 && r2 && y2(r2 ?? Ft);
|
|
631
631
|
}, [r2]), s(() => {
|
|
@@ -638,12 +638,12 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
638
638
|
y2({ x: r3 - C2.x, y: n3 - C2.y });
|
|
639
639
|
}, children: e(n2, { ref: re([x2, o2]), ...f2 }) });
|
|
640
640
|
})), Ht = { x: "50", y: "50" }, Wt = n(i((o2, r2) => {
|
|
641
|
-
const n2 = ee({ props: o2, name: "MuiDialog" }), i2 = Y(),
|
|
641
|
+
const n2 = ee({ props: o2, name: "MuiDialog" }), i2 = Y(), l2 = { enter: 0.66 * i2.transitions.duration.enteringScreen, exit: 0.66 * i2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: p2 = "draggable-window", onCancel: u2, onDone: m2, onShow: x2, onShown: b2, onHide: y2, onClose: k2, open: C2, autoFocusSel: M2, children: S2, transitionDuration: P2 = l2, TransitionProps: R2, slots: D2 = F.EmptyArray, slotProps: z2 = F.EmptyArray, sx: O2, className: I2, onMouseDown: N2, initialPosition: B2 = Ht, isModal: L2 = false, ...A2 } = n2;
|
|
642
642
|
let H2 = D2.transition ?? E;
|
|
643
643
|
const _2 = D2.backdrop ?? T, j2 = D2.paper ?? w;
|
|
644
644
|
let Q2 = z2.transition;
|
|
645
645
|
R2 && (Q2 = { ...R2, ...Q2 });
|
|
646
|
-
const G2 = z2.backdrop, X2 = z2.paper, J2 =
|
|
646
|
+
const G2 = z2.backdrop, X2 = z2.paper, J2 = a(null), [Z2, te2] = c(null), [oe2, ne2] = c(false), [le2, ae2] = c(false), de2 = a(null), [pe2, ue2] = ie(), me2 = a(null), [he2, fe2] = ie(), xe2 = a(null);
|
|
647
647
|
s(() => {
|
|
648
648
|
Z2 && ne2(C2);
|
|
649
649
|
}, [C2, Z2]);
|
|
@@ -671,16 +671,16 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
671
671
|
const t2 = we2;
|
|
672
672
|
t2 && requestAnimationFrame(() => {
|
|
673
673
|
Se2.current?.contains(document.activeElement) && t2.focus();
|
|
674
|
-
}), y2?.(),
|
|
674
|
+
}), y2?.(), ae2(false), Q2?.onExit?.(e2);
|
|
675
675
|
}, onEntered: (e2, t2) => {
|
|
676
676
|
x2?.(), Q2?.onEntered?.(e2, t2);
|
|
677
677
|
}, onEntering: (e2, t2) => {
|
|
678
|
-
|
|
678
|
+
ae2(true), b2?.(Se2.current);
|
|
679
679
|
} };
|
|
680
680
|
s(() => {
|
|
681
|
-
|
|
682
|
-
}, [
|
|
683
|
-
let Re2 = e(ce, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: J2, active:
|
|
681
|
+
le2 && Me2();
|
|
682
|
+
}, [le2]);
|
|
683
|
+
let Re2 = e(ce, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: J2, active: le2, children: e(H2, { in: oe2, timeout: P2, role: "presentation", ...Pe2, children: e(v, { className: "MuiDialog-container", ref: me2, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: (e2) => {
|
|
684
684
|
e2.which === q.Escape && (be2(), de2.current?.start(e2, { center: false }), setTimeout(() => de2.current?.stop(e2), 180)), e2.stopPropagation();
|
|
685
685
|
}, children: t(At, { ref: re([xe2, r2]), className: h({ "Mui-focusVisible": ge2 }, I2, "draggable"), sx: { "& *": (e2) => Xe(e2), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...O2 }, defaultPosition: Z2, titleSize: fe2, rootSize: ue2, PaperComponent: j2, ...A2, ...X2, children: [d2 ? e($, { className: h({ "Mui-selected": ge2 }, "draggable-title"), sx: { cursor: "move", display: "flex", color: (e2) => e2.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e2) => `${e2.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e2) => e2.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e2) => f(e2.palette.action.hover, 0.03) }, ref: he2, children: t(v, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e2) => e2.spacing(1), marginLeft: (e2) => e2.spacing(1), marginRight: (e2) => e2.spacing(1) }, children: [e(v, { sx: { flex: "1 1 100%", paddingLeft: (e2) => e2.spacing(1) }, children: d2 }), e(wt, { label: "Close", children: e(g, { "aria-label": "close", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, touchRippleRef: de2, onPointerDown: (e2) => {
|
|
686
686
|
de2.current?.start(e2, { center: false }), e2.stopPropagation(), e2.preventDefault();
|
|
@@ -703,7 +703,7 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
703
703
|
Se2?.current?.contains(e2.relatedTarget) || (Ce2(null), J2.current?.focusTrap?.pause(), ye2(false));
|
|
704
704
|
}, children: [De2, Re2] }), Ee2(), p2 + "");
|
|
705
705
|
})), Kt = ["Ok", "Cancel"], Vt = n(i((o2, r2) => {
|
|
706
|
-
const { description: n2, icon: i2, onCancel: s2, onOption: c2, onDone: d2, onValidateOption: p2, createOptionsButton: u2, options: m2 = Kt, autoFocusSel: h2 = ".defaultOption", defaultOption: x2 = m2[0], cancelOption: b2 = "Cancel", autoFocus: g2, children: y2, ...w2 } = o2, C2 = ue({ shouldUseNativeValidation: false }), { handleSubmit: M2, formState: S2 } = C2, P2 =
|
|
706
|
+
const { description: n2, icon: i2, onCancel: s2, onOption: c2, onDone: d2, onValidateOption: p2, createOptionsButton: u2, options: m2 = Kt, autoFocusSel: h2 = ".defaultOption", defaultOption: x2 = m2[0], cancelOption: b2 = "Cancel", autoFocus: g2, children: y2, ...w2 } = o2, C2 = ue({ shouldUseNativeValidation: false }), { handleSubmit: M2, formState: S2 } = C2, P2 = a(null), R2 = a(null), D2 = a(null), E2 = K(async (e2) => {
|
|
707
707
|
let t2;
|
|
708
708
|
try {
|
|
709
709
|
if (t2 = await Promise.resolve(p2?.(e2)) ?? true, true !== t2) return;
|
|
@@ -729,7 +729,7 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
731
|
return e(z, { ...i3, children: e("div", { style: { paddingTop: "3px" }, children: t2 }) }, `action:${t2}`);
|
|
732
|
-
}, [m2, x2, b2, u2, S2]), L2 =
|
|
732
|
+
}, [m2, x2, b2, u2, S2]), L2 = l(() => {
|
|
733
733
|
const e2 = [];
|
|
734
734
|
for (let t2 = 0; t2 < m2.length; t2++) {
|
|
735
735
|
const o3 = m2[t2], r3 = x2 ? o3 === x2 : 0 === t2;
|
|
@@ -752,7 +752,7 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
752
752
|
}, 180));
|
|
753
753
|
}, children: t(v, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (e2) => e2.spacing(i2 || n2 ? 1.5 : 0) }, children: [t(v, { sx: { display: "flex", flexDirection: "column" }, children: [i2, e(k, { children: n2 })] }), y2] }) }), e(I, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1), paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), backgroundColor: (e2) => f(e2.palette.action.hover, 0.03) }, children: L2 })] }) }) });
|
|
754
754
|
})), qt = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Vt, default: Vt }, Symbol.toStringTag, { value: "Module" })), _t = r.lazy(() => Promise.resolve().then(() => qt)), jt = (e2) => {
|
|
755
|
-
const { showModal: t2 } =
|
|
755
|
+
const { showModal: t2 } = ae();
|
|
756
756
|
return (o2) => new Promise((r2) => {
|
|
757
757
|
const n2 = t2(_t, { ...e2, ...o2, onOption(e3) {
|
|
758
758
|
o2?.onOption?.(e3, e3 === o2.cancelOption, e3 === o2.defaultOption), r2(e3);
|
|
@@ -760,25 +760,25 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
760
760
|
o2?.onDone?.(), n2.hide();
|
|
761
761
|
} });
|
|
762
762
|
});
|
|
763
|
-
}, Ut = r.lazy(() => import("./
|
|
764
|
-
const { showModal: t2 } =
|
|
763
|
+
}, Ut = r.lazy(() => import("./mzf6ST9951mHAaux.mjs")), Qt = (e2) => {
|
|
764
|
+
const { showModal: t2 } = ae();
|
|
765
765
|
return (o2) => {
|
|
766
766
|
const { defaultOption: r2 = o2.options?.[0], cancelOption: n2 = "Cancel", ...i2 } = o2;
|
|
767
767
|
return new Promise((o3) => {
|
|
768
|
-
const
|
|
768
|
+
const l2 = t2(Ut, { ...e2, defaultOption: r2, cancelOption: n2, ...i2, onOption(e3) {
|
|
769
769
|
i2?.onOption?.(e3, e3 === n2, e3 === r2), o3({ input: "", option: e3 });
|
|
770
770
|
}, onInput(e3, t3) {
|
|
771
771
|
i2?.onInput?.(e3, t3), o3({ input: e3, option: t3 });
|
|
772
772
|
}, onDone: () => {
|
|
773
|
-
i2?.onDone?.(),
|
|
773
|
+
i2?.onDone?.(), l2.hide();
|
|
774
774
|
} });
|
|
775
775
|
});
|
|
776
776
|
};
|
|
777
777
|
}, Gt = n(i((t2, o2) => {
|
|
778
|
-
const { command: r2, disabled: n2 = false, shortcut: i2, children:
|
|
779
|
-
return Q(r2), e(wt, { ref: o2, label: void 0 !== n2 ? r2?.label() : "", shortcut: void 0 !== i2 ? i2 : Array.isArray(r2?.shortcut()) ? r2?.shortcut()[0] : r2?.shortcut(), description: r2?.description(), disabled: n2, chips: r2?.tags(), componentDisabled: r2?.disabled(), ...
|
|
778
|
+
const { command: r2, disabled: n2 = false, shortcut: i2, children: l2, ...a2 } = t2;
|
|
779
|
+
return Q(r2), e(wt, { ref: o2, label: void 0 !== n2 ? r2?.label() : "", shortcut: void 0 !== i2 ? i2 : Array.isArray(r2?.shortcut()) ? r2?.shortcut()[0] : r2?.shortcut(), description: r2?.description(), disabled: n2, chips: r2?.tags(), componentDisabled: r2?.disabled(), ...a2, children: e("div", { style: { display: "flex", flex: "1 1 0%" }, children: l2 }) });
|
|
780
780
|
})), Xt = e(W, {}), Yt = n(i((t2, o2) => {
|
|
781
|
-
const { command: r2, commandHook: n2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, tooltipProps: x2, ...b2 } = t2, g2 =
|
|
781
|
+
const { command: r2, commandHook: n2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, tooltipProps: x2, ...b2 } = t2, g2 = a(null), y2 = a(false), v2 = l(() => {
|
|
782
782
|
const e2 = { onExecute(e3, t3) {
|
|
783
783
|
n2?.onExecute?.(e3, t3), y2.current || (g2.current?.start({ center: false }), setTimeout(() => g2.current?.stop({}), 180)), y2.current = false;
|
|
784
784
|
}, onError(e3, t3, o3) {
|
|
@@ -791,17 +791,17 @@ const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
|
791
791
|
0 === e2.button && r2?.execute(f2, n2);
|
|
792
792
|
}, [k2, n2, f2]), M2 = p((e2) => {
|
|
793
793
|
e2.keyCode !== q.Enter && e2.keyCode !== q.Space || r2?.execute(f2, n2);
|
|
794
|
-
}, [k2, n2, f2]), S2 =
|
|
794
|
+
}, [k2, n2, f2]), S2 = l(() => {
|
|
795
795
|
if (c2) return "function" == typeof c2 ? c2(r2) : c2;
|
|
796
796
|
let t3 = r2?.icon(s2);
|
|
797
797
|
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar || r2?.state() ? void 0 : Xt;
|
|
798
|
-
}, [k2, c2]), P2 =
|
|
798
|
+
}, [k2, c2]), P2 = l(() => ({ tabIndex: 0, ref: o2, selected: r2?.state(), icon: m2 === G.Toolbar ? S2 : e(Bt, { selected: r2?.state() ?? false, children: S2 }), touchRippleRef: g2, disabled: u2 || !r2 || r2.disabled(), onMouseDown: w2, onMouseUp: C2, onKeyDown: M2 }), [k2, n2, u2, S2]);
|
|
799
799
|
let R2;
|
|
800
800
|
return R2 = m2 === G.Menuitem ? e(Dt, { ...b2, chips: r2?.tags(), ...P2, children: d2 ?? r2?.label(i2, s2) }) : e(St, { ...b2, ...P2 }), d2 || r2?.label() ? ((r2.disabled() || u2) && (R2 = e("div", { children: R2 })), R2 = e(Gt, { command: r2, placement: m2 === G.Toolbar ? "bottom-start" : "right-start", shortcut: h2, ...x2, children: R2 }), R2) : R2;
|
|
801
801
|
}));
|
|
802
802
|
Yt.displayName = "CommandButton";
|
|
803
803
|
const Jt = e(W, {}), Zt = n(i((o2, r2) => {
|
|
804
|
-
const { command: n2, scope: i2, icon: d2 = Jt, label: p2, variant: u2 = G.Toolbar, disabled: m2 = false, commandHook: h2, ...f2 } = o2, x2 =
|
|
804
|
+
const { command: n2, scope: i2, icon: d2 = Jt, label: p2, variant: u2 = G.Toolbar, disabled: m2 = false, commandHook: h2, ...f2 } = o2, x2 = a(null), b2 = a(false), y2 = l(() => {
|
|
805
805
|
const e2 = { onExecute(e3, t2) {
|
|
806
806
|
h2?.onExecute?.(e3, t2), b2.current || (x2.current?.start({ center: false }), setTimeout(() => x2.current?.stop({}), 180)), b2.current = false;
|
|
807
807
|
}, onError(e3, t2, o3) {
|
|
@@ -815,10 +815,10 @@ const Jt = e(W, {}), Zt = n(i((o2, r2) => {
|
|
|
815
815
|
s(() => {
|
|
816
816
|
C2(k2());
|
|
817
817
|
}, [n2?.state()]);
|
|
818
|
-
const S2 =
|
|
818
|
+
const S2 = l(() => {
|
|
819
819
|
let t2 = "function" == typeof d2 ? d2(n2) : d2;
|
|
820
820
|
return t2 && (t2 = n2?.icon()), "string" == typeof t2 && (t2 = e(W, { iconKey: t2 })), t2;
|
|
821
|
-
}, [v2, d2, n2?.icon]), P2 =
|
|
821
|
+
}, [v2, d2, n2?.icon]), P2 = l(() => void 0 === p2 ? n2?.label(i2) : "function" == typeof p2 ? p2() : p2, [v2]), R2 = l(() => e(g, { ...f2, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: true, onClick: (e2) => e2.stopPropagation(), onMouseDown: (e2) => {
|
|
822
822
|
0 === e2.button && e2.stopPropagation();
|
|
823
823
|
}, onMouseUp: (e2) => {
|
|
824
824
|
0 === e2.button && e2.stopPropagation();
|
|
@@ -849,14 +849,14 @@ const Jt = e(W, {}), Zt = n(i((o2, r2) => {
|
|
|
849
849
|
let E2;
|
|
850
850
|
return E2 = u2 === G.Menuitem ? t(Dt, { ...f2, chips: n2?.tags(), ...D2, children: [P2, R2] }) : e(St, { ...f2, ...D2 }), n2?.label() ? ((n2.disabled() || m2) && (E2 = e("div", { children: E2 })), E2 = e(Gt, { command: n2, placement: u2 === G.Toolbar ? "bottom-start" : "right-start", children: E2 }), E2) : E2;
|
|
851
851
|
})), eo = n(i((t2, o2) => {
|
|
852
|
-
const { variant: r2 = G.Toolbar, quickCommand: n2, onQuickClick: i2, commands: s2, commandState: c2, commandHook: d2, disabled: p2, label: u2, icon: m2, createPopupPanel: h2, tooltip: f2, selected: x2, scope: b2, ...g2 } = t2, y2 =
|
|
852
|
+
const { variant: r2 = G.Toolbar, quickCommand: n2, onQuickClick: i2, commands: s2, commandState: c2, commandHook: d2, disabled: p2, label: u2, icon: m2, createPopupPanel: h2, tooltip: f2, selected: x2, scope: b2, ...g2 } = t2, y2 = a(null), v2 = a(false), k2 = l(() => {
|
|
853
853
|
const e2 = { onExecute(e3, t3) {
|
|
854
854
|
d2?.onExecute?.(e3, t3), v2.current || (y2.current?.start({ center: false }), setTimeout(() => y2.current?.stop({}), 180)), v2.current = false;
|
|
855
855
|
}, onError(e3, t3, o3) {
|
|
856
856
|
d2?.onError(e3, t3, o3);
|
|
857
857
|
} };
|
|
858
858
|
return d2?.beforeExecute && (e2.beforeExecute = d2.beforeExecute), e2;
|
|
859
|
-
}, [d2]), w2 = X(s2, [n2], null, [n2]), C2 = w2[0], { label: M2, icon: S2 } =
|
|
859
|
+
}, [d2]), w2 = X(s2, [n2], null, [n2]), C2 = w2[0], { label: M2, icon: S2 } = l(() => {
|
|
860
860
|
let t3 = null;
|
|
861
861
|
u2 && (t3 = "function" == typeof u2 ? u2(C2) : u2), t3 || (t3 = C2?.label?.(b2));
|
|
862
862
|
let o3 = m2;
|
|
@@ -869,15 +869,15 @@ const Jt = e(W, {}), Zt = n(i((o2, r2) => {
|
|
|
869
869
|
}));
|
|
870
870
|
eo.displayName = "CommandPopupButton";
|
|
871
871
|
const to = e(W, { iconKey: "Check" }), oo = (o2) => {
|
|
872
|
-
const { command: r2, label: n2, scope: i2, icon:
|
|
873
|
-
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...
|
|
872
|
+
const { command: r2, label: n2, scope: i2, icon: l2 = to, sx: a2, ...s2 } = o2;
|
|
873
|
+
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...a2 }, ...s2, children: [l2, e(k, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children: r2?.label(i2) || n2 })] });
|
|
874
874
|
}, ro = n(i((t2, o2) => {
|
|
875
|
-
const { sx: r2, commands: n2, commandButtonProps: i2, parentFloat:
|
|
875
|
+
const { sx: r2, commands: n2, commandButtonProps: i2, parentFloat: a2, createToolbarPalette: s2, children: d2, ...u2 } = t2, h2 = U(o2, () => ({}), []), [f2, x2] = c(null), { reference: b2 } = ht({ label: "toolbar", anchor: h2.current, parentFloat: a2, createPopupPanel: null }), g2 = p(() => {
|
|
876
876
|
const e2 = f2;
|
|
877
877
|
e2 && requestAnimationFrame(() => {
|
|
878
878
|
h2.current?.contains(document.activeElement) && e2.focus();
|
|
879
879
|
});
|
|
880
|
-
}, []), y2 =
|
|
880
|
+
}, []), y2 = l(() => ({ dense: true, outlined: false }), []), v2 = l(() => {
|
|
881
881
|
const { commandHook: e2, ...t3 } = i2 || {};
|
|
882
882
|
return { commandHook: { beforeExecute: (t4, o3) => {
|
|
883
883
|
const r3 = e2?.beforeExecute?.(t4, o3);
|
|
@@ -887,16 +887,16 @@ const to = e(W, { iconKey: "Check" }), oo = (o2) => {
|
|
|
887
887
|
}, onError(t4, o3, r3) {
|
|
888
888
|
e2?.onError?.(t4, o3, r3);
|
|
889
889
|
} }, ...t3 };
|
|
890
|
-
}, [b2, i2]), k2 =
|
|
890
|
+
}, [b2, i2]), k2 = l(() => ({ ...y2, ...v2 }), [y2, v2]), [w2, C2] = m((e2) => e2 + 1, 0);
|
|
891
891
|
X(n2, [], { onChange: () => {
|
|
892
892
|
C2();
|
|
893
893
|
} });
|
|
894
|
-
const M2 =
|
|
894
|
+
const M2 = l(() => ({ commands: n2, parentFloat: b2, ...v2 }), [w2, k2, b2, i2]);
|
|
895
895
|
let S2 = 0;
|
|
896
896
|
y2.dense || (S2 += 2), y2.outlined && S2++;
|
|
897
897
|
let P2 = 2;
|
|
898
898
|
y2.dense || (P2 = 4);
|
|
899
|
-
const R2 =
|
|
899
|
+
const R2 = l(() => s2({ commands: n2, commandButtonProps: k2, commandPopupProps: { commands: n2, ...M2, ...i2 } }), [w2, k2, M2, s2]);
|
|
900
900
|
return e(B, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${P2}px`, paddingBottom: `${P2}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...r2 }, ref: h2, onFocus: (e2) => {
|
|
901
901
|
e2.relatedTarget && !f2 && x2(e2.relatedTarget);
|
|
902
902
|
}, onBlur: (e2) => {
|
|
@@ -910,20 +910,28 @@ const no = (t2) => {
|
|
|
910
910
|
const { key: o2, ...r2 } = t2;
|
|
911
911
|
return e(Yt, { ...r2 }, o2);
|
|
912
912
|
}, io = n(i((t2, o2) => {
|
|
913
|
-
const { popupCommandKeys: r2, renderCommandButton: n2 = no, scope: i2, commands: a2, quickCommand:
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
913
|
+
const { popupCommandKeys: r2, renderCommandButton: n2 = no, scope: i2, commands: a2, quickCommand: s2, popupScope: c2 = s2, commandState: d2, commandHook: u2, disabled: m2 = false, ...h2 } = t2, f2 = X(a2, r2 ? [s2, ...r2] : [s2]), { allDisabled: x2 } = l(() => {
|
|
914
|
+
let e2 = 0;
|
|
915
|
+
const t3 = f2.length;
|
|
916
|
+
for (let o3 = 0; o3 < t3; o3++) {
|
|
917
|
+
const t4 = f2[o3];
|
|
918
|
+
t4 && !t4.disabled() && e2++;
|
|
919
|
+
}
|
|
920
|
+
return { allDisabled: 0 === e2 };
|
|
921
|
+
}, [f2]), b2 = p((t3, o3) => {
|
|
922
|
+
const l2 = { variant: G.Menuitem, commandHook: u2, commandState: d2, scope: c2 ?? i2, disabled: m2 }, a3 = [], s3 = r2 ? r2.length : 0;
|
|
923
|
+
for (let t4 = 0; t4 < s3; t4++) {
|
|
924
|
+
const i3 = r2[t4];
|
|
925
|
+
if (null === i3 || "-" === i3) {
|
|
918
926
|
a3.push(e(ge, { orientation: "horizontal" }, `element-${a3.length}`));
|
|
919
927
|
continue;
|
|
920
928
|
}
|
|
921
|
-
const
|
|
929
|
+
const s4 = o3.getCommand(i3), c3 = { key: `${i3}-${a3.length}`, command: s4, ...l2 }, d3 = n2(c3);
|
|
922
930
|
d3 && a3.push(d3);
|
|
923
931
|
}
|
|
924
932
|
return nt({ ...t3, children: a3 });
|
|
925
|
-
}, [u2, d2, c2,
|
|
926
|
-
return r2 ? e(eo, { ref: o2, commands: a2, disabled:
|
|
933
|
+
}, [m2, u2, d2, c2, r2, n2]);
|
|
934
|
+
return r2 ? e(eo, { ref: o2, commands: a2, disabled: m2 || x2, commandHook: u2, commandState: d2, scope: i2, quickCommand: s2, createPopupPanel: b2, ...h2 }) : n2({ ref: o2, disabled: m2, commandHook: u2, commandState: d2, scope: i2, command: f2[0], ...h2 });
|
|
927
935
|
}));
|
|
928
936
|
export {
|
|
929
937
|
Ce as AnimatedBouncingEllipsisIcon,
|
|
@@ -943,7 +951,7 @@ export {
|
|
|
943
951
|
bt as ContextMenu,
|
|
944
952
|
Oe as ErrorPanel,
|
|
945
953
|
ge as ExhibitDivider,
|
|
946
|
-
|
|
954
|
+
lt as ExhibitFloatPanel,
|
|
947
955
|
St as ExhibitIconButton,
|
|
948
956
|
Et as ExhibitMenuHeader,
|
|
949
957
|
Dt as ExhibitMenuItem,
|