@sheetxl/utils-mui 0.7.26 → 0.7.28-beta.1
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/CMDyOaq_TZmhbR3R.cjs +1 -0
- package/browser/cjs/GeHQP4M_1ydWv9v4.cjs +3 -0
- package/browser/cjs/index.cjs +4 -7
- package/browser/esm/CS_JzxfpVf9TlNsZ.mjs +96 -0
- package/browser/esm/DTtDTwN0K4atO3Er.mjs +2544 -0
- package/browser/esm/index.mjs +2688 -72
- package/licenses/dependencies.txt +60 -198
- package/node/esm/CbmHouxoPCCNwqGT.mjs +97 -0
- package/node/esm/index.mjs +3354 -981
- package/package.json +12 -14
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +16 -0
- package/resources/locales/de/ui.msg.json +22 -0
- package/resources/locales/en/ui.msg.json +22 -0
- package/types/index.d.ts +2 -1068
- package/types/src/button/ButtonContent.d.ts +17 -0
- package/types/src/button/ExhibitIconButton.d.ts +31 -0
- package/types/src/button/ExhibitMenuHeader.d.ts +15 -0
- package/types/src/button/ExhibitMenuItem.d.ts +24 -0
- package/types/src/button/ExhibitOptionButton.d.ts +16 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts +18 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts +8 -0
- package/types/src/button/ExhibitTooltip.d.ts +26 -0
- package/types/src/button/OverflowPalette.d.ts +29 -0
- package/types/src/button/SelectedIcon.d.ts +18 -0
- package/types/src/button/index.d.ts +11 -0
- package/types/src/command/CommandButton.d.ts +4 -0
- package/types/src/command/CommandGroup.d.ts +71 -0
- package/types/src/command/CommandPopupButton.d.ts +34 -0
- package/types/src/command/CommandToolbar.d.ts +51 -0
- package/types/src/command/CommandTooltip.d.ts +22 -0
- package/types/src/command/InputCommandButton.d.ts +20 -0
- package/types/src/command/ToggleGroupButton.d.ts +33 -0
- package/types/src/command/index.d.ts +8 -0
- package/types/src/command/useManagedRipple.d.ts +23 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts +45 -0
- package/types/src/components/ChipStrip.d.ts +9 -0
- package/types/src/components/ContextMenu.d.ts +32 -0
- package/types/src/components/ExhibitDivider.d.ts +6 -0
- package/types/src/components/NestingPopupButton.d.ts +11 -0
- package/types/src/components/ScrollButtons.d.ts +7 -0
- package/types/src/components/SimpleTooltip.d.ts +15 -0
- package/types/src/components/StackTrace.d.ts +20 -0
- package/types/src/components/StackTraceErrorPanel.d.ts +28 -0
- package/types/src/components/index.d.ts +10 -0
- package/types/src/dialog/InputDialog.d.ts +8 -0
- package/types/src/dialog/InternalWindow.d.ts +142 -0
- package/types/src/dialog/OptionsDialog.d.ts +19 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/dialog/useInputDialog.d.ts +6 -0
- package/types/src/dialog/useLazyWindow.d.ts +14 -0
- package/types/src/dialog/useOptionsDialog.d.ts +8 -0
- package/types/src/float/ExhibitFloatPanel.d.ts +22 -0
- package/types/src/float/ExhibitFloatProvider.d.ts +17 -0
- package/types/src/float/ExhibitPopup.d.ts +97 -0
- package/types/src/float/index.d.ts +4 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/locales/index.d.ts +3 -0
- package/types/src/theme/ExhibitTheme.d.ts +71 -0
- package/types/src/theme/IconSupport.d.ts +11 -0
- package/types/src/theme/ScrollbarTheming.d.ts +12 -0
- package/types/src/theme/index.d.ts +4 -0
- package/browser/cjs/Buzj_RuBZDULt78F.cjs +0 -11
- package/browser/cjs/DvRQUuQp6BSo_oUy.cjs +0 -6
- package/browser/esm/BNnvsy-BNmkD2vU1.mjs +0 -44
- package/browser/esm/D1zL4el7EI4boIdP.mjs +0 -2891
- package/node/assets/style.css +0 -1
- package/node/esm/DACH-8zNFkXeTBDb.mjs +0 -45
package/browser/esm/index.mjs
CHANGED
|
@@ -1,74 +1,2690 @@
|
|
|
1
|
-
(function(){
|
|
2
|
-
import { C as s, z as e, y as t, B as n, G as i, D as l, F as r, A as u, n as d, J as p, _ as c, a4 as m, a6 as h, a9 as E, a7 as I, K as b, x as S, a3 as g, E as C, b as B, a as x, f as P, Y as T, d as A, e as M, g as w, a5 as k, Q as v, a8 as D, M as F, N as f, O, Z as R, $ as y, S as L, aa as W, L as z, I as G, H, p as N, T as V, a1 as j, k as q, q as J, m as K, a0 as Q, j as U, V as X, h as Y, i as Z, o as _, r as $, w as aa, v as oa, s as sa, W as ea, l as ta, t as na, a2 as ia, U as la, P as ra, X as ua, R as da, u as pa } from "./D1zL4el7EI4boIdP.mjs";
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._traverse-ellipsis_14l1h_1{display:inline-block;position:relative}._traverse-ellipsis_14l1h_1 div{border-radius:50%;position:absolute}._traverse-ellipsis_14l1h_1 div:first-child{animation:.6s infinite _traverse-ellipsis1_14l1h_1;left:0}._traverse-ellipsis_14l1h_1 div:nth-child(2){animation:.6s infinite _traverse-ellipsis2_14l1h_1;left:0}._traverse-ellipsis_14l1h_1 div:nth-child(3){animation:.6s infinite _traverse-ellipsis2_14l1h_1;left:24px}._traverse-ellipsis_14l1h_1 div:nth-child(4){animation:.6s infinite _traverse-ellipsis3_14l1h_1;left:48px}@keyframes _traverse-ellipsis1_14l1h_1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _traverse-ellipsis3_14l1h_1{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _traverse-ellipsis2_14l1h_1{0%{transform:translate(0)}to{transform:translate(24px)}}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
3
2
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
I as CommandTooltip,
|
|
25
|
-
b as ContextMenu,
|
|
26
|
-
S as ExhibitDivider,
|
|
27
|
-
g as ExhibitFloatPanel,
|
|
28
|
-
C as ExhibitIconButton,
|
|
29
|
-
B as ExhibitMenuHeader,
|
|
30
|
-
x as ExhibitMenuItem,
|
|
31
|
-
P as ExhibitOptionButton,
|
|
32
|
-
T as ExhibitPopper,
|
|
33
|
-
A as ExhibitPopupIconButton,
|
|
34
|
-
M as ExhibitPopupMenuItem,
|
|
35
|
-
w as ExhibitTooltip,
|
|
36
|
-
k as InputCommandButton,
|
|
37
|
-
v as InternalWindow,
|
|
38
|
-
D as LabelIcon,
|
|
39
|
-
F as ModalProvider,
|
|
40
|
-
f as NestingPopupButton,
|
|
41
|
-
O as OptionsDialog,
|
|
42
|
-
R as PopupAutoFocus,
|
|
43
|
-
y as PopupButtonType,
|
|
44
|
-
L as SelectedIcon,
|
|
45
|
-
W as SimpleCommandPopupButton,
|
|
46
|
-
z as SimpleTooltip,
|
|
47
|
-
G as StackTrace,
|
|
48
|
-
H as StackTraceErrorPanel,
|
|
49
|
-
N as ThemeMode,
|
|
50
|
-
V as ThemedIcon,
|
|
51
|
-
j as createDownArrow,
|
|
52
|
-
q as createExhibitTheme,
|
|
53
|
-
J as createScrollButton,
|
|
54
|
-
K as createStrokeShadowFilter,
|
|
55
|
-
Q as defaultCreatePopupPanel,
|
|
56
|
-
U as elevateColor,
|
|
57
|
-
X as getModalConfig,
|
|
58
|
-
Y as getScrollbarCssVariables,
|
|
59
|
-
Z as hexToRGB,
|
|
60
|
-
_ as overlayAlpha,
|
|
61
|
-
$ as renderScrollButtonEdge,
|
|
62
|
-
aa as renderScrollButtonEnd,
|
|
63
|
-
oa as renderScrollButtonStart,
|
|
64
|
-
sa as scrollbarTheming,
|
|
65
|
-
ea as setModalConfig,
|
|
66
|
-
ta as strokeShadowFilter,
|
|
67
|
-
na as toShortcutElements,
|
|
68
|
-
ia as useFloatStack,
|
|
69
|
-
la as useInputDialog,
|
|
70
|
-
ra as useLazyWindow,
|
|
71
|
-
ua as useModal,
|
|
72
|
-
da as useOptionsDialog,
|
|
73
|
-
pa as useResolvedThemeMode
|
|
3
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.28-beta.1
|
|
4
|
+
*
|
|
5
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
6
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
+
*/
|
|
8
|
+
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./DTtDTwN0K4atO3Er.mjs";
|
|
9
|
+
import { Box as T, Divider as E, IconButton as D, Input as ee, LinearProgress as O, ListItemButton as te, ListItemIcon as k, Paper as A, Toolbar as j, Typography as M, useTheme as ne } from "@mui/material";
|
|
10
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
11
|
+
import I, { Children as re, Fragment as ie, Suspense as L, cloneElement as ae, createContext as oe, forwardRef as R, isValidElement as se, lazy as z, memo as B, useCallback as V, useContext as ce, useEffect as H, useLayoutEffect as U, useMemo as W, useReducer as le, useRef as G, useState as K } from "react";
|
|
12
|
+
import { alpha as q } from "@mui/system";
|
|
13
|
+
import { CommonUtils as ue, ErrorUtils as de } from "@sheetxl/utils";
|
|
14
|
+
import { CommandButtonType as J, CommandFocusProvider as fe, DynamicIcon as Y, FloatPopper as pe, FloatProvider as me, FloatStackProvider as he, KeyCodes as X, ScrollbarOrientation as ge, defaultCreateScrollEdgeButton as _e, useCallbackRef as Z, useCommandButtonRegistry as ve, useCommands as ye, useFloat as be, useFloatStack as xe, useImperativeElement as Se, useTranslator as Ce } from "@sheetxl/utils-react";
|
|
15
|
+
import we from "@mui/material/ButtonBase/TouchRipple";
|
|
16
|
+
var Te = {
|
|
17
|
+
whiteSpace: "nowrap",
|
|
18
|
+
textTransform: "none",
|
|
19
|
+
lineHeight: 1,
|
|
20
|
+
fontSize: (e) => e.typography.subtitle2.fontSize,
|
|
21
|
+
paddingLeft: (e) => e.spacing(.25),
|
|
22
|
+
paddingRight: (e) => e.spacing(.25)
|
|
74
23
|
};
|
|
24
|
+
function Ee(e, t) {
|
|
25
|
+
let n = t != null && !1 !== t && t !== "" ? P(M, {
|
|
26
|
+
component: "div",
|
|
27
|
+
sx: Te,
|
|
28
|
+
children: t
|
|
29
|
+
}) : null;
|
|
30
|
+
return e && n ? F(T, {
|
|
31
|
+
sx: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center"
|
|
34
|
+
},
|
|
35
|
+
children: [e, n]
|
|
36
|
+
}) : e ?? n ?? void 0;
|
|
37
|
+
}
|
|
38
|
+
var De = ({ isHorizontal: e, isBefore: t }) => {
|
|
39
|
+
let n = Ce();
|
|
40
|
+
return P(N, t ? { children: n(e ? "scroll.edgeLeft" : "scroll.edgeTop") } : { children: n(e ? "scroll.edgeRight" : "scroll.edgeBottom") });
|
|
41
|
+
}, Oe = (e) => {
|
|
42
|
+
let t = _e({
|
|
43
|
+
style: { cursor: "pointer" },
|
|
44
|
+
...e
|
|
45
|
+
});
|
|
46
|
+
return e.isBefore !== void 0 && !e.disabled && (t = P(v, {
|
|
47
|
+
title: P(De, {
|
|
48
|
+
isHorizontal: e.orientation === ge.Horizontal,
|
|
49
|
+
isBefore: e.isBefore
|
|
50
|
+
}),
|
|
51
|
+
enterDelay: 800,
|
|
52
|
+
enterNextDelay: 1600,
|
|
53
|
+
children: e.disabled ? P("div", {
|
|
54
|
+
style: { display: "flex" },
|
|
55
|
+
children: t
|
|
56
|
+
}) : t
|
|
57
|
+
})), t;
|
|
58
|
+
}, ke = (e, t, n, r) => {
|
|
59
|
+
let { style: i, ...a } = e, o = P(D, {
|
|
60
|
+
component: "div",
|
|
61
|
+
...a,
|
|
62
|
+
style: {
|
|
63
|
+
...i,
|
|
64
|
+
padding: "0px"
|
|
65
|
+
},
|
|
66
|
+
sx: { padding: "0" },
|
|
67
|
+
color: e.disabled ? void 0 : "primary",
|
|
68
|
+
"aria-label": n,
|
|
69
|
+
size: "small",
|
|
70
|
+
children: t
|
|
71
|
+
});
|
|
72
|
+
return P(v, {
|
|
73
|
+
title: e.disabled ? n : r,
|
|
74
|
+
enterDelay: 800,
|
|
75
|
+
enterNextDelay: 1600,
|
|
76
|
+
children: e.disabled ? P("div", {
|
|
77
|
+
style: { display: "flex" },
|
|
78
|
+
children: o
|
|
79
|
+
}) : o
|
|
80
|
+
});
|
|
81
|
+
}, Ae = (e) => ke(e, ge.Horizontal ? P(Y, {
|
|
82
|
+
iconKey: "ArrowLeft",
|
|
83
|
+
size: "small"
|
|
84
|
+
}) : P(Y, {
|
|
85
|
+
iconKey: "ArrowUpward",
|
|
86
|
+
size: "small"
|
|
87
|
+
}), "Scroll " + (e.orientation === ge.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === ge.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), je = (e) => ke(e, ge.Horizontal ? P(Y, {
|
|
88
|
+
iconKey: "ArrowRight",
|
|
89
|
+
size: "small"
|
|
90
|
+
}) : P(Y, {
|
|
91
|
+
iconKey: "ArrowDownward",
|
|
92
|
+
size: "small"
|
|
93
|
+
}), "Scroll " + (e.orientation === ge.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === ge.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), Me = B(R((e, t) => {
|
|
94
|
+
let { orientation: n = "vertical", sx: r, ...i } = e, a = n === "vertical";
|
|
95
|
+
return P(E, {
|
|
96
|
+
ref: t,
|
|
97
|
+
sx: {
|
|
98
|
+
marginLeft: a ? "2px" : void 0,
|
|
99
|
+
marginRight: a ? "2px" : void 0,
|
|
100
|
+
backgroundColor: "transparent !important",
|
|
101
|
+
minHeight: a ? "1em" : void 0,
|
|
102
|
+
minWidth: a ? void 0 : "1em",
|
|
103
|
+
borderColor: (e) => e.palette.divider,
|
|
104
|
+
...r
|
|
105
|
+
},
|
|
106
|
+
orientation: n,
|
|
107
|
+
variant: "middle",
|
|
108
|
+
flexItem: !0,
|
|
109
|
+
...i
|
|
110
|
+
});
|
|
111
|
+
})), Ne = "_traverse-ellipsis_14l1h_1", Pe = B((e) => {
|
|
112
|
+
let { sx: t, speed: n = 2, size: r = 70, ...i } = e;
|
|
113
|
+
return P(T, {
|
|
114
|
+
sx: {
|
|
115
|
+
width: `${r}px`,
|
|
116
|
+
height: `${r}px`,
|
|
117
|
+
zIndex: 1,
|
|
118
|
+
"& .primary": {
|
|
119
|
+
stroke: (e) => e.palette.grey[600],
|
|
120
|
+
fill: "none"
|
|
121
|
+
},
|
|
122
|
+
...t
|
|
123
|
+
},
|
|
124
|
+
...i,
|
|
125
|
+
children: F("svg", {
|
|
126
|
+
x: "0px",
|
|
127
|
+
y: "0px",
|
|
128
|
+
viewBox: "0 0 100 100",
|
|
129
|
+
children: [
|
|
130
|
+
P("circle", {
|
|
131
|
+
className: "primary",
|
|
132
|
+
strokeWidth: "4",
|
|
133
|
+
cx: "50",
|
|
134
|
+
cy: "50",
|
|
135
|
+
r: "48"
|
|
136
|
+
}),
|
|
137
|
+
P("line", {
|
|
138
|
+
className: "primary",
|
|
139
|
+
strokeLinecap: "round",
|
|
140
|
+
strokeWidth: "4",
|
|
141
|
+
x1: "50",
|
|
142
|
+
y1: "50",
|
|
143
|
+
x2: "85",
|
|
144
|
+
y2: "50.5",
|
|
145
|
+
children: P("animateTransform", {
|
|
146
|
+
attributeName: "transform",
|
|
147
|
+
dur: `${n}s`,
|
|
148
|
+
type: "rotate",
|
|
149
|
+
from: "0 50 50",
|
|
150
|
+
to: "360 50 50",
|
|
151
|
+
repeatCount: "indefinite"
|
|
152
|
+
})
|
|
153
|
+
}),
|
|
154
|
+
P("line", {
|
|
155
|
+
className: "primary",
|
|
156
|
+
strokeLinecap: "round",
|
|
157
|
+
strokeWidth: "4",
|
|
158
|
+
x1: "50",
|
|
159
|
+
y1: "50",
|
|
160
|
+
x2: "49.5",
|
|
161
|
+
y2: "74",
|
|
162
|
+
children: P("animateTransform", {
|
|
163
|
+
attributeName: "transform",
|
|
164
|
+
dur: 7.5 * n + "s",
|
|
165
|
+
type: "rotate",
|
|
166
|
+
from: "0 50 50",
|
|
167
|
+
to: "360 50 50",
|
|
168
|
+
repeatCount: "indefinite"
|
|
169
|
+
})
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
}), Fe = B((e) => {
|
|
175
|
+
let { sx: t, speed: n = 1.5, size: r = 70, ...i } = e;
|
|
176
|
+
return P(T, {
|
|
177
|
+
sx: {
|
|
178
|
+
width: `${r}px`,
|
|
179
|
+
height: `${r}px`,
|
|
180
|
+
zIndex: 1,
|
|
181
|
+
"& .primary": { fill: (e) => e.palette.grey[600] },
|
|
182
|
+
"& .secondary": {
|
|
183
|
+
stroke: (e) => e.palette.grey[600],
|
|
184
|
+
fill: "none",
|
|
185
|
+
opacity: .5
|
|
186
|
+
},
|
|
187
|
+
...t
|
|
188
|
+
},
|
|
189
|
+
...i,
|
|
190
|
+
children: F("svg", {
|
|
191
|
+
x: "0px",
|
|
192
|
+
y: "0px",
|
|
193
|
+
viewBox: "0 0 100 100",
|
|
194
|
+
children: [P("circle", {
|
|
195
|
+
className: "secondary",
|
|
196
|
+
strokeWidth: "4",
|
|
197
|
+
cx: "50",
|
|
198
|
+
cy: "50",
|
|
199
|
+
r: "21"
|
|
200
|
+
}), P("path", {
|
|
201
|
+
className: "primary",
|
|
202
|
+
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",
|
|
203
|
+
children: P("animateTransform", {
|
|
204
|
+
attributeName: "transform",
|
|
205
|
+
type: "rotate",
|
|
206
|
+
dur: 1 * n + "s",
|
|
207
|
+
from: "0 50 50",
|
|
208
|
+
to: "360 50 50",
|
|
209
|
+
repeatCount: "indefinite"
|
|
210
|
+
})
|
|
211
|
+
})]
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
}), Ie = B((e) => {
|
|
215
|
+
let { sx: t, speed: n = 1, size: r = 70, ...i } = e;
|
|
216
|
+
return P(T, {
|
|
217
|
+
sx: {
|
|
218
|
+
width: `${r}px`,
|
|
219
|
+
height: `${r}px`,
|
|
220
|
+
zIndex: 1,
|
|
221
|
+
...t
|
|
222
|
+
},
|
|
223
|
+
...i,
|
|
224
|
+
children: F("svg", {
|
|
225
|
+
x: "0px",
|
|
226
|
+
y: "0px",
|
|
227
|
+
viewBox: "0 0 100 100",
|
|
228
|
+
children: [
|
|
229
|
+
P("circle", {
|
|
230
|
+
className: "primary",
|
|
231
|
+
cx: "6",
|
|
232
|
+
cy: "50",
|
|
233
|
+
r: "6",
|
|
234
|
+
children: P("animate", {
|
|
235
|
+
attributeName: "opacity",
|
|
236
|
+
dur: `${n}s`,
|
|
237
|
+
values: "0;1;0",
|
|
238
|
+
repeatCount: "indefinite",
|
|
239
|
+
begin: "0.1"
|
|
240
|
+
})
|
|
241
|
+
}),
|
|
242
|
+
P("circle", {
|
|
243
|
+
className: "primary",
|
|
244
|
+
cx: "26",
|
|
245
|
+
cy: "50",
|
|
246
|
+
r: "6",
|
|
247
|
+
children: P("animate", {
|
|
248
|
+
attributeName: "opacity",
|
|
249
|
+
dur: `${n}s`,
|
|
250
|
+
values: "0;1;0",
|
|
251
|
+
repeatCount: "indefinite",
|
|
252
|
+
begin: "0.2"
|
|
253
|
+
})
|
|
254
|
+
}),
|
|
255
|
+
P("circle", {
|
|
256
|
+
className: "primary",
|
|
257
|
+
cx: "46",
|
|
258
|
+
cy: "50",
|
|
259
|
+
r: "6",
|
|
260
|
+
children: P("animate", {
|
|
261
|
+
attributeName: "opacity",
|
|
262
|
+
dur: `${n}s`,
|
|
263
|
+
values: "0;1;0",
|
|
264
|
+
repeatCount: "indefinite",
|
|
265
|
+
begin: "0.3"
|
|
266
|
+
})
|
|
267
|
+
})
|
|
268
|
+
]
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
}), Le = B((e) => {
|
|
272
|
+
let { sx: t, speed: n = 1, size: r = 70, ...i } = e;
|
|
273
|
+
return P(T, {
|
|
274
|
+
sx: {
|
|
275
|
+
width: `${r}px`,
|
|
276
|
+
height: `${r}px`,
|
|
277
|
+
zIndex: 1,
|
|
278
|
+
"& .primary": {
|
|
279
|
+
fill: (e) => e.palette.grey[600],
|
|
280
|
+
stroke: "none"
|
|
281
|
+
},
|
|
282
|
+
...t
|
|
283
|
+
},
|
|
284
|
+
...i,
|
|
285
|
+
children: F("svg", {
|
|
286
|
+
x: "0px",
|
|
287
|
+
y: "0px",
|
|
288
|
+
viewBox: "0 0 100 100",
|
|
289
|
+
children: [
|
|
290
|
+
P("circle", {
|
|
291
|
+
className: "primary",
|
|
292
|
+
cx: "6",
|
|
293
|
+
cy: "50",
|
|
294
|
+
r: "6",
|
|
295
|
+
children: P("animateTransform", {
|
|
296
|
+
attributeName: "transform",
|
|
297
|
+
dur: `${n}s`,
|
|
298
|
+
type: "translate",
|
|
299
|
+
values: "0 15 ; 0 -15; 0 15",
|
|
300
|
+
repeatCount: "indefinite",
|
|
301
|
+
begin: "0.1"
|
|
302
|
+
})
|
|
303
|
+
}),
|
|
304
|
+
P("circle", {
|
|
305
|
+
className: "primary",
|
|
306
|
+
cx: "30",
|
|
307
|
+
cy: "50",
|
|
308
|
+
r: "6",
|
|
309
|
+
children: P("animateTransform", {
|
|
310
|
+
attributeName: "transform",
|
|
311
|
+
dur: `${n}s`,
|
|
312
|
+
type: "translate",
|
|
313
|
+
values: "0 10 ; 0 -10; 0 10",
|
|
314
|
+
repeatCount: "indefinite",
|
|
315
|
+
begin: "0.2"
|
|
316
|
+
})
|
|
317
|
+
}),
|
|
318
|
+
P("circle", {
|
|
319
|
+
className: "primary",
|
|
320
|
+
cx: "54",
|
|
321
|
+
cy: "50",
|
|
322
|
+
r: "6",
|
|
323
|
+
children: P("animateTransform", {
|
|
324
|
+
attributeName: "transform",
|
|
325
|
+
dur: `${n}s`,
|
|
326
|
+
type: "translate",
|
|
327
|
+
values: "0 5 ; 0 -5; 0 5",
|
|
328
|
+
repeatCount: "indefinite",
|
|
329
|
+
begin: "0.3"
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
]
|
|
333
|
+
})
|
|
334
|
+
});
|
|
335
|
+
}), Re = B((e) => {
|
|
336
|
+
let { sx: t, speed: n = 2, size: r = 70, ...i } = e;
|
|
337
|
+
return P(T, {
|
|
338
|
+
sx: {
|
|
339
|
+
width: `${r}px`,
|
|
340
|
+
height: `${r}px`,
|
|
341
|
+
zIndex: 1,
|
|
342
|
+
"& .primary": {
|
|
343
|
+
stroke: (e) => e.palette.grey[600],
|
|
344
|
+
opacity: .5,
|
|
345
|
+
fill: "none"
|
|
346
|
+
},
|
|
347
|
+
"& .secondary": {
|
|
348
|
+
fillOpacity: (e) => e.palette.grey[600],
|
|
349
|
+
opacity: .8,
|
|
350
|
+
stroke: (e) => e.palette.background.paper
|
|
351
|
+
},
|
|
352
|
+
...t
|
|
353
|
+
},
|
|
354
|
+
...i,
|
|
355
|
+
children: F("svg", {
|
|
356
|
+
x: "0px",
|
|
357
|
+
y: "0px",
|
|
358
|
+
viewBox: "0 0 100 100",
|
|
359
|
+
children: [P("circle", {
|
|
360
|
+
className: "primary",
|
|
361
|
+
strokeWidth: "4",
|
|
362
|
+
cx: "50",
|
|
363
|
+
cy: "50",
|
|
364
|
+
r: "44"
|
|
365
|
+
}), P("circle", {
|
|
366
|
+
className: "secondary",
|
|
367
|
+
strokeWidth: "3",
|
|
368
|
+
cx: "8",
|
|
369
|
+
cy: "54",
|
|
370
|
+
r: "6",
|
|
371
|
+
children: P("animateTransform", {
|
|
372
|
+
attributeName: "transform",
|
|
373
|
+
dur: `${n}s`,
|
|
374
|
+
type: "rotate",
|
|
375
|
+
from: "0 50 48",
|
|
376
|
+
to: "360 50 52",
|
|
377
|
+
repeatCount: "indefinite"
|
|
378
|
+
})
|
|
379
|
+
})]
|
|
380
|
+
})
|
|
381
|
+
});
|
|
382
|
+
}), ze = B((e) => {
|
|
383
|
+
let { sx: t, speed: r = 1, size: i = 13, width: a = 64, height: o = 17, ...s } = e;
|
|
384
|
+
return F(T, {
|
|
385
|
+
sx: {
|
|
386
|
+
width: `${a}px`,
|
|
387
|
+
height: `${o}px`,
|
|
388
|
+
"& .primary": {
|
|
389
|
+
backgroundColor: (e) => e.palette.grey[600],
|
|
390
|
+
top: `${(o - i) / 2}px`,
|
|
391
|
+
width: () => `${i}px`,
|
|
392
|
+
height: () => `${i}px`
|
|
393
|
+
},
|
|
394
|
+
...t
|
|
395
|
+
},
|
|
396
|
+
className: n(Ne, "animated-icon"),
|
|
397
|
+
...s,
|
|
398
|
+
children: [
|
|
399
|
+
P("div", { className: "primary" }),
|
|
400
|
+
P("div", { className: "primary" }),
|
|
401
|
+
P("div", { className: "primary" }),
|
|
402
|
+
P("div", { className: "primary" })
|
|
403
|
+
]
|
|
404
|
+
});
|
|
405
|
+
}), Be = P(Fe, {}), Ve = B(R((t, n) => {
|
|
406
|
+
let { sx: r, style: i, onMount: a, onUnmount: o, transitionDelay: s = "1200ms", panel: c = !1, transparentBackground: l = !0, icon: u = Be, label: d, progress: f = null, ...p } = t, m = W(() => typeof d == "string" ? P(M, {
|
|
407
|
+
variant: "caption",
|
|
408
|
+
component: "div",
|
|
409
|
+
sx: {
|
|
410
|
+
fontSize: "0.875rem",
|
|
411
|
+
lineHeight: 1.43,
|
|
412
|
+
letterSpacing: "0.01071em"
|
|
413
|
+
},
|
|
414
|
+
children: d
|
|
415
|
+
}) : d, [d]), h = W(() => {
|
|
416
|
+
if (typeof f != "number") return u;
|
|
417
|
+
let e = Math.max(0, Math.min(100, Math.round(100 * f)));
|
|
418
|
+
return P(T, {
|
|
419
|
+
sx: {
|
|
420
|
+
display: "flex",
|
|
421
|
+
alignItems: "center",
|
|
422
|
+
width: "180px"
|
|
423
|
+
},
|
|
424
|
+
children: P(O, {
|
|
425
|
+
variant: "determinate",
|
|
426
|
+
value: e,
|
|
427
|
+
color: "inherit",
|
|
428
|
+
sx: {
|
|
429
|
+
width: "100%",
|
|
430
|
+
borderRadius: "2px",
|
|
431
|
+
"@keyframes sxlProgressPulse": {
|
|
432
|
+
"0%, 100%": { opacity: 1 },
|
|
433
|
+
"50%": { opacity: .25 }
|
|
434
|
+
},
|
|
435
|
+
"& .MuiLinearProgress-bar": {
|
|
436
|
+
transition: "transform 0.5s linear",
|
|
437
|
+
...e >= 100 && {
|
|
438
|
+
willChange: "opacity",
|
|
439
|
+
animation: "sxlProgressPulse 1s ease-in-out infinite"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
})
|
|
444
|
+
});
|
|
445
|
+
}, [f, u]), g = G(null), _ = W(() => {
|
|
446
|
+
let e = F(T, {
|
|
447
|
+
sx: {
|
|
448
|
+
display: "flex",
|
|
449
|
+
flexDirection: "column",
|
|
450
|
+
alignItems: "center",
|
|
451
|
+
rowGap: "8px"
|
|
452
|
+
},
|
|
453
|
+
children: [m, h]
|
|
454
|
+
});
|
|
455
|
+
return !0 === c && (e = P(A, {
|
|
456
|
+
elevation: 0,
|
|
457
|
+
sx: {
|
|
458
|
+
display: "flex",
|
|
459
|
+
flexDirection: "column",
|
|
460
|
+
justifyContent: "center",
|
|
461
|
+
alignItems: "center",
|
|
462
|
+
alignSelf: "center",
|
|
463
|
+
marginBottom: "5%",
|
|
464
|
+
backgroundColor: (e) => e.palette.info.light,
|
|
465
|
+
color: (e) => e.palette.info.contrastText,
|
|
466
|
+
paddingLeft: (e) => e.spacing(2),
|
|
467
|
+
paddingRight: (e) => e.spacing(2),
|
|
468
|
+
paddingTop: (e) => e.spacing(2),
|
|
469
|
+
paddingBottom: (e) => e.spacing(1),
|
|
470
|
+
rowGap: (e) => e.spacing(1),
|
|
471
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
472
|
+
boxShadow: (e) => e.shadows[2],
|
|
473
|
+
"& .primary": {
|
|
474
|
+
background: (e) => `${q(e.palette.info.contrastText, .9)} !important`,
|
|
475
|
+
boxShadow: (e) => `0 0 0 1px ${e.palette.mode === "dark" ? e.palette.text.secondary : e.palette.divider}`,
|
|
476
|
+
boxSizing: "content-box",
|
|
477
|
+
border: "solid transparent"
|
|
478
|
+
},
|
|
479
|
+
zIndex: 1
|
|
480
|
+
},
|
|
481
|
+
children: e
|
|
482
|
+
})), P(T, {
|
|
483
|
+
...p,
|
|
484
|
+
ref: S([g, n]),
|
|
485
|
+
className: "animatable",
|
|
486
|
+
sx: {
|
|
487
|
+
cursor: "wait",
|
|
488
|
+
boxSizing: "border-box",
|
|
489
|
+
alignItems: "center",
|
|
490
|
+
justifyContent: "center",
|
|
491
|
+
display: "flex",
|
|
492
|
+
flexDirection: "column",
|
|
493
|
+
willChange: "opacity",
|
|
494
|
+
opacity: l ? .001 : 1,
|
|
495
|
+
transitionProperty: "opacity",
|
|
496
|
+
transitionDelay: s,
|
|
497
|
+
transitionDuration: "320ms",
|
|
498
|
+
transitionTimingFunction: "ease-in",
|
|
499
|
+
overflow: "hidden",
|
|
500
|
+
outline: "none",
|
|
501
|
+
width: "100%",
|
|
502
|
+
height: "100%",
|
|
503
|
+
minWidth: 0,
|
|
504
|
+
minHeight: 0,
|
|
505
|
+
zIndex: 99999,
|
|
506
|
+
"&.animating": { opacity: 1 },
|
|
507
|
+
"&.animating-exit": {
|
|
508
|
+
opacity: 0,
|
|
509
|
+
transition: "opacity 210ms"
|
|
510
|
+
},
|
|
511
|
+
...r,
|
|
512
|
+
...i
|
|
513
|
+
},
|
|
514
|
+
children: F(T, {
|
|
515
|
+
className: "center",
|
|
516
|
+
sx: {
|
|
517
|
+
display: "flex",
|
|
518
|
+
flex: "1 1 100%",
|
|
519
|
+
height: "100%",
|
|
520
|
+
width: "100%",
|
|
521
|
+
alignItems: "center",
|
|
522
|
+
justifyContent: "center",
|
|
523
|
+
boxSizing: "border-box",
|
|
524
|
+
position: "relative"
|
|
525
|
+
},
|
|
526
|
+
children: [P(T, {
|
|
527
|
+
className: "backdrop",
|
|
528
|
+
sx: {
|
|
529
|
+
opacity: (e) => l ? 1.5 * e.palette.action.disabledOpacity : void 0,
|
|
530
|
+
background: (e) => l ? void 0 : e.palette.background.paper,
|
|
531
|
+
backdropFilter: "blur(4px)",
|
|
532
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
533
|
+
zIndex: -1,
|
|
534
|
+
position: "absolute",
|
|
535
|
+
width: "100%",
|
|
536
|
+
height: "100%",
|
|
537
|
+
boxSizing: "border-box"
|
|
538
|
+
}
|
|
539
|
+
}), e]
|
|
540
|
+
})
|
|
541
|
+
});
|
|
542
|
+
}, [
|
|
543
|
+
r,
|
|
544
|
+
c,
|
|
545
|
+
m,
|
|
546
|
+
h
|
|
547
|
+
]), v = G(!1), y = G(!1);
|
|
548
|
+
return e(() => {
|
|
549
|
+
if (g.current && !v.current && !y.current) {
|
|
550
|
+
if (y.current = !0, g.current.classList.contains("animatable") && !g.current.classList.contains("animating")) {
|
|
551
|
+
let e = !1, t = () => {
|
|
552
|
+
y.current && (v.current = !0, y.current = !1, e = !0, a?.());
|
|
553
|
+
};
|
|
554
|
+
g.current && g.current.addEventListener("transitionrun", t, {
|
|
555
|
+
once: !0,
|
|
556
|
+
capture: !0,
|
|
557
|
+
passive: !0
|
|
558
|
+
}), y.current && g.current && (window.getComputedStyle(g.current, null).opacity, g.current.classList.add("animating")), setTimeout(() => {
|
|
559
|
+
!e && y.current && g.current && (g.current?.removeEventListener("transitionrun", t), t());
|
|
560
|
+
}, 100);
|
|
561
|
+
} else v.current = !0, y.current = !1, a?.();
|
|
562
|
+
return () => {};
|
|
563
|
+
}
|
|
564
|
+
}, [g.current]), H(() => () => {
|
|
565
|
+
v.current && (g.current?.classList.remove("animating"), v.current = !1, y.current = !1, o?.());
|
|
566
|
+
}, []), _;
|
|
567
|
+
}));
|
|
568
|
+
Ve.displayName = "AnimatedLoadingPanel";
|
|
569
|
+
var He = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, Ue = /^\s*at\s+(?:(async|new|await)\s+)?(.+?):(\d+):(\d+)\s*$/, We = (e) => {
|
|
570
|
+
if (!e) return "";
|
|
571
|
+
try {
|
|
572
|
+
e = new URL(e).pathname;
|
|
573
|
+
} catch {}
|
|
574
|
+
return e = (e = e.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
|
|
575
|
+
}, Ge = B(({ error: e, maxLines: t = 2 ** 53 - 1, hideLineNumbers: n = !1 }) => {
|
|
576
|
+
let r = Ce(), [i, a] = K(null);
|
|
577
|
+
if (!e?.stack) return null;
|
|
578
|
+
let o = de.collectErrorChain(e).reverse(), s = [];
|
|
579
|
+
o.forEach(({ error: e }, t) => {
|
|
580
|
+
let n = (e.stack || "").split("\n").filter(Boolean).map((e) => {
|
|
581
|
+
let t = e.match(He);
|
|
582
|
+
if (t) {
|
|
583
|
+
let [, e = "", n, r, i, a] = t;
|
|
584
|
+
return {
|
|
585
|
+
line: `at ${e ? e + " " : ""}${n}`,
|
|
586
|
+
location: `${We(r).split(/[\\/]/).pop()}:${i}:${a}`
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
if (t = e.match(Ue), t) {
|
|
590
|
+
let [, e = "", n, r, i] = t, a = We(n), o = `${a.split(/[\\/]/).pop()}:${r}:${i}`;
|
|
591
|
+
return {
|
|
592
|
+
line: `at ${e ? e + " " : ""}${o}`,
|
|
593
|
+
location: a === o ? void 0 : `${a}:${r}:${i}`
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
return { line: e.trim() };
|
|
597
|
+
});
|
|
598
|
+
n.length && (s.push({
|
|
599
|
+
line: t ? `Caused by: ${n[0].line}` : n[0].line,
|
|
600
|
+
isBoundary: !0
|
|
601
|
+
}), s.push(...n.slice(1)));
|
|
602
|
+
});
|
|
603
|
+
let c = t ? s.slice(0, t) : s, l = t && s.length > t;
|
|
604
|
+
return F(T, {
|
|
605
|
+
sx: {
|
|
606
|
+
width: "100%",
|
|
607
|
+
mt: 1
|
|
608
|
+
},
|
|
609
|
+
children: [F(T, {
|
|
610
|
+
sx: {
|
|
611
|
+
display: "flex",
|
|
612
|
+
alignItems: "center",
|
|
613
|
+
gap: 1,
|
|
614
|
+
borderRadius: 1,
|
|
615
|
+
px: 1,
|
|
616
|
+
py: .5
|
|
617
|
+
},
|
|
618
|
+
children: [
|
|
619
|
+
P(M, {
|
|
620
|
+
variant: "caption",
|
|
621
|
+
component: "div",
|
|
622
|
+
sx: {
|
|
623
|
+
fontSize: "0.75rem",
|
|
624
|
+
opacity: .8
|
|
625
|
+
},
|
|
626
|
+
children: o.length > 1 ? r("stackTrace.headingFrames", { count: o.length }) : r("stackTrace.heading")
|
|
627
|
+
}),
|
|
628
|
+
P(T, { sx: { flex: 1 } }),
|
|
629
|
+
i && P(M, {
|
|
630
|
+
variant: "caption",
|
|
631
|
+
component: "div",
|
|
632
|
+
sx: {
|
|
633
|
+
fontSize: "0.625rem",
|
|
634
|
+
opacity: .8
|
|
635
|
+
},
|
|
636
|
+
children: i
|
|
637
|
+
}),
|
|
638
|
+
P(D, {
|
|
639
|
+
size: "small",
|
|
640
|
+
onClick: async () => {
|
|
641
|
+
try {
|
|
642
|
+
let e = 0, t = s.map((t) => {
|
|
643
|
+
if (t.isBoundary) return e = 0, t.line;
|
|
644
|
+
e++;
|
|
645
|
+
let n = t.location && t.line !== t.location ? `${t.line} (${t.location})` : t.line;
|
|
646
|
+
return e >= 1 && (n = ` ${n}`), n;
|
|
647
|
+
}).join("\n");
|
|
648
|
+
await navigator.clipboard.writeText(t), a("Copied!"), setTimeout(() => a(null), 2e3);
|
|
649
|
+
} catch (e) {
|
|
650
|
+
a("Can't copy!"), console.warn("Failed to copy stack trace:", e);
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
sx: {
|
|
654
|
+
color: "inherit",
|
|
655
|
+
opacity: .7,
|
|
656
|
+
"&:hover": { opacity: 1 }
|
|
657
|
+
},
|
|
658
|
+
title: r("stackTrace.copy"),
|
|
659
|
+
children: P(Y, {
|
|
660
|
+
iconKey: "ContentCopy",
|
|
661
|
+
style: { fontSize: "0.875rem" }
|
|
662
|
+
})
|
|
663
|
+
}),
|
|
664
|
+
P(D, {
|
|
665
|
+
size: "small",
|
|
666
|
+
onClick: () => {
|
|
667
|
+
a("Logged!"), setTimeout(() => a(null), 2e3), console.warn(e);
|
|
668
|
+
},
|
|
669
|
+
sx: {
|
|
670
|
+
color: "inherit",
|
|
671
|
+
opacity: .7,
|
|
672
|
+
"&:hover": { opacity: 1 }
|
|
673
|
+
},
|
|
674
|
+
title: r("stackTrace.log"),
|
|
675
|
+
children: P(Y, {
|
|
676
|
+
iconKey: "BugReport",
|
|
677
|
+
style: { fontSize: "0.875rem" }
|
|
678
|
+
})
|
|
679
|
+
})
|
|
680
|
+
]
|
|
681
|
+
}), F(T, {
|
|
682
|
+
sx: {
|
|
683
|
+
mt: 1,
|
|
684
|
+
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
|
685
|
+
borderRadius: 1,
|
|
686
|
+
p: 1,
|
|
687
|
+
maxHeight: "300px",
|
|
688
|
+
overflow: "auto",
|
|
689
|
+
fontFamily: "monospace",
|
|
690
|
+
fontSize: "0.75rem",
|
|
691
|
+
lineHeight: 1.4
|
|
692
|
+
},
|
|
693
|
+
children: [c.map((e, t) => e.isBoundary ? P(T, {
|
|
694
|
+
sx: {
|
|
695
|
+
py: 1,
|
|
696
|
+
mt: +(t > 0),
|
|
697
|
+
mb: .5,
|
|
698
|
+
borderTop: t > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none"
|
|
699
|
+
},
|
|
700
|
+
children: P(M, {
|
|
701
|
+
variant: "caption",
|
|
702
|
+
component: "div",
|
|
703
|
+
sx: {
|
|
704
|
+
fontSize: "0.75rem",
|
|
705
|
+
fontWeight: "bold",
|
|
706
|
+
color: (t) => e.isBoundary ? t.palette.text.primary : t.palette.text.secondary,
|
|
707
|
+
display: "block"
|
|
708
|
+
},
|
|
709
|
+
children: e.line
|
|
710
|
+
})
|
|
711
|
+
}, `error-${t}`) : F(T, {
|
|
712
|
+
sx: {
|
|
713
|
+
display: "flex",
|
|
714
|
+
alignItems: "flex-start",
|
|
715
|
+
gap: 1,
|
|
716
|
+
py: .25,
|
|
717
|
+
pl: 1,
|
|
718
|
+
"&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" }
|
|
719
|
+
},
|
|
720
|
+
children: [!n && P(M, {
|
|
721
|
+
variant: "caption",
|
|
722
|
+
component: "div",
|
|
723
|
+
sx: {
|
|
724
|
+
fontSize: "0.625rem",
|
|
725
|
+
opacity: .5,
|
|
726
|
+
minWidth: "20px",
|
|
727
|
+
textAlign: "right",
|
|
728
|
+
userSelect: "none"
|
|
729
|
+
},
|
|
730
|
+
children: t + 1
|
|
731
|
+
}), F(T, {
|
|
732
|
+
sx: {
|
|
733
|
+
flex: 1,
|
|
734
|
+
overflow: "hidden"
|
|
735
|
+
},
|
|
736
|
+
children: [P(M, {
|
|
737
|
+
variant: "caption",
|
|
738
|
+
component: "div",
|
|
739
|
+
sx: {
|
|
740
|
+
fontSize: "0.75rem",
|
|
741
|
+
whiteSpace: "nowrap",
|
|
742
|
+
overflow: "hidden",
|
|
743
|
+
textOverflow: "ellipsis",
|
|
744
|
+
color: "inherit"
|
|
745
|
+
},
|
|
746
|
+
children: e.line
|
|
747
|
+
}), e.location && e.line !== e.location && P(M, {
|
|
748
|
+
variant: "caption",
|
|
749
|
+
component: "div",
|
|
750
|
+
sx: {
|
|
751
|
+
fontSize: "0.625rem",
|
|
752
|
+
opacity: .6,
|
|
753
|
+
fontStyle: "italic"
|
|
754
|
+
},
|
|
755
|
+
children: e.location
|
|
756
|
+
})]
|
|
757
|
+
})]
|
|
758
|
+
}, `stack-${t}`)), l && P(M, {
|
|
759
|
+
variant: "caption",
|
|
760
|
+
component: "div",
|
|
761
|
+
sx: {
|
|
762
|
+
fontSize: "0.625rem",
|
|
763
|
+
opacity: .6,
|
|
764
|
+
fontStyle: "italic",
|
|
765
|
+
textAlign: "center",
|
|
766
|
+
display: "block",
|
|
767
|
+
mt: 1
|
|
768
|
+
},
|
|
769
|
+
children: r("stackTrace.moreFrames", { count: s.length - t })
|
|
770
|
+
})]
|
|
771
|
+
})]
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
Ge.displayName = "StackTrace";
|
|
775
|
+
var Ke = B(R((e, t) => {
|
|
776
|
+
let { sx: n, icon: r = P(Y, {
|
|
777
|
+
iconKey: "Error",
|
|
778
|
+
style: { fontSize: 48 }
|
|
779
|
+
}), error: i, hideStackTrace: a = !1, stackTraceExpanded: o = !1, fullscreen: s = !1, ...c } = e, l = Ce(), u = W(() => qe(i, a, o, s, l), [
|
|
780
|
+
i,
|
|
781
|
+
a,
|
|
782
|
+
o,
|
|
783
|
+
s,
|
|
784
|
+
l
|
|
785
|
+
]);
|
|
786
|
+
return W(() => P(T, {
|
|
787
|
+
ref: t,
|
|
788
|
+
sx: {
|
|
789
|
+
boxSizing: "border-box",
|
|
790
|
+
alignItems: "center",
|
|
791
|
+
justifyContent: "center",
|
|
792
|
+
display: "flex",
|
|
793
|
+
flexDirection: "row",
|
|
794
|
+
overflow: "hidden",
|
|
795
|
+
width: "100%",
|
|
796
|
+
height: "100%",
|
|
797
|
+
...n
|
|
798
|
+
},
|
|
799
|
+
...c,
|
|
800
|
+
children: F(T, {
|
|
801
|
+
sx: {
|
|
802
|
+
display: "flex",
|
|
803
|
+
flex: "1 1 100%",
|
|
804
|
+
height: "100%",
|
|
805
|
+
alignItems: "center",
|
|
806
|
+
justifyContent: "center",
|
|
807
|
+
boxSizing: "border-box",
|
|
808
|
+
position: "relative"
|
|
809
|
+
},
|
|
810
|
+
children: [P(T, {
|
|
811
|
+
className: "backdrop",
|
|
812
|
+
sx: {
|
|
813
|
+
backdropFilter: "blur(4px)",
|
|
814
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
815
|
+
zIndex: -1,
|
|
816
|
+
position: "absolute",
|
|
817
|
+
width: "100%",
|
|
818
|
+
height: "100%",
|
|
819
|
+
boxSizing: "border-box"
|
|
820
|
+
}
|
|
821
|
+
}), P(A, {
|
|
822
|
+
elevation: 0,
|
|
823
|
+
sx: {
|
|
824
|
+
display: "flex",
|
|
825
|
+
flexDirection: "column",
|
|
826
|
+
justifyContent: "center",
|
|
827
|
+
alignItems: "center",
|
|
828
|
+
rowGap: "8px",
|
|
829
|
+
alignSelf: "center",
|
|
830
|
+
marginBottom: "5%",
|
|
831
|
+
backgroundColor: (e) => e.palette.background.paper,
|
|
832
|
+
color: (e) => e.palette.text.primary,
|
|
833
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
834
|
+
padding: (e) => e.spacing(3),
|
|
835
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
836
|
+
boxShadow: (e) => e.shadows[3],
|
|
837
|
+
zIndex: 1
|
|
838
|
+
},
|
|
839
|
+
children: P(T, {
|
|
840
|
+
sx: {
|
|
841
|
+
display: "flex",
|
|
842
|
+
flexDirection: "column",
|
|
843
|
+
alignItems: "center",
|
|
844
|
+
gap: (e) => e.spacing(2),
|
|
845
|
+
width: "100%",
|
|
846
|
+
maxWidth: s ? void 0 : "600px"
|
|
847
|
+
},
|
|
848
|
+
children: F(T, {
|
|
849
|
+
sx: {
|
|
850
|
+
display: "flex",
|
|
851
|
+
flexDirection: "row",
|
|
852
|
+
alignItems: "flex-start",
|
|
853
|
+
gap: (e) => e.spacing(2)
|
|
854
|
+
},
|
|
855
|
+
children: [P(T, {
|
|
856
|
+
sx: {
|
|
857
|
+
display: "flex",
|
|
858
|
+
color: (e) => e.palette.error.main
|
|
859
|
+
},
|
|
860
|
+
children: typeof r == "string" ? P(Y, {
|
|
861
|
+
iconKey: r,
|
|
862
|
+
style: { fontSize: 48 }
|
|
863
|
+
}) : r
|
|
864
|
+
}), u]
|
|
865
|
+
})
|
|
866
|
+
})
|
|
867
|
+
})]
|
|
868
|
+
})
|
|
869
|
+
}), [
|
|
870
|
+
n,
|
|
871
|
+
r,
|
|
872
|
+
u
|
|
873
|
+
]);
|
|
874
|
+
}));
|
|
875
|
+
Ke.displayName = "StackTraceErrorPanel";
|
|
876
|
+
var qe = (e, t = !1, n = !1, r = !1, i = (e) => e) => se(e) ? e : e instanceof Error ? F(T, {
|
|
877
|
+
sx: {
|
|
878
|
+
display: "flex",
|
|
879
|
+
flexDirection: "column",
|
|
880
|
+
minWidth: r ? "70vw" : "300px",
|
|
881
|
+
maxWidth: r ? void 0 : "500px",
|
|
882
|
+
width: "100%"
|
|
883
|
+
},
|
|
884
|
+
children: [
|
|
885
|
+
P(M, {
|
|
886
|
+
variant: "caption",
|
|
887
|
+
component: "div",
|
|
888
|
+
sx: {
|
|
889
|
+
fontSize: "0.875rem",
|
|
890
|
+
lineHeight: 1.43,
|
|
891
|
+
mb: 1
|
|
892
|
+
},
|
|
893
|
+
children: e.message
|
|
894
|
+
}),
|
|
895
|
+
e.cause ? P(M, {
|
|
896
|
+
variant: "caption",
|
|
897
|
+
component: "div",
|
|
898
|
+
sx: {
|
|
899
|
+
fontSize: "0.875rem",
|
|
900
|
+
lineHeight: 1.43,
|
|
901
|
+
letterSpacing: "0.01071em",
|
|
902
|
+
mb: 1,
|
|
903
|
+
opacity: .8
|
|
904
|
+
},
|
|
905
|
+
children: i("stackTrace.causedBy", { cause: e.cause instanceof Error ? e.cause.message : String(e.cause) })
|
|
906
|
+
}) : null,
|
|
907
|
+
!t && P(Ge, {
|
|
908
|
+
error: e,
|
|
909
|
+
hideLineNumbers: !0
|
|
910
|
+
})
|
|
911
|
+
]
|
|
912
|
+
}) : P(M, {
|
|
913
|
+
variant: "caption",
|
|
914
|
+
component: "div",
|
|
915
|
+
sx: {
|
|
916
|
+
fontSize: "0.875rem",
|
|
917
|
+
lineHeight: 1.43,
|
|
918
|
+
letterSpacing: "0.01071em"
|
|
919
|
+
},
|
|
920
|
+
children: e === "string" ? e : `Unknown Error: ${String(e)}`
|
|
921
|
+
}), Je = {
|
|
922
|
+
Popup: "popup",
|
|
923
|
+
Anchor: "anchor"
|
|
924
|
+
}, Ye = {
|
|
925
|
+
ByPopup: "popupDone",
|
|
926
|
+
Cancel: "popupCancel",
|
|
927
|
+
ClickAway: "clickAway"
|
|
928
|
+
}, Xe = {
|
|
929
|
+
Toolbar: "toolbar",
|
|
930
|
+
Menuitem: "menuitem"
|
|
931
|
+
}, Ze = (e) => {
|
|
932
|
+
let { closeFloat: t, closeFloatAll: r, floatReference: i, popupContainer: a, children: o, className: s, sx: c, ...l } = e;
|
|
933
|
+
return P(T, {
|
|
934
|
+
className: n("menu", s),
|
|
935
|
+
sx: {
|
|
936
|
+
display: "flex",
|
|
937
|
+
flexDirection: "column",
|
|
938
|
+
paddingTop: (e) => `${e.shape.borderRadius}px`,
|
|
939
|
+
paddingBottom: (e) => `${e.shape.borderRadius}px`,
|
|
940
|
+
...c
|
|
941
|
+
},
|
|
942
|
+
...l,
|
|
943
|
+
children: o
|
|
944
|
+
});
|
|
945
|
+
}, Qe = (e, t, n) => {
|
|
946
|
+
let i = "";
|
|
947
|
+
return n && (i = (i ? i + " " : "") + "rotate(180deg)"), P(r, {
|
|
948
|
+
style: {
|
|
949
|
+
marginLeft: e ? void 0 : t ? "-0.25rem" : "-3px",
|
|
950
|
+
marginRight: e ? void 0 : t ? "-0.25rem" : "-6px",
|
|
951
|
+
transform: i
|
|
952
|
+
},
|
|
953
|
+
color: "inherit"
|
|
954
|
+
});
|
|
955
|
+
}, $e = B(R((e, t) => {
|
|
956
|
+
let { open: n, anchorEl: r, anchorPosition: i, label: a, floatReference: o, createPopupPanel: s = Ze, propsPopper: c, onMount: l, onClosing: u, onClose: d, onOpening: p, onOpen: m, children: h, sx: g, ..._ } = e, v = Z(u ?? (() => {}), [u]), y = Z(d ?? (() => {}), [d]), b = Z(p ?? (() => {}), [p]), x = Z(m ?? (() => {}), [m]), [S, C] = K(), w = G(null), T = Z((e, t) => {
|
|
957
|
+
C(e), l?.(w.current, t);
|
|
958
|
+
}, [l]), E = W(() => {
|
|
959
|
+
let e = {
|
|
960
|
+
popupContainer: S,
|
|
961
|
+
floatReference: o,
|
|
962
|
+
children: h,
|
|
963
|
+
..._
|
|
964
|
+
}, t = s(e);
|
|
965
|
+
return P(A, {
|
|
966
|
+
elevation: 8,
|
|
967
|
+
ref: w,
|
|
968
|
+
sx: {
|
|
969
|
+
display: "flex",
|
|
970
|
+
overflowX: "hidden",
|
|
971
|
+
overflowY: "auto",
|
|
972
|
+
outline: "none",
|
|
973
|
+
backgroundColor: "var(--sxl-color-elevated, var(--sxl-color-base-100, #fff))",
|
|
974
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)",
|
|
975
|
+
"&.MuiPaper-root": (e) => f(e)
|
|
976
|
+
},
|
|
977
|
+
tabIndex: 0,
|
|
978
|
+
children: t
|
|
979
|
+
});
|
|
980
|
+
}, [
|
|
981
|
+
s,
|
|
982
|
+
h,
|
|
983
|
+
S,
|
|
984
|
+
o
|
|
985
|
+
]);
|
|
986
|
+
return P(pe, {
|
|
987
|
+
ref: t,
|
|
988
|
+
anchorEl: r,
|
|
989
|
+
anchorPosition: i,
|
|
990
|
+
label: a,
|
|
991
|
+
open: n,
|
|
992
|
+
onMount: T,
|
|
993
|
+
onOpening: b,
|
|
994
|
+
onOpen: x,
|
|
995
|
+
onClosing: v,
|
|
996
|
+
onClose: y,
|
|
997
|
+
...c,
|
|
998
|
+
children: E
|
|
999
|
+
});
|
|
1000
|
+
}));
|
|
1001
|
+
$e.displayName = "ExhibitFloatPanel";
|
|
1002
|
+
var et = (e) => P($e, { ...e }), tt = (e) => P(me, {
|
|
1003
|
+
renderFloatPanel: et,
|
|
1004
|
+
createPopupPanel: Ze,
|
|
1005
|
+
...e
|
|
1006
|
+
}), nt = B(R((e, t) => {
|
|
1007
|
+
let { nestedChildren: n, variant: r, disabled: i, createPopupPanel: a, ...o } = e, s = {
|
|
1008
|
+
disabled: i,
|
|
1009
|
+
createPopupPanel: Z((e) => {
|
|
1010
|
+
if (!n || n.length === 0) return P(N, {});
|
|
1011
|
+
let { popupContainer: r, floatReference: i, ref: a, ...o } = e, s = [];
|
|
1012
|
+
for (let e = 0; e < n.length; e++) {
|
|
1013
|
+
let t = n[e];
|
|
1014
|
+
t && s.push(P(nt, {
|
|
1015
|
+
...o,
|
|
1016
|
+
...t
|
|
1017
|
+
}, e));
|
|
1018
|
+
}
|
|
1019
|
+
return F(T, {
|
|
1020
|
+
ref: t,
|
|
1021
|
+
sx: {
|
|
1022
|
+
display: "flex",
|
|
1023
|
+
flexDirection: "column",
|
|
1024
|
+
paddingTop: "4px",
|
|
1025
|
+
paddingBottom: "4px"
|
|
1026
|
+
},
|
|
1027
|
+
children: [
|
|
1028
|
+
"Children here",
|
|
1029
|
+
s,
|
|
1030
|
+
P(ut, { children: "Close other children" })
|
|
1031
|
+
]
|
|
1032
|
+
});
|
|
1033
|
+
}, [n]),
|
|
1034
|
+
...o
|
|
1035
|
+
};
|
|
1036
|
+
return P(r === Xe.Toolbar ? ft : ht, { ...s });
|
|
1037
|
+
})), rt = { placement: "right-start" }, it = B(R((e, t) => {
|
|
1038
|
+
let { children: n, sx: r, parentFloat: i, createPopupPanel: a, propsPopper: o = rt, label: s, ...c } = e;
|
|
1039
|
+
(function(e) {
|
|
1040
|
+
if (!e) throw Error("Invariant failed");
|
|
1041
|
+
})(se(n));
|
|
1042
|
+
let l = n, u = W(() => ({
|
|
1043
|
+
...l?.props,
|
|
1044
|
+
...c,
|
|
1045
|
+
onContextMenu: (e) => {
|
|
1046
|
+
l?.props?.onContextMenu?.(e), e.isDefaultPrevented() || (c?.onContextMenu?.(e), e.isDefaultPrevented() || (p(e), e.preventDefault()));
|
|
1047
|
+
}
|
|
1048
|
+
}), [c, l?.props]), d = Z(a ?? (() => {}), [a]), [f, p] = K(null), { reference: m, component: h } = xe({
|
|
1049
|
+
label: s ?? "contextMenu",
|
|
1050
|
+
propsPopper: o,
|
|
1051
|
+
parentFloat: i,
|
|
1052
|
+
anchor: { getBoundingClientRect: () => new DOMRect(f?.clientX || 0, f?.clientY || 0) },
|
|
1053
|
+
onClose: () => p(null),
|
|
1054
|
+
createPopupPanel: d
|
|
1055
|
+
});
|
|
1056
|
+
return H(() => {
|
|
1057
|
+
f ? m.open(0) : m.close(0);
|
|
1058
|
+
}, [f]), F(N, { children: [ae(n, u), h] });
|
|
1059
|
+
})), at = P(Y, {}), ot = P(Y, { iconKey: "Check" }), st = B(R((e, t) => {
|
|
1060
|
+
let { dense: r = !0, outlined: a = !1, disableHover: o = !1, selected: s, icon: c, propsTooltip: l, children: u, primary: d, sx: f, disabled: p, className: m, onFocus: h, onBlur: g, ..._ } = e, [y, b] = K(!1), x = {
|
|
1061
|
+
marginRight: "0px",
|
|
1062
|
+
padding: r ? "2px" : "7px",
|
|
1063
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1064
|
+
color: (e) => d ? void 0 : e.palette.text.icon ?? e.palette.action.active,
|
|
1065
|
+
border: (e) => `solid ${a ? e.palette.divider : "transparent"} 1px`,
|
|
1066
|
+
"& .MuiTouchRipple-child": { borderRadius: (e) => `${e.shape.borderRadius}px !important` },
|
|
1067
|
+
"&.Mui-selected": {
|
|
1068
|
+
backgroundColor: (e) => q(e.palette.text.primary, e.palette.action.selectedOpacity),
|
|
1069
|
+
border: (e) => `solid ${a ? e.palette.text?.primary : e.palette.divider} 1px`
|
|
1070
|
+
},
|
|
1071
|
+
"&.Mui-disabled": { border: (e) => `solid ${a ? e.palette.divider : "transparent"} 1px` },
|
|
1072
|
+
"&.Mui-disabled > .icon path": {
|
|
1073
|
+
filter: "grayscale(65%)",
|
|
1074
|
+
opacity: ".8"
|
|
1075
|
+
},
|
|
1076
|
+
"&.Mui-focusVisible": {
|
|
1077
|
+
outline: "solid transparent 1px",
|
|
1078
|
+
border: "1px solid transparent"
|
|
1079
|
+
},
|
|
1080
|
+
...f
|
|
1081
|
+
}, S = {
|
|
1082
|
+
"&:hover:not(.Mui-disabled, [disabled])": {
|
|
1083
|
+
color: (e) => e.palette.text.primary,
|
|
1084
|
+
border: (e) => `solid ${a ? e.palette.text?.primary : e.palette.divider} 1px`,
|
|
1085
|
+
"&.Mui-selected": { backgroundColor: (e) => q(e.palette.text.primary, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity) },
|
|
1086
|
+
"> .outline-hover": { outline: (e) => `solid ${a ? e.palette.text?.primary : e.palette.divider} 1px` },
|
|
1087
|
+
backgroundColor: null
|
|
1088
|
+
},
|
|
1089
|
+
"&.Mui-focusVisible": {
|
|
1090
|
+
outline: (e) => `solid ${e.palette.primary.main} 1px`,
|
|
1091
|
+
border: (e) => `1px solid ${e.palette?.primary?.main}`,
|
|
1092
|
+
zIndex: 1
|
|
1093
|
+
}
|
|
1094
|
+
}, C = x;
|
|
1095
|
+
o || (C = ue.mergeContentful(x, S));
|
|
1096
|
+
let w = W(() => {
|
|
1097
|
+
let e = typeof c == "function" ? c() : c;
|
|
1098
|
+
return e === null ? e : e || (s === void 0 ? at : ot);
|
|
1099
|
+
}, [c, s]), E = F(D, {
|
|
1100
|
+
component: "div",
|
|
1101
|
+
ref: t,
|
|
1102
|
+
className: n({
|
|
1103
|
+
"Mui-focusVisible": y,
|
|
1104
|
+
"Mui-selected": s,
|
|
1105
|
+
"Mui-disabled": p
|
|
1106
|
+
}, m),
|
|
1107
|
+
onFocus: (e) => {
|
|
1108
|
+
b(!0), h?.(e);
|
|
1109
|
+
},
|
|
1110
|
+
onBlur: (e) => {
|
|
1111
|
+
b(!1), g?.(e);
|
|
1112
|
+
},
|
|
1113
|
+
size: "small",
|
|
1114
|
+
TouchRippleProps: { center: !1 },
|
|
1115
|
+
sx: C,
|
|
1116
|
+
edge: "end",
|
|
1117
|
+
..._,
|
|
1118
|
+
disabled: p || !1,
|
|
1119
|
+
children: [w, u]
|
|
1120
|
+
});
|
|
1121
|
+
if (l) if (l.simple && l.label && !l.disabled) {
|
|
1122
|
+
let { label: e, description: t, maxWidth: n, shortcut: r, useModifierSymbols: i, componentDisabled: a, simple: o, chips: s, ref: c, ...u } = l;
|
|
1123
|
+
E = P(v, {
|
|
1124
|
+
disableInteractive: !0,
|
|
1125
|
+
title: e ?? "",
|
|
1126
|
+
...u,
|
|
1127
|
+
children: P(T, {
|
|
1128
|
+
sx: { display: "flex" },
|
|
1129
|
+
children: E
|
|
1130
|
+
})
|
|
1131
|
+
});
|
|
1132
|
+
} else E = P(i, {
|
|
1133
|
+
children: E,
|
|
1134
|
+
...l
|
|
1135
|
+
});
|
|
1136
|
+
return E;
|
|
1137
|
+
})), ct = P(Y, {}), lt = (e) => e.icon, ut = B(R((e, t) => {
|
|
1138
|
+
let { icon: r = ct, renderIcon: a = lt, className: o, onFocus: s, selected: c, onBlur: l, onMouseOver: u, onMouseOut: d, onMouseEnter: f, disabled: p, children: m, sx: h, propsTooltip: g, chips: _, primary: v, ...y } = e, b = be(), [x, S] = K(!1), [w, T] = K(!1), E = W(() => {
|
|
1139
|
+
let e = a?.({
|
|
1140
|
+
icon: r,
|
|
1141
|
+
disabled: p,
|
|
1142
|
+
selected: c
|
|
1143
|
+
});
|
|
1144
|
+
return e ? P(k, {
|
|
1145
|
+
className: n({
|
|
1146
|
+
"Mui-focusVisible": x,
|
|
1147
|
+
"Mui-hovered": w
|
|
1148
|
+
}),
|
|
1149
|
+
sx: {
|
|
1150
|
+
"& .MuiSvgIcon-root": { color: (e) => v ? void 0 : e.palette.text.icon ?? e.palette.action.active },
|
|
1151
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (e) => e.palette.text.primary } }
|
|
1152
|
+
},
|
|
1153
|
+
children: e
|
|
1154
|
+
}) : null;
|
|
1155
|
+
}, [
|
|
1156
|
+
a,
|
|
1157
|
+
p,
|
|
1158
|
+
r,
|
|
1159
|
+
x,
|
|
1160
|
+
w,
|
|
1161
|
+
v,
|
|
1162
|
+
c
|
|
1163
|
+
]), D = F(te, {
|
|
1164
|
+
ref: t,
|
|
1165
|
+
role: "menuitem",
|
|
1166
|
+
disabled: p,
|
|
1167
|
+
onMouseOver: (e) => {
|
|
1168
|
+
u?.(e), e.isDefaultPrevented() || T(!0);
|
|
1169
|
+
},
|
|
1170
|
+
onMouseOut: (e) => {
|
|
1171
|
+
d?.(e), e.isDefaultPrevented() || T(!1);
|
|
1172
|
+
},
|
|
1173
|
+
onMouseEnter: (e) => {
|
|
1174
|
+
f?.(e), e.isDefaultPrevented() || b?.closeChild();
|
|
1175
|
+
},
|
|
1176
|
+
TouchRippleProps: { center: !1 },
|
|
1177
|
+
className: n({
|
|
1178
|
+
"Mui-focusVisible": x,
|
|
1179
|
+
"Mui-hovered": w
|
|
1180
|
+
}, o),
|
|
1181
|
+
onFocus: (e) => {
|
|
1182
|
+
s?.(e), S(!0);
|
|
1183
|
+
},
|
|
1184
|
+
onBlur: (e) => {
|
|
1185
|
+
l?.(e), S(!1);
|
|
1186
|
+
},
|
|
1187
|
+
sx: {
|
|
1188
|
+
flex: "1 1 100%",
|
|
1189
|
+
fontFamily: (e) => e.typography.fontFamily,
|
|
1190
|
+
fontWeight: 400,
|
|
1191
|
+
lineHeight: 1.5,
|
|
1192
|
+
paddingTop: "2px",
|
|
1193
|
+
paddingBottom: "2px",
|
|
1194
|
+
marginLeft: "4px",
|
|
1195
|
+
marginRight: "4px",
|
|
1196
|
+
paddingLeft: "6px",
|
|
1197
|
+
paddingRight: "18px",
|
|
1198
|
+
borderRadius: "4px",
|
|
1199
|
+
fontSize: "0.875em",
|
|
1200
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
1201
|
+
"&.Mui-disabled > .icon path": { filter: "grayscale(65%)" },
|
|
1202
|
+
"&.Mui-selected": { color: (e) => e.palette.text.primary },
|
|
1203
|
+
color: (e) => e.palette.text.secondary,
|
|
1204
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
1205
|
+
...h
|
|
1206
|
+
},
|
|
1207
|
+
...y,
|
|
1208
|
+
children: [
|
|
1209
|
+
E,
|
|
1210
|
+
m,
|
|
1211
|
+
_ ? P(C, { chips: _ }) : null
|
|
1212
|
+
]
|
|
1213
|
+
});
|
|
1214
|
+
return g && (D = P(i, {
|
|
1215
|
+
children: D,
|
|
1216
|
+
placement: "right-start",
|
|
1217
|
+
...g
|
|
1218
|
+
})), D;
|
|
1219
|
+
})), dt = B(R((e, t) => {
|
|
1220
|
+
let { children: n, sx: r, primary: i = !1, variant: a = "subtitle1", ...o } = e;
|
|
1221
|
+
return P(N, { children: P(M, {
|
|
1222
|
+
ref: t,
|
|
1223
|
+
variant: a,
|
|
1224
|
+
component: "div",
|
|
1225
|
+
sx: {
|
|
1226
|
+
userSelect: "none",
|
|
1227
|
+
fontWeight: "500",
|
|
1228
|
+
paddingLeft: "8px",
|
|
1229
|
+
paddingTop: a === "subtitle1" ? "2px" : void 0,
|
|
1230
|
+
paddingBottom: a === "subtitle1" ? "2px" : void 0,
|
|
1231
|
+
color: (e) => i ? void 0 : e.palette.text.secondary,
|
|
1232
|
+
...r
|
|
1233
|
+
},
|
|
1234
|
+
...o,
|
|
1235
|
+
children: n
|
|
1236
|
+
}) });
|
|
1237
|
+
})), ft = B(R((e, t) => {
|
|
1238
|
+
let { dense: r = !0, outlined: i = !1, label: a, showLabel: o = !1, selected: s = !1, onQuickClick: c, parentFloat: l, createPopupPanel: u, propsPopup: d, onPopupOpen: f, onPopupClose: p, propsQuickButton: m, renderQuickButton: h, tooltip: g = "", createTooltip: _, icon: y, disabled: b, propsButton: x = ue.EmptyObject, disableHover: S, ripple: C, primary: w, children: E, sx: ee, className: O, ...te } = e, k = ne(), A = W(() => {
|
|
1239
|
+
let e = (e, t, n, r = n) => {
|
|
1240
|
+
let a = typeof i == "boolean" ? null : i[e];
|
|
1241
|
+
return typeof a == "function" ? a(t) : a || (i ? n : r);
|
|
1242
|
+
};
|
|
1243
|
+
return {
|
|
1244
|
+
outline: {
|
|
1245
|
+
color: (t) => e("color", t, t.palette.divider, "transparent"),
|
|
1246
|
+
hoverColor: (t) => e("hoverColor", t, t.palette.text?.primary, t.palette.divider),
|
|
1247
|
+
focusColor: (t) => e("focusColor", t, t.palette?.primary?.main)
|
|
1248
|
+
},
|
|
1249
|
+
active: k.palette.mode === "dark" ? k.palette.text.secondary : k.palette.text.primary,
|
|
1250
|
+
text: k.palette.text.icon ?? k.palette.action.active
|
|
1251
|
+
};
|
|
1252
|
+
}, [i, k]), [j, M] = K(!1), [I, re] = K(!1), [ie, L] = K(!1), ae = G(null), oe = G(null), R = xe({
|
|
1253
|
+
anchor: ae.current,
|
|
1254
|
+
label: a,
|
|
1255
|
+
createPopupPanel: u,
|
|
1256
|
+
parentFloat: l,
|
|
1257
|
+
propsPopper: d?.propsPopper,
|
|
1258
|
+
onClose: () => {
|
|
1259
|
+
M(!1), p?.();
|
|
1260
|
+
},
|
|
1261
|
+
onOpen: () => {
|
|
1262
|
+
M(!0), f?.();
|
|
1263
|
+
}
|
|
1264
|
+
}), se = Z((e) => {
|
|
1265
|
+
c?.(e), R.reference.close(0);
|
|
1266
|
+
}, [c, R]), z = Z(() => {
|
|
1267
|
+
j ? R.reference.close(0) : R.reference.open(0);
|
|
1268
|
+
}, [
|
|
1269
|
+
j,
|
|
1270
|
+
R,
|
|
1271
|
+
l,
|
|
1272
|
+
a
|
|
1273
|
+
]), B = W(() => {
|
|
1274
|
+
let e = {
|
|
1275
|
+
"&.bordered": {
|
|
1276
|
+
borderWidth: "1px",
|
|
1277
|
+
borderRadius: "0px",
|
|
1278
|
+
borderTopStyle: "solid",
|
|
1279
|
+
borderBottomStyle: "solid",
|
|
1280
|
+
borderColor: (e) => A.outline.color(e),
|
|
1281
|
+
"&.Mui-focusVisible": { border: (e) => `1px solid ${A.outline.focusColor(e)} !important` },
|
|
1282
|
+
"&:hover:not(.Mui-disabled, [disabled])": {
|
|
1283
|
+
borderColor: () => S ? "transparent" : void 0,
|
|
1284
|
+
backgroundColor: () => S ? "transparent" : void 0
|
|
1285
|
+
},
|
|
1286
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e) => A.outline.hoverColor(e) },
|
|
1287
|
+
"&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e) => A.outline.hoverColor(e) },
|
|
1288
|
+
"&.left": {
|
|
1289
|
+
borderTopLeftRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1290
|
+
borderBottomLeftRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1291
|
+
borderLeftStyle: "solid"
|
|
1292
|
+
},
|
|
1293
|
+
"&.hard-right": {
|
|
1294
|
+
borderRightStyle: "solid",
|
|
1295
|
+
borderRightWidth: "1px",
|
|
1296
|
+
borderRightColor: (e) => A.outline.color(e)
|
|
1297
|
+
},
|
|
1298
|
+
"&.right": {
|
|
1299
|
+
borderTopRightRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1300
|
+
borderBottomRightRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1301
|
+
borderRightStyle: "solid"
|
|
1302
|
+
},
|
|
1303
|
+
"&.divider": { borderLeftWidth: "0px !important" }
|
|
1304
|
+
},
|
|
1305
|
+
"& .MuiTouchRipple-child": { borderRadius: (e) => `${e.shape.borderRadius}px !important` }
|
|
1306
|
+
}, t = { "&.Mui-selected": {
|
|
1307
|
+
backgroundColor: (e) => q(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
1308
|
+
"&:hover:not(.Mui-disabled)": {
|
|
1309
|
+
backgroundColor: (e) => q(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
1310
|
+
"@media (hover: none)": { backgroundColor: (e) => q(e.palette.primary.main, e.palette.action.selectedOpacity) }
|
|
1311
|
+
}
|
|
1312
|
+
} }, n = {
|
|
1313
|
+
maxHeight: "100%",
|
|
1314
|
+
"&.Mui-selected": {
|
|
1315
|
+
backgroundColor: (e) => q(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity),
|
|
1316
|
+
"&:hover:not(.Mui-disabled)": {
|
|
1317
|
+
backgroundColor: (e) => q(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
1318
|
+
"@media (hover: none)": { backgroundColor: (e) => q(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity) }
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
"&:hover:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
1322
|
+
backgroundColor: () => S ? "transparent" : void 0,
|
|
1323
|
+
color: (e) => e.palette.text.icon,
|
|
1324
|
+
"&.Mui-disabled > .icon path": {
|
|
1325
|
+
filter: "grayscale(65%)",
|
|
1326
|
+
opacity: ".8"
|
|
1327
|
+
},
|
|
1328
|
+
padding: () => r ? "2px 3px" : "7px",
|
|
1329
|
+
marginRight: "0"
|
|
1330
|
+
}, i = ue.mergeContentful(n, e), a = ue.mergeContentful(i, t), o = ue.mergeContentful(n, e);
|
|
1331
|
+
return {
|
|
1332
|
+
quickButtonStyling: i,
|
|
1333
|
+
openQuickButtonStyling: a,
|
|
1334
|
+
compoundStyling: o,
|
|
1335
|
+
openCompoundStyling: ue.mergeContentful(o, t)
|
|
1336
|
+
};
|
|
1337
|
+
}, [A, S]), V = Z((e) => {
|
|
1338
|
+
let { children: t, ref: n, ...r } = e;
|
|
1339
|
+
return P(v, {
|
|
1340
|
+
ref: n,
|
|
1341
|
+
...r,
|
|
1342
|
+
disableInteractive: !0,
|
|
1343
|
+
children: t
|
|
1344
|
+
});
|
|
1345
|
+
}, []), ce = c || h, H = ce && (m?.tooltip || m?.createTooltip), U = (e) => {
|
|
1346
|
+
let { tooltip: t, createTooltip: n, sx: r, ...i } = e, a = P(D, {
|
|
1347
|
+
sx: { ...r },
|
|
1348
|
+
component: "div",
|
|
1349
|
+
...i
|
|
1350
|
+
});
|
|
1351
|
+
return H && (a = (n ?? V)({
|
|
1352
|
+
title: j ? "" : t ?? g,
|
|
1353
|
+
children: P("div", { children: a })
|
|
1354
|
+
}, j)), a;
|
|
1355
|
+
}, le = { onKeyDown: (e) => {
|
|
1356
|
+
e.keyCode === X.Space ? z() : e.keyCode === X.F4 || e.keyCode === X.Down ? R.reference.open(0) : e.keyCode === X.Up && R.reference.close(0);
|
|
1357
|
+
} }, de = P(N, {}), J = W(() => Ee((typeof y == "function" ? y() : y) ?? (ce ? pt : null), o ? a : null), [
|
|
1358
|
+
y,
|
|
1359
|
+
a,
|
|
1360
|
+
o,
|
|
1361
|
+
ce
|
|
1362
|
+
]);
|
|
1363
|
+
if (ce) {
|
|
1364
|
+
let e = j ? B.openQuickButtonStyling : B.quickButtonStyling, t = (h || U)({
|
|
1365
|
+
tabIndex: -1,
|
|
1366
|
+
disabled: b,
|
|
1367
|
+
size: "small",
|
|
1368
|
+
edge: "end",
|
|
1369
|
+
onMouseEnter: () => {
|
|
1370
|
+
R.reference.parent?.closeChild();
|
|
1371
|
+
},
|
|
1372
|
+
onMouseDown: (e) => {
|
|
1373
|
+
e.button === 0 && (e.preventDefault(), se(e));
|
|
1374
|
+
},
|
|
1375
|
+
disableRipple: !!C,
|
|
1376
|
+
children: F(N, { children: [J, C] }),
|
|
1377
|
+
...m,
|
|
1378
|
+
className: n({
|
|
1379
|
+
"Mui-focusVisible": I || j,
|
|
1380
|
+
"Mui-selected": s,
|
|
1381
|
+
"Mui-hovered": ie || j,
|
|
1382
|
+
"Mui-disabled": b,
|
|
1383
|
+
bordered: !0,
|
|
1384
|
+
left: !0,
|
|
1385
|
+
"hard-right": !0
|
|
1386
|
+
}, m?.className),
|
|
1387
|
+
sx: {
|
|
1388
|
+
...B.quickButtonStyling,
|
|
1389
|
+
height: "100%",
|
|
1390
|
+
...m?.sx
|
|
1391
|
+
}
|
|
1392
|
+
}), i = Qe(!0, r, j);
|
|
1393
|
+
H && (i = (_ ?? V)({
|
|
1394
|
+
title: j ? "" : g,
|
|
1395
|
+
children: i
|
|
1396
|
+
}, j)), de = F(N, { children: [t, P(D, {
|
|
1397
|
+
ref: oe,
|
|
1398
|
+
component: "div",
|
|
1399
|
+
className: n({
|
|
1400
|
+
"Mui-selected": j,
|
|
1401
|
+
"Mui-hovered": ie || j,
|
|
1402
|
+
"Mui-disabled": b,
|
|
1403
|
+
"Mui-focusVisible": I || j,
|
|
1404
|
+
bordered: !0,
|
|
1405
|
+
right: !0,
|
|
1406
|
+
divider: !0
|
|
1407
|
+
}),
|
|
1408
|
+
sx: {
|
|
1409
|
+
paddingLeft: (r ? 0 : 2) + "px",
|
|
1410
|
+
paddingRight: (r ? 0 : 2) + "px",
|
|
1411
|
+
width: () => "calc(var(--icon-size, 1.25em) * 0.8)",
|
|
1412
|
+
...B.quickButtonStyling,
|
|
1413
|
+
...e
|
|
1414
|
+
},
|
|
1415
|
+
TouchRippleProps: { center: !1 },
|
|
1416
|
+
tabIndex: -1,
|
|
1417
|
+
disabled: b,
|
|
1418
|
+
size: "small",
|
|
1419
|
+
edge: "end",
|
|
1420
|
+
onMouseDown: (e) => {
|
|
1421
|
+
e.button === 0 && (e.preventDefault(), z());
|
|
1422
|
+
},
|
|
1423
|
+
children: i
|
|
1424
|
+
})] });
|
|
1425
|
+
} else {
|
|
1426
|
+
let e = j ? B.openCompoundStyling : B.compoundStyling;
|
|
1427
|
+
de = P(st, {
|
|
1428
|
+
ref: oe,
|
|
1429
|
+
tabIndex: -1,
|
|
1430
|
+
disabled: b,
|
|
1431
|
+
size: "small",
|
|
1432
|
+
icon: J,
|
|
1433
|
+
className: n({
|
|
1434
|
+
"Mui-selected": j || s,
|
|
1435
|
+
"Mui-hovered": ie,
|
|
1436
|
+
"Mui-disabled": b,
|
|
1437
|
+
"Mui-focusVisible": I || j,
|
|
1438
|
+
bordered: !0,
|
|
1439
|
+
left: !0,
|
|
1440
|
+
right: !0
|
|
1441
|
+
}),
|
|
1442
|
+
sx: {
|
|
1443
|
+
...B.quickButtonStyling,
|
|
1444
|
+
...e
|
|
1445
|
+
},
|
|
1446
|
+
onMouseDown: (e) => {
|
|
1447
|
+
e.button === 0 && (e.preventDefault(), z());
|
|
1448
|
+
},
|
|
1449
|
+
children: Qe(!1, r, j)
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
let { className: fe, sx: Y, ...pe } = x, me = P(T, {
|
|
1453
|
+
onFocus: () => re(!0),
|
|
1454
|
+
onBlur: () => re(!1),
|
|
1455
|
+
onMouseOver: () => L(!0),
|
|
1456
|
+
onMouseOut: () => L(!1),
|
|
1457
|
+
...le,
|
|
1458
|
+
"aria-label": "split button",
|
|
1459
|
+
ref: ae,
|
|
1460
|
+
tabIndex: b ? void 0 : 0,
|
|
1461
|
+
className: n(fe, "split-button-root", {
|
|
1462
|
+
"Mui-focusVisible": I || j,
|
|
1463
|
+
"Mui-selected": j || s,
|
|
1464
|
+
"Mui-hovered": ie,
|
|
1465
|
+
"Mui-disabled": b
|
|
1466
|
+
}),
|
|
1467
|
+
sx: {
|
|
1468
|
+
display: "flex",
|
|
1469
|
+
flex: "1 1 100%",
|
|
1470
|
+
alignItems: "stretch",
|
|
1471
|
+
width: "fit-content",
|
|
1472
|
+
"&:not(.Mui-disabled)": { cursor: "pointer" },
|
|
1473
|
+
marginLeft: i ? "1px" : "0px",
|
|
1474
|
+
marginRight: i ? "1px" : "0px",
|
|
1475
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1476
|
+
"&.Mui-focusVisible": {
|
|
1477
|
+
outline: (e) => `solid ${e.palette.primary.main} 1px`,
|
|
1478
|
+
zIndex: 2
|
|
1479
|
+
},
|
|
1480
|
+
...Y
|
|
1481
|
+
},
|
|
1482
|
+
...pe,
|
|
1483
|
+
children: de
|
|
1484
|
+
});
|
|
1485
|
+
return H || (me = (_ ?? V)({
|
|
1486
|
+
title: j ? "" : g,
|
|
1487
|
+
children: me
|
|
1488
|
+
}, j)), F(T, {
|
|
1489
|
+
className: n(O, "popupIconButton"),
|
|
1490
|
+
ref: t,
|
|
1491
|
+
...te,
|
|
1492
|
+
sx: {
|
|
1493
|
+
zIndex: I || j ? 2 : void 0,
|
|
1494
|
+
display: "flex",
|
|
1495
|
+
alignItems: "center",
|
|
1496
|
+
...ee
|
|
1497
|
+
},
|
|
1498
|
+
children: [me, R.component]
|
|
1499
|
+
});
|
|
1500
|
+
}));
|
|
1501
|
+
ft.displayName = "ExhibitPopupIconButton";
|
|
1502
|
+
var pt = P(Y, { iconKey: "Check" }), mt = {}, ht = B(R((e, t) => {
|
|
1503
|
+
let { selected: r = !1, label: i, showLabel: a, onQuickClick: o, parentFloat: s, createPopupPanel: c, propsPopup: l = mt, onPopupOpen: u, onPopupClose: d, propsQuickButton: f, renderQuickButton: p, tooltip: m = "", createTooltip: h, icon: g, disabled: _, ripple: y, primary: b, children: S, sx: C, ...w } = e, [D, ee] = K(!1), [O, k] = K(!1), [A, j] = K(!1), [M, ne] = K(!1), I = G(null), re = G(null), ie = W(() => {
|
|
1504
|
+
if (!l) return;
|
|
1505
|
+
let { propsPopper: e } = l;
|
|
1506
|
+
return {
|
|
1507
|
+
placement: "right-start",
|
|
1508
|
+
offsets: [-4, -2],
|
|
1509
|
+
...e
|
|
1510
|
+
};
|
|
1511
|
+
}, [l]), L = xe({
|
|
1512
|
+
anchor: I.current,
|
|
1513
|
+
label: i,
|
|
1514
|
+
createPopupPanel: c,
|
|
1515
|
+
parentFloat: s,
|
|
1516
|
+
propsPopper: ie,
|
|
1517
|
+
onClose: () => {
|
|
1518
|
+
ee(!1), d?.();
|
|
1519
|
+
},
|
|
1520
|
+
onOpen: () => {
|
|
1521
|
+
ee(!0), u?.();
|
|
1522
|
+
}
|
|
1523
|
+
}), ae = Z((e) => {
|
|
1524
|
+
e.button === 0 && (o?.(e), L.reference.close(0));
|
|
1525
|
+
}, [o]), oe = P(x, {}), R = { "&.Mui-selected": {
|
|
1526
|
+
color: (e) => e.palette.text.primary,
|
|
1527
|
+
"& svg * ": { color: (e) => e.palette.text.primary }
|
|
1528
|
+
} }, se = V((e) => {
|
|
1529
|
+
let { children: t, ref: n, ...r } = e;
|
|
1530
|
+
return P(v, {
|
|
1531
|
+
ref: n,
|
|
1532
|
+
...r,
|
|
1533
|
+
disableInteractive: !0,
|
|
1534
|
+
children: t
|
|
1535
|
+
});
|
|
1536
|
+
}, []), z = o || p, B = (e) => {
|
|
1537
|
+
let { tooltip: t, createTooltip: r, ...a } = e;
|
|
1538
|
+
return F(ut, {
|
|
1539
|
+
icon: g,
|
|
1540
|
+
disableRipple: !!y,
|
|
1541
|
+
className: n({ "Mui-hovered": A }),
|
|
1542
|
+
sx: {
|
|
1543
|
+
flex: "1 1 100%",
|
|
1544
|
+
...R
|
|
1545
|
+
},
|
|
1546
|
+
...a,
|
|
1547
|
+
children: [i, y]
|
|
1548
|
+
});
|
|
1549
|
+
}, ce = {
|
|
1550
|
+
onFocus: () => {
|
|
1551
|
+
k(!0);
|
|
1552
|
+
},
|
|
1553
|
+
onBlur: () => k(!1),
|
|
1554
|
+
onMouseOver: () => {
|
|
1555
|
+
j(!0);
|
|
1556
|
+
},
|
|
1557
|
+
onMouseLeave: () => {
|
|
1558
|
+
j(!1);
|
|
1559
|
+
},
|
|
1560
|
+
onMouseEnter: (e) => {
|
|
1561
|
+
e.preventDefault(), L.reference.open();
|
|
1562
|
+
},
|
|
1563
|
+
onMouseDown: (e) => {
|
|
1564
|
+
e.button === 0 && e.preventDefault();
|
|
1565
|
+
}
|
|
1566
|
+
}, H = P(N, {});
|
|
1567
|
+
if (z) {
|
|
1568
|
+
let e = {
|
|
1569
|
+
tabIndex: -1,
|
|
1570
|
+
disabled: _,
|
|
1571
|
+
onMouseEnter: () => {
|
|
1572
|
+
L.reference.parent?.closeChild();
|
|
1573
|
+
},
|
|
1574
|
+
onMouseDown: (e) => {
|
|
1575
|
+
e.button === 0 && (e.preventDefault(), ae(e));
|
|
1576
|
+
},
|
|
1577
|
+
className: n("quick-left", {}, f?.className),
|
|
1578
|
+
...f
|
|
1579
|
+
};
|
|
1580
|
+
H = F(N, { children: [
|
|
1581
|
+
(p || B)(e),
|
|
1582
|
+
P(E, {
|
|
1583
|
+
sx: {
|
|
1584
|
+
ml: "0px",
|
|
1585
|
+
mr: "0px"
|
|
1586
|
+
},
|
|
1587
|
+
orientation: "vertical",
|
|
1588
|
+
variant: "middle",
|
|
1589
|
+
flexItem: !0
|
|
1590
|
+
}),
|
|
1591
|
+
P(te, {
|
|
1592
|
+
ref: re,
|
|
1593
|
+
className: n({
|
|
1594
|
+
"Mui-selected": D,
|
|
1595
|
+
"Mui-hovered": A
|
|
1596
|
+
}),
|
|
1597
|
+
sx: {
|
|
1598
|
+
borderTopLeftRadius: "0px",
|
|
1599
|
+
borderBottomLeftRadius: "0px",
|
|
1600
|
+
borderTopRightRadius: "4px",
|
|
1601
|
+
borderBottomRightRadius: "4px",
|
|
1602
|
+
padding: "0",
|
|
1603
|
+
paddingTop: "2px",
|
|
1604
|
+
paddingBottom: "2px",
|
|
1605
|
+
marginLeft: "0px",
|
|
1606
|
+
marginRight: "6px",
|
|
1607
|
+
color: (e) => b ? void 0 : e.palette.text.secondary,
|
|
1608
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
1609
|
+
...R
|
|
1610
|
+
},
|
|
1611
|
+
tabIndex: -1,
|
|
1612
|
+
disabled: _,
|
|
1613
|
+
...ce,
|
|
1614
|
+
children: P(T, {
|
|
1615
|
+
className: "expand-icon",
|
|
1616
|
+
sx: {
|
|
1617
|
+
flex: "none",
|
|
1618
|
+
display: "flex",
|
|
1619
|
+
border: "1px solid transparent",
|
|
1620
|
+
paddingTop: "1px",
|
|
1621
|
+
paddingBottom: "1px",
|
|
1622
|
+
color: (e) => b ? void 0 : e.palette.text.icon ?? e.palette.action.active
|
|
1623
|
+
},
|
|
1624
|
+
onMouseOver: (e) => {
|
|
1625
|
+
e.preventDefault(), ne(!0);
|
|
1626
|
+
},
|
|
1627
|
+
onMouseLeave: () => {
|
|
1628
|
+
ne(!1);
|
|
1629
|
+
},
|
|
1630
|
+
onClick: (e) => {
|
|
1631
|
+
e.preventDefault(), D ? L.reference.close() : L.reference.open();
|
|
1632
|
+
},
|
|
1633
|
+
children: oe
|
|
1634
|
+
})
|
|
1635
|
+
})
|
|
1636
|
+
] });
|
|
1637
|
+
} else H = F(ut, {
|
|
1638
|
+
ref: re,
|
|
1639
|
+
tabIndex: -1,
|
|
1640
|
+
disabled: _,
|
|
1641
|
+
icon: g,
|
|
1642
|
+
className: n({
|
|
1643
|
+
"Mui-selected": D || r,
|
|
1644
|
+
"Mui-hovered": A
|
|
1645
|
+
}),
|
|
1646
|
+
sx: {
|
|
1647
|
+
flex: "1 1 100%",
|
|
1648
|
+
paddingRight: "0px",
|
|
1649
|
+
...R
|
|
1650
|
+
},
|
|
1651
|
+
onClick: (e) => {
|
|
1652
|
+
e.preventDefault(), D ? L.reference.close() : L.reference.open();
|
|
1653
|
+
},
|
|
1654
|
+
...ce,
|
|
1655
|
+
children: [P("div", {
|
|
1656
|
+
style: { flex: "1 1 100%" },
|
|
1657
|
+
children: i
|
|
1658
|
+
}), P(T, {
|
|
1659
|
+
className: "expand-icon",
|
|
1660
|
+
sx: {
|
|
1661
|
+
flex: "none",
|
|
1662
|
+
display: "flex",
|
|
1663
|
+
color: (e) => b ? void 0 : e.palette.text.icon ?? e.palette.action.active
|
|
1664
|
+
},
|
|
1665
|
+
children: oe
|
|
1666
|
+
})]
|
|
1667
|
+
});
|
|
1668
|
+
let U = P(T, {
|
|
1669
|
+
"aria-label": "split button",
|
|
1670
|
+
ref: I,
|
|
1671
|
+
tabIndex: _ ? void 0 : 0,
|
|
1672
|
+
className: n({
|
|
1673
|
+
"Mui-disabled": _,
|
|
1674
|
+
"Mui-selected": D,
|
|
1675
|
+
"Mui-focusVisible": O || D,
|
|
1676
|
+
"Mui-hovered": A
|
|
1677
|
+
}),
|
|
1678
|
+
sx: {
|
|
1679
|
+
display: "flex",
|
|
1680
|
+
flex: "1 1 100%",
|
|
1681
|
+
alignItems: "center",
|
|
1682
|
+
width: "fit-content",
|
|
1683
|
+
"& .quick-left": {
|
|
1684
|
+
borderTopRightRadius: "0px",
|
|
1685
|
+
borderBottomRightRadius: "0px",
|
|
1686
|
+
marginRight: "-1px"
|
|
1687
|
+
},
|
|
1688
|
+
"&.Mui-disabled > .icon path": { filter: "grayscale(65%)" },
|
|
1689
|
+
...C
|
|
1690
|
+
},
|
|
1691
|
+
...w,
|
|
1692
|
+
children: H
|
|
1693
|
+
});
|
|
1694
|
+
return z && !M && (f?.tooltip || f?.createTooltip) && (U = (f?.createTooltip ?? se)({
|
|
1695
|
+
title: D ? "" : U ?? f?.tooltip,
|
|
1696
|
+
children: U
|
|
1697
|
+
}, D)), F(T, {
|
|
1698
|
+
ref: t,
|
|
1699
|
+
sx: {
|
|
1700
|
+
zIndex: O || D ? 2 : void 0,
|
|
1701
|
+
display: "flex",
|
|
1702
|
+
" .tooltip-wrapper": {
|
|
1703
|
+
display: "flex",
|
|
1704
|
+
flex: "1 1 100%"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
children: [U, L.component]
|
|
1708
|
+
});
|
|
1709
|
+
})), gt = B(R((e, t) => {
|
|
1710
|
+
let { onSelectToggle: n, selected: r = !1, label: a, shortcut: o, tabIndex: s = 0, preventFocus: c = !1, ...l } = e;
|
|
1711
|
+
return P(i, {
|
|
1712
|
+
label: a,
|
|
1713
|
+
shortcut: o,
|
|
1714
|
+
children: P(st, {
|
|
1715
|
+
ref: t,
|
|
1716
|
+
outlined: !1,
|
|
1717
|
+
tabIndex: s,
|
|
1718
|
+
selected: r,
|
|
1719
|
+
onMouseDown: (e) => {
|
|
1720
|
+
c && e.preventDefault();
|
|
1721
|
+
},
|
|
1722
|
+
onClick: () => {
|
|
1723
|
+
n?.(!r);
|
|
1724
|
+
},
|
|
1725
|
+
...l
|
|
1726
|
+
})
|
|
1727
|
+
});
|
|
1728
|
+
})), _t = P(Y, {}), vt = P(Y, { iconKey: "Check" }), yt = B(R((e, t) => {
|
|
1729
|
+
let { children: n, selected: r = !0, outlined: i = !0, sx: a, ...o } = e, s = W(() => ({
|
|
1730
|
+
display: "flex",
|
|
1731
|
+
border: (e) => r ? `solid ${i ? e.palette.divider : "transparent"} 1px` : "solid transparent 1px",
|
|
1732
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1733
|
+
backgroundColor: (e) => {
|
|
1734
|
+
if (r) return q(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity);
|
|
1735
|
+
},
|
|
1736
|
+
...a
|
|
1737
|
+
}), [a]), c = n;
|
|
1738
|
+
return c === null && (c = _t), c ||= vt, P(T, {
|
|
1739
|
+
ref: t,
|
|
1740
|
+
sx: s,
|
|
1741
|
+
...o,
|
|
1742
|
+
children: c
|
|
1743
|
+
});
|
|
1744
|
+
}));
|
|
1745
|
+
d();
|
|
1746
|
+
var bt = B(R((e, n) => {
|
|
1747
|
+
let { children: r, sx: a, ...o } = e, s = Ce(), c = Se(n, () => ({}), []), [l, u] = t(), d = G(null), f = G(null), [p, m] = le((e) => e + 1, 0), [h, g] = K(null), [_, v] = K(null), [y, b] = K(null), x = G(null), C = G(/* @__PURE__ */ new Map()), w = V(() => {
|
|
1748
|
+
C.current.clear(), v(null), b(null), m();
|
|
1749
|
+
}, []);
|
|
1750
|
+
U(() => {
|
|
1751
|
+
f.current = { refs: [] };
|
|
1752
|
+
let e = [], t = re.toArray(r), n = 0;
|
|
1753
|
+
t.forEach((r, i) => {
|
|
1754
|
+
e.push(P(T, {
|
|
1755
|
+
sx: { display: "flex" },
|
|
1756
|
+
ref: (e) => {
|
|
1757
|
+
n++, n === t.length && m();
|
|
1758
|
+
let r = { current: null };
|
|
1759
|
+
r.current = e, f.current.refs[i] = r;
|
|
1760
|
+
},
|
|
1761
|
+
children: r
|
|
1762
|
+
}, i));
|
|
1763
|
+
}), g(e);
|
|
1764
|
+
}, [r, u]), U(() => {
|
|
1765
|
+
if (!h) return;
|
|
1766
|
+
let e = f.current?.refs ?? [], t = e.length;
|
|
1767
|
+
if (!c.current || t === 0) return v(null), void b(null);
|
|
1768
|
+
let n = c.current?.getBoundingClientRect(), r = [], i = [], a = () => {
|
|
1769
|
+
let n = x.current;
|
|
1770
|
+
n ? n.disconnect() : n = x.current = new ResizeObserver((e) => {
|
|
1771
|
+
for (let t = 0; t < e.length; t++) {
|
|
1772
|
+
let n = e[t].target;
|
|
1773
|
+
if (!n.isConnected) continue;
|
|
1774
|
+
let r = C.current.get(n);
|
|
1775
|
+
if (r !== void 0 && Math.abs(n.getBoundingClientRect().width - r) > .5) return void w();
|
|
1776
|
+
}
|
|
1777
|
+
}), C.current.clear();
|
|
1778
|
+
for (let r = 0; r < t; r++) {
|
|
1779
|
+
let t = e[r]?.current;
|
|
1780
|
+
t && (C.current.set(t, t.getBoundingClientRect().width), n.observe(t));
|
|
1781
|
+
}
|
|
1782
|
+
}, o = 0, s = !1;
|
|
1783
|
+
for (let r = 0; !s && r < t; r++) {
|
|
1784
|
+
let t = e[r];
|
|
1785
|
+
if (!t) continue;
|
|
1786
|
+
if (!t.current) {
|
|
1787
|
+
s = !0;
|
|
1788
|
+
continue;
|
|
1789
|
+
}
|
|
1790
|
+
let i = t.current.getBoundingClientRect();
|
|
1791
|
+
o += i?.width, o > n.width && (s = !0);
|
|
1792
|
+
}
|
|
1793
|
+
if (!s) return a(), v(null), void b([]);
|
|
1794
|
+
let l = d.current?.getBoundingClientRect();
|
|
1795
|
+
o = 0;
|
|
1796
|
+
for (let a = 0; a < t; a++) {
|
|
1797
|
+
let t = e[a], s = !1;
|
|
1798
|
+
if (t.current) {
|
|
1799
|
+
let e = t.current.getBoundingClientRect();
|
|
1800
|
+
o += e?.width, o < n.width - (l?.width ?? 0) && (s = !0);
|
|
1801
|
+
}
|
|
1802
|
+
s ? r.push(h[a]) : i.push(h[a]);
|
|
1803
|
+
}
|
|
1804
|
+
a(), v(r.length > 0 ? r : null), b(i.length > 0 ? i : null);
|
|
1805
|
+
}, [
|
|
1806
|
+
r,
|
|
1807
|
+
h,
|
|
1808
|
+
u,
|
|
1809
|
+
p
|
|
1810
|
+
]), U(() => () => {
|
|
1811
|
+
x.current?.disconnect(), x.current = null;
|
|
1812
|
+
}, []);
|
|
1813
|
+
let E = V((e) => {
|
|
1814
|
+
let t = [], n = y?.length ?? 0;
|
|
1815
|
+
for (let e = 0; e < n; e++) {
|
|
1816
|
+
let n = re.toArray(y[e])[0];
|
|
1817
|
+
re.toArray(n.props.children?.props?.children ?? n.props.children).forEach((n, r) => {
|
|
1818
|
+
let i = n, a = ae(i, {
|
|
1819
|
+
...i.props,
|
|
1820
|
+
key: `overflow-${e}-${r}${i.key ?? ""}`
|
|
1821
|
+
});
|
|
1822
|
+
t.push(a);
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
return Ze({
|
|
1826
|
+
...e,
|
|
1827
|
+
children: P(T, {
|
|
1828
|
+
className: "overflow-palette-popup-panel",
|
|
1829
|
+
sx: {
|
|
1830
|
+
display: "flex",
|
|
1831
|
+
flexDirection: "row",
|
|
1832
|
+
flexWrap: "wrap",
|
|
1833
|
+
rowGap: (e) => e.spacing(.25),
|
|
1834
|
+
paddingTop: (e) => e.spacing(.5),
|
|
1835
|
+
paddingBottom: (e) => e.spacing(.5),
|
|
1836
|
+
paddingLeft: (e) => e.spacing(1),
|
|
1837
|
+
paddingRight: (e) => e.spacing(1),
|
|
1838
|
+
overflow: "hidden"
|
|
1839
|
+
},
|
|
1840
|
+
children: t
|
|
1841
|
+
})
|
|
1842
|
+
});
|
|
1843
|
+
}, [y]);
|
|
1844
|
+
return F(T, {
|
|
1845
|
+
className: "overflow-palette",
|
|
1846
|
+
sx: {
|
|
1847
|
+
display: "flex",
|
|
1848
|
+
flexDirection: "row",
|
|
1849
|
+
flex: "1 1 100%",
|
|
1850
|
+
width: "100%",
|
|
1851
|
+
maxWidth: "100%",
|
|
1852
|
+
...a
|
|
1853
|
+
},
|
|
1854
|
+
ref: S([
|
|
1855
|
+
c,
|
|
1856
|
+
l,
|
|
1857
|
+
n
|
|
1858
|
+
]),
|
|
1859
|
+
...o,
|
|
1860
|
+
children: [P(T, {
|
|
1861
|
+
sx: {
|
|
1862
|
+
flexDirection: "row",
|
|
1863
|
+
display: "flex",
|
|
1864
|
+
maxWidth: "100%",
|
|
1865
|
+
flex: "1 1 100%",
|
|
1866
|
+
alignItems: "center"
|
|
1867
|
+
},
|
|
1868
|
+
children: _ ?? h
|
|
1869
|
+
}), P(T, {
|
|
1870
|
+
className: "overflow-palette-popup-button",
|
|
1871
|
+
sx: {
|
|
1872
|
+
display: y !== null && y.length === 0 ? "none" : "flex",
|
|
1873
|
+
flex: "1 1 0"
|
|
1874
|
+
},
|
|
1875
|
+
children: P(ft, {
|
|
1876
|
+
createPopupPanel: E,
|
|
1877
|
+
ref: d,
|
|
1878
|
+
createTooltip: ({ children: e }, t) => P(i, {
|
|
1879
|
+
label: s("overflow.more"),
|
|
1880
|
+
description: s("overflow.moreDescription"),
|
|
1881
|
+
disabled: t,
|
|
1882
|
+
children: e
|
|
1883
|
+
}),
|
|
1884
|
+
icon: P(Y, { iconKey: "MoreHorizontal" })
|
|
1885
|
+
})
|
|
1886
|
+
})]
|
|
1887
|
+
});
|
|
1888
|
+
}));
|
|
1889
|
+
function Q() {
|
|
1890
|
+
return Q = Object.assign ? Object.assign.bind() : function(e) {
|
|
1891
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1892
|
+
var n = arguments[t];
|
|
1893
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1894
|
+
}
|
|
1895
|
+
return e;
|
|
1896
|
+
}, Q.apply(null, arguments);
|
|
1897
|
+
}
|
|
1898
|
+
function xt(e, t) {
|
|
1899
|
+
if (e == null) return {};
|
|
1900
|
+
var n = {};
|
|
1901
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
1902
|
+
if (t.indexOf(r) !== -1) continue;
|
|
1903
|
+
n[r] = e[r];
|
|
1904
|
+
}
|
|
1905
|
+
return n;
|
|
1906
|
+
}
|
|
1907
|
+
var $, St = {
|
|
1908
|
+
state: {},
|
|
1909
|
+
updateModal: function() {},
|
|
1910
|
+
hideModal: function() {},
|
|
1911
|
+
destroyModal: function() {},
|
|
1912
|
+
destroyModalsByRootId: function() {},
|
|
1913
|
+
showModal: function() {
|
|
1914
|
+
return {
|
|
1915
|
+
id: "id",
|
|
1916
|
+
hide: function() {},
|
|
1917
|
+
destroy: function() {},
|
|
1918
|
+
update: function() {}
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
}, Ct = oe(void 0);
|
|
1922
|
+
(function(e) {
|
|
1923
|
+
e.SHOW = "SHOW", e.HIDE = "HIDE", e.UPDATE = "UPDATE", e.DESTROY = "DESTROY", e.DESTROY_BY_ROOT_ID = "DESTROY_BY_ROOT_ID", e.UNKNOWN = "UNKNOWN";
|
|
1924
|
+
})($ ||= {});
|
|
1925
|
+
var wt = {};
|
|
1926
|
+
function Tt(e, t) {
|
|
1927
|
+
switch (t.type) {
|
|
1928
|
+
case $.SHOW:
|
|
1929
|
+
var n, r = t.payload, i = r.id, a = r.component, o = r.props, s = r.options;
|
|
1930
|
+
return Q({}, e, ((n = {})[i] = {
|
|
1931
|
+
component: a,
|
|
1932
|
+
props: Q({}, o, { open: !0 }),
|
|
1933
|
+
options: s
|
|
1934
|
+
}, n));
|
|
1935
|
+
case $.HIDE:
|
|
1936
|
+
var c, l = t.payload.id;
|
|
1937
|
+
return e[l] ? Q({}, e, ((c = {})[l] = Q({}, e[l], { props: Q({}, e[l].props, { open: !1 }) }), c)) : e;
|
|
1938
|
+
case $.UPDATE:
|
|
1939
|
+
var u, d = t.payload, f = d.id, p = d.props;
|
|
1940
|
+
return e[f] ? Q({}, e, ((u = {})[f] = Q({}, e[f], { props: Q({}, e[f].props, p) }), u)) : e;
|
|
1941
|
+
case $.DESTROY:
|
|
1942
|
+
var m = t.payload.id, h = Q({}, e);
|
|
1943
|
+
return delete h[m], h;
|
|
1944
|
+
case $.DESTROY_BY_ROOT_ID:
|
|
1945
|
+
var g = t.payload.rootId;
|
|
1946
|
+
return Object.keys(e).filter(function(e) {
|
|
1947
|
+
return e.split(".")[0] !== g;
|
|
1948
|
+
}).reduce(function(t, n) {
|
|
1949
|
+
var r;
|
|
1950
|
+
return Q({}, t, ((r = {})[n] = e[n], r));
|
|
1951
|
+
}, {});
|
|
1952
|
+
default: throw Error("Unexpected action");
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
var Et = "[ERROR]: Modal ID is missing", Dt = function(e) {
|
|
1956
|
+
e === void 0 && (e = 8);
|
|
1957
|
+
for (var t = [], n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = 0; r < e; r++) t[r] = n.charAt(Math.floor(62 * Math.random()));
|
|
1958
|
+
return t.join("");
|
|
1959
|
+
}, Ot = ["open"];
|
|
1960
|
+
function kt(e) {
|
|
1961
|
+
var t = e.children, n = e.legacy, r = n !== void 0 && n, i = e.suspense, a = i === void 0 || i, o = e.fallback, s = o === void 0 ? null : o, c = I.useReducer(Tt, wt), l = c[0], u = c[1], d = I.useCallback(function(e, t) {
|
|
1962
|
+
var n = xt(t, Ot);
|
|
1963
|
+
e ? u({
|
|
1964
|
+
type: $.UPDATE,
|
|
1965
|
+
payload: {
|
|
1966
|
+
id: e,
|
|
1967
|
+
props: n
|
|
1968
|
+
}
|
|
1969
|
+
}) : console.error(Et);
|
|
1970
|
+
}, [u]), f = I.useCallback(function(e) {
|
|
1971
|
+
e ? u({
|
|
1972
|
+
type: $.HIDE,
|
|
1973
|
+
payload: { id: e }
|
|
1974
|
+
}) : console.error(Et);
|
|
1975
|
+
}, [u]), p = I.useCallback(function(e) {
|
|
1976
|
+
e ? u({
|
|
1977
|
+
type: $.DESTROY,
|
|
1978
|
+
payload: { id: e }
|
|
1979
|
+
}) : console.error(Et);
|
|
1980
|
+
}, [u]), m = I.useCallback(function(e) {
|
|
1981
|
+
e ? u({
|
|
1982
|
+
type: $.DESTROY_BY_ROOT_ID,
|
|
1983
|
+
payload: { rootId: e }
|
|
1984
|
+
}) : console.error("[ERROR]: Modal root ID is missing");
|
|
1985
|
+
}, [u]), h = I.useCallback(function(e, t, n) {
|
|
1986
|
+
var r = Dt(8);
|
|
1987
|
+
return n && n.rootId && (r = n.rootId + "." + r), u({
|
|
1988
|
+
type: $.SHOW,
|
|
1989
|
+
payload: {
|
|
1990
|
+
id: r,
|
|
1991
|
+
component: e,
|
|
1992
|
+
props: t,
|
|
1993
|
+
options: n
|
|
1994
|
+
}
|
|
1995
|
+
}), {
|
|
1996
|
+
id: r,
|
|
1997
|
+
hide: function() {
|
|
1998
|
+
return f(r);
|
|
1999
|
+
},
|
|
2000
|
+
destroy: function() {
|
|
2001
|
+
return p(r);
|
|
2002
|
+
},
|
|
2003
|
+
update: function(e) {
|
|
2004
|
+
return d(r, e);
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
}, [
|
|
2008
|
+
u,
|
|
2009
|
+
f,
|
|
2010
|
+
p,
|
|
2011
|
+
d
|
|
2012
|
+
]), g = a ? L : ie;
|
|
2013
|
+
return I.createElement(Ct.Provider, { value: {
|
|
2014
|
+
state: l,
|
|
2015
|
+
updateModal: d,
|
|
2016
|
+
hideModal: f,
|
|
2017
|
+
destroyModal: p,
|
|
2018
|
+
showModal: h,
|
|
2019
|
+
destroyModalsByRootId: m
|
|
2020
|
+
} }, t, I.createElement(g, Object.assign({}, a && { fallback: s }), Object.keys(l).map(function(e) {
|
|
2021
|
+
var t = l[e], n = t.component, i = t.props, a = t.options, o = function() {
|
|
2022
|
+
var t, n;
|
|
2023
|
+
i != null && i.onExited && i.onExited.apply(i, arguments), i != null && (t = i.TransitionProps) != null && t.onExited && (n = i.TransitionProps).onExited.apply(n, arguments), p(e);
|
|
2024
|
+
}, s = {};
|
|
2025
|
+
return s = r ? { onExited: o } : { TransitionProps: Q({}, i?.TransitionProps, { onExited: o }) }, I.createElement(n, Object.assign({}, i, {
|
|
2026
|
+
key: e,
|
|
2027
|
+
onClose: function() {
|
|
2028
|
+
a && a.hideOnClose && f(e), a && a.destroyOnClose && a.hideOnClose && p(e), i && i.onClose && i.onClose.apply(i, arguments);
|
|
2029
|
+
}
|
|
2030
|
+
}, a && !a.destroyOnClose && s));
|
|
2031
|
+
})));
|
|
2032
|
+
}
|
|
2033
|
+
var At = { enforceProvider: !1 };
|
|
2034
|
+
function jt(e) {
|
|
2035
|
+
Object.assign(At, e);
|
|
2036
|
+
}
|
|
2037
|
+
function Mt() {
|
|
2038
|
+
return At;
|
|
2039
|
+
}
|
|
2040
|
+
var Nt = ["showModal", "destroyModalsByRootId"], Pt = { disableAutoDestroy: !1 };
|
|
2041
|
+
function Ft(e) {
|
|
2042
|
+
e === void 0 && (e = Pt);
|
|
2043
|
+
var t = Q({}, Pt, e).disableAutoDestroy, n = function() {
|
|
2044
|
+
var e = ce(Ct);
|
|
2045
|
+
if (Mt().enforceProvider && e === void 0) throw Error("useModalContext must be used within a ModalProvider");
|
|
2046
|
+
return e || St;
|
|
2047
|
+
}(), r = n.showModal, i = n.destroyModalsByRootId, a = xt(n, Nt), o = G(Dt(6));
|
|
2048
|
+
return H(function() {
|
|
2049
|
+
return function() {
|
|
2050
|
+
!t && i && i(o.current);
|
|
2051
|
+
};
|
|
2052
|
+
}, [t, i]), Q({
|
|
2053
|
+
showModal: V(function(e, t, n) {
|
|
2054
|
+
return r(e, t, Q({
|
|
2055
|
+
rootId: o.current,
|
|
2056
|
+
hideOnClose: !0
|
|
2057
|
+
}, n));
|
|
2058
|
+
}, [r]),
|
|
2059
|
+
destroyModalsByRootId: i
|
|
2060
|
+
}, a);
|
|
2061
|
+
}
|
|
2062
|
+
function It(e) {
|
|
2063
|
+
let [t, n] = K(() => /* @__PURE__ */ new Map()), r = G(null);
|
|
2064
|
+
r.current === null && (r.current = /* @__PURE__ */ new Map());
|
|
2065
|
+
let { showModal: i, updateModal: a, destroyModal: o, hideModal: s } = Ft({ disableAutoDestroy: !0 });
|
|
2066
|
+
return (c, l, u, d) => new Promise((f, p) => {
|
|
2067
|
+
let m = !1;
|
|
2068
|
+
u?.disableAutoDestroy !== void 0 && (m = u.disableAutoDestroy, delete (u = { ...u }).disableAutoDestroy);
|
|
2069
|
+
let h = !1;
|
|
2070
|
+
if (u?.prewarm !== void 0 && (h = u.prewarm, delete (u = { ...u }).prewarm, h && (m = !0)), h && t.get(c)) return void f(t.get(c).element);
|
|
2071
|
+
let g = {
|
|
2072
|
+
...e,
|
|
2073
|
+
...u,
|
|
2074
|
+
...d,
|
|
2075
|
+
onHide: () => {
|
|
2076
|
+
if (d?.onHide?.(), m) return;
|
|
2077
|
+
let e = t.get(c);
|
|
2078
|
+
n((e) => (e.delete(c), e)), e?.id && s(e.id);
|
|
2079
|
+
},
|
|
2080
|
+
onDone: (e) => {
|
|
2081
|
+
if (d?.onDone?.(e), m) return;
|
|
2082
|
+
let r = t.get(c);
|
|
2083
|
+
n((e) => (e.delete(c), e)), r?.id && o(r.id);
|
|
2084
|
+
},
|
|
2085
|
+
onShown: (e) => {
|
|
2086
|
+
n((t) => {
|
|
2087
|
+
let n = t.get(c);
|
|
2088
|
+
return n && t.set(c, {
|
|
2089
|
+
...n,
|
|
2090
|
+
element: e ?? n.element
|
|
2091
|
+
}), t;
|
|
2092
|
+
}), f(e);
|
|
2093
|
+
},
|
|
2094
|
+
disableAutoDestroy: m,
|
|
2095
|
+
revealToken: 0,
|
|
2096
|
+
startHidden: h,
|
|
2097
|
+
open: !0
|
|
2098
|
+
}, _ = t.get(c);
|
|
2099
|
+
if (_) {
|
|
2100
|
+
let e = (_.revealToken ?? 0) + 1;
|
|
2101
|
+
a(_.id, {
|
|
2102
|
+
...g,
|
|
2103
|
+
revealToken: e
|
|
2104
|
+
}), n((t) => {
|
|
2105
|
+
let n = t.get(c);
|
|
2106
|
+
return n && t.set(c, {
|
|
2107
|
+
...n,
|
|
2108
|
+
revealToken: e
|
|
2109
|
+
}), t;
|
|
2110
|
+
}), f(_.element);
|
|
2111
|
+
return;
|
|
2112
|
+
}
|
|
2113
|
+
if (!l) return void p(`Invalid function for window '${c}'`);
|
|
2114
|
+
let v = r.current.get(c);
|
|
2115
|
+
v || (v = z(l), r.current.set(c, v));
|
|
2116
|
+
let y = i(v, g, { destroyOnClose: !m });
|
|
2117
|
+
n((e) => (e.set(c, {
|
|
2118
|
+
id: y.id,
|
|
2119
|
+
element: null,
|
|
2120
|
+
revealToken: 0
|
|
2121
|
+
}), e)), h && f(null);
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
var Lt = (e) => {
|
|
2125
|
+
let { showModal: t } = Ft();
|
|
2126
|
+
return (n) => new Promise((r) => {
|
|
2127
|
+
let i = t(y, {
|
|
2128
|
+
...e,
|
|
2129
|
+
...n,
|
|
2130
|
+
onOption(e, t, i) {
|
|
2131
|
+
n?.onOption?.(e, t, i), r(e);
|
|
2132
|
+
},
|
|
2133
|
+
onDone: () => {
|
|
2134
|
+
n?.onDone?.(), i.hide();
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
});
|
|
2138
|
+
}, Rt = z(() => import("./CS_JzxfpVf9TlNsZ.mjs")), zt = (e) => {
|
|
2139
|
+
let { showModal: t } = Ft();
|
|
2140
|
+
return (n) => {
|
|
2141
|
+
let { defaultOption: r = n.options?.[0], cancelOption: i = "Cancel", ...a } = n;
|
|
2142
|
+
return new Promise((n) => {
|
|
2143
|
+
let o = t(Rt, {
|
|
2144
|
+
...e,
|
|
2145
|
+
defaultOption: r,
|
|
2146
|
+
cancelOption: i,
|
|
2147
|
+
...a,
|
|
2148
|
+
onOption(e, t, r) {
|
|
2149
|
+
a?.onOption?.(e, t, r), n({
|
|
2150
|
+
input: "",
|
|
2151
|
+
option: e
|
|
2152
|
+
});
|
|
2153
|
+
},
|
|
2154
|
+
onInput(e, t) {
|
|
2155
|
+
a?.onInput?.(e, t), n({
|
|
2156
|
+
input: e,
|
|
2157
|
+
option: t
|
|
2158
|
+
});
|
|
2159
|
+
},
|
|
2160
|
+
onDone: () => {
|
|
2161
|
+
a?.onDone?.(), o.hide();
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
});
|
|
2165
|
+
};
|
|
2166
|
+
}, Bt = B(R((e, t) => {
|
|
2167
|
+
let { commandKey: n, command: r, disabled: a, shortcut: o, children: s, ...c } = e, [l] = ye(n ?? []), u = r ?? l, d = u?.getShortcut();
|
|
2168
|
+
return P(i, {
|
|
2169
|
+
ref: t,
|
|
2170
|
+
label: a === void 0 ? "" : u?.getLabel(),
|
|
2171
|
+
shortcut: o === void 0 ? Array.isArray(d) ? d[0] : d : o,
|
|
2172
|
+
description: u?.getDescription(),
|
|
2173
|
+
disabled: a,
|
|
2174
|
+
componentDisabled: u?.disabled(),
|
|
2175
|
+
...c,
|
|
2176
|
+
children: P("div", {
|
|
2177
|
+
style: {
|
|
2178
|
+
display: "flex",
|
|
2179
|
+
flex: "1 1 0%"
|
|
2180
|
+
},
|
|
2181
|
+
children: s
|
|
2182
|
+
})
|
|
2183
|
+
});
|
|
2184
|
+
})), Vt = we;
|
|
2185
|
+
function Ht() {
|
|
2186
|
+
let e = G(null);
|
|
2187
|
+
return {
|
|
2188
|
+
ripple: W(() => P(Vt, {
|
|
2189
|
+
ref: e,
|
|
2190
|
+
center: !1
|
|
2191
|
+
}), []),
|
|
2192
|
+
trigger: V(() => {
|
|
2193
|
+
e.current?.start(void 0, { center: !0 }), setTimeout(() => e.current?.stop(), 180);
|
|
2194
|
+
}, [])
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
var Ut = P(Y, {}), Wt = B(R((e, t) => {
|
|
2198
|
+
let { commandKey: n, command: r, groupKey: i, icon: a, label: o, showLabel: s = !1, disabled: c, variant: l = J.Toolbar, shortcut: u, commandState: d, propsTooltip: f, ...p } = e, { ripple: m, trigger: h } = Ht(), g = W(() => ({ onExecute() {
|
|
2199
|
+
h();
|
|
2200
|
+
} }), [h]), [_] = ye(n ?? [], g), v = r ?? _, y = V((e) => {
|
|
2201
|
+
e.button === 0 && e.preventDefault();
|
|
2202
|
+
}, []), b = V(async (e) => {
|
|
2203
|
+
e.button === 0 && v && await v.execute(d);
|
|
2204
|
+
}, [v, d]), x = V((e) => {
|
|
2205
|
+
e.keyCode !== X.Enter && e.keyCode !== X.Space || v?.execute(d);
|
|
2206
|
+
}, [v, d]), S = W(() => {
|
|
2207
|
+
if (a === null) return Ut;
|
|
2208
|
+
let e;
|
|
2209
|
+
return e = typeof a == "function" ? v ? a(v) : void 0 : a, e ||= v?.getIcon(i), e ? (typeof e == "string" && (e = P(Y, { iconKey: e })), e) : l === J.Toolbar || v?.getState() ? void 0 : Ut;
|
|
2210
|
+
}, [v?.getIcon(i), a]), C = c ?? (!v || v.disabled()), w = v?.getState(), T = {
|
|
2211
|
+
tabIndex: 0,
|
|
2212
|
+
ref: t,
|
|
2213
|
+
selected: !!w,
|
|
2214
|
+
icon: l === J.Toolbar ? s ? Ee(S, o ?? v?.getLabel(i)) : S : P(yt, {
|
|
2215
|
+
selected: w ?? !1,
|
|
2216
|
+
children: S
|
|
2217
|
+
}),
|
|
2218
|
+
disableRipple: !0,
|
|
2219
|
+
disabled: C,
|
|
2220
|
+
onMouseDown: y,
|
|
2221
|
+
onMouseUp: b,
|
|
2222
|
+
onKeyDown: x
|
|
2223
|
+
}, E;
|
|
2224
|
+
return E = l === J.Menuitem ? F(ut, {
|
|
2225
|
+
...p,
|
|
2226
|
+
...T,
|
|
2227
|
+
children: [o ?? v?.getLabel(i), m]
|
|
2228
|
+
}) : P(st, {
|
|
2229
|
+
...p,
|
|
2230
|
+
...T,
|
|
2231
|
+
children: m
|
|
2232
|
+
}), o || v?.getLabel() ? (C && (E = P("div", { children: E })), E = P(Bt, {
|
|
2233
|
+
commandKey: n,
|
|
2234
|
+
command: r,
|
|
2235
|
+
disabled: C,
|
|
2236
|
+
placement: l === J.Toolbar ? "bottom-start" : "right-start",
|
|
2237
|
+
shortcut: u,
|
|
2238
|
+
...f,
|
|
2239
|
+
children: E
|
|
2240
|
+
}), E) : E;
|
|
2241
|
+
}));
|
|
2242
|
+
Wt.displayName = "CommandButton";
|
|
2243
|
+
var Gt = P(Y, {}), Kt = B(R((e, t) => {
|
|
2244
|
+
let { commandKey: n, groupKey: r, icon: i, commandState: a, label: o, variant: s = J.Toolbar, disabled: c, parseInput: l, inputProps: u, inputRef: d, ...f } = e, { ripple: p, trigger: m } = Ht(), h = W(() => ({ onExecute() {
|
|
2245
|
+
m();
|
|
2246
|
+
} }), [m]), g = ye(n ?? [], h)[0], _ = () => g?.getState()?.toString() || "", [v, y] = K(""), b = G(_()), x = Z(() => {
|
|
2247
|
+
let e = v;
|
|
2248
|
+
if (l) try {
|
|
2249
|
+
e = l(v);
|
|
2250
|
+
} catch {
|
|
2251
|
+
y(_());
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
b.current === v ? y(_()) : (b.current = v, g?.execute(e));
|
|
2255
|
+
}, [
|
|
2256
|
+
_,
|
|
2257
|
+
g,
|
|
2258
|
+
v,
|
|
2259
|
+
l
|
|
2260
|
+
]);
|
|
2261
|
+
H(() => {
|
|
2262
|
+
y(_());
|
|
2263
|
+
}, [g?.getState()]);
|
|
2264
|
+
let S = W(() => {
|
|
2265
|
+
if (i === null) return Gt;
|
|
2266
|
+
let e;
|
|
2267
|
+
return e = typeof i == "function" ? g ? i(g) : void 0 : i, e ||= g?.getIcon(), e ? (typeof e == "string" && (e = P(Y, { iconKey: e })), e) : s === J.Toolbar || g?.getState() ? void 0 : Gt;
|
|
2268
|
+
}, [g?.getIcon(), i]), C = W(() => o === void 0 ? g?.getLabel(r) : typeof o == "function" ? o() : o, [o, g?.getLabel(r)]), w = c ?? (!g || g.disabled()), T = W(() => P(D, {
|
|
2269
|
+
...f,
|
|
2270
|
+
sx: {
|
|
2271
|
+
paddingTop: "0px",
|
|
2272
|
+
paddingBottom: "0px"
|
|
2273
|
+
},
|
|
2274
|
+
component: "div",
|
|
2275
|
+
disableRipple: !0,
|
|
2276
|
+
onClick: (e) => e.stopPropagation(),
|
|
2277
|
+
onMouseDown: (e) => {
|
|
2278
|
+
e.button === 0 && e.stopPropagation();
|
|
2279
|
+
},
|
|
2280
|
+
onMouseUp: (e) => {
|
|
2281
|
+
e.button === 0 && e.stopPropagation();
|
|
2282
|
+
},
|
|
2283
|
+
children: P(ee, {
|
|
2284
|
+
disabled: w,
|
|
2285
|
+
inputRef: d,
|
|
2286
|
+
inputProps: {
|
|
2287
|
+
tabIndex: 0,
|
|
2288
|
+
name: `input-${g?.getKey()}`,
|
|
2289
|
+
autoComplete: "off",
|
|
2290
|
+
...u
|
|
2291
|
+
},
|
|
2292
|
+
sx: {
|
|
2293
|
+
paddingTop: "0px",
|
|
2294
|
+
paddingBottom: "0px",
|
|
2295
|
+
paddingLeft: "0px",
|
|
2296
|
+
paddingRight: "0px",
|
|
2297
|
+
fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
|
|
2298
|
+
width: (e) => "3.2em",
|
|
2299
|
+
input: {
|
|
2300
|
+
padding: "0 0",
|
|
2301
|
+
textAlign: "center",
|
|
2302
|
+
MozAppearance: "textfield"
|
|
2303
|
+
},
|
|
2304
|
+
"input::-webkit-inner-spin-button": {
|
|
2305
|
+
WebkitAppearance: "none",
|
|
2306
|
+
margin: "0"
|
|
2307
|
+
},
|
|
2308
|
+
minHeight: "24px"
|
|
2309
|
+
},
|
|
2310
|
+
value: v,
|
|
2311
|
+
onFocus: (e) => {
|
|
2312
|
+
e.target?.select();
|
|
2313
|
+
},
|
|
2314
|
+
onKeyDown: (e) => {
|
|
2315
|
+
if (e.which === X.Enter) _() !== v && (e.stopPropagation(), e.preventDefault(), x());
|
|
2316
|
+
else if (e.which === X.Escape) _() !== v && (y(_()), setTimeout(() => {
|
|
2317
|
+
e.target?.select();
|
|
2318
|
+
}, 0), e.stopPropagation(), e.preventDefault());
|
|
2319
|
+
else {
|
|
2320
|
+
if (e.key.match("[-]") || e.key.match("[0-9.]") && (v + e.key).length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
2321
|
+
if (e.which === X.Space) return void e.preventDefault();
|
|
2322
|
+
}
|
|
2323
|
+
},
|
|
2324
|
+
onBlur: () => {
|
|
2325
|
+
x();
|
|
2326
|
+
},
|
|
2327
|
+
onChange: (e) => {
|
|
2328
|
+
if (e.target.value.length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
2329
|
+
y(e.target.value);
|
|
2330
|
+
}
|
|
2331
|
+
})
|
|
2332
|
+
}), [
|
|
2333
|
+
v,
|
|
2334
|
+
w,
|
|
2335
|
+
u,
|
|
2336
|
+
d
|
|
2337
|
+
]), E = {
|
|
2338
|
+
tabIndex: 0,
|
|
2339
|
+
ref: t,
|
|
2340
|
+
icon: S,
|
|
2341
|
+
disableRipple: !0,
|
|
2342
|
+
disabled: c || !g || g.disabled(),
|
|
2343
|
+
onMouseDown: (e) => {
|
|
2344
|
+
e.button === 0 && e.preventDefault();
|
|
2345
|
+
},
|
|
2346
|
+
onMouseUp: (e) => {
|
|
2347
|
+
e.button !== 0 || e.isPropagationStopped() || e.isDefaultPrevented() || e.isDefaultPrevented() || (e.preventDefault(), x());
|
|
2348
|
+
},
|
|
2349
|
+
onKeyDown: (e) => {
|
|
2350
|
+
e.keyCode !== X.Enter && e.keyCode !== X.Tab || x();
|
|
2351
|
+
}
|
|
2352
|
+
}, O;
|
|
2353
|
+
return O = s === J.Menuitem ? F(ut, {
|
|
2354
|
+
...f,
|
|
2355
|
+
...E,
|
|
2356
|
+
children: [
|
|
2357
|
+
C,
|
|
2358
|
+
T,
|
|
2359
|
+
p
|
|
2360
|
+
]
|
|
2361
|
+
}) : P(st, {
|
|
2362
|
+
...f,
|
|
2363
|
+
...E,
|
|
2364
|
+
children: p
|
|
2365
|
+
}), g?.getLabel() ? ((g.disabled() || c) && (O = P("div", { children: O })), O = P(Bt, {
|
|
2366
|
+
commandKey: n,
|
|
2367
|
+
placement: s === J.Toolbar ? "bottom-start" : "right-start",
|
|
2368
|
+
children: O
|
|
2369
|
+
}), O) : O;
|
|
2370
|
+
})), qt = B(R((e, t) => {
|
|
2371
|
+
let { variant: n = J.Toolbar, quickCommand: r, onQuickClick: a, commandState: o, disabled: s, label: c, icon: l, createPopupPanel: u, tooltip: d, selected: f, groupKey: p, ...m } = e, { ripple: h, trigger: g } = Ht(), _ = W(() => ({ onExecute() {
|
|
2372
|
+
g();
|
|
2373
|
+
} }), [g]), [v] = ye(r ?? [], _), { label: y, icon: b } = W(() => {
|
|
2374
|
+
let e = null;
|
|
2375
|
+
c && (e = typeof c == "function" ? v ? c(v) : null : c), e ||= v?.getLabel?.(p);
|
|
2376
|
+
let t = l;
|
|
2377
|
+
return t ||= v?.getIcon?.(p), typeof t == "string" ? t = P(Y, { iconKey: t }) : typeof t == "function" && (t = v ? t(v) : void 0), {
|
|
2378
|
+
label: e,
|
|
2379
|
+
icon: t
|
|
2380
|
+
};
|
|
2381
|
+
}, [
|
|
2382
|
+
v,
|
|
2383
|
+
c,
|
|
2384
|
+
l
|
|
2385
|
+
]), x = {
|
|
2386
|
+
disabled: s || !(v || !r),
|
|
2387
|
+
ripple: h,
|
|
2388
|
+
onQuickClick: a,
|
|
2389
|
+
tooltip: d,
|
|
2390
|
+
label: y,
|
|
2391
|
+
icon: b
|
|
2392
|
+
};
|
|
2393
|
+
(y || d) && (x.createTooltip = ({ children: e }, t) => P(i, {
|
|
2394
|
+
label: y,
|
|
2395
|
+
description: d,
|
|
2396
|
+
disabled: t,
|
|
2397
|
+
children: e
|
|
2398
|
+
}));
|
|
2399
|
+
let S = Z((e) => u?.(e), [u]), C = Z((e) => v?.execute(o), [v]);
|
|
2400
|
+
return v ? (x.propsQuickButton = {}, x.propsQuickButton.createTooltip = ({ children: e, placement: t }, i) => P(Bt, {
|
|
2401
|
+
commandKey: r,
|
|
2402
|
+
placement: t ?? n === J.Toolbar ? "bottom-start" : "right-start",
|
|
2403
|
+
disabled: i,
|
|
2404
|
+
children: e
|
|
2405
|
+
}), x.disabled = x.disabled ?? v?.disabled(), a || (x.onQuickClick = C)) : r && (x.onQuickClick = () => {}), x.selected = f ?? v?.getState(), x.createPopupPanel = S, n === J.Toolbar ? P(ft, {
|
|
2406
|
+
...m,
|
|
2407
|
+
...x,
|
|
2408
|
+
ref: t
|
|
2409
|
+
}) : P(ht, {
|
|
2410
|
+
...m,
|
|
2411
|
+
...x,
|
|
2412
|
+
ref: t
|
|
2413
|
+
});
|
|
2414
|
+
}));
|
|
2415
|
+
function Jt(e, t = {}) {
|
|
2416
|
+
let { variant: n, dividerOrientation: r = "vertical", groupKey: i, commandState: a, propsCommandButton: o, propsCommandPopup: s, registry: c } = t, l = { ...o };
|
|
2417
|
+
n !== void 0 && (l.variant = n);
|
|
2418
|
+
let u = { ...s };
|
|
2419
|
+
n !== void 0 && (u.variant = n);
|
|
2420
|
+
let d = (e, t, n) => {
|
|
2421
|
+
let r = {
|
|
2422
|
+
...l,
|
|
2423
|
+
groupKey: i,
|
|
2424
|
+
commandKey: e,
|
|
2425
|
+
commandState: t === void 0 ? a : t,
|
|
2426
|
+
label: n?.getLabel?.(i),
|
|
2427
|
+
icon: n?.getIcon?.(i),
|
|
2428
|
+
showLabel: n?.showLabel
|
|
2429
|
+
};
|
|
2430
|
+
return (n?.render ? n.render(r, i) : P(Wt, { ...r })) ?? null;
|
|
2431
|
+
}, f = (e) => {
|
|
2432
|
+
let t = typeof e == "string" ? e : e.key, n = typeof e == "string" ? void 0 : e;
|
|
2433
|
+
if (!t) return ((e) => Array.isArray(e.members) ? e.render ? e.render({ ...u }, void 0) ?? null : P(Yt, {
|
|
2434
|
+
...u,
|
|
2435
|
+
members: e.members,
|
|
2436
|
+
icon: e.getIcon?.(),
|
|
2437
|
+
label: e.getLabel?.(),
|
|
2438
|
+
tooltip: e.getDescription?.()
|
|
2439
|
+
}) : (e.render ? e.render({ ...u }, i) : null) ?? null)(e);
|
|
2440
|
+
let r = c?.get(t) ?? null;
|
|
2441
|
+
return r ? ((e, t, n) => {
|
|
2442
|
+
if (Array.isArray(e.members)) return e.render ? e.render({ ...u }, t) ?? null : P(Yt, {
|
|
2443
|
+
...u,
|
|
2444
|
+
groupKey: t,
|
|
2445
|
+
icon: n?.getIcon?.(t),
|
|
2446
|
+
label: n?.getLabel?.(t),
|
|
2447
|
+
showLabel: n?.showLabel
|
|
2448
|
+
});
|
|
2449
|
+
if (e.render) return e.render({ ...u }, i) ?? null;
|
|
2450
|
+
let r = n ? {
|
|
2451
|
+
...e,
|
|
2452
|
+
...n
|
|
2453
|
+
} : e;
|
|
2454
|
+
return d(e.defaultKey ?? t, r.state, r);
|
|
2455
|
+
})(r, t, n) : d(t, n?.state, n);
|
|
2456
|
+
}, p = [], m = 0, h = !1, g = !1, _ = e ?? [];
|
|
2457
|
+
for (let e = 0; e < _.length; e++) {
|
|
2458
|
+
let t = _[e];
|
|
2459
|
+
if (!t || t === "-") {
|
|
2460
|
+
g && (h = !0);
|
|
2461
|
+
continue;
|
|
2462
|
+
}
|
|
2463
|
+
let n = f(t);
|
|
2464
|
+
n && (h &&= (p.push(P(Me, { orientation: r }, "member-" + m++)), !1), p.push(ae(n, { key: "member-" + m++ })), g = !0);
|
|
2465
|
+
}
|
|
2466
|
+
return p;
|
|
2467
|
+
}
|
|
2468
|
+
qt.displayName = "CommandPopupButton";
|
|
2469
|
+
var Yt = B(R((e, t) => {
|
|
2470
|
+
let { groupKey: n, members: r, registry: i, quickCommand: a, icon: o, label: s, showLabel: c, tooltip: l, commandState: u, disabled: d, ...f } = e, p = ve(), m = i ?? p, h = !r && n ? m.get(n) : null, g = h && Array.isArray(h.members) ? h : null, _ = W(() => r ?? (n ? m.resolveMembers(n) : null) ?? null, [
|
|
2471
|
+
r,
|
|
2472
|
+
n,
|
|
2473
|
+
m
|
|
2474
|
+
]), v = n, y = a ?? g?.defaultKey, b = o ?? g?.getIcon?.(v), x = s ?? g?.getLabel?.(v), S = c ?? g?.showLabel, C = l ?? g?.getDescription?.(v), w = W(() => {
|
|
2475
|
+
let e = [], t = _ ?? [];
|
|
2476
|
+
for (let n = 0; n < t.length; n++) {
|
|
2477
|
+
let r = t[n];
|
|
2478
|
+
r && r !== "-" && (typeof r == "string" ? e.push(r) : r.key && e.push(r.key));
|
|
2479
|
+
}
|
|
2480
|
+
return e;
|
|
2481
|
+
}, [_]), T = ye(y ? [y, ...w] : w), E = W(() => {
|
|
2482
|
+
for (let e = 0; e < T.length; e++) {
|
|
2483
|
+
let t = T[e];
|
|
2484
|
+
if (t && !t.disabled()) return !1;
|
|
2485
|
+
}
|
|
2486
|
+
return !0;
|
|
2487
|
+
}, [T]), D = V((e) => {
|
|
2488
|
+
let t = {};
|
|
2489
|
+
d !== void 0 && (t.disabled = d);
|
|
2490
|
+
let n = Jt(_, {
|
|
2491
|
+
variant: J.Menuitem,
|
|
2492
|
+
dividerOrientation: "horizontal",
|
|
2493
|
+
groupKey: v,
|
|
2494
|
+
commandState: u,
|
|
2495
|
+
propsCommandButton: t,
|
|
2496
|
+
propsCommandPopup: t,
|
|
2497
|
+
registry: m
|
|
2498
|
+
});
|
|
2499
|
+
return Ze({
|
|
2500
|
+
...e,
|
|
2501
|
+
children: n
|
|
2502
|
+
});
|
|
2503
|
+
}, [
|
|
2504
|
+
_,
|
|
2505
|
+
m,
|
|
2506
|
+
v,
|
|
2507
|
+
u,
|
|
2508
|
+
d
|
|
2509
|
+
]);
|
|
2510
|
+
return _ ? P(qt, {
|
|
2511
|
+
ref: t,
|
|
2512
|
+
quickCommand: y,
|
|
2513
|
+
icon: b,
|
|
2514
|
+
label: x,
|
|
2515
|
+
showLabel: S,
|
|
2516
|
+
tooltip: C,
|
|
2517
|
+
commandState: u,
|
|
2518
|
+
disabled: d ?? E,
|
|
2519
|
+
createPopupPanel: D,
|
|
2520
|
+
...f
|
|
2521
|
+
}) : null;
|
|
2522
|
+
}));
|
|
2523
|
+
Yt.displayName = "CommandGroup";
|
|
2524
|
+
var Xt = P(Y, { iconKey: "Check" }), Zt = (e) => {
|
|
2525
|
+
let { commandKey: t, label: n, groupKey: r, icon: i, sx: a, ...o } = e, [s] = ye(t ?? []), c = W(() => {
|
|
2526
|
+
if (i !== void 0) return i;
|
|
2527
|
+
let e = s?.getIcon(r);
|
|
2528
|
+
return e ? (typeof e == "string" && (e = P(Y, { iconKey: e })), e) : Xt;
|
|
2529
|
+
}, [
|
|
2530
|
+
i,
|
|
2531
|
+
r,
|
|
2532
|
+
s
|
|
2533
|
+
]);
|
|
2534
|
+
return F(T, {
|
|
2535
|
+
sx: {
|
|
2536
|
+
display: "flex",
|
|
2537
|
+
flexDirection: "row",
|
|
2538
|
+
textTransform: "none",
|
|
2539
|
+
alignItems: "center",
|
|
2540
|
+
fontSize: (e) => e.typography.subtitle2.fontSize,
|
|
2541
|
+
...a
|
|
2542
|
+
},
|
|
2543
|
+
...o,
|
|
2544
|
+
children: [c, P(M, {
|
|
2545
|
+
component: "div",
|
|
2546
|
+
sx: {
|
|
2547
|
+
whiteSpace: "nowrap",
|
|
2548
|
+
lineHeight: "1",
|
|
2549
|
+
paddingLeft: (e) => e.spacing(.25),
|
|
2550
|
+
paddingRight: (e) => e.spacing(.25),
|
|
2551
|
+
fontSize: "inherit"
|
|
2552
|
+
},
|
|
2553
|
+
children: n ?? s?.getLabel(r)
|
|
2554
|
+
})]
|
|
2555
|
+
});
|
|
2556
|
+
}, Qt = B(R((e, t) => {
|
|
2557
|
+
let { sx: n, propsCommandButton: r, parentFloat: i, groupKey: a, members: o, registry: s, renderToolbarPalette: c, children: l, ...u } = e, d = ve(), f = s ?? d, p = W(() => o ?? (a ? f.resolveMembers(a) : null) ?? null, [
|
|
2558
|
+
o,
|
|
2559
|
+
a,
|
|
2560
|
+
f,
|
|
2561
|
+
f.getVersion()
|
|
2562
|
+
]), m = Se(t, () => ({}), []), [h, g] = K(null), { reference: _ } = xe({
|
|
2563
|
+
label: "toolbar",
|
|
2564
|
+
anchor: m.current,
|
|
2565
|
+
parentFloat: i,
|
|
2566
|
+
createPopupPanel: null
|
|
2567
|
+
}), v = Z(() => {
|
|
2568
|
+
let e = h;
|
|
2569
|
+
e && requestAnimationFrame(() => {
|
|
2570
|
+
m.current?.contains(document.activeElement) && e.focus();
|
|
2571
|
+
});
|
|
2572
|
+
}, [h]), y = W(() => ({
|
|
2573
|
+
dense: !0,
|
|
2574
|
+
outlined: !1
|
|
2575
|
+
}), []), b = W(() => ({ ...r || {} }), [r]), x = W(() => ({
|
|
2576
|
+
...y,
|
|
2577
|
+
...b
|
|
2578
|
+
}), [y, b]), S = W(() => ({ ...b }), [x, r]), C = 0;
|
|
2579
|
+
y.dense || (C += 2), y.outlined && C++;
|
|
2580
|
+
let w = 2;
|
|
2581
|
+
y.dense || (w = 4);
|
|
2582
|
+
let T = W(() => {
|
|
2583
|
+
let e = {
|
|
2584
|
+
propsCommandButton: x,
|
|
2585
|
+
propsCommandPopup: {
|
|
2586
|
+
...S,
|
|
2587
|
+
...r
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
return c ? c(e) : p ? P(bt, { children: Jt(p, {
|
|
2591
|
+
dividerOrientation: "vertical",
|
|
2592
|
+
groupKey: a,
|
|
2593
|
+
propsCommandButton: e.propsCommandButton,
|
|
2594
|
+
propsCommandPopup: e.propsCommandPopup,
|
|
2595
|
+
registry: f
|
|
2596
|
+
}) }) : null;
|
|
2597
|
+
}, [
|
|
2598
|
+
x,
|
|
2599
|
+
S,
|
|
2600
|
+
r,
|
|
2601
|
+
c,
|
|
2602
|
+
p,
|
|
2603
|
+
a,
|
|
2604
|
+
f
|
|
2605
|
+
]);
|
|
2606
|
+
return P(j, {
|
|
2607
|
+
variant: "dense",
|
|
2608
|
+
sx: {
|
|
2609
|
+
minHeight: "unset",
|
|
2610
|
+
height: "unset",
|
|
2611
|
+
paddingTop: `${w}px`,
|
|
2612
|
+
paddingBottom: `${w}px`,
|
|
2613
|
+
paddingLeft: "6px !important",
|
|
2614
|
+
paddingRight: "6px !important",
|
|
2615
|
+
flex: "1 1 0%",
|
|
2616
|
+
alignItems: "center",
|
|
2617
|
+
userSelect: "none",
|
|
2618
|
+
flexGrow: 1,
|
|
2619
|
+
display: "flex",
|
|
2620
|
+
overflow: "hidden",
|
|
2621
|
+
...n
|
|
2622
|
+
},
|
|
2623
|
+
ref: m,
|
|
2624
|
+
onFocus: (e) => {
|
|
2625
|
+
e.relatedTarget && !h && g(e.relatedTarget);
|
|
2626
|
+
},
|
|
2627
|
+
onBlur: (e) => {
|
|
2628
|
+
h && !m?.current?.contains(e.relatedTarget) && g(null);
|
|
2629
|
+
},
|
|
2630
|
+
onKeyDown: (e) => {
|
|
2631
|
+
h && e.which === X.Escape && h.focus();
|
|
2632
|
+
},
|
|
2633
|
+
...u,
|
|
2634
|
+
children: P("div", {
|
|
2635
|
+
ref: m,
|
|
2636
|
+
style: {
|
|
2637
|
+
flex: "1 1 100%",
|
|
2638
|
+
display: "flex",
|
|
2639
|
+
flexWrap: "wrap",
|
|
2640
|
+
rowGap: `${w}px`,
|
|
2641
|
+
columnGap: `${C}px`,
|
|
2642
|
+
alignItems: "center",
|
|
2643
|
+
maxWidth: "100%"
|
|
2644
|
+
},
|
|
2645
|
+
children: P(he, {
|
|
2646
|
+
value: _,
|
|
2647
|
+
children: P(fe, {
|
|
2648
|
+
value: v,
|
|
2649
|
+
children: T
|
|
2650
|
+
})
|
|
2651
|
+
})
|
|
2652
|
+
})
|
|
2653
|
+
});
|
|
2654
|
+
}));
|
|
2655
|
+
Qt.displayName = "CommandToolbar";
|
|
2656
|
+
var $t = B(R((e, t) => {
|
|
2657
|
+
let { groupKey: n, members: r, registry: i, projectAs: a = "quick", defaultIcon: o, ...s } = e, c = ve(), l = i ?? c, u = W(() => r ?? (n ? l.resolveMembers(n) : null) ?? null, [
|
|
2658
|
+
r,
|
|
2659
|
+
n,
|
|
2660
|
+
l
|
|
2661
|
+
]), d = W(() => {
|
|
2662
|
+
let e = [], t = u ?? [];
|
|
2663
|
+
for (let n = 0; n < t.length; n++) {
|
|
2664
|
+
let r = t[n];
|
|
2665
|
+
r && r !== "-" && (typeof r == "string" ? e.push(r) : r.key && e.push(r.key));
|
|
2666
|
+
}
|
|
2667
|
+
return e;
|
|
2668
|
+
}, [u]), f = ye(d), p = null, m = null;
|
|
2669
|
+
for (let e = 0; !p && e < f.length; e++) {
|
|
2670
|
+
let t = f[e];
|
|
2671
|
+
t && !t.disabled() && t.getState() && (p = d[e], m = t.getIcon());
|
|
2672
|
+
}
|
|
2673
|
+
let h = a === "icon" ? {
|
|
2674
|
+
icon: m ?? o,
|
|
2675
|
+
quickCommand: void 0
|
|
2676
|
+
} : {
|
|
2677
|
+
quickCommand: p ?? d[0],
|
|
2678
|
+
icon: void 0
|
|
2679
|
+
};
|
|
2680
|
+
return P(Yt, {
|
|
2681
|
+
ref: t,
|
|
2682
|
+
groupKey: n,
|
|
2683
|
+
members: r,
|
|
2684
|
+
registry: l,
|
|
2685
|
+
...s,
|
|
2686
|
+
...h
|
|
2687
|
+
});
|
|
2688
|
+
}));
|
|
2689
|
+
$t.displayName = "ToggleGroupButton";
|
|
2690
|
+
export { Le as AnimatedBouncingEllipsisIcon, Fe as AnimatedCircleIcon, Pe as AnimatedClockIcon, Ie as AnimatedFadingEllipsisIcon, Ve as AnimatedLoadingPanel, Re as AnimatedOrbitIcon, ze as AnimatedTraversingEllipsisIcon, r as ArrowDownIcon, x as ArrowRightIcon, C as ChipStrip, Ye as ClosingReason, Wt as CommandButton, Yt as CommandGroup, qt as CommandPopupButton, Qt as CommandToolbar, Bt as CommandTooltip, it as ContextMenu, Me as ExhibitDivider, $e as ExhibitFloatPanel, tt as ExhibitFloatProvider, st as ExhibitIconButton, dt as ExhibitMenuHeader, ut as ExhibitMenuItem, gt as ExhibitOptionButton, ft as ExhibitPopupIconButton, ht as ExhibitPopupMenuItem, i as ExhibitTooltip, Kt as InputCommandButton, _ as InternalWindow, Zt as LabelIcon, kt as ModalProvider, nt as NestingPopupButton, y as OptionsDialog, bt as OverflowPalette, Je as PopupAutoFocus, Xe as PopupButtonType, yt as SelectedIcon, v as SimpleTooltip, Ge as StackTrace, Ke as StackTraceErrorPanel, $t as ToggleGroupButton, Te as buttonLabelSx, Ee as composeButtonContent, Qe as createDownArrow, b as createExhibitTheme, ke as createScrollButton, w as createStrokeShadowFilter, Ze as defaultCreatePopupPanel, s as elevateColor, c as elevatedSurface, Mt as getModalConfig, o as getScrollbarCssVariables, g as hexToRGB, m as optionIdentity, p as overlayAlpha, u as raisedSurface, l as raisedSurfaceAt, d as registerUtilsMuiLocales, Jt as renderMembers, Oe as renderScrollButtonEdge, je as renderScrollButtonEnd, Ae as renderScrollButtonStart, f as scrollbarTheming, jt as setModalConfig, a as strokeShadowFilter, h as toShortcutElements, zt as useInputDialog, It as useLazyWindow, Ft as useModal, Lt as useOptionsDialog };
|