@sheetxl/utils-mui 0.7.7 → 0.7.9

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.
@@ -1,14 +1,14 @@
1
1
  import q, { memo as oe, forwardRef as de, version as To, useLayoutEffect as Cr, useEffect as Se, useState as ne, useMemo as Z, useRef as ge, useImperativeHandle as Po, useCallback as _e, createContext as Ro, Suspense as No, Fragment as Fo, useContext as _o, useReducer as Ao } from "react";
2
2
  import { jsx as k, jsxs as J, Fragment as Je } from "react/jsx-runtime";
3
3
  import { alpha as me, darken as Io, lighten as Vo } from "@mui/system";
4
- import { IconButton as Ze, Divider as Er, Box as X, Typography as Me, Paper as Et, Chip as Lo, Popper as Bo, Grow as jo, Tooltip as $o, ListItemIcon as zo, MenuItem as Mr, Fade as Wo, Backdrop as Ho, DialogTitle as Uo, Button as Yo, DialogContent as Ko, DialogActions as Xo, Input as Go, Toolbar as qo } from "@mui/material";
5
- import { CommonUtils as Te } from "@sheetxl/utils";
6
- import { defaultCreateScrollEdgeButton as Qo, ScrollbarOrientation as at, DynamicIcon as be, useCallbackRef as ae, useFullscreenPortal as ln, KeyCodes as Pe, KeyModifiers as Mt, ReactUtils as Jo, useImperativeElement as Tr, useCommand as cn, CommandButtonType as Ae, useCommands as un } from "@sheetxl/utils-react";
7
- import { useTheme as dn, styled as Zo, createTheme as On, useThemeProps as ei } from "@mui/material/styles";
4
+ import { IconButton as Ze, Divider as Er, Box as X, Typography as Me, Paper as Et, Chip as Lo, Popper as Bo, Grow as jo, Tooltip as $o, ListItemIcon as zo, MenuItem as Mr, Fade as Wo, Backdrop as Ho, DialogTitle as Uo, Button as Yo, DialogContent as Go, DialogActions as Xo, Input as Ko, Toolbar as qo } from "@mui/material";
5
+ import { ErrorUtils as Qo, CommonUtils as Te } from "@sheetxl/utils";
6
+ import { defaultCreateScrollEdgeButton as Jo, ScrollbarOrientation as at, DynamicIcon as be, useCallbackRef as ae, useFullscreenPortal as ln, KeyCodes as Pe, KeyModifiers as Mt, ReactUtils as Zo, useImperativeElement as Tr, useCommand as cn, CommandButtonType as Ae, useCommands as un } from "@sheetxl/utils-react";
7
+ import { useTheme as dn, styled as ei, createTheme as On, useThemeProps as ti } from "@mui/material/styles";
8
8
  import { deepmerge as Pr } from "@mui/utils";
9
- import Rr, { createPortal as ti } from "react-dom";
9
+ import Rr, { createPortal as ni } from "react-dom";
10
10
  /**
11
- * @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.7
11
+ * @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.9
12
12
  *
13
13
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
14
14
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -26,17 +26,17 @@ function Oe() {
26
26
  for (var e, r, n = 0, t = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (r = Nr(e)) && (t && (t += " "), t += r);
27
27
  return t;
28
28
  }
29
- const ts = (e) => {
29
+ const rs = (e) => {
30
30
  const r = { style: { cursor: "pointer" }, ...e };
31
- return Qo(r);
31
+ return Jo(r);
32
32
  }, Fr = (e, r, n, t) => {
33
33
  const { style: s, ...a } = e, o = k(Ze, { component: "div", ...a, style: { ...s, padding: "0px" }, sx: { padding: "0" }, color: e.disabled ? void 0 : "primary", "aria-label": n, size: "small", children: r });
34
34
  return k(dt, { title: e.disabled ? n : t, enterDelay: 800, enterNextDelay: 1600, children: e.disabled ? k("div", { style: { display: "flex" }, children: o }) : o });
35
- }, ns = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowLeft", size: "small" }) : k(be, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === at.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), rs = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowRight", size: "small" }) : k(be, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === at.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ni = oe(de((e, r) => {
35
+ }, os = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowLeft", size: "small" }) : k(be, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === at.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), is = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowRight", size: "small" }) : k(be, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === at.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ri = oe(de((e, r) => {
36
36
  const { orientation: n = "vertical", sx: t, ...s } = e, a = n === "vertical";
37
37
  return k(Er, { ref: r, sx: { marginLeft: a ? "2px" : void 0, marginRight: a ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a ? "1em" : void 0, minWidth: a ? void 0 : "1em", borderColor: (o) => o.palette.divider, ...t }, orientation: n, variant: "middle", flexItem: !0, ...s });
38
38
  }));
39
- function Kt(e, r) {
39
+ function Gt(e, r) {
40
40
  if (typeof e == "function") return e(r);
41
41
  e && (e.current = r);
42
42
  }
@@ -44,8 +44,8 @@ var At = parseInt(To.split(".")[0], 10) >= 19 ? function(e) {
44
44
  return (r) => {
45
45
  const n = [];
46
46
  for (const t of e) {
47
- const s = Kt(t, r), a = typeof s == "function";
48
- n.push(a ? s : () => Kt(t, null));
47
+ const s = Gt(t, r), a = typeof s == "function";
48
+ n.push(a ? s : () => Gt(t, null));
49
49
  }
50
50
  return () => {
51
51
  for (const t of n) t();
@@ -53,9 +53,9 @@ var At = parseInt(To.split(".")[0], 10) >= 19 ? function(e) {
53
53
  };
54
54
  } : function(e) {
55
55
  return (r) => {
56
- for (const n of e) Kt(n, r);
56
+ for (const n of e) Gt(n, r);
57
57
  };
58
- }, ri = function() {
58
+ }, oi = function() {
59
59
  }, _r = typeof window < "u";
60
60
  function Ar(e) {
61
61
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -84,10 +84,10 @@ function Ir(e) {
84
84
  var Vr = _r ? Cr : Se, Cn = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
85
85
  const En = _r && window.ResizeObserver !== void 0 ? function() {
86
86
  var e = ne(null), r = e[0], n = e[1], t = ne(Cn), s = t[0], a = t[1], o = Z(function() {
87
- return new window.ResizeObserver(function(c) {
88
- if (c[0]) {
89
- var i = c[0].contentRect, l = i.x, p = i.y, x = i.width, m = i.height, b = i.top, v = i.left, g = i.bottom, h = i.right;
90
- a({ x: l, y: p, width: x, height: m, top: b, left: v, bottom: g, right: h });
87
+ return new window.ResizeObserver(function(l) {
88
+ if (l[0]) {
89
+ var i = l[0].contentRect, c = i.x, f = i.y, x = i.width, y = i.height, b = i.top, v = i.left, m = i.bottom, h = i.right;
90
+ a({ x: c, y: f, width: x, height: y, top: b, left: v, bottom: m, right: h });
91
91
  }
92
92
  });
93
93
  }, []);
@@ -97,50 +97,50 @@ const En = _r && window.ResizeObserver !== void 0 ? function() {
97
97
  };
98
98
  }, [r]), [n, s];
99
99
  } : function() {
100
- return [ri, Cn];
101
- }, oi = "_traverse-ellipsis_14l1h_1", os = oe((e) => {
100
+ return [oi, Cn];
101
+ }, ii = "_traverse-ellipsis_14l1h_1", as = oe((e) => {
102
102
  const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
103
103
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], fill: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "48" }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "85", y2: "50.5", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "49.5", y2: "74", children: k("animateTransform", { attributeName: "transform", dur: 7.5 * n + "s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
104
- }), ii = oe((e) => {
104
+ }), ai = oe((e) => {
105
105
  const { sx: r, speed: n = 1.5, size: t = 70, ...s } = e;
106
106
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600] }, "& .secondary": { stroke: (a) => a.palette.grey[600], fill: "none", opacity: 0.5 }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "secondary", strokeWidth: "4", cx: "50", cy: "50", r: "21" }), k("path", { className: "primary", d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50", children: k("animateTransform", { attributeName: "transform", type: "rotate", dur: 1 * n + "s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
107
- }), is = oe((e) => {
107
+ }), ss = oe((e) => {
108
108
  const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
109
109
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "26", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "46", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.3" }) })] }) });
110
- }), as = oe((e) => {
110
+ }), ls = oe((e) => {
111
111
  const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
112
112
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600], stroke: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 15 ; 0 -15; 0 15", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "30", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 10 ; 0 -10; 0 10", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "54", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" }) })] }) });
113
- }), ss = oe((e) => {
113
+ }), cs = oe((e) => {
114
114
  const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
115
115
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (a) => a.palette.grey[600], opacity: 0.8, stroke: (a) => a.palette.background.paper }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "44" }), k("circle", { className: "secondary", strokeWidth: "3", cx: "8", cy: "54", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 48", to: "360 50 52", repeatCount: "indefinite" }) })] }) });
116
- }), ls = oe((e) => {
116
+ }), us = oe((e) => {
117
117
  const { sx: r, speed: n = 1, size: t = 13, width: s = 64, height: a = 17, ...o } = e;
118
- return J(X, { sx: { width: `${s}px`, height: `${a}px`, "& .primary": { backgroundColor: (c) => c.palette.grey[600], top: `${(a - t) / 2}px`, width: () => `${t}px`, height: () => `${t}px` }, ...r }, className: Oe(oi, "animated-icon"), ...o, children: [k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" })] });
119
- }), ai = k(ii, {}), si = oe(de((e, r) => {
120
- const { sx: n, style: t, onMount: s, onUnmount: a, transitionDelay: o = "1200ms", panel: c = !1, transparentBackground: i = !0, icon: l = ai, label: p, ...x } = e, m = Z(() => typeof p == "string" ? k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: p }) : p, [p]), b = ge(null), v = Z(() => {
121
- let f = J(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [m, l] });
122
- return c === !0 && (f = k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (u) => u.palette.info.light, color: (u) => u.palette.info.contrastText, paddingLeft: (u) => u.spacing(2), paddingRight: (u) => u.spacing(2), paddingTop: (u) => u.spacing(2), paddingBottom: (u) => u.spacing(1), rowGap: (u) => u.spacing(1), borderRadius: (u) => `${u.shape.borderRadius}px`, boxShadow: (u) => u.shadows[2], "& .primary": { background: (u) => `${me(u.palette.info.contrastText, 0.9)} !important`, boxShadow: (u) => `0 0 0 1px ${u.palette.mode === "dark" ? u.palette.text.secondary : u.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: f })), k(X, { ref: At([b, r]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: i ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: o, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n, ...t }, ...x, children: J(X, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { opacity: (u) => i ? 1.5 * u.palette.action.disabledOpacity : void 0, background: (u) => i ? void 0 : u.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (u) => `${u.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), f] }) });
123
- }, [n, c]), g = ge(!1), h = ge(!1);
118
+ return J(X, { sx: { width: `${s}px`, height: `${a}px`, "& .primary": { backgroundColor: (l) => l.palette.grey[600], top: `${(a - t) / 2}px`, width: () => `${t}px`, height: () => `${t}px` }, ...r }, className: Oe(ii, "animated-icon"), ...o, children: [k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" })] });
119
+ }), si = k(ai, {}), li = oe(de((e, r) => {
120
+ const { sx: n, style: t, onMount: s, onUnmount: a, transitionDelay: o = "1200ms", panel: l = !1, transparentBackground: i = !0, icon: c = si, label: f, ...x } = e, y = Z(() => typeof f == "string" ? k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: f }) : f, [f]), b = ge(null), v = Z(() => {
121
+ let p = J(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [y, c] });
122
+ return l === !0 && (p = k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (u) => u.palette.info.light, color: (u) => u.palette.info.contrastText, paddingLeft: (u) => u.spacing(2), paddingRight: (u) => u.spacing(2), paddingTop: (u) => u.spacing(2), paddingBottom: (u) => u.spacing(1), rowGap: (u) => u.spacing(1), borderRadius: (u) => `${u.shape.borderRadius}px`, boxShadow: (u) => u.shadows[2], "& .primary": { background: (u) => `${me(u.palette.info.contrastText, 0.9)} !important`, boxShadow: (u) => `0 0 0 1px ${u.palette.mode === "dark" ? u.palette.text.secondary : u.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: p })), k(X, { ref: At([b, r]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: i ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: o, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n, ...t }, ...x, children: J(X, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { opacity: (u) => i ? 1.5 * u.palette.action.disabledOpacity : void 0, background: (u) => i ? void 0 : u.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (u) => `${u.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), p] }) });
123
+ }, [n, l]), m = ge(!1), h = ge(!1);
124
124
  return Vr(() => {
125
- if (b.current && !g.current && !h.current) {
125
+ if (b.current && !m.current && !h.current) {
126
126
  if (h.current = !0, b.current.classList.contains("animatable") && !b.current.classList.contains("animating")) {
127
- let f = !1;
127
+ let p = !1;
128
128
  const u = () => {
129
- h.current && (g.current = !0, h.current = !1, f = !0, s?.());
129
+ h.current && (m.current = !0, h.current = !1, p = !0, s?.());
130
130
  };
131
131
  b.current && b.current.addEventListener("transitionrun", u, { once: !0, capture: !0, passive: !0 }), h.current && b.current && (window.getComputedStyle(b.current, null).opacity, b.current.classList.add("animating")), setTimeout(() => {
132
- !f && h.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
132
+ !p && h.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
133
133
  }, 100);
134
- } else g.current = !0, h.current = !1, s?.();
134
+ } else m.current = !0, h.current = !1, s?.();
135
135
  return () => {
136
136
  };
137
137
  }
138
138
  }, [b.current]), Se(() => () => {
139
- g.current && (b.current?.classList.remove("animating"), g.current = !1, h.current = !1, a?.());
139
+ m.current && (b.current?.classList.remove("animating"), m.current = !1, h.current = !1, a?.());
140
140
  }, []), v;
141
141
  }));
142
- si.displayName = "LoadingPanel";
143
- const li = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?):(\d+):(\d+)\s*$/, Mn = (e) => {
142
+ li.displayName = "LoadingPanel";
143
+ const ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, ui = /^\s*at\s+(?:(async|new|await)\s+)?(.+?):(\d+):(\d+)\s*$/, Mn = (e) => {
144
144
  if (!e) return "";
145
145
  try {
146
146
  e = new URL(e).pathname;
@@ -150,74 +150,69 @@ const li = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, c
150
150
  }, Lr = oe(({ error: e, maxLines: r = Number.MAX_SAFE_INTEGER, hideLineNumbers: n = !1 }) => {
151
151
  const [t, s] = ne(null);
152
152
  if (!e?.stack) return null;
153
- const a = ((l) => {
154
- const p = [], x = (m, b = 0) => {
155
- m && (p.push({ error: m, depth: b }), m.cause && m.cause instanceof Error && x(m.cause, b + 1));
156
- };
157
- return x(l), p.reverse();
158
- })(e).reverse(), o = [];
159
- a.forEach(({ error: l }, p) => {
160
- const x = (l.stack || "").split(`
161
- `).filter(Boolean).map((m) => {
162
- let b = m.match(li);
153
+ const a = Qo.collectErrorChain(e).reverse(), o = [];
154
+ a.forEach(({ error: c }, f) => {
155
+ const x = (c.stack || "").split(`
156
+ `).filter(Boolean).map((y) => {
157
+ let b = y.match(ci);
163
158
  if (b) {
164
- const [, v = "", g, h, f, u] = b;
165
- return { line: `at ${v ? v + " " : ""}${g}`, location: `${Mn(h).split(/[\\/]/).pop()}:${f}:${u}` };
159
+ const [, v = "", m, h, p, u] = b;
160
+ return { line: `at ${v ? v + " " : ""}${m}`, location: `${Mn(h).split(/[\\/]/).pop()}:${p}:${u}` };
166
161
  }
167
- if (b = m.match(ci), b) {
168
- const [, v = "", g, h, f] = b, u = Mn(g), w = `${u.split(/[\\/]/).pop()}:${h}:${f}`;
169
- return { line: `at ${v ? v + " " : ""}${w}`, location: u !== w ? `${u}:${h}:${f}` : void 0 };
162
+ if (b = y.match(ui), b) {
163
+ const [, v = "", m, h, p] = b, u = Mn(m), w = `${u.split(/[\\/]/).pop()}:${h}:${p}`;
164
+ return { line: `at ${v ? v + " " : ""}${w}`, location: u !== w ? `${u}:${h}:${p}` : void 0 };
170
165
  }
171
- return { line: m.trim() };
166
+ return { line: y.trim() };
172
167
  });
173
- x.length && (o.push({ line: p ? `Caused by: ${x[0].line}` : x[0].line, isBoundary: !0 }), o.push(...x.slice(1)));
168
+ x.length && (o.push({ line: f ? `Caused by: ${x[0].line}` : x[0].line, isBoundary: !0 }), o.push(...x.slice(1)));
174
169
  });
175
- const c = r ? o.slice(0, r) : o, i = r && o.length > r;
170
+ const l = r ? o.slice(0, r) : o, i = r && o.length > r;
176
171
  return J(X, { sx: { width: "100%", mt: 1 }, children: [J(X, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", a.length > 1 ? ` (${a.length} frames)` : "", ")"] }), k(X, { sx: { flex: 1 } }), t && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: t }), k(Ze, { size: "small", onClick: async () => {
177
172
  try {
178
- let l = 0;
179
- const p = o.map((x) => {
180
- if (x.isBoundary) return l = 0, x.line;
181
- l++;
182
- let m = x.location && x.line !== x.location ? `${x.line} (${x.location})` : x.line;
183
- return l >= 1 && (m = ` ${m}`), m;
173
+ let c = 0;
174
+ const f = o.map((x) => {
175
+ if (x.isBoundary) return c = 0, x.line;
176
+ c++;
177
+ let y = x.location && x.line !== x.location ? `${x.line} (${x.location})` : x.line;
178
+ return c >= 1 && (y = ` ${y}`), y;
184
179
  }).join(`
185
180
  `);
186
- await navigator.clipboard.writeText(p), s("Copied!"), setTimeout(() => s(null), 2e3);
187
- } catch (l) {
188
- s("Can't copy!"), console.warn("Failed to copy stack trace:", l);
181
+ await navigator.clipboard.writeText(f), s("Copied!"), setTimeout(() => s(null), 2e3);
182
+ } catch (c) {
183
+ s("Can't copy!"), console.warn("Failed to copy stack trace:", c);
189
184
  }
190
185
  }, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: k(be, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), k(Ze, { size: "small", onClick: () => {
191
186
  s("Logged!"), setTimeout(() => s(null), 2e3), console.log(e);
192
- }, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: k(be, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), J(X, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [c.map((l, p) => l.isBoundary ? k(X, { sx: { py: 1, mt: p > 0 ? 1 : 0, mb: 0.5, borderTop: p > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (x) => l.isBoundary ? x.palette.text.primary : x.palette.text.secondary, display: "block" }, children: l.line }) }, `error-${p}`) : J(X, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: p + 1 }), J(X, { sx: { flex: 1, overflow: "hidden" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: l.line }), l.location && l.line !== l.location && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: l.location })] })] }, `stack-${p}`)), i && J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", o.length - r, " more frames"] })] })] });
187
+ }, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: k(be, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), J(X, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [l.map((c, f) => c.isBoundary ? k(X, { sx: { py: 1, mt: f > 0 ? 1 : 0, mb: 0.5, borderTop: f > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (x) => c.isBoundary ? x.palette.text.primary : x.palette.text.secondary, display: "block" }, children: c.line }) }, `error-${f}`) : J(X, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: f + 1 }), J(X, { sx: { flex: 1, overflow: "hidden" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: c.line }), c.location && c.line !== c.location && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: c.location })] })] }, `stack-${f}`)), i && J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", o.length - r, " more frames"] })] })] });
193
188
  });
194
189
  Lr.displayName = "StackTrace";
195
- const ui = (e, r = !1, n = !1) => {
190
+ const di = (e, r = !1, n = !1) => {
196
191
  if (q.isValidElement(e)) return e;
197
192
  if (e instanceof Error) return J(X, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: e.message }), e.cause ? J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", e.cause instanceof Error ? e.cause.message : String(e.cause)] }) : null, !r && k(Lr, { error: e, hideLineNumbers: !0 })] });
198
193
  const t = e === "string" ? e : `Unknown Error: ${String(e)}`;
199
194
  return k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: t });
200
- }, di = oe(de((e, r) => {
201
- const { sx: n, icon: t = k(be, { iconKey: "Error", style: { fontSize: 48 } }), error: s, hideStackTrace: a = !1, stackTraceExpanded: o = !1, ...c } = e, i = Z(() => ui(s, a, o), [s, a, o]);
202
- return Z(() => k(X, { ref: r, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n }, ...c, children: J(X, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (l) => `${l.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (l) => l.palette.error.light, color: (l) => l.palette.error.contrastText, paddingLeft: (l) => l.spacing(2), paddingRight: (l) => l.spacing(2), paddingTop: (l) => l.spacing(2), paddingBottom: (l) => l.spacing(2), borderRadius: (l) => `${l.shape.borderRadius}px`, boxShadow: (l) => l.shadows[2], "& .primary": { background: (l) => `${l.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: k(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (l) => l.spacing(2), width: "100%", maxWidth: "600px" }, children: J(X, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (l) => l.spacing(2) }, children: [t, i] }) }) })] }) }), [n]);
195
+ }, pi = oe(de((e, r) => {
196
+ const { sx: n, icon: t = k(be, { iconKey: "Error", style: { fontSize: 48 } }), error: s, hideStackTrace: a = !1, stackTraceExpanded: o = !1, ...l } = e, i = Z(() => di(s, a, o), [s, a, o]);
197
+ return Z(() => k(X, { ref: r, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n }, ...l, children: J(X, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (c) => `${c.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (c) => c.palette.error.light, color: (c) => c.palette.error.contrastText, paddingLeft: (c) => c.spacing(2), paddingRight: (c) => c.spacing(2), paddingTop: (c) => c.spacing(2), paddingBottom: (c) => c.spacing(2), borderRadius: (c) => `${c.shape.borderRadius}px`, boxShadow: (c) => c.shadows[2], "& .primary": { background: (c) => `${c.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: k(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (c) => c.spacing(2), width: "100%", maxWidth: "600px" }, children: J(X, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (c) => c.spacing(2) }, children: [t, i] }) }) })] }) }), [n]);
203
198
  }));
204
- di.displayName = "ErrorPanel";
199
+ pi.displayName = "ErrorPanel";
205
200
  const Br = oe(de((e, r) => {
206
201
  const { chips: n, sx: t, ...s } = e, a = q.useMemo(() => {
207
202
  if (!n) return null;
208
203
  let o = null;
209
204
  o = Array.isArray(n) ? n : [n];
210
- const c = [], i = o.length;
211
- for (let l = 0; l < i; l++) {
212
- const p = o[l];
205
+ const l = [], i = o.length;
206
+ for (let c = 0; c < i; c++) {
207
+ const f = o[c];
213
208
  let x = null;
214
- typeof p == "string" ? x = k(Lo, { label: p, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + l) : q.cloneElement(p, { key: "chip-" + l }), c.push(x);
209
+ typeof f == "string" ? x = k(Lo, { label: f, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + c) : q.cloneElement(f, { key: "chip-" + c }), l.push(x);
215
210
  }
216
- return c;
211
+ return l;
217
212
  }, [n]);
218
213
  return k(X, { ref: r, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...t }, ...s, children: a });
219
214
  }));
220
- var Zt = "top", Nt = "bottom", en = "right", jr = "left", pi = [Zt, Nt, en, jr], $r = "viewport", ht = "popper";
215
+ var Zt = "top", Nt = "bottom", en = "right", jr = "left", fi = [Zt, Nt, en, jr], $r = "viewport", ht = "popper";
221
216
  function nt(e) {
222
217
  return e ? (e.nodeName || "").toLowerCase() : null;
223
218
  }
@@ -252,13 +247,13 @@ function fn(e, r, n) {
252
247
  r === void 0 && (r = !1), n === void 0 && (n = !1);
253
248
  var t = e.getBoundingClientRect(), s = 1, a = 1;
254
249
  r && ct(e) && (s = e.offsetWidth > 0 && Pn(t.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Pn(t.height) / e.offsetHeight || 1);
255
- var o = (lt(e) ? We(e) : window).visualViewport, c = !zr() && n, i = (t.left + (c && o ? o.offsetLeft : 0)) / s, l = (t.top + (c && o ? o.offsetTop : 0)) / a, p = t.width / s, x = t.height / a;
256
- return { width: p, height: x, top: l, right: i + p, bottom: l + x, left: i, x: i, y: l };
250
+ var o = (lt(e) ? We(e) : window).visualViewport, l = !zr() && n, i = (t.left + (l && o ? o.offsetLeft : 0)) / s, c = (t.top + (l && o ? o.offsetTop : 0)) / a, f = t.width / s, x = t.height / a;
251
+ return { width: f, height: x, top: c, right: i + f, bottom: c + x, left: i, x: i, y: c };
257
252
  }
258
253
  function Qe(e) {
259
254
  return We(e).getComputedStyle(e);
260
255
  }
261
- function fi(e) {
256
+ function hi(e) {
262
257
  return ["table", "td", "th"].indexOf(nt(e)) >= 0;
263
258
  }
264
259
  function st(e) {
@@ -270,8 +265,8 @@ function $t(e) {
270
265
  function Rn(e) {
271
266
  return ct(e) && Qe(e).position !== "fixed" ? e.offsetParent : null;
272
267
  }
273
- function hi(e) {
274
- for (var r = We(e), n = Rn(e); n && fi(n) && Qe(n).position === "static"; ) n = Rn(n);
268
+ function mi(e) {
269
+ for (var r = We(e), n = Rn(e); n && hi(n) && Qe(n).position === "static"; ) n = Rn(n);
275
270
  return n && (nt(n) === "html" || nt(n) === "body" && Qe(n).position === "static") ? r : n || (function(t) {
276
271
  var s = /firefox/i.test(tn());
277
272
  if (/Trident/i.test(tn()) && ct(t) && Qe(t).position === "fixed") return null;
@@ -301,65 +296,65 @@ function Ur(e) {
301
296
  function Yr(e, r) {
302
297
  var n;
303
298
  r === void 0 && (r = []);
304
- var t = Ur(e), s = t === ((n = e.ownerDocument) == null ? void 0 : n.body), a = We(t), o = s ? [a].concat(a.visualViewport || [], Hr(t) ? t : []) : t, c = r.concat(o);
305
- return s ? c : c.concat(Yr($t(o)));
299
+ var t = Ur(e), s = t === ((n = e.ownerDocument) == null ? void 0 : n.body), a = We(t), o = s ? [a].concat(a.visualViewport || [], Hr(t) ? t : []) : t, l = r.concat(o);
300
+ return s ? l : l.concat(Yr($t(o)));
306
301
  }
307
302
  function nn(e) {
308
303
  return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
309
304
  }
310
305
  function Fn(e, r, n) {
311
306
  return r === $r ? nn((function(t, s) {
312
- var a = We(t), o = st(t), c = a.visualViewport, i = o.clientWidth, l = o.clientHeight, p = 0, x = 0;
313
- if (c) {
314
- i = c.width, l = c.height;
315
- var m = zr();
316
- (m || !m && s === "fixed") && (p = c.offsetLeft, x = c.offsetTop);
307
+ var a = We(t), o = st(t), l = a.visualViewport, i = o.clientWidth, c = o.clientHeight, f = 0, x = 0;
308
+ if (l) {
309
+ i = l.width, c = l.height;
310
+ var y = zr();
311
+ (y || !y && s === "fixed") && (f = l.offsetLeft, x = l.offsetTop);
317
312
  }
318
- return { width: i, height: l, x: p + Nn(t), y: x };
313
+ return { width: i, height: c, x: f + Nn(t), y: x };
319
314
  })(e, n)) : lt(r) ? (function(t, s) {
320
315
  var a = fn(t, !1, s === "fixed");
321
316
  return a.top = a.top + t.clientTop, a.left = a.left + t.clientLeft, a.bottom = a.top + t.clientHeight, a.right = a.left + t.clientWidth, a.width = t.clientWidth, a.height = t.clientHeight, a.x = a.left, a.y = a.top, a;
322
317
  })(r, n) : nn((function(t) {
323
- var s, a = st(t), o = Wr(t), c = (s = t.ownerDocument) == null ? void 0 : s.body, i = wt(a.scrollWidth, a.clientWidth, c ? c.scrollWidth : 0, c ? c.clientWidth : 0), l = wt(a.scrollHeight, a.clientHeight, c ? c.scrollHeight : 0, c ? c.clientHeight : 0), p = -o.scrollLeft + Nn(t), x = -o.scrollTop;
324
- return Qe(c || a).direction === "rtl" && (p += wt(a.clientWidth, c ? c.clientWidth : 0) - i), { width: i, height: l, x: p, y: x };
318
+ var s, a = st(t), o = Wr(t), l = (s = t.ownerDocument) == null ? void 0 : s.body, i = wt(a.scrollWidth, a.clientWidth, l ? l.scrollWidth : 0, l ? l.clientWidth : 0), c = wt(a.scrollHeight, a.clientHeight, l ? l.scrollHeight : 0, l ? l.clientHeight : 0), f = -o.scrollLeft + Nn(t), x = -o.scrollTop;
319
+ return Qe(l || a).direction === "rtl" && (f += wt(a.clientWidth, l ? l.clientWidth : 0) - i), { width: i, height: c, x: f, y: x };
325
320
  })(st(e)));
326
321
  }
327
- function mi(e) {
328
- var r = Yr($t(e)), n = ["absolute", "fixed"].indexOf(Qe(e).position) >= 0 && ct(e) ? hi(e) : e;
322
+ function gi(e) {
323
+ var r = Yr($t(e)), n = ["absolute", "fixed"].indexOf(Qe(e).position) >= 0 && ct(e) ? mi(e) : e;
329
324
  return lt(n) ? r.filter(function(t) {
330
325
  return lt(t) && (function(s, a) {
331
326
  var o = a.getRootNode && a.getRootNode();
332
327
  if (s.contains(a)) return !0;
333
328
  if (o && pn(o)) {
334
- var c = a;
329
+ var l = a;
335
330
  do {
336
- if (c && s.isSameNode(c)) return !0;
337
- c = c.parentNode || c.host;
338
- } while (c);
331
+ if (l && s.isSameNode(l)) return !0;
332
+ l = l.parentNode || l.host;
333
+ } while (l);
339
334
  }
340
335
  return !1;
341
336
  })(t, n) && nt(t) !== "body";
342
337
  }) : [];
343
338
  }
344
- function gi(e, r) {
339
+ function yi(e, r) {
345
340
  r === void 0 && (r = {});
346
- var n, t = r, s = t.placement, a = s === void 0 ? e.placement : s, o = t.strategy, c = o === void 0 ? e.strategy : o, i = t.boundary, l = i === void 0 ? "clippingParents" : i, p = t.rootBoundary, x = p === void 0 ? $r : p, m = t.elementContext, b = m === void 0 ? ht : m, v = t.altBoundary, g = v !== void 0 && v, h = t.padding, f = h === void 0 ? 0 : h, u = (function(A) {
341
+ var n, t = r, s = t.placement, a = s === void 0 ? e.placement : s, o = t.strategy, l = o === void 0 ? e.strategy : o, i = t.boundary, c = i === void 0 ? "clippingParents" : i, f = t.rootBoundary, x = f === void 0 ? $r : f, y = t.elementContext, b = y === void 0 ? ht : y, v = t.altBoundary, m = v !== void 0 && v, h = t.padding, p = h === void 0 ? 0 : h, u = (function(A) {
347
342
  return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, A);
348
- })(typeof f != "number" ? f : (n = f, pi.reduce(function(A, V) {
343
+ })(typeof p != "number" ? p : (n = p, fi.reduce(function(A, V) {
349
344
  return A[V] = n, A;
350
- }, {}))), w = b === ht ? "reference" : ht, E = e.rects.popper, T = e.elements[g ? w : b], L = (function(A, V, B, z) {
351
- var ie = V === "clippingParents" ? mi(A) : [].concat(V), K = [].concat(ie, [B]), Q = K[0], re = K.reduce(function(se, ee) {
345
+ }, {}))), w = b === ht ? "reference" : ht, E = e.rects.popper, T = e.elements[m ? w : b], L = (function(A, V, B, z) {
346
+ var ie = V === "clippingParents" ? gi(A) : [].concat(V), G = [].concat(ie, [B]), Q = G[0], re = G.reduce(function(se, ee) {
352
347
  var le = Fn(A, ee, z);
353
348
  return se.top = wt(le.top, se.top), se.right = Tn(le.right, se.right), se.bottom = Tn(le.bottom, se.bottom), se.left = wt(le.left, se.left), se;
354
349
  }, Fn(A, Q, z));
355
350
  return re.width = re.right - re.left, re.height = re.bottom - re.top, re.x = re.left, re.y = re.top, re;
356
- })(lt(T) ? T : T.contextElement || st(e.elements.popper), l, x, c), O = fn(e.elements.reference), R = (function(A) {
357
- var V, B = A.reference, z = A.element, ie = A.placement, K = ie ? (function(ce) {
351
+ })(lt(T) ? T : T.contextElement || st(e.elements.popper), c, x, l), O = fn(e.elements.reference), R = (function(A) {
352
+ var V, B = A.reference, z = A.element, ie = A.placement, G = ie ? (function(ce) {
358
353
  return ce.split("-")[0];
359
354
  })(ie) : null, Q = ie ? (function(ce) {
360
355
  return ce.split("-")[1];
361
356
  })(ie) : null, re = B.x + B.width / 2 - z.width / 2, se = B.y + B.height / 2 - z.height / 2;
362
- switch (K) {
357
+ switch (G) {
363
358
  case Zt:
364
359
  V = { x: re, y: B.y - z.height };
365
360
  break;
@@ -375,9 +370,9 @@ function gi(e, r) {
375
370
  default:
376
371
  V = { x: B.x, y: B.y };
377
372
  }
378
- var ee = K ? (function(ce) {
373
+ var ee = G ? (function(ce) {
379
374
  return ["top", "bottom"].indexOf(ce) >= 0 ? "x" : "y";
380
- })(K) : null;
375
+ })(G) : null;
381
376
  if (ee != null) {
382
377
  var le = ee === "y" ? "height" : "width";
383
378
  switch (Q) {
@@ -399,22 +394,22 @@ function gi(e, r) {
399
394
  }
400
395
  return P;
401
396
  }
402
- const yi = { name: "maxSize", enabled: !0, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e) {
403
- var r = e.state, n = e.name, t = gi(r, e.options), s = r.modifiersData.preventOverflow || { x: 0, y: 0 }, a = s.x, o = s.y;
404
- let c = r.rects.popper, i = c.width, l = c.height, p = r.placement.split("-")[0], x = p === "left" ? "left" : "right", m = p === "top" ? "top" : "bottom";
405
- r.modifiersData[n] = { width: i - t[x] - a, height: l - t[m] - o };
406
- } }, bi = [0, 2], Kr = oe(de((e, r) => {
407
- const { sx: n, open: t, children: s, label: a, offsets: o = bi, anchorEl: c, anchorPosition: i, onMount: l, onOpening: p, onOpen: x, onClosing: m, onClose: b, resizeOnOverflow: v = !0, ...g } = e;
397
+ const bi = { name: "maxSize", enabled: !0, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e) {
398
+ var r = e.state, n = e.name, t = yi(r, e.options), s = r.modifiersData.preventOverflow || { x: 0, y: 0 }, a = s.x, o = s.y;
399
+ let l = r.rects.popper, i = l.width, c = l.height, f = r.placement.split("-")[0], x = f === "left" ? "left" : "right", y = f === "top" ? "top" : "bottom";
400
+ r.modifiersData[n] = { width: i - t[x] - a, height: c - t[y] - o };
401
+ } }, vi = [0, 2], Gr = oe(de((e, r) => {
402
+ const { sx: n, open: t, children: s, label: a, offsets: o = vi, anchorEl: l, anchorPosition: i, onMount: c, onOpening: f, onOpen: x, onClosing: y, onClose: b, resizeOnOverflow: v = !0, ...m } = e;
408
403
  if (Array.isArray(s)) throw new Error("children can not be an array");
409
- const h = dn(), f = { name: "applyMaxSize", enabled: !0, phase: "beforeWrite", requires: ["maxSize"], fn({ state: K }) {
410
- const { height: Q } = K.modifiersData.maxSize;
411
- K.styles.popper.maxHeight = Q - 10 + "px";
404
+ const h = dn(), p = { name: "applyMaxSize", enabled: !0, phase: "beforeWrite", requires: ["maxSize"], fn({ state: G }) {
405
+ const { height: Q } = G.modifiersData.maxSize;
406
+ G.styles.popper.maxHeight = Q - 10 + "px";
412
407
  } }, u = Z(() => {
413
- const K = [{ name: "offset", options: { offset: o } }, { name: "flip", enabled: !0, options: { rootBoundary: "document" } }];
414
- return v && K.unshift(yi, f), K;
408
+ const G = [{ name: "offset", options: { offset: o } }, { name: "flip", enabled: !0, options: { rootBoundary: "document" } }];
409
+ return v && G.unshift(bi, p), G;
415
410
  }, [v, o]), [w, E] = ne(!1), T = q.useRef(null), L = ae(() => {
416
- l?.(I.current, T.current);
417
- }, [p]), O = ae(p, [p]), R = ae(x, [x]), S = ae(m, [m]), D = ae(() => {
411
+ c?.(I.current, T.current);
412
+ }, [f]), O = ae(f, [f]), R = ae(x, [x]), S = ae(y, [y]), D = ae(() => {
418
413
  E(!1), b?.();
419
414
  }, [b]), [P, M] = ne(!1), I = q.useRef(null), A = q.useRef(!0), V = Z(() => ({ onFirstUpdate: () => {
420
415
  A.current && (M(!0), L?.(), A.current = !1);
@@ -422,45 +417,45 @@ const yi = { name: "maxSize", enabled: !0, phase: "main", requiresIfExists: ["of
422
417
  Se(() => {
423
418
  t && P ? O?.() : !t && w && S?.(), t && E(t);
424
419
  }, [t, P]);
425
- const B = Z(() => ({ getBoundingClientRect: () => i ? new DOMRect(i?.left || 0, i?.top || 0, 0, 0) : c.getBoundingClientRect() }), [i, c]);
420
+ const B = Z(() => ({ getBoundingClientRect: () => i ? new DOMRect(i?.left || 0, i?.top || 0, 0, 0) : l.getBoundingClientRect() }), [i, l]);
426
421
  Po(r, () => ({ instance: () => T.current, element: () => I.current }), []);
427
422
  const { getPortalContainer: z } = ln(), ie = Z(() => ({ zIndex: t ? "1300" : "1299", display: "flex", pointerEvents: w && t ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...n }), [n, t, w]);
428
- return k(Bo, { ref: I, popperRef: T, container: z, anchorEl: B, open: w, role: void 0, popperOptions: V, transition: !0, sx: ie, placement: "bottom-start", modifiers: u, ...g, children: ({ TransitionProps: K, placement: Q, ...re }) => {
429
- const { in: se, onEnter: ee, onExited: le, ...ce } = K ?? {};
423
+ return k(Bo, { ref: I, popperRef: T, container: z, anchorEl: B, open: w, role: void 0, popperOptions: V, transition: !0, sx: ie, placement: "bottom-start", modifiers: u, ...m, children: ({ TransitionProps: G, placement: Q, ...re }) => {
424
+ const { in: se, onEnter: ee, onExited: le, ...ce } = G ?? {};
430
425
  return k(jo, { ...ce, in: t, onEnter: () => {
431
426
  ee?.(), R();
432
427
  }, onExited: () => {
433
428
  le?.(), D();
434
- }, timeout: { enter: h.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: Q === "bottom-start" ? "left top" : "center bottom" }, children: typeof s == "function" ? s({ TransitionProps: K, placement: Q, ...re }) : s || Te.EmptyArray });
429
+ }, timeout: { enter: h.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: Q === "bottom-start" ? "left top" : "center bottom" }, children: typeof s == "function" ? s({ TransitionProps: G, placement: Q, ...re }) : s || Te.EmptyArray });
435
430
  } });
436
431
  }));
437
- Kr.displayName = "ExhibitPopper";
438
- const cs = (e) => {
432
+ Gr.displayName = "ExhibitPopper";
433
+ const ds = (e) => {
439
434
  if (e.palette.mode === "dark")
440
435
  return `drop-shadow(0px 0px 1px ${e.palette.mode === "dark" ? e.palette.text.primary : e.palette.divider})`;
441
- }, us = (e = 1) => (r) => {
436
+ }, ps = (e = 1) => (r) => {
442
437
  if (r.palette.mode !== "dark") return;
443
438
  const n = r.palette.mode === "dark" ? r.palette.text.primary : r.palette.divider;
444
439
  return `drop-shadow(0px 0px ${e}px ${n})`;
445
- }, Xr = (e) => k(be, { ...e, iconKey: "ArrowDownOutline" }), vi = (e) => k(be, { ...e, iconKey: "ArrowRightOutline" }), ds = Zo(oe(de((e, r) => {
446
- const { sx: n, size: t = "small", activeColor: s, children: a, className: o, ...c } = e;
447
- let i = "1rem", l = "1rem";
448
- return t === "medium" ? (i = "1.25rem", l = "1.25rem") : t === "large" && (i = "1.5rem", l = "1.5rem"), k(X, { ref: r, className: Oe("icon", o), sx: { width: i, height: l, ...n }, ...c, children: a });
449
- })))(({ theme: e }) => ({ fill: "currentColor", "& .activeColor": { fill: e.palette.primary.main }, "& .styled.high_contrast": { fill: e.palette.primary.main }, "& .styled.background": { fill: e.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e.palette.secondary.main }, "& .styled.secondary_dark": { fill: e.palette.secondary.dark }, "& .styled.secondary_light": { fill: e.palette.secondary.light }, "& .styled.info": { fill: e.palette.info.main }, "& .styled.info.stroked": { stroke: e.palette.info.main }, "& .styled.info_dark": { fill: e.palette.info.dark }, "& .styled.info_light": { fill: e.palette.info.light }, "& .styled.warning": { fill: e.palette.warning.main }, "& .styled.warning.stroked": { stroke: e.palette.warning.main }, "& .styled.warning_dark": { fill: e.palette.warning.dark }, "& .styled.warning_light": { fill: e.palette.warning.light }, "& .styled.error.info": { fill: e.palette.error.main }, "& .styled.error.stroked": { stroke: e.palette.error.main }, "& .styled.error_dark": { fill: e.palette.error.dark }, "& .styled.error_light": { fill: e.palette.error.light }, "& .styled.success": { fill: e.palette.success.main }, "& .styled.success_dark": { fill: e.palette.success.dark }, "& .styled.success_light": { fill: e.palette.success.light }, "& .styled.grey": { fill: e.palette.text.icon ?? e.palette.action.active } })), xi = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, wi = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, ki = function(e, r = null) {
440
+ }, Xr = (e) => k(be, { ...e, iconKey: "ArrowDownOutline" }), xi = (e) => k(be, { ...e, iconKey: "ArrowRightOutline" }), fs = ei(oe(de((e, r) => {
441
+ const { sx: n, size: t = "small", activeColor: s, children: a, className: o, ...l } = e;
442
+ let i = "1rem", c = "1rem";
443
+ return t === "medium" ? (i = "1.25rem", c = "1.25rem") : t === "large" && (i = "1.5rem", c = "1.5rem"), k(X, { ref: r, className: Oe("icon", o), sx: { width: i, height: c, ...n }, ...l, children: a });
444
+ })))(({ theme: e }) => ({ fill: "currentColor", "& .activeColor": { fill: e.palette.primary.main }, "& .styled.high_contrast": { fill: e.palette.primary.main }, "& .styled.background": { fill: e.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e.palette.secondary.main }, "& .styled.secondary_dark": { fill: e.palette.secondary.dark }, "& .styled.secondary_light": { fill: e.palette.secondary.light }, "& .styled.info": { fill: e.palette.info.main }, "& .styled.info.stroked": { stroke: e.palette.info.main }, "& .styled.info_dark": { fill: e.palette.info.dark }, "& .styled.info_light": { fill: e.palette.info.light }, "& .styled.warning": { fill: e.palette.warning.main }, "& .styled.warning.stroked": { stroke: e.palette.warning.main }, "& .styled.warning_dark": { fill: e.palette.warning.dark }, "& .styled.warning_light": { fill: e.palette.warning.light }, "& .styled.error.info": { fill: e.palette.error.main }, "& .styled.error.stroked": { stroke: e.palette.error.main }, "& .styled.error_dark": { fill: e.palette.error.dark }, "& .styled.error_light": { fill: e.palette.error.light }, "& .styled.success": { fill: e.palette.success.main }, "& .styled.success_dark": { fill: e.palette.success.dark }, "& .styled.success_light": { fill: e.palette.success.light }, "& .styled.grey": { fill: e.palette.text.icon ?? e.palette.action.active } })), wi = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ki = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Si = function(e, r = null) {
450
445
  if (!e) return e;
451
- e = e.replace(xi, function(t, s, a, o) {
446
+ e = e.replace(wi, function(t, s, a, o) {
452
447
  return s + s + a + a + o + o;
453
448
  });
454
- let n = wi.exec(e);
449
+ let n = ki.exec(e);
455
450
  return n ? r === null ? `rgb(${parseInt(n[1], 16)}, ${parseInt(n[2], 16)}, ${parseInt(n[3], 16)})` : `rgb(${parseInt(n[1], 16)} ${parseInt(n[2], 16)} ${parseInt(n[3], 16)} / ${100 * r}%)` : e;
456
451
  }, _n = function(e, r = 0.2, n = "light") {
457
452
  if (!e) return e;
458
453
  let t = n !== "dark";
459
- return r < 0 && (t = !t, r *= -1), e = ki(e), t ? Io(e, Math.max(0, Math.min(1, 1 * r))) : Vo(e, Math.max(0, Math.min(1, 1.5 * r)));
460
- }, ps = function(e) {
454
+ return r < 0 && (t = !t, r *= -1), e = Si(e), t ? Io(e, Math.max(0, Math.min(1, 1 * r))) : Vo(e, Math.max(0, Math.min(1, 1.5 * r)));
455
+ }, hs = function(e) {
461
456
  let r = 0;
462
457
  return r = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, (r / 100).toFixed(2);
463
- }, fs = (e, r) => {
458
+ }, ms = (e, r) => {
464
459
  let n = On({ palette: { mode: e ? "dark" : "light" } });
465
460
  const t = { "--icon-primary": n.palette.primary.main, "--icon-secondary": n.palette.secondary.main, "--icon-secondary-light": n.palette.secondary.light, "--icon-success": n.palette.success.main, "--icon-success-light": n.palette.success.light, "--icon-info": n.palette.info.main, "--icon-warn": n.palette.warning.main, "--icon-error": n.palette.error.main, "--icon-error-light": n.palette.error.light, "--icon-grey": n.palette.text.icon ?? n.palette.action.active, "--icon-shadow": e ? n.palette.text.primary : n.palette.divider, "--icon-size": "1.25rem", "@media (pointer: coarse)": { "--icon-size": "1.75rem" } };
466
461
  let s = { typography: {}, palette: { mode: e ? "dark" : "light", text: { secondary: e ? n.palette.text.secondary : me(n.palette.text.secondary, 0.75), icon: e ? me(n.palette.text.secondary, 0.7) : me(n.palette.text.primary, 0.75) } }, components: { MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } }, MuiSelect: { defaultProps: { IconComponent: Xr, MenuProps: { container: () => document.fullscreenElement ?? void 0 } }, styleOverrides: { iconOutlined: { top: "unset" } } }, MuiListItemIcon: { styleOverrides: { root: { minWidth: "0px !important", overflow: "hidden", marginLeft: "0px", marginRight: "6px", padding: "1px 1px", border: "solid transparent 1px", color: "unset" } } }, MuiMenuItem: { styleOverrides: { root: { paddingTop: "2px", paddingBottom: "2px", marginLeft: "4px", marginRight: "4px", paddingLeft: "6px", paddingRight: "18px", borderRadius: "4px", fontSize: "0.875em", "@media (pointer: coarse)": { fontSize: "1em" }, "&.Mui-selected": {} } } }, MuiMenu: { defaultProps: { container: () => document.fullscreenElement ?? void 0 }, styleOverrides: { root: { paddingTop: "2px", paddingBottom: "2px", marginLeft: "4px", marginRight: "4px", paddingLeft: "6px", paddingRight: "18px", borderRadius: "4px", fontSize: "0.875em", "@media (pointer: coarse)": { fontSize: "1em" }, "&.Mui-selected": {} } } }, MuiToolbar: { styleOverrides: { root: { paddingTop: "4px", paddingBottom: "4px", "@media (min-width: 600px)": { paddingTop: "4px", paddingBottom: "4px" } } } }, MuiDivider: { styleOverrides: { root: { marginTop: "4px !important", marginBottom: "4px !important", marginLeft: "0px", marginRight: "0px" } } }, MuiInputBase: { styleOverrides: { root: {} } }, MuiPaper: { styleOverrides: { root: { ...t } } }, MuiPopper: { styleOverrides: { root: { "& .menu": { marginTop: "4px", marginBottom: "4px", borderRadius: "4px" } } } }, SmartInputField: { styleOverrides: { automatic: { transition: "opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms", color: function() {
@@ -470,13 +465,15 @@ const cs = (e) => {
470
465
  } } } } } }, a = s;
471
466
  return r && (a = Pr(s, r)), On(a);
472
467
  };
473
- function Gr(e, r) {
474
- r = Pr({ track: _n(e.palette.background.paper, 0.05, e?.palette.mode), thumb: _n(e.palette.background.paper, 0.3, e?.palette.mode), active: e.palette.primary.main, corner: e.palette.background.paper, outline: !1 }, r || {});
475
- const n = { "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: me(r.track, 0.2), width: "13px", height: "13px" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: r.thumb, backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "13px", height: "13px" }, "& .scrollbar-button:hover:not([disabled])": { fill: r.active }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: 8, backgroundColor: r.thumb, minHeight: "24px", minWidth: "24px", border: `2px solid ${r.track}` }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: r.corner || r.thumb } };
476
- return Te.getOS() === Te.OSType.Firefox && (n["* .pseudo-scrollbar"] = { scrollbarColor: `${r.thumb} transparent` }, n["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: `${r.active} transparent` }), n;
468
+ function Di(e, r) {
469
+ return r = Pr({ track: _n(e.palette.background.paper, 0.05, e?.palette.mode), thumb: _n(e.palette.background.paper, 0.3, e?.palette.mode), active: e.palette.primary.main, corner: e.palette.background.paper, outline: !1 }, r || {}), { "--scrollbar-track-color": me(r.track, 0.2), "--scrollbar-thumb-color": r.thumb, "--scrollbar-button-color": r.button || r.thumb, "--scrollbar-active-color": r.active, "--scrollbar-corner-color": r.corner || r.thumb, "--scrollbar-border-color": r.track, "--scrollbar-width": "13px", "--scrollbar-height": "13px", "--scrollbar-border-radius": "9999px", "--scrollbar-border-width": "2px", "--scrollbar-min-thumb-size": "24px" };
470
+ }
471
+ function Kr(e, r) {
472
+ const n = Di(e, r), t = { ...n, "& .scrollbar, & .vsb-track, & .vsb-thumb": { ...n }, "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: "var(--scrollbar-track-color)", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: "var(--scrollbar-thumb-color)", backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: "var(--scrollbar-border-radius)", backgroundColor: "var(--scrollbar-thumb-color)", minHeight: "var(--scrollbar-min-thumb-size)", minWidth: "var(--scrollbar-min-thumb-size)", border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)" }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" } };
473
+ return Te.getOS() === Te.OSType.Firefox && (t["* .pseudo-scrollbar"] = { scrollbarColor: "var(--scrollbar-thumb-color) transparent" }, t["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: "var(--scrollbar-active-color) transparent" }), t;
477
474
  }
478
- const hs = { Light: "light", Dark: "dark" };
479
- function ms(e) {
475
+ const gs = { Light: "light", Dark: "dark" };
476
+ function ys(e) {
480
477
  const { mode: r } = e || {}, [n, t] = ne(() => {
481
478
  if (r === "light" || r === "dark") return { themeMode: r, source: "prop" };
482
479
  if (typeof document < "u") {
@@ -487,18 +484,18 @@ function ms(e) {
487
484
  });
488
485
  return Se(() => {
489
486
  const s = () => {
490
- if (r) return void (r === n.themeMode && n.source === "prop" || t((l) => ({ ...l, themeMode: r, source: "prop" })));
487
+ if (r) return void (r === n.themeMode && n.source === "prop" || t((c) => ({ ...c, themeMode: r, source: "prop" })));
491
488
  const i = An();
492
489
  if (i) t({ themeMode: i, source: "class" });
493
490
  else {
494
- const l = In();
495
- t({ themeMode: l, source: "media" });
491
+ const c = In();
492
+ t({ themeMode: c, source: "media" });
496
493
  }
497
494
  }, a = new MutationObserver(s), o = [document.documentElement, document.body].filter(Boolean);
498
495
  for (const i of o) a.observe(i, { attributes: !0, attributeFilter: ["class"] });
499
- const c = window.matchMedia("(prefers-color-scheme: dark)");
500
- return c.addEventListener("change", s), s(), () => {
501
- a.disconnect(), c.removeEventListener("change", s);
496
+ const l = window.matchMedia("(prefers-color-scheme: dark)");
497
+ return l.addEventListener("change", s), s(), () => {
498
+ a.disconnect(), l.removeEventListener("change", s);
502
499
  };
503
500
  }, [r]), n;
504
501
  }
@@ -510,30 +507,30 @@ function An() {
510
507
  function In() {
511
508
  return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
512
509
  }
513
- const gs = { Popup: "popup", Anchor: "anchor" }, ys = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, Si = { Toolbar: "toolbar", Menuitem: "menuitem" }, hn = (e) => {
514
- const { closeFloat: r, closeFloatAll: n, floatReference: t, popupContainer: s, children: a, className: o, sx: c, ...i } = e;
515
- return k(X, { className: Oe("menu", o), sx: { display: "flex", flexDirection: "column", ...c }, ...i, children: a });
510
+ const bs = { Popup: "popup", Anchor: "anchor" }, vs = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, Oi = { Toolbar: "toolbar", Menuitem: "menuitem" }, hn = (e) => {
511
+ const { closeFloat: r, closeFloatAll: n, floatReference: t, popupContainer: s, children: a, className: o, sx: l, ...i } = e;
512
+ return k(X, { className: Oe("menu", o), sx: { display: "flex", flexDirection: "column", ...l }, ...i, children: a });
516
513
  }, Vn = (e, r, n) => {
517
514
  let t;
518
515
  return n && (t = (t ? t + " " : "") + "rotate(180deg)"), k(Xr, { style: { marginLeft: e ? void 0 : r ? "-0.25rem" : "-3px", marginRight: e ? void 0 : r ? "-0.25rem" : "-6px", transform: t }, color: "inherit" });
519
516
  }, qr = oe(de((e, r) => {
520
- const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: c = hn, popperProps: i, onMount: l, onClosing: p, onClose: x, onOpening: m, onOpen: b, children: v, sx: g, ...h } = e, f = ae(p, [p]), u = ae(x, [x]), w = ae(m, [m]), E = ae(b, [b]), [T, L] = ne(), O = ge(null), R = ae((D, P) => {
521
- L(D), l?.(O.current, P);
522
- }, [l]), S = Z(() => {
523
- const D = { popupContainer: T, floatReference: o, children: v, ...h }, P = c(D);
524
- return k(Et, { elevation: 8, ref: O, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (M) => Gr(M) }, tabIndex: 0, children: P });
525
- }, [c, v, T, o]);
526
- return k(Kr, { ref: r, anchorEl: t, anchorPosition: s, label: a, open: n, onMount: R, onOpening: w, onOpen: E, onClosing: f, onClose: u, ...i, children: S });
517
+ const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: l = hn, popperProps: i, onMount: c, onClosing: f, onClose: x, onOpening: y, onOpen: b, children: v, sx: m, ...h } = e, p = ae(f, [f]), u = ae(x, [x]), w = ae(y, [y]), E = ae(b, [b]), [T, L] = ne(), O = ge(null), R = ae((D, P) => {
518
+ L(D), c?.(O.current, P);
519
+ }, [c]), S = Z(() => {
520
+ const D = { popupContainer: T, floatReference: o, children: v, ...h }, P = l(D);
521
+ return k(Et, { elevation: 8, ref: O, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (M) => Kr(M) }, tabIndex: 0, children: P });
522
+ }, [l, v, T, o]);
523
+ return k(Gr, { ref: r, anchorEl: t, anchorPosition: s, label: a, open: n, onMount: R, onOpening: w, onOpen: E, onClosing: p, onClose: u, ...i, children: S });
527
524
  }));
528
525
  qr.displayName = "ExhibitFloatPanel";
529
- const Ke = /* @__PURE__ */ new Map();
526
+ const Ge = /* @__PURE__ */ new Map();
530
527
  let Xt = null;
531
528
  const Xe = /* @__PURE__ */ new Map();
532
529
  let ze = null;
533
- const Gt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r : (e === null && (e = 120), ze = { fn: Te.debounce(() => r(), e), setReferences: n, isClose: t }, ze.fn)), Qr = (e, r) => {
530
+ const Kt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r : (e === null && (e = 120), ze = { fn: Te.debounce(() => r(), e), setReferences: n, isClose: t }, ze.fn)), Qr = (e, r) => {
534
531
  if (r === null) return;
535
532
  e.add(r);
536
- const n = Ke.get(r.key);
533
+ const n = Ge.get(r.key);
537
534
  if (!n) return;
538
535
  const t = Xe.get(n);
539
536
  t && Qr(e, t);
@@ -541,117 +538,117 @@ const Gt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r
541
538
  const r = /* @__PURE__ */ new Set();
542
539
  return Qr(r, e), r;
543
540
  }, zt = (e) => {
544
- const { anchor: r, label: n = null, parentFloat: t = null, onOpen: s, onClose: a, popperProps: o, createPopupPanel: c = hn } = e ?? {}, i = ae(s, [s]), l = ae(a, [a]), [p, x] = ne(null), [m, b] = ne(!1), [v, g] = ne(!1), h = Z(() => t === null ? (Xt === null && (Xt = { key: { label: "root" }, isRoot: !0, parent: null, open: () => null, close: (y) => null, closeChild: (y) => null, onChildVisible: () => {
541
+ const { anchor: r, label: n = null, parentFloat: t = null, onOpen: s, onClose: a, popperProps: o, createPopupPanel: l = hn } = e ?? {}, i = ae(s, [s]), c = ae(a, [a]), [f, x] = ne(null), [y, b] = ne(!1), [v, m] = ne(!1), h = Z(() => t === null ? (Xt === null && (Xt = { key: { label: "root" }, isRoot: !0, parent: null, open: () => null, close: (g) => null, closeChild: (g) => null, onChildVisible: () => {
545
542
  }, onChildHidden: () => {
546
- }, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []), f = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
543
+ }, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []), p = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
547
544
  Se(() => {
548
545
  w.current = r;
549
546
  }, [r]);
550
- const E = (y) => {
551
- const C = Ke.get(y);
547
+ const E = (g) => {
548
+ const C = Ge.get(g);
552
549
  let F = null;
553
550
  return C && (F = Xe.get(C)?.close(0)), F;
554
- }, T = () => E(K.key), [L, O] = ne(), R = () => {
555
- if (!p) return void M();
556
- const y = new Promise((C, F) => {
551
+ }, T = () => E(G.key), [L, O] = ne(), R = () => {
552
+ if (!f) return void M();
553
+ const g = new Promise((C, F) => {
557
554
  O((_) => ({ resolve: C, reject: F }));
558
555
  });
559
- return T(), Ke.delete(h.key), x(!1), y;
556
+ return T(), Ge.delete(h.key), x(!1), g;
560
557
  };
561
558
  Se(() => {
562
559
  L && (L.resolve(), O(null));
563
- }, [m, v, L]);
560
+ }, [y, v, L]);
564
561
  const S = _e(() => {
565
- let y = h;
566
- for (; y.parent; ) y = y.parent;
567
- return E(y.key);
562
+ let g = h;
563
+ for (; g.parent; ) g = g.parent;
564
+ return E(g.key);
568
565
  }, []), D = () => {
569
- if (p) return void M();
566
+ if (f) return void M();
570
567
  h && Xe.get(h.key)?.open(0);
571
- const y = Ke.get(h.key);
572
- y && y !== f && Xe.get(y)?.close(0), requestAnimationFrame(() => {
573
- Ke.set(h.key, K.key), x(!0);
568
+ const g = Ge.get(h.key);
569
+ g && g !== p && Xe.get(g)?.close(0), requestAnimationFrame(() => {
570
+ Ge.set(h.key, G.key), x(!0);
574
571
  });
575
- }, [P, M] = q.useReducer((y) => y + 1, 0), I = _e((y) => c === null ? null : c({ closeFloat: B, closeFloatAll: ie, ...y }), [c]), A = c === null, V = ae((y = 120) => Gt(y, D, /* @__PURE__ */ new Set([K]), !1)(), [D]), B = ae((y = 60) => Gt(y, R, Ln(K), !0)(), [R]), z = ae((y = 360) => Gt(y, T, Ln(((C) => {
576
- const F = Ke.get(C.key);
572
+ }, [P, M] = q.useReducer((g) => g + 1, 0), I = _e((g) => l === null ? null : l({ closeFloat: B, closeFloatAll: ie, ...g }), [l]), A = l === null, V = ae((g = 120) => Kt(g, D, /* @__PURE__ */ new Set([G]), !1)(), [D]), B = ae((g = 60) => Kt(g, R, Ln(G), !0)(), [R]), z = ae((g = 360) => Kt(g, T, Ln(((C) => {
573
+ const F = Ge.get(C.key);
577
574
  return F && Xe.get(F) || null;
578
- })(K)), !0)(), [T]), ie = ae(S, [S]), K = Z(() => ({ key: f, isRoot: !1, label: n, parent: h, onChildVisible: () => {
579
- g(!0);
575
+ })(G)), !0)(), [T]), ie = ae(S, [S]), G = Z(() => ({ key: p, isRoot: !1, label: n, parent: h, onChildVisible: () => {
576
+ m(!0);
580
577
  }, onChildHidden: () => {
581
- g(!1);
578
+ m(!1);
582
579
  }, open: V, close: B, closeChild: z, closeAll: ie, floatElement: () => u.current, anchorElement: () => w.current }), []);
583
580
  Se(() => {
584
- Xe.set(f, K);
585
- }, [K]), Se(() => () => {
586
- Xe.delete(f), B(0);
581
+ Xe.set(p, G);
582
+ }, [G]), Se(() => () => {
583
+ Xe.delete(p), B(0);
587
584
  }, []), Se(() => {
588
- p && !A && (b(!0), h.onChildVisible());
589
- }, [p, A]);
590
- const Q = _e((y) => {
591
- y.which === Pe.Escape && (y.preventDefault(), y.stopPropagation(), B(0));
585
+ f && !A && (b(!0), h.onChildVisible());
586
+ }, [f, A]);
587
+ const Q = _e((g) => {
588
+ g.which === Pe.Escape && (g.preventDefault(), g.stopPropagation(), B(0));
592
589
  }, []), re = q.useRef(null), se = _e(() => {
593
- const y = re.current, C = u.current;
594
- y && C && (requestAnimationFrame(() => {
595
- (C.contains(document.activeElement) || document.activeElement === document.body) && y.focus();
596
- }), re.current = null), l?.();
597
- }, []), ee = _e((y) => {
598
- u.current = y, y.addEventListener("focus", (F) => {
590
+ const g = re.current, C = u.current;
591
+ g && C && (requestAnimationFrame(() => {
592
+ (C.contains(document.activeElement) || document.activeElement === document.body) && g.focus();
593
+ }), re.current = null), c?.();
594
+ }, []), ee = _e((g) => {
595
+ u.current = g, g.addEventListener("focus", (F) => {
599
596
  re.current = F.relatedTarget;
600
597
  }, { once: !0, passive: !0 });
601
598
  const C = document.activeElement;
602
599
  requestAnimationFrame(() => {
603
- C === document.activeElement && y.focus();
600
+ C === document.activeElement && g.focus();
604
601
  });
605
602
  }, []), [le, ce] = ne();
606
603
  Se(() => {
607
- A && (p ? i?.() : p === !1 && l?.()), ce(m ? k(qr, { floatReference: K, open: p, label: n, anchorEl: r, onOpening: () => {
604
+ A && (f ? i?.() : f === !1 && c?.()), ce(y ? k(qr, { floatReference: G, open: f, label: n, anchorEl: r, onOpening: () => {
608
605
  i?.(), h.onChildVisible();
609
606
  }, onClosing: se, onClose: () => {
610
607
  b(!1), h.onChildHidden();
611
- }, onMount: ee, popperProps: { onKeyDown: Q, onMouseEnter: (y) => {
612
- p && ze?.isClose && ze.setReferences.has(K) && (ze.fn.clear(), ze = null, K.closeChild());
608
+ }, onMount: ee, popperProps: { onKeyDown: Q, onMouseEnter: (g) => {
609
+ f && ze?.isClose && ze.setReferences.has(G) && (ze.fn.clear(), ze = null, G.closeChild());
613
610
  }, ...o }, createPopupPanel: I }) : null);
614
- }, [m, p, n, A, o, I, P]);
615
- const d = ae((y) => {
616
- if (Ke.size === 0) return;
611
+ }, [y, f, n, A, o, I, P]);
612
+ const d = ae((g) => {
613
+ if (Ge.size === 0) return;
617
614
  let C = !1;
618
- Ke.forEach((F) => {
615
+ Ge.forEach((F) => {
619
616
  const _ = Xe.get(F);
620
617
  if (C || !_) return;
621
- _.floatElement()?.contains?.(y.target) && (C = !0), _.anchorElement()?.contains?.(y.target) && (C = !0);
618
+ _.floatElement()?.contains?.(g.target) && (C = !0), _.anchorElement()?.contains?.(g.target) && (C = !0);
622
619
  }), C || S();
623
620
  }, [S]);
624
621
  return Se(() => {
625
- if (!p || !h.isRoot) return;
626
- const y = (C) => {
622
+ if (!f || !h.isRoot) return;
623
+ const g = (C) => {
627
624
  d(C);
628
625
  };
629
- return document.addEventListener("mousedown", y), document.addEventListener("touchstart", y), document.addEventListener("focus", y), () => {
630
- document.removeEventListener("mousedown", y), document.removeEventListener("touchstart", y), document.removeEventListener("focus", y);
626
+ return document.addEventListener("mousedown", g), document.addEventListener("touchstart", g), document.addEventListener("focus", g), () => {
627
+ document.removeEventListener("mousedown", g), document.removeEventListener("touchstart", g), document.removeEventListener("focus", g);
631
628
  };
632
- }, [p, h]), { component: le, reference: K };
633
- }, Di = oe(de((e, r) => {
634
- const { nestedChildren: n, variant: t, disabled: s = !1, createPopupPanel: a, ...o } = e, c = { disabled: s, createPopupPanel: ae((i) => {
629
+ }, [f, h]), { component: le, reference: G };
630
+ }, Ci = oe(de((e, r) => {
631
+ const { nestedChildren: n, variant: t, disabled: s = !1, createPopupPanel: a, ...o } = e, l = { disabled: s, createPopupPanel: ae((i) => {
635
632
  if (!n || n.length === 0) return null;
636
- const { popupContainer: l, floatReference: p, ref: x, ...m } = i, b = [];
633
+ const { popupContainer: c, floatReference: f, ref: x, ...y } = i, b = [];
637
634
  for (let v = 0; v < n.length; v++) {
638
- const g = n[v];
639
- g && b.push(k(Di, { parentFloat: p, ...m, ...g }, v));
635
+ const m = n[v];
636
+ m && b.push(k(Ci, { parentFloat: f, ...y, ...m }, v));
640
637
  }
641
- return J(X, { ref: r, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", b, k(Ot, { parentFloat: p, children: "Close other children" })] });
638
+ return J(X, { ref: r, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", b, k(Ot, { parentFloat: f, children: "Close other children" })] });
642
639
  }, [n]), ...o };
643
- return k(t === Si.Toolbar ? mn : Zr, { ...c });
644
- })), Oi = { placement: "right-start" }, bs = oe(de((e, r) => {
645
- const { children: n, sx: t, parentFloat: s, createPopupPanel: a, popperProps: o = Oi, label: c, ...i } = e;
640
+ return k(t === Oi.Toolbar ? mn : Zr, { ...l });
641
+ })), Ei = { placement: "right-start" }, xs = oe(de((e, r) => {
642
+ const { children: n, sx: t, parentFloat: s, createPopupPanel: a, popperProps: o = Ei, label: l, ...i } = e;
646
643
  (function(h) {
647
644
  if (!h) throw new Error("Invariant failed");
648
645
  })(q.isValidElement(n));
649
- const l = n, p = Z(() => ({ ...l?.props, ...i, onContextMenu: (h) => {
650
- l?.props?.onContextMenu?.(h), h.isDefaultPrevented() || (i?.onContextMenu?.(h), h.isDefaultPrevented() || (b(h), h.preventDefault()));
651
- } }), [i, l?.props]), x = ae(a, [a]), [m, b] = q.useState(null), { reference: v, component: g } = zt({ label: c ?? "contextMenu", popperProps: o, parentFloat: s, anchor: { getBoundingClientRect: () => new DOMRect(m?.clientX || 0, m?.clientY || 0) }, onClose: () => b(null), createPopupPanel: x });
646
+ const c = n, f = Z(() => ({ ...c?.props, ...i, onContextMenu: (h) => {
647
+ c?.props?.onContextMenu?.(h), h.isDefaultPrevented() || (i?.onContextMenu?.(h), h.isDefaultPrevented() || (b(h), h.preventDefault()));
648
+ } }), [i, c?.props]), x = ae(a, [a]), [y, b] = q.useState(null), { reference: v, component: m } = zt({ label: l ?? "contextMenu", popperProps: o, parentFloat: s, anchor: { getBoundingClientRect: () => new DOMRect(y?.clientX || 0, y?.clientY || 0) }, onClose: () => b(null), createPopupPanel: x });
652
649
  return Se(() => {
653
- m ? v.open(0) : v.close(0);
654
- }, [m]), J(Je, { children: [q.cloneElement(n, p), g] });
650
+ y ? v.open(0) : v.close(0);
651
+ }, [y]), J(Je, { children: [q.cloneElement(n, f), m] });
655
652
  })), dt = de((e, r) => {
656
653
  const { slotProps: n, ...t } = e, { getPortalContainer: s } = ln();
657
654
  return k($o, { ref: r, slotProps: { ...n, popper: { container: s, ...n?.popper || {} } }, ...t });
@@ -660,54 +657,54 @@ dt.displayName = "SimpleTooltip";
660
657
  const mt = oe((e) => {
661
658
  const { modifier: r, sx: n, ...t } = e;
662
659
  return k(X, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderLeftColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderRightColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderBottomColor: (s) => me(s.palette.background.paper, 1 - s.palette.action.disabledOpacity), backgroundColor: (s) => me(s.palette.action.hover, s.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...n }, ...t, children: k(X, { sx: { display: "flex", alignItems: "center", justifyContent: "center", textAlign: "center", "& *": { fontWeight: "500" } }, children: r }) });
663
- }), Ci = Te.getOS() === Te.OSType.MacOS || Te.getOS() === Te.OSType.IOS ? "Cmd" : "Ctrl", Jr = (e, r = !1, n = null) => {
660
+ }), Mi = Te.getOS() === Te.OSType.MacOS || Te.getOS() === Te.OSType.IOS ? "Cmd" : "Ctrl", Jr = (e, r = !1, n = null) => {
664
661
  if (Array.isArray(e)) {
665
662
  let a = [], o = e;
666
- for (let c = 0; c < o.length; c++) a.push(Jr(o[c], r, n ?? "" + c));
663
+ for (let l = 0; l < o.length; l++) a.push(Jr(o[l], r, n ?? "" + l));
667
664
  return k(X, { sx: { display: "flex", alignItems: "center", flexDirection: "column" }, children: a }, n);
668
665
  }
669
666
  if (!e?.key) return null;
670
667
  const t = {};
671
668
  for (let a = 0; e.modifiers && a < e.modifiers.length; a++) t[e.modifiers[a]] = !0;
672
669
  const s = [];
673
- return t?.[Mt.Ctrl] && (s.push(k(mt, { modifier: r ? "^" : k("div", { style: { paddingRight: "1px" }, children: Ci }) }, "ctrl")), s.push("+")), t?.[Mt.Alt] && (s.push(k(mt, { modifier: r ? "⌥" : "Alt" }, "alt")), s.push("+")), t?.[Mt.Shift] && (s.push(k(mt, { modifier: r ? "⇧" : k("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), s.push("+")), t?.[Mt.Meta] && (s.push(k(mt, { modifier: r ? k("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), s.push("+")), s.push(k(mt, { modifier: Jo.toPrettyKeyCode(e.key) }, "character")), k(X, { sx: { display: "flex", alignItems: "center" }, children: s }, n);
670
+ return t?.[Mt.Ctrl] && (s.push(k(mt, { modifier: r ? "^" : k("div", { style: { paddingRight: "1px" }, children: Mi }) }, "ctrl")), s.push("+")), t?.[Mt.Alt] && (s.push(k(mt, { modifier: r ? "⌥" : "Alt" }, "alt")), s.push("+")), t?.[Mt.Shift] && (s.push(k(mt, { modifier: r ? "⇧" : k("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), s.push("+")), t?.[Mt.Meta] && (s.push(k(mt, { modifier: r ? k("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), s.push("+")), s.push(k(mt, { modifier: Zo.toPrettyKeyCode(e.key) }, "character")), k(X, { sx: { display: "flex", alignItems: "center" }, children: s }, n);
674
671
  }, pt = oe(de((e, r) => {
675
- const { disabled: n = !1, label: t, shortcut: s, chips: a, description: o, maxWidth: c = 280, useModifierSymbols: i = !1, children: l, simple: p, componentDisabled: x = !1, sx: m, ...b } = e;
672
+ const { disabled: n = !1, label: t, shortcut: s, chips: a, description: o, maxWidth: l = 280, useModifierSymbols: i = !1, children: c, simple: f, componentDisabled: x = !1, sx: y, ...b } = e;
676
673
  let v = null;
677
674
  s && (v = Jr(s, i));
678
- const [g, h] = ne(null);
675
+ const [m, h] = ne(null);
679
676
  return Se(() => {
680
- Promise.resolve(t).then((f) => {
681
- h(f);
677
+ Promise.resolve(t).then((p) => {
678
+ h(p);
682
679
  });
683
- }, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...m }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !n && g ? J(X, { sx: { maxWidth: `${c}px` }, ref: r, children: [J(X, { sx: { display: "flex", flexDirection: "row", marginBottom: o ? "4px" : "0px" }, children: [k(Me, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: g }), a ? k(Br, { chips: a }) : null, v ? k(X, { sx: { marginLeft: "8px" } }, "leadingSpace") : k(Je, {}), v] }), o ? k(Me, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: o }) : k(Je, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: !0, ...b, children: k("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: l }) });
684
- })), Ei = k(be, {}), Mi = k(be, { iconKey: "Check" }), Wt = oe(de((e, r) => {
685
- const { dense: n = !0, outlined: t = !1, disableHover: s = !1, parentFloat: a, selected: o, icon: c, tooltipProps: i, children: l, primary: p, sx: x, disabled: m, className: b, onFocus: v, onBlur: g, ...h } = e, [f, u] = ne(!1), w = { marginRight: "0px", padding: n ? "2px" : "7px", borderRadius: (R) => `${R.shape.borderRadius}px`, color: (R) => p ? void 0 : R.palette.text.icon ?? R.palette.action.active, border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (R) => `${R.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity), border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, "&.Mui-disabled": { border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...x }, E = { "&:hover:not(.Mui-disabled, [disabled])": { color: (R) => R.palette.text.primary, border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity + R.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (R) => `solid ${R.palette.primary.main} 1px`, border: (R) => `1px solid ${R.palette?.primary?.main}`, zIndex: 1 } };
680
+ }, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...y }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !n && m ? J(X, { sx: { maxWidth: `${l}px` }, ref: r, children: [J(X, { sx: { display: "flex", flexDirection: "row", marginBottom: o ? "4px" : "0px" }, children: [k(Me, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: m }), a ? k(Br, { chips: a }) : null, v ? k(X, { sx: { marginLeft: "8px" } }, "leadingSpace") : k(Je, {}), v] }), o ? k(Me, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: o }) : k(Je, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: !0, ...b, children: k("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: c }) });
681
+ })), Ti = k(be, {}), Pi = k(be, { iconKey: "Check" }), Wt = oe(de((e, r) => {
682
+ const { dense: n = !0, outlined: t = !1, disableHover: s = !1, parentFloat: a, selected: o, icon: l, tooltipProps: i, children: c, primary: f, sx: x, disabled: y, className: b, onFocus: v, onBlur: m, ...h } = e, [p, u] = ne(!1), w = { marginRight: "0px", padding: n ? "2px" : "7px", borderRadius: (R) => `${R.shape.borderRadius}px`, color: (R) => f ? void 0 : R.palette.text.icon ?? R.palette.action.active, border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (R) => `${R.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity), border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, "&.Mui-disabled": { border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...x }, E = { "&:hover:not(.Mui-disabled, [disabled])": { color: (R) => R.palette.text.primary, border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity + R.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (R) => `solid ${R.palette.primary.main} 1px`, border: (R) => `1px solid ${R.palette?.primary?.main}`, zIndex: 1 } };
686
683
  let T = w;
687
684
  s || (T = Te.mergeContentful(w, E));
688
685
  const L = Z(() => {
689
- let R = typeof c == "function" ? c() : c;
690
- return R === null ? R : R || (o === void 0 ? Ei : Mi);
691
- }, [c, o]);
692
- let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible": f, "Mui-selected": o, "Mui-disabled": m }, b), onFocus: (R) => {
686
+ let R = typeof l == "function" ? l() : l;
687
+ return R === null ? R : R || (o === void 0 ? Ti : Pi);
688
+ }, [l, o]);
689
+ let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible": p, "Mui-selected": o, "Mui-disabled": y }, b), onFocus: (R) => {
693
690
  u(!0), v?.(R);
694
691
  }, onBlur: (R) => {
695
- u(!1), g?.(R);
696
- }, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...h, disabled: m || !1, children: [L, l] });
692
+ u(!1), m?.(R);
693
+ }, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...h, disabled: y || !1, children: [L, c] });
697
694
  if (i) if (i.simple && i.label && !i.disabled) {
698
695
  const { label: R, description: S, maxWidth: D, shortcut: P, useModifierSymbols: M, componentDisabled: I, simple: A, chips: V, ref: B, ...z } = i;
699
696
  O = k(dt, { disableInteractive: !0, title: R ?? "", ...z, children: k(X, { sx: { display: "flex" }, children: O }) });
700
697
  } else O = k(pt, { children: O, ...i });
701
698
  return O;
702
- })), Ti = k(be, {}), Pi = (e) => e.icon, Ot = oe(de((e, r) => {
703
- const { icon: n = Ti, renderIcon: t = Pi, parentFloat: s, className: a, onFocus: o, selected: c, onBlur: i, onMouseOver: l, onMouseOut: p, onMouseEnter: x, disabled: m, children: b, sx: v, tooltipProps: g, chips: h, primary: f, ...u } = e, [w, E] = ne(!1), [T, L] = ne(!1), O = Z(() => {
704
- const S = t?.({ icon: n, disabled: m, selected: c });
705
- return S ? k(zo, { className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }), sx: { "& .MuiSvgIcon-root": { color: (D) => f ? void 0 : D.palette.text.icon ?? D.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (D) => D.palette.text.primary } } }, children: S }) : null;
706
- }, [t, m, n, w, T, f, c]);
707
- let R = J(Mr, { ref: r, disabled: m, onMouseOver: (S) => {
708
- l?.(S), S.isDefaultPrevented() || L(!0);
699
+ })), Ri = k(be, {}), Ni = (e) => e.icon, Ot = oe(de((e, r) => {
700
+ const { icon: n = Ri, renderIcon: t = Ni, parentFloat: s, className: a, onFocus: o, selected: l, onBlur: i, onMouseOver: c, onMouseOut: f, onMouseEnter: x, disabled: y, children: b, sx: v, tooltipProps: m, chips: h, primary: p, ...u } = e, [w, E] = ne(!1), [T, L] = ne(!1), O = Z(() => {
701
+ const S = t?.({ icon: n, disabled: y, selected: l });
702
+ return S ? k(zo, { className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }), sx: { "& .MuiSvgIcon-root": { color: (D) => p ? void 0 : D.palette.text.icon ?? D.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (D) => D.palette.text.primary } } }, children: S }) : null;
703
+ }, [t, y, n, w, T, p, l]);
704
+ let R = J(Mr, { ref: r, disabled: y, onMouseOver: (S) => {
705
+ c?.(S), S.isDefaultPrevented() || L(!0);
709
706
  }, onMouseOut: (S) => {
710
- p?.(S), S.isDefaultPrevented() || L(!1);
707
+ f?.(S), S.isDefaultPrevented() || L(!1);
711
708
  }, onMouseEnter: (S) => {
712
709
  x?.(S), S.isDefaultPrevented() || s?.closeChild();
713
710
  }, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }, a), onFocus: (S) => {
@@ -715,79 +712,79 @@ const mt = oe((e) => {
715
712
  }, onBlur: (S) => {
716
713
  i?.(S), E(!1);
717
714
  }, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (S) => S.palette.text.primary }, color: (S) => S.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (S) => S.palette.text.primary }, ...v }, ...u, children: [O, b, h ? k(Br, { chips: h }) : null] });
718
- return g && (R = k(pt, { children: R, placement: "right-start", ...g })), R;
719
- })), vs = oe(de((e, r) => {
715
+ return m && (R = k(pt, { children: R, placement: "right-start", ...m })), R;
716
+ })), ws = oe(de((e, r) => {
720
717
  const { children: n, sx: t, primary: s = !1, variant: a = "subtitle1", ...o } = e;
721
- return k(Je, { children: k(Me, { ref: r, variant: a, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: a === "subtitle1" ? "2px" : void 0, paddingBottom: a === "subtitle1" ? "2px" : void 0, color: (c) => s ? void 0 : c.palette.text.secondary, ...t }, ...o, children: n }) });
718
+ return k(Je, { children: k(Me, { ref: r, variant: a, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: a === "subtitle1" ? "2px" : void 0, paddingBottom: a === "subtitle1" ? "2px" : void 0, color: (l) => s ? void 0 : l.palette.text.secondary, ...t }, ...o, children: n }) });
722
719
  })), mn = oe(de((e, r) => {
723
- const { dense: n = !0, outlined: t = !1, label: s, selected: a = !1, onQuickClick: o, parentFloat: c, createPopupPanel: i, popupProps: l, onPopupOpen: p, onPopupClose: x, quickButtonProps: m, createQuickButton: b, tooltip: v = "", createTooltip: g, icon: h, disabled: f, buttonProps: u = Te.EmptyObject, disableHover: w, touchRippleRef: E, primary: T, children: L, sx: O, className: R, ...S } = e, D = dn(), P = Z(() => {
724
- const G = (te, ue, he, Le = he) => {
720
+ const { dense: n = !0, outlined: t = !1, label: s, selected: a = !1, onQuickClick: o, parentFloat: l, createPopupPanel: i, popupProps: c, onPopupOpen: f, onPopupClose: x, quickButtonProps: y, createQuickButton: b, tooltip: v = "", createTooltip: m, icon: h, disabled: p, buttonProps: u = Te.EmptyObject, disableHover: w, touchRippleRef: E, primary: T, children: L, sx: O, className: R, ...S } = e, D = dn(), P = Z(() => {
721
+ const K = (te, ue, he, Le = he) => {
725
722
  const Ce = typeof t == "boolean" ? null : t[te];
726
723
  return typeof Ce == "function" ? Ce(ue) : Ce || (t ? he : Le);
727
724
  };
728
- return { outline: { color: (te) => G("color", te, te.palette.divider, "transparent"), hoverColor: (te) => G("hoverColor", te, te.palette.text?.primary, te.palette.divider), focusColor: (te) => G("focusColor", te, te.palette?.primary?.main) }, active: D.palette.mode === "dark" ? D.palette.text.secondary : D.palette.text.primary, text: D.palette.text.icon ?? D.palette.action.active };
729
- }, [t, D]), [M, I] = ne(!1), [A, V] = ne(!1), [B, z] = ne(!1), ie = ge(null), K = ge(null), Q = zt({ anchor: ie.current, label: s, createPopupPanel: i, parentFloat: c, popperProps: l?.popperProps, onClose: () => {
725
+ return { outline: { color: (te) => K("color", te, te.palette.divider, "transparent"), hoverColor: (te) => K("hoverColor", te, te.palette.text?.primary, te.palette.divider), focusColor: (te) => K("focusColor", te, te.palette?.primary?.main) }, active: D.palette.mode === "dark" ? D.palette.text.secondary : D.palette.text.primary, text: D.palette.text.icon ?? D.palette.action.active };
726
+ }, [t, D]), [M, I] = ne(!1), [A, V] = ne(!1), [B, z] = ne(!1), ie = ge(null), G = ge(null), Q = zt({ anchor: ie.current, label: s, createPopupPanel: i, parentFloat: l, popperProps: c?.popperProps, onClose: () => {
730
727
  I(!1), x?.();
731
728
  }, onOpen: () => {
732
- I(!0), p?.();
733
- } }), re = ae((G) => {
734
- o?.(G), Q.reference.close(0);
729
+ I(!0), f?.();
730
+ } }), re = ae((K) => {
731
+ o?.(K), Q.reference.close(0);
735
732
  }, [o, Q]), se = ae(() => {
736
733
  M ? Q.reference.close(0) : Q.reference.open(0);
737
- }, [M, Q, c, s]), ee = Z(() => {
738
- const G = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => P.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${P.outline.focusColor(Y)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => w ? "transparent" : void 0, backgroundColor: () => w ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.left": { borderTopLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (Y) => P.outline.color(Y) }, "&.right": { borderTopRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (Y) => `${Y.shape.borderRadius}px !important` } }, te = { "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity) } } } }, ue = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (Y) => Y.palette.text.primary }, backgroundColor: () => w ? "transparent" : void 0, color: (Y) => Y.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => n ? "2px 3px" : "7px", marginRight: "0" }, he = Te.mergeContentful(ue, G), Le = Te.mergeContentful(he, te), Ce = Te.mergeContentful(ue, G);
734
+ }, [M, Q, l, s]), ee = Z(() => {
735
+ const K = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => P.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${P.outline.focusColor(Y)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => w ? "transparent" : void 0, backgroundColor: () => w ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.left": { borderTopLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (Y) => P.outline.color(Y) }, "&.right": { borderTopRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (Y) => `${Y.shape.borderRadius}px !important` } }, te = { "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity) } } } }, ue = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (Y) => Y.palette.text.primary }, backgroundColor: () => w ? "transparent" : void 0, color: (Y) => Y.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => n ? "2px 3px" : "7px", marginRight: "0" }, he = Te.mergeContentful(ue, K), Le = Te.mergeContentful(he, te), Ce = Te.mergeContentful(ue, K);
739
736
  return { quickButtonStyling: he, openQuickButtonStyling: Le, compoundStyling: Ce, openCompoundStyling: Te.mergeContentful(Ce, te) };
740
- }, [P, w]), le = ae((G) => {
741
- const { children: te, ref: ue, ...he } = G;
737
+ }, [P, w]), le = ae((K) => {
738
+ const { children: te, ref: ue, ...he } = K;
742
739
  return k(dt, { ref: ue, ...he, disableInteractive: !0, children: te });
743
- }, []), ce = o || b, d = ce && (m?.tooltip || m?.createTooltip), y = (G) => {
744
- const { tooltip: te, createTooltip: ue, sx: he, ...Le } = G;
740
+ }, []), ce = o || b, d = ce && (y?.tooltip || y?.createTooltip), g = (K) => {
741
+ const { tooltip: te, createTooltip: ue, sx: he, ...Le } = K;
745
742
  let Ce = k(Ze, { sx: { ...he }, component: "div", ...Le });
746
743
  return d && (Ce = (ue ?? le)({ title: M ? "" : te ?? v, children: k("div", { children: Ce }) }, M)), Ce;
747
- }, C = { onKeyDown: (G) => {
748
- G.keyCode === Pe.Space ? se() : G.keyCode === Pe.F4 || G.keyCode === Pe.Down ? Q.reference.open(0) : G.keyCode === Pe.Up && Q.reference.close(0);
744
+ }, C = { onKeyDown: (K) => {
745
+ K.keyCode === Pe.Space ? se() : K.keyCode === Pe.F4 || K.keyCode === Pe.Down ? Q.reference.open(0) : K.keyCode === Pe.Up && Q.reference.close(0);
749
746
  } };
750
747
  let F = k(Je, {});
751
748
  const _ = Z(() => typeof h == "function" ? h() : h, [h]);
752
749
  if (ce) {
753
- let G = M ? ee.openQuickButtonStyling : ee.quickButtonStyling;
754
- const te = (b || y)({ tabIndex: -1, disabled: f, size: "small", edge: "end", onMouseEnter: () => {
750
+ let K = M ? ee.openQuickButtonStyling : ee.quickButtonStyling;
751
+ const te = (b || g)({ tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseEnter: () => {
755
752
  Q.reference.parent.closeChild();
756
753
  }, onMouseDown: (he) => {
757
754
  he.button === 0 && (he.preventDefault(), re(he));
758
- }, touchRippleRef: E, children: _, ...m, className: Oe({ "Mui-focusVisible": A || M, "Mui-selected": a, "Mui-hovered": B || M, "Mui-disabled": f, bordered: !0, left: !0, "hard-right": !0 }, m?.className), sx: { ...ee.quickButtonStyling, height: "100%", ...m?.sx } });
755
+ }, touchRippleRef: E, children: _, ...y, className: Oe({ "Mui-focusVisible": A || M, "Mui-selected": a, "Mui-hovered": B || M, "Mui-disabled": p, bordered: !0, left: !0, "hard-right": !0 }, y?.className), sx: { ...ee.quickButtonStyling, height: "100%", ...y?.sx } });
759
756
  let ue = Vn(!0, n, M);
760
- d && (ue = (g ?? le)({ title: M ? "" : v, children: ue }, M)), F = J(Je, { children: [te, k(Ze, { ref: K, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled": f, "Mui-focusVisible": A || M, bordered: !0, right: !0, divider: !0 }), sx: { paddingLeft: (n ? 0 : 2) + "px", paddingRight: (n ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...ee.quickButtonStyling, ...G }, TouchRippleProps: { center: !1 }, tabIndex: -1, disabled: f, size: "small", edge: "end", onMouseDown: (he) => {
757
+ d && (ue = (m ?? le)({ title: M ? "" : v, children: ue }, M)), F = J(Je, { children: [te, k(Ze, { ref: G, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled": p, "Mui-focusVisible": A || M, bordered: !0, right: !0, divider: !0 }), sx: { paddingLeft: (n ? 0 : 2) + "px", paddingRight: (n ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...ee.quickButtonStyling, ...K }, TouchRippleProps: { center: !1 }, tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseDown: (he) => {
761
758
  he.button === 0 && (he.preventDefault(), se());
762
759
  }, children: ue })] });
763
760
  } else {
764
- let G = M ? ee.openCompoundStyling : ee.compoundStyling;
765
- F = k(Wt, { ref: K, tabIndex: -1, disabled: f, size: "small", icon: _, className: Oe({ "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": f, "Mui-focusVisible": A || M, bordered: !0, left: !0, right: !0 }), sx: { ...ee.quickButtonStyling, ...G }, onMouseDown: (te) => {
761
+ let K = M ? ee.openCompoundStyling : ee.compoundStyling;
762
+ F = k(Wt, { ref: G, tabIndex: -1, disabled: p, size: "small", icon: _, className: Oe({ "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p, "Mui-focusVisible": A || M, bordered: !0, left: !0, right: !0 }), sx: { ...ee.quickButtonStyling, ...K }, onMouseDown: (te) => {
766
763
  te.button === 0 && (te.preventDefault(), se());
767
764
  }, children: Vn(!1, n, M) });
768
765
  }
769
766
  const { className: N, sx: j, ...H } = u;
770
- let U = k(X, { onFocus: () => V(!0), onBlur: () => V(!1), onMouseOver: () => z(!0), onMouseOut: () => z(!1), ...C, "aria-label": "split button", ref: ie, tabIndex: f ? void 0 : 0, className: Oe(N, "split-button-root", { "Mui-focusVisible": A || M, "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": f }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: t ? "1px" : "0px", marginRight: t ? "1px" : "0px", borderRadius: (G) => `${G.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (G) => `solid ${G.palette.primary.main} 1px`, zIndex: 2 }, ...j }, ...H, children: F });
771
- return d || (U = (g ?? le)({ title: M ? "" : v, children: U }, M)), J(X, { className: Oe(R, "popupIconButton"), ref: r, ...S, sx: { zIndex: A || M ? 2 : void 0, display: "flex", alignItems: "center", ...O }, children: [U, Q.component] });
767
+ let U = k(X, { onFocus: () => V(!0), onBlur: () => V(!1), onMouseOver: () => z(!0), onMouseOut: () => z(!1), ...C, "aria-label": "split button", ref: ie, tabIndex: p ? void 0 : 0, className: Oe(N, "split-button-root", { "Mui-focusVisible": A || M, "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: t ? "1px" : "0px", marginRight: t ? "1px" : "0px", borderRadius: (K) => `${K.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (K) => `solid ${K.palette.primary.main} 1px`, zIndex: 2 }, ...j }, ...H, children: F });
768
+ return d || (U = (m ?? le)({ title: M ? "" : v, children: U }, M)), J(X, { className: Oe(R, "popupIconButton"), ref: r, ...S, sx: { zIndex: A || M ? 2 : void 0, display: "flex", alignItems: "center", ...O }, children: [U, Q.component] });
772
769
  }));
773
770
  mn.displayName = "ExhibitPopupIconButton";
774
- const Ri = {}, Zr = oe(de((e, r) => {
775
- const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: c = Ri, onPopupOpen: i, onPopupClose: l, quickButtonProps: p, createQuickButton: x, tooltip: m = "", createTooltip: b, icon: v, disabled: g, touchRippleRef: h, primary: f, children: u, sx: w, ...E } = e, [T, L] = ne(!1), [O, R] = ne(!1), [S, D] = ne(!1), [P, M] = ne(!1), I = ge(null), A = ge(null), V = Z(() => {
776
- if (!c) return;
777
- const { popperProps: d } = c;
771
+ const Fi = {}, Zr = oe(de((e, r) => {
772
+ const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: l = Fi, onPopupOpen: i, onPopupClose: c, quickButtonProps: f, createQuickButton: x, tooltip: y = "", createTooltip: b, icon: v, disabled: m, touchRippleRef: h, primary: p, children: u, sx: w, ...E } = e, [T, L] = ne(!1), [O, R] = ne(!1), [S, D] = ne(!1), [P, M] = ne(!1), I = ge(null), A = ge(null), V = Z(() => {
773
+ if (!l) return;
774
+ const { popperProps: d } = l;
778
775
  return { placement: "right-start", offsets: [-4, -2], ...d };
779
- }, [c]), B = zt({ anchor: I.current, label: t, createPopupPanel: o, parentFloat: a, popperProps: V, onClose: () => {
780
- L(!1), l?.();
776
+ }, [l]), B = zt({ anchor: I.current, label: t, createPopupPanel: o, parentFloat: a, popperProps: V, onClose: () => {
777
+ L(!1), c?.();
781
778
  }, onOpen: () => {
782
779
  L(!0), i?.();
783
780
  } }), z = ae((d) => {
784
781
  d.button === 0 && (s?.(d), B.reference.close(0));
785
- }, [s]), ie = k(vi, {}), K = { "&.Mui-selected": { color: (d) => d.palette.text.primary, "& svg * ": { color: (d) => d.palette.text.primary } } }, Q = _e((d) => {
786
- const { children: y, ref: C, ...F } = d;
787
- return k(dt, { ref: C, ...F, disableInteractive: !0, children: y });
782
+ }, [s]), ie = k(xi, {}), G = { "&.Mui-selected": { color: (d) => d.palette.text.primary, "& svg * ": { color: (d) => d.palette.text.primary } } }, Q = _e((d) => {
783
+ const { children: g, ref: C, ...F } = d;
784
+ return k(dt, { ref: C, ...F, disableInteractive: !0, children: g });
788
785
  }, []), re = s || x, se = (d) => {
789
- const { tooltip: y, createTooltip: C, ...F } = d;
790
- return k(Ot, { icon: v, className: Oe({ "Mui-hovered": S }), sx: { flex: "1 1 100%", ...K }, ...F, children: t });
786
+ const { tooltip: g, createTooltip: C, ...F } = d;
787
+ return k(Ot, { icon: v, className: Oe({ "Mui-hovered": S }), sx: { flex: "1 1 100%", ...G }, ...F, children: t });
791
788
  }, ee = { onFocus: () => {
792
789
  R(!0);
793
790
  }, onBlur: () => R(!1), onMouseOver: () => {
@@ -801,36 +798,36 @@ const Ri = {}, Zr = oe(de((e, r) => {
801
798
  } };
802
799
  let le = k(Je, {});
803
800
  if (re) {
804
- const d = (x || se)({ tabIndex: -1, disabled: g, onMouseEnter: () => {
801
+ const d = (x || se)({ tabIndex: -1, disabled: m, onMouseEnter: () => {
805
802
  B.reference.parent.closeChild();
806
- }, onMouseDown: (y) => {
807
- y.button === 0 && (y.preventDefault(), z(y));
808
- }, className: Oe("quick-left", {}, p?.className), ...p });
809
- le = J(Je, { children: [d, k(Er, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: !0 }), k(Mr, { ref: A, className: Oe({ "Mui-selected": T, "Mui-hovered": S }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (y) => f ? void 0 : y.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (y) => y.palette.text.primary }, ...K }, tabIndex: -1, disabled: g, ...ee, children: k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (y) => f ? void 0 : y.palette.text.icon ?? y.palette.action.active }, onMouseOver: (y) => {
810
- y.preventDefault(), M(!0);
803
+ }, onMouseDown: (g) => {
804
+ g.button === 0 && (g.preventDefault(), z(g));
805
+ }, className: Oe("quick-left", {}, f?.className), ...f });
806
+ le = J(Je, { children: [d, k(Er, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: !0 }), k(Mr, { ref: A, className: Oe({ "Mui-selected": T, "Mui-hovered": S }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (g) => p ? void 0 : g.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (g) => g.palette.text.primary }, ...G }, tabIndex: -1, disabled: m, ...ee, children: k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (g) => p ? void 0 : g.palette.text.icon ?? g.palette.action.active }, onMouseOver: (g) => {
807
+ g.preventDefault(), M(!0);
811
808
  }, onMouseLeave: () => {
812
809
  M(!1);
813
- }, onClick: (y) => {
814
- y.preventDefault(), T ? B.reference.close() : B.reference.open();
810
+ }, onClick: (g) => {
811
+ g.preventDefault(), T ? B.reference.close() : B.reference.open();
815
812
  }, children: ie }) })] });
816
- } else le = J(Ot, { ref: A, tabIndex: -1, disabled: g, icon: v, className: Oe({ "Mui-selected": T || n, "Mui-hovered": S }), sx: { flex: "1 1 100%", paddingRight: "0px", ...K }, onClick: (d) => {
813
+ } else le = J(Ot, { ref: A, tabIndex: -1, disabled: m, icon: v, className: Oe({ "Mui-selected": T || n, "Mui-hovered": S }), sx: { flex: "1 1 100%", paddingRight: "0px", ...G }, onClick: (d) => {
817
814
  d.preventDefault(), T ? B.reference.close() : B.reference.open();
818
- }, ...ee, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) => f ? void 0 : d.palette.text.icon ?? d.palette.action.active }, children: ie })] });
819
- let ce = k(X, { "aria-label": "split button", ref: I, tabIndex: g ? void 0 : 0, className: Oe({ "Mui-disabled": g, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": S }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...w }, ...E, children: le });
820
- return re && !P && (p?.tooltip || p?.createTooltip) && (ce = (p?.createTooltip ?? Q)({ title: T ? "" : ce ?? p?.tooltip, children: ce }, T)), J(X, { ref: r, sx: { zIndex: O || T ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [ce, B.component] });
821
- })), xs = oe(de((e, r) => {
822
- const { onSelectToggle: n, selected: t = !1, label: s, shortcut: a, tabIndex: o = 0, preventFocus: c = !1, ...i } = e;
823
- return k(pt, { label: s, shortcut: a, children: k(Wt, { ref: r, outlined: !1, tabIndex: o, selected: t, onMouseDown: (l) => {
824
- c && l.preventDefault();
815
+ }, ...ee, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) => p ? void 0 : d.palette.text.icon ?? d.palette.action.active }, children: ie })] });
816
+ let ce = k(X, { "aria-label": "split button", ref: I, tabIndex: m ? void 0 : 0, className: Oe({ "Mui-disabled": m, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": S }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...w }, ...E, children: le });
817
+ return re && !P && (f?.tooltip || f?.createTooltip) && (ce = (f?.createTooltip ?? Q)({ title: T ? "" : ce ?? f?.tooltip, children: ce }, T)), J(X, { ref: r, sx: { zIndex: O || T ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [ce, B.component] });
818
+ })), ks = oe(de((e, r) => {
819
+ const { onSelectToggle: n, selected: t = !1, label: s, shortcut: a, tabIndex: o = 0, preventFocus: l = !1, ...i } = e;
820
+ return k(pt, { label: s, shortcut: a, children: k(Wt, { ref: r, outlined: !1, tabIndex: o, selected: t, onMouseDown: (c) => {
821
+ l && c.preventDefault();
825
822
  }, onClick: () => {
826
823
  n?.(!t);
827
824
  }, ...i }) });
828
- })), Ni = k(be, {}), Fi = k(be, { iconKey: "Check" }), _i = oe(de((e, r) => {
825
+ })), _i = k(be, {}), Ai = k(be, { iconKey: "Check" }), Ii = oe(de((e, r) => {
829
826
  const { children: n, selected: t = !0, outlined: s = !0, sx: a, ...o } = e;
830
- let c = n;
831
- return c === null && (c = Ni), c || (c = Fi), k(X, { ref: r, sx: { display: "flex", border: (i) => t ? `solid ${s ? i.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (i) => `${i.shape.borderRadius}px`, backgroundColor: (i) => {
827
+ let l = n;
828
+ return l === null && (l = _i), l || (l = Ai), k(X, { ref: r, sx: { display: "flex", border: (i) => t ? `solid ${s ? i.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (i) => `${i.shape.borderRadius}px`, backgroundColor: (i) => {
832
829
  if (t) return me(i.palette.text.icon ?? i.palette.action.active, i.palette.action.selectedOpacity);
833
- }, ...a }, ...o, children: c });
830
+ }, ...a }, ...o, children: l });
834
831
  }));
835
832
  function Ee() {
836
833
  return Ee = Object.assign ? Object.assign.bind() : function(e) {
@@ -850,7 +847,7 @@ function eo(e, r) {
850
847
  }
851
848
  return n;
852
849
  }
853
- var Ie, Ai = { state: {}, updateModal: function() {
850
+ var Ie, Vi = { state: {}, updateModal: function() {
854
851
  }, hideModal: function() {
855
852
  }, destroyModal: function() {
856
853
  }, destroyModalsByRootId: function() {
@@ -863,28 +860,28 @@ var Ie, Ai = { state: {}, updateModal: function() {
863
860
  (function(e) {
864
861
  e.SHOW = "SHOW", e.HIDE = "HIDE", e.UPDATE = "UPDATE", e.DESTROY = "DESTROY", e.DESTROY_BY_ROOT_ID = "DESTROY_BY_ROOT_ID", e.UNKNOWN = "UNKNOWN";
865
862
  })(Ie || (Ie = {}));
866
- var Ii = {};
867
- function Vi(e, r) {
863
+ var Li = {};
864
+ function Bi(e, r) {
868
865
  switch (r.type) {
869
866
  case Ie.SHOW:
870
- var n, t = r.payload, s = t.id, a = t.component, o = t.props, c = t.options;
871
- return Ee({}, e, ((n = {})[s] = { component: a, props: Ee({}, o, { open: !0 }), options: c }, n));
867
+ var n, t = r.payload, s = t.id, a = t.component, o = t.props, l = t.options;
868
+ return Ee({}, e, ((n = {})[s] = { component: a, props: Ee({}, o, { open: !0 }), options: l }, n));
872
869
  case Ie.HIDE:
873
- var i, l = r.payload.id;
874
- return e[l] ? Ee({}, e, ((i = {})[l] = Ee({}, e[l], { props: Ee({}, e[l].props, { open: !1 }) }), i)) : e;
870
+ var i, c = r.payload.id;
871
+ return e[c] ? Ee({}, e, ((i = {})[c] = Ee({}, e[c], { props: Ee({}, e[c].props, { open: !1 }) }), i)) : e;
875
872
  case Ie.UPDATE:
876
- var p, x = r.payload, m = x.id, b = x.props;
877
- return e[m] ? Ee({}, e, ((p = {})[m] = Ee({}, e[m], { props: Ee({}, e[m].props, b) }), p)) : e;
873
+ var f, x = r.payload, y = x.id, b = x.props;
874
+ return e[y] ? Ee({}, e, ((f = {})[y] = Ee({}, e[y], { props: Ee({}, e[y].props, b) }), f)) : e;
878
875
  case Ie.DESTROY:
879
- var v = r.payload.id, g = Ee({}, e);
880
- return delete g[v], g;
876
+ var v = r.payload.id, m = Ee({}, e);
877
+ return delete m[v], m;
881
878
  case Ie.DESTROY_BY_ROOT_ID:
882
879
  var h = r.payload.rootId;
883
- return Object.keys(e).filter(function(f) {
884
- return f.split(".")[0] !== h;
885
- }).reduce(function(f, u) {
880
+ return Object.keys(e).filter(function(p) {
881
+ return p.split(".")[0] !== h;
882
+ }).reduce(function(p, u) {
886
883
  var w;
887
- return Ee({}, f, ((w = {})[u] = e[u], w));
884
+ return Ee({}, p, ((w = {})[u] = e[u], w));
888
885
  }, {});
889
886
  default:
890
887
  throw new Error("Unexpected action");
@@ -894,98 +891,98 @@ var qt = "[ERROR]: Modal ID is missing", no = function(e) {
894
891
  e === void 0 && (e = 8);
895
892
  for (var r = [], n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", t = 0; t < e; t++) r[t] = n.charAt(Math.floor(62 * Math.random()));
896
893
  return r.join("");
897
- }, Li = ["open"];
898
- function ws(e) {
899
- var r = e.children, n = e.legacy, t = n !== void 0 && n, s = e.suspense, a = s === void 0 || s, o = e.fallback, c = o === void 0 ? null : o, i = q.useReducer(Vi, Ii), l = i[0], p = i[1], x = q.useCallback(function(f, u) {
900
- var w = eo(u, Li);
901
- f ? p({ type: Ie.UPDATE, payload: { id: f, props: w } }) : console.error(qt);
902
- }, [p]), m = q.useCallback(function(f) {
903
- f ? p({ type: Ie.HIDE, payload: { id: f } }) : console.error(qt);
904
- }, [p]), b = q.useCallback(function(f) {
905
- f ? p({ type: Ie.DESTROY, payload: { id: f } }) : console.error(qt);
906
- }, [p]), v = q.useCallback(function(f) {
907
- f ? p({ type: Ie.DESTROY_BY_ROOT_ID, payload: { rootId: f } }) : console.error("[ERROR]: Modal root ID is missing");
908
- }, [p]), g = q.useCallback(function(f, u, w) {
894
+ }, ji = ["open"];
895
+ function Ss(e) {
896
+ var r = e.children, n = e.legacy, t = n !== void 0 && n, s = e.suspense, a = s === void 0 || s, o = e.fallback, l = o === void 0 ? null : o, i = q.useReducer(Bi, Li), c = i[0], f = i[1], x = q.useCallback(function(p, u) {
897
+ var w = eo(u, ji);
898
+ p ? f({ type: Ie.UPDATE, payload: { id: p, props: w } }) : console.error(qt);
899
+ }, [f]), y = q.useCallback(function(p) {
900
+ p ? f({ type: Ie.HIDE, payload: { id: p } }) : console.error(qt);
901
+ }, [f]), b = q.useCallback(function(p) {
902
+ p ? f({ type: Ie.DESTROY, payload: { id: p } }) : console.error(qt);
903
+ }, [f]), v = q.useCallback(function(p) {
904
+ p ? f({ type: Ie.DESTROY_BY_ROOT_ID, payload: { rootId: p } }) : console.error("[ERROR]: Modal root ID is missing");
905
+ }, [f]), m = q.useCallback(function(p, u, w) {
909
906
  var E = no(8);
910
- return w && w.rootId && (E = w.rootId + "." + E), p({ type: Ie.SHOW, payload: { id: E, component: f, props: u, options: w } }), { id: E, hide: function() {
911
- return m(E);
907
+ return w && w.rootId && (E = w.rootId + "." + E), f({ type: Ie.SHOW, payload: { id: E, component: p, props: u, options: w } }), { id: E, hide: function() {
908
+ return y(E);
912
909
  }, destroy: function() {
913
910
  return b(E);
914
911
  }, update: function(T) {
915
912
  return x(E, T);
916
913
  } };
917
- }, [p, m, b, x]), h = a ? No : Fo;
918
- return q.createElement(to.Provider, { value: { state: l, updateModal: x, hideModal: m, destroyModal: b, showModal: g, destroyModalsByRootId: v } }, r, q.createElement(h, Object.assign({}, a && { fallback: c }), Object.keys(l).map(function(f) {
919
- var u = l[f], w = u.component, E = u.props, T = u.options, L = function() {
914
+ }, [f, y, b, x]), h = a ? No : Fo;
915
+ return q.createElement(to.Provider, { value: { state: c, updateModal: x, hideModal: y, destroyModal: b, showModal: m, destroyModalsByRootId: v } }, r, q.createElement(h, Object.assign({}, a && { fallback: l }), Object.keys(c).map(function(p) {
916
+ var u = c[p], w = u.component, E = u.props, T = u.options, L = function() {
920
917
  var R, S;
921
- E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (R = E.TransitionProps) != null && R.onExited && (S = E.TransitionProps).onExited.apply(S, arguments), b(f);
918
+ E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (R = E.TransitionProps) != null && R.onExited && (S = E.TransitionProps).onExited.apply(S, arguments), b(p);
922
919
  }, O = {};
923
- return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(w, Object.assign({}, E, { key: f, onClose: function() {
924
- T && T.hideOnClose && m(f), T && T.destroyOnClose && T.hideOnClose && b(f), E && E.onClose && E.onClose.apply(E, arguments);
920
+ return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(w, Object.assign({}, E, { key: p, onClose: function() {
921
+ T && T.hideOnClose && y(p), T && T.destroyOnClose && T.hideOnClose && b(p), E && E.onClose && E.onClose.apply(E, arguments);
925
922
  } }, T && !T.destroyOnClose && O));
926
923
  })));
927
924
  }
928
925
  var ro = { enforceProvider: !1 };
929
- function ks(e) {
926
+ function Ds(e) {
930
927
  Object.assign(ro, e);
931
928
  }
932
- function Bi() {
929
+ function $i() {
933
930
  return ro;
934
931
  }
935
- var ji = ["showModal", "destroyModalsByRootId"], Bn = { disableAutoDestroy: !1 };
932
+ var zi = ["showModal", "destroyModalsByRootId"], Bn = { disableAutoDestroy: !1 };
936
933
  function gn(e) {
937
934
  e === void 0 && (e = Bn);
938
935
  var r = Ee({}, Bn, e).disableAutoDestroy, n = (function() {
939
- var c = _o(to);
940
- if (Bi().enforceProvider && c === void 0) throw new Error("useModalContext must be used within a ModalProvider");
941
- return c || Ai;
942
- })(), t = n.showModal, s = n.destroyModalsByRootId, a = eo(n, ji), o = ge(no(6));
936
+ var l = _o(to);
937
+ if ($i().enforceProvider && l === void 0) throw new Error("useModalContext must be used within a ModalProvider");
938
+ return l || Vi;
939
+ })(), t = n.showModal, s = n.destroyModalsByRootId, a = eo(n, zi), o = ge(no(6));
943
940
  return Se(function() {
944
941
  return function() {
945
942
  !r && s && s(o.current);
946
943
  };
947
- }, [r, s]), Ee({ showModal: _e(function(c, i, l) {
948
- return t(c, i, Ee({ rootId: o.current, hideOnClose: !0 }, l));
944
+ }, [r, s]), Ee({ showModal: _e(function(l, i, c) {
945
+ return t(l, i, Ee({ rootId: o.current, hideOnClose: !0 }, c));
949
946
  }, [t]), destroyModalsByRootId: s }, a);
950
947
  }
951
- function Ss(e) {
948
+ function Os(e) {
952
949
  const [r, n] = ne(() => /* @__PURE__ */ new Map()), { showModal: t, updateModal: s, destroyModal: a, hideModal: o } = gn({ disableAutoDestroy: !0 });
953
- return (c, i, l, p) => new Promise((x, m) => {
954
- const b = { ...e, ...l, onHide: () => {
955
- const f = r.get(c);
956
- l?.onHide?.(), n((u) => (u.delete(c), u)), o(f.id);
957
- }, onDone: (f) => {
958
- const u = r.get(c);
959
- n((w) => (w.delete(c), w)), l?.onDone?.(f), u && u.id && !p?.disableAutoDestroy && a(u.id);
960
- }, onShown: (f) => {
950
+ return (l, i, c, f) => new Promise((x, y) => {
951
+ const b = { ...e, ...c, onHide: () => {
952
+ const p = r.get(l);
953
+ c?.onHide?.(), n((u) => (u.delete(l), u)), o(p.id);
954
+ }, onDone: (p) => {
955
+ const u = r.get(l);
956
+ n((w) => (w.delete(l), w)), c?.onDone?.(p), u && u.id && !f?.disableAutoDestroy && a(u.id);
957
+ }, onShown: (p) => {
961
958
  n((u) => {
962
- const w = u.get(c);
963
- return u.set(c, { ...w, element: f }), u;
964
- }), x(f);
965
- }, open: !0 }, v = r.get(c);
959
+ const w = u.get(l);
960
+ return u.set(l, { ...w, element: p }), u;
961
+ }), x(p);
962
+ }, open: !0 }, v = r.get(l);
966
963
  if (v) return s(v.id, b), void x(v.element);
967
- if (!i) return void m("invalid function");
968
- const g = q.lazy(i), h = t(g, b, { destroyOnClose: !p?.disableAutoDestroy });
969
- n((f) => (f.set(c, { id: h.id, element: null }), f));
964
+ if (!i) return void y("invalid function");
965
+ const m = q.lazy(i), h = t(m, b, { destroyOnClose: !f?.disableAutoDestroy });
966
+ n((p) => (p.set(l, { id: h.id, element: null }), p));
970
967
  });
971
968
  }
972
969
  var jn, $n, zn, Wn, Hn, Un = { exports: {} };
973
- function $i() {
970
+ function Wi() {
974
971
  return $n ? jn : ($n = 1, jn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
975
972
  }
976
- function zi() {
973
+ function Hi() {
977
974
  if (Wn) return zn;
978
975
  Wn = 1;
979
- var e = $i();
976
+ var e = Wi();
980
977
  function r() {
981
978
  }
982
979
  function n() {
983
980
  }
984
981
  return n.resetWarningCache = r, zn = function() {
985
- function t(o, c, i, l, p, x) {
982
+ function t(o, l, i, c, f, x) {
986
983
  if (x !== e) {
987
- var m = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
988
- throw m.name = "Invariant Violation", m;
984
+ var y = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
985
+ throw y.name = "Invariant Violation", y;
989
986
  }
990
987
  }
991
988
  function s() {
@@ -997,7 +994,7 @@ function zi() {
997
994
  };
998
995
  }
999
996
  function yn() {
1000
- return Hn || (Hn = 1, Un.exports = zi()()), Un.exports;
997
+ return Hn || (Hn = 1, Un.exports = Hi()()), Un.exports;
1001
998
  }
1002
999
  var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], It = oo.join(","), io = typeof Element > "u", rt = io ? function() {
1003
1000
  } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ft = !io && Element.prototype.getRootNode ? function(e) {
@@ -1018,13 +1015,13 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1018
1015
  for (var s = [], a = Array.from(r); a.length; ) {
1019
1016
  var o = a.shift();
1020
1017
  if (!Vt(o, !1)) if (o.tagName === "SLOT") {
1021
- var c = o.assignedElements(), i = e(c.length ? c : o.children, !0, t);
1018
+ var l = o.assignedElements(), i = e(l.length ? l : o.children, !0, t);
1022
1019
  t.flatten ? s.push.apply(s, i) : s.push({ scopeParent: o, candidates: i });
1023
1020
  } else {
1024
1021
  rt.call(o, It) && t.filter(o) && (n || !r.includes(o)) && s.push(o);
1025
- var l = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), p = !Vt(l, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
1026
- if (l && p) {
1027
- var x = e(l === !0 ? o.children : l.children, !0, t);
1022
+ var c = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), f = !Vt(c, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
1023
+ if (c && f) {
1024
+ var x = e(c === !0 ? o.children : c.children, !0, t);
1028
1025
  t.flatten ? s.push.apply(s, x) : s.push({ scopeParent: o, candidates: x });
1029
1026
  } else a.unshift.apply(a, o.children);
1030
1027
  }
@@ -1032,17 +1029,17 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1032
1029
  return s;
1033
1030
  }, lo = function(e) {
1034
1031
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
1035
- }, Ge = function(e) {
1032
+ }, Ke = function(e) {
1036
1033
  if (!e) throw new Error("No node provided");
1037
1034
  return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || (function(r) {
1038
1035
  var n, t = r == null || (n = r.getAttribute) === null || n === void 0 ? void 0 : n.call(r, "contenteditable");
1039
1036
  return t === "" || t === "true";
1040
1037
  })(e)) && !lo(e) ? 0 : e.tabIndex;
1041
- }, Wi = function(e, r) {
1038
+ }, Ui = function(e, r) {
1042
1039
  return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
1043
1040
  }, co = function(e) {
1044
1041
  return e.tagName === "INPUT";
1045
- }, Hi = function(e) {
1042
+ }, Yi = function(e) {
1046
1043
  return (function(r) {
1047
1044
  return co(r) && r.type === "radio";
1048
1045
  })(e) && !(function(r) {
@@ -1056,15 +1053,15 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1056
1053
  } catch (o) {
1057
1054
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", o.message), !1;
1058
1055
  }
1059
- var a = (function(o, c) {
1060
- for (var i = 0; i < o.length; i++) if (o[i].checked && o[i].form === c) return o[i];
1056
+ var a = (function(o, l) {
1057
+ for (var i = 0; i < o.length; i++) if (o[i].checked && o[i].form === l) return o[i];
1061
1058
  })(n, r.form);
1062
1059
  return !a || a === r;
1063
1060
  })(e);
1064
1061
  }, Yn = function(e) {
1065
1062
  var r = e.getBoundingClientRect(), n = r.width, t = r.height;
1066
1063
  return n === 0 && t === 0;
1067
- }, Ui = function(e, r) {
1064
+ }, Gi = function(e, r) {
1068
1065
  var n = r.displayCheck, t = r.getShadowRoot;
1069
1066
  if (getComputedStyle(e).visibility === "hidden") return !0;
1070
1067
  var s = rt.call(e, "details>summary:first-of-type") ? e.parentElement : e;
@@ -1074,19 +1071,19 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1074
1071
  } else {
1075
1072
  if (typeof t == "function") {
1076
1073
  for (var a = e; e; ) {
1077
- var o = e.parentElement, c = Ft(e);
1074
+ var o = e.parentElement, l = Ft(e);
1078
1075
  if (o && !o.shadowRoot && t(o) === !0) return Yn(e);
1079
- e = e.assignedSlot ? e.assignedSlot : o || c === e.ownerDocument ? o : c.host;
1076
+ e = e.assignedSlot ? e.assignedSlot : o || l === e.ownerDocument ? o : l.host;
1080
1077
  }
1081
1078
  e = a;
1082
1079
  }
1083
1080
  if ((function(i) {
1084
- var l, p, x, m, b = i && Ft(i), v = (l = b) === null || l === void 0 ? void 0 : l.host, g = !1;
1085
- if (b && b !== i) for (g = !!((p = v) !== null && p !== void 0 && (x = p.ownerDocument) !== null && x !== void 0 && x.contains(v) || i != null && (m = i.ownerDocument) !== null && m !== void 0 && m.contains(i)); !g && v; ) {
1086
- var h, f, u;
1087
- g = !((f = v = (h = b = Ft(v)) === null || h === void 0 ? void 0 : h.host) === null || f === void 0 || (u = f.ownerDocument) === null || u === void 0 || !u.contains(v));
1081
+ var c, f, x, y, b = i && Ft(i), v = (c = b) === null || c === void 0 ? void 0 : c.host, m = !1;
1082
+ if (b && b !== i) for (m = !!((f = v) !== null && f !== void 0 && (x = f.ownerDocument) !== null && x !== void 0 && x.contains(v) || i != null && (y = i.ownerDocument) !== null && y !== void 0 && y.contains(i)); !m && v; ) {
1083
+ var h, p, u;
1084
+ m = !((p = v = (h = b = Ft(v)) === null || h === void 0 ? void 0 : h.host) === null || p === void 0 || (u = p.ownerDocument) === null || u === void 0 || !u.contains(v));
1088
1085
  }
1089
- return g;
1086
+ return m;
1090
1087
  })(e)) return !e.getClientRects().length;
1091
1088
  if (n !== "legacy-full") return !0;
1092
1089
  }
@@ -1094,7 +1091,7 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1094
1091
  }, Lt = function(e, r) {
1095
1092
  return !(r.disabled || Vt(r) || (function(n) {
1096
1093
  return co(n) && n.type === "hidden";
1097
- })(r) || Ui(r, e) || (function(n) {
1094
+ })(r) || Gi(r, e) || (function(n) {
1098
1095
  return n.tagName === "DETAILS" && Array.prototype.slice.apply(n.children).some(function(t) {
1099
1096
  return t.tagName === "SUMMARY";
1100
1097
  });
@@ -1112,46 +1109,46 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1112
1109
  return !1;
1113
1110
  })(r));
1114
1111
  }, rn = function(e, r) {
1115
- return !(Hi(r) || Ge(r) < 0 || !Lt(e, r));
1116
- }, Yi = function(e) {
1112
+ return !(Yi(r) || Ke(r) < 0 || !Lt(e, r));
1113
+ }, Xi = function(e) {
1117
1114
  var r = parseInt(e.getAttribute("tabindex"), 10);
1118
1115
  return !!(isNaN(r) || r >= 0);
1119
1116
  }, Ki = function e(r) {
1120
1117
  var n = [], t = [];
1121
1118
  return r.forEach(function(s, a) {
1122
- var o = !!s.scopeParent, c = o ? s.scopeParent : s, i = (function(p, x) {
1123
- var m = Ge(p);
1124
- return m < 0 && x && !lo(p) ? 0 : m;
1125
- })(c, o), l = o ? e(s.candidates) : c;
1126
- i === 0 ? o ? n.push.apply(n, l) : n.push(c) : t.push({ documentOrder: a, tabIndex: i, item: s, isScope: o, content: l });
1127
- }), t.sort(Wi).reduce(function(s, a) {
1119
+ var o = !!s.scopeParent, l = o ? s.scopeParent : s, i = (function(f, x) {
1120
+ var y = Ke(f);
1121
+ return y < 0 && x && !lo(f) ? 0 : y;
1122
+ })(l, o), c = o ? e(s.candidates) : l;
1123
+ i === 0 ? o ? n.push.apply(n, c) : n.push(l) : t.push({ documentOrder: a, tabIndex: i, item: s, isScope: o, content: c });
1124
+ }), t.sort(Ui).reduce(function(s, a) {
1128
1125
  return a.isScope ? s.push.apply(s, a.content) : s.push(a.content), s;
1129
1126
  }, []).concat(n);
1130
1127
  }, uo = function(e, r) {
1131
1128
  var n;
1132
- return n = (r = r || {}).getShadowRoot ? so([e], r.includeContainer, { filter: rn.bind(null, r), flatten: !1, getShadowRoot: r.getShadowRoot, shadowRootFilter: Yi }) : ao(e, r.includeContainer, rn.bind(null, r)), Ki(n);
1129
+ return n = (r = r || {}).getShadowRoot ? so([e], r.includeContainer, { filter: rn.bind(null, r), flatten: !1, getShadowRoot: r.getShadowRoot, shadowRootFilter: Xi }) : ao(e, r.includeContainer, rn.bind(null, r)), Ki(n);
1133
1130
  }, po = function(e, r) {
1134
1131
  return (r = r || {}).getShadowRoot ? so([e], r.includeContainer, { filter: Lt.bind(null, r), flatten: !0, getShadowRoot: r.getShadowRoot }) : ao(e, r.includeContainer, Lt.bind(null, r));
1135
1132
  }, et = function(e, r) {
1136
1133
  if (r = r || {}, !e) throw new Error("No node provided");
1137
1134
  return rt.call(e, It) !== !1 && rn(r, e);
1138
- }, Xi = oo.concat("iframe").join(","), _t = function(e, r) {
1135
+ }, qi = oo.concat("iframe").join(","), _t = function(e, r) {
1139
1136
  if (r = r || {}, !e) throw new Error("No node provided");
1140
- return rt.call(e, Xi) !== !1 && Lt(r, e);
1137
+ return rt.call(e, qi) !== !1 && Lt(r, e);
1141
1138
  };
1142
- const Gi = Object.freeze(Object.defineProperty({ __proto__: null, focusable: po, getTabIndex: Ge, isFocusable: _t, isTabbable: et, tabbable: uo }, Symbol.toStringTag, { value: "Module" }));
1139
+ const Qi = Object.freeze(Object.defineProperty({ __proto__: null, focusable: po, getTabIndex: Ke, isFocusable: _t, isTabbable: et, tabbable: uo }, Symbol.toStringTag, { value: "Module" }));
1143
1140
  function Qt(e, r) {
1144
1141
  (r == null || r > e.length) && (r = e.length);
1145
1142
  for (var n = 0, t = Array(r); n < r; n++) t[n] = e[n];
1146
1143
  return t;
1147
1144
  }
1148
- function qi(e, r, n) {
1145
+ function Ji(e, r, n) {
1149
1146
  return (r = (function(t) {
1150
1147
  var s = (function(a, o) {
1151
1148
  if (typeof a != "object" || !a) return a;
1152
- var c = a[Symbol.toPrimitive];
1153
- if (c !== void 0) {
1154
- var i = c.call(a, o);
1149
+ var l = a[Symbol.toPrimitive];
1150
+ if (l !== void 0) {
1151
+ var i = l.call(a, o);
1155
1152
  if (typeof i != "object") return i;
1156
1153
  throw new TypeError("@@toPrimitive must return a primitive value.");
1157
1154
  }
@@ -1160,7 +1157,7 @@ function qi(e, r, n) {
1160
1157
  return typeof s == "symbol" ? s : s + "";
1161
1158
  })(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
1162
1159
  }
1163
- function Kn(e, r) {
1160
+ function Gn(e, r) {
1164
1161
  var n = Object.keys(e);
1165
1162
  if (Object.getOwnPropertySymbols) {
1166
1163
  var t = Object.getOwnPropertySymbols(e);
@@ -1173,15 +1170,15 @@ function Kn(e, r) {
1173
1170
  function Xn(e) {
1174
1171
  for (var r = 1; r < arguments.length; r++) {
1175
1172
  var n = arguments[r] != null ? arguments[r] : {};
1176
- r % 2 ? Kn(Object(n), !0).forEach(function(t) {
1177
- qi(e, t, n[t]);
1178
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Kn(Object(n)).forEach(function(t) {
1173
+ r % 2 ? Gn(Object(n), !0).forEach(function(t) {
1174
+ Ji(e, t, n[t]);
1175
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Gn(Object(n)).forEach(function(t) {
1179
1176
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1180
1177
  });
1181
1178
  }
1182
1179
  return e;
1183
1180
  }
1184
- function Qi(e) {
1181
+ function Zi(e) {
1185
1182
  return (function(r) {
1186
1183
  if (Array.isArray(r)) return Qt(r);
1187
1184
  })(e) || (function(r) {
@@ -1197,32 +1194,32 @@ function Qi(e) {
1197
1194
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1198
1195
  })();
1199
1196
  }
1200
- var Ji = function(e, r) {
1197
+ var ea = function(e, r) {
1201
1198
  if (e.length > 0) {
1202
1199
  var n = e[e.length - 1];
1203
1200
  n !== r && n._setPausedState(!0);
1204
1201
  }
1205
1202
  var t = e.indexOf(r);
1206
1203
  t === -1 || e.splice(t, 1), e.push(r);
1207
- }, Zi = function(e, r) {
1204
+ }, ta = function(e, r) {
1208
1205
  var n = e.indexOf(r);
1209
1206
  n !== -1 && e.splice(n, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
1210
1207
  }, kt = function(e) {
1211
1208
  return e?.key === "Tab" || e?.keyCode === 9;
1212
- }, ea = function(e) {
1209
+ }, na = function(e) {
1213
1210
  return kt(e) && !e.shiftKey;
1214
- }, ta = function(e) {
1211
+ }, ra = function(e) {
1215
1212
  return kt(e) && e.shiftKey;
1216
- }, Gn = function(e) {
1213
+ }, Kn = function(e) {
1217
1214
  return setTimeout(e, 0);
1218
1215
  }, gt = function(e) {
1219
1216
  for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++) n[t - 1] = arguments[t];
1220
1217
  return typeof e == "function" ? e.apply(void 0, n) : e;
1221
1218
  }, Tt = function(e) {
1222
1219
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
1223
- }, na = [];
1224
- const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTrap: function(e, r) {
1225
- var n, t = r?.document || document, s = r?.trapStack || na, a = Xn({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isKeyForward: ea, isKeyBackward: ta }, r), o = { containers: [], containerGroups: [], tabbableGroups: [], nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, c = function(S, D, P) {
1220
+ }, oa = [];
1221
+ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTrap: function(e, r) {
1222
+ var n, t = r?.document || document, s = r?.trapStack || oa, a = Xn({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isKeyForward: na, isKeyBackward: ra }, r), o = { containers: [], containerGroups: [], tabbableGroups: [], nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, l = function(S, D, P) {
1226
1223
  return S && S[D] !== void 0 ? S[D] : a[P || D];
1227
1224
  }, i = function(S, D) {
1228
1225
  var P = typeof D?.composedPath == "function" ? D.composedPath() : void 0;
@@ -1232,9 +1229,9 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1232
1229
  return V === S;
1233
1230
  });
1234
1231
  });
1235
- }, l = function(S) {
1232
+ }, c = function(S) {
1236
1233
  var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = D.hasFallback, M = P !== void 0 && P, I = D.params, A = I === void 0 ? [] : I, V = a[S];
1237
- if (typeof V == "function" && (V = V.apply(void 0, Qi(A))), V === !0 && (V = void 0), !V) {
1234
+ if (typeof V == "function" && (V = V.apply(void 0, Zi(A))), V === !0 && (V = void 0), !V) {
1238
1235
  if (V === void 0 || V === !1) return V;
1239
1236
  throw new Error("`".concat(S, "` was specified but was not a node, or did not return a node"));
1240
1237
  }
@@ -1248,15 +1245,15 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1248
1245
  if (!B && !M) throw new Error("`".concat(S, "` as selector refers to no known node"));
1249
1246
  }
1250
1247
  return B;
1251
- }, p = function() {
1252
- var S = l("initialFocus", { hasFallback: !0 });
1248
+ }, f = function() {
1249
+ var S = c("initialFocus", { hasFallback: !0 });
1253
1250
  if (S === !1) return !1;
1254
1251
  if (S === void 0 || S && !_t(S, a.tabbableOptions)) if (i(t.activeElement) >= 0) S = t.activeElement;
1255
1252
  else {
1256
1253
  var D = o.tabbableGroups[0];
1257
- S = D && D.firstTabbableNode || l("fallbackFocus");
1254
+ S = D && D.firstTabbableNode || c("fallbackFocus");
1258
1255
  }
1259
- else S === null && (S = l("fallbackFocus"));
1256
+ else S === null && (S = c("fallbackFocus"));
1260
1257
  if (!S) throw new Error("Your focus-trap needs to have at least one focusable element");
1261
1258
  return S;
1262
1259
  }, x = function() {
@@ -1266,33 +1263,33 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1266
1263
  }), V = P.slice().reverse().find(function(z) {
1267
1264
  return et(z);
1268
1265
  }), B = !!D.find(function(z) {
1269
- return Ge(z) > 0;
1266
+ return Ke(z) > 0;
1270
1267
  });
1271
1268
  return { container: S, tabbableNodes: D, focusableNodes: P, posTabIndexesFound: B, firstTabbableNode: M, lastTabbableNode: I, firstDomTabbableNode: A, lastDomTabbableNode: V, nextTabbableNode: function(z) {
1272
- var ie = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], K = D.indexOf(z);
1273
- return K < 0 ? ie ? P.slice(P.indexOf(z) + 1).find(function(Q) {
1269
+ var ie = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], G = D.indexOf(z);
1270
+ return G < 0 ? ie ? P.slice(P.indexOf(z) + 1).find(function(Q) {
1274
1271
  return et(Q);
1275
1272
  }) : P.slice(0, P.indexOf(z)).reverse().find(function(Q) {
1276
1273
  return et(Q);
1277
- }) : D[K + (ie ? 1 : -1)];
1274
+ }) : D[G + (ie ? 1 : -1)];
1278
1275
  } };
1279
1276
  }), o.tabbableGroups = o.containerGroups.filter(function(S) {
1280
1277
  return S.tabbableNodes.length > 0;
1281
- }), o.tabbableGroups.length <= 0 && !l("fallbackFocus")) throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1278
+ }), o.tabbableGroups.length <= 0 && !c("fallbackFocus")) throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1282
1279
  if (o.containerGroups.find(function(S) {
1283
1280
  return S.posTabIndexesFound;
1284
1281
  }) && o.containerGroups.length > 1) throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
1285
- }, m = function(S) {
1282
+ }, y = function(S) {
1286
1283
  var D = S.activeElement;
1287
- if (D) return D.shadowRoot && D.shadowRoot.activeElement !== null ? m(D.shadowRoot) : D;
1284
+ if (D) return D.shadowRoot && D.shadowRoot.activeElement !== null ? y(D.shadowRoot) : D;
1288
1285
  }, b = function(S) {
1289
- S !== !1 && S !== m(document) && (S && S.focus ? (S.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = S, (function(D) {
1286
+ S !== !1 && S !== y(document) && (S && S.focus ? (S.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = S, (function(D) {
1290
1287
  return D.tagName && D.tagName.toLowerCase() === "input" && typeof D.select == "function";
1291
- })(S) && S.select()) : b(p()));
1288
+ })(S) && S.select()) : b(f()));
1292
1289
  }, v = function(S) {
1293
- var D = l("setReturnFocus", { params: [S] });
1290
+ var D = c("setReturnFocus", { params: [S] });
1294
1291
  return D || D !== !1 && S;
1295
- }, g = function(S) {
1292
+ }, m = function(S) {
1296
1293
  var D = S.target, P = S.event, M = S.isBackward, I = M !== void 0 && M;
1297
1294
  D = D || Tt(P), x();
1298
1295
  var A = null;
@@ -1305,8 +1302,8 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1305
1302
  return D === le;
1306
1303
  });
1307
1304
  if (z < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D, !1)) && (z = V), z >= 0) {
1308
- var ie = z === 0 ? o.tabbableGroups.length - 1 : z - 1, K = o.tabbableGroups[ie];
1309
- A = Ge(D) >= 0 ? K.lastTabbableNode : K.lastDomTabbableNode;
1305
+ var ie = z === 0 ? o.tabbableGroups.length - 1 : z - 1, G = o.tabbableGroups[ie];
1306
+ A = Ke(D) >= 0 ? G.lastTabbableNode : G.lastDomTabbableNode;
1310
1307
  } else kt(P) || (A = B.nextTabbableNode(D, !1));
1311
1308
  } else {
1312
1309
  var Q = o.tabbableGroups.findIndex(function(ee) {
@@ -1315,22 +1312,22 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1315
1312
  });
1316
1313
  if (Q < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D)) && (Q = V), Q >= 0) {
1317
1314
  var re = Q === o.tabbableGroups.length - 1 ? 0 : Q + 1, se = o.tabbableGroups[re];
1318
- A = Ge(D) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
1315
+ A = Ke(D) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
1319
1316
  } else kt(P) || (A = B.nextTabbableNode(D));
1320
1317
  }
1321
- } else A = l("fallbackFocus");
1318
+ } else A = c("fallbackFocus");
1322
1319
  return A;
1323
1320
  }, h = function(S) {
1324
1321
  var D = Tt(S);
1325
1322
  i(D, S) >= 0 || (gt(a.clickOutsideDeactivates, S) ? n.deactivate({ returnFocus: a.returnFocusOnDeactivate }) : gt(a.allowOutsideClick, S) || S.preventDefault());
1326
- }, f = function(S) {
1323
+ }, p = function(S) {
1327
1324
  var D = Tt(S), P = i(D, S) >= 0;
1328
1325
  if (P || D instanceof Document) P && (o.mostRecentlyFocusedNode = D);
1329
1326
  else {
1330
1327
  var M;
1331
1328
  S.stopImmediatePropagation();
1332
1329
  var I = !0;
1333
- if (o.mostRecentlyFocusedNode) if (Ge(o.mostRecentlyFocusedNode) > 0) {
1330
+ if (o.mostRecentlyFocusedNode) if (Ke(o.mostRecentlyFocusedNode) > 0) {
1334
1331
  var A = i(o.mostRecentlyFocusedNode), V = o.containerGroups[A].tabbableNodes;
1335
1332
  if (V.length > 0) {
1336
1333
  var B = V.findIndex(function(z) {
@@ -1340,18 +1337,18 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1340
1337
  }
1341
1338
  } else o.containerGroups.some(function(z) {
1342
1339
  return z.tabbableNodes.some(function(ie) {
1343
- return Ge(ie) > 0;
1340
+ return Ke(ie) > 0;
1344
1341
  });
1345
1342
  }) || (I = !1);
1346
1343
  else I = !1;
1347
- I && (M = g({ target: o.mostRecentlyFocusedNode, isBackward: a.isKeyBackward(o.recentNavEvent) })), b(M || o.mostRecentlyFocusedNode || p());
1344
+ I && (M = m({ target: o.mostRecentlyFocusedNode, isBackward: a.isKeyBackward(o.recentNavEvent) })), b(M || o.mostRecentlyFocusedNode || f());
1348
1345
  }
1349
1346
  o.recentNavEvent = void 0;
1350
1347
  }, u = function(S) {
1351
1348
  (a.isKeyForward(S) || a.isKeyBackward(S)) && (function(D) {
1352
1349
  var P = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1353
1350
  o.recentNavEvent = D;
1354
- var M = g({ event: D, isBackward: P });
1351
+ var M = m({ event: D, isBackward: P });
1355
1352
  M && (kt(D) && D.preventDefault(), b(M));
1356
1353
  })(S, a.isKeyBackward(S));
1357
1354
  }, w = function(S) {
@@ -1361,17 +1358,17 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1361
1358
  var D = Tt(S);
1362
1359
  i(D, S) >= 0 || gt(a.clickOutsideDeactivates, S) || gt(a.allowOutsideClick, S) || (S.preventDefault(), S.stopImmediatePropagation());
1363
1360
  }, T = function() {
1364
- if (o.active) return Ji(s, n), o.delayInitialFocusTimer = a.delayInitialFocus ? Gn(function() {
1365
- b(p());
1366
- }) : b(p()), t.addEventListener("focusin", f, !0), t.addEventListener("mousedown", h, { capture: !0, passive: !1 }), t.addEventListener("touchstart", h, { capture: !0, passive: !1 }), t.addEventListener("click", E, { capture: !0, passive: !1 }), t.addEventListener("keydown", u, { capture: !0, passive: !1 }), t.addEventListener("keydown", w), n;
1361
+ if (o.active) return ea(s, n), o.delayInitialFocusTimer = a.delayInitialFocus ? Kn(function() {
1362
+ b(f());
1363
+ }) : b(f()), t.addEventListener("focusin", p, !0), t.addEventListener("mousedown", h, { capture: !0, passive: !1 }), t.addEventListener("touchstart", h, { capture: !0, passive: !1 }), t.addEventListener("click", E, { capture: !0, passive: !1 }), t.addEventListener("keydown", u, { capture: !0, passive: !1 }), t.addEventListener("keydown", w), n;
1367
1364
  }, L = function() {
1368
- if (o.active) return t.removeEventListener("focusin", f, !0), t.removeEventListener("mousedown", h, !0), t.removeEventListener("touchstart", h, !0), t.removeEventListener("click", E, !0), t.removeEventListener("keydown", u, !0), t.removeEventListener("keydown", w), n;
1365
+ if (o.active) return t.removeEventListener("focusin", p, !0), t.removeEventListener("mousedown", h, !0), t.removeEventListener("touchstart", h, !0), t.removeEventListener("click", E, !0), t.removeEventListener("keydown", u, !0), t.removeEventListener("keydown", w), n;
1369
1366
  }, O = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(S) {
1370
1367
  S.some(function(D) {
1371
1368
  return Array.from(D.removedNodes).some(function(P) {
1372
1369
  return P === o.mostRecentlyFocusedNode;
1373
1370
  });
1374
- }) && b(p());
1371
+ }) && b(f());
1375
1372
  }) : void 0, R = function() {
1376
1373
  O && (O.disconnect(), o.active && !o.paused && o.containers.map(function(S) {
1377
1374
  O.observe(S, { subtree: !0, childList: !0 });
@@ -1383,8 +1380,8 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1383
1380
  return o.paused;
1384
1381
  }, activate: function(S) {
1385
1382
  if (o.active) return this;
1386
- var D = c(S, "onActivate"), P = c(S, "onPostActivate"), M = c(S, "checkCanFocusTrap");
1387
- M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = m(t), D?.();
1383
+ var D = l(S, "onActivate"), P = l(S, "onPostActivate"), M = l(S, "checkCanFocusTrap");
1384
+ M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = y(t), D?.();
1388
1385
  var I = function() {
1389
1386
  M && x(), T(), R(), P?.();
1390
1387
  };
@@ -1392,11 +1389,11 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1392
1389
  }, deactivate: function(S) {
1393
1390
  if (!o.active) return this;
1394
1391
  var D = Xn({ onDeactivate: a.onDeactivate, onPostDeactivate: a.onPostDeactivate, checkCanReturnFocus: a.checkCanReturnFocus }, S);
1395
- clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, L(), o.active = !1, o.paused = !1, R(), Zi(s, n);
1396
- var P = c(D, "onDeactivate"), M = c(D, "onPostDeactivate"), I = c(D, "checkCanReturnFocus"), A = c(D, "returnFocus", "returnFocusOnDeactivate");
1392
+ clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, L(), o.active = !1, o.paused = !1, R(), ta(s, n);
1393
+ var P = l(D, "onDeactivate"), M = l(D, "onPostDeactivate"), I = l(D, "checkCanReturnFocus"), A = l(D, "returnFocus", "returnFocusOnDeactivate");
1397
1394
  P?.();
1398
1395
  var V = function() {
1399
- Gn(function() {
1396
+ Kn(function() {
1400
1397
  A && b(v(o.nodeFocusedBeforeActivation)), M?.();
1401
1398
  });
1402
1399
  };
@@ -1415,16 +1412,16 @@ const ra = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
1415
1412
  } }, _setPausedState: { value: function(S, D) {
1416
1413
  if (o.paused === S) return this;
1417
1414
  if (o.paused = S, S) {
1418
- var P = c(D, "onPause"), M = c(D, "onPostPause");
1415
+ var P = l(D, "onPause"), M = l(D, "onPostPause");
1419
1416
  P?.(), L(), R(), M?.();
1420
1417
  } else {
1421
- var I = c(D, "onUnpause"), A = c(D, "onPostUnpause");
1418
+ var I = l(D, "onUnpause"), A = l(D, "onPostUnpause");
1422
1419
  I?.(), x(), T(), R(), A?.();
1423
1420
  }
1424
1421
  return this;
1425
1422
  } } }), n.updateContainerElements(e), n;
1426
- } }, Symbol.toStringTag, { value: "Module" })), oa = Ir(ra), ia = Ir(Gi);
1427
- var qn, Qn, aa = (function() {
1423
+ } }, Symbol.toStringTag, { value: "Module" })), aa = Ir(ia), sa = Ir(Qi);
1424
+ var qn, Qn, la = (function() {
1428
1425
  if (Qn) return qn;
1429
1426
  function e(b) {
1430
1427
  return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(v) {
@@ -1433,23 +1430,23 @@ var qn, Qn, aa = (function() {
1433
1430
  return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v;
1434
1431
  }, e(b);
1435
1432
  }
1436
- function r(b, v, g) {
1437
- return v && (function(h, f) {
1438
- for (var u = 0; u < f.length; u++) {
1439
- var w = f[u];
1433
+ function r(b, v, m) {
1434
+ return v && (function(h, p) {
1435
+ for (var u = 0; u < p.length; u++) {
1436
+ var w = p[u];
1440
1437
  w.enumerable = w.enumerable || !1, w.configurable = !0, "value" in w && (w.writable = !0), Object.defineProperty(h, o(w.key), w);
1441
1438
  }
1442
1439
  })(b.prototype, v), Object.defineProperty(b, "prototype", { writable: !1 }), b;
1443
1440
  }
1444
- function n(b, v, g) {
1445
- return v = s(v), (function(h, f) {
1446
- if (f && (e(f) == "object" || typeof f == "function")) return f;
1447
- if (f !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1441
+ function n(b, v, m) {
1442
+ return v = s(v), (function(h, p) {
1443
+ if (p && (e(p) == "object" || typeof p == "function")) return p;
1444
+ if (p !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1448
1445
  return (function(u) {
1449
1446
  if (u === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1450
1447
  return u;
1451
1448
  })(h);
1452
- })(b, t() ? Reflect.construct(v, g || [], s(b).constructor) : v.apply(b, g));
1449
+ })(b, t() ? Reflect.construct(v, m || [], s(b).constructor) : v.apply(b, m));
1453
1450
  }
1454
1451
  function t() {
1455
1452
  try {
@@ -1467,32 +1464,32 @@ var qn, Qn, aa = (function() {
1467
1464
  }, s(b);
1468
1465
  }
1469
1466
  function a(b, v) {
1470
- return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(g, h) {
1471
- return g.__proto__ = h, g;
1467
+ return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, h) {
1468
+ return m.__proto__ = h, m;
1472
1469
  }, a(b, v);
1473
1470
  }
1474
1471
  function o(b) {
1475
- var v = (function(g, h) {
1476
- if (e(g) != "object" || !g) return g;
1477
- var f = g[Symbol.toPrimitive];
1478
- if (f !== void 0) {
1479
- var u = f.call(g, h);
1472
+ var v = (function(m, h) {
1473
+ if (e(m) != "object" || !m) return m;
1474
+ var p = m[Symbol.toPrimitive];
1475
+ if (p !== void 0) {
1476
+ var u = p.call(m, h);
1480
1477
  if (e(u) != "object") return u;
1481
1478
  throw new TypeError("@@toPrimitive must return a primitive value.");
1482
1479
  }
1483
- return (h === "string" ? String : Number)(g);
1480
+ return (h === "string" ? String : Number)(m);
1484
1481
  })(b, "string");
1485
1482
  return e(v) == "symbol" ? v : v + "";
1486
1483
  }
1487
1484
  Qn = 1;
1488
- var c = q, i = yn(), l = oa.createFocusTrap, p = ia.isFocusable, x = (function(b) {
1489
- function v(g) {
1485
+ var l = q, i = yn(), c = aa.createFocusTrap, f = sa.isFocusable, x = (function(b) {
1486
+ function v(m) {
1490
1487
  var h;
1491
1488
  (function(w, E) {
1492
1489
  if (!(w instanceof E)) throw new TypeError("Cannot call a class as a function");
1493
1490
  })(this, v), (function(w, E, T) {
1494
1491
  (E = o(E)) in w ? Object.defineProperty(w, E, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : w[E] = T;
1495
- })(h = n(this, v, [g]), "getNodeForOption", function(w) {
1492
+ })(h = n(this, v, [m]), "getNodeForOption", function(w) {
1496
1493
  var E, T = (E = this.internalOptions[w]) !== null && E !== void 0 ? E : this.originalOptions[w];
1497
1494
  if (typeof T == "function") {
1498
1495
  for (var L = arguments.length, O = new Array(L > 1 ? L - 1 : 0), R = 1; R < L; R++) O[R - 1] = arguments[R];
@@ -1506,62 +1503,62 @@ var qn, Qn, aa = (function() {
1506
1503
  if (typeof T == "string" && !(D = (S = this.getDocument()) === null || S === void 0 ? void 0 : S.querySelector(T))) throw new Error("`".concat(w, "` as selector refers to no known node"));
1507
1504
  return D;
1508
1505
  }), h.handleDeactivate = h.handleDeactivate.bind(h), h.handlePostDeactivate = h.handlePostDeactivate.bind(h), h.handleClickOutsideDeactivates = h.handleClickOutsideDeactivates.bind(h), h.internalOptions = { returnFocusOnDeactivate: !1, checkCanReturnFocus: null, onDeactivate: h.handleDeactivate, onPostDeactivate: h.handlePostDeactivate, clickOutsideDeactivates: h.handleClickOutsideDeactivates }, h.originalOptions = { returnFocusOnDeactivate: !0, onDeactivate: null, onPostDeactivate: null, checkCanReturnFocus: null, clickOutsideDeactivates: !1 };
1509
- var f = g.focusTrapOptions;
1510
- for (var u in f) Object.prototype.hasOwnProperty.call(f, u) && (u !== "returnFocusOnDeactivate" && u !== "onDeactivate" && u !== "onPostDeactivate" && u !== "checkCanReturnFocus" && u !== "clickOutsideDeactivates" ? h.internalOptions[u] = f[u] : h.originalOptions[u] = f[u]);
1511
- return h.outsideClick = null, h.focusTrapElements = g.containerElements || [], h.updatePreviousElement(), h;
1506
+ var p = m.focusTrapOptions;
1507
+ for (var u in p) Object.prototype.hasOwnProperty.call(p, u) && (u !== "returnFocusOnDeactivate" && u !== "onDeactivate" && u !== "onPostDeactivate" && u !== "checkCanReturnFocus" && u !== "clickOutsideDeactivates" ? h.internalOptions[u] = p[u] : h.originalOptions[u] = p[u]);
1508
+ return h.outsideClick = null, h.focusTrapElements = m.containerElements || [], h.updatePreviousElement(), h;
1512
1509
  }
1513
- return (function(g, h) {
1510
+ return (function(m, h) {
1514
1511
  if (typeof h != "function" && h !== null) throw new TypeError("Super expression must either be null or a function");
1515
- g.prototype = Object.create(h && h.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), Object.defineProperty(g, "prototype", { writable: !1 }), h && a(g, h);
1512
+ m.prototype = Object.create(h && h.prototype, { constructor: { value: m, writable: !0, configurable: !0 } }), Object.defineProperty(m, "prototype", { writable: !1 }), h && a(m, h);
1516
1513
  })(v, b), r(v, [{ key: "getDocument", value: function() {
1517
1514
  return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
1518
1515
  } }, { key: "getReturnFocusNode", value: function() {
1519
- var g = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
1520
- return g || g !== !1 && this.previouslyFocusedElement;
1516
+ var m = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
1517
+ return m || m !== !1 && this.previouslyFocusedElement;
1521
1518
  } }, { key: "updatePreviousElement", value: function() {
1522
- var g = this.getDocument();
1523
- g && (this.previouslyFocusedElement = g.activeElement);
1519
+ var m = this.getDocument();
1520
+ m && (this.previouslyFocusedElement = m.activeElement);
1524
1521
  } }, { key: "deactivateTrap", value: function() {
1525
1522
  this.focusTrap && this.focusTrap.active && this.focusTrap.deactivate({ returnFocus: !1, checkCanReturnFocus: null, onDeactivate: this.originalOptions.onDeactivate });
1526
- } }, { key: "handleClickOutsideDeactivates", value: function(g) {
1527
- var h = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, g) : this.originalOptions.clickOutsideDeactivates;
1528
- return h && (this.outsideClick = { target: g.target, allowDeactivation: h }), h;
1523
+ } }, { key: "handleClickOutsideDeactivates", value: function(m) {
1524
+ var h = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, m) : this.originalOptions.clickOutsideDeactivates;
1525
+ return h && (this.outsideClick = { target: m.target, allowDeactivation: h }), h;
1529
1526
  } }, { key: "handleDeactivate", value: function() {
1530
1527
  this.originalOptions.onDeactivate && this.originalOptions.onDeactivate.call(null), this.deactivateTrap();
1531
1528
  } }, { key: "handlePostDeactivate", value: function() {
1532
- var g = this, h = function() {
1533
- var f = g.getReturnFocusNode(), u = !(!g.originalOptions.returnFocusOnDeactivate || f == null || !f.focus || g.outsideClick && (!g.outsideClick.allowDeactivation || p(g.outsideClick.target, g.internalOptions.tabbableOptions))), w = g.internalOptions.preventScroll, E = w !== void 0 && w;
1534
- u && f.focus({ preventScroll: E }), g.originalOptions.onPostDeactivate && g.originalOptions.onPostDeactivate.call(null), g.outsideClick = null;
1529
+ var m = this, h = function() {
1530
+ var p = m.getReturnFocusNode(), u = !(!m.originalOptions.returnFocusOnDeactivate || p == null || !p.focus || m.outsideClick && (!m.outsideClick.allowDeactivation || f(m.outsideClick.target, m.internalOptions.tabbableOptions))), w = m.internalOptions.preventScroll, E = w !== void 0 && w;
1531
+ u && p.focus({ preventScroll: E }), m.originalOptions.onPostDeactivate && m.originalOptions.onPostDeactivate.call(null), m.outsideClick = null;
1535
1532
  };
1536
1533
  this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(h, h) : h();
1537
1534
  } }, { key: "setupFocusTrap", value: function() {
1538
1535
  this.focusTrap ? this.props.active && !this.focusTrap.active && (this.focusTrap.activate(), this.props.paused && this.focusTrap.pause()) : this.focusTrapElements.some(Boolean) && (this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions), this.props.active && this.focusTrap.activate(), this.props.paused && this.focusTrap.pause());
1539
1536
  } }, { key: "componentDidMount", value: function() {
1540
1537
  this.props.active && this.setupFocusTrap();
1541
- } }, { key: "componentDidUpdate", value: function(g) {
1538
+ } }, { key: "componentDidUpdate", value: function(m) {
1542
1539
  if (this.focusTrap) {
1543
- g.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
1544
- var h = !g.active && this.props.active, f = g.active && !this.props.active, u = !g.paused && this.props.paused, w = g.paused && !this.props.paused;
1545
- if (h && (this.updatePreviousElement(), this.focusTrap.activate()), f) return void this.deactivateTrap();
1540
+ m.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
1541
+ var h = !m.active && this.props.active, p = m.active && !this.props.active, u = !m.paused && this.props.paused, w = m.paused && !this.props.paused;
1542
+ if (h && (this.updatePreviousElement(), this.focusTrap.activate()), p) return void this.deactivateTrap();
1546
1543
  u && this.focusTrap.pause(), w && this.focusTrap.unpause();
1547
- } else g.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1544
+ } else m.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1548
1545
  } }, { key: "componentWillUnmount", value: function() {
1549
1546
  this.deactivateTrap();
1550
1547
  } }, { key: "render", value: function() {
1551
- var g = this, h = this.props.children ? c.Children.only(this.props.children) : void 0;
1548
+ var m = this, h = this.props.children ? l.Children.only(this.props.children) : void 0;
1552
1549
  if (h) {
1553
- if (h.type && h.type === c.Fragment) throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
1554
- return c.cloneElement(h, { ref: function(f) {
1555
- var u = g.props.containerElements;
1556
- h && (typeof h.ref == "function" ? h.ref(f) : h.ref && (h.ref.current = f)), g.focusTrapElements = u || [f];
1550
+ if (h.type && h.type === l.Fragment) throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
1551
+ return l.cloneElement(h, { ref: function(p) {
1552
+ var u = m.props.containerElements;
1553
+ h && (typeof h.ref == "function" ? h.ref(p) : h.ref && (h.ref.current = p)), m.focusTrapElements = u || [p];
1557
1554
  } });
1558
1555
  }
1559
1556
  return null;
1560
1557
  } }]);
1561
- })(c.Component), m = typeof Element > "u" ? Function : Element;
1562
- return x.propTypes = { active: i.bool, paused: i.bool, focusTrapOptions: i.shape({ document: i.object, onActivate: i.func, onPostActivate: i.func, checkCanFocusTrap: i.func, onPause: i.func, onPostPause: i.func, onUnpause: i.func, onPostUnpause: i.func, onDeactivate: i.func, onPostDeactivate: i.func, checkCanReturnFocus: i.func, initialFocus: i.oneOfType([i.instanceOf(m), i.string, i.bool, i.func]), fallbackFocus: i.oneOfType([i.instanceOf(m), i.string, i.func]), escapeDeactivates: i.oneOfType([i.bool, i.func]), clickOutsideDeactivates: i.oneOfType([i.bool, i.func]), returnFocusOnDeactivate: i.bool, setReturnFocus: i.oneOfType([i.instanceOf(m), i.string, i.bool, i.func]), allowOutsideClick: i.oneOfType([i.bool, i.func]), preventScroll: i.bool, tabbableOptions: i.shape({ displayCheck: i.oneOf(["full", "legacy-full", "non-zero-area", "none"]), getShadowRoot: i.oneOfType([i.bool, i.func]) }), trapStack: i.array, isKeyForward: i.func, isKeyBackward: i.func }), containerElements: i.arrayOf(i.instanceOf(m)), children: i.oneOfType([i.element, i.instanceOf(m)]) }, x.defaultProps = { active: !0, paused: !1, focusTrapOptions: {}, _createFocusTrap: l }, qn = x;
1558
+ })(l.Component), y = typeof Element > "u" ? Function : Element;
1559
+ return x.propTypes = { active: i.bool, paused: i.bool, focusTrapOptions: i.shape({ document: i.object, onActivate: i.func, onPostActivate: i.func, checkCanFocusTrap: i.func, onPause: i.func, onPostPause: i.func, onUnpause: i.func, onPostUnpause: i.func, onDeactivate: i.func, onPostDeactivate: i.func, checkCanReturnFocus: i.func, initialFocus: i.oneOfType([i.instanceOf(y), i.string, i.bool, i.func]), fallbackFocus: i.oneOfType([i.instanceOf(y), i.string, i.func]), escapeDeactivates: i.oneOfType([i.bool, i.func]), clickOutsideDeactivates: i.oneOfType([i.bool, i.func]), returnFocusOnDeactivate: i.bool, setReturnFocus: i.oneOfType([i.instanceOf(y), i.string, i.bool, i.func]), allowOutsideClick: i.oneOfType([i.bool, i.func]), preventScroll: i.bool, tabbableOptions: i.shape({ displayCheck: i.oneOf(["full", "legacy-full", "non-zero-area", "none"]), getShadowRoot: i.oneOfType([i.bool, i.func]) }), trapStack: i.array, isKeyForward: i.func, isKeyBackward: i.func }), containerElements: i.arrayOf(i.instanceOf(y)), children: i.oneOfType([i.element, i.instanceOf(y)]) }, x.defaultProps = { active: !0, paused: !1, focusTrapOptions: {}, _createFocusTrap: c }, qn = x;
1563
1560
  })();
1564
- const sa = Ar(aa);
1561
+ const ca = Ar(la);
1565
1562
  var Jn, yt = { exports: {} }, Zn = {}, Pt = { exports: {} }, er, ye = {}, Ue = {};
1566
1563
  function Ht() {
1567
1564
  return er || (er = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.dontSetMe = function(e, r, n) {
@@ -1579,123 +1576,123 @@ function Ht() {
1579
1576
  var tr, nr, Ye = {};
1580
1577
  function bn() {
1581
1578
  if (nr) return ye;
1582
- nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, l, p, x) {
1579
+ nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, f, x) {
1583
1580
  if (!i) return;
1584
- const m = { capture: !0, ...x };
1585
- i.addEventListener ? i.addEventListener(l, p, m) : i.attachEvent ? i.attachEvent("on" + l, p) : i["on" + l] = p;
1581
+ const y = { capture: !0, ...x };
1582
+ i.addEventListener ? i.addEventListener(c, f, y) : i.attachEvent ? i.attachEvent("on" + c, f) : i["on" + c] = f;
1586
1583
  }, ye.addUserSelectStyles = function(i) {
1587
1584
  if (!i) return;
1588
- let l = i.getElementById("react-draggable-style-el");
1589
- l || (l = i.createElement("style"), l.type = "text/css", l.id = "react-draggable-style-el", l.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1590
- `, l.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1591
- `, i.getElementsByTagName("head")[0].appendChild(l)), i.body && o(i.body, "react-draggable-transparent-selection");
1592
- }, ye.createCSSTransform = function(i, l) {
1593
- const p = s(i, l, "px");
1594
- return { [(0, r.browserPrefixToKey)("transform", r.default)]: p };
1595
- }, ye.createSVGTransform = function(i, l) {
1596
- return s(i, l, "");
1597
- }, ye.getTouch = function(i, l) {
1598
- return i.targetTouches && (0, e.findInArray)(i.targetTouches, (p) => l === p.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (p) => l === p.identifier);
1585
+ let c = i.getElementById("react-draggable-style-el");
1586
+ c || (c = i.createElement("style"), c.type = "text/css", c.id = "react-draggable-style-el", c.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1587
+ `, c.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1588
+ `, i.getElementsByTagName("head")[0].appendChild(c)), i.body && o(i.body, "react-draggable-transparent-selection");
1589
+ }, ye.createCSSTransform = function(i, c) {
1590
+ const f = s(i, c, "px");
1591
+ return { [(0, r.browserPrefixToKey)("transform", r.default)]: f };
1592
+ }, ye.createSVGTransform = function(i, c) {
1593
+ return s(i, c, "");
1594
+ }, ye.getTouch = function(i, c) {
1595
+ return i.targetTouches && (0, e.findInArray)(i.targetTouches, (f) => c === f.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (f) => c === f.identifier);
1599
1596
  }, ye.getTouchIdentifier = function(i) {
1600
1597
  if (i.targetTouches && i.targetTouches[0]) return i.targetTouches[0].identifier;
1601
1598
  if (i.changedTouches && i.changedTouches[0]) return i.changedTouches[0].identifier;
1602
1599
  }, ye.getTranslation = s, ye.innerHeight = function(i) {
1603
- let l = i.clientHeight;
1604
- const p = i.ownerDocument.defaultView.getComputedStyle(i);
1605
- return l -= (0, e.int)(p.paddingTop), l -= (0, e.int)(p.paddingBottom), l;
1600
+ let c = i.clientHeight;
1601
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1602
+ return c -= (0, e.int)(f.paddingTop), c -= (0, e.int)(f.paddingBottom), c;
1606
1603
  }, ye.innerWidth = function(i) {
1607
- let l = i.clientWidth;
1608
- const p = i.ownerDocument.defaultView.getComputedStyle(i);
1609
- return l -= (0, e.int)(p.paddingLeft), l -= (0, e.int)(p.paddingRight), l;
1610
- }, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, l, p) {
1604
+ let c = i.clientWidth;
1605
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1606
+ return c -= (0, e.int)(f.paddingLeft), c -= (0, e.int)(f.paddingRight), c;
1607
+ }, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, c, f) {
1611
1608
  let x = i;
1612
1609
  do {
1613
- if (t(x, l)) return !0;
1614
- if (x === p) return !1;
1610
+ if (t(x, c)) return !0;
1611
+ if (x === f) return !1;
1615
1612
  x = x.parentNode;
1616
1613
  } while (x);
1617
1614
  return !1;
1618
- }, ye.offsetXYFromParent = function(i, l, p) {
1619
- const x = l === l.ownerDocument.body ? { left: 0, top: 0 } : l.getBoundingClientRect(), m = (i.clientX + l.scrollLeft - x.left) / p, b = (i.clientY + l.scrollTop - x.top) / p;
1620
- return { x: m, y: b };
1615
+ }, ye.offsetXYFromParent = function(i, c, f) {
1616
+ const x = c === c.ownerDocument.body ? { left: 0, top: 0 } : c.getBoundingClientRect(), y = (i.clientX + c.scrollLeft - x.left) / f, b = (i.clientY + c.scrollTop - x.top) / f;
1617
+ return { x: y, y: b };
1621
1618
  }, ye.outerHeight = function(i) {
1622
- let l = i.clientHeight;
1623
- const p = i.ownerDocument.defaultView.getComputedStyle(i);
1624
- return l += (0, e.int)(p.borderTopWidth), l += (0, e.int)(p.borderBottomWidth), l;
1619
+ let c = i.clientHeight;
1620
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1621
+ return c += (0, e.int)(f.borderTopWidth), c += (0, e.int)(f.borderBottomWidth), c;
1625
1622
  }, ye.outerWidth = function(i) {
1626
- let l = i.clientWidth;
1627
- const p = i.ownerDocument.defaultView.getComputedStyle(i);
1628
- return l += (0, e.int)(p.borderLeftWidth), l += (0, e.int)(p.borderRightWidth), l;
1629
- }, ye.removeClassName = c, ye.removeEvent = function(i, l, p, x) {
1623
+ let c = i.clientWidth;
1624
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1625
+ return c += (0, e.int)(f.borderLeftWidth), c += (0, e.int)(f.borderRightWidth), c;
1626
+ }, ye.removeClassName = l, ye.removeEvent = function(i, c, f, x) {
1630
1627
  if (!i) return;
1631
- const m = { capture: !0, ...x };
1632
- i.removeEventListener ? i.removeEventListener(l, p, m) : i.detachEvent ? i.detachEvent("on" + l, p) : i["on" + l] = null;
1628
+ const y = { capture: !0, ...x };
1629
+ i.removeEventListener ? i.removeEventListener(c, f, y) : i.detachEvent ? i.detachEvent("on" + c, f) : i["on" + c] = null;
1633
1630
  }, ye.scheduleRemoveUserSelectStyles = function(i) {
1634
1631
  window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1635
1632
  a(i);
1636
1633
  }) : a(i);
1637
1634
  };
1638
- var e = Ht(), r = (function(i, l) {
1639
- if (typeof WeakMap == "function") var p = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
1640
- return (function(m, b) {
1641
- if (!b && m && m.__esModule) return m;
1642
- var v, g, h = { __proto__: null, default: m };
1643
- if (m === null || typeof m != "object" && typeof m != "function") return h;
1644
- if (v = b ? x : p) {
1645
- if (v.has(m)) return v.get(m);
1646
- v.set(m, h);
1635
+ var e = Ht(), r = (function(i, c) {
1636
+ if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
1637
+ return (function(y, b) {
1638
+ if (!b && y && y.__esModule) return y;
1639
+ var v, m, h = { __proto__: null, default: y };
1640
+ if (y === null || typeof y != "object" && typeof y != "function") return h;
1641
+ if (v = b ? x : f) {
1642
+ if (v.has(y)) return v.get(y);
1643
+ v.set(y, h);
1647
1644
  }
1648
- for (const f in m) f !== "default" && {}.hasOwnProperty.call(m, f) && ((g = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, f)) && (g.get || g.set) ? v(h, f, g) : h[f] = m[f]);
1645
+ for (const p in y) p !== "default" && {}.hasOwnProperty.call(y, p) && ((m = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, p)) && (m.get || m.set) ? v(h, p, m) : h[p] = y[p]);
1649
1646
  return h;
1650
- })(i, l);
1647
+ })(i, c);
1651
1648
  })((function() {
1652
1649
  if (tr) return Ye;
1653
- tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = p, Ye.browserPrefixToStyle = function(x, m) {
1654
- return m ? `-${m.toLowerCase()}-${x}` : x;
1655
- }, Ye.default = void 0, Ye.getPrefix = l;
1650
+ tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = f, Ye.browserPrefixToStyle = function(x, y) {
1651
+ return y ? `-${y.toLowerCase()}-${x}` : x;
1652
+ }, Ye.default = void 0, Ye.getPrefix = c;
1656
1653
  const i = ["Moz", "Webkit", "O", "ms"];
1657
- function l() {
1654
+ function c() {
1658
1655
  let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1659
1656
  if (typeof window > "u") return "";
1660
- const m = window.document?.documentElement?.style;
1661
- if (!m || x in m) return "";
1662
- for (let b = 0; b < i.length; b++) if (p(x, i[b]) in m) return i[b];
1657
+ const y = window.document?.documentElement?.style;
1658
+ if (!y || x in y) return "";
1659
+ for (let b = 0; b < i.length; b++) if (f(x, i[b]) in y) return i[b];
1663
1660
  return "";
1664
1661
  }
1665
- function p(x, m) {
1666
- return m ? `${m}${(function(b) {
1667
- let v = "", g = !0;
1668
- for (let h = 0; h < b.length; h++) g ? (v += b[h].toUpperCase(), g = !1) : b[h] === "-" ? g = !0 : v += b[h];
1662
+ function f(x, y) {
1663
+ return y ? `${y}${(function(b) {
1664
+ let v = "", m = !0;
1665
+ for (let h = 0; h < b.length; h++) m ? (v += b[h].toUpperCase(), m = !1) : b[h] === "-" ? m = !0 : v += b[h];
1669
1666
  return v;
1670
1667
  })(x)}` : x;
1671
1668
  }
1672
- return Ye.default = l(), Ye;
1669
+ return Ye.default = c(), Ye;
1673
1670
  })());
1674
1671
  let n = "";
1675
- function t(i, l) {
1676
- return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(p) {
1677
- return (0, e.isFunction)(i[p]);
1678
- })), !!(0, e.isFunction)(i[n]) && i[n](l);
1672
+ function t(i, c) {
1673
+ return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(f) {
1674
+ return (0, e.isFunction)(i[f]);
1675
+ })), !!(0, e.isFunction)(i[n]) && i[n](c);
1679
1676
  }
1680
- function s(i, l, p) {
1681
- let { x, y: m } = i, b = `translate(${x}${p},${m}${p})`;
1682
- return l && (b = `translate(${`${typeof l.x == "string" ? l.x : l.x + p}`}, ${`${typeof l.y == "string" ? l.y : l.y + p}`})` + b), b;
1677
+ function s(i, c, f) {
1678
+ let { x, y } = i, b = `translate(${x}${f},${y}${f})`;
1679
+ return c && (b = `translate(${`${typeof c.x == "string" ? c.x : c.x + f}`}, ${`${typeof c.y == "string" ? c.y : c.y + f}`})` + b), b;
1683
1680
  }
1684
1681
  function a(i) {
1685
1682
  if (i) try {
1686
- if (i.body && c(i.body, "react-draggable-transparent-selection"), i.selection) i.selection.empty();
1683
+ if (i.body && l(i.body, "react-draggable-transparent-selection"), i.selection) i.selection.empty();
1687
1684
  else {
1688
- const l = (i.defaultView || window).getSelection();
1689
- l && l.type !== "Caret" && l.removeAllRanges();
1685
+ const c = (i.defaultView || window).getSelection();
1686
+ c && c.type !== "Caret" && c.removeAllRanges();
1690
1687
  }
1691
1688
  } catch {
1692
1689
  }
1693
1690
  }
1694
- function o(i, l) {
1695
- i.classList ? i.classList.add(l) : i.className.match(new RegExp(`(?:^|\\s)${l}(?!\\S)`)) || (i.className += ` ${l}`);
1691
+ function o(i, c) {
1692
+ i.classList ? i.classList.add(c) : i.className.match(new RegExp(`(?:^|\\s)${c}(?!\\S)`)) || (i.className += ` ${c}`);
1696
1693
  }
1697
- function c(i, l) {
1698
- i.classList ? i.classList.remove(l) : i.className = i.className.replace(new RegExp(`(?:^|\\s)${l}(?!\\S)`, "g"), "");
1694
+ function l(i, c) {
1695
+ i.classList ? i.classList.remove(c) : i.className = i.className.replace(new RegExp(`(?:^|\\s)${c}(?!\\S)`, "g"), "");
1699
1696
  }
1700
1697
  return ye;
1701
1698
  }
@@ -1707,8 +1704,8 @@ function fo() {
1707
1704
  }, je.canDragY = function(t) {
1708
1705
  return t.props.axis === "both" || t.props.axis === "y";
1709
1706
  }, je.createCoreData = function(t, s, a) {
1710
- const o = !(0, e.isNum)(t.lastX), c = n(t);
1711
- return o ? { node: c, deltaX: 0, deltaY: 0, lastX: s, lastY: a, x: s, y: a } : { node: c, deltaX: s - t.lastX, deltaY: a - t.lastY, lastX: t.lastX, lastY: t.lastY, x: s, y: a };
1707
+ const o = !(0, e.isNum)(t.lastX), l = n(t);
1708
+ return o ? { node: l, deltaX: 0, deltaY: 0, lastX: s, lastY: a, x: s, y: a } : { node: l, deltaX: s - t.lastX, deltaY: a - t.lastY, lastX: t.lastX, lastY: t.lastY, x: s, y: a };
1712
1709
  }, je.createDraggableData = function(t, s) {
1713
1710
  const a = t.props.scale;
1714
1711
  return { node: s.node, x: t.state.x + s.deltaX / a, y: t.state.y + s.deltaY / a, deltaX: s.deltaX / a, deltaY: s.deltaY / a, lastX: t.state.x, lastY: t.state.y };
@@ -1718,23 +1715,23 @@ function fo() {
1718
1715
  o = typeof o == "string" ? o : (function(i) {
1719
1716
  return { left: i.left, top: i.top, right: i.right, bottom: i.bottom };
1720
1717
  })(o);
1721
- const c = n(t);
1718
+ const l = n(t);
1722
1719
  if (typeof o == "string") {
1723
- const { ownerDocument: i } = c, l = i.defaultView;
1724
- let p;
1725
- if (o === "parent" ? p = c.parentNode : p = c.getRootNode().querySelector(o), !(p instanceof l.HTMLElement)) throw new Error('Bounds selector "' + o + '" could not find an element.');
1726
- const x = p, m = l.getComputedStyle(c), b = l.getComputedStyle(x);
1727
- o = { left: -c.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(m.marginLeft), top: -c.offsetTop + (0, e.int)(b.paddingTop) + (0, e.int)(m.marginTop), right: (0, r.innerWidth)(x) - (0, r.outerWidth)(c) - c.offsetLeft + (0, e.int)(b.paddingRight) - (0, e.int)(m.marginRight), bottom: (0, r.innerHeight)(x) - (0, r.outerHeight)(c) - c.offsetTop + (0, e.int)(b.paddingBottom) - (0, e.int)(m.marginBottom) };
1720
+ const { ownerDocument: i } = l, c = i.defaultView;
1721
+ let f;
1722
+ if (o === "parent" ? f = l.parentNode : f = l.getRootNode().querySelector(o), !(f instanceof c.HTMLElement)) throw new Error('Bounds selector "' + o + '" could not find an element.');
1723
+ const x = f, y = c.getComputedStyle(l), b = c.getComputedStyle(x);
1724
+ o = { left: -l.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(y.marginLeft), top: -l.offsetTop + (0, e.int)(b.paddingTop) + (0, e.int)(y.marginTop), right: (0, r.innerWidth)(x) - (0, r.outerWidth)(l) - l.offsetLeft + (0, e.int)(b.paddingRight) - (0, e.int)(y.marginRight), bottom: (0, r.innerHeight)(x) - (0, r.outerHeight)(l) - l.offsetTop + (0, e.int)(b.paddingBottom) - (0, e.int)(y.marginBottom) };
1728
1725
  }
1729
1726
  return (0, e.isNum)(o.right) && (s = Math.min(s, o.right)), (0, e.isNum)(o.bottom) && (a = Math.min(a, o.bottom)), (0, e.isNum)(o.left) && (s = Math.max(s, o.left)), (0, e.isNum)(o.top) && (a = Math.max(a, o.top)), [s, a];
1730
1727
  }, je.getControlPosition = function(t, s, a) {
1731
1728
  const o = typeof s == "number" ? (0, r.getTouch)(t, s) : null;
1732
1729
  if (typeof s == "number" && !o) return null;
1733
- const c = n(a), i = a.props.offsetParent || c.offsetParent || c.ownerDocument.body;
1730
+ const l = n(a), i = a.props.offsetParent || l.offsetParent || l.ownerDocument.body;
1734
1731
  return (0, r.offsetXYFromParent)(o || t, i, a.props.scale);
1735
1732
  }, je.snapToGrid = function(t, s, a) {
1736
- const o = Math.round(s / t[0]) * t[0], c = Math.round(a / t[1]) * t[1];
1737
- return [o, c];
1733
+ const o = Math.round(s / t[0]) * t[0], l = Math.round(a / t[1]) * t[1];
1734
+ return [o, l];
1738
1735
  };
1739
1736
  var e = Ht(), r = bn();
1740
1737
  function n(t) {
@@ -1749,29 +1746,29 @@ function ho() {
1749
1746
  return or || (or = 1, Object.defineProperty(Rt, "__esModule", { value: !0 }), Rt.default = function() {
1750
1747
  }), Rt;
1751
1748
  }
1752
- function la() {
1749
+ function ua() {
1753
1750
  if (ir) return bt;
1754
1751
  ir = 1, Object.defineProperty(bt, "__esModule", { value: !0 }), bt.default = void 0;
1755
1752
  var e = (function(b, v) {
1756
- if (typeof WeakMap == "function") var g = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1757
- return (function(f, u) {
1758
- if (!u && f && f.__esModule) return f;
1759
- var w, E, T = { __proto__: null, default: f };
1760
- if (f === null || typeof f != "object" && typeof f != "function") return T;
1761
- if (w = u ? h : g) {
1762
- if (w.has(f)) return w.get(f);
1763
- w.set(f, T);
1753
+ if (typeof WeakMap == "function") var m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1754
+ return (function(p, u) {
1755
+ if (!u && p && p.__esModule) return p;
1756
+ var w, E, T = { __proto__: null, default: p };
1757
+ if (p === null || typeof p != "object" && typeof p != "function") return T;
1758
+ if (w = u ? h : m) {
1759
+ if (w.has(p)) return w.get(p);
1760
+ w.set(p, T);
1764
1761
  }
1765
- for (const L in f) L !== "default" && {}.hasOwnProperty.call(f, L) && ((E = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(f, L)) && (E.get || E.set) ? w(T, L, E) : T[L] = f[L]);
1762
+ for (const L in p) L !== "default" && {}.hasOwnProperty.call(p, L) && ((E = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(p, L)) && (E.get || E.set) ? w(T, L, E) : T[L] = p[L]);
1766
1763
  return T;
1767
1764
  })(b, v);
1768
- })(q), r = c(yn()), n = c(Rr), t = bn(), s = fo(), a = Ht(), o = c(ho());
1769
- function c(b) {
1765
+ })(q), r = l(yn()), n = l(Rr), t = bn(), s = fo(), a = Ht(), o = l(ho());
1766
+ function l(b) {
1770
1767
  return b && b.__esModule ? b : { default: b };
1771
1768
  }
1772
- function i(b, v, g) {
1769
+ function i(b, v, m) {
1773
1770
  return (v = (function(h) {
1774
- var f = (function(u, w) {
1771
+ var p = (function(u, w) {
1775
1772
  if (typeof u != "object" || !u) return u;
1776
1773
  var E = u[Symbol.toPrimitive];
1777
1774
  if (E !== void 0) {
@@ -1781,36 +1778,36 @@ function la() {
1781
1778
  }
1782
1779
  return (w === "string" ? String : Number)(u);
1783
1780
  })(h, "string");
1784
- return typeof f == "symbol" ? f : f + "";
1785
- })(v)) in b ? Object.defineProperty(b, v, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = g, b;
1781
+ return typeof p == "symbol" ? p : p + "";
1782
+ })(v)) in b ? Object.defineProperty(b, v, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = m, b;
1786
1783
  }
1787
- const l = { start: "touchstart", move: "touchmove", stop: "touchend" }, p = { start: "mousedown", move: "mousemove", stop: "mouseup" };
1788
- let x = p, m = class extends e.Component {
1784
+ const c = { start: "touchstart", move: "touchmove", stop: "touchend" }, f = { start: "mousedown", move: "mousemove", stop: "mouseup" };
1785
+ let x = f, y = class extends e.Component {
1789
1786
  constructor() {
1790
1787
  super(...arguments), i(this, "dragging", !1), i(this, "lastX", NaN), i(this, "lastY", NaN), i(this, "touchIdentifier", null), i(this, "mounted", !1), i(this, "handleDragStart", (b) => {
1791
1788
  if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
1792
1789
  const v = this.findDOMNode();
1793
1790
  if (!v || !v.ownerDocument || !v.ownerDocument.body) throw new Error("<DraggableCore> not mounted on DragStart!");
1794
- const { ownerDocument: g } = v;
1795
- if (this.props.disabled || !(b.target instanceof g.defaultView.Node) || this.props.handle && !(0, t.matchesSelectorAndParentsTo)(b.target, this.props.handle, v) || this.props.cancel && (0, t.matchesSelectorAndParentsTo)(b.target, this.props.cancel, v)) return;
1791
+ const { ownerDocument: m } = v;
1792
+ if (this.props.disabled || !(b.target instanceof m.defaultView.Node) || this.props.handle && !(0, t.matchesSelectorAndParentsTo)(b.target, this.props.handle, v) || this.props.cancel && (0, t.matchesSelectorAndParentsTo)(b.target, this.props.cancel, v)) return;
1796
1793
  b.type !== "touchstart" || this.props.allowMobileScroll || b.preventDefault();
1797
1794
  const h = (0, t.getTouchIdentifier)(b);
1798
1795
  this.touchIdentifier = h;
1799
- const f = (0, s.getControlPosition)(b, h, this);
1800
- if (f == null) return;
1801
- const { x: u, y: w } = f, E = (0, s.createCoreData)(this, u, w);
1802
- (0, o.default)("DraggableCore: handleDragStart: %j", E), (0, o.default)("calling", this.props.onStart), this.props.onStart(b, E) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, t.addUserSelectStyles)(g), this.dragging = !0, this.lastX = u, this.lastY = w, (0, t.addEvent)(g, x.move, this.handleDrag), (0, t.addEvent)(g, x.stop, this.handleDragStop));
1796
+ const p = (0, s.getControlPosition)(b, h, this);
1797
+ if (p == null) return;
1798
+ const { x: u, y: w } = p, E = (0, s.createCoreData)(this, u, w);
1799
+ (0, o.default)("DraggableCore: handleDragStart: %j", E), (0, o.default)("calling", this.props.onStart), this.props.onStart(b, E) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, t.addUserSelectStyles)(m), this.dragging = !0, this.lastX = u, this.lastY = w, (0, t.addEvent)(m, x.move, this.handleDrag), (0, t.addEvent)(m, x.stop, this.handleDragStop));
1803
1800
  }), i(this, "handleDrag", (b) => {
1804
1801
  const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1805
1802
  if (v == null) return;
1806
- let { x: g, y: h } = v;
1803
+ let { x: m, y: h } = v;
1807
1804
  if (Array.isArray(this.props.grid)) {
1808
- let u = g - this.lastX, w = h - this.lastY;
1805
+ let u = m - this.lastX, w = h - this.lastY;
1809
1806
  if ([u, w] = (0, s.snapToGrid)(this.props.grid, u, w), !u && !w) return;
1810
- g = this.lastX + u, h = this.lastY + w;
1807
+ m = this.lastX + u, h = this.lastY + w;
1811
1808
  }
1812
- const f = (0, s.createCoreData)(this, g, h);
1813
- if ((0, o.default)("DraggableCore: handleDrag: %j", f), this.props.onDrag(b, f) !== !1 && this.mounted !== !1) this.lastX = g, this.lastY = h;
1809
+ const p = (0, s.createCoreData)(this, m, h);
1810
+ if ((0, o.default)("DraggableCore: handleDrag: %j", p), this.props.onDrag(b, p) !== !1 && this.mounted !== !1) this.lastX = m, this.lastY = h;
1814
1811
  else try {
1815
1812
  this.handleDragStop(new MouseEvent("mouseup"));
1816
1813
  } catch {
@@ -1821,28 +1818,28 @@ function la() {
1821
1818
  if (!this.dragging) return;
1822
1819
  const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1823
1820
  if (v == null) return;
1824
- let { x: g, y: h } = v;
1821
+ let { x: m, y: h } = v;
1825
1822
  if (Array.isArray(this.props.grid)) {
1826
- let w = g - this.lastX || 0, E = h - this.lastY || 0;
1827
- [w, E] = (0, s.snapToGrid)(this.props.grid, w, E), g = this.lastX + w, h = this.lastY + E;
1823
+ let w = m - this.lastX || 0, E = h - this.lastY || 0;
1824
+ [w, E] = (0, s.snapToGrid)(this.props.grid, w, E), m = this.lastX + w, h = this.lastY + E;
1828
1825
  }
1829
- const f = (0, s.createCoreData)(this, g, h);
1830
- if (this.props.onStop(b, f) === !1 || this.mounted === !1) return !1;
1826
+ const p = (0, s.createCoreData)(this, m, h);
1827
+ if (this.props.onStop(b, p) === !1 || this.mounted === !1) return !1;
1831
1828
  const u = this.findDOMNode();
1832
- u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", f), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, u && ((0, o.default)("DraggableCore: Removing handlers"), (0, t.removeEvent)(u.ownerDocument, x.move, this.handleDrag), (0, t.removeEvent)(u.ownerDocument, x.stop, this.handleDragStop));
1833
- }), i(this, "onMouseDown", (b) => (x = p, this.handleDragStart(b))), i(this, "onMouseUp", (b) => (x = p, this.handleDragStop(b))), i(this, "onTouchStart", (b) => (x = l, this.handleDragStart(b))), i(this, "onTouchEnd", (b) => (x = l, this.handleDragStop(b)));
1829
+ u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", p), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, u && ((0, o.default)("DraggableCore: Removing handlers"), (0, t.removeEvent)(u.ownerDocument, x.move, this.handleDrag), (0, t.removeEvent)(u.ownerDocument, x.stop, this.handleDragStop));
1830
+ }), i(this, "onMouseDown", (b) => (x = f, this.handleDragStart(b))), i(this, "onMouseUp", (b) => (x = f, this.handleDragStop(b))), i(this, "onTouchStart", (b) => (x = c, this.handleDragStart(b))), i(this, "onTouchEnd", (b) => (x = c, this.handleDragStop(b)));
1834
1831
  }
1835
1832
  componentDidMount() {
1836
1833
  this.mounted = !0;
1837
1834
  const b = this.findDOMNode();
1838
- b && (0, t.addEvent)(b, l.start, this.onTouchStart, { passive: !1 });
1835
+ b && (0, t.addEvent)(b, c.start, this.onTouchStart, { passive: !1 });
1839
1836
  }
1840
1837
  componentWillUnmount() {
1841
1838
  this.mounted = !1;
1842
1839
  const b = this.findDOMNode();
1843
1840
  if (b) {
1844
1841
  const { ownerDocument: v } = b;
1845
- (0, t.removeEvent)(v, p.move, this.handleDrag), (0, t.removeEvent)(v, l.move, this.handleDrag), (0, t.removeEvent)(v, p.stop, this.handleDragStop), (0, t.removeEvent)(v, l.stop, this.handleDragStop), (0, t.removeEvent)(b, l.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(v);
1842
+ (0, t.removeEvent)(v, f.move, this.handleDrag), (0, t.removeEvent)(v, c.move, this.handleDrag), (0, t.removeEvent)(v, f.stop, this.handleDragStop), (0, t.removeEvent)(v, c.stop, this.handleDragStop), (0, t.removeEvent)(b, c.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(v);
1846
1843
  }
1847
1844
  }
1848
1845
  findDOMNode() {
@@ -1852,63 +1849,63 @@ function la() {
1852
1849
  return e.cloneElement(e.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
1853
1850
  }
1854
1851
  };
1855
- return bt.default = m, i(m, "displayName", "DraggableCore"), i(m, "propTypes", { allowAnyClick: r.default.bool, allowMobileScroll: r.default.bool, children: r.default.node.isRequired, disabled: r.default.bool, enableUserSelectHack: r.default.bool, offsetParent: function(b, v) {
1852
+ return bt.default = y, i(y, "displayName", "DraggableCore"), i(y, "propTypes", { allowAnyClick: r.default.bool, allowMobileScroll: r.default.bool, children: r.default.node.isRequired, disabled: r.default.bool, enableUserSelectHack: r.default.bool, offsetParent: function(b, v) {
1856
1853
  if (b[v] && b[v].nodeType !== 1) throw new Error("Draggable's offsetParent must be a DOM Node.");
1857
- }, grid: r.default.arrayOf(r.default.number), handle: r.default.string, cancel: r.default.string, nodeRef: r.default.object, onStart: r.default.func, onDrag: r.default.func, onStop: r.default.func, onMouseDown: r.default.func, scale: r.default.number, className: a.dontSetMe, style: a.dontSetMe, transform: a.dontSetMe }), i(m, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
1854
+ }, grid: r.default.arrayOf(r.default.number), handle: r.default.string, cancel: r.default.string, nodeRef: r.default.object, onStart: r.default.func, onDrag: r.default.func, onStop: r.default.func, onMouseDown: r.default.func, scale: r.default.number, className: a.dontSetMe, style: a.dontSetMe, transform: a.dontSetMe }), i(y, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
1858
1855
  }, onDrag: function() {
1859
1856
  }, onStop: function() {
1860
1857
  }, onMouseDown: function() {
1861
1858
  }, scale: 1 }), bt;
1862
1859
  }
1863
- function ca() {
1860
+ function da() {
1864
1861
  return ar || (ar = 1, (function(e) {
1865
1862
  Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "DraggableCore", { enumerable: !0, get: function() {
1866
1863
  return i.default;
1867
1864
  } }), e.default = void 0;
1868
- var r = (function(v, g) {
1869
- if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap();
1865
+ var r = (function(v, m) {
1866
+ if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap();
1870
1867
  return (function(u, w) {
1871
1868
  if (!w && u && u.__esModule) return u;
1872
1869
  var E, T, L = { __proto__: null, default: u };
1873
1870
  if (u === null || typeof u != "object" && typeof u != "function") return L;
1874
- if (E = w ? f : h) {
1871
+ if (E = w ? p : h) {
1875
1872
  if (E.has(u)) return E.get(u);
1876
1873
  E.set(u, L);
1877
1874
  }
1878
1875
  for (const O in u) O !== "default" && {}.hasOwnProperty.call(u, O) && ((T = (E = Object.defineProperty) && Object.getOwnPropertyDescriptor(u, O)) && (T.get || T.set) ? E(L, O, T) : L[O] = u[O]);
1879
1876
  return L;
1880
- })(v, g);
1881
- })(q), n = p(yn()), t = p(Rr), s = (function() {
1877
+ })(v, m);
1878
+ })(q), n = f(yn()), t = f(Rr), s = (function() {
1882
1879
  if (Jn) return Pt.exports;
1883
1880
  function v(h) {
1884
- var f, u, w = "";
1881
+ var p, u, w = "";
1885
1882
  if (typeof h == "string" || typeof h == "number") w += h;
1886
1883
  else if (typeof h == "object") if (Array.isArray(h)) {
1887
1884
  var E = h.length;
1888
- for (f = 0; f < E; f++) h[f] && (u = v(h[f])) && (w && (w += " "), w += u);
1885
+ for (p = 0; p < E; p++) h[p] && (u = v(h[p])) && (w && (w += " "), w += u);
1889
1886
  } else for (u in h) h[u] && (w && (w += " "), w += u);
1890
1887
  return w;
1891
1888
  }
1892
- function g() {
1893
- for (var h, f, u = 0, w = "", E = arguments.length; u < E; u++) (h = arguments[u]) && (f = v(h)) && (w && (w += " "), w += f);
1889
+ function m() {
1890
+ for (var h, p, u = 0, w = "", E = arguments.length; u < E; u++) (h = arguments[u]) && (p = v(h)) && (w && (w += " "), w += p);
1894
1891
  return w;
1895
1892
  }
1896
- return Jn = 1, Pt.exports = g, Pt.exports.clsx = g, Pt.exports;
1897
- })(), a = bn(), o = fo(), c = Ht(), i = p(la()), l = p(ho());
1898
- function p(v) {
1893
+ return Jn = 1, Pt.exports = m, Pt.exports.clsx = m, Pt.exports;
1894
+ })(), a = bn(), o = fo(), l = Ht(), i = f(ua()), c = f(ho());
1895
+ function f(v) {
1899
1896
  return v && v.__esModule ? v : { default: v };
1900
1897
  }
1901
1898
  function x() {
1902
1899
  return x = Object.assign ? Object.assign.bind() : function(v) {
1903
- for (var g = 1; g < arguments.length; g++) {
1904
- var h = arguments[g];
1905
- for (var f in h) ({}).hasOwnProperty.call(h, f) && (v[f] = h[f]);
1900
+ for (var m = 1; m < arguments.length; m++) {
1901
+ var h = arguments[m];
1902
+ for (var p in h) ({}).hasOwnProperty.call(h, p) && (v[p] = h[p]);
1906
1903
  }
1907
1904
  return v;
1908
1905
  }, x.apply(null, arguments);
1909
1906
  }
1910
- function m(v, g, h) {
1911
- return (g = (function(f) {
1907
+ function y(v, m, h) {
1908
+ return (m = (function(p) {
1912
1909
  var u = (function(w, E) {
1913
1910
  if (typeof w != "object" || !w) return w;
1914
1911
  var T = w[Symbol.toPrimitive];
@@ -1918,23 +1915,23 @@ function ca() {
1918
1915
  throw new TypeError("@@toPrimitive must return a primitive value.");
1919
1916
  }
1920
1917
  return (E === "string" ? String : Number)(w);
1921
- })(f, "string");
1918
+ })(p, "string");
1922
1919
  return typeof u == "symbol" ? u : u + "";
1923
- })(g)) in v ? Object.defineProperty(v, g, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : v[g] = h, v;
1920
+ })(m)) in v ? Object.defineProperty(v, m, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : v[m] = h, v;
1924
1921
  }
1925
1922
  class b extends r.Component {
1926
- static getDerivedStateFromProps(g, h) {
1927
- let { position: f } = g, { prevPropsPosition: u } = h;
1928
- return !f || u && f.x === u.x && f.y === u.y ? null : ((0, l.default)("Draggable: getDerivedStateFromProps %j", { position: f, prevPropsPosition: u }), { x: f.x, y: f.y, prevPropsPosition: { ...f } });
1923
+ static getDerivedStateFromProps(m, h) {
1924
+ let { position: p } = m, { prevPropsPosition: u } = h;
1925
+ return !p || u && p.x === u.x && p.y === u.y ? null : ((0, c.default)("Draggable: getDerivedStateFromProps %j", { position: p, prevPropsPosition: u }), { x: p.x, y: p.y, prevPropsPosition: { ...p } });
1929
1926
  }
1930
- constructor(g) {
1931
- super(g), m(this, "onDragStart", (h, f) => {
1932
- if ((0, l.default)("Draggable: onDragStart: %j", f), this.props.onStart(h, (0, o.createDraggableData)(this, f)) === !1) return !1;
1927
+ constructor(m) {
1928
+ super(m), y(this, "onDragStart", (h, p) => {
1929
+ if ((0, c.default)("Draggable: onDragStart: %j", p), this.props.onStart(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1933
1930
  this.setState({ dragging: !0, dragged: !0 });
1934
- }), m(this, "onDrag", (h, f) => {
1931
+ }), y(this, "onDrag", (h, p) => {
1935
1932
  if (!this.state.dragging) return !1;
1936
- (0, l.default)("Draggable: onDrag: %j", f);
1937
- const u = (0, o.createDraggableData)(this, f), w = { x: u.x, y: u.y, slackX: 0, slackY: 0 };
1933
+ (0, c.default)("Draggable: onDrag: %j", p);
1934
+ const u = (0, o.createDraggableData)(this, p), w = { x: u.x, y: u.y, slackX: 0, slackY: 0 };
1938
1935
  if (this.props.bounds) {
1939
1936
  const { x: E, y: T } = w;
1940
1937
  w.x += this.state.slackX, w.y += this.state.slackY;
@@ -1943,16 +1940,16 @@ function ca() {
1943
1940
  }
1944
1941
  if (this.props.onDrag(h, u) === !1) return !1;
1945
1942
  this.setState(w);
1946
- }), m(this, "onDragStop", (h, f) => {
1947
- if (!this.state.dragging || this.props.onStop(h, (0, o.createDraggableData)(this, f)) === !1) return !1;
1948
- (0, l.default)("Draggable: onDragStop: %j", f);
1943
+ }), y(this, "onDragStop", (h, p) => {
1944
+ if (!this.state.dragging || this.props.onStop(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1945
+ (0, c.default)("Draggable: onDragStop: %j", p);
1949
1946
  const u = { dragging: !1, slackX: 0, slackY: 0 };
1950
1947
  if (this.props.position) {
1951
1948
  const { x: w, y: E } = this.props.position;
1952
1949
  u.x = w, u.y = E;
1953
1950
  }
1954
1951
  this.setState(u);
1955
- }), this.state = { dragging: !1, dragged: !1, x: g.position ? g.position.x : g.defaultPosition.x, y: g.position ? g.position.y : g.defaultPosition.y, prevPropsPosition: { ...g.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !g.position || g.onDrag || g.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
1952
+ }), this.state = { dragging: !1, dragged: !1, x: m.position ? m.position.x : m.defaultPosition.x, y: m.position ? m.position.y : m.defaultPosition.y, prevPropsPosition: { ...m.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !m.position || m.onDrag || m.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
1956
1953
  }
1957
1954
  componentDidMount() {
1958
1955
  window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
@@ -1964,56 +1961,56 @@ function ca() {
1964
1961
  return this.props?.nodeRef?.current ?? t.default.findDOMNode(this);
1965
1962
  }
1966
1963
  render() {
1967
- const { axis: g, bounds: h, children: f, defaultPosition: u, defaultClassName: w, defaultClassNameDragging: E, defaultClassNameDragged: T, position: L, positionOffset: O, scale: R, ...S } = this.props;
1964
+ const { axis: m, bounds: h, children: p, defaultPosition: u, defaultClassName: w, defaultClassNameDragging: E, defaultClassNameDragged: T, position: L, positionOffset: O, scale: R, ...S } = this.props;
1968
1965
  let D = {}, P = null;
1969
1966
  const M = !L || this.state.dragging, I = L || u, A = { x: (0, o.canDragX)(this) && M ? this.state.x : I.x, y: (0, o.canDragY)(this) && M ? this.state.y : I.y };
1970
1967
  this.state.isElementSVG ? P = (0, a.createSVGTransform)(A, O) : D = (0, a.createCSSTransform)(A, O);
1971
- const V = (0, s.clsx)(f.props.className || "", w, { [E]: this.state.dragging, [T]: this.state.dragged });
1972
- return r.createElement(i.default, x({}, S, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), r.cloneElement(r.Children.only(f), { className: V, style: { ...f.props.style, ...D }, transform: P }));
1968
+ const V = (0, s.clsx)(p.props.className || "", w, { [E]: this.state.dragging, [T]: this.state.dragged });
1969
+ return r.createElement(i.default, x({}, S, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), r.cloneElement(r.Children.only(p), { className: V, style: { ...p.props.style, ...D }, transform: P }));
1973
1970
  }
1974
1971
  }
1975
- e.default = b, m(b, "displayName", "Draggable"), m(b, "propTypes", { ...i.default.propTypes, axis: n.default.oneOf(["both", "x", "y", "none"]), bounds: n.default.oneOfType([n.default.shape({ left: n.default.number, right: n.default.number, top: n.default.number, bottom: n.default.number }), n.default.string, n.default.oneOf([!1])]), defaultClassName: n.default.string, defaultClassNameDragging: n.default.string, defaultClassNameDragged: n.default.string, defaultPosition: n.default.shape({ x: n.default.number, y: n.default.number }), positionOffset: n.default.shape({ x: n.default.oneOfType([n.default.number, n.default.string]), y: n.default.oneOfType([n.default.number, n.default.string]) }), position: n.default.shape({ x: n.default.number, y: n.default.number }), className: c.dontSetMe, style: c.dontSetMe, transform: c.dontSetMe }), m(b, "defaultProps", { ...i.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
1972
+ e.default = b, y(b, "displayName", "Draggable"), y(b, "propTypes", { ...i.default.propTypes, axis: n.default.oneOf(["both", "x", "y", "none"]), bounds: n.default.oneOfType([n.default.shape({ left: n.default.number, right: n.default.number, top: n.default.number, bottom: n.default.number }), n.default.string, n.default.oneOf([!1])]), defaultClassName: n.default.string, defaultClassNameDragging: n.default.string, defaultClassNameDragged: n.default.string, defaultPosition: n.default.shape({ x: n.default.number, y: n.default.number }), positionOffset: n.default.shape({ x: n.default.oneOfType([n.default.number, n.default.string]), y: n.default.oneOfType([n.default.number, n.default.string]) }), position: n.default.shape({ x: n.default.number, y: n.default.number }), className: l.dontSetMe, style: l.dontSetMe, transform: l.dontSetMe }), y(b, "defaultProps", { ...i.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
1976
1973
  })(Zn)), Zn;
1977
1974
  }
1978
- var ua = (function() {
1975
+ var pa = (function() {
1979
1976
  if (sr) return yt.exports;
1980
1977
  sr = 1;
1981
- const { default: e, DraggableCore: r } = ca();
1978
+ const { default: e, DraggableCore: r } = da();
1982
1979
  return yt.exports = e, yt.exports.default = e, yt.exports.DraggableCore = r, yt.exports;
1983
1980
  })();
1984
- const da = Ar(ua), lr = { x: 0, y: 0 }, pa = oe(de((e, r) => {
1985
- const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: c, rootSize: i, ...l } = e, p = ge(null), x = Z(() => c && i ? { left: 0, top: 0, right: i.width - c.width, bottom: i.height - c.height } : null, [c, i]), [m, b] = ne(null), [v, g] = ne(null), [h, f] = ne(null);
1981
+ const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = oe(de((e, r) => {
1982
+ const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: l, rootSize: i, ...c } = e, f = ge(null), x = Z(() => l && i ? { left: 0, top: 0, right: i.width - l.width, bottom: i.height - l.height } : null, [l, i]), [y, b] = ne(null), [v, m] = ne(null), [h, p] = ne(null);
1986
1983
  return Cr(() => {
1987
- !m && n && b(n ?? lr);
1984
+ !y && n && b(n ?? lr);
1988
1985
  }, [n]), Se(() => {
1989
- x && m && g({ x: Math.max(0, Math.min(m.x, x.right)), y: Math.max(0, Math.min(m.y, x.bottom)) });
1990
- }, [m, x]), k(da, { nodeRef: p, handle: o, cancel: '[class*="MuiDialogContent-root"]', position: v, bounds: x ?? ".MuiModal-root", onStop: s, onStart: (u, w) => {
1986
+ x && y && m({ x: Math.max(0, Math.min(y.x, x.right)), y: Math.max(0, Math.min(y.y, x.bottom)) });
1987
+ }, [y, x]), k(fa, { nodeRef: f, handle: o, cancel: '[class*="MuiDialogContent-root"]', position: v, bounds: x ?? ".MuiModal-root", onStop: s, onStart: (u, w) => {
1991
1988
  const E = u;
1992
- f({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
1989
+ p({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
1993
1990
  }, onDrag: (u, w) => {
1994
1991
  const E = u, T = E.clientX ?? E.touches?.[0]?.clientX, L = E.clientY ?? E.touches?.[0]?.clientY;
1995
1992
  b({ x: T - h.x, y: L - h.y });
1996
- }, children: k(t, { ref: At([p, r]), ...l }) });
1997
- })), fa = { x: "50", y: "50" }, ha = oe(de((e, r) => {
1998
- const n = ei({ props: e, name: "MuiDialog" }), t = dn(), s = { enter: 0.66 * t.transitions.duration.enteringScreen, exit: 0.66 * t.transitions.duration.leavingScreen }, { title: a = "SheetXL", key: o = "draggable-window", onCancel: c, onDone: i, onShow: l, onShown: p, onHide: x, onClose: m, open: b, autoFocusSel: v, children: g, transitionDuration: h = s, TransitionProps: f, slots: u = Te.EmptyArray, slotProps: w = Te.EmptyArray, sx: E, className: T, onMouseDown: L, initialPosition: O = fa, isModal: R = !1, ...S } = n;
1993
+ }, children: k(t, { ref: At([f, r]), ...c }) });
1994
+ })), ma = { x: "50", y: "50" }, ga = oe(de((e, r) => {
1995
+ const n = ti({ props: e, name: "MuiDialog" }), t = dn(), s = { enter: 0.66 * t.transitions.duration.enteringScreen, exit: 0.66 * t.transitions.duration.leavingScreen }, { title: a = "SheetXL", key: o = "draggable-window", onCancel: l, onDone: i, onShow: c, onShown: f, onHide: x, onClose: y, open: b, autoFocusSel: v, children: m, transitionDuration: h = s, TransitionProps: p, slots: u = Te.EmptyArray, slotProps: w = Te.EmptyArray, sx: E, className: T, onMouseDown: L, initialPosition: O = ma, isModal: R = !1, ...S } = n;
1999
1996
  let D = u.transition ?? Wo;
2000
1997
  const P = u.backdrop ?? Ho, M = u.paper ?? Et;
2001
1998
  let I = w.transition;
2002
- f && (I = { ...f, ...I });
2003
- const A = w.backdrop, V = w.paper, B = ge(null), [z, ie] = ne(null), [K, Q] = ne(!1), [re, se] = ne(!1), ee = ge(null), [le, ce] = En(), d = ge(null), [y, C] = En(), F = ge(null);
1999
+ p && (I = { ...p, ...I });
2000
+ const A = w.backdrop, V = w.paper, B = ge(null), [z, ie] = ne(null), [G, Q] = ne(!1), [re, se] = ne(!1), ee = ge(null), [le, ce] = En(), d = ge(null), [g, C] = En(), F = ge(null);
2004
2001
  Se(() => {
2005
2002
  z && Q(b);
2006
2003
  }, [b, z]);
2007
2004
  const _ = ae(() => {
2008
- c?.(), Q(!1);
2009
- }, [c]);
2005
+ l?.(), Q(!1);
2006
+ }, [l]);
2010
2007
  Se(() => {
2011
2008
  if (ce.width === 0 && ce.height === 0 || z) return;
2012
2009
  const $ = F.current?.getBoundingClientRect(), ke = ce.height - $.height, ft = ce.width - $.width;
2013
2010
  let He = 0.5 * ft, Yt = 0.5 * ke;
2014
2011
  typeof O?.x == "number" ? He = O.x : typeof O?.x == "string" && (He = ft * (parseFloat(O.x) / 100)), typeof O?.y == "number" ? Yt = O.y : typeof O?.y == "string" && (Yt = ke * (parseFloat(O.y) / 100)), ie({ x: He, y: Yt });
2015
2012
  }, [ce, C]);
2016
- const [N, j] = ne(!1), [H, U] = ne(null), [G, te] = ne(null), ue = ae(($) => {
2013
+ const [N, j] = ne(!1), [H, U] = ne(null), [K, te] = ne(null), ue = ae(($) => {
2017
2014
  if (H) return H.focus($), !0;
2018
2015
  if (v) {
2019
2016
  const ke = d.current?.querySelectorAll?.(v);
@@ -2025,49 +2022,49 @@ const da = Ar(ua), lr = { x: 0, y: 0 }, pa = oe(de((e, r) => {
2025
2022
  } }), []), Le = { ...I, onExited: ($) => {
2026
2023
  i?.(null), I?.onExited?.($);
2027
2024
  }, onExit: ($) => {
2028
- const ke = G;
2025
+ const ke = K;
2029
2026
  ke && requestAnimationFrame(() => {
2030
2027
  he.current?.contains(document.activeElement) && ke.focus();
2031
2028
  }), x?.(), se(!1), I?.onExit?.($);
2032
2029
  }, onEntered: ($, ke) => {
2033
- l?.(), I?.onEntered?.($, ke);
2030
+ c?.(), I?.onEntered?.($, ke);
2034
2031
  }, onEntering: ($, ke) => {
2035
- se(!0), p?.(he.current);
2032
+ se(!0), f?.(he.current);
2036
2033
  } };
2037
2034
  Se(() => {
2038
2035
  re && ue();
2039
2036
  }, [re]);
2040
- let Ce = k(sa, { focusTrapOptions: { escapeDeactivates: !1, allowOutsideClick: !0, initialFocus: !1 }, ref: B, active: re, children: k(D, { in: K, timeout: h, role: "presentation", ...Le, children: k(X, { className: "MuiDialog-container", ref: d, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: ($) => {
2037
+ let Ce = k(ca, { focusTrapOptions: { escapeDeactivates: !1, allowOutsideClick: !0, initialFocus: !1 }, ref: B, active: re, children: k(D, { in: G, timeout: h, role: "presentation", ...Le, children: k(X, { className: "MuiDialog-container", ref: d, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: ($) => {
2041
2038
  $.which === Pe.Escape && (_(), ee.current?.start($, { center: !1 }), setTimeout(() => ee.current?.stop($), 180)), $.stopPropagation();
2042
- }, children: J(pa, { ref: At([F, r]), className: Oe({ "Mui-focusVisible": N }, T, "draggable"), sx: { "& *": ($) => Gr($), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E }, defaultPosition: z, titleSize: C, rootSize: ce, PaperComponent: M, ...S, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": N }, "draggable-title"), sx: { cursor: "move", display: "flex", color: ($) => $.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: ($) => `${$.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: ($) => $.transitions.duration.shortest / 2 + "ms" }, backgroundColor: ($) => me($.palette.action.hover, 0.03) }, ref: y, children: J(X, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: ($) => $.spacing(1), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, children: [k(X, { sx: { flex: "1 1 100%", paddingLeft: ($) => $.spacing(1) }, children: a }), k(pt, { label: "Close", children: k(Ze, { "aria-label": "close", sx: { color: ($) => $.palette.text.icon ?? $.palette.action.active }, touchRippleRef: ee, onPointerDown: ($) => {
2039
+ }, children: J(ha, { ref: At([F, r]), className: Oe({ "Mui-focusVisible": N }, T, "draggable"), sx: { "& *": ($) => Kr($), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E }, defaultPosition: z, titleSize: C, rootSize: ce, PaperComponent: M, ...S, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": N }, "draggable-title"), sx: { cursor: "move", display: "flex", color: ($) => $.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: ($) => `${$.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: ($) => $.transitions.duration.shortest / 2 + "ms" }, backgroundColor: ($) => me($.palette.action.hover, 0.03) }, ref: g, children: J(X, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: ($) => $.spacing(1), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, children: [k(X, { sx: { flex: "1 1 100%", paddingLeft: ($) => $.spacing(1) }, children: a }), k(pt, { label: "Close", children: k(Ze, { "aria-label": "close", sx: { color: ($) => $.palette.text.icon ?? $.palette.action.active }, touchRippleRef: ee, onPointerDown: ($) => {
2043
2040
  ee.current?.start($, { center: !1 }), $.stopPropagation(), $.preventDefault();
2044
- }, onPointerUp: _, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, g] }) }) }) }), Y = null;
2045
- R && (Y = k(P, { ...A, open: K, onMouseDown: ($) => {
2041
+ }, onPointerUp: _, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, m] }) }) }) }), Y = null;
2042
+ R && (Y = k(P, { ...A, open: G, onMouseDown: ($) => {
2046
2043
  _(), A?.onMouseDown?.($);
2047
2044
  }, onClick: ($) => {
2048
- m?.($, "backdropClick"), A?.onClick?.($);
2045
+ y?.($, "backdropClick"), A?.onClick?.($);
2049
2046
  }, sx: { pointerEvents: "auto", ...A?.sx } }));
2050
2047
  const { getPortalContainer: pe } = ln();
2051
- return ti(J(X, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: At([he, le]), onPointerDown: ($) => {
2048
+ return ni(J(X, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: At([he, le]), onPointerDown: ($) => {
2052
2049
  N && ($.target === d.current || $.target.tabIndex < 0) && d.current?.contains(document.activeElement);
2053
2050
  }, onContextMenu: ($) => {
2054
2051
  $.isPropagationStopped() || $.preventDefault();
2055
2052
  }, onFocus: ($) => {
2056
2053
  !N && ($.target === d.current || $.target.tabIndex < 0) && setTimeout(() => {
2057
2054
  ue();
2058
- }, 100), B.current?.focusTrap?.unpause(), j(!0), d.current?.contains($.target) && $.target !== d.current && U($.target), $.relatedTarget && !G && te($.relatedTarget);
2055
+ }, 100), B.current?.focusTrap?.unpause(), j(!0), d.current?.contains($.target) && $.target !== d.current && U($.target), $.relatedTarget && !K && te($.relatedTarget);
2059
2056
  }, onBlur: ($) => {
2060
2057
  he?.current?.contains($.relatedTarget) || (te(null), B.current?.focusTrap?.pause(), j(!1));
2061
2058
  }, children: [Y, Ce] }), pe(), o + "");
2062
2059
  }));
2063
2060
  var Ve = typeof window < "u" ? window : { screen: {}, navigator: {} }, ut = (Ve.matchMedia || function() {
2064
2061
  return { matches: !1 };
2065
- }).bind(Ve), ma = { get passive() {
2062
+ }).bind(Ve), ya = { get passive() {
2066
2063
  return !0;
2067
2064
  } }, cr = function() {
2068
2065
  };
2069
- Ve.addEventListener && Ve.addEventListener("p", cr, ma), Ve.removeEventListener && Ve.removeEventListener("p", cr, !1);
2070
- var vn = "ontouchstart" in Ve, ga = vn || "TouchEvent" in Ve && ut("(any-pointer: coarse)").matches, ur = (Ve.navigator.maxTouchPoints || 0) > 0 || ga, mo = Ve.navigator.userAgent || "", ya = ut("(pointer: coarse)").matches && /iPad|Macintosh/.test(mo) && Math.min(Ve.screen.width || 0, Ve.screen.height || 0) >= 768, go = (ut("(pointer: coarse)").matches || !ut("(pointer: fine)").matches && vn) && !/Windows.*Firefox/.test(mo), ba = ut("(any-pointer: fine)").matches || ut("(any-hover: hover)").matches || ya || !vn, dr = !ur || !ba && go ? ur ? "touchOnly" : "mouseOnly" : "hybrid", va = dr === "mouseOnly" ? "mouse" : dr === "touchOnly" || go ? "touch" : "mouse", St = (e) => e.type === "checkbox", tt = (e) => e instanceof Date, Re = (e) => e == null;
2066
+ Ve.addEventListener && Ve.addEventListener("p", cr, ya), Ve.removeEventListener && Ve.removeEventListener("p", cr, !1);
2067
+ var vn = "ontouchstart" in Ve, ba = vn || "TouchEvent" in Ve && ut("(any-pointer: coarse)").matches, ur = (Ve.navigator.maxTouchPoints || 0) > 0 || ba, mo = Ve.navigator.userAgent || "", va = ut("(pointer: coarse)").matches && /iPad|Macintosh/.test(mo) && Math.min(Ve.screen.width || 0, Ve.screen.height || 0) >= 768, go = (ut("(pointer: coarse)").matches || !ut("(pointer: fine)").matches && vn) && !/Windows.*Firefox/.test(mo), xa = ut("(any-pointer: fine)").matches || ut("(any-hover: hover)").matches || va || !vn, dr = !ur || !xa && go ? ur ? "touchOnly" : "mouseOnly" : "hybrid", wa = dr === "mouseOnly" ? "mouse" : dr === "touchOnly" || go ? "touch" : "mouse", St = (e) => e.type === "checkbox", tt = (e) => e instanceof Date, Re = (e) => e == null;
2071
2068
  const yo = (e) => typeof e == "object";
2072
2069
  var we = (e) => !Re(e) && !Array.isArray(e) && yo(e) && !tt(e), xn = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
2073
2070
  function De(e) {
@@ -2092,22 +2089,22 @@ var Ut = (e) => /^\w*$/.test(e), xe = (e) => e === void 0, on = (e) => Array.isA
2092
2089
  let t = -1;
2093
2090
  const s = Ut(r) ? [r] : wn(r), a = s.length, o = a - 1;
2094
2091
  for (; ++t < a; ) {
2095
- const c = s[t];
2092
+ const l = s[t];
2096
2093
  let i = n;
2097
2094
  if (t !== o) {
2098
- const l = e[c];
2099
- i = we(l) || Array.isArray(l) ? l : isNaN(+s[t + 1]) ? {} : [];
2095
+ const c = e[l];
2096
+ i = we(c) || Array.isArray(c) ? c : isNaN(+s[t + 1]) ? {} : [];
2100
2097
  }
2101
- if (c === "__proto__" || c === "constructor" || c === "prototype") return;
2102
- e[c] = i, e = e[c];
2098
+ if (l === "__proto__" || l === "constructor" || l === "prototype") return;
2099
+ e[l] = i, e = e[l];
2103
2100
  }
2104
2101
  };
2105
- const xa = "blur", wa = "focusout", ka = "onBlur", bo = "onChange", vo = "onSubmit", Sa = "onTouched", Ct = "all", Da = "max", Oa = "min", Ca = "maxLength", Ea = "minLength", pr = "pattern", fr = "required", Ma = "validate", xo = q.createContext(null);
2102
+ const ka = "blur", Sa = "focusout", Da = "onBlur", bo = "onChange", vo = "onSubmit", Oa = "onTouched", Ct = "all", Ca = "max", Ea = "min", Ma = "maxLength", Ta = "minLength", pr = "pattern", fr = "required", Pa = "validate", xo = q.createContext(null);
2106
2103
  xo.displayName = "HookFormContext";
2107
- const Ta = (e) => {
2104
+ const Ra = (e) => {
2108
2105
  const { children: r, ...n } = e;
2109
2106
  return q.createElement(xo.Provider, { value: n }, r);
2110
- }, Pa = typeof window < "u" ? q.useLayoutEffect : q.useEffect;
2107
+ }, Na = typeof window < "u" ? q.useLayoutEffect : q.useEffect;
2111
2108
  var Fe = (e) => typeof e == "string", an = (e) => Re(e) || !yo(e);
2112
2109
  function qe(e, r, n = /* @__PURE__ */ new WeakSet()) {
2113
2110
  if (an(e) || an(r)) return e === r;
@@ -2120,13 +2117,13 @@ function qe(e, r, n = /* @__PURE__ */ new WeakSet()) {
2120
2117
  const o = e[a];
2121
2118
  if (!s.includes(a)) return !1;
2122
2119
  if (a !== "ref") {
2123
- const c = r[a];
2124
- if (tt(o) && tt(c) || we(o) && we(c) || Array.isArray(o) && Array.isArray(c) ? !qe(o, c, n) : o !== c) return !1;
2120
+ const l = r[a];
2121
+ if (tt(o) && tt(l) || we(o) && we(l) || Array.isArray(o) && Array.isArray(l) ? !qe(o, l, n) : o !== l) return !1;
2125
2122
  }
2126
2123
  }
2127
2124
  return !0;
2128
2125
  }
2129
- var Ra = (e, r, n, t, s) => r ? { ...n[e], types: { ...n[e] && n[e].types ? n[e].types : {}, [t]: s || !0 } } : {}, xt = (e) => Array.isArray(e) ? e : [e], hr = () => {
2126
+ var Fa = (e, r, n, t, s) => r ? { ...n[e], types: { ...n[e] && n[e].types ? n[e].types : {}, [t]: s || !0 } } : {}, xt = (e) => Array.isArray(e) ? e : [e], hr = () => {
2130
2127
  let e = [];
2131
2128
  return { get observers() {
2132
2129
  return e;
@@ -2155,14 +2152,14 @@ var Ne = (e) => we(e) && !Object.keys(e).length, kn = (e) => e.type === "file",
2155
2152
  return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
2156
2153
  }, ko = (e) => e.type === "select-multiple", Sn = (e) => e.type === "radio", Jt = (e) => Bt(e) && e.isConnected;
2157
2154
  function ve(e, r) {
2158
- const n = Array.isArray(r) ? r : Ut(r) ? [r] : wn(r), t = n.length === 1 ? e : (function(o, c) {
2159
- const i = c.slice(0, -1).length;
2160
- let l = 0;
2161
- for (; l < i; ) o = xe(o) ? l++ : o[c[l++]];
2155
+ const n = Array.isArray(r) ? r : Ut(r) ? [r] : wn(r), t = n.length === 1 ? e : (function(o, l) {
2156
+ const i = l.slice(0, -1).length;
2157
+ let c = 0;
2158
+ for (; c < i; ) o = xe(o) ? c++ : o[l[c++]];
2162
2159
  return o;
2163
2160
  })(e, n), s = n.length - 1, a = n[s];
2164
2161
  return t && delete t[a], s !== 0 && (we(t) && Ne(t) || Array.isArray(t) && (function(o) {
2165
- for (const c in o) if (o.hasOwnProperty(c) && !xe(o[c])) return !1;
2162
+ for (const l in o) if (o.hasOwnProperty(l) && !xe(o[l])) return !1;
2166
2163
  return !0;
2167
2164
  })(t)) && ve(e, n.slice(0, -1)), e;
2168
2165
  }
@@ -2198,18 +2195,18 @@ function br(e) {
2198
2195
  const r = e.ref;
2199
2196
  return kn(r) ? r.files : Sn(r) ? Co(e.refs).value : ko(r) ? [...r.selectedOptions].map(({ value: n }) => n) : St(r) ? Do(e.refs).value : Oo(xe(r.value) ? e.ref.value : r.value, e);
2200
2197
  }
2201
- var jt = (e) => e instanceof RegExp, vt = (e) => xe(e) ? e : jt(e) ? e.source : we(e) ? jt(e.value) ? e.value.source : e.value : e, vr = (e) => ({ isOnSubmit: !e || e === vo, isOnBlur: e === ka, isOnChange: e === bo, isOnAll: e === Ct, isOnTouch: e === Sa });
2198
+ var jt = (e) => e instanceof RegExp, vt = (e) => xe(e) ? e : jt(e) ? e.source : we(e) ? jt(e.value) ? e.value.source : e.value : e, vr = (e) => ({ isOnSubmit: !e || e === vo, isOnBlur: e === Da, isOnChange: e === bo, isOnAll: e === Ct, isOnTouch: e === Oa });
2202
2199
  const xr = "AsyncFunction";
2203
- var Na = (e) => !!e && !!e.validate && !!(Be(e.validate) && e.validate.constructor.name === xr || we(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === xr)), wr = (e, r, n) => !n && (r.watchAll || r.watch.has(e) || [...r.watch].some((t) => e.startsWith(t) && /^\.\w+/.test(e.slice(t.length))));
2200
+ var _a = (e) => !!e && !!e.validate && !!(Be(e.validate) && e.validate.constructor.name === xr || we(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === xr)), wr = (e, r, n) => !n && (r.watchAll || r.watch.has(e) || [...r.watch].some((t) => e.startsWith(t) && /^\.\w+/.test(e.slice(t.length))));
2204
2201
  const Dt = (e, r, n, t) => {
2205
2202
  for (const s of n || Object.keys(e)) {
2206
2203
  const a = W(e, s);
2207
2204
  if (a) {
2208
- const { _f: o, ...c } = a;
2205
+ const { _f: o, ...l } = a;
2209
2206
  if (o) {
2210
2207
  if (o.refs && o.refs[0] && r(o.refs[0], s) && !t || o.ref && r(o.ref, o.name) && !t) return !0;
2211
- if (Dt(c, r)) break;
2212
- } else if (we(c) && Dt(c, r)) break;
2208
+ if (Dt(l, r)) break;
2209
+ } else if (we(l) && Dt(l, r)) break;
2213
2210
  }
2214
2211
  }
2215
2212
  };
@@ -2218,15 +2215,15 @@ function kr(e, r, n) {
2218
2215
  if (t || Ut(n)) return { error: t, name: n };
2219
2216
  const s = n.split(".");
2220
2217
  for (; s.length; ) {
2221
- const a = s.join("."), o = W(r, a), c = W(e, a);
2218
+ const a = s.join("."), o = W(r, a), l = W(e, a);
2222
2219
  if (o && !Array.isArray(o) && n !== a) return { name: n };
2223
- if (c && c.type) return { name: a, error: c };
2224
- if (c && c.root && c.root.type) return { name: `${a}.root`, error: c.root };
2220
+ if (l && l.type) return { name: a, error: l };
2221
+ if (l && l.root && l.root.type) return { name: `${a}.root`, error: l.root };
2225
2222
  s.pop();
2226
2223
  }
2227
2224
  return { name: n };
2228
2225
  }
2229
- var Fa = (e, r, n) => {
2226
+ var Aa = (e, r, n) => {
2230
2227
  const t = xt(W(e, n));
2231
2228
  return fe(t, "root", r[n]), fe(e, n, t), e;
2232
2229
  };
@@ -2234,104 +2231,104 @@ function Sr(e, r, n = "validate") {
2234
2231
  if (Fe(e) || Array.isArray(e) && e.every(Fe) || $e(e) && !e) return { type: n, message: Fe(e) ? e : "", ref: r };
2235
2232
  }
2236
2233
  var ot = (e) => we(e) && !jt(e) ? e : { value: e, message: "" }, Dr = async (e, r, n, t, s, a) => {
2237
- const { ref: o, refs: c, required: i, maxLength: l, minLength: p, min: x, max: m, pattern: b, validate: v, name: g, valueAsNumber: h, mount: f } = e._f, u = W(n, g);
2238
- if (!f || r.has(g)) return {};
2239
- const w = c ? c[0] : o, E = (M) => {
2234
+ const { ref: o, refs: l, required: i, maxLength: c, minLength: f, min: x, max: y, pattern: b, validate: v, name: m, valueAsNumber: h, mount: p } = e._f, u = W(n, m);
2235
+ if (!p || r.has(m)) return {};
2236
+ const w = l ? l[0] : o, E = (M) => {
2240
2237
  s && w.reportValidity && (w.setCustomValidity($e(M) ? "" : M || ""), w.reportValidity());
2241
- }, T = {}, L = Sn(o), O = St(o), R = L || O, S = (h || kn(o)) && xe(o.value) && xe(u) || Bt(o) && o.value === "" || u === "" || Array.isArray(u) && !u.length, D = Ra.bind(null, g, t, T), P = (M, I, A, V = Ca, B = Ea) => {
2238
+ }, T = {}, L = Sn(o), O = St(o), R = L || O, S = (h || kn(o)) && xe(o.value) && xe(u) || Bt(o) && o.value === "" || u === "" || Array.isArray(u) && !u.length, D = Fa.bind(null, m, t, T), P = (M, I, A, V = Ma, B = Ta) => {
2242
2239
  const z = M ? I : A;
2243
- T[g] = { type: M ? V : B, message: z, ref: o, ...D(M ? V : B, z) };
2240
+ T[m] = { type: M ? V : B, message: z, ref: o, ...D(M ? V : B, z) };
2244
2241
  };
2245
- if (a ? !Array.isArray(u) || !u.length : i && (!R && (S || Re(u)) || $e(u) && !u || O && !Do(c).isValid || L && !Co(c).isValid)) {
2242
+ if (a ? !Array.isArray(u) || !u.length : i && (!R && (S || Re(u)) || $e(u) && !u || O && !Do(l).isValid || L && !Co(l).isValid)) {
2246
2243
  const { value: M, message: I } = Fe(i) ? { value: !!i, message: i } : ot(i);
2247
- if (M && (T[g] = { type: fr, message: I, ref: w, ...D(fr, I) }, !t)) return E(I), T;
2244
+ if (M && (T[m] = { type: fr, message: I, ref: w, ...D(fr, I) }, !t)) return E(I), T;
2248
2245
  }
2249
- if (!(S || Re(x) && Re(m))) {
2246
+ if (!(S || Re(x) && Re(y))) {
2250
2247
  let M, I;
2251
- const A = ot(m), V = ot(x);
2248
+ const A = ot(y), V = ot(x);
2252
2249
  if (Re(u) || isNaN(u)) {
2253
- const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q), ie = o.type == "time", K = o.type == "week";
2254
- Fe(A.value) && u && (M = ie ? z(u) > z(A.value) : K ? u > A.value : B > new Date(A.value)), Fe(V.value) && u && (I = ie ? z(u) < z(V.value) : K ? u < V.value : B < new Date(V.value));
2250
+ const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q), ie = o.type == "time", G = o.type == "week";
2251
+ Fe(A.value) && u && (M = ie ? z(u) > z(A.value) : G ? u > A.value : B > new Date(A.value)), Fe(V.value) && u && (I = ie ? z(u) < z(V.value) : G ? u < V.value : B < new Date(V.value));
2255
2252
  } else {
2256
2253
  const B = o.valueAsNumber || u && +u;
2257
2254
  Re(A.value) || (M = B > A.value), Re(V.value) || (I = B < V.value);
2258
2255
  }
2259
- if ((M || I) && (P(!!M, A.message, V.message, Da, Oa), !t)) return E(T[g].message), T;
2256
+ if ((M || I) && (P(!!M, A.message, V.message, Ca, Ea), !t)) return E(T[m].message), T;
2260
2257
  }
2261
- if ((l || p) && !S && (Fe(u) || a && Array.isArray(u))) {
2262
- const M = ot(l), I = ot(p), A = !Re(M.value) && u.length > +M.value, V = !Re(I.value) && u.length < +I.value;
2263
- if ((A || V) && (P(A, M.message, I.message), !t)) return E(T[g].message), T;
2258
+ if ((c || f) && !S && (Fe(u) || a && Array.isArray(u))) {
2259
+ const M = ot(c), I = ot(f), A = !Re(M.value) && u.length > +M.value, V = !Re(I.value) && u.length < +I.value;
2260
+ if ((A || V) && (P(A, M.message, I.message), !t)) return E(T[m].message), T;
2264
2261
  }
2265
2262
  if (b && !S && Fe(u)) {
2266
2263
  const { value: M, message: I } = ot(b);
2267
- if (jt(M) && !u.match(M) && (T[g] = { type: pr, message: I, ref: o, ...D(pr, I) }, !t)) return E(I), T;
2264
+ if (jt(M) && !u.match(M) && (T[m] = { type: pr, message: I, ref: o, ...D(pr, I) }, !t)) return E(I), T;
2268
2265
  }
2269
2266
  if (v) {
2270
2267
  if (Be(v)) {
2271
2268
  const M = Sr(await v(u, n), w);
2272
- if (M && (T[g] = { ...M, ...D(Ma, M.message) }, !t)) return E(M.message), T;
2269
+ if (M && (T[m] = { ...M, ...D(Pa, M.message) }, !t)) return E(M.message), T;
2273
2270
  } else if (we(v)) {
2274
2271
  let M = {};
2275
2272
  for (const I in v) {
2276
2273
  if (!Ne(M) && !t) break;
2277
2274
  const A = Sr(await v[I](u, n), w, I);
2278
- A && (M = { ...A, ...D(I, A.message) }, E(A.message), t && (T[g] = M));
2275
+ A && (M = { ...A, ...D(I, A.message) }, E(A.message), t && (T[m] = M));
2279
2276
  }
2280
- if (!Ne(M) && (T[g] = { ref: w, ...M }, !t)) return T;
2277
+ if (!Ne(M) && (T[m] = { ref: w, ...M }, !t)) return T;
2281
2278
  }
2282
2279
  }
2283
2280
  return E(!0), T;
2284
2281
  };
2285
- const _a = { mode: vo, reValidateMode: bo, shouldFocusError: !0 };
2286
- function Aa(e = {}) {
2287
- let r, n = { ..._a, ...e }, t = { submitCount: 0, isDirty: !1, isReady: !1, isLoading: Be(n.defaultValues), isValidating: !1, isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, touchedFields: {}, dirtyFields: {}, validatingFields: {}, errors: n.errors || {}, disabled: n.disabled || !1 }, s = {}, a = (we(n.defaultValues) || we(n.values)) && De(n.defaultValues || n.values) || {}, o = n.shouldUnregister ? {} : De(a), c = { action: !1, mount: !1, watch: !1 }, i = { mount: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set() }, l = 0;
2288
- const p = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
2289
- let x = { ...p };
2290
- const m = { array: hr(), state: hr() }, b = n.criteriaMode === Ct, v = async (d) => {
2291
- if (!n.disabled && (p.isValid || x.isValid || d)) {
2292
- const y = n.resolver ? Ne((await w()).errors) : await E(s, !0);
2293
- y !== t.isValid && m.state.next({ isValid: y });
2282
+ const Ia = { mode: vo, reValidateMode: bo, shouldFocusError: !0 };
2283
+ function Va(e = {}) {
2284
+ let r, n = { ...Ia, ...e }, t = { submitCount: 0, isDirty: !1, isReady: !1, isLoading: Be(n.defaultValues), isValidating: !1, isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, touchedFields: {}, dirtyFields: {}, validatingFields: {}, errors: n.errors || {}, disabled: n.disabled || !1 }, s = {}, a = (we(n.defaultValues) || we(n.values)) && De(n.defaultValues || n.values) || {}, o = n.shouldUnregister ? {} : De(a), l = { action: !1, mount: !1, watch: !1 }, i = { mount: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set() }, c = 0;
2285
+ const f = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
2286
+ let x = { ...f };
2287
+ const y = { array: hr(), state: hr() }, b = n.criteriaMode === Ct, v = async (d) => {
2288
+ if (!n.disabled && (f.isValid || x.isValid || d)) {
2289
+ const g = n.resolver ? Ne((await w()).errors) : await E(s, !0);
2290
+ g !== t.isValid && y.state.next({ isValid: g });
2294
2291
  }
2295
- }, g = (d, y) => {
2296
- !n.disabled && (p.isValidating || p.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
2297
- C && (y ? fe(t.validatingFields, C, y) : ve(t.validatingFields, C));
2298
- }), m.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
2299
- }, h = (d, y, C, F) => {
2292
+ }, m = (d, g) => {
2293
+ !n.disabled && (f.isValidating || f.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
2294
+ C && (g ? fe(t.validatingFields, C, g) : ve(t.validatingFields, C));
2295
+ }), y.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
2296
+ }, h = (d, g, C, F) => {
2300
2297
  const _ = W(s, d);
2301
2298
  if (_) {
2302
2299
  const N = W(o, d, xe(C) ? W(a, d) : C);
2303
- xe(N) || F && F.defaultChecked || y ? fe(o, d, y ? N : br(_._f)) : O(d, N), c.mount && v();
2300
+ xe(N) || F && F.defaultChecked || g ? fe(o, d, g ? N : br(_._f)) : O(d, N), l.mount && v();
2304
2301
  }
2305
- }, f = (d, y, C, F, _) => {
2302
+ }, p = (d, g, C, F, _) => {
2306
2303
  let N = !1, j = !1;
2307
2304
  const H = { name: d };
2308
2305
  if (!n.disabled) {
2309
2306
  if (!C || F) {
2310
- (p.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), N = j !== H.isDirty);
2311
- const U = qe(W(a, d), y);
2312
- j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, N = N || (p.dirtyFields || x.dirtyFields) && j !== !U;
2307
+ (f.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), N = j !== H.isDirty);
2308
+ const U = qe(W(a, d), g);
2309
+ j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, N = N || (f.dirtyFields || x.dirtyFields) && j !== !U;
2313
2310
  }
2314
2311
  if (C) {
2315
2312
  const U = W(t.touchedFields, d);
2316
- U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, N = N || (p.touchedFields || x.touchedFields) && U !== C);
2313
+ U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, N = N || (f.touchedFields || x.touchedFields) && U !== C);
2317
2314
  }
2318
- N && _ && m.state.next(H);
2315
+ N && _ && y.state.next(H);
2319
2316
  }
2320
2317
  return N ? H : {};
2321
- }, u = (d, y, C, F) => {
2322
- const _ = W(t.errors, d), N = (p.isValid || x.isValid) && $e(y) && t.isValid !== y;
2318
+ }, u = (d, g, C, F) => {
2319
+ const _ = W(t.errors, d), N = (f.isValid || x.isValid) && $e(g) && t.isValid !== g;
2323
2320
  var j;
2324
2321
  if (n.delayError && C ? (j = () => ((H, U) => {
2325
- fe(t.errors, H, U), m.state.next({ errors: t.errors });
2322
+ fe(t.errors, H, U), y.state.next({ errors: t.errors });
2326
2323
  })(d, C), r = (H) => {
2327
- clearTimeout(l), l = setTimeout(j, H);
2328
- }, r(n.delayError)) : (clearTimeout(l), r = null, C ? fe(t.errors, d, C) : ve(t.errors, d)), (C ? !qe(_, C) : _) || !Ne(F) || N) {
2329
- const H = { ...F, ...N && $e(y) ? { isValid: y } : {}, errors: t.errors, name: d };
2330
- t = { ...t, ...H }, m.state.next(H);
2324
+ clearTimeout(c), c = setTimeout(j, H);
2325
+ }, r(n.delayError)) : (clearTimeout(c), r = null, C ? fe(t.errors, d, C) : ve(t.errors, d)), (C ? !qe(_, C) : _) || !Ne(F) || N) {
2326
+ const H = { ...F, ...N && $e(g) ? { isValid: g } : {}, errors: t.errors, name: d };
2327
+ t = { ...t, ...H }, y.state.next(H);
2331
2328
  }
2332
2329
  }, w = async (d) => {
2333
- g(d, !0);
2334
- const y = await n.resolver(o, n.context, ((C, F, _, N) => {
2330
+ m(d, !0);
2331
+ const g = await n.resolver(o, n.context, ((C, F, _, N) => {
2335
2332
  const j = {};
2336
2333
  for (const H of C) {
2337
2334
  const U = W(F, H);
@@ -2339,75 +2336,75 @@ function Aa(e = {}) {
2339
2336
  }
2340
2337
  return { criteriaMode: _, names: [...C], fields: j, shouldUseNativeValidation: N };
2341
2338
  })(d || i.mount, s, n.criteriaMode, n.shouldUseNativeValidation));
2342
- return g(d), y;
2343
- }, E = async (d, y, C = { valid: !0 }) => {
2339
+ return m(d), g;
2340
+ }, E = async (d, g, C = { valid: !0 }) => {
2344
2341
  for (const F in d) {
2345
2342
  const _ = d[F];
2346
2343
  if (_) {
2347
2344
  const { _f: N, ...j } = _;
2348
2345
  if (N) {
2349
- const H = i.array.has(N.name), U = _._f && Na(_._f);
2350
- U && p.validatingFields && g([N.name], !0);
2351
- const G = await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation && !y, H);
2352
- if (U && p.validatingFields && g([N.name]), G[N.name] && (C.valid = !1, y)) break;
2353
- !y && (W(G, N.name) ? H ? Fa(t.errors, G, N.name) : fe(t.errors, N.name, G[N.name]) : ve(t.errors, N.name));
2346
+ const H = i.array.has(N.name), U = _._f && _a(_._f);
2347
+ U && f.validatingFields && m([N.name], !0);
2348
+ const K = await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation && !g, H);
2349
+ if (U && f.validatingFields && m([N.name]), K[N.name] && (C.valid = !1, g)) break;
2350
+ !g && (W(K, N.name) ? H ? Aa(t.errors, K, N.name) : fe(t.errors, N.name, K[N.name]) : ve(t.errors, N.name));
2354
2351
  }
2355
- !Ne(j) && await E(j, y, C);
2352
+ !Ne(j) && await E(j, g, C);
2356
2353
  }
2357
2354
  }
2358
2355
  return C.valid;
2359
- }, T = (d, y) => !n.disabled && (d && y && fe(o, d, y), !qe(I(), a)), L = (d, y, C) => ((F, _, N, j, H) => Fe(F) ? (j && _.watch.add(F), W(N, F, H)) : Array.isArray(F) ? F.map((U) => (j && _.watch.add(U), W(N, U))) : (j && (_.watchAll = !0), N))(d, i, { ...c.mount ? o : xe(y) ? a : Fe(d) ? { [d]: y } : y }, C, y), O = (d, y, C = {}) => {
2356
+ }, T = (d, g) => !n.disabled && (d && g && fe(o, d, g), !qe(I(), a)), L = (d, g, C) => ((F, _, N, j, H) => Fe(F) ? (j && _.watch.add(F), W(N, F, H)) : Array.isArray(F) ? F.map((U) => (j && _.watch.add(U), W(N, U))) : (j && (_.watchAll = !0), N))(d, i, { ...l.mount ? o : xe(g) ? a : Fe(d) ? { [d]: g } : g }, C, g), O = (d, g, C = {}) => {
2360
2357
  const F = W(s, d);
2361
- let _ = y;
2358
+ let _ = g;
2362
2359
  if (F) {
2363
2360
  const N = F._f;
2364
- N && (!N.disabled && fe(o, d, Oo(y, N)), _ = Bt(N.ref) && Re(y) ? "" : y, ko(N.ref) ? [...N.ref.options].forEach((j) => j.selected = _.includes(j.value)) : N.refs ? St(N.ref) ? N.refs.forEach((j) => {
2361
+ N && (!N.disabled && fe(o, d, Oo(g, N)), _ = Bt(N.ref) && Re(g) ? "" : g, ko(N.ref) ? [...N.ref.options].forEach((j) => j.selected = _.includes(j.value)) : N.refs ? St(N.ref) ? N.refs.forEach((j) => {
2365
2362
  j.defaultChecked && j.disabled || (Array.isArray(_) ? j.checked = !!_.find((H) => H === j.value) : j.checked = _ === j.value || !!_);
2366
- }) : N.refs.forEach((j) => j.checked = j.value === _) : kn(N.ref) ? N.ref.value = "" : (N.ref.value = _, N.ref.type || m.state.next({ name: d, values: De(o) })));
2363
+ }) : N.refs.forEach((j) => j.checked = j.value === _) : kn(N.ref) ? N.ref.value = "" : (N.ref.value = _, N.ref.type || y.state.next({ name: d, values: De(o) })));
2367
2364
  }
2368
- (C.shouldDirty || C.shouldTouch) && f(d, _, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && M(d);
2369
- }, R = (d, y, C) => {
2370
- for (const F in y) {
2371
- if (!y.hasOwnProperty(F)) return;
2372
- const _ = y[F], N = d + "." + F, j = W(s, N);
2365
+ (C.shouldDirty || C.shouldTouch) && p(d, _, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && M(d);
2366
+ }, R = (d, g, C) => {
2367
+ for (const F in g) {
2368
+ if (!g.hasOwnProperty(F)) return;
2369
+ const _ = g[F], N = d + "." + F, j = W(s, N);
2373
2370
  (i.array.has(d) || we(_) || j && !j._f) && !tt(_) ? R(N, _, C) : O(N, _, C);
2374
2371
  }
2375
- }, S = (d, y, C = {}) => {
2376
- const F = W(s, d), _ = i.array.has(d), N = De(y);
2377
- fe(o, d, N), _ ? (m.array.next({ name: d, values: De(o) }), (p.isDirty || p.dirtyFields || x.isDirty || x.dirtyFields) && C.shouldDirty && m.state.next({ name: d, dirtyFields: it(a, o), isDirty: T(d, N) })) : !F || F._f || Re(N) ? O(d, N, C) : R(d, N, C), wr(d, i) && m.state.next({ ...t, name: d }), m.state.next({ name: c.mount ? d : void 0, values: De(o) });
2372
+ }, S = (d, g, C = {}) => {
2373
+ const F = W(s, d), _ = i.array.has(d), N = De(g);
2374
+ fe(o, d, N), _ ? (y.array.next({ name: d, values: De(o) }), (f.isDirty || f.dirtyFields || x.isDirty || x.dirtyFields) && C.shouldDirty && y.state.next({ name: d, dirtyFields: it(a, o), isDirty: T(d, N) })) : !F || F._f || Re(N) ? O(d, N, C) : R(d, N, C), wr(d, i) && y.state.next({ ...t, name: d }), y.state.next({ name: l.mount ? d : void 0, values: De(o) });
2378
2375
  }, D = async (d) => {
2379
- c.mount = !0;
2380
- const y = d.target;
2381
- let C = y.name, F = !0;
2376
+ l.mount = !0;
2377
+ const g = d.target;
2378
+ let C = g.name, F = !0;
2382
2379
  const _ = W(s, C), N = (U) => {
2383
2380
  F = Number.isNaN(U) || tt(U) && isNaN(U.getTime()) || qe(U, W(o, C, U));
2384
2381
  }, j = vr(n.mode), H = vr(n.reValidateMode);
2385
2382
  if (_) {
2386
- let U, G;
2387
- const te = y.type ? br(_._f) : ((pe) => we(pe) && pe.target ? St(pe.target) ? pe.target.checked : pe.target.value : pe)(d), ue = d.type === xa || d.type === wa, he = !((pe) => pe.mount && (pe.required || pe.min || pe.max || pe.maxLength || pe.minLength || pe.pattern || pe.validate))(_._f) && !n.resolver && !W(t.errors, C) && !_._f.deps || ((pe, $, ke, ft, He) => !He.isOnAll && (!ke && He.isOnTouch ? !($ || pe) : (ke ? ft.isOnBlur : He.isOnBlur) ? !pe : !(ke ? ft.isOnChange : He.isOnChange) || pe))(ue, W(t.touchedFields, C), t.isSubmitted, H, j), Le = wr(C, i, ue);
2388
- fe(o, C, te), ue ? y && y.readOnly || (_._f.onBlur && _._f.onBlur(d), r && r(0)) : _._f.onChange && _._f.onChange(d);
2389
- const Ce = f(C, te, ue), Y = !Ne(Ce) || Le;
2390
- if (!ue && m.state.next({ name: C, type: d.type, values: De(o) }), he) return (p.isValid || x.isValid) && (n.mode === "onBlur" ? ue && v() : ue || v()), Y && m.state.next({ name: C, ...Le ? {} : Ce });
2391
- if (!ue && Le && m.state.next({ ...t }), n.resolver) {
2383
+ let U, K;
2384
+ const te = g.type ? br(_._f) : ((pe) => we(pe) && pe.target ? St(pe.target) ? pe.target.checked : pe.target.value : pe)(d), ue = d.type === ka || d.type === Sa, he = !((pe) => pe.mount && (pe.required || pe.min || pe.max || pe.maxLength || pe.minLength || pe.pattern || pe.validate))(_._f) && !n.resolver && !W(t.errors, C) && !_._f.deps || ((pe, $, ke, ft, He) => !He.isOnAll && (!ke && He.isOnTouch ? !($ || pe) : (ke ? ft.isOnBlur : He.isOnBlur) ? !pe : !(ke ? ft.isOnChange : He.isOnChange) || pe))(ue, W(t.touchedFields, C), t.isSubmitted, H, j), Le = wr(C, i, ue);
2385
+ fe(o, C, te), ue ? g && g.readOnly || (_._f.onBlur && _._f.onBlur(d), r && r(0)) : _._f.onChange && _._f.onChange(d);
2386
+ const Ce = p(C, te, ue), Y = !Ne(Ce) || Le;
2387
+ if (!ue && y.state.next({ name: C, type: d.type, values: De(o) }), he) return (f.isValid || x.isValid) && (n.mode === "onBlur" ? ue && v() : ue || v()), Y && y.state.next({ name: C, ...Le ? {} : Ce });
2388
+ if (!ue && Le && y.state.next({ ...t }), n.resolver) {
2392
2389
  const { errors: pe } = await w([C]);
2393
2390
  if (N(te), F) {
2394
2391
  const $ = kr(t.errors, s, C), ke = kr(pe, s, $.name || C);
2395
- U = ke.error, C = ke.name, G = Ne(pe);
2392
+ U = ke.error, C = ke.name, K = Ne(pe);
2396
2393
  }
2397
- } else g([C], !0), U = (await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation))[C], g([C]), N(te), F && (U ? G = !1 : (p.isValid || x.isValid) && (G = await E(s, !0)));
2398
- F && (_._f.deps && (!Array.isArray(_._f.deps) || _._f.deps.length > 0) && M(_._f.deps), u(C, G, U, Ce));
2394
+ } else m([C], !0), U = (await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation))[C], m([C]), N(te), F && (U ? K = !1 : (f.isValid || x.isValid) && (K = await E(s, !0)));
2395
+ F && (_._f.deps && (!Array.isArray(_._f.deps) || _._f.deps.length > 0) && M(_._f.deps), u(C, K, U, Ce));
2399
2396
  }
2400
- }, P = (d, y) => {
2401
- if (W(t.errors, y) && d.focus) return d.focus(), 1;
2402
- }, M = async (d, y = {}) => {
2397
+ }, P = (d, g) => {
2398
+ if (W(t.errors, g) && d.focus) return d.focus(), 1;
2399
+ }, M = async (d, g = {}) => {
2403
2400
  let C, F;
2404
2401
  const _ = xt(d);
2405
2402
  if (n.resolver) {
2406
2403
  const N = await (async (j) => {
2407
2404
  const { errors: H } = await w(j);
2408
2405
  if (j) for (const U of j) {
2409
- const G = W(H, U);
2410
- G ? fe(t.errors, U, G) : ve(t.errors, U);
2406
+ const K = W(H, U);
2407
+ K ? fe(t.errors, U, K) : ve(t.errors, U);
2411
2408
  }
2412
2409
  else t.errors = H;
2413
2410
  return H;
@@ -2417,58 +2414,58 @@ function Aa(e = {}) {
2417
2414
  const j = W(s, N);
2418
2415
  return await E(j && j._f ? { [N]: j } : j);
2419
2416
  }))).every(Boolean), (F || t.isValid) && v()) : F = C = await E(s);
2420
- return m.state.next({ ...!Fe(d) || (p.isValid || x.isValid) && C !== t.isValid ? {} : { name: d }, ...n.resolver || !d ? { isValid: C } : {}, errors: t.errors }), y.shouldFocus && !F && Dt(s, P, d ? _ : i.mount), F;
2421
- }, I = (d, y) => {
2422
- let C = { ...c.mount ? o : a };
2423
- return y && (C = wo(y.dirtyFields ? t.dirtyFields : t.touchedFields, C)), xe(d) ? C : Fe(d) ? W(C, d) : d.map((F) => W(C, F));
2424
- }, A = (d, y) => ({ invalid: !!W((y || t).errors, d), isDirty: !!W((y || t).dirtyFields, d), error: W((y || t).errors, d), isValidating: !!W(t.validatingFields, d), isTouched: !!W((y || t).touchedFields, d) }), V = (d, y, C) => {
2417
+ return y.state.next({ ...!Fe(d) || (f.isValid || x.isValid) && C !== t.isValid ? {} : { name: d }, ...n.resolver || !d ? { isValid: C } : {}, errors: t.errors }), g.shouldFocus && !F && Dt(s, P, d ? _ : i.mount), F;
2418
+ }, I = (d, g) => {
2419
+ let C = { ...l.mount ? o : a };
2420
+ return g && (C = wo(g.dirtyFields ? t.dirtyFields : t.touchedFields, C)), xe(d) ? C : Fe(d) ? W(C, d) : d.map((F) => W(C, F));
2421
+ }, A = (d, g) => ({ invalid: !!W((g || t).errors, d), isDirty: !!W((g || t).dirtyFields, d), error: W((g || t).errors, d), isValidating: !!W(t.validatingFields, d), isTouched: !!W((g || t).touchedFields, d) }), V = (d, g, C) => {
2425
2422
  const F = (W(s, d, { _f: {} })._f || {}).ref, _ = W(t.errors, d) || {}, { ref: N, message: j, type: H, ...U } = _;
2426
- fe(t.errors, d, { ...U, ...y, ref: F }), m.state.next({ name: d, errors: t.errors, isValid: !1 }), C && C.shouldFocus && F && F.focus && F.focus();
2427
- }, B = (d) => m.state.subscribe({ next: (y) => {
2423
+ fe(t.errors, d, { ...U, ...g, ref: F }), y.state.next({ name: d, errors: t.errors, isValid: !1 }), C && C.shouldFocus && F && F.focus && F.focus();
2424
+ }, B = (d) => y.state.subscribe({ next: (g) => {
2428
2425
  var C, F, _;
2429
- C = d.name, F = y.name, _ = d.exact, C && F && C !== F && !xt(C).some((N) => N && (_ ? N === F : N.startsWith(F) || F.startsWith(N))) || !((N, j, H, U) => {
2426
+ C = d.name, F = g.name, _ = d.exact, C && F && C !== F && !xt(C).some((N) => N && (_ ? N === F : N.startsWith(F) || F.startsWith(N))) || !((N, j, H, U) => {
2430
2427
  H(N);
2431
- const { name: G, ...te } = N;
2428
+ const { name: K, ...te } = N;
2432
2429
  return Ne(te) || Object.keys(te).length >= Object.keys(j).length || Object.keys(te).find((ue) => j[ue] === (!U || Ct));
2433
- })(y, d.formState || p, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...y, defaultValues: a });
2434
- } }).unsubscribe, z = (d, y = {}) => {
2435
- for (const C of d ? xt(d) : i.mount) i.mount.delete(C), i.array.delete(C), y.keepValue || (ve(s, C), ve(o, C)), !y.keepError && ve(t.errors, C), !y.keepDirty && ve(t.dirtyFields, C), !y.keepTouched && ve(t.touchedFields, C), !y.keepIsValidating && ve(t.validatingFields, C), !n.shouldUnregister && !y.keepDefaultValue && ve(a, C);
2436
- m.state.next({ values: De(o) }), m.state.next({ ...t, ...y.keepDirty ? { isDirty: T() } : {} }), !y.keepIsValid && v();
2437
- }, ie = ({ disabled: d, name: y }) => {
2438
- ($e(d) && c.mount || d || i.disabled.has(y)) && (d ? i.disabled.add(y) : i.disabled.delete(y));
2439
- }, K = (d, y = {}) => {
2430
+ })(g, d.formState || f, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...g, defaultValues: a });
2431
+ } }).unsubscribe, z = (d, g = {}) => {
2432
+ for (const C of d ? xt(d) : i.mount) i.mount.delete(C), i.array.delete(C), g.keepValue || (ve(s, C), ve(o, C)), !g.keepError && ve(t.errors, C), !g.keepDirty && ve(t.dirtyFields, C), !g.keepTouched && ve(t.touchedFields, C), !g.keepIsValidating && ve(t.validatingFields, C), !n.shouldUnregister && !g.keepDefaultValue && ve(a, C);
2433
+ y.state.next({ values: De(o) }), y.state.next({ ...t, ...g.keepDirty ? { isDirty: T() } : {} }), !g.keepIsValid && v();
2434
+ }, ie = ({ disabled: d, name: g }) => {
2435
+ ($e(d) && l.mount || d || i.disabled.has(g)) && (d ? i.disabled.add(g) : i.disabled.delete(g));
2436
+ }, G = (d, g = {}) => {
2440
2437
  let C = W(s, d);
2441
- const F = $e(y.disabled) || $e(n.disabled);
2442
- return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...y } }), i.mount.add(d), C ? ie({ disabled: $e(y.disabled) ? y.disabled : n.disabled, name: d }) : h(d, !0, y.value), { ...F ? { disabled: y.disabled || n.disabled } : {}, ...n.progressive ? { required: !!y.required, min: vt(y.min), max: vt(y.max), minLength: vt(y.minLength), maxLength: vt(y.maxLength), pattern: vt(y.pattern) } : {}, name: d, onChange: D, onBlur: D, ref: (_) => {
2438
+ const F = $e(g.disabled) || $e(n.disabled);
2439
+ return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...g } }), i.mount.add(d), C ? ie({ disabled: $e(g.disabled) ? g.disabled : n.disabled, name: d }) : h(d, !0, g.value), { ...F ? { disabled: g.disabled || n.disabled } : {}, ...n.progressive ? { required: !!g.required, min: vt(g.min), max: vt(g.max), minLength: vt(g.minLength), maxLength: vt(g.maxLength), pattern: vt(g.pattern) } : {}, name: d, onChange: D, onBlur: D, ref: (_) => {
2443
2440
  if (_) {
2444
- K(d, y), C = W(s, d);
2441
+ G(d, g), C = W(s, d);
2445
2442
  const N = xe(_.value) && _.querySelectorAll && _.querySelectorAll("input,select,textarea")[0] || _, j = ((U) => Sn(U) || St(U))(N), H = C._f.refs || [];
2446
2443
  if (j ? H.find((U) => U === N) : N === C._f.ref) return;
2447
2444
  fe(s, d, { _f: { ...C._f, ...j ? { refs: [...H.filter(Jt), N, ...Array.isArray(W(a, d)) ? [{}] : []], ref: { type: N.type, name: d } } : { ref: N } } }), h(d, !1, void 0, N);
2448
- } else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister || y.shouldUnregister) && (!((N, j) => N.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !c.action) && i.unMount.add(d);
2445
+ } else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister || g.shouldUnregister) && (!((N, j) => N.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !l.action) && i.unMount.add(d);
2449
2446
  } };
2450
- }, Q = () => n.shouldFocusError && Dt(s, P, i.mount), re = (d, y) => async (C) => {
2447
+ }, Q = () => n.shouldFocusError && Dt(s, P, i.mount), re = (d, g) => async (C) => {
2451
2448
  let F;
2452
2449
  C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
2453
2450
  let _ = De(o);
2454
- if (m.state.next({ isSubmitting: !0 }), n.resolver) {
2451
+ if (y.state.next({ isSubmitting: !0 }), n.resolver) {
2455
2452
  const { errors: N, values: j } = await w();
2456
2453
  t.errors = N, _ = De(j);
2457
2454
  } else await E(s);
2458
2455
  if (i.disabled.size) for (const N of i.disabled) ve(_, N);
2459
2456
  if (ve(t.errors, "root"), Ne(t.errors)) {
2460
- m.state.next({ errors: {} });
2457
+ y.state.next({ errors: {} });
2461
2458
  try {
2462
2459
  await d(_, C);
2463
2460
  } catch (N) {
2464
2461
  F = N;
2465
2462
  }
2466
- } else y && await y({ ...t.errors }, C), Q(), setTimeout(Q);
2467
- if (m.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !F, submitCount: t.submitCount + 1, errors: t.errors }), F) throw F;
2468
- }, se = (d, y = {}) => {
2463
+ } else g && await g({ ...t.errors }, C), Q(), setTimeout(Q);
2464
+ if (y.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !F, submitCount: t.submitCount + 1, errors: t.errors }), F) throw F;
2465
+ }, se = (d, g = {}) => {
2469
2466
  const C = d ? De(d) : a, F = De(C), _ = Ne(d), N = _ ? a : F;
2470
- if (y.keepDefaultValues || (a = C), !y.keepValues) {
2471
- if (y.keepDirtyValues) {
2467
+ if (g.keepDefaultValues || (a = C), !g.keepValues) {
2468
+ if (g.keepDirtyValues) {
2472
2469
  const j = /* @__PURE__ */ new Set([...i.mount, ...Object.keys(it(a, o))]);
2473
2470
  for (const H of Array.from(j)) W(t.dirtyFields, H) ? fe(N, H, W(o, H)) : S(H, W(N, H));
2474
2471
  } else {
@@ -2477,25 +2474,25 @@ function Aa(e = {}) {
2477
2474
  if (H && H._f) {
2478
2475
  const U = Array.isArray(H._f.refs) ? H._f.refs[0] : H._f.ref;
2479
2476
  if (Bt(U)) {
2480
- const G = U.closest("form");
2481
- if (G) {
2482
- G.reset();
2477
+ const K = U.closest("form");
2478
+ if (K) {
2479
+ K.reset();
2483
2480
  break;
2484
2481
  }
2485
2482
  }
2486
2483
  }
2487
2484
  }
2488
- if (y.keepFieldsRef) for (const j of i.mount) S(j, W(N, j));
2485
+ if (g.keepFieldsRef) for (const j of i.mount) S(j, W(N, j));
2489
2486
  else s = {};
2490
2487
  }
2491
- o = n.shouldUnregister ? y.keepDefaultValues ? De(a) : {} : De(N), m.array.next({ values: { ...N } }), m.state.next({ values: { ...N } });
2488
+ o = n.shouldUnregister ? g.keepDefaultValues ? De(a) : {} : De(N), y.array.next({ values: { ...N } }), y.state.next({ values: { ...N } });
2492
2489
  }
2493
- i = { mount: y.keepDirtyValues ? i.mount : /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set(), watchAll: !1, focus: "" }, c.mount = !p.isValid || !!y.keepIsValid || !!y.keepDirtyValues, c.watch = !!n.shouldUnregister, m.state.next({ submitCount: y.keepSubmitCount ? t.submitCount : 0, isDirty: !_ && (y.keepDirty ? t.isDirty : !(!y.keepDefaultValues || qe(d, a))), isSubmitted: !!y.keepIsSubmitted && t.isSubmitted, dirtyFields: _ ? {} : y.keepDirtyValues ? y.keepDefaultValues && o ? it(a, o) : t.dirtyFields : y.keepDefaultValues && d ? it(a, d) : y.keepDirty ? t.dirtyFields : {}, touchedFields: y.keepTouched ? t.touchedFields : {}, errors: y.keepErrors ? t.errors : {}, isSubmitSuccessful: !!y.keepIsSubmitSuccessful && t.isSubmitSuccessful, isSubmitting: !1, defaultValues: a });
2494
- }, ee = (d, y) => se(Be(d) ? d(o) : d, y), le = (d) => {
2490
+ i = { mount: g.keepDirtyValues ? i.mount : /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set(), watchAll: !1, focus: "" }, l.mount = !f.isValid || !!g.keepIsValid || !!g.keepDirtyValues, l.watch = !!n.shouldUnregister, y.state.next({ submitCount: g.keepSubmitCount ? t.submitCount : 0, isDirty: !_ && (g.keepDirty ? t.isDirty : !(!g.keepDefaultValues || qe(d, a))), isSubmitted: !!g.keepIsSubmitted && t.isSubmitted, dirtyFields: _ ? {} : g.keepDirtyValues ? g.keepDefaultValues && o ? it(a, o) : t.dirtyFields : g.keepDefaultValues && d ? it(a, d) : g.keepDirty ? t.dirtyFields : {}, touchedFields: g.keepTouched ? t.touchedFields : {}, errors: g.keepErrors ? t.errors : {}, isSubmitSuccessful: !!g.keepIsSubmitSuccessful && t.isSubmitSuccessful, isSubmitting: !1, defaultValues: a });
2491
+ }, ee = (d, g) => se(Be(d) ? d(o) : d, g), le = (d) => {
2495
2492
  t = { ...t, ...d };
2496
- }, ce = { control: { register: K, unregister: z, getFieldState: A, handleSubmit: re, setError: V, _subscribe: B, _runSchema: w, _focusError: Q, _getWatch: L, _getDirty: T, _setValid: v, _setFieldArray: (d, y = [], C, F, _ = !0, N = !0) => {
2493
+ }, ce = { control: { register: G, unregister: z, getFieldState: A, handleSubmit: re, setError: V, _subscribe: B, _runSchema: w, _focusError: Q, _getWatch: L, _getDirty: T, _setValid: v, _setFieldArray: (d, g = [], C, F, _ = !0, N = !0) => {
2497
2494
  if (F && C && !n.disabled) {
2498
- if (c.action = !0, N && Array.isArray(W(s, d))) {
2495
+ if (l.action = !0, N && Array.isArray(W(s, d))) {
2499
2496
  const j = C(W(s, d), F.argA, F.argB);
2500
2497
  _ && fe(s, d, j);
2501
2498
  }
@@ -2505,37 +2502,37 @@ function Aa(e = {}) {
2505
2502
  !on(W(H, U)).length && ve(H, U);
2506
2503
  })(t.errors, d);
2507
2504
  }
2508
- if ((p.touchedFields || x.touchedFields) && N && Array.isArray(W(t.touchedFields, d))) {
2505
+ if ((f.touchedFields || x.touchedFields) && N && Array.isArray(W(t.touchedFields, d))) {
2509
2506
  const j = C(W(t.touchedFields, d), F.argA, F.argB);
2510
2507
  _ && fe(t.touchedFields, d, j);
2511
2508
  }
2512
- (p.dirtyFields || x.dirtyFields) && (t.dirtyFields = it(a, o)), m.state.next({ name: d, isDirty: T(d, y), dirtyFields: t.dirtyFields, errors: t.errors, isValid: t.isValid });
2513
- } else fe(o, d, y);
2509
+ (f.dirtyFields || x.dirtyFields) && (t.dirtyFields = it(a, o)), y.state.next({ name: d, isDirty: T(d, g), dirtyFields: t.dirtyFields, errors: t.errors, isValid: t.isValid });
2510
+ } else fe(o, d, g);
2514
2511
  }, _setDisabledField: ie, _setErrors: (d) => {
2515
- t.errors = d, m.state.next({ errors: t.errors, isValid: !1 });
2516
- }, _getFieldArray: (d) => on(W(c.mount ? o : a, d, n.shouldUnregister ? W(a, d, []) : [])), _reset: se, _resetDefaultValues: () => Be(n.defaultValues) && n.defaultValues().then((d) => {
2517
- ee(d, n.resetOptions), m.state.next({ isLoading: !1 });
2512
+ t.errors = d, y.state.next({ errors: t.errors, isValid: !1 });
2513
+ }, _getFieldArray: (d) => on(W(l.mount ? o : a, d, n.shouldUnregister ? W(a, d, []) : [])), _reset: se, _resetDefaultValues: () => Be(n.defaultValues) && n.defaultValues().then((d) => {
2514
+ ee(d, n.resetOptions), y.state.next({ isLoading: !1 });
2518
2515
  }), _removeUnmounted: () => {
2519
2516
  for (const d of i.unMount) {
2520
- const y = W(s, d);
2521
- y && (y._f.refs ? y._f.refs.every((C) => !Jt(C)) : !Jt(y._f.ref)) && z(d);
2517
+ const g = W(s, d);
2518
+ g && (g._f.refs ? g._f.refs.every((C) => !Jt(C)) : !Jt(g._f.ref)) && z(d);
2522
2519
  }
2523
2520
  i.unMount = /* @__PURE__ */ new Set();
2524
2521
  }, _disableForm: (d) => {
2525
- $e(d) && (m.state.next({ disabled: d }), Dt(s, (y, C) => {
2522
+ $e(d) && (y.state.next({ disabled: d }), Dt(s, (g, C) => {
2526
2523
  const F = W(s, C);
2527
- F && (y.disabled = F._f.disabled || d, Array.isArray(F._f.refs) && F._f.refs.forEach((_) => {
2524
+ F && (g.disabled = F._f.disabled || d, Array.isArray(F._f.refs) && F._f.refs.forEach((_) => {
2528
2525
  _.disabled = F._f.disabled || d;
2529
2526
  }));
2530
2527
  }, 0, !1));
2531
- }, _subjects: m, _proxyFormState: p, get _fields() {
2528
+ }, _subjects: y, _proxyFormState: f, get _fields() {
2532
2529
  return s;
2533
2530
  }, get _formValues() {
2534
2531
  return o;
2535
2532
  }, get _state() {
2536
- return c;
2533
+ return l;
2537
2534
  }, set _state(d) {
2538
- c = d;
2535
+ l = d;
2539
2536
  }, get _defaultValues() {
2540
2537
  return a;
2541
2538
  }, get _names() {
@@ -2548,30 +2545,30 @@ function Aa(e = {}) {
2548
2545
  return n;
2549
2546
  }, set _options(d) {
2550
2547
  n = { ...n, ...d };
2551
- } }, subscribe: (d) => (c.mount = !0, x = { ...x, ...d.formState }, B({ ...d, formState: x })), trigger: M, register: K, handleSubmit: re, watch: (d, y) => Be(d) ? m.state.subscribe({ next: (C) => "values" in C && d(L(void 0, y), C) }) : L(d, y, !0), setValue: S, getValues: I, reset: ee, resetField: (d, y = {}) => {
2552
- W(s, d) && (xe(y.defaultValue) ? S(d, De(W(a, d))) : (S(d, y.defaultValue), fe(a, d, De(y.defaultValue))), y.keepTouched || ve(t.touchedFields, d), y.keepDirty || (ve(t.dirtyFields, d), t.isDirty = y.defaultValue ? T(d, De(W(a, d))) : T()), y.keepError || (ve(t.errors, d), p.isValid && v()), m.state.next({ ...t }));
2548
+ } }, subscribe: (d) => (l.mount = !0, x = { ...x, ...d.formState }, B({ ...d, formState: x })), trigger: M, register: G, handleSubmit: re, watch: (d, g) => Be(d) ? y.state.subscribe({ next: (C) => "values" in C && d(L(void 0, g), C) }) : L(d, g, !0), setValue: S, getValues: I, reset: ee, resetField: (d, g = {}) => {
2549
+ W(s, d) && (xe(g.defaultValue) ? S(d, De(W(a, d))) : (S(d, g.defaultValue), fe(a, d, De(g.defaultValue))), g.keepTouched || ve(t.touchedFields, d), g.keepDirty || (ve(t.dirtyFields, d), t.isDirty = g.defaultValue ? T(d, De(W(a, d))) : T()), g.keepError || (ve(t.errors, d), f.isValid && v()), y.state.next({ ...t }));
2553
2550
  }, clearErrors: (d) => {
2554
- d && xt(d).forEach((y) => ve(t.errors, y)), m.state.next({ errors: d ? t.errors : {} });
2555
- }, unregister: z, setError: V, setFocus: (d, y = {}) => {
2551
+ d && xt(d).forEach((g) => ve(t.errors, g)), y.state.next({ errors: d ? t.errors : {} });
2552
+ }, unregister: z, setError: V, setFocus: (d, g = {}) => {
2556
2553
  const C = W(s, d), F = C && C._f;
2557
2554
  if (F) {
2558
2555
  const _ = F.refs ? F.refs[0] : F.ref;
2559
- _.focus && (_.focus(), y.shouldSelect && Be(_.select) && _.select());
2556
+ _.focus && (_.focus(), g.shouldSelect && Be(_.select) && _.select());
2560
2557
  }
2561
2558
  }, getFieldState: A };
2562
2559
  return { ...ce, formControl: ce };
2563
2560
  }
2564
- function Ia(e = {}) {
2561
+ function La(e = {}) {
2565
2562
  const r = q.useRef(void 0), n = q.useRef(void 0), [t, s] = q.useState({ isDirty: !1, isValidating: !1, isLoading: Be(e.defaultValues), isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, submitCount: 0, dirtyFields: {}, touchedFields: {}, validatingFields: {}, errors: e.errors || {}, disabled: e.disabled || !1, isReady: !1, defaultValues: Be(e.defaultValues) ? void 0 : e.defaultValues });
2566
2563
  if (!r.current) if (e.formControl) r.current = { ...e.formControl, formState: t }, e.defaultValues && !Be(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
2567
2564
  else {
2568
- const { formControl: o, ...c } = Aa(e);
2569
- r.current = { ...c, formState: t };
2565
+ const { formControl: o, ...l } = Va(e);
2566
+ r.current = { ...l, formState: t };
2570
2567
  }
2571
2568
  const a = r.current.control;
2572
- return a._options = e, Pa(() => {
2569
+ return a._options = e, Na(() => {
2573
2570
  const o = a._subscribe({ formState: a._proxyFormState, callback: () => s({ ...a._formState }), reRenderRoot: !0 });
2574
- return s((c) => ({ ...c, isReady: !0 })), a._formState.isReady = !0, o;
2571
+ return s((l) => ({ ...l, isReady: !0 })), a._formState.isReady = !0, o;
2575
2572
  }, [a]), q.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), q.useEffect(() => {
2576
2573
  e.mode && (a._options.mode = e.mode), e.reValidateMode && (a._options.reValidateMode = e.reValidateMode);
2577
2574
  }, [a, e.mode, e.reValidateMode]), q.useEffect(() => {
@@ -2587,31 +2584,31 @@ function Ia(e = {}) {
2587
2584
  e.values && !qe(e.values, n.current) ? (a._reset(e.values, { keepFieldsRef: !0, ...a._options.resetOptions }), n.current = e.values, s((o) => ({ ...o }))) : a._resetDefaultValues();
2588
2585
  }, [a, e.values]), q.useEffect(() => {
2589
2586
  a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
2590
- }), r.current.formState = ((o, c, i, l = !0) => {
2591
- const p = { defaultValues: c._defaultValues };
2592
- for (const x in o) Object.defineProperty(p, x, { get: () => {
2593
- const m = x;
2594
- return c._proxyFormState[m] !== Ct && (c._proxyFormState[m] = !l || Ct), o[m];
2587
+ }), r.current.formState = ((o, l, i, c = !0) => {
2588
+ const f = { defaultValues: l._defaultValues };
2589
+ for (const x in o) Object.defineProperty(f, x, { get: () => {
2590
+ const y = x;
2591
+ return l._proxyFormState[y] !== Ct && (l._proxyFormState[y] = !c || Ct), o[y];
2595
2592
  } });
2596
- return p;
2593
+ return f;
2597
2594
  })(t, a), r.current;
2598
2595
  }
2599
- const Va = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2600
- const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: c, createOptionsButton: i, options: l = Va, autoFocusSel: p = ".defaultOption", defaultOption: x = l[0], cancelOption: m = "Cancel", children: b, ...v } = e, g = Ia({ shouldUseNativeValidation: !1 }), { handleSubmit: h, formState: f } = g, u = ge(null), w = ge(null), E = ge(null), T = ae(async (P) => {
2596
+ const Ba = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2597
+ const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: l, createOptionsButton: i, options: c = Ba, autoFocusSel: f = ".defaultOption", defaultOption: x = c[0], cancelOption: y = "Cancel", children: b, ...v } = e, m = La({ shouldUseNativeValidation: !1 }), { handleSubmit: h, formState: p } = m, u = ge(null), w = ge(null), E = ge(null), T = ae(async (P) => {
2601
2598
  let M;
2602
2599
  try {
2603
- if (M = await Promise.resolve(c?.(P)) ?? !0, M !== !0) return;
2604
- await Promise.resolve(a?.(P, P === m, P === x)), o?.(P);
2600
+ if (M = await Promise.resolve(l?.(P)) ?? !0, M !== !0) return;
2601
+ await Promise.resolve(a?.(P, P === y, P === x)), o?.(P);
2605
2602
  } catch {
2606
2603
  }
2607
- }, [a, o, c, m, x]), L = ae((P, M) => {
2604
+ }, [a, o, l, y, x]), L = ae((P, M) => {
2608
2605
  setTimeout(() => {
2609
2606
  T(x);
2610
2607
  }, 180);
2611
2608
  }, [T]), O = ae(() => {
2612
- a?.(m, !0, !1), s?.(), o?.(null);
2613
- }, [a, m, s, o]), R = f && (Object.keys(f.errors).length > 0 || f.disabled || f.isSubmitted), S = ae((P, M) => {
2614
- const I = P === m, A = { className: M ? "defaultOption" : "action", type: M ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
2609
+ a?.(y, !0, !1), s?.(), o?.(null);
2610
+ }, [a, y, s, o]), R = p && (Object.keys(p.errors).length > 0 || p.disabled || p.isSubmitted), S = ae((P, M) => {
2611
+ const I = P === y, A = { className: M ? "defaultOption" : "action", type: M ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
2615
2612
  I ? O() : M || T(P);
2616
2613
  } };
2617
2614
  if (i) return i(P, A, M);
@@ -2623,262 +2620,263 @@ const Va = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2623
2620
  };
2624
2621
  }
2625
2622
  return k(Yo, { ...V, children: k("div", { style: { paddingTop: "3px" }, children: P }) }, `action:${P}`);
2626
- }, [l, x, m, i, f]), D = Z(() => {
2623
+ }, [c, x, y, i, p]), D = Z(() => {
2627
2624
  const P = [];
2628
- for (let M = 0; M < l.length; M++) {
2629
- const I = l[M], A = x ? I === x : M === 0;
2625
+ for (let M = 0; M < c.length; M++) {
2626
+ const I = c[M], A = x ? I === x : M === 0;
2630
2627
  P.push(S(I, A));
2631
2628
  }
2632
2629
  return P;
2633
- }, [l, x, f]);
2634
- return k(ha, { onCancel: O, initialPosition: { y: va === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: p, isModal: !0, ref: r, ...v, children: k(Ta, { ...g, children: J("form", { ref: E, onSubmit: h(L), children: [k(Ko, { dividers: !0, onKeyDown: (P) => {
2630
+ }, [c, x, p]);
2631
+ return k(ga, { onCancel: O, initialPosition: { y: wa === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: f, isModal: !0, ref: r, ...v, children: k(Ra, { ...m, children: J("form", { ref: E, onSubmit: h(L), children: [k(Go, { dividers: !0, onKeyDown: (P) => {
2635
2632
  if (P.isDefaultPrevented()) return;
2636
2633
  P.stopPropagation();
2637
2634
  let M = null, I = null;
2638
- const A = P.which === Pe.Escape && m;
2639
- if (A) M = m, I = w;
2635
+ const A = P.which === Pe.Escape && y;
2636
+ if (A) M = y, I = w;
2640
2637
  else {
2641
2638
  if (R) return;
2642
- P.which === Pe.Enter && (M = x ?? l[0], I = u);
2639
+ P.which === Pe.Enter && (M = x ?? c[0], I = u);
2643
2640
  }
2644
2641
  M && (I.current?.start(P, { center: !1 }), setTimeout(() => {
2645
2642
  I.current?.stop(P), A && T(M);
2646
2643
  }, 180));
2647
2644
  }, children: J(X, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (P) => P.spacing(t || n ? 1.5 : 0) }, children: [J(X, { sx: { display: "flex", flexDirection: "column" }, children: [t, k(Me, { children: n })] }), b] }) }), k(Xo, { sx: { paddingTop: (P) => P.spacing(1), paddingBottom: (P) => P.spacing(1), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), backgroundColor: (P) => me(P.palette.action.hover, 0.03) }, children: D })] }) }) });
2648
- })), La = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Or, default: Or }, Symbol.toStringTag, { value: "Module" })), Ba = q.lazy(() => Promise.resolve().then(() => La)), Ds = (e) => {
2645
+ })), ja = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Or, default: Or }, Symbol.toStringTag, { value: "Module" })), $a = q.lazy(() => Promise.resolve().then(() => ja)), Cs = (e) => {
2649
2646
  const { showModal: r } = gn();
2650
2647
  return (n) => new Promise((t) => {
2651
- const s = r(Ba, { ...e, ...n, onOption(a) {
2648
+ const s = r($a, { ...e, ...n, onOption(a) {
2652
2649
  n?.onOption?.(a, a === n.cancelOption, a === n.defaultOption), t(a);
2653
2650
  }, onDone: () => {
2654
2651
  n?.onDone?.(), s.hide();
2655
2652
  } });
2656
2653
  });
2657
- }, ja = q.lazy(() => import("./BGR5EX2vtMVIqOsr.mjs")), Os = (e) => {
2654
+ }, za = q.lazy(() => import("./f4SG8j9gOmc8X9G2.mjs")), Es = (e) => {
2658
2655
  const { showModal: r } = gn();
2659
2656
  return (n) => {
2660
2657
  const { defaultOption: t = n.options?.[0], cancelOption: s = "Cancel", ...a } = n;
2661
2658
  return new Promise((o) => {
2662
- const c = r(ja, { ...e, defaultOption: t, cancelOption: s, onOption(i) {
2659
+ const l = r(za, { ...e, defaultOption: t, cancelOption: s, onOption(i) {
2663
2660
  a?.onOption?.(i, i === s, i === t), o({ input: "", option: i });
2664
- }, onInputOption(i, l) {
2665
- a?.onInputOption?.(i, l), o({ input: i, option: l });
2661
+ }, onInputOption(i, c) {
2662
+ a?.onInputOption?.(i, c), o({ input: i, option: c });
2666
2663
  }, onDone: () => {
2667
- a?.onDone?.(), c.hide();
2664
+ a?.onDone?.(), l.hide();
2668
2665
  } });
2669
2666
  });
2670
2667
  };
2671
2668
  }, Dn = oe(de((e, r) => {
2672
2669
  const { command: n, disabled: t = !1, shortcut: s, children: a, ...o } = e;
2673
2670
  return cn(n), k(pt, { ref: r, label: t !== void 0 ? n?.label() : "", shortcut: s !== void 0 ? s : Array.isArray(n?.shortcut()) ? n?.shortcut()[0] : n?.shortcut(), description: n?.description(), disabled: t, chips: n?.tags(), componentDisabled: n?.disabled(), ...o, children: k("div", { style: { display: "flex", flex: "1 1 0%" }, children: a }) });
2674
- })), $a = k(be, {}), Eo = oe(de((e, r) => {
2675
- const { command: n, commandHook: t, scope: s, context: a, icon: o, label: c, disabled: i = !1, variant: l = Ae.Toolbar, shortcut: p, commandState: x, tooltipProps: m, ...b } = e, v = ge(null), g = ge(!1), h = Z(() => {
2671
+ })), Wa = k(be, {}), Eo = oe(de((e, r) => {
2672
+ const { command: n, commandHook: t, scope: s, context: a, icon: o, label: l, disabled: i = !1, variant: c = Ae.Toolbar, shortcut: f, commandState: x, tooltipProps: y, ...b } = e, v = ge(null), m = ge(!1), h = Z(() => {
2676
2673
  const R = { onExecute(S, D) {
2677
- t?.onExecute?.(S, D), g.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), g.current = !1;
2674
+ t?.onExecute?.(S, D), m.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), m.current = !1;
2678
2675
  }, onError(S, D, P) {
2679
2676
  t?.onError(S, D, P);
2680
2677
  } };
2681
2678
  return t?.beforeExecute && (R.beforeExecute = t.beforeExecute), R;
2682
- }, [t]), f = cn(n, h), u = _e((R) => {
2679
+ }, [t]), p = cn(n, h), u = _e((R) => {
2683
2680
  R.button === 0 && R.preventDefault();
2684
2681
  }, []), w = _e((R) => {
2685
2682
  R.button === 0 && n?.execute(x, t);
2686
- }, [f, t, x]), E = _e((R) => {
2683
+ }, [p, t, x]), E = _e((R) => {
2687
2684
  R.keyCode !== Pe.Enter && R.keyCode !== Pe.Space || n?.execute(x, t);
2688
- }, [f, t, x]), T = Z(() => {
2685
+ }, [p, t, x]), T = Z(() => {
2689
2686
  if (o) return typeof o == "function" ? o(n) : o;
2690
2687
  let R = n?.icon(a);
2691
- return R ? (typeof R == "string" && (R = k(be, { iconKey: R })), R) : l === Ae.Toolbar || n?.state() ? void 0 : $a;
2692
- }, [f, o]), L = Z(() => ({ tabIndex: 0, ref: r, selected: n?.state(), icon: l === Ae.Toolbar ? T : k(_i, { selected: n?.state() ?? !1, children: T }), touchRippleRef: v, disabled: i || !n || n.disabled(), onMouseDown: u, onMouseUp: w, onKeyDown: E }), [f, t, i, T]);
2688
+ return R ? (typeof R == "string" && (R = k(be, { iconKey: R })), R) : c === Ae.Toolbar || n?.state() ? void 0 : Wa;
2689
+ }, [p, o]), L = Z(() => ({ tabIndex: 0, ref: r, selected: n?.state(), icon: c === Ae.Toolbar ? T : k(Ii, { selected: n?.state() ?? !1, children: T }), touchRippleRef: v, disabled: i || !n || n.disabled(), onMouseDown: u, onMouseUp: w, onKeyDown: E }), [p, t, i, T]);
2693
2690
  let O;
2694
- return O = l === Ae.Menuitem ? k(Ot, { ...b, chips: n?.tags(), ...L, children: c ?? n?.label(s, a) }) : k(Wt, { ...b, ...L }), (c || n?.label()) && ((n.disabled() || i) && (O = k("div", { children: O })), O = k(Dn, { command: n, placement: l === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: p, ...m, children: O })), O;
2691
+ return O = c === Ae.Menuitem ? k(Ot, { ...b, chips: n?.tags(), ...L, children: l ?? n?.label(s, a) }) : k(Wt, { ...b, ...L }), (l || n?.label()) && ((n.disabled() || i) && (O = k("div", { children: O })), O = k(Dn, { command: n, placement: c === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: f, ...y, children: O })), O;
2695
2692
  }));
2696
2693
  Eo.displayName = "CommandButton";
2697
- const za = k(be, {}), Cs = oe(de((e, r) => {
2698
- const { command: n, scope: t, icon: s = za, label: a, variant: o = Ae.Toolbar, disabled: c = !1, commandHook: i, ...l } = e, p = ge(null), x = ge(!1), m = Z(() => {
2694
+ const Ha = k(be, {}), Ms = oe(de((e, r) => {
2695
+ const { command: n, scope: t, icon: s = Ha, label: a, variant: o = Ae.Toolbar, disabled: l = !1, commandHook: i, ...c } = e, f = ge(null), x = ge(!1), y = Z(() => {
2699
2696
  const O = { onExecute(R, S) {
2700
- i?.onExecute?.(R, S), x.current || (p.current?.start({ center: !1 }), setTimeout(() => p.current?.stop({}), 180)), x.current = !1;
2697
+ i?.onExecute?.(R, S), x.current || (f.current?.start({ center: !1 }), setTimeout(() => f.current?.stop({}), 180)), x.current = !1;
2701
2698
  }, onError(R, S, D) {
2702
2699
  i?.onError(R, S, D);
2703
2700
  } };
2704
2701
  return i?.beforeExecute && (O.beforeExecute = i.beforeExecute), O;
2705
- }, [i]), b = cn(n, m), v = () => n?.state()?.toString() || "0", [g, h] = ne(v), f = ae(() => {
2706
- const O = parseFloat(g);
2702
+ }, [i]), b = cn(n, y), v = () => n?.state()?.toString() || "0", [m, h] = ne(v), p = ae(() => {
2703
+ const O = parseFloat(m);
2707
2704
  isNaN(O) ? h(v()) : parseFloat(v()) !== O && n.execute(O, i);
2708
- }, [v, n, g, i]);
2705
+ }, [v, n, m, i]);
2709
2706
  Se(() => {
2710
2707
  h(v());
2711
2708
  }, [n?.state()]);
2712
2709
  const u = Z(() => {
2713
2710
  let O = typeof s == "function" ? s(n) : s;
2714
2711
  return O && (O = n?.icon()), typeof O == "string" && (O = k(be, { iconKey: O })), O;
2715
- }, [b, s, n?.icon]), w = Z(() => a === void 0 ? n?.label(t) : typeof a == "function" ? a() : a, [b]), E = Z(() => k(Ze, { ...l, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: !0, onClick: (O) => O.stopPropagation(), onMouseDown: (O) => {
2712
+ }, [b, s, n?.icon]), w = Z(() => a === void 0 ? n?.label(t) : typeof a == "function" ? a() : a, [b]), E = Z(() => k(Ze, { ...c, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: !0, onClick: (O) => O.stopPropagation(), onMouseDown: (O) => {
2716
2713
  O.button === 0 && O.stopPropagation();
2717
2714
  }, onMouseUp: (O) => {
2718
2715
  O.button === 0 && O.stopPropagation();
2719
- }, children: k(Go, { inputMode: "numeric", disabled: c || !n || n.disabled(), inputProps: { tabIndex: 0, name: `input-${n.key()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (O) => `${Math.round(O.typography.fontSize)}px`, width: (O) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: g, onFocus: (O) => {
2716
+ }, children: k(Ko, { inputMode: "numeric", disabled: l || !n || n.disabled(), inputProps: { tabIndex: 0, name: `input-${n.key()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (O) => `${Math.round(O.typography.fontSize)}px`, width: (O) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: m, onFocus: (O) => {
2720
2717
  O.target?.select();
2721
2718
  }, onKeyDown: (O) => {
2722
- if (O.which === Pe.Enter) v() !== g && (O.stopPropagation(), O.preventDefault(), f());
2723
- else if (O.which === Pe.Escape) v() !== g && (h(v()), setTimeout(() => {
2719
+ if (O.which === Pe.Enter) v() !== m && (O.stopPropagation(), O.preventDefault(), p());
2720
+ else if (O.which === Pe.Escape) v() !== m && (h(v()), setTimeout(() => {
2724
2721
  O.target?.select();
2725
2722
  }, 0), O.stopPropagation(), O.preventDefault());
2726
2723
  else {
2727
- if (O.key.match("[-]") || O.key.match("[0-9.]") && (g + O.key).length > 4) return O.stopPropagation(), void O.preventDefault();
2724
+ if (O.key.match("[-]") || O.key.match("[0-9.]") && (m + O.key).length > 4) return O.stopPropagation(), void O.preventDefault();
2728
2725
  if (O.which === Pe.Space) return void O.preventDefault();
2729
2726
  }
2730
2727
  }, onBlur: () => {
2731
- f();
2728
+ p();
2732
2729
  }, onChange: (O) => {
2733
2730
  if (O.target.value.length > 4) return O.stopPropagation(), void O.preventDefault();
2734
2731
  h(O.target.value);
2735
- } }) }), [g, c, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: p, disabled: c || !n || n.disabled(), onMouseDown: (O) => {
2732
+ } }) }), [m, l, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: f, disabled: l || !n || n.disabled(), onMouseDown: (O) => {
2736
2733
  O.button === 0 && O.preventDefault();
2737
2734
  }, onMouseUp: (O) => {
2738
- O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), m));
2735
+ O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), y));
2739
2736
  }, onKeyDown: (O) => {
2740
- O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), m);
2737
+ O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), y);
2741
2738
  } };
2742
2739
  let L;
2743
- return L = o === Ae.Menuitem ? J(Ot, { ...l, chips: n?.tags(), ...T, children: [w, E] }) : k(Wt, { ...l, ...T }), n?.label() && ((n.disabled() || c) && (L = k("div", { children: L })), L = k(Dn, { command: n, placement: o === Ae.Toolbar ? "bottom-start" : "right-start", children: L })), L;
2740
+ return L = o === Ae.Menuitem ? J(Ot, { ...c, chips: n?.tags(), ...T, children: [w, E] }) : k(Wt, { ...c, ...T }), n?.label() && ((n.disabled() || l) && (L = k("div", { children: L })), L = k(Dn, { command: n, placement: o === Ae.Toolbar ? "bottom-start" : "right-start", children: L })), L;
2744
2741
  })), Mo = oe(de((e, r) => {
2745
- const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: c, disabled: i, label: l, icon: p, createPopupPanel: x, tooltip: m, selected: b, scope: v, ...g } = e, h = ge(null), f = ge(!1), u = Z(() => {
2742
+ const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: l, disabled: i, label: c, icon: f, createPopupPanel: x, tooltip: y, selected: b, scope: v, ...m } = e, h = ge(null), p = ge(!1), u = Z(() => {
2746
2743
  const D = { onExecute(P, M) {
2747
- c?.onExecute?.(P, M), f.current || (h.current?.start({ center: !1 }), setTimeout(() => h.current?.stop({}), 180)), f.current = !1;
2744
+ l?.onExecute?.(P, M), p.current || (h.current?.start({ center: !1 }), setTimeout(() => h.current?.stop({}), 180)), p.current = !1;
2748
2745
  }, onError(P, M, I) {
2749
- c?.onError(P, M, I);
2746
+ l?.onError(P, M, I);
2750
2747
  } };
2751
- return c?.beforeExecute && (D.beforeExecute = c.beforeExecute), D;
2752
- }, [c]), w = un(a, [t], null, [t]), E = w[0], { label: T, icon: L } = Z(() => {
2748
+ return l?.beforeExecute && (D.beforeExecute = l.beforeExecute), D;
2749
+ }, [l]), w = un(a, [t], null, [t]), E = w[0], { label: T, icon: L } = Z(() => {
2753
2750
  let D = null;
2754
- l && (D = typeof l == "function" ? l(E) : l), D || (D = E?.label?.(v));
2755
- let P = p;
2751
+ c && (D = typeof c == "function" ? c(E) : c), D || (D = E?.label?.(v));
2752
+ let P = f;
2756
2753
  return P || (P = E?.icon?.()), typeof P == "string" ? P = k(be, { iconKey: P }) : typeof P == "function" && (P = P(E)), { label: D, icon: P };
2757
- }, [w, l, p]), O = { disabled: i, scope: v, touchRippleRef: h, onQuickClick: s, tooltip: m, label: T, icon: L };
2758
- (T || m) && (O.createTooltip = ({ children: D }, P) => k(pt, { label: T, description: m, disabled: P, children: D }));
2754
+ }, [w, c, f]), O = { disabled: i, scope: v, touchRippleRef: h, onQuickClick: s, tooltip: y, label: T, icon: L };
2755
+ (T || y) && (O.createTooltip = ({ children: D }, P) => k(pt, { label: T, description: y, disabled: P, children: D }));
2759
2756
  const R = ae((D) => x?.(D, a), [x, w]), S = ae((D) => E?.execute(o, u), [E]);
2760
2757
  return E ? (O.quickButtonProps = {}, O.quickButtonProps.createTooltip = ({ children: D, placement: P }, M) => k(Dn, { command: E, placement: P ?? n === Ae.Toolbar ? "bottom-start" : "right-start", disabled: M, children: D }), O.disabled = O.disabled ?? E?.disabled(), s || (O.onQuickClick = S)) : t && (O.onQuickClick = () => {
2761
- }), O.selected = b ?? E?.state(), O.createPopupPanel = R, n === Ae.Toolbar ? k(mn, { ...g, ...O, ref: r }) : k(Zr, { ...g, ...O, ref: r });
2758
+ }), O.selected = b ?? E?.state(), O.createPopupPanel = R, n === Ae.Toolbar ? k(mn, { ...m, ...O, ref: r }) : k(Zr, { ...m, ...O, ref: r });
2762
2759
  }));
2763
2760
  Mo.displayName = "CommandPopupButton";
2764
- const Wa = k(be, { iconKey: "Check" }), Es = (e) => {
2765
- const { command: r, label: n, scope: t, icon: s = Wa, sx: a, ...o } = e;
2766
- return J(X, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (c) => c.typography.subtitle2.fontSize, ...a }, ...o, children: [s, k(Me, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (c) => c.spacing(0.25), paddingRight: (c) => c.spacing(0.25), fontSize: "inherit" }, children: r?.label(t) || n })] });
2767
- }, Ha = oe(de((e, r) => {
2768
- const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: c, ...i } = e, l = Tr(r, () => ({}), []), [p, x] = ne(null), { reference: m } = zt({ label: "toolbar", anchor: l.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
2769
- const O = p;
2761
+ const Ua = k(be, { iconKey: "Check" }), Ts = (e) => {
2762
+ const { command: r, label: n, scope: t, icon: s = Ua, sx: a, ...o } = e;
2763
+ return J(X, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (l) => l.typography.subtitle2.fontSize, ...a }, ...o, children: [s, k(Me, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (l) => l.spacing(0.25), paddingRight: (l) => l.spacing(0.25), fontSize: "inherit" }, children: r?.label(t) || n })] });
2764
+ }, Ya = oe(de((e, r) => {
2765
+ const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: l, ...i } = e, c = Tr(r, () => ({}), []), [f, x] = ne(null), { reference: y } = zt({ label: "toolbar", anchor: c.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
2766
+ const O = f;
2770
2767
  O && requestAnimationFrame(() => {
2771
- l.current?.contains(document.activeElement) && O.focus();
2768
+ c.current?.contains(document.activeElement) && O.focus();
2772
2769
  });
2773
- }, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), g = Z(() => {
2770
+ }, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), m = Z(() => {
2774
2771
  const { commandHook: O, ...R } = s || {};
2775
- return { commandHook: { beforeExecute: (S, D) => O?.beforeExecute?.(S, D) !== !1 && m.closeAll(), onExecute(S, D) {
2772
+ return { commandHook: { beforeExecute: (S, D) => O?.beforeExecute?.(S, D) !== !1 && y.closeAll(), onExecute(S, D) {
2776
2773
  O?.onExecute?.(S, D), b();
2777
2774
  }, onError(S, D, P) {
2778
2775
  O?.onError?.(S, D, P);
2779
2776
  } }, ...R };
2780
- }, [m, s]), h = Z(() => ({ ...v, ...g }), [v, g]), [f, u] = Ao((O) => O + 1, 0);
2777
+ }, [y, s]), h = Z(() => ({ ...v, ...m }), [v, m]), [p, u] = Ao((O) => O + 1, 0);
2781
2778
  un(t, [], { onChange: () => {
2782
2779
  u();
2783
2780
  } });
2784
- const w = Z(() => ({ commands: t, parentFloat: m, ...g }), [f, h, m, s]);
2781
+ const w = Z(() => ({ commands: t, parentFloat: y, ...m }), [p, h, y, s]);
2785
2782
  let E = 0;
2786
2783
  v.dense || (E += 2), v.outlined && E++;
2787
2784
  let T = 2;
2788
2785
  v.dense || (T = 4);
2789
- const L = Z(() => o({ commands: t, commandButtonProps: h, commandPopupProps: { commands: t, ...w, ...s } }), [f, h, w, o]);
2790
- return k(qo, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${T}px`, paddingBottom: `${T}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...n }, ref: l, onFocus: (O) => {
2791
- O.relatedTarget && !p && x(O.relatedTarget);
2786
+ const L = Z(() => o({ commands: t, commandButtonProps: h, commandPopupProps: { commands: t, ...w, ...s } }), [p, h, w, o]);
2787
+ return k(qo, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${T}px`, paddingBottom: `${T}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...n }, ref: c, onFocus: (O) => {
2788
+ O.relatedTarget && !f && x(O.relatedTarget);
2792
2789
  }, onBlur: (O) => {
2793
- p && !l?.current?.contains(O.relatedTarget) && x(null);
2790
+ f && !c?.current?.contains(O.relatedTarget) && x(null);
2794
2791
  }, onKeyDown: (O) => {
2795
- p && O.which === Pe.Escape && p.focus();
2796
- }, ...i, children: k("div", { ref: l, style: { flex: "1 1 100%", display: "flex", flexWrap: "wrap", rowGap: `${T}px`, columnGap: `${E}px`, alignItems: "center", maxWidth: "100%" }, children: L }) });
2792
+ f && O.which === Pe.Escape && f.focus();
2793
+ }, ...i, children: k("div", { ref: c, style: { flex: "1 1 100%", display: "flex", flexWrap: "wrap", rowGap: `${T}px`, columnGap: `${E}px`, alignItems: "center", maxWidth: "100%" }, children: L }) });
2797
2794
  }));
2798
- Ha.displayName = "CommandToolbar";
2799
- const Ua = (e) => {
2795
+ Ya.displayName = "CommandToolbar";
2796
+ const Ga = (e) => {
2800
2797
  const { key: r, ...n } = e;
2801
2798
  return k(Eo, { ...n }, r);
2802
- }, Ms = oe(de((e, r) => {
2803
- const { popupCommandKeys: n, renderCommandButton: t = Ua, scope: s, commands: a, quickCommand: o, popupScope: c = o, commandState: i, commandHook: l, disabled: p = !1, ...x } = e, m = un(a, n ? [o, ...n] : [o]), b = _e((v, g) => {
2804
- const h = { variant: Ae.Menuitem, commandHook: l, commandState: i, scope: c, disabled: p }, f = [];
2799
+ }, Ps = oe(de((e, r) => {
2800
+ const { popupCommandKeys: n, renderCommandButton: t = Ga, scope: s, commands: a, quickCommand: o, popupScope: l = o, commandState: i, commandHook: c, disabled: f = !1, ...x } = e, y = un(a, n ? [o, ...n] : [o]), b = _e((v, m) => {
2801
+ const h = { variant: Ae.Menuitem, commandHook: c, commandState: i, scope: l, disabled: f }, p = [];
2805
2802
  for (let u = 0; u < n?.length; u++) {
2806
2803
  const w = n[u];
2807
2804
  if (w === null || w === "-") {
2808
- f.push(k(ni, { orientation: "horizontal" }, `element-${f.length}`));
2805
+ p.push(k(ri, { orientation: "horizontal" }, `element-${p.length}`));
2809
2806
  continue;
2810
2807
  }
2811
- const E = g.getCommand(w), T = { key: `${w}-${f.length}`, command: E, ...h }, L = t(T);
2812
- L && f.push(L);
2808
+ const E = m.getCommand(w), T = { key: `${w}-${p.length}`, command: E, ...h }, L = t(T);
2809
+ L && p.push(L);
2813
2810
  }
2814
- return hn({ ...v, children: f });
2815
- }, [p, l, i, c, n, t]);
2816
- return n ? k(Mo, { ref: r, commands: a, disabled: p, commandHook: l, commandState: i, scope: s, quickCommand: o, createPopupPanel: b, ...x }) : t({ ref: r, disabled: p, commandHook: l, commandState: i, scope: s, command: m[0], ...x });
2811
+ return hn({ ...v, children: p });
2812
+ }, [f, c, i, l, n, t]);
2813
+ return n ? k(Mo, { ref: r, commands: a, disabled: f, commandHook: c, commandState: i, scope: s, quickCommand: o, createPopupPanel: b, ...x }) : t({ ref: r, disabled: f, commandHook: c, commandState: i, scope: s, command: y[0], ...x });
2817
2814
  }));
2818
2815
  export {
2819
- Si as $,
2816
+ vs as $,
2820
2817
  Xr as A,
2821
- as as B,
2822
- ss as C,
2823
- ls as D,
2818
+ ss as B,
2819
+ ls as C,
2820
+ cs as D,
2824
2821
  Wt as E,
2825
- ui as F,
2822
+ us as F,
2826
2823
  di as G,
2827
- Lr as H,
2828
- Br as I,
2829
- bs as J,
2830
- dt as K,
2831
- si as L,
2832
- ws as M,
2833
- Di as N,
2824
+ pi as H,
2825
+ Lr as I,
2826
+ Br as J,
2827
+ xs as K,
2828
+ li as L,
2829
+ dt as M,
2830
+ Ci as N,
2834
2831
  Or as O,
2835
2832
  Ss as P,
2836
- ha as Q,
2837
- Ds as R,
2838
- _i as S,
2839
- ds as T,
2840
- Os as U,
2841
- Bi as V,
2842
- ks as W,
2843
- gn as X,
2844
- Kr as Y,
2845
- gs as Z,
2846
- ys as _,
2833
+ Os as Q,
2834
+ ga as R,
2835
+ Ii as S,
2836
+ fs as T,
2837
+ Cs as U,
2838
+ Es as V,
2839
+ $i as W,
2840
+ Ds as X,
2841
+ gn as Y,
2842
+ Gr as Z,
2843
+ bs as _,
2847
2844
  Ot as a,
2848
- hn as a0,
2849
- Vn as a1,
2850
- zt as a2,
2851
- qr as a3,
2852
- Eo as a4,
2853
- Cs as a5,
2854
- Mo as a6,
2855
- Dn as a7,
2856
- Es as a8,
2857
- Ha as a9,
2858
- Ms as aa,
2859
- vs as b,
2845
+ Oi as a0,
2846
+ hn as a1,
2847
+ Vn as a2,
2848
+ zt as a3,
2849
+ qr as a4,
2850
+ Eo as a5,
2851
+ Ms as a6,
2852
+ Mo as a7,
2853
+ Dn as a8,
2854
+ Ts as a9,
2855
+ Ya as aa,
2856
+ Ps as ab,
2857
+ ws as b,
2860
2858
  Oe as c,
2861
2859
  mn as d,
2862
2860
  Zr as e,
2863
- xs as f,
2861
+ ks as f,
2864
2862
  pt as g,
2865
- ki as h,
2866
- _n as i,
2867
- fs as j,
2868
- cs as k,
2869
- us as l,
2870
- vi as m,
2871
- hs as n,
2872
- ps as o,
2873
- ts as p,
2874
- Fr as q,
2875
- ns as r,
2876
- Gr as s,
2863
+ Di as h,
2864
+ Si as i,
2865
+ _n as j,
2866
+ ms as k,
2867
+ ds as l,
2868
+ ps as m,
2869
+ xi as n,
2870
+ hs as o,
2871
+ gs as p,
2872
+ rs as q,
2873
+ Fr as r,
2874
+ Kr as s,
2877
2875
  Jr as t,
2878
- ms as u,
2879
- rs as v,
2880
- ni as w,
2881
- os as x,
2882
- ii as y,
2883
- is as z
2876
+ ys as u,
2877
+ os as v,
2878
+ is as w,
2879
+ ri as x,
2880
+ as as y,
2881
+ ai as z
2884
2882
  };