@sheetxl/studio-mui 0.7.12 → 0.7.13

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.
Files changed (56) hide show
  1. package/browser/cjs/BAcqVi4z0lEWdogG.cjs +6 -0
  2. package/browser/cjs/{CcsfLc43Qp-vN_dY.cjs → BXSBqvJbFd1zmXED.cjs} +3 -3
  3. package/browser/cjs/BXpuqWQiSePSVD7I.cjs +6 -0
  4. package/browser/cjs/BY_Yr3aQW5hLO-nN.cjs +6 -0
  5. package/browser/cjs/BankB3sWgfQSVyEv.cjs +20 -0
  6. package/browser/cjs/{wyak0LMoe5SYbD51.cjs → BkRzKXHu8z2zghTF.cjs} +2 -2
  7. package/browser/cjs/CYeknazLzZOjQtcK.cjs +6 -0
  8. package/browser/cjs/CyLVMzcTgEZPvYOm.cjs +6 -0
  9. package/browser/cjs/DD9bJC3Knid6T5It.cjs +6 -0
  10. package/browser/cjs/{CMEmwUuGpnOyILAu.cjs → SQX0Xb9ngHtVWoYW.cjs} +1 -1
  11. package/browser/cjs/_A_9JrHZzYhVIimw.cjs +7 -0
  12. package/browser/cjs/gmJVh5GO4raegeQH.cjs +6 -0
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/{fsGSNDVe9urk2cLB.mjs → BUX-eSzx85xb14z2.mjs} +2 -2
  15. package/browser/esm/BhK8LG6eLNtnpyM8.mjs +50 -0
  16. package/browser/esm/{B7ChnkonDRA2zazH.mjs → Bt5mafuXg0WhvqQl.mjs} +3 -3
  17. package/browser/esm/CM2aBn9YvLNeeDKP.mjs +26 -0
  18. package/browser/esm/{DK1cCQD1jHxZbFAp.mjs → CWzQRJNunubg1KYs.mjs} +1 -1
  19. package/browser/esm/{CRmCo9Jr1gvSFGVp.mjs → C_L0TMqGy3dfJBxX.mjs} +833 -829
  20. package/browser/esm/{aeHM-2IGRQaGFohd.mjs → D3fJ2Y2akXy1Cea2.mjs} +28 -27
  21. package/browser/esm/DAM5zld1EMvhrTq7.mjs +46 -0
  22. package/browser/esm/DBreu3Q0z7uri1up.mjs +50 -0
  23. package/browser/esm/DYbBkU4jsgMfwHKv.mjs +155 -0
  24. package/browser/esm/DkCrTK-q70GM5ZtY.mjs +53 -0
  25. package/browser/esm/index.mjs +2 -2
  26. package/browser/esm/uswYw8_B9PDchitz.mjs +25 -0
  27. package/licenses/dependencies.txt +142 -142
  28. package/node/esm/{BSTIZiKBGgwjXLtp.mjs → B2g633xDh_bOofUD.mjs} +18 -18
  29. package/node/esm/{CGaHni9C2sipjSMn.mjs → B2kR5d7yN_btwSPu.mjs} +9 -7
  30. package/node/esm/{H012qdl97RHln5MW.mjs → B3fiHsOdyeQ-hH_X.mjs} +1 -1
  31. package/node/esm/{BEFwnAOkyd0CWlex.mjs → BCgE2DMn9_S_eSSk.mjs} +13 -13
  32. package/node/esm/B_WXfCoiTjdjGFTw.mjs +26 -0
  33. package/node/esm/BjHur-Y2v2kC9PV8.mjs +156 -0
  34. package/node/esm/CJHoW3AcW0bzWuGz.mjs +52 -0
  35. package/node/esm/CKgRE7End3PwfjDJ.mjs +25 -0
  36. package/node/esm/{CwKoYwlrp9nnVHln.mjs → EtyY49hdotdAcmRj.mjs} +22 -22
  37. package/node/esm/index.mjs +115 -116
  38. package/node/esm/{Df6HNjgJTgShGC-O.mjs → uQbXUzeyLOqo4POP.mjs} +1 -1
  39. package/package.json +17 -15
  40. package/browser/cjs/BYfcSe1JgcohGr-C.cjs +0 -7
  41. package/browser/cjs/BZPmbh6TWeAN2tiY.cjs +0 -6
  42. package/browser/cjs/CrkutQSHB1Buy5oQ.cjs +0 -6
  43. package/browser/cjs/D2KC31HOMCGQMLvD.cjs +0 -6
  44. package/browser/cjs/DiQXaxwfHcQfkYKX.cjs +0 -6
  45. package/browser/cjs/Dmw2IW35YLNmLgvP.cjs +0 -20
  46. package/browser/cjs/bItCE_-c88dO7Izw.cjs +0 -6
  47. package/browser/cjs/fa-Q2vHsld47aqrE.cjs +0 -6
  48. package/browser/esm/BZPlU0oT2oGTQQgK.mjs +0 -46
  49. package/browser/esm/BzGH26JDt4xKZfM7.mjs +0 -49
  50. package/browser/esm/CA-_Kya2gsMrF9Ef.mjs +0 -26
  51. package/browser/esm/CGBRrUgnGzuP9FGo.mjs +0 -156
  52. package/browser/esm/csScKLYnqrrlL197.mjs +0 -25
  53. package/browser/esm/lm9H6CMj_7o_ra2l.mjs +0 -53
  54. package/node/esm/BqLlyKyVXFNiRaJv.mjs +0 -25
  55. package/node/esm/Cq6TadzONqFlX07d.mjs +0 -26
  56. package/node/esm/D71WQjM6hP5FzBql.mjs +0 -157
@@ -1,17 +1,17 @@
1
- import { Color as ft, IColor as wr, ITheme as Pl, CommonUtils as gt, IBorder as we, IFont as Ht, NumberFormat as mt, IFontCollection as Rl, IStyle as ce, ITextFrame as Ml, Table as _n, IFill as yn, CoordUtils as Nl, ISheet as Ft, LicenseManager as Eo, Workbook as Bn, TypesUtils as Fl } from "@sheetxl/sdk";
2
- import { StyledStrokePath as Ol, StaticBorderRenderer as Un, FontUtils as Bl, useModelListener as We, createCellEditStateFromCell as Al, SheetCellEditor as Il, ScriptEditor as Ll, DefaultTaskPaneRegistry as tn, useTaskPaneArea as Sa, useDocThemes as Gn, TabStrip as zl, SheetElement as Hl, SheetScrollbar as Sr, PictureEditor as Wl, ChartEditor as jl, EmptyFrame as $l, LogoNoPaddingIcon as Vl, TaskPaneArea as _l, TaskPaneProvider as Ul } from "@sheetxl/react";
1
+ import { Color as ft, IColor as wr, ITheme as Pl, CommonUtils as gt, IBorder as we, IFont as Ht, NumberFormat as mt, IFontCollection as Rl, IStyle as ce, ITextFrame as Ml, Table as _n, IFill as yn, CoordUtils as Nl, ISheet as Ft, LicenseManager as Eo, Workbook as On, TypesUtils as Fl } from "@sheetxl/sdk";
2
+ import { StyledStrokePath as Bl, StaticBorderRenderer as Un, FontUtils as Ol, useModelListener as We, createCellEditStateFromCell as Al, SheetCellEditor as Il, ScriptEditor as Ll, DefaultTaskPaneRegistry as tn, useTaskPaneArea as Sa, useDocThemes as Gn, TabStrip as zl, SheetElement as Hl, SheetScrollbar as Sr, PictureEditor as Wl, ChartEditor as jl, EmptyFrame as $l, LogoNoPaddingIcon as Vl, TaskPaneArea as _l, TaskPaneProvider as Ul } from "@sheetxl/react";
3
3
  import { jsxs as H, Fragment as le, jsx as o } from "react/jsx-runtime";
4
- import ae, { memo as q, forwardRef as X, useMemo as W, useCallback as U, isValidElement as qn, useState as _, useEffect as de, Suspense as va, useRef as xe, createElement as ke, useReducer as on, version as Gl, useLayoutEffect as St, useImperativeHandle as ql, useContext as Kl, cloneElement as Xl, Component as Yl } from "react";
5
- import { Box as B, Typography as Pe, IconButton as st, MenuItem as ka, Divider as mo, Button as Jo, SvgIcon as Ca, Input as Kn, FormControlLabel as Rt, Checkbox as Mt, FormControl as Xn, TextField as Ta, InputAdornment as Zl, Slider as Ql, Paper as no, CircularProgress as Jl, Select as es, Tabs as Ea, Tab as Da, useMediaQuery as Pa, Card as ts, CardActions as os, Collapse as ns, DialogTitle as rs, CssBaseline as as } from "@mui/material";
6
- import { CommandButton as N, ExhibitDivider as Q, defaultCreatePopupPanel as ge, CommandPopupButton as Se, InputCommandButton as is, SimpleTooltip as vt, LoadingPanel as Wt, PopupButtonType as ot, ExhibitPopupIconButton as kt, ExhibitPopupMenuItem as Yn, ExhibitMenuItem as ct, createStrokeShadowFilter as vr, strokeShadowFilter as ls, ExhibitTooltip as nt, ExhibitIconButton as bt, CommandTooltip as Zn, SelectedIcon as nn, SimpleCommandPopupButton as tt, LabelIcon as rn, ExhibitMenuHeader as ro, ContextMenu as Ra, ExhibitOptionButton as ss, hexToRGB as kr, useFloatStack as ao, elevateColor as at, CommandToolbar as an, createScrollEdgeButton as cs, createScrollEndButton as ds, createScrollStartButton as ps, scrollbarTheming as us, StackTrace as ms, useResolvedThemeMode as Ma, ThemeMode as An, useModal as hs, useLazyWindow as gs, useOptionsDialog as fs, useInputDialog as bs, AnimatedTraversingEllipsisIcon as xs, ErrorPanel as ys, createExhibitTheme as Cr, ModalProvider as ws } from "@sheetxl/utils-mui";
7
- import { useCommands as Ie, CommandButtonType as re, useCallbackRef as Y, ReactUtils as ln, KeyCodes as me, DynamicIcon as he, useCommand as jt, useMouseDownAndHoldListener as Tr, useEditMode as sn, useNotifier as cn, NotifierType as wt, useImperativeElement as Ct, SplitPane as Qn, RoundedTab as Ss, DefaultDynamicIconService as Jn, SimpleCommand as He, Command as be, KeyModifiers as fe, CommandGroup as er, ToolTipPlacement as ho, ScrollPane as vs, useUndoManager as ks, DefaultReactNotifier as Cs, NotifierProvider as Ts, UncaughtErrorBoundary as Es, ReactErrorBoundary as Ds } from "@sheetxl/utils-react";
8
- import { useTheme as Ke, alpha as ye, getOverlayAlpha as Oe, ThemeProvider as Na } from "@mui/material/styles";
4
+ import ae, { memo as q, forwardRef as X, useMemo as W, useCallback as U, isValidElement as qn, useState as _, useEffect as de, Suspense as va, useRef as be, createElement as ke, useReducer as on, version as Gl, useLayoutEffect as vt, useImperativeHandle as ql, useContext as Kl, cloneElement as Xl, Component as Yl } from "react";
5
+ import { Box as B, Typography as Pe, IconButton as st, MenuItem as ka, Divider as mo, Button as Jo, SvgIcon as Ca, Input as Kn, FormControlLabel as Mt, Checkbox as Nt, FormControl as Xn, TextField as Ta, InputAdornment as Zl, Slider as Ql, Paper as no, CircularProgress as Jl, Select as es, Tabs as Ea, Tab as Da, useMediaQuery as Pa, Card as ts, CardActions as os, Collapse as ns, DialogTitle as rs, CssBaseline as as } from "@mui/material";
6
+ import { CommandButton as M, ExhibitDivider as Q, defaultCreatePopupPanel as he, CommandPopupButton as Se, InputCommandButton as is, SimpleTooltip as kt, LoadingPanel as Wt, PopupButtonType as ot, ExhibitPopupIconButton as Ct, ExhibitPopupMenuItem as Yn, ExhibitMenuItem as ct, createStrokeShadowFilter as vr, strokeShadowFilter as ls, ExhibitTooltip as nt, ExhibitIconButton as bt, CommandTooltip as Zn, SelectedIcon as nn, SimpleCommandPopupButton as tt, LabelIcon as rn, ExhibitMenuHeader as ro, ContextMenu as Ra, ExhibitOptionButton as ss, hexToRGB as kr, useFloatStack as ao, elevateColor as at, CommandToolbar as an, createScrollEdgeButton as cs, createScrollEndButton as ds, createScrollStartButton as ps, scrollbarTheming as us, StackTrace as ms, useResolvedThemeMode as Ma, ThemeMode as An, useModal as hs, useLazyWindow as gs, useOptionsDialog as fs, useInputDialog as bs, AnimatedTraversingEllipsisIcon as xs, ErrorPanel as ys, createExhibitTheme as Cr, ModalProvider as ws } from "@sheetxl/utils-mui";
7
+ import { useCommands as Ie, CommandButtonType as re, useCallbackRef as Y, ReactUtils as ln, KeyCodes as me, DynamicIcon as xe, useCommand as jt, useMouseDownAndHoldListener as Tr, useEditMode as sn, useNotifier as cn, NotifierType as St, useImperativeElement as Tt, SplitPane as Qn, RoundedTab as Ss, DefaultDynamicIconService as Jn, SimpleCommand as He, Command as fe, KeyModifiers as ge, CommandGroup as er, ToolTipPlacement as ho, ScrollPane as vs, useUndoManager as ks, DefaultReactNotifier as Cs, NotifierProvider as Ts, UncaughtErrorBoundary as Es, ReactErrorBoundary as Ds } from "@sheetxl/utils-react";
8
+ import { useTheme as Ke, alpha as ye, getOverlayAlpha as Be, ThemeProvider as Na } from "@mui/material/styles";
9
9
  import { alpha as Qe } from "@mui/system";
10
10
  import Qt, { createPortal as Ps } from "react-dom";
11
11
  import { CommonUtils as to, ChainedError as In, ErrorUtils as Rs, ExpectedError as Ms, PartialError as Ns, UndoManager as Fs } from "@sheetxl/utils";
12
12
  import { IOUtils as Jt } from "@sheetxl/io";
13
13
  /**
14
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.12
14
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.13
15
15
  *
16
16
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
17
17
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -29,7 +29,7 @@ function Te() {
29
29
  for (var n, a, t = 0, e = "", r = arguments.length; t < r; t++) (n = arguments[t]) && (a = Fa(n)) && (e && (e += " "), e += a);
30
30
  return e;
31
31
  }
32
- const Os = q(X((n, a) => {
32
+ const Bs = q(X((n, a) => {
33
33
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), s = W(() => {
34
34
  for (let g = 0; g < i.length; g++) if (i[g]?.state()) return i[g];
35
35
  return i[0];
@@ -38,17 +38,17 @@ const Os = q(X((n, a) => {
38
38
  const g = { ...e };
39
39
  return delete g.beforeExecute, g;
40
40
  }, [e]), x = U((g, m) => {
41
- const u = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, b = H(le, { children: [o(N, { ...u, command: m.getCommand("formatAlignLeftToggle") }), o(N, { ...u, command: m.getCommand("formatAlignCenterToggle") }), o(N, { ...u, command: m.getCommand("formatAlignRightToggle") }), o(N, { ...u, command: m.getCommand("formatAlignJustifyToggle") }), o(Q, { orientation: "horizontal" }), o(N, { ...u, command: m.getCommand("formatAlignCenterContinuousToggle") }), o(N, { ...u, command: m.getCommand("formatAlignFillToggle") }), o(N, { ...u, command: m.getCommand("formatAlignDistributedHorizontalToggle") })] }), y = H(B, { sx: { className: Te("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (h) => h.stopPropagation(), children: [o(N, { command: m.getCommand("formatIndentDecrease"), commandHook: d, scope: r, disabled: l }), o(N, { command: m.getCommand("formatIndentIncrease"), commandHook: d, scope: r, disabled: l })] }), f = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p, children: [y, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: b })] });
42
- return ge({ ...g, children: f });
41
+ const u = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, b = H(le, { children: [o(M, { ...u, command: m.getCommand("formatAlignLeftToggle") }), o(M, { ...u, command: m.getCommand("formatAlignCenterToggle") }), o(M, { ...u, command: m.getCommand("formatAlignRightToggle") }), o(M, { ...u, command: m.getCommand("formatAlignJustifyToggle") }), o(Q, { orientation: "horizontal" }), o(M, { ...u, command: m.getCommand("formatAlignCenterContinuousToggle") }), o(M, { ...u, command: m.getCommand("formatAlignFillToggle") }), o(M, { ...u, command: m.getCommand("formatAlignDistributedHorizontalToggle") })] }), y = H(B, { sx: { className: Te("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (h) => h.stopPropagation(), children: [o(M, { command: m.getCommand("formatIndentDecrease"), commandHook: d, scope: r, disabled: l }), o(M, { command: m.getCommand("formatIndentIncrease"), commandHook: d, scope: r, disabled: l })] }), f = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p, children: [y, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: b })] });
42
+ return he({ ...g, children: f });
43
43
  }, [l, e]);
44
44
  return o(Se, { ref: a, parentFloat: c, commands: t, commandHook: e, scope: r, createPopupPanel: x, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: s?.key(), icon: s?.icon() ?? "FormatAlignLeft", ...p });
45
- })), Bs = q(X((n, a) => {
45
+ })), Os = q(X((n, a) => {
46
46
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), i = W(() => {
47
47
  for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
48
48
  return p[0];
49
49
  }, [p]), s = U((d, x) => {
50
- const g = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("formatAlignTopToggle") }), o(N, { ...g, command: x.getCommand("formatAlignMiddleToggle") }), o(N, { ...g, command: x.getCommand("formatAlignBottomToggle") }), o(Q, { orientation: "horizontal" }), o(N, { ...g, command: x.getCommand("formatAlignJustifyVerticalToggle") }), o(N, { ...g, command: x.getCommand("formatAlignDistributedVerticalToggle") })] });
51
- return ge({ ...d, children: m });
50
+ const g = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("formatAlignTopToggle") }), o(M, { ...g, command: x.getCommand("formatAlignMiddleToggle") }), o(M, { ...g, command: x.getCommand("formatAlignBottomToggle") }), o(Q, { orientation: "horizontal" }), o(M, { ...g, command: x.getCommand("formatAlignJustifyVerticalToggle") }), o(M, { ...g, command: x.getCommand("formatAlignDistributedVerticalToggle") })] });
51
+ return he({ ...d, children: m });
52
52
  }, [l, e]);
53
53
  return o(Se, { ref: a, commands: t, commandHook: e, createPopupPanel: s, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: i?.icon() ?? "TextVerticalBottom", ...c });
54
54
  })), As = q(X((n, a) => {
@@ -56,8 +56,8 @@ const Os = q(X((n, a) => {
56
56
  for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
57
57
  return p[0];
58
58
  }, [p]), s = Y((d, x) => {
59
- const g = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("formatTextOverflowVisibleToggle") }), o(N, { ...g, command: x.getCommand("formatTextOverflowWrapToggle") }), o(N, { ...g, command: x.getCommand("formatTextOverflowClipToggle") }), o(Q, { orientation: "horizontal" }), o(N, { ...g, command: x.getCommand("formatTextOverflowShrinkToggle") })] });
60
- return ge({ ...d, children: m });
59
+ const g = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("formatTextOverflowVisibleToggle") }), o(M, { ...g, command: x.getCommand("formatTextOverflowWrapToggle") }), o(M, { ...g, command: x.getCommand("formatTextOverflowClipToggle") }), o(Q, { orientation: "horizontal" }), o(M, { ...g, command: x.getCommand("formatTextOverflowShrinkToggle") })] });
60
+ return he({ ...d, children: m });
61
61
  }, [l, e, r]);
62
62
  return o(Se, { ref: a, commands: t, commandHook: e, scope: r, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: s, icon: i?.icon() ?? "TextHorizontalOverflow", ...c });
63
63
  })), Is = q(X((n, a) => {
@@ -69,8 +69,8 @@ const Os = q(X((n, a) => {
69
69
  }
70
70
  return p[1];
71
71
  }, [p]), s = U((x, g) => {
72
- const m = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, u = H(le, { children: [o(N, { ...m, command: g.getCommand("formatTextRotate0") }), o(Q, { orientation: "horizontal" }), o(N, { ...m, command: g.getCommand("formatTextRotate315") }), o(N, { ...m, command: g.getCommand("formatTextRotate45") }), o(N, { ...m, command: g.getCommand("formatTextRotate90") }), o(N, { ...m, command: g.getCommand("formatTextRotate270") }), o(Q, { orientation: "horizontal" }), o(is, { ...m, command: g.getCommand("formatTextRotateCustom"), label: "Custom" })] });
73
- return ge({ ...x, children: u });
72
+ const m = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, u = H(le, { children: [o(M, { ...m, command: g.getCommand("formatTextRotate0") }), o(Q, { orientation: "horizontal" }), o(M, { ...m, command: g.getCommand("formatTextRotate315") }), o(M, { ...m, command: g.getCommand("formatTextRotate45") }), o(M, { ...m, command: g.getCommand("formatTextRotate90") }), o(M, { ...m, command: g.getCommand("formatTextRotate270") }), o(Q, { orientation: "horizontal" }), o(is, { ...m, command: g.getCommand("formatTextRotateCustom"), label: "Custom" })] });
73
+ return he({ ...x, children: u });
74
74
  }, [l, e, r, t]), d = W(() => (t.getCommand("formatTextRotateCustom")?.state() ?? 0) !== 0, [p]);
75
75
  return o(Se, { ref: a, commands: t, commandHook: e, scope: r, selected: d, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: s, quickCommand: d ? "formatTextRotate0" : "formatTextRotate315", icon: i?.icon() ?? "TextRotation315", ...c });
76
76
  })), Ls = { Preset: "preset", Custom: "custom" }, Ro = { Start: "start", End: "end" }, wn = {}, zs = (n, a, t, e) => {
@@ -110,7 +110,7 @@ const Os = q(X((n, a) => {
110
110
  }, [l, r]), v = U((S) => {
111
111
  c?.(S ? r : null);
112
112
  }, [c, r]);
113
- return o(vt, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (s ? 1.2 : 1) + "px", height: i * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g, children: H(js, { selectedColor: m, title: null, onSelectColor: w, onPreviewColor: v, alphaCheckSize: s ? 9 : void 0, darkMode: x, ...p, children: [o("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: h.toRGBA(x).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: b ? "1" : "0" } }), o("div", { style: { position: "absolute", width: 0.33 * i * (s ? 1.2 : 1) + "px", height: 0.33 * i * (s ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: h.toRGBA(x).toString(), borderRadius: "50%", opacity: y ? "1" : "0" } })] }) }) });
113
+ return o(kt, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (s ? 1.2 : 1) + "px", height: i * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g, children: H(js, { selectedColor: m, title: null, onSelectColor: w, onPreviewColor: v, alphaCheckSize: s ? 9 : void 0, darkMode: x, ...p, children: [o("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: h.toRGBA(x).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: b ? "1" : "0" } }), o("div", { style: { position: "absolute", width: 0.33 * i * (s ? 1.2 : 1) + "px", height: 0.33 * i * (s ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: h.toRGBA(x).toString(), borderRadius: "50%", opacity: y ? "1" : "0" } })] }) }) });
114
114
  }), Lo = q((n) => {
115
115
  const { title: a, schemeColorLookup: t, colorDefs: e, selectedColor: r, previewColor: l, onSelectColorDef: c, onPreviewColorDef: p, style: i = ln.EmptyCssProperties, compareRGB: s = !1, darkMode: d, swatchProps: x, ...g } = n;
116
116
  let m;
@@ -128,8 +128,8 @@ const Os = q(X((n, a) => {
128
128
  for (let w = 0; w < m.length; w++) {
129
129
  let v = [], S = m[w];
130
130
  for (let D = 0; D < S.length; D++) {
131
- let T = S[D];
132
- v.push(o(tr, { schemeColorLookup: t, colorDef: T, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef: b, swatchProps: x, compareRGB: s, darkMode: d }, w + " " + D));
131
+ let E = S[D];
132
+ v.push(o(tr, { schemeColorLookup: t, colorDef: E, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef: b, swatchProps: x, compareRGB: s, darkMode: d }, w + " " + D));
133
133
  }
134
134
  let C = o(B, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (D) => D.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: v }, "" + w);
135
135
  h.push(C);
@@ -144,12 +144,12 @@ const Os = q(X((n, a) => {
144
144
  r?.set(i, p);
145
145
  const s = p.toRGBA().toString();
146
146
  l?.set(s, p);
147
- }, $s = ae.lazy(() => import("./fsGSNDVe9urk2cLB.mjs")), Vs = q(X((n, a) => {
148
- const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: p = 100, initialPanelType: i, defaultButtonSize: s = 24, width: d, onElementLoad: x, onDone: g, onEyeDropStart: m, onEyeDropStop: u, onPreviewColor: b, onPreviewColorImmediate: y, onSelectColor: f, autoColor: h, autoColorLabel: w = "Automatic", autoColorPosition: v = Ro.Start, compareRGB: S = !1, darkMode: C = !1, ...D } = n, T = e || t, P = Y(b, [b]), R = Y(y, [y]), k = Y(f, [f]), E = Y(m, [m]), M = Y(u, [u]), [I, F] = _(!1), L = Ke(), O = W(() => l || ft.getDefaultSchemeLookup(), [l]), z = W(() => {
147
+ }, $s = ae.lazy(() => import("./BUX-eSzx85xb14z2.mjs")), Vs = q(X((n, a) => {
148
+ const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: p = 100, initialPanelType: i, defaultButtonSize: s = 24, width: d, onElementLoad: x, onDone: g, onEyeDropStart: m, onEyeDropStop: u, onPreviewColor: b, onPreviewColorImmediate: y, onSelectColor: f, autoColor: h, autoColorLabel: w = "Automatic", autoColorPosition: v = Ro.Start, compareRGB: S = !1, darkMode: C = !1, ...D } = n, E = e || t, P = Y(b, [b]), R = Y(y, [y]), k = Y(f, [f]), T = Y(m, [m]), F = Y(u, [u]), [I, O] = _(!1), L = Ke(), N = W(() => l || ft.getDefaultSchemeLookup(), [l]), z = W(() => {
149
149
  const G = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), Re = [];
150
- Le("Primary Background", "bg1", O, Re, G, se), Le("Primary Text", "tx1", O, Re, G, se), Le("Secondary Background", "bg2", O, Re, G, se), Le("Secondary Text", "tx2", O, Re, G, se), Le("Accent 1", "accent1", O, Re, G, se), Le("Accent 2", "accent2", O, Re, G, se), Le("Accent 3", "accent3", O, Re, G, se), Le("Accent 4", "accent4", O, Re, G, se), Le("Accent 5", "accent5", O, Re, G, se), Le("Accent 6", "accent6", O, Re, G, se);
151
- const qe = Pl.buildPalette(Re, O, G, se), Ee = [];
152
- if (Le("Dark Red", "C00000", O, Ee, G, se), Le("Red", "FF0000", O, Ee, G, se), Le("Orange", "FFC000", O, Ee, G, se), Le("Yellow", "FFFF00", O, Ee, G, se), Le("Light Green", "92D050", O, Ee, G, se), Le("Green", "00B050", O, Ee, G, se), Le("Light Blue", "00B0F0", O, Ee, G, se), Le("Blue", "0070C0", O, Ee, G, se), Le("Dark Blue", "002060", O, Ee, G, se), c ? Le("Purple Is A Fruit", "7030A0", O, Ee, G, se) : Le("Transparent", "00000000", O, Ee, G, se), h) {
150
+ Le("Primary Background", "bg1", N, Re, G, se), Le("Primary Text", "tx1", N, Re, G, se), Le("Secondary Background", "bg2", N, Re, G, se), Le("Secondary Text", "tx2", N, Re, G, se), Le("Accent 1", "accent1", N, Re, G, se), Le("Accent 2", "accent2", N, Re, G, se), Le("Accent 3", "accent3", N, Re, G, se), Le("Accent 4", "accent4", N, Re, G, se), Le("Accent 5", "accent5", N, Re, G, se), Le("Accent 6", "accent6", N, Re, G, se);
151
+ const qe = Pl.buildPalette(Re, N, G, se), Ee = [];
152
+ if (Le("Dark Red", "C00000", N, Ee, G, se), Le("Red", "FF0000", N, Ee, G, se), Le("Orange", "FFC000", N, Ee, G, se), Le("Yellow", "FFFF00", N, Ee, G, se), Le("Light Green", "92D050", N, Ee, G, se), Le("Green", "00B050", N, Ee, G, se), Le("Light Blue", "00B0F0", N, Ee, G, se), Le("Blue", "0070C0", N, Ee, G, se), Le("Dark Blue", "002060", N, Ee, G, se), c ? Le("Purple Is A Fruit", "7030A0", N, Ee, G, se) : Le("Transparent", "00000000", N, Ee, G, se), h) {
153
153
  const Me = h.toString();
154
154
  G.set(Me, h);
155
155
  }
@@ -159,7 +159,7 @@ const Os = q(X((n, a) => {
159
159
  rt.set(te, Xe[Me]), dt.push({ description: "Recent " + (Me + 1), definition: { val: Xe[Me].toString() } });
160
160
  }
161
161
  return { primaryColors: Re, modifiedPresets: qe, standardColors: Ee, recentColorsLimited: dt, mapAllPresets: G, mapAllPresetsRGB: se, mapRecent: rt };
162
- }, [O, r, c, h]);
162
+ }, [N, r, c, h]);
163
163
  de(() => {
164
164
  x?.();
165
165
  }, []);
@@ -184,8 +184,8 @@ const Os = q(X((n, a) => {
184
184
  const V = Y((G) => {
185
185
  R && (R(G), j(G));
186
186
  }, [R]), A = Y((G) => {
187
- V(G ? new ft({ val: G.definition.val, adjs: G.definition.adjs }, O) : null);
188
- }, [O]), Z = U((G) => {
187
+ V(G ? new ft({ val: G.definition.val, adjs: G.definition.adjs }, N) : null);
188
+ }, [N]), Z = U((G) => {
189
189
  G.ctrlKey && J(!0);
190
190
  }, []), oe = Y((G) => {
191
191
  let se = !1;
@@ -194,16 +194,16 @@ const Os = q(X((n, a) => {
194
194
  se = !z.mapAllPresets.has(Re);
195
195
  }
196
196
  k?.(G, se);
197
- }, [k, z]), Be = Y((G) => {
198
- const se = G ? new ft({ val: G.definition.val, adjs: G.definition.adjs }, O) : null;
197
+ }, [k, z]), Oe = Y((G) => {
198
+ const se = G ? new ft({ val: G.definition.val, adjs: G.definition.adjs }, N) : null;
199
199
  Promise.resolve(g?.()).then(() => {
200
200
  oe(se);
201
201
  });
202
- }, [O, g]), ve = Y((G) => {
203
- V(G ? new ft(G, O) : null);
204
- }, [O]), Ne = W(() => window.EyeDropper === void 0 ? o(le, {}) : o(st, { "aria-label": "eye dropper", size: "small", sx: { color: (G) => G.palette.text.icon ?? G.palette.action.active }, onClick: async () => {
205
- F(!0), E?.(), await new EyeDropper().open().then((G) => {
206
- F(!1), M?.();
202
+ }, [N, g]), ve = Y((G) => {
203
+ V(G ? new ft(G, N) : null);
204
+ }, [N]), Ne = W(() => window.EyeDropper === void 0 ? o(le, {}) : o(st, { "aria-label": "eye dropper", size: "small", sx: { color: (G) => G.palette.text.icon ?? G.palette.action.active }, onClick: async () => {
205
+ O(!0), T?.(), await new EyeDropper().open().then((G) => {
206
+ O(!1), F?.();
207
207
  let se = new ft(G.sRGBHex), Re = se.toString(), qe = z.mapAllPresets.get(Re);
208
208
  if (qe || (Re = se.toRGBA().toString(), qe = z.mapAllPresetsRGB.get(Re)), !qe) {
209
209
  const Ee = se.toRGBA(), rt = 3;
@@ -215,32 +215,32 @@ const Os = q(X((n, a) => {
215
215
  }
216
216
  J(!qe), V(qe || se);
217
217
  }).catch((G) => {
218
- F(!1), G?.name !== "AbortError" && console.error(G);
218
+ O(!1), G?.name !== "AbortError" && console.error(G);
219
219
  });
220
- }, children: o(he, { iconKey: "Colorize" }) }), [z, C]), _e = W(() => {
220
+ }, children: o(xe, { iconKey: "Colorize" }) }), [z, C]), _e = W(() => {
221
221
  if (!ie) return;
222
222
  const G = { opacity: ie ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
223
- return o(va, { fallback: o("div", { style: G, children: o(Wt, {}) }), children: o($s, { style: G, selectedColor: T ? T.toRGBA().toString() : "transparent", onColorChange: ve, disableAlpha: c }) });
224
- }, [ie, T]), Ve = W(() => ({ onClick: Z, alphaGrey: L.palette.text.icon ?? L.palette.action.active }), [Z, L]), ne = W(() => {
223
+ return o(va, { fallback: o("div", { style: G, children: o(Wt, {}) }), children: o($s, { style: G, selectedColor: E ? E.toRGBA().toString() : "transparent", onColorChange: ve, disableAlpha: c }) });
224
+ }, [ie, E]), Ve = W(() => ({ onClick: Z, alphaGrey: L.palette.text.icon ?? L.palette.action.active }), [Z, L]), ne = W(() => {
225
225
  if (!h) return null;
226
226
  const G = { description: w, definition: { val: h.getVal(), adjs: h.getAdjustments() } };
227
227
  return o(le, { children: H(ka, { sx: { display: "flex", color: (se) => se.palette.text.secondary }, onMouseOver: () => {
228
228
  A(null);
229
229
  }, onClick: () => {
230
- Be(null);
231
- }, children: [o(B, { sx: { flex: "none", boxShadow: (se) => se.shadows[2], borderRadius: (se) => se.spacing(0.5), overflow: "hidden" }, children: o(tr, { schemeColorLookup: O, colorDef: G, selectedColor: t === null ? h : t, previewColor: e === null ? h : e, defaultButtonSize: s, isLarge: !0, darkMode: C, compareRGB: S, swatchProps: Ve }) }), o(Pe, { noWrap: !0, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: w })] }) });
232
- }, [h, w, O, t, e]);
233
- return H(B, { ref: a, sx: { width: d, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...D, children: [H("div", { style: { position: "relative", display: "flex" }, children: [H("div", { style: { opacity: ie ? "0" : 1 }, children: [ne && v === Ro.Start ? H(le, { children: [ne, o(mo, { light: !0, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, o(Lo, { title: "Theme Colors", schemeColorLookup: O, colorDefs: z.primaryColors, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Be, compareRGB: S, darkMode: C }), o(Lo, { schemeColorLookup: O, colorDefs: z.modifiedPresets, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Be, compareRGB: S, darkMode: C }), o(mo, { light: !0, style: { marginBottom: "10px" } }), o(Lo, { title: "Standard Colors", schemeColorLookup: O, colorDefs: z.standardColors, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Be, compareRGB: S, darkMode: C }), H("div", { style: { opacity: z.recentColorsLimited.length === 0 ? "0" : void 0, display: z.recentColorsLimited.length === 0 ? "none" : void 0 }, children: [o(mo, { light: !0, style: { marginBottom: "10px" } }), o(Lo, { title: "Recent Colors", schemeColorLookup: O, colorDefs: z.recentColorsLimited, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Be, compareRGB: S, darkMode: C })] }), ne && v === Ro.End ? H(le, { children: [o(mo, { light: !0, sx: { marginTop: "2px", marginBottom: "2px" } }), ne, o("div", { style: { marginBottom: "2px" } })] }) : null] }), _e] }), o(mo, { light: !0, style: { marginBottom: "10px" } }), H("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [Ne, o("div", { style: { flex: "1 1 100%", background: "pink" } }), o(Jo, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
230
+ Oe(null);
231
+ }, children: [o(B, { sx: { flex: "none", boxShadow: (se) => se.shadows[2], borderRadius: (se) => se.spacing(0.5), overflow: "hidden" }, children: o(tr, { schemeColorLookup: N, colorDef: G, selectedColor: t === null ? h : t, previewColor: e === null ? h : e, defaultButtonSize: s, isLarge: !0, darkMode: C, compareRGB: S, swatchProps: Ve }) }), o(Pe, { noWrap: !0, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: w })] }) });
232
+ }, [h, w, N, t, e]);
233
+ return H(B, { ref: a, sx: { width: d, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...D, children: [H("div", { style: { position: "relative", display: "flex" }, children: [H("div", { style: { opacity: ie ? "0" : 1 }, children: [ne && v === Ro.Start ? H(le, { children: [ne, o(mo, { light: !0, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, o(Lo, { title: "Theme Colors", schemeColorLookup: N, colorDefs: z.primaryColors, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Oe, compareRGB: S, darkMode: C }), o(Lo, { schemeColorLookup: N, colorDefs: z.modifiedPresets, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Oe, compareRGB: S, darkMode: C }), o(mo, { light: !0, style: { marginBottom: "10px" } }), o(Lo, { title: "Standard Colors", schemeColorLookup: N, colorDefs: z.standardColors, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Oe, compareRGB: S, darkMode: C }), H("div", { style: { opacity: z.recentColorsLimited.length === 0 ? "0" : void 0, display: z.recentColorsLimited.length === 0 ? "none" : void 0 }, children: [o(mo, { light: !0, style: { marginBottom: "10px" } }), o(Lo, { title: "Recent Colors", schemeColorLookup: N, colorDefs: z.recentColorsLimited, selectedColor: t, previewColor: e === void 0 ? t : e, swatchProps: Ve, onPreviewColorDef: A, onSelectColorDef: Oe, compareRGB: S, darkMode: C })] }), ne && v === Ro.End ? H(le, { children: [o(mo, { light: !0, sx: { marginTop: "2px", marginBottom: "2px" } }), ne, o("div", { style: { marginBottom: "2px" } })] }) : null] }), _e] }), o(mo, { light: !0, style: { marginBottom: "10px" } }), H("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [Ne, o("div", { style: { flex: "1 1 100%", background: "pink" } }), o(Jo, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
234
234
  pe();
235
235
  }, children: o("div", ie ? { children: "Preset" } : { children: "Custom" }) }), o(Jo, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
236
236
  Promise.resolve(g?.()).then(() => {
237
237
  oe(K);
238
238
  });
239
239
  }, children: "Done" })] })] });
240
- })), _s = o(he, { iconKey: "circle.colored" }), Oa = q(X((n, a) => {
240
+ })), _s = o(xe, { iconKey: "circle.colored" }), Ba = q(X((n, a) => {
241
241
  const { selectedColor: t, quickColor: e, icon: r = _s, tooltip: l, label: c, onPreviewColor: p, onPreviewColorImmediate: i, onSelectColor: s, variant: d = ot.Toolbar, panelProps: x, shouldCloseFloatAll: g = !0, compareRGB: m = !1, darkMode: u = !1, ...b } = n, y = Y(p, [p]), f = Y(i, [i]), h = Y(s, [s]), [w, v] = _(() => {
242
- }), S = e || w || t || x?.autoColor, C = xe(!1), D = U(() => {
243
- }, []), T = Y(() => {
242
+ }), S = e || w || t || x?.autoColor, C = be(!1), D = U(() => {
243
+ }, []), E = Y(() => {
244
244
  v(t);
245
245
  }, [t]), P = Y((z) => {
246
246
  C.current || (v(z), y?.(z));
@@ -248,163 +248,163 @@ const Os = q(X((n, a) => {
248
248
  C.current || (v(z), f?.(z));
249
249
  }, [f]), k = Y((z, ie) => {
250
250
  C.current || (v(void 0), h?.(z, ie));
251
- }, [h]), E = W(() => o(B, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S?.toCSS(u) ?? "transparent"}`, "& .activeColor": { fill: `${S?.toCSS(u) ?? "transparent"}` }, "& .style_grey": { fill: (z) => z.palette.text.icon ?? z.palette.action.active } }, children: typeof r == "function" ? r() : r }), [S, r, u]), M = Y((z) => {
251
+ }, [h]), T = W(() => o(B, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S?.toCSS(u) ?? "transparent"}`, "& .activeColor": { fill: `${S?.toCSS(u) ?? "transparent"}` }, "& .style_grey": { fill: (z) => z.palette.text.icon ?? z.palette.action.active } }, children: typeof r == "function" ? r() : r }), [S, r, u]), F = Y((z) => {
252
252
  h?.(e, !1);
253
- }, [h, e]), [I, F] = _(!1), L = U((z) => {
253
+ }, [h, e]), [I, O] = _(!1), L = U((z) => {
254
254
  const { closeFloat: ie, closeFloatAll: J } = z;
255
255
  return o(Vs, { ...x, selectedColor: t, previewColor: w, onDone: g ? J : ie, onKeyDown: (pe) => {
256
256
  pe.which === me.Enter && (g ? J() : ie());
257
- }, onPreviewColorImmediate: R, onPreviewColor: P, onSelectColor: k, onEyeDropStart: () => F(!0), onEyeDropStop: () => F(!1), compareRGB: m, darkMode: u });
258
- }, [t, w, g, S, x?.autoColor, u]), O = { onQuickClick: e ? M : void 0, createPopupPanel: L, popupProps: { popperProps: { resizeOnOverflow: !1 } }, onPopupOpen: T, onPopupClose: D, tooltip: l || c || "Color", label: c, icon: E, ...b };
259
- return d === ot.Toolbar ? o(kt, { ref: a, ...O }) : o(Yn, { ref: a, ...O });
257
+ }, onPreviewColorImmediate: R, onPreviewColor: P, onSelectColor: k, onEyeDropStart: () => O(!0), onEyeDropStop: () => O(!1), compareRGB: m, darkMode: u });
258
+ }, [t, w, g, S, x?.autoColor, u]), N = { onQuickClick: e ? F : void 0, createPopupPanel: L, popupProps: { popperProps: { resizeOnOverflow: !1 } }, onPopupOpen: E, onPopupClose: D, tooltip: l || c || "Color", label: c, icon: T, ...b };
259
+ return d === ot.Toolbar ? o(Ct, { ref: a, ...N }) : o(Yn, { ref: a, ...N });
260
260
  })), Zo = 82, Er = (n) => {
261
261
  const { styleColor: a, length: t = Zo, width: e = 1, dashArray: r = null, sx: l, isDouble: c = !1, isAngled: p = !1, darkMode: i = !1, ...s } = n;
262
- return o(Ca, { sx: { width: `${t}px`, height: `${e}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (d) => `${a ? a.toRGBA(i).toString() : d.palette.text.icon ?? d.palette.action.active}` }, "& .style_grey": { stroke: (d) => d.palette.text.icon ?? d.palette.action.active }, ...l }, height: e, width: t, viewBox: `0 0 ${t} ${e}`, ...s, children: o(Ol, { length: t, width: e, dashArray: r, isDouble: c, isAngled: p, className: "activeColor" }) });
262
+ return o(Ca, { sx: { width: `${t}px`, height: `${e}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (d) => `${a ? a.toRGBA(i).toString() : d.palette.text.icon ?? d.palette.action.active}` }, "& .style_grey": { stroke: (d) => d.palette.text.icon ?? d.palette.action.active }, ...l }, height: e, width: t, viewBox: `0 0 ${t} ${e}`, ...s, children: o(Bl, { length: t, width: e, dashArray: r, isDouble: c, isAngled: p, className: "activeColor" }) });
263
263
  }, Us = q(X((n, a) => {
264
264
  const { variant: t, showLabels: e = !1, disabled: r = !1, createPopupPanel: l, styleColor: c, selectedStyle: p, onSelectStyle: i, showNone: s = !0, darkMode: d, sx: x, ...g } = n, m = Y(i, []), u = U((h) => {
265
- const { popupContainer: w, floatReference: v, closeFloat: S, ...C } = h, D = [], T = we.BuiltInDefinitionsArray;
266
- for (let P = 0; P < T.length; P++) {
267
- const R = T[P];
265
+ const { popupContainer: w, floatReference: v, closeFloat: S, ...C } = h, D = [], E = we.BuiltInDefinitionsArray;
266
+ for (let P = 0; P < E.length; P++) {
267
+ const R = E[P];
268
268
  if (R.description === "None" && !s) continue;
269
269
  const k = o(Er, { styleColor: c, length: Zo, width: R.width, darkMode: d, dashArray: R.pattern, isDouble: R.description.toLowerCase().includes("double"), isAngled: R.description.toLowerCase().includes("slant") });
270
- let E = null;
271
- E = e ? H(le, { children: [o(B, { sx: { marginRight: "6px" }, children: R.description }), H(B, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [o("div", { style: { flex: "1 1 100%" } }), k] })] }) : R.description === "None" ? "None" : k, D.push(o(ct, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: vr(4) }, paddingLeft: "16px", background: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` }, tooltipProps: { description: e ? "" : R.description }, icon: null, disabled: r, onMouseDown: (M) => M.preventDefault(), onMouseUp: () => {
270
+ let T = null;
271
+ T = e ? H(le, { children: [o(B, { sx: { marginRight: "6px" }, children: R.description }), H(B, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [o("div", { style: { flex: "1 1 100%" } }), k] })] }) : R.description === "None" ? "None" : k, D.push(o(ct, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: vr(4) }, paddingLeft: "16px", background: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, tooltipProps: { description: e ? "" : R.description }, icon: null, disabled: r, onMouseDown: (F) => F.preventDefault(), onMouseUp: () => {
272
272
  S(), m(R.style);
273
- }, onKeyDown: (M) => {
274
- M.which === me.Enter && S();
275
- }, selected: R.style === p, parentFloat: v, children: E }, P));
273
+ }, onKeyDown: (F) => {
274
+ F.which === me.Enter && S();
275
+ }, selected: R.style === p, parentFloat: v, children: T }, P));
276
276
  }
277
277
  return o(B, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: D });
278
278
  }, [r, s, c, p, d]), b = W(() => {
279
279
  const h = we.BuiltInDefinitions.get(p);
280
280
  let w;
281
281
  return w = h.description === "None" ? o(B, { sx: { minWidth: `${Zo}px` }, children: "None" }) : o(Er, { styleColor: c, length: Zo, width: h.width, dashArray: h.pattern, darkMode: d, isDouble: h.description.toLowerCase().includes("double"), isAngled: h.description.toLowerCase().includes("slant") }), o(B, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: vr() } }, children: w });
282
- }, [p, c]), y = W(() => we.BuiltInDefinitions.get(p), [p]), f = { disabled: r, icon: b, tooltip: "Border Style: " + y.description, sx: { background: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, ...x }, createPopupPanel: u, ...g };
283
- return t === ot.Toolbar ? o(kt, { ...f }) : o(Yn, { ...f });
282
+ }, [p, c]), y = W(() => we.BuiltInDefinitions.get(p), [p]), f = { disabled: r, icon: b, tooltip: "Border Style: " + y.description, sx: { background: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...x }, createPopupPanel: u, ...g };
283
+ return t === ot.Toolbar ? o(Ct, { ...f }) : o(Yn, { ...f });
284
284
  })), Gs = q(X((n, a) => {
285
- const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = we.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: p = !0, onSelectBorder: i, onPreviewBorder: s, selectedBorder: d, createTemporaryBorder: x, ...g } = n, m = Y(i, [i]), u = Y(s, [s]), [b, y] = _(), [f, h] = _(), w = b ?? r, v = f ?? t, S = d || { bottom: { style: r, color: t?.toString() } }, C = Y((E) => {
286
- const M = {}, I = E ? Object.keys(E) : [];
287
- let F = !1;
285
+ const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = we.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: p = !0, onSelectBorder: i, onPreviewBorder: s, selectedBorder: d, createTemporaryBorder: x, ...g } = n, m = Y(i, [i]), u = Y(s, [s]), [b, y] = _(), [f, h] = _(), w = b ?? r, v = f ?? t, S = d || { bottom: { style: r, color: t?.toString() } }, C = Y((T) => {
286
+ const F = {}, I = T ? Object.keys(T) : [];
287
+ let O = !1;
288
288
  const L = I.length;
289
289
  for (let ee = 0; ee < L; ee++) {
290
290
  const V = I[ee];
291
- E[V]?.style && (M[V] = { style: E[V].style, color: E[V].color }, F || M[V].style === we.StrokeStyle.None || (F = !0));
291
+ T[V]?.style && (F[V] = { style: T[V].style, color: T[V].color }, O || F[V].style === we.StrokeStyle.None || (O = !0));
292
292
  }
293
- I.length < 6 && (F = !0);
294
- const O = F ? M.left : null, z = F ? M.top : null, ie = F ? M.right : null, J = F ? M.bottom : null, pe = F ? M.vertical : null, j = F ? M.horizontal : null;
293
+ I.length < 6 && (O = !0);
294
+ const N = O ? F.left : null, z = O ? F.top : null, ie = O ? F.right : null, J = O ? F.bottom : null, pe = O ? F.vertical : null, j = O ? F.horizontal : null;
295
295
  let K = "";
296
- return z || O || (K += "M 3,5 H 5 V 3 H 3 "), z || (K += "M 7,5 H 9 V 3 H 7 "), z || pe || (K += "M 11,5 h 2 V 3 h -2 "), z || (K += "M 15,5 h 2 V 3 h -2 "), z || ie || (K += "M 19,5 h 2 V 3 h -2 "), O || (K += "M 3,9 H 5 V 7 H 3 "), pe || (K += "M 11,9 h 2 V 7 h -2 "), ie || (K += "M 19,9 h 2 V 7 h -2 "), j || O || (K += "M 3,13 H 5 V 11 H 3 "), j || (K += "M 7,13 H 9 V 11 H 7 "), j || pe || (K += "M 11,13 h 2 v -2 h -2 "), j || ie || (K += "M 19,13 h 2 v -2 h -2 "), j || (K += "M 15,13 h 2 v -2 h -2 "), O || (K += "M 3,17 H 5 V 15 H 3 "), pe || (K += "M 11,17 h 2 v -2 h -2 "), ie || (K += "M 19,17 h 2 v -2 h -2 "), J || O || (K += "M 3,21 H 5 V 19 H 3 "), J || (K += "M 7,21 H 9 V 19 H 7 "), J || pe || (K += "M 11,21 h 2 v -2 h -2 "), J || (K += "M 15,21 h 2 v -2 h -2 "), J || ie || (K += "M 19,21 h 2 v -2 h -2 "), H(he, { children: [" ", H(B, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [o("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: o("path", { className: "fill", d: K }) }), o(B, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: ls } }, children: o(Un, { getBorderAt: (ee, V) => {
296
+ return z || N || (K += "M 3,5 H 5 V 3 H 3 "), z || (K += "M 7,5 H 9 V 3 H 7 "), z || pe || (K += "M 11,5 h 2 V 3 h -2 "), z || (K += "M 15,5 h 2 V 3 h -2 "), z || ie || (K += "M 19,5 h 2 V 3 h -2 "), N || (K += "M 3,9 H 5 V 7 H 3 "), pe || (K += "M 11,9 h 2 V 7 h -2 "), ie || (K += "M 19,9 h 2 V 7 h -2 "), j || N || (K += "M 3,13 H 5 V 11 H 3 "), j || (K += "M 7,13 H 9 V 11 H 7 "), j || pe || (K += "M 11,13 h 2 v -2 h -2 "), j || ie || (K += "M 19,13 h 2 v -2 h -2 "), j || (K += "M 15,13 h 2 v -2 h -2 "), N || (K += "M 3,17 H 5 V 15 H 3 "), pe || (K += "M 11,17 h 2 v -2 h -2 "), ie || (K += "M 19,17 h 2 v -2 h -2 "), J || N || (K += "M 3,21 H 5 V 19 H 3 "), J || (K += "M 7,21 H 9 V 19 H 7 "), J || pe || (K += "M 11,21 h 2 v -2 h -2 "), J || (K += "M 15,21 h 2 v -2 h -2 "), J || ie || (K += "M 19,21 h 2 v -2 h -2 "), H(xe, { children: [" ", H(B, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [o("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: o("path", { className: "fill", d: K }) }), o(B, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: ls } }, children: o(Un, { getBorderAt: (ee, V) => {
297
297
  if (!x || I.length === 0) return null;
298
298
  const A = ee.rowIndex, Z = ee.colIndex, oe = {};
299
- return A === 0 ? (oe.top = M.top, oe.bottom = M.horizontal) : (oe.top = M.horizontal, oe.bottom = M.bottom), Z === 0 ? (oe.left = M.left, oe.right = M.vertical) : (oe.left = M.vertical, oe.right = M.right), x?.(oe);
299
+ return A === 0 ? (oe.top = F.top, oe.bottom = F.horizontal) : (oe.top = F.horizontal, oe.bottom = F.bottom), Z === 0 ? (oe.left = F.left, oe.right = F.vertical) : (oe.left = F.vertical, oe.right = F.right), x?.(oe);
300
300
  }, darkMode: c, style: { top: "2px", left: "2px", width: "calc(100% - 5px)", height: "calc(100% - 5px)", position: "absolute" } }) })] })] });
301
- }, [v, w, c]), D = U((E, M, I) => {
302
- let F = null;
303
- if (E && E.length > 0) {
301
+ }, [v, w, c]), D = U((T, F, I) => {
302
+ let O = null;
303
+ if (T && T.length > 0) {
304
304
  let L = null;
305
- (M || I) && (L = { style: I, color: M?.toString() ?? null }), F = {};
306
- const O = E.length;
307
- for (let z = 0; z < O; z++) F[E[z]] = L;
305
+ (F || I) && (L = { style: I, color: F?.toString() ?? null }), O = {};
306
+ const N = T.length;
307
+ for (let z = 0; z < N; z++) O[T[z]] = L;
308
308
  }
309
- return F;
310
- }, []), T = U((E) => {
311
- m?.(E);
312
- }, []), P = U((E) => {
313
- u?.(E);
314
- }, []), R = U((E) => {
315
- const { closeFloatAll: M, floatReference: I } = E, F = (z, ie, J = "bottom", pe = !1) => {
309
+ return O;
310
+ }, []), E = U((T) => {
311
+ m?.(T);
312
+ }, []), P = U((T) => {
313
+ u?.(T);
314
+ }, []), R = U((T) => {
315
+ const { closeFloatAll: F, floatReference: I } = T, O = (z, ie, J = "bottom", pe = !1) => {
316
316
  const j = D(z, v ?? null, pe ? we.StrokeStyle.None : w ?? null), K = pe ? D([], v ?? null, w ?? null) : j;
317
- return o(bt, { icon: C(K), sx: { background: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` }, tooltipProps: { label: ie, simple: !0, placement: J }, onClick: () => {
318
- M(), P(j), T(j);
317
+ return o(bt, { icon: C(K), sx: { background: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, tooltipProps: { label: ie, simple: !0, placement: J }, onClick: () => {
318
+ F(), P(j), E(j);
319
319
  } });
320
- }, L = H(le, { children: [H(B, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom, we.Edge.Horizontal, we.Edge.Vertical], "All Borders", "top"), F([we.Edge.Horizontal, we.Edge.Vertical], "Inner Borders", "top"), F([we.Edge.Horizontal], "Inside Horizontal Borders", "top"), F([we.Edge.Vertical], "Inside Vertical Borders", "top"), F([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom], "Outside Borders", "top")] }), H(B, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([we.Edge.Left], "Left Borders"), F([we.Edge.Top], "Top Borders"), F([we.Edge.Right], "Right Borders"), F([we.Edge.Bottom], "Bottom Borders"), F([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom, we.Edge.Horizontal, we.Edge.Vertical, we.Edge.DiagonalUp, we.Edge.DiagonalDown], "No Borders", "bottom", !0)] })] }), O = o(le, { children: H(B, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [o(Oa, { variant: ot.Toolbar, icon: o(he, { iconKey: "stroke.colored" }), selectedColor: w === we.StrokeStyle.None ? new ft("transparent") : v, onPreviewColor: (z) => {
320
+ }, L = H(le, { children: [H(B, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [O([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom, we.Edge.Horizontal, we.Edge.Vertical], "All Borders", "top"), O([we.Edge.Horizontal, we.Edge.Vertical], "Inner Borders", "top"), O([we.Edge.Horizontal], "Inside Horizontal Borders", "top"), O([we.Edge.Vertical], "Inside Vertical Borders", "top"), O([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom], "Outside Borders", "top")] }), H(B, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [O([we.Edge.Left], "Left Borders"), O([we.Edge.Top], "Top Borders"), O([we.Edge.Right], "Right Borders"), O([we.Edge.Bottom], "Bottom Borders"), O([we.Edge.Left, we.Edge.Top, we.Edge.Right, we.Edge.Bottom, we.Edge.Horizontal, we.Edge.Vertical, we.Edge.DiagonalUp, we.Edge.DiagonalDown], "No Borders", "bottom", !0)] })] }), N = o(le, { children: H(B, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [o(Ba, { variant: ot.Toolbar, icon: o(xe, { iconKey: "stroke.colored" }), selectedColor: w === we.StrokeStyle.None ? new ft("transparent") : v, onPreviewColor: (z) => {
321
321
  h(z);
322
322
  }, onSelectColor: (z, ie) => {
323
323
  h(z);
324
324
  }, darkMode: c, tooltip: "Border Color", panelProps: { disableAlpha: !0, autoColor: t, schemeLookup: e }, disabled: l || w === we.StrokeStyle.None, parentFloat: I, shouldCloseFloatAll: !1 }), o(Us, { selectedStyle: w, onSelectStyle: y, styleColor: v, darkMode: c, variant: ot.Toolbar, parentFloat: I })] }) });
325
- return H(B, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (z) => z.stopPropagation(), children: [p ? O : L, o(Q, { orientation: "horizontal" }), p ? L : O] });
325
+ return H(B, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (z) => z.stopPropagation(), children: [p ? N : L, o(Q, { orientation: "horizontal" }), p ? L : N] });
326
326
  }, [w, v, t, e, c]), k = W(() => C(S), [S, c]);
327
- return o(kt, { ref: a, createPopupPanel: R, popupProps: { popperProps: { resizeOnOverflow: !1 } }, createTooltip: ({ children: E }, M) => o(nt, { label: "Borders", description: "Set the borders.", disabled: M, children: E }), onQuickClick: () => {
327
+ return o(Ct, { ref: a, createPopupPanel: R, popupProps: { popperProps: { resizeOnOverflow: !1 } }, createTooltip: ({ children: T }, F) => o(nt, { label: "Borders", description: "Set the borders.", disabled: F, children: T }), onQuickClick: () => {
328
328
  m?.(S);
329
329
  }, quickButtonProps: { sx: {} }, disabled: l, icon: k, ...g });
330
330
  })), qs = q(X((n, a) => {
331
- const { commands: t, command: e, commandHook: r, variant: l = re.Toolbar, disabled: c = !1, autoColor: p, autoStrokeStyle: i, schemeLookup: s, createTemporaryBorder: d, selectedBorder: x, onSelectBorder: g, darkMode: m, icon: u, label: b, ...y } = n, f = Ie(t, ["formatBorder"]), h = e ?? f[0], w = h?.context() ?? null, v = w?.autoColor ?? p, S = w?.autoStyle ?? i, C = x ?? w?.quickBorder, D = m ?? w?.darkMode, T = d ?? w?.createTemporaryBorder, P = s ?? w?.schemeLookup, R = Y((E) => {
332
- w?.onBorderSelect && w.onBorderSelect(E), g?.(E), h?.execute(E, r);
333
- }, [h, g, r]), k = U((E, M) => {
334
- const { children: I, title: F, ...L } = E;
335
- let O = E.children;
336
- return (h?.disabled() || c) && (O = o("div", { children: O })), o(Zn, { command: h, placement: l === re.Toolbar ? "bottom-start" : "right-start", disabled: M, ...L, children: O });
331
+ const { commands: t, command: e, commandHook: r, variant: l = re.Toolbar, disabled: c = !1, autoColor: p, autoStrokeStyle: i, schemeLookup: s, createTemporaryBorder: d, selectedBorder: x, onSelectBorder: g, darkMode: m, icon: u, label: b, ...y } = n, f = Ie(t, ["formatBorder"]), h = e ?? f[0], w = h?.context() ?? null, v = w?.autoColor ?? p, S = w?.autoStyle ?? i, C = x ?? w?.quickBorder, D = m ?? w?.darkMode, E = d ?? w?.createTemporaryBorder, P = s ?? w?.schemeLookup, R = Y((T) => {
332
+ w?.onBorderSelect && w.onBorderSelect(T), g?.(T), h?.execute(T, r);
333
+ }, [h, g, r]), k = U((T, F) => {
334
+ const { children: I, title: O, ...L } = T;
335
+ let N = T.children;
336
+ return (h?.disabled() || c) && (N = o("div", { children: N })), o(Zn, { command: h, placement: l === re.Toolbar ? "bottom-start" : "right-start", disabled: F, ...L, children: N });
337
337
  }, [h, c]);
338
- return o(Gs, { ref: a, autoColor: v, darkMode: D, autoStrokeStyle: S, createTemporaryBorder: T, schemeLookup: P, selectedBorder: C, onSelectBorder: R, createTooltip: k, disabled: c || !h || h.disabled(), ...y });
338
+ return o(Gs, { ref: a, autoColor: v, darkMode: D, autoStrokeStyle: S, createTemporaryBorder: E, schemeLookup: P, selectedBorder: C, onSelectBorder: R, createTooltip: k, disabled: c || !h || h.disabled(), ...y });
339
339
  })), Ks = q(X((n, a) => {
340
340
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
341
- const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(N, { ...d, command: s.getCommand("mergeToggle") }), o(N, { ...d, command: s.getCommand("mergeHorizontal") }), o(N, { ...d, command: s.getCommand("mergeVertical") }), o(Q, { orientation: "horizontal" }), o(N, { ...d, command: s.getCommand("unmerge") })] });
342
- return ge({ ...i, children: x });
341
+ const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(M, { ...d, command: s.getCommand("mergeToggle") }), o(M, { ...d, command: s.getCommand("mergeHorizontal") }), o(M, { ...d, command: s.getCommand("mergeVertical") }), o(Q, { orientation: "horizontal" }), o(M, { ...d, command: s.getCommand("unmerge") })] });
342
+ return he({ ...i, children: x });
343
343
  }, [l, e, r]);
344
344
  return o(Se, { ref: a, commands: t, quickCommand: "mergeToggle", commandHook: e, scope: r, tooltip: "Combine or split cells.", createPopupPanel: p, icon: "MergeAll", ...c });
345
345
  })), Xs = q(X((n, a) => {
346
346
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
347
- const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(N, { ...d, command: s.getCommand("freezeToggle") }), o(N, { ...d, command: s.getCommand("freezeToggleHorizontal") }), o(N, { ...d, command: s.getCommand("freezeToggleVertical") }), o(Q, { orientation: "horizontal" }), o(N, { ...d, command: s.getCommand("unfreeze") })] });
348
- return ge({ ...i, children: x });
347
+ const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(M, { ...d, command: s.getCommand("freezeToggle") }), o(M, { ...d, command: s.getCommand("freezeToggleHorizontal") }), o(M, { ...d, command: s.getCommand("freezeToggleVertical") }), o(Q, { orientation: "horizontal" }), o(M, { ...d, command: s.getCommand("unfreeze") })] });
348
+ return he({ ...i, children: x });
349
349
  }, [l, e, r]);
350
350
  return o(Se, { ref: a, commands: t, commandHook: e, createPopupPanel: p, quickCommand: "freezeToggle", label: "Freeze Panes", tooltip: "Freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet.\\n\\nUseful for viewing data in other parts of your worksheet without losing your headers or labels.", icon: "Freeze", ...c });
351
351
  })), Ys = q(X((n, a) => {
352
352
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
353
- const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(N, { ...d, command: s.getCommand("find") }), o(N, { ...d, command: s.getCommand("findReplace") }), o(N, { ...d, command: s.getCommand("goto") })] });
354
- return ge({ ...i, children: x });
353
+ const d = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(M, { ...d, command: s.getCommand("find") }), o(M, { ...d, command: s.getCommand("findReplace") }), o(M, { ...d, command: s.getCommand("goto") })] });
354
+ return he({ ...i, children: x });
355
355
  }, [l, e, r]);
356
356
  return o(Se, { ref: a, commands: t, commandHook: e, createPopupPanel: p, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...c });
357
357
  })), Zs = q(X((n, a) => {
358
- const { command: t, commandHook: e, showQuickButtons: r = !!n.commands, commands: l, fontSizes: c = Bl.DefaultFontSizes, disabled: p = !1, parentFloat: i, icon: s, label: d, sx: x, ...g } = n;
358
+ const { command: t, commandHook: e, showQuickButtons: r = !!n.commands, commands: l, fontSizes: c = Ol.DefaultFontSizes, disabled: p = !1, parentFloat: i, icon: s, label: d, sx: x, ...g } = n;
359
359
  jt(t);
360
360
  const m = () => t?.state()?.toString() || "11", [u, b] = _(m), y = Y(() => {
361
- const T = parseFloat(u);
362
- isNaN(T) ? b(m()) : parseFloat(m()) !== T && t.execute(T, e);
361
+ const E = parseFloat(u);
362
+ isNaN(E) ? b(m()) : parseFloat(m()) !== E && t.execute(E, e);
363
363
  }, [m, t, u, e]);
364
364
  de(() => {
365
365
  b(m());
366
366
  }, [t?.state()]);
367
367
  const f = W(() => {
368
368
  if (!e) return null;
369
- const T = { ...e };
370
- return delete T.beforeExecute, T;
371
- }, [e]), h = Ie(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w = W(() => h ? H(B, { className: Te("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (T) => T.stopPropagation(), children: [o(N, { command: h[0], commandHook: f }), o(N, { command: h[1], commandHook: f })] }) : null, [h]), v = Ke(), S = W(() => `${Ht.getSharedMeasurer()("12.3", Math.round(v.typography.fontSize), v.typography.fontFamily).width}px`, [v]), C = U((T) => {
372
- const { onMouseDown: P, onMouseUp: R, ...k } = T;
373
- return o(st, { component: "div", ...k, disableRipple: !0, children: o(Kn, { inputMode: "numeric", disabled: p || !t || t.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (E) => `1px solid ${E.palette.text.icon ?? E.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (E) => `1px solid ${E.palette.error.main}` }, "::after": { borderBottom: (E) => `1px solid ${E.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (E) => `${Math.round(E.typography.fontSize)}px`, width: S, color: (E) => E.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (E) => E.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (E) => E.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: u, onFocus: (E) => {
374
- E.target?.select();
375
- }, onKeyDown: (E) => {
376
- if (E.which === me.Enter) m() !== u && (E.stopPropagation(), E.preventDefault(), y());
377
- else if (E.which === me.Escape) m() !== u && (b(m()), setTimeout(() => {
378
- E.target?.select();
379
- }, 0), E.stopPropagation(), E.preventDefault());
369
+ const E = { ...e };
370
+ return delete E.beforeExecute, E;
371
+ }, [e]), h = Ie(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w = W(() => h ? H(B, { className: Te("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (E) => E.stopPropagation(), children: [o(M, { command: h[0], commandHook: f }), o(M, { command: h[1], commandHook: f })] }) : null, [h]), v = Ke(), S = W(() => `${Ht.getSharedMeasurer()("12.3", Math.round(v.typography.fontSize), v.typography.fontFamily).width}px`, [v]), C = U((E) => {
372
+ const { onMouseDown: P, onMouseUp: R, ...k } = E;
373
+ return o(st, { component: "div", ...k, disableRipple: !0, children: o(Kn, { inputMode: "numeric", disabled: p || !t || t.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (T) => `1px solid ${T.palette.text.icon ?? T.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (T) => `1px solid ${T.palette.error.main}` }, "::after": { borderBottom: (T) => `1px solid ${T.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (T) => `${Math.round(T.typography.fontSize)}px`, width: S, color: (T) => T.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (T) => T.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (T) => T.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: u, onFocus: (T) => {
374
+ T.target?.select();
375
+ }, onKeyDown: (T) => {
376
+ if (T.which === me.Enter) m() !== u && (T.stopPropagation(), T.preventDefault(), y());
377
+ else if (T.which === me.Escape) m() !== u && (b(m()), setTimeout(() => {
378
+ T.target?.select();
379
+ }, 0), T.stopPropagation(), T.preventDefault());
380
380
  else {
381
- if (E.key.match("[-]") || E.key.match("[0-9.]") && (u + E.key).length > 4) return E.stopPropagation(), void E.preventDefault();
382
- if (E.which === me.Space) return void E.preventDefault();
381
+ if (T.key.match("[-]") || T.key.match("[0-9.]") && (u + T.key).length > 4) return T.stopPropagation(), void T.preventDefault();
382
+ if (T.which === me.Space) return void T.preventDefault();
383
383
  }
384
384
  }, onBlur: () => {
385
385
  y();
386
- }, onChange: (E) => {
387
- if (E.target.value.length > 4) return E.stopPropagation(), void E.preventDefault();
388
- b(E.target.value);
386
+ }, onChange: (T) => {
387
+ if (T.target.value.length > 4) return T.stopPropagation(), void T.preventDefault();
388
+ b(T.target.value);
389
389
  } }) });
390
- }, [u, p, t]), D = U((T) => {
391
- const P = (M) => {
392
- t?.execute(M, e);
390
+ }, [u, p, t]), D = U((E) => {
391
+ const P = (F) => {
392
+ t?.execute(F, e);
393
393
  }, R = t?.state(), k = [];
394
- for (let M = 0; M < c.length; M++) {
395
- const I = c[M] === R;
396
- k.push(o(ct, { selected: I, icon: I ? o(nn, {}) : void 0, disabled: p || !t || t.disabled(), onMouseDown: (F) => {
397
- F.button === 0 && F.preventDefault();
398
- }, onMouseUp: (F) => {
399
- F.button === 0 && P(c[M]);
400
- }, onKeyDown: (F) => {
401
- F.keyCode !== me.Enter && F.keyCode !== me.Space || P(c[M]);
402
- }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: o(B, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: c[M] }) }, "fontSize-" + M));
394
+ for (let F = 0; F < c.length; F++) {
395
+ const I = c[F] === R;
396
+ k.push(o(ct, { selected: I, icon: I ? o(nn, {}) : void 0, disabled: p || !t || t.disabled(), onMouseDown: (O) => {
397
+ O.button === 0 && O.preventDefault();
398
+ }, onMouseUp: (O) => {
399
+ O.button === 0 && P(c[F]);
400
+ }, onKeyDown: (O) => {
401
+ O.keyCode !== me.Enter && O.keyCode !== me.Space || P(c[F]);
402
+ }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: o(B, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: c[F] }) }, "fontSize-" + F));
403
403
  }
404
- const E = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g, children: [w, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: k })] });
405
- return ge({ ...T, children: E });
404
+ const T = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g, children: [w, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: k })] });
405
+ return he({ ...E, children: T });
406
406
  }, [p, t?.state(), e]);
407
- return o(kt, { ref: a, sx: { ...x }, tabIndex: -1, outlined: !0, disabled: p, parentFloat: i, createPopupPanel: D, createTooltip: ({ children: T }, P) => o(nt, { label: t?.label(), description: t?.description(), disabled: P || t?.disabled(), children: T }), createQuickButton: C, ...g });
407
+ return o(Ct, { ref: a, sx: { ...x }, tabIndex: -1, outlined: !0, disabled: p, parentFloat: i, createPopupPanel: D, createTooltip: ({ children: E }, P) => o(nt, { label: t?.label(), description: t?.description(), disabled: P || t?.disabled(), children: E }), createQuickButton: C, ...g });
408
408
  })), Dr = q((n) => {
409
409
  const { selected: a, disabled: t, formattedValue: e, handleSetFormat: r, format: l, sx: c, ...p } = n;
410
410
  return o(ct, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...c }, disabled: t, selected: a, icon: a ? o(nn, {}) : void 0, onMouseDown: (i) => {
@@ -427,32 +427,32 @@ const Os = q(X((n, a) => {
427
427
  let k = "";
428
428
  if (h && !h.isEmpty()) try {
429
429
  k = h.getNumberFormat(w[R].numberFormat).displayText;
430
- } catch (M) {
431
- console.warn(M);
430
+ } catch (F) {
431
+ console.warn(F);
432
432
  }
433
433
  k === "" && w[R].formatType === mt.Type.General && (k = "No specific format");
434
- const E = w[R].formatType === d;
435
- v.push(o(Dr, { selected: E, disabled: c || !s || s.disabled(), formattedValue: k, handleSetFormat: f, format: w[R] }, w[R].formatType));
434
+ const T = w[R].formatType === d;
435
+ v.push(o(Dr, { selected: T, disabled: c || !s || s.disabled(), formattedValue: k, handleSetFormat: f, format: w[R] }, w[R].formatType));
436
436
  }
437
437
  const S = { numberFormat: "", formatType: mt.Type.Custom }, C = d === mt.Type.Custom, D = o(Dr, { selected: C, disabled: c || !s || s.disabled(), formattedValue: C ? h.getNumberFormat().displayText : "", handleSetFormat: () => {
438
438
  e?.beforeExecute?.(s, s?.state()), y.getCommand("formatNumberDialog")?.execute(s?.state()), e?.onExecute?.(s, s?.state());
439
- }, format: S, sx: { flex: "0", width: "100%" } }, mt.Type.Custom), T = H(B, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (R) => R.stopPropagation(), children: [o(N, { command: y.getCommand("formatNumberFormatAccountingStyle"), commandHook: x, scope: r }), o(N, { command: y.getCommand("formatNumberFormatPercentStyle"), commandHook: x, scope: r }), o(N, { command: y.getCommand("formatNumberFormatCommaStyle"), commandHook: x, scope: r }), o(N, { command: y.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: x, scope: r }), o(N, { command: y.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: x, scope: r })] }), P = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i, children: [T, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: v }), o(Q, { orientation: "horizontal" }), D] });
440
- return ge({ ...b, children: P });
439
+ }, format: S, sx: { flex: "0", width: "100%" } }, mt.Type.Custom), E = H(B, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (R) => R.stopPropagation(), children: [o(M, { command: y.getCommand("formatNumberFormatAccountingStyle"), commandHook: x, scope: r }), o(M, { command: y.getCommand("formatNumberFormatPercentStyle"), commandHook: x, scope: r }), o(M, { command: y.getCommand("formatNumberFormatCommaStyle"), commandHook: x, scope: r }), o(M, { command: y.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: x, scope: r }), o(M, { command: y.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: x, scope: r })] }), P = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i, children: [E, o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: v }), o(Q, { orientation: "horizontal" }), D] });
440
+ return he({ ...b, children: P });
441
441
  }, [s?.context(), s?.state(), e, r]), m = Ke(), u = W(() => {
442
442
  const b = mt.Type.MediumTime;
443
443
  return `${Ht.getSharedMeasurer()(b, Math.round(m.typography.fontSize), m.typography.fontFamily).width}px`;
444
444
  }, [m]);
445
445
  return o(Se, { ref: a, commands: t, sx: l, outlined: !0, disabled: c, parentFloat: p, createPopupPanel: g, createTooltip: ({ children: b }, y) => o(nt, { label: s?.label(), description: s?.description(), disabled: y, children: b }), icon: o(B, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (b) => `${Math.round(b.typography.fontSize)}px`, color: (b) => b.palette.text.secondary, fontFamily: (b) => b.typography.fontFamily, width: u }, children: o(B, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: d }) }), ...i });
446
- })), Ba = q(X((n, a) => {
446
+ })), Oa = q(X((n, a) => {
447
447
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
448
- const d = { variant: re.Menuitem, commandHook: e, scope: "clear", disabled: l }, x = H(le, { children: [o(N, { ...d, command: s.getCommand("clearAll") }), o(N, { ...d, command: s.getCommand("clearFormats") }), o(N, { ...d, command: s.getCommand("clearContents") }), o(N, { ...d, command: s.getCommand("clearComments") }), o(N, { ...d, command: s.getCommand("clearHyperlinks") })] });
449
- return ge({ ...i, children: x });
448
+ const d = { variant: re.Menuitem, commandHook: e, scope: "clear", disabled: l }, x = H(le, { children: [o(M, { ...d, command: s.getCommand("clearAll") }), o(M, { ...d, command: s.getCommand("clearFormats") }), o(M, { ...d, command: s.getCommand("clearContents") }), o(M, { ...d, command: s.getCommand("clearComments") }), o(M, { ...d, command: s.getCommand("clearHyperlinks") })] });
449
+ return he({ ...i, children: x });
450
450
  }, [l, e, r]);
451
451
  return o(Se, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: p, icon: "ClearAll", ...c });
452
452
  })), Js = q(X((n, a) => {
453
453
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
454
- const d = { variant: re.Menuitem, commandHook: e, scope: "fill", disabled: l }, x = H(le, { children: [o(N, { ...d, command: s.getCommand("fillDown") }), o(N, { ...d, command: s.getCommand("fillRight") }), o(N, { ...d, command: s.getCommand("fillUp") }), o(N, { ...d, command: s.getCommand("fillLeft") })] });
455
- return ge({ ...i, children: x });
454
+ const d = { variant: re.Menuitem, commandHook: e, scope: "fill", disabled: l }, x = H(le, { children: [o(M, { ...d, command: s.getCommand("fillDown") }), o(M, { ...d, command: s.getCommand("fillRight") }), o(M, { ...d, command: s.getCommand("fillUp") }), o(M, { ...d, command: s.getCommand("fillLeft") })] });
455
+ return he({ ...i, children: x });
456
456
  }, [l, e, r]);
457
457
  return o(Se, { ref: a, commands: t, disabled: l, commandHook: e, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: p, icon: "FillDown", ...c });
458
458
  })), Aa = q(X((n, a) => {
@@ -463,11 +463,11 @@ const Os = q(X((n, a) => {
463
463
  }, [x]), u = U((b, y) => {
464
464
  let f = null;
465
465
  const h = { variant: re.Menuitem, commandHook: e, scope: "insertCells", disabled: l };
466
- c || (f = H(le, { children: [o(Q, { orientation: "horizontal" }), o(N, { ...h, command: y.getCommand("addSheet") })] }));
467
- const w = H(le, { children: [o(N, { ...h, command: x[0] }), o(N, { ...h, command: x[1] }), o(Q, { orientation: "horizontal" }), o(N, { ...h, command: x[2] }), o(N, { ...h, command: x[3] }), f] });
468
- return ge({ ...b, children: w });
466
+ c || (f = H(le, { children: [o(Q, { orientation: "horizontal" }), o(M, { ...h, command: y.getCommand("addSheet") })] }));
467
+ const w = H(le, { children: [o(M, { ...h, command: x[0] }), o(M, { ...h, command: x[1] }), o(Q, { orientation: "horizontal" }), o(M, { ...h, command: x[2] }), o(M, { ...h, command: x[3] }), f] });
468
+ return he({ ...b, children: w });
469
469
  }, [l, x, e, r]);
470
- return g ? o(N, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(Se, { ref: a, variant: s, quickCommand: "insertCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Insert new cells, rows or columns to your workbook." }), o("br", {}), o("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: u, ...d });
470
+ return g ? o(M, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(Se, { ref: a, variant: s, quickCommand: "insertCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Insert new cells, rows or columns to your workbook." }), o("br", {}), o("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: u, ...d });
471
471
  })), Ia = q(X((n, a) => {
472
472
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: p = !0, showQuickButton: i = !0, variant: s = re.Toolbar, ...d } = n, x = Ie(t, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: g, allDisabled: m } = W(() => {
473
473
  let b = null, y = 0;
@@ -476,15 +476,15 @@ const Os = q(X((n, a) => {
476
476
  }, [x]), u = U((b, y) => {
477
477
  const f = { variant: re.Menuitem, commandHook: e, scope: "deleteCells", disabled: l };
478
478
  let h = null;
479
- c || (h = H(le, { children: [o(Q, { orientation: "horizontal" }), o(N, { ...f, command: y.getCommand("deleteSheet") })] }));
480
- const w = H(le, { children: [o(N, { ...f, command: y.getCommand("deleteCellsShiftUp") }), o(N, { ...f, command: y.getCommand("deleteCellsShiftLeft") }), o(Q, { orientation: "horizontal" }), o(N, { ...f, command: y.getCommand("deleteRows") }), o(N, { ...f, command: y.getCommand("deleteColumns") }), h] });
481
- return ge({ ...b, children: w });
479
+ c || (h = H(le, { children: [o(Q, { orientation: "horizontal" }), o(M, { ...f, command: y.getCommand("deleteSheet") })] }));
480
+ const w = H(le, { children: [o(M, { ...f, command: y.getCommand("deleteCellsShiftUp") }), o(M, { ...f, command: y.getCommand("deleteCellsShiftLeft") }), o(Q, { orientation: "horizontal" }), o(M, { ...f, command: y.getCommand("deleteRows") }), o(M, { ...f, command: y.getCommand("deleteColumns") }), h] });
481
+ return he({ ...b, children: w });
482
482
  }, [l, e, r]);
483
- return g ? o(N, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(Se, { ref: a, variant: s, quickCommand: "deleteCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), o("br", {}), o("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: u, ...d });
483
+ return g ? o(M, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(Se, { ref: a, variant: s, quickCommand: "deleteCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), o("br", {}), o("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: u, ...d });
484
484
  })), La = q(X((n, a) => {
485
485
  const { commands: t, commandHook: e, scope: r, ...l } = n, c = U((p, i) => {
486
- const s = { variant: re.Menuitem, commandHook: e, scope: "formatCells" }, d = { commands: i, parentFloat: p.floatReference, ...s }, x = H(le, { children: [o(N, { ...s, command: i.getCommand("resizeRows") }), o(N, { ...s, command: i.getCommand("autoFitRows") }), o(Q, { orientation: "horizontal" }), o(N, { ...s, command: i.getCommand("resizeColumns") }), o(N, { ...s, command: i.getCommand("autoFitColumns") }), o(Q, { orientation: "horizontal" }), o(tt, { ref: a, ...d, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
487
- return ge({ ...p, children: x });
486
+ const s = { variant: re.Menuitem, commandHook: e, scope: "formatCells" }, d = { commands: i, parentFloat: p.floatReference, ...s }, x = H(le, { children: [o(M, { ...s, command: i.getCommand("resizeRows") }), o(M, { ...s, command: i.getCommand("autoFitRows") }), o(Q, { orientation: "horizontal" }), o(M, { ...s, command: i.getCommand("resizeColumns") }), o(M, { ...s, command: i.getCommand("autoFitColumns") }), o(Q, { orientation: "horizontal" }), o(tt, { ref: a, ...d, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
487
+ return he({ ...p, children: x });
488
488
  }, [e, r]);
489
489
  return o(Se, { ref: a, commands: t, commandHook: e, scope: r, createPopupPanel: c, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...l });
490
490
  }));
@@ -496,32 +496,32 @@ const No = q(X((n, a) => {
496
496
  const f = t?.context();
497
497
  let h = p ?? f?.quickColor;
498
498
  s && !h && (h = new ft("transparent"));
499
- const w = m ?? f?.autoColor, v = u ?? f?.schemeLookup, S = b ?? f?.recentColors, C = d ?? f?.darkMode, D = W(() => ({ autoColor: w, schemeLookup: v, recentColors: S, darkMode: C, ...y }), [w, v, S, C]), T = Y((R, k) => {
499
+ const w = m ?? f?.autoColor, v = u ?? f?.schemeLookup, S = b ?? f?.recentColors, C = d ?? f?.darkMode, D = W(() => ({ autoColor: w, schemeLookup: v, recentColors: S, darkMode: C, ...y }), [w, v, S, C]), E = Y((R, k) => {
500
500
  R && k && f?.addRecentColor && f.addRecentColor(R), f?.onColorSelect && f.onColorSelect(R), r?.(R, k), t?.execute(R, e);
501
501
  }, [t, r, e, f]), P = U((R, k) => {
502
- const { children: E, title: M, ...I } = R;
503
- let F = R.children;
504
- return (t?.disabled() || l) && (F = o("div", { children: F })), o(Zn, { command: t, placement: c === re.Toolbar ? "bottom-start" : "right-start", disabled: k, ...I, children: F });
502
+ const { children: T, title: F, ...I } = R;
503
+ let O = R.children;
504
+ return (t?.disabled() || l) && (O = o("div", { children: O })), o(Zn, { command: t, placement: c === re.Toolbar ? "bottom-start" : "right-start", disabled: k, ...I, children: O });
505
505
  }, [t, l]);
506
- return o(Oa, { ref: a, panelProps: D, icon: x, quickColor: h, selectedColor: t?.state(), onSelectColor: T, variant: c === re.Menuitem ? ot.Menuitem : ot.Toolbar, createTooltip: P, label: t?.label(), disabled: l || !t || t.disabled(), compareRGB: !0, darkMode: C, ...g });
506
+ return o(Ba, { ref: a, panelProps: D, icon: x ?? t?.icon(f), quickColor: h, selectedColor: t?.state(), onSelectColor: E, variant: c === re.Menuitem ? ot.Menuitem : ot.Toolbar, createTooltip: P, label: t?.label(), disabled: l || !t || t.disabled(), compareRGB: !0, darkMode: C, ...g });
507
507
  }));
508
508
  No.displayName = "ColorCommandButton";
509
509
  const ec = q(X((n, a) => {
510
510
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), s = U((d, x) => {
511
- const g = { variant: re.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("gridlinesToggle") }), o(No, { ...g, command: x.getCommand("sheetViewFormatGridlinesColor"), icon: o(he, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0 } }), o(Q, { orientation: "horizontal" }), o(N, { ...g, command: x.getCommand("sheetViewToggleGridlinesColumns") }), o(N, { ...g, command: x.getCommand("sheetViewToggleGridlinesRows") })] });
512
- return ge({ ...d, children: m });
511
+ const g = { variant: re.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("gridlinesToggle") }), o(No, { ...g, command: x.getCommand("sheetViewFormatGridlinesColor"), icon: o(xe, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0 } }), o(Q, { orientation: "horizontal" }), o(M, { ...g, command: x.getCommand("sheetViewToggleGridlinesColumns") }), o(M, { ...g, command: x.getCommand("sheetViewToggleGridlinesRows") })] });
512
+ return he({ ...d, children: m });
513
513
  }, [l, e]);
514
514
  return o(Se, { ref: a, parentFloat: c, quickCommand: i[0]?.key(), commands: t, commandHook: e, createPopupPanel: s, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: o(rn, { command: i[0], scope: "view" }), ...p });
515
515
  })), za = q(X((n, a) => {
516
516
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
517
- const d = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, x = s.getCommand("sortCustom"), g = H(le, { children: [o(N, { ...d, command: s.getCommand("sortAscending") }), o(N, { ...d, command: s.getCommand("sortDescending") }), x ? o(N, { ...d, command: x }) : null, o(Q, { orientation: "horizontal" }), o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterToggle") }), o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterClear") }), o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterReapply") })] });
518
- return ge({ ...i, children: g });
517
+ const d = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, x = s.getCommand("sortCustom"), g = H(le, { children: [o(M, { ...d, command: s.getCommand("sortAscending") }), o(M, { ...d, command: s.getCommand("sortDescending") }), x ? o(M, { ...d, command: x }) : null, o(Q, { orientation: "horizontal" }), o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterToggle") }), o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterClear") }), o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterReapply") })] });
518
+ return he({ ...i, children: g });
519
519
  }, [l, e, r]);
520
520
  return o(Se, { ref: a, commands: t, commandHook: e, scope: r, disabled: l, label: "Sort", tooltip: H(le, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: p, icon: "SortFilter", ...c });
521
521
  })), ap = q(X((n, a) => {
522
522
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
523
- const d = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, x = H(le, { children: [o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterToggle") }), o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterClear") }), o(N, { ...d, scope: "filter", command: s.getCommand("autoFilterReapply") })] });
524
- return ge({ ...i, children: x });
523
+ const d = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, x = H(le, { children: [o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterToggle") }), o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterClear") }), o(M, { ...d, scope: "filter", command: s.getCommand("autoFilterReapply") })] });
524
+ return he({ ...i, children: x });
525
525
  }, [l, e, r]);
526
526
  return o(Se, { ref: a, commands: t, commandHook: e, scope: r, disabled: l, label: "Filter", tooltip: H(le, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: p, icon: "FilterToggle", ...c });
527
527
  })), Ha = q(X((n, a) => {
@@ -531,44 +531,44 @@ const ec = q(X((n, a) => {
531
531
  let f = s;
532
532
  s || (f = !u || u.disabled(), b && !b.disabled() && (f = !1));
533
533
  const [h, w] = _(0), v = U((S, C) => {
534
- let D = h === 0 ? "Cancel" : `${u.label()} ${h} Action${h === 1 ? "" : "s"}`, T = !1;
535
- y || (T = !0), T || (T = l ? !y.hasRedo() && !y.hasUndo() : !y.hasRedo());
536
- const P = (F) => {
537
- u.execute(F);
538
- }, R = o(ct, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: T ? void 0 : "0 0", minWidth: "180px" }, icon: o(he, {}), onMouseEnter: () => {
534
+ let D = h === 0 ? "Cancel" : `${u.label()} ${h} Action${h === 1 ? "" : "s"}`, E = !1;
535
+ y || (E = !0), E || (E = l ? !y.hasRedo() && !y.hasUndo() : !y.hasRedo());
536
+ const P = (O) => {
537
+ u.execute(O);
538
+ }, R = o(ct, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: E ? void 0 : "0 0", minWidth: "180px" }, icon: o(xe, {}), onMouseEnter: () => {
539
539
  w(0);
540
- }, onMouseDown: (F) => {
541
- F.button === 0 && F.preventDefault();
542
- }, onMouseUp: (F) => {
543
- F.button === 0 && P(h);
544
- }, onKeyDown: (F) => {
545
- F.isDefaultPrevented() || F.keyCode !== me.Enter && F.keyCode !== me.Space || P(h);
540
+ }, onMouseDown: (O) => {
541
+ O.button === 0 && O.preventDefault();
542
+ }, onMouseUp: (O) => {
543
+ O.button === 0 && P(h);
544
+ }, onKeyDown: (O) => {
545
+ O.isDefaultPrevented() || O.keyCode !== me.Enter && O.keyCode !== me.Space || P(h);
546
546
  }, children: o(Pe, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: D }) });
547
- if (T) return R;
548
- const k = r ? y?.getRedoDescriptions() : y?.getUndoDescriptions(), E = [];
549
- for (let F = 0; F < k.length; F++) {
550
- const L = k[F];
551
- E.push(o(ct, { sx: { maxWidth: "360px", display: "flex" }, disabled: f, selected: F < h, icon: o(he, {}), onMouseEnter: () => {
552
- w(F + 1);
553
- }, onMouseDown: (O) => {
554
- O.button === 0 && O.preventDefault();
555
- }, onMouseUp: (O) => {
556
- O.button === 0 && P(F + 1);
557
- }, onKeyDown: (O) => {
558
- O.isDefaultPrevented() || O.keyCode !== me.Enter && O.keyCode !== me.Space || P(F + 1);
559
- }, children: H(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [o(Pe, { component: "div", children: L }), o(he, {})] }) }, `action:${F}`));
547
+ if (E) return R;
548
+ const k = r ? y?.getRedoDescriptions() : y?.getUndoDescriptions(), T = [];
549
+ for (let O = 0; O < k.length; O++) {
550
+ const L = k[O];
551
+ T.push(o(ct, { sx: { maxWidth: "360px", display: "flex" }, disabled: f, selected: O < h, icon: o(xe, {}), onMouseEnter: () => {
552
+ w(O + 1);
553
+ }, onMouseDown: (N) => {
554
+ N.button === 0 && N.preventDefault();
555
+ }, onMouseUp: (N) => {
556
+ N.button === 0 && P(O + 1);
557
+ }, onKeyDown: (N) => {
558
+ N.isDefaultPrevented() || N.keyCode !== me.Enter && N.keyCode !== me.Space || P(O + 1);
559
+ }, children: H(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [o(Pe, { component: "div", children: L }), o(xe, {})] }) }, `action:${O}`));
560
560
  }
561
- let M = null;
561
+ let F = null;
562
562
  if (!r && l) {
563
- const F = { scope: "undo", commands: C, variant: re.Menuitem, parentFloat: S.floatReference };
564
- M = [], M.push(o(Ha, { ...F, quickCommand: "redo", isRedo: !0 }, "nested:redo")), y.hasRedo() && y.hasUndo() && M.push(o(Q, { orientation: "horizontal" }, "action:redo-div"));
563
+ const O = { scope: "undo", commands: C, variant: re.Menuitem, parentFloat: S.floatReference };
564
+ F = [], F.push(o(Ha, { ...O, quickCommand: "redo", isRedo: !0 }, "nested:redo")), y.hasRedo() && y.hasUndo() && F.push(o(Q, { orientation: "horizontal" }, "action:redo-div"));
565
565
  }
566
566
  const I = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
567
567
  S.closeFloatAll();
568
568
  }, onMouseLeave: () => {
569
569
  w(0);
570
- }, children: [M, o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: E }), o(Q, { orientation: "horizontal" }), R] });
571
- return ge({ ...S, children: I });
570
+ }, children: [F, o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: T }), o(Q, { orientation: "horizontal" }), R] });
571
+ return he({ ...S, children: I });
572
572
  }, [u?.context(), u?.state(), p, y, h, f]);
573
573
  return o(Se, { ref: a, commands: d, quickCommand: t, scope: p, disabled: f, label: u?.label() ?? (r ? "Redo" : "Undo"), tooltip: o(le, { children: o("span", { children: `${u?.label() ?? "No"} last actions.` }) }), createPopupPanel: v, icon: e ?? (r ? "Redo" : "Undo"), selected: !1, ...x });
574
574
  })), oo = Rl.getFontList(), Wa = /* @__PURE__ */ new Map();
@@ -594,16 +594,16 @@ const tc = q(X((n, a) => {
594
594
  }, children: o(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: o(Pe, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => y[w]?.key }, children: y[w].description }) }) }, w + "" + y[w].key));
595
595
  }
596
596
  const h = o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...s, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: f }) });
597
- return ge({ ...u, children: h });
597
+ return he({ ...u, children: h });
598
598
  }, [l, t?.state()]);
599
- return o(kt, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: m, createTooltip: ({ children: u }, b) => o(nt, { label: t?.label(), description: t?.description(), disabled: b, children: u }), icon: o(B, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: g }, children: o(B, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: d }) }), ...s });
599
+ return o(Ct, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: m, createTooltip: ({ children: u }, b) => o(nt, { label: t?.label(), description: t?.description(), disabled: b, children: u }), icon: o(B, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: g }, children: o(B, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: d }) }), ...s });
600
600
  })), oc = q(X((n, a) => {
601
601
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), i = W(() => {
602
602
  for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
603
603
  return p[0];
604
604
  }, [p]), s = U((d, x) => {
605
- const g = { variant: re.Menuitem, commandHook: e, scope: "textEffects", disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("formatStrikeThroughToggle") }), o(N, { ...g, command: x.getCommand("formatSuperscriptToggle") }), o(N, { ...g, command: x.getCommand("formatSubscriptToggle") })] });
606
- return ge({ ...d, children: m });
605
+ const g = { variant: re.Menuitem, commandHook: e, scope: "textEffects", disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("formatStrikeThroughToggle") }), o(M, { ...g, command: x.getCommand("formatSuperscriptToggle") }), o(M, { ...g, command: x.getCommand("formatSubscriptToggle") })] });
606
+ return he({ ...d, children: m });
607
607
  }, [l, e, r]);
608
608
  return o(Se, { ref: a, quickCommand: i?.key(), commands: t, commandHook: e, createPopupPanel: s, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: i?.icon() ?? "TextStrike", ...c });
609
609
  })), nc = q(X((n, a) => {
@@ -611,26 +611,26 @@ const tc = q(X((n, a) => {
611
611
  for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
612
612
  return p[0];
613
613
  }, [p]), s = U((d, x) => {
614
- const g = { variant: re.Menuitem, commandHook: e, scope: "underline", disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("formatUnderlinedToggle") }), o(N, { ...g, command: x.getCommand("formatUnderlinedDoubleToggle") }), o(N, { ...g, command: x.getCommand("formatUnderlinedAccountingToggle"), commandHook: e }), o(N, { ...g, command: x.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
615
- return ge({ ...d, children: m });
614
+ const g = { variant: re.Menuitem, commandHook: e, scope: "underline", disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("formatUnderlinedToggle") }), o(M, { ...g, command: x.getCommand("formatUnderlinedDoubleToggle") }), o(M, { ...g, command: x.getCommand("formatUnderlinedAccountingToggle"), commandHook: e }), o(M, { ...g, command: x.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
615
+ return he({ ...d, children: m });
616
616
  }, [l, e, r]);
617
617
  return o(Se, { ref: a, quickCommand: i?.key(), commands: t, commandHook: e, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: s, icon: i?.icon() ?? "TextUnderline", ...c });
618
618
  })), ja = q(X((n, a) => {
619
619
  const { command: t, commands: e, commandHook: r, scope: l, includePasteAllInPopup: c = !0, disabled: p = !1, ...i } = n, s = Y((d, x) => {
620
620
  const g = { variant: re.Menuitem, commandHook: r, scope: "paste", disabled: p }, m = [];
621
- return c && (m.push(ke(N, { ...g, command: x.getCommand("paste"), key: "paste" })), m.push(o(Q, { orientation: "horizontal" }, "paste-div"))), m.push(ke(N, { ...g, command: x.getCommand("pasteValues"), key: "pasteValues" })), m.push(ke(N, { ...g, command: x.getCommand("pasteFormats"), key: "pasteFormats" })), m.push(ke(N, { ...g, command: x.getCommand("pasteFormulas"), key: "pasteFormulas" })), m.push(ke(N, { ...g, command: x.getCommand("pasteTranspose"), key: "pasteTranspose" })), m.push(ke(N, { ...g, command: x.getCommand("pasteLinks"), key: "pasteLinks" })), ge({ ...d, children: m });
621
+ return c && (m.push(ke(M, { ...g, command: x.getCommand("paste"), key: "paste" })), m.push(o(Q, { orientation: "horizontal" }, "paste-div"))), m.push(ke(M, { ...g, command: x.getCommand("pasteValues"), key: "pasteValues" })), m.push(ke(M, { ...g, command: x.getCommand("pasteFormats"), key: "pasteFormats" })), m.push(ke(M, { ...g, command: x.getCommand("pasteFormulas"), key: "pasteFormulas" })), m.push(ke(M, { ...g, command: x.getCommand("pasteTranspose"), key: "pasteTranspose" })), m.push(ke(M, { ...g, command: x.getCommand("pasteLinks"), key: "pasteLinks" })), he({ ...d, children: m });
622
622
  }, [p, r, l, c]);
623
623
  return o(Se, { ref: a, commands: e, commandHook: r, scope: l, createPopupPanel: s, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...i });
624
624
  })), rc = q(X((n, a) => {
625
625
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), s = U((d, x) => {
626
- const g = { variant: re.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(N, { ...g, command: x.getCommand("sheetViewToggleShowHeadings") }), o(N, { ...g, command: x.getCommand("sheetViewToggleShowHeadingsNumeric") }), o(Q, { orientation: "horizontal" }), o(N, { ...g, command: x.getCommand("sheetViewToggleShowHeadingColumns") }), o(N, { ...g, command: x.getCommand("sheetViewToggleShowHeadingRows") })] });
627
- return ge({ ...d, children: m });
626
+ const g = { variant: re.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(M, { ...g, command: x.getCommand("sheetViewToggleShowHeadings") }), o(M, { ...g, command: x.getCommand("sheetViewToggleShowHeadingsNumeric") }), o(Q, { orientation: "horizontal" }), o(M, { ...g, command: x.getCommand("sheetViewToggleShowHeadingColumns") }), o(M, { ...g, command: x.getCommand("sheetViewToggleShowHeadingRows") })] });
627
+ return he({ ...d, children: m });
628
628
  }, [l, e, r]);
629
629
  return o(Se, { ref: a, parentFloat: c, quickCommand: i[0]?.key(), commands: t, commandHook: e, createPopupPanel: s, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: o(rn, { command: i[0], scope: "view" }), ...p });
630
630
  })), ac = q(X((n, a) => {
631
631
  const { commands: t, commandHook: e, scope: r = "view", disabled: l = !1, ...c } = n, p = U((i) => {
632
- const s = { variant: re.Menuitem, parentFloat: i.floatReference, commandHook: e, scope: r, disabled: l }, d = H(le, { children: [o(N, { ...s, command: t.getCommand("workbookViewToggleShowFormulaBar") }), o(N, { ...s, command: t.getCommand("workbookViewToggleShowTabs") }), o(N, { ...s, command: t.getCommand("workbookViewToggleShowStatusBar") }), o(Q, { orientation: "horizontal" }), o(N, { ...s, command: t.getCommand("workbookViewToggleShowHorizontalScrollBar") }), o(N, { ...s, command: t.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
633
- return ge({ ...i, children: d });
632
+ const s = { variant: re.Menuitem, parentFloat: i.floatReference, commandHook: e, scope: r, disabled: l }, d = H(le, { children: [o(M, { ...s, command: t.getCommand("workbookViewToggleShowFormulaBar") }), o(M, { ...s, command: t.getCommand("workbookViewToggleShowTabs") }), o(M, { ...s, command: t.getCommand("workbookViewToggleShowStatusBar") }), o(Q, { orientation: "horizontal" }), o(M, { ...s, command: t.getCommand("workbookViewToggleShowHorizontalScrollBar") }), o(M, { ...s, command: t.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
633
+ return he({ ...i, children: d });
634
634
  }, [l, t, e, r]);
635
635
  return o(Se, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: p, icon: o(rn, { icon: null, label: "Workbook View" }), ...c });
636
636
  })), $a = q(X((n, a) => {
@@ -638,8 +638,8 @@ const tc = q(X((n, a) => {
638
638
  return o(B, { ref: a, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: s ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...m }, "& .text": { flex: "1 1 100%", ...b.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: b.toCSS().textDecoration, textAlign: Ml.toCSSHorizontalTextAlign(x.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...p }, ...d, children: o(Un, { getBorderAt: y, darkMode: c?.darkMode ?? !1, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...i?.style }, ...i, children: o(B, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: o(B, { className: "text", children: t }) }) }) });
639
639
  })), ic = q((n) => {
640
640
  const { styles: a, namedStyle: t, selectedNamed: e, hasContextMenu: r = !0, bodyStyle: l, onSelectNamed: c, createTemporaryCell: p, parentFloat: i, commands: s, disabled: d, commandHook: x, ...g } = n, m = U((y) => {
641
- const f = { variant: re.Menuitem, commandHook: x, context: "cellStyle" }, h = H(le, { children: [o(N, { ...f, style: { fontWeight: 550 }, command: s.getCommand("formatCellStyle"), commandState: t, disabled: d }), o(Q, { orientation: "horizontal" }), o(N, { ...f, command: s.getCommand("modifyCellStyle"), commandState: { named: t } }), o(N, { ...f, command: s.getCommand("deleteCellStyle"), commandState: t, disabled: d || t?.getName() === ce.BuiltInName.Normal })] });
642
- return ge({ ...y, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: h }) }) });
641
+ const f = { variant: re.Menuitem, commandHook: x, context: "cellStyle" }, h = H(le, { children: [o(M, { ...f, style: { fontWeight: 550 }, command: s.getCommand("formatCellStyle"), commandState: t, disabled: d }), o(Q, { orientation: "horizontal" }), o(M, { ...f, command: s.getCommand("modifyCellStyle"), commandState: { named: t } }), o(M, { ...f, command: s.getCommand("deleteCellStyle"), commandState: t, disabled: d || t?.getName() === ce.BuiltInName.Normal })] });
642
+ return he({ ...y, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: h }) }) });
643
643
  }, []), u = t?.getName() === e?.getName();
644
644
  let b = o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (y) => `solid ${u ? y.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: t.getName(), placement: "bottom-start" }, disabled: d, icon: null, onClick: () => {
645
645
  c?.(t);
@@ -651,31 +651,31 @@ const tc = q(X((n, a) => {
651
651
  const x = e?.context(), g = x?.styles, m = l ?? x?.named(), u = i ?? x?.bodyStyle(), b = Y((v) => {
652
652
  c?.(v), e?.execute(v, r);
653
653
  }, [e, c, r]), y = U((v, S) => {
654
- const C = { onSelectNamed: b, styles: g(), parentFloat: v.floatReference }, D = g().getCustomNamed(), T = /* @__PURE__ */ new Map(), P = [];
655
- for (let O = 0; O < D.length; O++) T.set(D[O].getName(), D[O]), g().getNamed(D[O].getName()).getBuiltInID() === null && P.push(D[O].getName());
656
- const R = (O) => {
657
- let z = T.get(O);
658
- return z || (z = g().getNamed(O)), !z || z.isHidden() ? null : o(ic, { namedStyle: z, selectedNamed: m, bodyStyle: x.bodyStyle(), createTemporaryCell: x.createTemporaryCell, commands: t, commandHook: r, ...C }, O);
659
- }, k = (O, z, ie = !0) => {
654
+ const C = { onSelectNamed: b, styles: g(), parentFloat: v.floatReference }, D = g().getCustomNamed(), E = /* @__PURE__ */ new Map(), P = [];
655
+ for (let N = 0; N < D.length; N++) E.set(D[N].getName(), D[N]), g().getNamed(D[N].getName()).getBuiltInID() === null && P.push(D[N].getName());
656
+ const R = (N) => {
657
+ let z = E.get(N);
658
+ return z || (z = g().getNamed(N)), !z || z.isHidden() ? null : o(ic, { namedStyle: z, selectedNamed: m, bodyStyle: x.bodyStyle(), createTemporaryCell: x.createTemporaryCell, commands: t, commandHook: r, ...C }, N);
659
+ }, k = (N, z, ie = !0) => {
660
660
  const J = [];
661
661
  for (let pe = 0; pe < z.length; pe++) {
662
662
  const j = R(z[pe]);
663
663
  j && J.push(j);
664
664
  }
665
- return J.length === 0 ? null : H(B, { children: [ie ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: O }, O + "-header"), o(B, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: J }, O + "-presets")] }, O);
666
- }, E = (O, z) => {
665
+ return J.length === 0 ? null : H(B, { children: [ie ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: N }, N + "-header"), o(B, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: J }, N + "-presets")] }, N);
666
+ }, T = (N, z) => {
667
667
  const ie = [];
668
668
  for (let J = 0; J < z.length; J++) {
669
669
  const pe = R(z[J]);
670
670
  pe && ie.push(pe);
671
671
  }
672
- return ie.length === 0 ? null : o(B, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: ie }, O + "-presets");
673
- }, M = [];
674
- M.push(k("Custom", P, !1)), M.push(k("Good, Bad and Neutral", [ce.BuiltInName.Normal, ce.BuiltInName.Bad, ce.BuiltInName.Good, ce.BuiltInName.Neutral], P.length > 0)), M.push(k("Data and Model", [ce.BuiltInName.Calculation, ce.BuiltInName.CheckCell, ce.BuiltInName.ExplanatoryText, ce.BuiltInName.FollowedHyperlink, ce.BuiltInName.Hyperlink, ce.BuiltInName.Input, ce.BuiltInName.LinkedCell, ce.BuiltInName.Note, ce.BuiltInName.Output, ce.BuiltInName.WarningText])), M.push(k("Titles and Headings", [ce.BuiltInName.Heading1, ce.BuiltInName.Heading2, ce.BuiltInName.Heading3, ce.BuiltInName.Heading4, ce.BuiltInName.Title, ce.BuiltInName.Total]));
672
+ return ie.length === 0 ? null : o(B, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: ie }, N + "-presets");
673
+ }, F = [];
674
+ F.push(k("Custom", P, !1)), F.push(k("Good, Bad and Neutral", [ce.BuiltInName.Normal, ce.BuiltInName.Bad, ce.BuiltInName.Good, ce.BuiltInName.Neutral], P.length > 0)), F.push(k("Data and Model", [ce.BuiltInName.Calculation, ce.BuiltInName.CheckCell, ce.BuiltInName.ExplanatoryText, ce.BuiltInName.FollowedHyperlink, ce.BuiltInName.Hyperlink, ce.BuiltInName.Input, ce.BuiltInName.LinkedCell, ce.BuiltInName.Note, ce.BuiltInName.Output, ce.BuiltInName.WarningText])), F.push(k("Titles and Headings", [ce.BuiltInName.Heading1, ce.BuiltInName.Heading2, ce.BuiltInName.Heading3, ce.BuiltInName.Heading4, ce.BuiltInName.Title, ce.BuiltInName.Total]));
675
675
  let I = [];
676
- var F, L;
677
- return I.push(E("Accent 1", [ce.BuiltInName.Accent1_20, ce.BuiltInName.Accent1_40, ce.BuiltInName.Accent1_60, ce.BuiltInName.Accent1])), I.push(E("Accent 2", [ce.BuiltInName.Accent2_20, ce.BuiltInName.Accent2_40, ce.BuiltInName.Accent2_60, ce.BuiltInName.Accent2])), I.push(E("Accent 3", [ce.BuiltInName.Accent3_20, ce.BuiltInName.Accent3_40, ce.BuiltInName.Accent3_60, ce.BuiltInName.Accent3])), I.push(E("Accent 4", [ce.BuiltInName.Accent4_20, ce.BuiltInName.Accent4_40, ce.BuiltInName.Accent4_60, ce.BuiltInName.Accent4])), I.push(E("Accent 5", [ce.BuiltInName.Accent5_20, ce.BuiltInName.Accent5_40, ce.BuiltInName.Accent5_60, ce.BuiltInName.Accent5])), I.push(E("Accent 6", [ce.BuiltInName.Accent6_20, ce.BuiltInName.Accent6_40, ce.BuiltInName.Accent6_60, ce.BuiltInName.Accent6])), M.push((F = "Themed Cell Styles", L = I, H(B, { children: [o(Q, { orientation: "horizontal" }), o(ro, { children: F }, F + "-header"), o(B, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: L }, F + "-presets")] }, F))), M.push(k("Number Format", [ce.BuiltInName.Comma, ce.BuiltInName.Comma0, ce.BuiltInName.Currency, ce.BuiltInName.Currency0, ce.BuiltInName.Percent])), H(B, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (O) => `${O.shape.borderRadius}px`, paddingBottom: (O) => `${O.shape.borderRadius}px` }, children: [o(B, { onContextMenu: () => {
678
- }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: M }), o(Q, { orientation: "horizontal" }), o(N, { variant: re.Menuitem, commandState: m, command: S.getCommand("newCellStyle"), context: "styles", commandHook: r, disabled: p })] });
676
+ var O, L;
677
+ return I.push(T("Accent 1", [ce.BuiltInName.Accent1_20, ce.BuiltInName.Accent1_40, ce.BuiltInName.Accent1_60, ce.BuiltInName.Accent1])), I.push(T("Accent 2", [ce.BuiltInName.Accent2_20, ce.BuiltInName.Accent2_40, ce.BuiltInName.Accent2_60, ce.BuiltInName.Accent2])), I.push(T("Accent 3", [ce.BuiltInName.Accent3_20, ce.BuiltInName.Accent3_40, ce.BuiltInName.Accent3_60, ce.BuiltInName.Accent3])), I.push(T("Accent 4", [ce.BuiltInName.Accent4_20, ce.BuiltInName.Accent4_40, ce.BuiltInName.Accent4_60, ce.BuiltInName.Accent4])), I.push(T("Accent 5", [ce.BuiltInName.Accent5_20, ce.BuiltInName.Accent5_40, ce.BuiltInName.Accent5_60, ce.BuiltInName.Accent5])), I.push(T("Accent 6", [ce.BuiltInName.Accent6_20, ce.BuiltInName.Accent6_40, ce.BuiltInName.Accent6_60, ce.BuiltInName.Accent6])), F.push((O = "Themed Cell Styles", L = I, H(B, { children: [o(Q, { orientation: "horizontal" }), o(ro, { children: O }, O + "-header"), o(B, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: L }, O + "-presets")] }, O))), F.push(k("Number Format", [ce.BuiltInName.Comma, ce.BuiltInName.Comma0, ce.BuiltInName.Currency, ce.BuiltInName.Currency0, ce.BuiltInName.Percent])), H(B, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (N) => `${N.shape.borderRadius}px`, paddingBottom: (N) => `${N.shape.borderRadius}px` }, children: [o(B, { onContextMenu: () => {
678
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: F }), o(Q, { orientation: "horizontal" }), o(M, { variant: re.Menuitem, commandState: m, command: S.getCommand("newCellStyle"), context: "styles", commandHook: r, disabled: p })] });
679
679
  }, [m, g?.().getTheme(), u]), f = Y((v) => {
680
680
  const S = 18 / Ht.getDeviceScale(), C = x?.createTemporaryCell(v);
681
681
  return C.getStyle().getFont().getSize() <= S ? C : C.createTemporaryCell({ style: { font: { size: S } } });
@@ -700,16 +700,16 @@ const tc = q(X((n, a) => {
700
700
  }
701
701
  return v;
702
702
  }, [y]), h = W(() => {
703
- const v = (C, D, T) => {
704
- let P = T.getFill().toCSS(l?.darkMode ?? !1);
705
- const R = m - (D < 4 ? 1 : 0), k = d - (C < 4 ? 1 : 0), E = T.getFont().getFill().toCSS(l?.darkMode ?? !1);
706
- return P = { ...P, position: "absolute", boxSizing: "border-box", left: D * (m - 1), top: C * (d - 1), width: R, height: k }, o("td", { className: `table-style-fill ${C}-${D}`, style: P, children: o("div", { className: `table-style-text ${C}-${D}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (R - 6) / 2, top: (k - 1) / 2, borderTop: `1px solid ${E}` } }) }, `${C}-${D}`);
703
+ const v = (C, D, E) => {
704
+ let P = E.getFill().toCSS(l?.darkMode ?? !1);
705
+ const R = m - (D < 4 ? 1 : 0), k = d - (C < 4 ? 1 : 0), T = E.getFont().getFill().toCSS(l?.darkMode ?? !1);
706
+ return P = { ...P, position: "absolute", boxSizing: "border-box", left: D * (m - 1), top: C * (d - 1), width: R, height: k }, o("td", { className: `table-style-fill ${C}-${D}`, style: P, children: o("div", { className: `table-style-text ${C}-${D}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (R - 6) / 2, top: (k - 1) / 2, borderTop: `1px solid ${T}` } }) }, `${C}-${D}`);
707
707
  }, S = [];
708
708
  for (let C = 0; C < 5; C++) {
709
709
  const D = [];
710
- for (let T = 0; T < 5; T++) {
711
- const P = f[5 * C + T];
712
- D.push(v(C, T, P));
710
+ for (let E = 0; E < 5; E++) {
711
+ const P = f[5 * C + E];
712
+ D.push(v(C, E, P));
713
713
  }
714
714
  S.push(o("tr", { children: D }, C));
715
715
  }
@@ -751,29 +751,29 @@ const tc = q(X((n, a) => {
751
751
  R.isNone() || (b.strokeStyle = R.getColor().toCSS(f, !1), go(b, S, C, S, C + 9));
752
752
  const k = D.getTop();
753
753
  k.isNone() || (b.strokeStyle = k.getColor().toCSS(f, !1), go(b, S, C, S + y, 9 * h));
754
- const E = D.getRight();
755
- E.isNone() || (b.strokeStyle = E.getColor().toCSS(f, !1), go(b, S + y, C, S + y, C + 9));
756
- const M = D.getBottom();
757
- M.isNone() || (b.strokeStyle = M.getColor().toCSS(f, !1), go(b, S, C + 9, S + y, C + 9));
754
+ const T = D.getRight();
755
+ T.isNone() || (b.strokeStyle = T.getColor().toCSS(f, !1), go(b, S + y, C, S + y, C + 9));
756
+ const F = D.getBottom();
757
+ F.isNone() || (b.strokeStyle = F.getColor().toCSS(f, !1), go(b, S, C + 9, S + y, C + 9));
758
758
  }
759
759
  b.strokeStyle = v.getFont().getFill().toCSS(f, !1);
760
- const T = 4, P = 2.5;
761
- go(b, w * y + P, 9 * h + T, w * y + P + 7, 9 * h + T);
760
+ const E = 4, P = 2.5;
761
+ go(b, w * y + P, 9 * h + E, w * y + P + 7, 9 * h + E);
762
762
  }
763
763
  return `url(${u.toDataURL()})`;
764
764
  }, [s, x, e, l]);
765
765
  return o("div", { ref: a, className: Te("table-style-preview", i), style: { backgroundImage: m, width: 61, height: 46, ...p }, ...d });
766
766
  })), dc = "_table-style-options-container_1kfn2_1", pc = "_table-style-options_1kfn2_1", uc = q(X((n, a) => {
767
767
  const { styleOptions: t, onStyleOptionsChange: e, showHeaderRow: r, onShowHeaderRowChange: l, showTotalRow: c, onShowTotalRowChange: p, showFilterButton: i, onShowFilterButtonChange: s, sx: d, className: x, disabled: g, ...m } = n;
768
- return o("div", { className: dc, children: H(B, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (u) => `${u.spacing(2)}`, marginRight: (u) => `${u.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (u) => `${u.spacing(0.5)}` }, ...d }, ...m, ref: a, className: Te(x, pc), children: [l && o(Rt, { control: o(Mt, { checked: r ?? !1, indeterminate: r == null, onChange: () => l(!r), disabled: g || r == null }), label: "Header Row", labelPlacement: "end" }), p && o(Rt, { control: o(Mt, { checked: c ?? !1, indeterminate: c == null, onChange: () => p(!c), disabled: g || c == null }), label: "Total Row", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showRowStripes ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
768
+ return o("div", { className: dc, children: H(B, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (u) => `${u.spacing(2)}`, marginRight: (u) => `${u.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (u) => `${u.spacing(0.5)}` }, ...d }, ...m, ref: a, className: Te(x, pc), children: [l && o(Mt, { control: o(Nt, { checked: r ?? !1, indeterminate: r == null, onChange: () => l(!r), disabled: g || r == null }), label: "Header Row", labelPlacement: "end" }), p && o(Mt, { control: o(Nt, { checked: c ?? !1, indeterminate: c == null, onChange: () => p(!c), disabled: g || c == null }), label: "Total Row", labelPlacement: "end" }), o(Mt, { control: o(Nt, { checked: t?.showRowStripes ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
769
769
  e?.({ ...t, showRowStripes: !t?.showRowStripes });
770
- } }), label: "Banded Rows", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showFirstColumn ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
770
+ } }), label: "Banded Rows", labelPlacement: "end" }), o(Mt, { control: o(Nt, { checked: t?.showFirstColumn ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
771
771
  e?.({ ...t, showFirstColumn: !t?.showFirstColumn });
772
- } }), label: "First Column", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showLastColumn ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
772
+ } }), label: "First Column", labelPlacement: "end" }), o(Mt, { control: o(Nt, { checked: t?.showLastColumn ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
773
773
  e?.({ ...t, showLastColumn: !t?.showLastColumn });
774
- } }), label: "Last Column", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showColumnStripes ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
774
+ } }), label: "Last Column", labelPlacement: "end" }), o(Mt, { control: o(Nt, { checked: t?.showColumnStripes ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
775
775
  e?.({ ...t, showColumnStripes: !t?.showColumnStripes });
776
- } }), label: "Banded Columns", labelPlacement: "end" }), s && o(Rt, { control: o(Mt, { checked: i ?? !1, indeterminate: i == null, disabled: g || !t || i == null, onChange: () => s(!i) }), label: "Filter Button", labelPlacement: "end" })] }) });
776
+ } }), label: "Banded Columns", labelPlacement: "end" }), s && o(Mt, { control: o(Nt, { checked: i ?? !1, indeterminate: i == null, disabled: g || !t || i == null, onChange: () => s(!i) }), label: "Filter Button", labelPlacement: "end" })] }) });
777
777
  }));
778
778
  function Sn(n, a) {
779
779
  if (typeof n == "function") return n(a);
@@ -799,7 +799,7 @@ var $t = parseInt(Gl.split(".")[0], 10) >= 19 ? function(n) {
799
799
  function ip(n) {
800
800
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
801
801
  }
802
- var hc = Ua ? St : de, Pr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
802
+ var hc = Ua ? vt : de, Pr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
803
803
  const zt = Ua && window.ResizeObserver !== void 0 ? function() {
804
804
  var n = _(null), a = n[0], t = n[1], e = _(Pr), r = e[0], l = e[1], c = W(function() {
805
805
  return new window.ResizeObserver(function(p) {
@@ -826,23 +826,23 @@ const Ka = q(X((n, a) => {
826
826
  S(p), w("");
827
827
  }, [p]);
828
828
  const C = Y((k) => {
829
- let E = "";
829
+ let T = "";
830
830
  try {
831
831
  S(k), x?.(k), d?.(k);
832
- } catch (M) {
833
- E = M.message ?? "Invalid Name";
832
+ } catch (F) {
833
+ T = F.message ?? "Invalid Name";
834
834
  }
835
- i && u && (E ? u.setError(i, { message: E }) : u.clearErrors(i)), w(E);
835
+ i && u && (T ? u.setError(i, { message: T }) : u.clearErrors(i)), w(T);
836
836
  }, [p, x, d]), D = Y(async (k) => {
837
837
  k.keyCode === me.Escape && y !== p && (C(y), u?.setValue(i, y), u?.clearErrors(i), k.stopPropagation()), g?.(k);
838
- }, [g, y, p, u]), T = Y((k) => {
838
+ }, [g, y, p, u]), E = Y((k) => {
839
839
  f(k.target.value ?? "");
840
840
  }, []), P = Y((k) => {
841
841
  f(""), b?.onBlur(k);
842
842
  }, []), R = U((k) => {
843
843
  C(k.target.value), b?.onChange(k);
844
844
  }, [b]);
845
- return o(Xn, { sx: { paddingTop: (k) => k.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Te("named-input", r), ...m, children: o(Ta, { label: "Name", placeholder: c, onFocus: T, onBlur: P, inputRef: b?.ref, disabled: t, error: !!h, helperText: h || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (k) => k.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", name: i, spellCheck: !1, autoComplete: "off", readOnly: t, sx: { paddingTop: (k) => k.spacing(1.25), paddingBottom: (k) => k.spacing(0.75), backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` } } }, value: v ?? "", onChange: R, onKeyDownCapture: D, onContextMenu: (k) => {
845
+ return o(Xn, { sx: { paddingTop: (k) => k.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Te("named-input", r), ...m, children: o(Ta, { label: "Name", placeholder: c, onFocus: E, onBlur: P, inputRef: b?.ref, disabled: t, error: !!h, helperText: h || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (k) => k.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", name: i, spellCheck: !1, autoComplete: "off", readOnly: t, sx: { paddingTop: (k) => k.spacing(1.25), paddingBottom: (k) => k.spacing(0.75), backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` } } }, value: v ?? "", onChange: R, onKeyDownCapture: D, onContextMenu: (k) => {
846
846
  k.stopPropagation();
847
847
  } }) });
848
848
  }));
@@ -852,31 +852,31 @@ const zo = (n) => n === null ? "" : n.toString(), Xa = q(X((n, a) => {
852
852
  de(() => {
853
853
  v(zo(s)), y(""), t && m && m.clearErrors(t), h(!1);
854
854
  }, [s]);
855
- const S = Y((E) => {
856
- let M = "";
855
+ const S = Y((T) => {
856
+ let F = "";
857
857
  try {
858
- v(E);
859
- const I = zo(s), F = x(E);
860
- F.toString() !== I && d?.(F);
858
+ v(T);
859
+ const I = zo(s), O = x(T);
860
+ O.toString() !== I && d?.(O);
861
861
  } catch {
862
- M = "Invalid Range";
862
+ F = "Invalid Range";
863
863
  }
864
- t && m && (M ? m.setError(t, { message: M }) : m.clearErrors(t)), y(M), h(!0);
865
- }, [w, d, t, m]), C = Y(async (E) => {
866
- if (f && E.keyCode === me.Escape) {
867
- const M = zo(s);
868
- v(M), y(""), h(!1), E.stopPropagation();
864
+ t && m && (F ? m.setError(t, { message: F }) : m.clearErrors(t)), y(F), h(!0);
865
+ }, [w, d, t, m]), C = Y(async (T) => {
866
+ if (f && T.keyCode === me.Escape) {
867
+ const F = zo(s);
868
+ v(F), y(""), h(!1), T.stopPropagation();
869
869
  }
870
- i?.(E);
871
- }, [s, d, i, f]), D = Y((E) => {
872
- u?.onBlur(E);
873
- }, [u]), T = U((E) => {
874
- S(E.target.value), u?.onChange(E);
875
- }, [u]), [P, R] = _(!1), k = W(() => o(Zl, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: o(ss, { disabled: !0, selected: P, onSelectToggle: (E) => {
876
- R(E);
877
- }, label: "Select Range", icon: o(he, { iconKey: "SelectRangeMode" }) }) }), [P]);
878
- return o(Xn, { sx: { paddingTop: (E) => E.spacing(1.5), minWidth: 135, width: "100%", ...p }, size: "small", ref: a, className: Te("range-input", c), ...g, children: o(Ta, { label: "Range", placeholder: "Enter Range", onBlur: D, disabled: r, error: !!b, inputRef: u?.ref, helperText: b || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (E) => E.spacing(0.5) } }, slotProps: { input: { endAdornment: k }, inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", readOnly: r, name: t, sx: { paddingTop: (E) => E.spacing(1.25), paddingBottom: (E) => E.spacing(0.75) } } }, value: w ?? "", onChange: T, onKeyDownCapture: C, onContextMenu: (E) => {
879
- E.stopPropagation();
870
+ i?.(T);
871
+ }, [s, d, i, f]), D = Y((T) => {
872
+ u?.onBlur(T);
873
+ }, [u]), E = U((T) => {
874
+ S(T.target.value), u?.onChange(T);
875
+ }, [u]), [P, R] = _(!1), k = W(() => o(Zl, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: o(ss, { disabled: !0, selected: P, onSelectToggle: (T) => {
876
+ R(T);
877
+ }, label: "Select Range", icon: o(xe, { iconKey: "SelectRangeMode" }) }) }), [P]);
878
+ return o(Xn, { sx: { paddingTop: (T) => T.spacing(1.5), minWidth: 135, width: "100%", ...p }, size: "small", ref: a, className: Te("range-input", c), ...g, children: o(Ta, { label: "Range", placeholder: "Enter Range", onBlur: D, disabled: r, error: !!b, inputRef: u?.ref, helperText: b || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (T) => T.spacing(0.5) } }, slotProps: { input: { endAdornment: k }, inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", readOnly: r, name: t, sx: { paddingTop: (T) => T.spacing(1.25), paddingBottom: (T) => T.spacing(0.75) } } }, value: w ?? "", onChange: E, onKeyDownCapture: C, onContextMenu: (T) => {
879
+ T.stopPropagation();
880
880
  } }) });
881
881
  }));
882
882
  Xa.displayName = "RangeInput";
@@ -891,7 +891,7 @@ const bc = (n) => {
891
891
  }
892
892
  return o(B, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: o(B, { sx: { display: "flex", boxShadow: (x) => x.shadows[2] }, children: d }) });
893
893
  }, [a, i]);
894
- return o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (d) => `solid ${r ? d.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (d) => `solid ${d.palette.text.primary} 1px !important` } }, icon: null, ...p, children: H(B, { sx: { border: (d) => `solid ${d.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (d) => r ? d.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (d) => d.palette.text.primary } }, children: [o(B, { sx: {}, children: a.getName() }), H(B, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [s, o(B, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => a.getFontScheme().getMajorFont() }, children: o(vt, { disableInteractive: !0, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } } }, title: o("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
894
+ return o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (d) => `solid ${r ? d.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (d) => `solid ${d.palette.text.primary} 1px !important` } }, icon: null, ...p, children: H(B, { sx: { border: (d) => `solid ${d.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (d) => r ? d.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (d) => d.palette.text.primary } }, children: [o(B, { sx: {}, children: a.getName() }), H(B, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [s, o(B, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => a.getFontScheme().getMajorFont() }, children: o(kt, { disableInteractive: !0, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } } }, title: o("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
895
895
  The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: o("div", { children: a.getFontScheme().getMinorFont() }) }) })] })] }) });
896
896
  }, xc = q(X((n, a) => {
897
897
  const { themes: t, selectedTheme: e, onSelectTheme: r, sx: l, disabled: c = !1, darkMode: p, ...i } = n, s = W(() => {
@@ -912,15 +912,15 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
912
912
  }, [e, r, p]);
913
913
  return o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: a, ...i, children: H(B, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [o(ro, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), o(Q, {}), o(B, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: s })] }) });
914
914
  })), yc = q(X((n, a) => {
915
- const { themes: t, selectedTheme: e, onSelectTheme: r, icon: l, tooltip: c, label: p, variant: i = ot.Toolbar, darkMode: s, panelProps: d, ...x } = n, g = l || o(he, { iconKey: "Theme2" }), m = U((b) => {
915
+ const { themes: t, selectedTheme: e, onSelectTheme: r, icon: l, tooltip: c, label: p, variant: i = ot.Toolbar, darkMode: s, panelProps: d, ...x } = n, g = l || o(xe, { iconKey: "Theme2" }), m = U((b) => {
916
916
  const { closeFloatAll: y } = b;
917
917
  return o(xc, { ...d, themes: t, selectedTheme: e, onSelectTheme: r, darkMode: s, onKeyDown: (f) => {
918
918
  f.which === me.Enter && y();
919
919
  } });
920
920
  }, [t, e, r, d, s]), u = { createPopupPanel: m, tooltip: c || p || "Theme", label: p, icon: g, ...x };
921
- return i === ot.Toolbar ? o(kt, { ref: a, ...u }) : o(Yn, { ref: a, ...u });
921
+ return i === ot.Toolbar ? o(Ct, { ref: a, ...u }) : o(Yn, { ref: a, ...u });
922
922
  })), Ya = q(X((n, a) => {
923
- const { sheet: t, className: e, debounceDelay: r = 220, sx: l, ...c } = n, [p, i] = _(() => t.getView().getZoomScale()), [s, d] = _(null), x = xe(0);
923
+ const { sheet: t, className: e, debounceDelay: r = 220, sx: l, ...c } = n, [p, i] = _(() => t.getView().getZoomScale()), [s, d] = _(null), x = be(0);
924
924
  We(t, { onViewChange: () => {
925
925
  d(!0), x.current === 0 && i(t.getView().getZoomScale());
926
926
  } }), de(() => {
@@ -931,12 +931,12 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
931
931
  }, r)();
932
932
  }, [p, r]);
933
933
  const g = Y((D) => {
934
- let T = D;
935
- D < 100 ? T = Math.round(D / (10 / 9) + 10) : D > 100 && (T = Math.round(3 * D - 200)), x.current = T, d(!0), i(T);
934
+ let E = D;
935
+ D < 100 ? E = Math.round(D / (10 / 9) + 10) : D > 100 && (E = Math.round(3 * D - 200)), x.current = E, d(!0), i(E);
936
936
  }, [t]), m = (D) => {
937
- let T = D;
938
- return D < 100 ? T = 10 / 9 * (D - 10) : D > 100 && (T = (D + 200) / 3), T;
939
- }, u = m(p), [b, y] = _(null), f = xe(null), h = U(() => {
937
+ let E = D;
938
+ return D < 100 ? E = 10 / 9 * (D - 10) : D > 100 && (E = (D + 200) / 3), E;
939
+ }, u = m(p), [b, y] = _(null), f = be(null), h = U(() => {
940
940
  const D = b;
941
941
  D && requestAnimationFrame(() => {
942
942
  f.current?.contains(document.activeElement) && D.focus();
@@ -952,17 +952,17 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
952
952
  D.button === 0 && D.preventDefault();
953
953
  }, onMouseUp: (D) => {
954
954
  D.button === 0 && h();
955
- }, ...c, children: [o(vt, { disableInteractive: !0, title: "Zoom Out", children: o(st, { sx: { padding: "0", "&:hover:not([disabled])": { color: (D) => D.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (D) => {
955
+ }, ...c, children: [o(kt, { disableInteractive: !0, title: "Zoom Out", children: o(st, { sx: { padding: "0", "&:hover:not([disabled])": { color: (D) => D.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (D) => {
956
956
  D.button !== 0 ? D.preventDefault() : w(D);
957
- }, children: o(he, { iconKey: "Remove" }) }) }), o(Ql, { ref: f, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (D) => `0px 0px 0px 3px ${kr(D.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (D) => `0px 0px 0px 2px ${kr(D.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: s ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: !1, min: 0, step: 1, value: u, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => d(!1), onWheel: (D) => {
957
+ }, children: o(xe, { iconKey: "Remove" }) }) }), o(Ql, { ref: f, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (D) => `0px 0px 0px 3px ${kr(D.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (D) => `0px 0px 0px 2px ${kr(D.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: s ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: !1, min: 0, step: 1, value: u, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => d(!1), onWheel: (D) => {
958
958
  g(m(gt.findNextStep(t.getView().getZoomScale(), D.deltaY < 0, 10)));
959
959
  }, onKeyDown: (D) => {
960
960
  D.which === me.Down || D.which === me.Right ? (g(m(gt.findNextStep(t.getView().getZoomScale(), !0, 10))), D.preventDefault()) : D.which === me.Up || D.which === me.Left ? (g(m(gt.findNextStep(t.getView().getZoomScale(), !1, 10))), D.preventDefault()) : D.which !== me.Enter && D.which !== me.Escape || h();
961
- }, onChange: (D, T) => {
962
- Math.abs(T - 100) < 3 ? g(100) : g(T);
963
- }, valueLabelFormat: (D, T) => `Zoom: ${Math.round(p)}%` }), o(vt, { disableInteractive: !0, title: "Zoom In", children: o(st, { sx: { padding: "0", "&:hover:not([disabled])": { color: (D) => D.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (D) => {
961
+ }, onChange: (D, E) => {
962
+ Math.abs(E - 100) < 3 ? g(100) : g(E);
963
+ }, valueLabelFormat: (D, E) => `Zoom: ${Math.round(p)}%` }), o(kt, { disableInteractive: !0, title: "Zoom In", children: o(st, { sx: { padding: "0", "&:hover:not([disabled])": { color: (D) => D.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (D) => {
964
964
  D.button !== 0 ? D.preventDefault() : v(D);
965
- }, children: o(he, { iconKey: "Add" }) }) }), H(B, { sx: { display: "flex", flexDirection: "row" }, children: [o(B, { sx: { minWidth: "8px" } }), o(Pe, { noWrap: !0, component: "div", onClick: () => {
965
+ }, children: o(xe, { iconKey: "Add" }) }) }), H(B, { sx: { display: "flex", flexDirection: "row" }, children: [o(B, { sx: { minWidth: "8px" } }), o(Pe, { noWrap: !0, component: "div", onClick: () => {
966
966
  g(100);
967
967
  }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: C }, children: o("div", { children: Math.round(p) + "%" }) })] })] });
968
968
  }));
@@ -970,7 +970,7 @@ Ya.displayName = "SheetZoomScale";
970
970
  const Za = q(X((n, a) => {
971
971
  const { sx: t, sheet: e, gridStyle: r, children: l, childrenEnd: c, ...p } = n;
972
972
  ql(a, () => ({}));
973
- const i = xe(null);
973
+ const i = be(null);
974
974
  de(() => {
975
975
  const m = (u) => u.preventDefault();
976
976
  return i.current?.addEventListener("wheel", m, { passive: !1 }), () => {
@@ -984,7 +984,7 @@ const Za = q(X((n, a) => {
984
984
  return H(B, { ref: i, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: x ? "visible" : "hidden", boxShadow: `0px -1px 0px ${r.header.edgeStrokeFill}`, ...t }, onMouseOver: () => g(!0), onMouseLeave: () => g(!1), ...p, children: [l, o("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (m) => m.palette.text.secondary }, variant: "caption", children: d }) }), c ? o(B, { sx: { display: "flex", alignItems: "center" }, children: c }) : null, o(Q, { style: { marginTop: "6px", marginBottom: "6px" } }), o(Ya, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: e })] });
985
985
  }));
986
986
  Za.displayName = "StatusBar";
987
- var Rr, Mr, vn, Nr, Fr, Ho = { exports: {} }, fo = {}, bo = { exports: {} }, Or = {}, Br = { exports: {} };
987
+ var Rr, Mr, vn, Nr, Fr, Ho = { exports: {} }, fo = {}, bo = { exports: {} }, Br = {}, Or = { exports: {} };
988
988
  function wc() {
989
989
  return Mr ? Rr : (Mr = 1, Rr = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
990
990
  }
@@ -1012,7 +1012,7 @@ function Sc() {
1012
1012
  }, vn;
1013
1013
  }
1014
1014
  function dn() {
1015
- return Fr || (Fr = 1, Br.exports = Sc()()), Br.exports;
1015
+ return Fr || (Fr = 1, Or.exports = Sc()()), Or.exports;
1016
1016
  }
1017
1017
  var Ar, Wo = { exports: {} }, Ir, ze = {}, xt = {};
1018
1018
  function pn() {
@@ -1416,16 +1416,16 @@ function kc() {
1416
1416
  return this.props?.nodeRef?.current ?? e.default.findDOMNode(this);
1417
1417
  }
1418
1418
  render() {
1419
- const { axis: b, bounds: y, children: f, defaultPosition: h, defaultClassName: w, defaultClassNameDragging: v, defaultClassNameDragged: S, position: C, positionOffset: D, scale: T, ...P } = this.props;
1419
+ const { axis: b, bounds: y, children: f, defaultPosition: h, defaultClassName: w, defaultClassNameDragging: v, defaultClassNameDragged: S, position: C, positionOffset: D, scale: E, ...P } = this.props;
1420
1420
  let R = {}, k = null;
1421
- const E = !C || this.state.dragging, M = C || h, I = { x: (0, c.canDragX)(this) && E ? this.state.x : M.x, y: (0, c.canDragY)(this) && E ? this.state.y : M.y };
1421
+ const T = !C || this.state.dragging, F = C || h, I = { x: (0, c.canDragX)(this) && T ? this.state.x : F.x, y: (0, c.canDragY)(this) && T ? this.state.y : F.y };
1422
1422
  this.state.isElementSVG ? k = (0, l.createSVGTransform)(I, D) : R = (0, l.createCSSTransform)(I, D);
1423
- const F = (0, r.clsx)(f.props.className || "", w, { [v]: this.state.dragging, [S]: this.state.dragged });
1424
- return a.createElement(i.default, x({}, P, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), a.cloneElement(a.Children.only(f), { className: F, style: { ...f.props.style, ...R }, transform: k }));
1423
+ const O = (0, r.clsx)(f.props.className || "", w, { [v]: this.state.dragging, [S]: this.state.dragged });
1424
+ return a.createElement(i.default, x({}, P, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), a.cloneElement(a.Children.only(f), { className: O, style: { ...f.props.style, ...R }, transform: k }));
1425
1425
  }
1426
1426
  }
1427
1427
  n.default = m, g(m, "displayName", "Draggable"), g(m, "propTypes", { ...i.default.propTypes, axis: t.default.oneOf(["both", "x", "y", "none"]), bounds: t.default.oneOfType([t.default.shape({ left: t.default.number, right: t.default.number, top: t.default.number, bottom: t.default.number }), t.default.string, t.default.oneOf([!1])]), defaultClassName: t.default.string, defaultClassNameDragging: t.default.string, defaultClassNameDragged: t.default.string, defaultPosition: t.default.shape({ x: t.default.number, y: t.default.number }), positionOffset: t.default.shape({ x: t.default.oneOfType([t.default.number, t.default.string]), y: t.default.oneOfType([t.default.number, t.default.string]) }), position: t.default.shape({ x: t.default.number, y: t.default.number }), className: p.dontSetMe, style: p.dontSetMe, transform: p.dontSetMe }), g(m, "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 });
1428
- })(Or)), Or;
1428
+ })(Br)), Br;
1429
1429
  }
1430
1430
  function ei() {
1431
1431
  if (Vr) return bo.exports;
@@ -1583,24 +1583,24 @@ function oi() {
1583
1583
  var w = this.props, v = w.minConstraints, S = w.maxConstraints, C = w.lockAspectRatio;
1584
1584
  if (!v && !S && !C) return [f, h];
1585
1585
  if (C) {
1586
- var D = this.props.width / this.props.height, T = f - this.props.width, P = h - this.props.height;
1587
- Math.abs(T) > Math.abs(P * D) ? h = f / D : f = h * D;
1586
+ var D = this.props.width / this.props.height, E = f - this.props.width, P = h - this.props.height;
1587
+ Math.abs(E) > Math.abs(P * D) ? h = f / D : f = h * D;
1588
1588
  }
1589
- var R = f, k = h, E = this.slack || [0, 0], M = E[0], I = E[1];
1590
- return f += M, h += I, v && (f = Math.max(v[0], f), h = Math.max(v[1], h)), S && (f = Math.min(S[0], f), h = Math.min(S[1], h)), this.slack = [M + (R - f), I + (k - h)], [f, h];
1589
+ var R = f, k = h, T = this.slack || [0, 0], F = T[0], I = T[1];
1590
+ return f += F, h += I, v && (f = Math.max(v[0], f), h = Math.max(v[1], h)), S && (f = Math.min(S[0], f), h = Math.min(S[1], h)), this.slack = [F + (R - f), I + (k - h)], [f, h];
1591
1591
  }, y.resizeHandler = function(f, h) {
1592
1592
  var w = this;
1593
1593
  return function(v, S) {
1594
- var C = S.node, D = S.deltaX, T = S.deltaY;
1594
+ var C = S.node, D = S.deltaX, E = S.deltaY;
1595
1595
  f === "onResizeStart" && w.resetData();
1596
1596
  var P = (w.props.axis === "both" || w.props.axis === "x") && h !== "n" && h !== "s", R = (w.props.axis === "both" || w.props.axis === "y") && h !== "e" && h !== "w";
1597
1597
  if (P || R) {
1598
- var k = h[0], E = h[h.length - 1], M = C.getBoundingClientRect();
1599
- w.lastHandleRect != null && (E === "w" && (D += M.left - w.lastHandleRect.left), k === "n" && (T += M.top - w.lastHandleRect.top)), w.lastHandleRect = M, E === "w" && (D = -D), k === "n" && (T = -T);
1600
- var I = w.props.width + (P ? D / w.props.transformScale : 0), F = w.props.height + (R ? T / w.props.transformScale : 0), L = w.runConstraints(I, F);
1601
- I = L[0], F = L[1];
1602
- var O = I !== w.props.width || F !== w.props.height, z = typeof w.props[f] == "function" ? w.props[f] : null;
1603
- z && !(f === "onResize" && !O) && (v.persist == null || v.persist(), z(v, { node: C, size: { width: I, height: F }, handle: h })), f === "onResizeStop" && w.resetData();
1598
+ var k = h[0], T = h[h.length - 1], F = C.getBoundingClientRect();
1599
+ w.lastHandleRect != null && (T === "w" && (D += F.left - w.lastHandleRect.left), k === "n" && (E += F.top - w.lastHandleRect.top)), w.lastHandleRect = F, T === "w" && (D = -D), k === "n" && (E = -E);
1600
+ var I = w.props.width + (P ? D / w.props.transformScale : 0), O = w.props.height + (R ? E / w.props.transformScale : 0), L = w.runConstraints(I, O);
1601
+ I = L[0], O = L[1];
1602
+ var N = I !== w.props.width || O !== w.props.height, z = typeof w.props[f] == "function" ? w.props[f] : null;
1603
+ z && !(f === "onResize" && !N) && (v.persist == null || v.persist(), z(v, { node: C, size: { width: I, height: O }, handle: h })), f === "onResizeStop" && w.resetData();
1604
1604
  }
1605
1605
  };
1606
1606
  }, y.renderResizeHandle = function(f, h) {
@@ -1614,15 +1614,15 @@ function oi() {
1614
1614
  h.width, h.height, h.handle, h.handleSize, h.lockAspectRatio, h.axis, h.minConstraints, h.maxConstraints, h.onResize, h.onResizeStop, h.onResizeStart;
1615
1615
  var C = h.resizeHandles;
1616
1616
  h.transformScale;
1617
- var D = (function(T, P) {
1618
- if (T == null) return {};
1619
- var R, k, E = {}, M = Object.keys(T);
1620
- for (k = 0; k < M.length; k++) R = M[k], P.indexOf(R) >= 0 || (E[R] = T[R]);
1621
- return E;
1617
+ var D = (function(E, P) {
1618
+ if (E == null) return {};
1619
+ var R, k, T = {}, F = Object.keys(E);
1620
+ for (k = 0; k < F.length; k++) R = F[k], P.indexOf(R) >= 0 || (T[R] = E[R]);
1621
+ return T;
1622
1622
  })(h, r);
1623
- return (0, t.cloneElement)(w, i(i({}, D), {}, { className: (v ? v + " " : "") + "react-resizable", children: [].concat(w.props.children, C.map(function(T) {
1624
- var P, R = (P = f.handleRefs[T]) != null ? P : f.handleRefs[T] = n.createRef();
1625
- return n.createElement(a.DraggableCore, c({}, S, { nodeRef: R, key: "resizableHandle-" + T, onStop: f.resizeHandler("onResizeStop", T), onStart: f.resizeHandler("onResizeStart", T), onDrag: f.resizeHandler("onResize", T) }), f.renderResizeHandle(T, R));
1623
+ return (0, t.cloneElement)(w, i(i({}, D), {}, { className: (v ? v + " " : "") + "react-resizable", children: [].concat(w.props.children, C.map(function(E) {
1624
+ var P, R = (P = f.handleRefs[E]) != null ? P : f.handleRefs[E] = n.createRef();
1625
+ return n.createElement(a.DraggableCore, c({}, S, { nodeRef: R, key: "resizableHandle-" + E, onStop: f.resizeHandler("onResizeStop", E), onStart: f.resizeHandler("onResizeStart", E), onDrag: f.resizeHandler("onResize", E) }), f.renderResizeHandle(E, R));
1626
1626
  })) }));
1627
1627
  }, b;
1628
1628
  })(n.Component);
@@ -1720,15 +1720,15 @@ function Tc() {
1720
1720
  }, y.prototype.render = function() {
1721
1721
  var f = this.props, h = f.handle, w = f.handleSize;
1722
1722
  f.onResize;
1723
- var v = f.onResizeStart, S = f.onResizeStop, C = f.draggableOpts, D = f.minConstraints, T = f.maxConstraints, P = f.lockAspectRatio, R = f.axis;
1723
+ var v = f.onResizeStart, S = f.onResizeStop, C = f.draggableOpts, D = f.minConstraints, E = f.maxConstraints, P = f.lockAspectRatio, R = f.axis;
1724
1724
  f.width, f.height;
1725
- var k = f.resizeHandles, E = f.style, M = f.transformScale, I = (function(F, L) {
1726
- if (F == null) return {};
1727
- var O, z, ie = {}, J = Object.keys(F);
1728
- for (z = 0; z < J.length; z++) O = J[z], L.indexOf(O) >= 0 || (ie[O] = F[O]);
1725
+ var k = f.resizeHandles, T = f.style, F = f.transformScale, I = (function(O, L) {
1726
+ if (O == null) return {};
1727
+ var N, z, ie = {}, J = Object.keys(O);
1728
+ for (z = 0; z < J.length; z++) N = J[z], L.indexOf(N) >= 0 || (ie[N] = O[N]);
1729
1729
  return ie;
1730
1730
  })(f, r);
1731
- return n.createElement(t.default, { axis: R, draggableOpts: C, handle: h, handleSize: w, height: this.state.height, lockAspectRatio: P, maxConstraints: T, minConstraints: D, onResizeStart: v, onResize: this.onResize, onResizeStop: S, resizeHandles: k, transformScale: M, width: this.state.width }, n.createElement("div", p({}, I, { style: s(s({}, E), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
1731
+ return n.createElement(t.default, { axis: R, draggableOpts: C, handle: h, handleSize: w, height: this.state.height, lockAspectRatio: P, maxConstraints: E, minConstraints: D, onResizeStart: v, onResize: this.onResize, onResizeStop: S, resizeHandles: k, transformScale: F, width: this.state.width }, n.createElement("div", p({}, I, { style: s(s({}, T), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
1732
1732
  }, y;
1733
1733
  })(n.Component);
1734
1734
  return wo.default = g, g.propTypes = s(s({}, e.resizableProps), {}, { children: a.default.element }), wo;
@@ -1737,7 +1737,7 @@ var Ec = (Kr || (Kr = 1, Ho.exports = function() {
1737
1737
  throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
1738
1738
  }, Ho.exports.Resizable = oi().default, Ho.exports.ResizableBox = Tc().default), Ho.exports);
1739
1739
  const ni = q(X((n, a) => {
1740
- const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: p = !1, commandPopupButtonProps: i, sx: s, ...d } = n, x = cn(), [g, m] = _(null), [u, b] = _(() => r.getSelectedRanges().getCoords()), [y, f] = _(!1), { reference: h } = ao({ parentFloat: i?.parentFloat }), [w, v] = _(() => c || !r.getProtection().isStructureAllowed()), S = () => g?.text ?? "", [C, D] = _(S), T = Y(() => {
1740
+ const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: p = !1, commandPopupButtonProps: i, sx: s, ...d } = n, x = cn(), [g, m] = _(null), [u, b] = _(() => r.getSelectedRanges().getCoords()), [y, f] = _(!1), { reference: h } = ao({ parentFloat: i?.parentFloat }), [w, v] = _(() => c || !r.getProtection().isStructureAllowed()), S = () => g?.text ?? "", [C, D] = _(S), E = Y(() => {
1741
1741
  if (h?.closeAll(), !C) {
1742
1742
  const V = S();
1743
1743
  return D(S()), V;
@@ -1766,7 +1766,7 @@ const ni = q(X((n, a) => {
1766
1766
  let V = e.getByName(C);
1767
1767
  w || V || (V = e.addReference(C, ee)), V && m({ text: V.getName() });
1768
1768
  } catch (V) {
1769
- D(S()), x.showMessage?.(V.message, { type: wt.Error });
1769
+ D(S()), x.showMessage?.(V.message, { type: St.Error });
1770
1770
  }
1771
1771
  return null;
1772
1772
  }, [C, e, h, w, x]), P = Y(() => {
@@ -1791,22 +1791,22 @@ const ni = q(X((n, a) => {
1791
1791
  } }), de(() => {
1792
1792
  D(S());
1793
1793
  }, [g, u]);
1794
- const [E, M] = _(r?.getSelectedSheet());
1794
+ const [T, F] = _(r?.getSelectedSheet());
1795
1795
  We(r, { onProtectionChange: (j) => {
1796
1796
  v(c || !j.getProtection().isStructureAllowed());
1797
1797
  }, onSheetsChange: (j) => {
1798
- M(j?.getSelectedSheet());
1798
+ F(j?.getSelectedSheet());
1799
1799
  }, onViewChange(j) {
1800
- M(j?.getSelectedSheet());
1800
+ F(j?.getSelectedSheet());
1801
1801
  } });
1802
- const [I, F] = _(null), L = Y(gt.debounce(P, I ? 320 : 0), []);
1803
- We(E.getSelection(), { onChange: () => {
1802
+ const [I, O] = _(null), L = Y(gt.debounce(P, I ? 320 : 0), []);
1803
+ We(T.getSelection(), { onChange: () => {
1804
1804
  b((j) => {
1805
1805
  const K = r.getSelectedRanges().getCoords();
1806
1806
  return Nl.isEqualRangesArrays(K, j) ? j : K;
1807
1807
  });
1808
1808
  }, onAdjustingChange: (j) => {
1809
- F(j.getAdjusting());
1809
+ O(j.getAdjusting());
1810
1810
  } }), de(() => {
1811
1811
  if (I) {
1812
1812
  const j = r.getSelectedRange(), K = j.getRowCount(), ee = j.getColumnCount();
@@ -1815,14 +1815,14 @@ const ni = q(X((n, a) => {
1815
1815
  }
1816
1816
  m({ text: r.getSelectedSheet().getSelectedRange().toString() }), L();
1817
1817
  }, [u, r, I]);
1818
- const O = xe(null), z = U((j) => {
1818
+ const N = be(null), z = U((j) => {
1819
1819
  const { onMouseDown: K, onMouseUp: ee, ...V } = j;
1820
- return o(st, { ...V, sx: { ...V?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: o(Kn, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: !1, spellCheck: !1, autoComplete: "off", ref: O }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (A) => `1px solid ${A.palette.text.icon ?? A.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (A) => `1px solid ${A.palette.primary.main}` }, "::after": { borderBottom: (A) => `1px solid ${A.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * Ht.getDeviceScale(), fontStyle: g?.fontStyle, paddingLeft: (A) => A.spacing(0.75), paddingRight: (A) => A.spacing(0.75), boxShadow: "none", flex: "1", color: (A) => A.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (A) => A.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (A) => A.palette.text.primary } } }, value: C, onFocus: (A) => {
1820
+ return o(st, { ...V, sx: { ...V?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: o(Kn, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: !1, spellCheck: !1, autoComplete: "off", ref: N }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (A) => `1px solid ${A.palette.text.icon ?? A.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (A) => `1px solid ${A.palette.primary.main}` }, "::after": { borderBottom: (A) => `1px solid ${A.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * Ht.getDeviceScale(), fontStyle: g?.fontStyle, paddingLeft: (A) => A.spacing(0.75), paddingRight: (A) => A.spacing(0.75), boxShadow: "none", flex: "1", color: (A) => A.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (A) => A.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (A) => A.palette.text.primary } } }, value: C, onFocus: (A) => {
1821
1821
  A.target?.select();
1822
1822
  }, onKeyDown: (A) => {
1823
1823
  if (A.which === me.Enter || A.which === me.Tab) {
1824
1824
  let Z = C;
1825
- S() !== C && (A.stopPropagation(), A.preventDefault(), Z = T()), Z ? ie(Z) : l?.();
1825
+ S() !== C && (A.stopPropagation(), A.preventDefault(), Z = E()), Z ? ie(Z) : l?.();
1826
1826
  } else if (A.which === me.Escape) S() !== C ? (D(S()), setTimeout(() => {
1827
1827
  A.target?.select();
1828
1828
  }, 0), A.stopPropagation(), A.preventDefault()) : l?.();
@@ -1838,7 +1838,7 @@ const ni = q(X((n, a) => {
1838
1838
  const K = e.lookupByRanges(j)?.[0];
1839
1839
  K && await K?.select(), await r.getRanges(j)?.select();
1840
1840
  } catch (K) {
1841
- x.showMessage?.(K.message, { type: wt.Error });
1841
+ x.showMessage?.(K.message, { type: St.Error });
1842
1842
  }
1843
1843
  }, [e, x, r]), J = U((j) => {
1844
1844
  setTimeout(() => {
@@ -1854,12 +1854,12 @@ const ni = q(X((n, a) => {
1854
1854
  const Ve = Ne.getType();
1855
1855
  Ve !== ee[ve - 1]?.getType() && (ve > 0 && Z.push(o(Q, { orientation: "horizontal" }, `type-divider-${Z.length}`)), Z.push(o(ro, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: Ne.getType() === "reference" ? "Ranges" : "Tables" }, `type-header-${Z.length}`))), Ve === "reference" ? Z.push(ke(tt, { ...K, key: "named-" + Z.length, popupCommandKeys: V, popupScope: "namedItem", scope: "namedItem", commandState: Ne, commands: i?.commands, label: Ne.getName(), quickCommand: "selectNamed", disabled: !Ne.getRanges() || p, icon: "NamedRange" })) : Ve === "table" && Z.push(ke(tt, { ...K, key: "namedItem-" + Z.length, popupCommandKeys: A, popupScope: "namedItem", scope: "namedItem", commands: i?.commands, commandState: Ne, label: Ne.getName(), quickCommand: "selectNamed", disabled: !_e || p, icon: "InsertTable" }));
1856
1856
  }
1857
- const Be = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...d, children: [w ? null : o(N, { ...K, scope: "namedItem", command: i?.commands.getCommand("addNamedReference") }), Z && Z.length > 0 ? H(le, { children: [w ? null : o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: Z })] }) : null] });
1858
- return ge({ ...j, children: Be });
1859
- }, [r, R, e, g, w]), pe = Ct(a, () => ({ focus(j) {
1860
- O.current?.focus(j);
1857
+ const Oe = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...d, children: [w ? null : o(M, { ...K, scope: "namedItem", command: i?.commands.getCommand("addNamedReference") }), Z && Z.length > 0 ? H(le, { children: [w ? null : o(Q, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: Z })] }) : null] });
1858
+ return he({ ...j, children: Oe });
1859
+ }, [r, R, e, g, w]), pe = Tt(a, () => ({ focus(j) {
1860
+ N.current?.focus(j);
1861
1861
  } }), []);
1862
- return o(B, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: $t([pe, a]), ...d, children: o(kt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...s }, buttonProps: { sx: { backgroundColor: (j) => j.palette.background.paper, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` } }, tabIndex: -1, outlined: { color: (j) => t ? j.palette.action.disabled : ye(j.palette.divider, 0.2) }, parentFloat: h, createPopupPanel: J, onPopupOpen: () => f(!0), onPopupClose: () => f(!1), createTooltip: ({ children: j }, K) => o(nt, { title: K || y ? "" : "Name Box", disabled: K, leaveDelay: 0, sx: { opacity: K || y ? 0 : 1 }, children: j }), createQuickButton: z }) });
1862
+ return o(B, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: $t([pe, a]), ...d, children: o(Ct, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...s }, buttonProps: { sx: { backgroundColor: (j) => j.palette.background.paper, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` } }, tabIndex: -1, outlined: { color: (j) => t ? j.palette.action.disabled : ye(j.palette.divider, 0.2) }, parentFloat: h, createPopupPanel: J, onPopupOpen: () => f(!0), onPopupClose: () => f(!1), createTooltip: ({ children: j }, K) => o(nt, { title: K || y ? "" : "Name Box", disabled: K, leaveDelay: 0, sx: { opacity: K || y ? 0 : 1 }, children: j }), createQuickButton: z }) });
1863
1863
  }));
1864
1864
  ni.displayName = "NamedCollectionEditor";
1865
1865
  const Dc = (n, a) => o(ni, { ref: a, ...n }), ri = q(X((n, a) => {
@@ -1869,54 +1869,54 @@ const Dc = (n, a) => o(ni, { ref: a, ...n }), ri = q(X((n, a) => {
1869
1869
  }, onViewChange(A) {
1870
1870
  m(A?.getSelectedSheet());
1871
1871
  } });
1872
- const [u, b] = _(g.getSelection().getCoords().cell), y = g.getRange(u).getCell(), f = s || !y.isEditAllowed(), h = xe(null), w = W(() => ({ fontSize: 11 }), []);
1872
+ const [u, b] = _(g.getSelection().getCoords().cell), y = g.getRange(u).getCell(), f = s || !y.isEditAllowed(), h = be(null), w = W(() => ({ fontSize: 11 }), []);
1873
1873
  We(g.getSelection(), { onChange: () => {
1874
1874
  b(g.getSelection().getCoords().cell);
1875
1875
  } }), We(g, { onProtectionChange() {
1876
1876
  b(g.getSelection().getCoords().cell);
1877
1877
  } });
1878
- const v = h.current?.getLineHeight() ?? 20, [S, C] = _(v), [D, T] = _(5), [P, R] = _(1), k = Y((A, { size: Z }) => {
1878
+ const v = h.current?.getLineHeight() ?? 20, [S, C] = _(v), [D, E] = _(5), [P, R] = _(1), k = Y((A, { size: Z }) => {
1879
1879
  A.preventDefault(), A.stopPropagation();
1880
1880
  const oe = Math.floor(Z.height / v);
1881
- C(oe * v + 1), oe > 1 && T(oe);
1882
- }, [v]), E = Y((A, { size: Z }) => {
1881
+ C(oe * v + 1), oe > 1 && E(oe);
1882
+ }, [v]), T = Y((A, { size: Z }) => {
1883
1883
  const oe = Math.floor(Z.height / v);
1884
1884
  R(oe);
1885
- }, [v]), M = sn(), I = M.getMode();
1886
- let F = null;
1887
- I?.key === "edit" && (F = I.args?.stateAndCoords);
1885
+ }, [v]), F = sn(), I = F.getMode();
1886
+ let O = null;
1887
+ I?.key === "edit" && (O = I.args?.stateAndCoords);
1888
1888
  const L = W(() => {
1889
- let A = F?.editState;
1889
+ let A = O?.editState;
1890
1890
  return A || (A = Al(() => g.getRange(u).getCell())), o(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: o(Il, { ref: h, activeCoords: u, sheet: g, onFocus: () => {
1891
1891
  r?.startEdit({ autoFocus: !1, editMode: !0, cell: u });
1892
1892
  }, defaultTextStyle: w, useRichStyling: !1, disabled: f, onChangeEdit: (Z) => {
1893
1893
  if (Z.dirty !== void 0) {
1894
1894
  const oe = { sheet: g, coords: u, editState: Z };
1895
- M.setMode((Be) => ({ ...Be, args: { ...Be?.args, stateAndCoords: oe } }));
1895
+ F.setMode((Oe) => ({ ...Oe, args: { ...Oe?.args, stateAndCoords: oe } }));
1896
1896
  }
1897
1897
  }, editState: A, commands: d, onCancelEdit: () => {
1898
1898
  r?.cancelEdit(), r?.focus();
1899
1899
  }, onSubmitEdit: () => {
1900
1900
  r?.submitEdit(), r?.focus();
1901
1901
  }, linesVisible: P }) });
1902
- }, [g, F, u, P, r]), O = xe(null), z = W(() => c ? i({ names: e.getNames(), workbook: e, ...p }, O) : null, [i, p, c, g, e, f]), ie = W(() => H(no, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px` }, children: [o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: o(he, { iconKey: "CloseError" }), tooltipProps: { label: "Cancel", simple: !0 }, disabled: f || F === null, onMouseDown: (A) => {
1902
+ }, [g, O, u, P, r]), N = be(null), z = W(() => c ? i({ names: e.getNames(), workbook: e, ...p }, N) : null, [i, p, c, g, e, f]), ie = W(() => H(no, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px` }, children: [o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: o(xe, { iconKey: "CloseError" }), tooltipProps: { label: "Cancel", simple: !0 }, disabled: f || O === null, onMouseDown: (A) => {
1903
1903
  A.button === 0 && A.preventDefault();
1904
1904
  }, onClick: () => {
1905
1905
  r.cancelEdit();
1906
- } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(he, { iconKey: "CheckSuccess" }), tooltipProps: { label: "Enter", simple: !0 }, disabled: f || F === null, onMouseDown: (A) => {
1906
+ } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(xe, { iconKey: "CheckSuccess" }), tooltipProps: { label: "Enter", simple: !0 }, disabled: f || O === null, onMouseDown: (A) => {
1907
1907
  A.button === 0 && A.preventDefault();
1908
1908
  }, onClick: () => {
1909
1909
  r.submitEdit();
1910
- } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: o(he, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: !0 }, onMouseDown: (A) => {
1910
+ } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: o(xe, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: !0 }, onMouseDown: (A) => {
1911
1911
  A.button === 0 && A.preventDefault();
1912
- } })] }), [f, F]), J = Ke(), [pe, j] = _(!1), K = W(() => H(B, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (A) => A.spacing(0.5), alignItems: "start" }, children: [ie, H(no, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (A) => A.typography.fontFamily, fontSize: 11 * Ht.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (A) => `${A.shape.borderRadius}px`, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px`, "& textarea": { color: (A) => f ? `${A.palette.text.disabled} !important` : A.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => j(!0), onBlur: () => j(!1), onMouseDown: (A) => {
1912
+ } })] }), [f, O]), J = Ke(), [pe, j] = _(!1), K = W(() => H(B, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (A) => A.spacing(0.5), alignItems: "start" }, children: [ie, H(no, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (A) => A.typography.fontFamily, fontSize: 11 * Ht.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (A) => `${A.shape.borderRadius}px`, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px`, "& textarea": { color: (A) => f ? `${A.palette.text.disabled} !important` : A.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => j(!0), onBlur: () => j(!1), onMouseDown: (A) => {
1913
1913
  A.target?.classList.contains("react-resizable-handle") && A.preventDefault();
1914
- }, children: [o(B, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (A) => A.spacing(1), paddingRight: (A) => A.spacing(1) }, children: o(Ec.ResizableBox, { height: S, draggableOpts: { grid: [v, v] }, minConstraints: [v, v], maxConstraints: [15 * v, 15 * v], onResize: E, onResizeStop: k, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: L }) }), o(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: o(he, { iconKey: P > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (P > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (A) => {
1914
+ }, children: [o(B, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (A) => A.spacing(1), paddingRight: (A) => A.spacing(1) }, children: o(Ec.ResizableBox, { height: S, draggableOpts: { grid: [v, v] }, minConstraints: [v, v], maxConstraints: [15 * v, 15 * v], onResize: T, onResizeStop: k, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: L }) }), o(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: o(xe, { iconKey: P > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (P > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (A) => {
1915
1915
  A.button === 0 && A.preventDefault();
1916
1916
  }, onClick: () => {
1917
1917
  const A = P > 1 ? 1 : D;
1918
1918
  C(A * v + 1), R(A);
1919
- } }), o(B, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: pe ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (A) => A.palette.primary.main, borderRadius: (A) => `${A.shape.borderRadius}px` } })] })] }), [ie, L, pe, P, v]), ee = W(() => z || K ? !z && K ? K : z && !K ? z : o(le, { children: o(Qn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${J.palette.text.icon ?? J.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center 6.5px", minWidth: "18px" } }, elementBefore: z, elementAfter: K }) }) : null, [z, K]), V = Ct(a, () => ({ isFormulaBarElement: () => !0, getNamedCollectionEditorElement: () => O.current }), []);
1919
+ } }), o(B, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: pe ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (A) => A.palette.primary.main, borderRadius: (A) => `${A.shape.borderRadius}px` } })] })] }), [ie, L, pe, P, v]), ee = W(() => z || K ? !z && K ? K : z && !K ? z : o(le, { children: o(Qn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${J.palette.text.icon ?? J.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center 6.5px", minWidth: "18px" } }, elementBefore: z, elementAfter: K }) }) : null, [z, K]), V = Tt(a, () => ({ isFormulaBarElement: () => !0, getNamedCollectionEditorElement: () => N.current }), []);
1920
1920
  return o(B, { sx: { display: "flex", flexDirection: "row", gap: (A) => A.spacing(0.5), ...t }, ref: V, ...x, children: ee });
1921
1921
  }));
1922
1922
  ri.displayName = "FormulaBar";
@@ -1924,12 +1924,12 @@ const ai = q(X((n, a) => {
1924
1924
  const { filter: t, commands: e, disabled: r, sx: l, floatReference: c, ...p } = n, i = W(() => ({}), []), s = W(() => ({ commandHook: { beforeExecute: (g, m) => c.closeAll(), onExecute() {
1925
1925
  }, onError() {
1926
1926
  console.log("onError");
1927
- } }, disabled: r, parentFloat: c }), [r, c]), d = W(() => ({ ...i, ...s, variant: re.Menuitem }), [i, s]), x = H(le, { children: [o(N, { ...d, command: e.getCommand("sortAscending") }), o(N, { ...d, command: e.getCommand("sortDescending") }), o(Q, { orientation: "horizontal" }), o(N, { ...d, command: e.getCommand("autoFilterClear") }), []] });
1927
+ } }, disabled: r, parentFloat: c }), [r, c]), d = W(() => ({ ...i, ...s, variant: re.Menuitem }), [i, s]), x = H(le, { children: [o(M, { ...d, command: e.getCommand("sortAscending") }), o(M, { ...d, command: e.getCommand("sortDescending") }), o(Q, { orientation: "horizontal" }), o(M, { ...d, command: e.getCommand("autoFilterClear") }), []] });
1928
1928
  return o(B, { ref: a, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...l }, ...p, children: x });
1929
1929
  }));
1930
1930
  ai.displayName = "FilterColumnMenu";
1931
1931
  const Pc = q(X((n, a) => {
1932
- const { children: t, className: e, disabled: r, style: l, filter: c, ...p } = n, i = Ct(a, () => ({ isFilters: () => !0 }), []);
1932
+ const { children: t, className: e, disabled: r, style: l, filter: c, ...p } = n, i = Tt(a, () => ({ isFilters: () => !0 }), []);
1933
1933
  return o("div", { ref: i, className: Te("filters", e), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...p, children: H("div", { style: { flex: "1 1 100%", display: "flex", minHeight: "100px", minWidth: "220px", alignItems: "center", border: "grey solid 1px", padding: "4px 4px", overflow: "hidden", flexDirection: "column", justifyContent: "space-evenly", marginTop: "4px", marginBottom: "4px", marginLeft: "16px", marginRight: "16px" }, children: [o("div", { children: c.getName() }), o("div", { children: "Filter Widget" })] }) });
1934
1934
  }));
1935
1935
  Pc.displayName = "Filters";
@@ -1942,16 +1942,16 @@ const ii = q(X((n, a) => {
1942
1942
  }, onStyleChange: () => {
1943
1943
  D(e.getTabColor());
1944
1944
  } });
1945
- const T = Ke(), P = x === p;
1945
+ const E = Ke(), P = x === p;
1946
1946
  let R = null, k = null;
1947
1947
  if (C || g) {
1948
1948
  let I = y;
1949
- C ? (k = C.toBlackOrWhite().toCSS(), I = C?.toCSS()) : P || (I = T.palette.background.paper), R = o(B, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: P ? "50%" : "100%", borderRadius: "4px", border: (F) => P ? `${y} solid 1px` : `${F.palette.divider} solid 1px`, background: P && C ? `linear-gradient(0deg, ${I} 0%, transparent)` : I } });
1949
+ C ? (k = C.toBlackOrWhite().toCSS(), I = C?.toCSS()) : P || (I = E.palette.background.paper), R = o(B, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: P ? "50%" : "100%", borderRadius: "4px", border: (O) => P ? `${y} solid 1px` : `${O.palette.divider} solid 1px`, background: P && C ? `linear-gradient(0deg, ${I} 0%, transparent)` : I } });
1950
1950
  }
1951
- let E = null;
1952
- typeof m == "string" ? E = m : m?.toCSS && (E = m.toCSS());
1953
- const M = P ? o(B, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (I) => I.palette.primary.main } }) : null;
1954
- return o(Na, { theme: P ? h ?? T : T, children: o(B, { ref: a, className: Te(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: g ? "grabbing" : void 0 }, ...w, children: o(Ss, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: f, strokeColor: P ? E : "transparent", children: o(Jo, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: g ? "grabbing" : void 0, color: P ? "primary" : k || "text.secondary", backgroundColor: P ? y : "transparent", "&:hover:not([disabled])": { backgroundColor: P ? y : "transparent" }, "& input": { color: (I) => `${I.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: d, disableRipple: i, component: "div", children: H(le, { children: [R, H(B, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [H(B, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: P ? void 0 : "1px" }, children: [t, M] }), v ? o(he, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : o(B, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + p) }) }) });
1951
+ let T = null;
1952
+ typeof m == "string" ? T = m : m?.toCSS && (T = m.toCSS());
1953
+ const F = P ? o(B, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (I) => I.palette.primary.main } }) : null;
1954
+ return o(Na, { theme: P ? h ?? E : E, children: o(B, { ref: a, className: Te(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: g ? "grabbing" : void 0 }, ...w, children: o(Ss, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: f, strokeColor: P ? T : "transparent", children: o(Jo, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: g ? "grabbing" : void 0, color: P ? "primary" : k || "text.secondary", backgroundColor: P ? y : "transparent", "&:hover:not([disabled])": { backgroundColor: P ? y : "transparent" }, "& input": { color: (I) => `${I.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: d, disableRipple: i, component: "div", children: H(le, { children: [R, H(B, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [H(B, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: P ? void 0 : "1px" }, children: [t, F] }), v ? o(xe, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : o(B, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + p) }) }) });
1955
1955
  }));
1956
1956
  ii.displayName = "SheetTab";
1957
1957
  const li = q(X((n, a) => {
@@ -1962,13 +1962,13 @@ const li = q(X((n, a) => {
1962
1962
  const u = W(() => ({}), []), b = W(() => ({ commandHook: { beforeExecute: (h, w) => p.closeAll(), onExecute() {
1963
1963
  }, onError() {
1964
1964
  console.log("onError");
1965
- } }, scope: l, commandState: e, disabled: c || e === void 0, parentFloat: p }), [c, p]), y = W(() => ({ ...u, ...b }), [u, b]), f = H(le, { children: [o(N, { command: r.getCommand("addSheet"), commandState: e, ...y, variant: re.Menuitem }), o(N, { command: r.getCommand("deleteSheet"), ...y, variant: re.Menuitem }), H(ct, { onMouseDown: (h) => {
1965
+ } }, scope: l, commandState: e, disabled: c || e === void 0, parentFloat: p }), [c, p]), y = W(() => ({ ...u, ...b }), [u, b]), f = H(le, { children: [o(M, { command: r.getCommand("addSheet"), commandState: e, ...y, variant: re.Menuitem }), o(M, { command: r.getCommand("deleteSheet"), ...y, variant: re.Menuitem }), H(ct, { onMouseDown: (h) => {
1966
1966
  h.button === 0 && h.preventDefault();
1967
1967
  }, onMouseUp: () => {
1968
1968
  Promise.resolve(p.closeAll()).then(() => {
1969
1969
  d?.startEdit(e);
1970
1970
  });
1971
- }, disabled: c || !g.isStructureAllowed(), parentFloat: p, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), o(N, { command: r.getCommand("duplicateSheet"), ...y, variant: re.Menuitem }), o(N, { command: r?.getCommand("protectionSheetToggle"), ...y, variant: re.Menuitem }), o(No, { variant: re.Menuitem, command: r.getCommand("formatSheetTabColor"), icon: o(he, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Ro.End }, parentFloat: p }), o(Q, { orientation: "horizontal" }), o(N, { command: r.getCommand("hideSheet"), ...y, variant: re.Menuitem })] });
1971
+ }, disabled: c || !g.isStructureAllowed(), parentFloat: p, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), o(M, { command: r.getCommand("duplicateSheet"), ...y, variant: re.Menuitem }), o(M, { command: r?.getCommand("protectionSheetToggle"), ...y, variant: re.Menuitem }), o(No, { variant: re.Menuitem, command: r.getCommand("formatSheetTabColor"), icon: o(xe, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Ro.End }, parentFloat: p }), o(Q, { orientation: "horizontal" }), o(M, { command: r.getCommand("hideSheet"), ...y, variant: re.Menuitem })] });
1972
1972
  return o(B, { ref: a, className: Te("menu", s), sx: { ...i }, ...x, children: f });
1973
1973
  }));
1974
1974
  li.displayName = "SheetTabMenu";
@@ -1985,12 +1985,12 @@ const si = q(X((n, a) => {
1985
1985
  const f = u[y], h = f.getVisibility();
1986
1986
  if (h === Ft.Visibility.VeryHidden) continue;
1987
1987
  const w = b === f, v = f.getProtection().isLocked(), S = f.getTabColor(), C = e?.body.fill ?? "transparent";
1988
- let D = null, T = null, P = C;
1989
- S && (P = S.toCSS(), w || (T = S.toBlackOrWhite().toCSS()), D = o(B, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: w ? P : "transparent", borderRadius: "4px", border: `solid 1px ${e.header.edgeStrokeFill}` }, children: o(B, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: w || h === Ft.Visibility.Hidden ? "50%" : "100%", border: (k) => w ? `${C} solid 1.5px` : `${k.palette.divider} solid 1px`, background: w && S ? `linear-gradient(0deg, ${P} 0%, ${C})` : P, borderRadius: "4px" } }) }));
1988
+ let D = null, E = null, P = C;
1989
+ S && (P = S.toCSS(), w || (E = S.toBlackOrWhite().toCSS()), D = o(B, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: w ? P : "transparent", borderRadius: "4px", border: `solid 1px ${e.header.edgeStrokeFill}` }, children: o(B, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: w || h === Ft.Visibility.Hidden ? "50%" : "100%", border: (k) => w ? `${C} solid 1.5px` : `${k.palette.divider} solid 1px`, background: w && S ? `linear-gradient(0deg, ${P} 0%, ${C})` : P, borderRadius: "4px" } }) }));
1990
1990
  let R = null;
1991
- v && (R = o(he, { iconKey: "Lock" })), h !== Ft.Visibility.Visible && (R = o(he, { iconKey: "VisibilityOff", style: { opacity: d.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), R && (R = o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: R })), m.push(o(ct, { disabled: !d.isStructureAllowed() && h === Ft.Visibility.Hidden, sx: { color: (k) => {
1992
- let E = w ? k.palette.primary.main : k.palette.text.secondary;
1993
- return T && (E = T), h === Ft.Visibility.Hidden && (E = Qe(E, k.palette.action.disabledOpacity)), E;
1991
+ v && (R = o(xe, { iconKey: "Lock" })), h !== Ft.Visibility.Visible && (R = o(xe, { iconKey: "VisibilityOff", style: { opacity: d.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), R && (R = o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: R })), m.push(o(ct, { disabled: !d.isStructureAllowed() && h === Ft.Visibility.Hidden, sx: { color: (k) => {
1992
+ let T = w ? k.palette.primary.main : k.palette.text.secondary;
1993
+ return E && (T = E), h === Ft.Visibility.Hidden && (T = Qe(T, k.palette.action.disabledOpacity)), T;
1994
1994
  }, borderLeft: (k) => `${w ? k.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: w ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: w ? o(nn, {}) : void 0, onMouseDown: (k) => k.preventDefault(), onMouseUp: () => {
1995
1995
  Promise.resolve(r.closeAll()).then(() => {
1996
1996
  try {
@@ -2006,19 +2006,19 @@ const si = q(X((n, a) => {
2006
2006
  return o(B, { ref: a, className: Te("menu", c), ...p, children: g });
2007
2007
  }));
2008
2008
  si.displayName = "SheetsAllMenu";
2009
- let Vo = !1, ci = !1, Nt = null;
2009
+ let Vo = !1, ci = !1, wt = null;
2010
2010
  const Xr = async (n) => {
2011
2011
  const a = await Eo.getDetails();
2012
2012
  if (ci || a.isEval()) {
2013
2013
  try {
2014
2014
  const t = top ?? window;
2015
- t.SheetXL || (t.SheetXL = Object.freeze({ getSelectedWorkbook: () => Nt?.getWorkbook(), getSelectedSheet: () => Nt?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Nt?.getWorkbook().getSelectedRange(), getRange: (e) => Nt?.getWorkbook().getRange(e), getSelectedWorkbookElement: () => Nt, getLicenseManager: () => Eo, moreExamples: () => {
2015
+ t.SheetXL || (t.SheetXL = Object.freeze({ getSelectedWorkbook: () => wt?.getWorkbook(), getSelectedSheet: () => wt?.getWorkbook().getSelectedSheet(), getSelectedRange: () => wt?.getWorkbook().getSelectedRange(), getSelectedRanges: () => wt?.getWorkbook().getSelectedRanges(), getRange: (e) => wt?.getWorkbook().getRange(e), getSelectedWorkbookElement: () => wt, getLicenseManager: () => Eo, moreExamples: () => {
2016
2016
  console.table({ "SheetXL.getRange('Sheet1!e5:f6').setValues([[110, 220], [210, 220]])": { Summary: "Set an array of values." }, "SheetXL.getRange('a1:e5').setValue(100)": { Summary: "Set a single repeating value to a range." }, "SheetXL.getRange('Sheet1!e5:f6').getValues()": { Summary: "Get the values as a 2d array (see forEach)." }, "SheetXL.getSelectedRange().setValue(new Date())": { Summary: "Set current date/time using Javascript Date." }, "SheetXL.getSelectedRange().setValue('10/23/95')": { Summary: "Set current date/time using string." }, "SheetXL.getSelectedSheet().getUsedRange().getValues()": { Summary: "Get all of the values in a sheet." }, "SheetXL.getSelectedRange().getStyle().update({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').getStyle().update({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').getStyle().update({ style: { border: 'double blue' }})": { Summary: "Set border." }, "SheetXL.getCell().getStyle().fill.toCSS()": { Summary: "Get the fill style as css for the selected cell." }, "SheetXL.getRange('a1:a3').autoFill('a1:a7')": { Summary: "Autofill down." }, "SheetXL.getRange('e7:i9').merge({ orientation: 'rows' })": { Summary: "Merge cells horizontally." }, "SheetXL.getSelectedRange().sort({ ascending: false, hasHeader: false })": { Summary: "Sort selected cells ascending with a header." }, "SheetXL.getSelectedRange().clear('all')": { Summary: "Clear the current range a different way." }, "SheetXL.getSelectedSheet().getTables().add('b2:e9')": { Summary: "Create a 4x8 table at b2 for current sheet." }, "SheetXL.getRange('a1:c3').copyFrom('e1:g3')": { Summary: "Copy cells." }, "SheetXL.getRange('c:t').getColumnHeaders().setSize(30)": { Summary: "Set the size of columns to 30 pixels." }, "SheetXL.getRange('2:3').delete()": { Summary: "Remove rows 2 and 3 and shift up." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg')": { Summary: "Add an image." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg', { bounds: { height: 100 } })": { Summary: "Add an image of height 100." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue(1.50).getStyle().update({ numberFormat: '0%' }).autoFit(); }, 'Enter 150%')": { Summary: "Set value to 100 and numberformat to 0% as a single." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue('Remind Me Later').getStyle().update({ namedStyle: 'Note'}).autoFit(); }, 'Set Reminder')": { Summary: "Set a value and style to Note style and autofit text." }, "SheetXL.getSelectedWorkbook().getNames().addReference('Small_Range', 'A2:E5');": { Summary: "Add a named range." }, "SheetXL.getSelectedWorkbook().getRange('a1:e5').addListener((e) => { console.log('got an update for:', e.getSource().toString()) })": { Summary: "Listen for updates at a range." } });
2017
2017
  } }));
2018
2018
  } catch (t) {
2019
2019
  t instanceof DOMException || console.error(t), Vo = !0;
2020
2020
  }
2021
- if (Nt !== n && (Nt = n, !Vo)) try {
2021
+ if (wt !== n && (wt = n, !Vo)) try {
2022
2022
  Vo = !0, (top ?? window).SheetXL && (await Eo._validate(!0), Eo.wasPrinted() && (() => {
2023
2023
  to.consoleWithNoSource(`%cTip: You can access the API directly in the console.
2024
2024
  Try
@@ -2068,15 +2068,15 @@ function Yr(n, a) {
2068
2068
  const Zr = !1, ui = ae.createContext(null);
2069
2069
  var mi = function(n) {
2070
2070
  return n.scrollTop;
2071
- }, Po = "unmounted", Ot = "exited", Bt = "entering", Yt = "entered", Hn = "exiting", ht = (function(n) {
2071
+ }, Po = "unmounted", Bt = "exited", Ot = "entering", Yt = "entered", Hn = "exiting", ht = (function(n) {
2072
2072
  function a(e, r) {
2073
2073
  var l;
2074
2074
  l = n.call(this, e, r) || this;
2075
2075
  var c, p = r && !r.isMounting ? e.enter : e.appear;
2076
- return l.appearStatus = null, e.in ? p ? (c = Ot, l.appearStatus = Bt) : c = Yt : c = e.unmountOnExit || e.mountOnEnter ? Po : Ot, l.state = { status: c }, l.nextCallback = null, l;
2076
+ return l.appearStatus = null, e.in ? p ? (c = Bt, l.appearStatus = Ot) : c = Yt : c = e.unmountOnExit || e.mountOnEnter ? Po : Bt, l.state = { status: c }, l.nextCallback = null, l;
2077
2077
  }
2078
2078
  pi(a, n), a.getDerivedStateFromProps = function(e, r) {
2079
- return e.in && r.status === Po ? { status: Ot } : null;
2079
+ return e.in && r.status === Po ? { status: Bt } : null;
2080
2080
  };
2081
2081
  var t = a.prototype;
2082
2082
  return t.componentDidMount = function() {
@@ -2085,7 +2085,7 @@ var mi = function(n) {
2085
2085
  var r = null;
2086
2086
  if (e !== this.props) {
2087
2087
  var l = this.state.status;
2088
- this.props.in ? l !== Bt && l !== Yt && (r = Bt) : l !== Bt && l !== Yt || (r = Hn);
2088
+ this.props.in ? l !== Ot && l !== Yt && (r = Ot) : l !== Ot && l !== Yt || (r = Hn);
2089
2089
  }
2090
2090
  this.updateStatus(!1, r);
2091
2091
  }, t.componentWillUnmount = function() {
@@ -2094,19 +2094,19 @@ var mi = function(n) {
2094
2094
  var e, r, l, c = this.props.timeout;
2095
2095
  return e = r = l = c, c != null && typeof c != "number" && (e = c.exit, r = c.enter, l = c.appear !== void 0 ? c.appear : r), { exit: e, enter: r, appear: l };
2096
2096
  }, t.updateStatus = function(e, r) {
2097
- if (e === void 0 && (e = !1), r !== null) if (this.cancelNextCallback(), r === Bt) {
2097
+ if (e === void 0 && (e = !1), r !== null) if (this.cancelNextCallback(), r === Ot) {
2098
2098
  if (this.props.unmountOnExit || this.props.mountOnEnter) {
2099
2099
  var l = this.props.nodeRef ? this.props.nodeRef.current : Qt.findDOMNode(this);
2100
2100
  l && mi(l);
2101
2101
  }
2102
2102
  this.performEnter(e);
2103
2103
  } else this.performExit();
2104
- else this.props.unmountOnExit && this.state.status === Ot && this.setState({ status: Po });
2104
+ else this.props.unmountOnExit && this.state.status === Bt && this.setState({ status: Po });
2105
2105
  }, t.performEnter = function(e) {
2106
2106
  var r = this, l = this.props.enter, c = this.context ? this.context.isMounting : e, p = this.props.nodeRef ? [c] : [Qt.findDOMNode(this), c], i = p[0], s = p[1], d = this.getTimeouts(), x = c ? d.appear : d.enter;
2107
2107
  !e && !l || Zr ? this.safeSetState({ status: Yt }, function() {
2108
2108
  r.props.onEntered(i);
2109
- }) : (this.props.onEnter(i, s), this.safeSetState({ status: Bt }, function() {
2109
+ }) : (this.props.onEnter(i, s), this.safeSetState({ status: Ot }, function() {
2110
2110
  r.props.onEntering(i, s), r.onTransitionEnd(x, function() {
2111
2111
  r.safeSetState({ status: Yt }, function() {
2112
2112
  r.props.onEntered(i, s);
@@ -2117,11 +2117,11 @@ var mi = function(n) {
2117
2117
  var e = this, r = this.props.exit, l = this.getTimeouts(), c = this.props.nodeRef ? void 0 : Qt.findDOMNode(this);
2118
2118
  r && !Zr ? (this.props.onExit(c), this.safeSetState({ status: Hn }, function() {
2119
2119
  e.props.onExiting(c), e.onTransitionEnd(l.exit, function() {
2120
- e.safeSetState({ status: Ot }, function() {
2120
+ e.safeSetState({ status: Bt }, function() {
2121
2121
  e.props.onExited(c);
2122
2122
  });
2123
2123
  });
2124
- })) : this.safeSetState({ status: Ot }, function() {
2124
+ })) : this.safeSetState({ status: Bt }, function() {
2125
2125
  e.props.onExited(c);
2126
2126
  });
2127
2127
  }, t.cancelNextCallback = function() {
@@ -2156,7 +2156,7 @@ var mi = function(n) {
2156
2156
  })(ae.Component);
2157
2157
  function Gt() {
2158
2158
  }
2159
- ht.contextType = ui, ht.propTypes = {}, ht.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Gt, onEntering: Gt, onEntered: Gt, onExit: Gt, onExiting: Gt, onExited: Gt }, ht.UNMOUNTED = Po, ht.EXITED = Ot, ht.ENTERING = Bt, ht.ENTERED = Yt, ht.EXITING = Hn;
2159
+ ht.contextType = ui, ht.propTypes = {}, ht.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Gt, onEntering: Gt, onEntered: Gt, onExit: Gt, onExiting: Gt, onExited: Gt }, ht.UNMOUNTED = Po, ht.EXITED = Bt, ht.ENTERING = Ot, ht.ENTERED = Yt, ht.EXITING = Hn;
2160
2160
  var kn = function(n, a) {
2161
2161
  return n && a && a.split(" ").forEach(function(t) {
2162
2162
  return r = t, void ((e = n).classList ? e.classList.remove(r) : typeof e.className == "string" ? e.className = Yr(e.className, r) : e.setAttribute("class", Yr(e.className && e.className.baseVal || "", r)));
@@ -2224,63 +2224,63 @@ const Cn = 0.12, Qr = (n, a) => {
2224
2224
  const c = a ?? n, p = c.palette.mode === "dark";
2225
2225
  return t.selection = { fill: c.palette?.primary?.main ? Qe(c.palette?.primary?.main, 0.1) : void 0, strokeFill: c.palette?.primary?.main }, t.selectionInactive = { ...t.selection, fill: c.palette?.divider ? Qe(c.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, t.selectionRemove = { ...t.selection, fill: Qe(c.palette.warning.light, 0.05), strokeFill: c.palette.warning.dark }, a && (t.body = e(a)), t.colorShadow = Qe(c.palette.action.active, 0.5), t.colorGrey = c.palette.action.active, t.filterDarkInvert = p ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", t;
2226
2226
  }, Fo = q(X((n, a) => {
2227
- const { children: t, sx: e, parentFloat: r, ...l } = n, c = Ct(a, () => ({}), []), [p, i] = zt(), s = xe(null), d = xe(null), [x, g] = ae.useReducer((S) => S + 1, 0), [m, u] = _(null), [b, y] = _(null), [f, h] = _(null), { reference: w } = ao({ parentFloat: r, label: "overflow" });
2228
- St(() => {
2227
+ const { children: t, sx: e, parentFloat: r, ...l } = n, c = Tt(a, () => ({}), []), [p, i] = zt(), s = be(null), d = be(null), [x, g] = ae.useReducer((S) => S + 1, 0), [m, u] = _(null), [b, y] = _(null), [f, h] = _(null), { reference: w } = ao({ parentFloat: r, label: "overflow" });
2228
+ vt(() => {
2229
2229
  d.current = { refs: [] };
2230
2230
  const S = [], C = ae.Children.toArray(t);
2231
2231
  let D = 0;
2232
- C.forEach((T, P) => {
2232
+ C.forEach((E, P) => {
2233
2233
  S.push(o(B, { sx: { display: "flex" }, ref: (R) => {
2234
2234
  D++, D === C.length && g();
2235
2235
  const k = { current: null };
2236
2236
  k.current = R, d.current.refs[P] = k;
2237
- }, children: T }, P));
2237
+ }, children: E }, P));
2238
2238
  }), u(S);
2239
- }, [t, i]), St(() => {
2239
+ }, [t, i]), vt(() => {
2240
2240
  if (!m) return;
2241
2241
  const S = d.current.refs, C = S ? S.length : 0;
2242
2242
  if (!c.current || C === 0) return y(null), void h(null);
2243
- const D = c.current?.getBoundingClientRect(), T = [], P = [];
2243
+ const D = c.current?.getBoundingClientRect(), E = [], P = [];
2244
2244
  let R = 0, k = !1;
2245
- for (let M = 0; !k && M < C; M++) {
2246
- const I = S[M];
2245
+ for (let F = 0; !k && F < C; F++) {
2246
+ const I = S[F];
2247
2247
  if (!I) continue;
2248
2248
  if (!I.current) {
2249
2249
  k = !0;
2250
2250
  continue;
2251
2251
  }
2252
- const F = I.current.getBoundingClientRect();
2253
- R += F?.width, R > D.width && (k = !0);
2252
+ const O = I.current.getBoundingClientRect();
2253
+ R += O?.width, R > D.width && (k = !0);
2254
2254
  }
2255
2255
  if (!k) return y(null), void h([]);
2256
- const E = s.current?.getBoundingClientRect();
2256
+ const T = s.current?.getBoundingClientRect();
2257
2257
  R = 0;
2258
- for (let M = 0; M < C; M++) {
2259
- const I = S[M];
2260
- let F = !1;
2258
+ for (let F = 0; F < C; F++) {
2259
+ const I = S[F];
2260
+ let O = !1;
2261
2261
  if (I.current) {
2262
2262
  const L = I.current.getBoundingClientRect();
2263
- R += L?.width, R < D.width - E.width && (F = !0);
2263
+ R += L?.width, R < D.width - T.width && (O = !0);
2264
2264
  }
2265
- F ? T.push(m[M]) : P.push(m[M]);
2265
+ O ? E.push(m[F]) : P.push(m[F]);
2266
2266
  }
2267
- y(T.length > 0 ? T : null), h(P.length > 0 ? P : null);
2267
+ y(E.length > 0 ? E : null), h(P.length > 0 ? P : null);
2268
2268
  }, [t, m, i, w, x]);
2269
2269
  const v = Y((S) => {
2270
2270
  const C = [], D = f.length;
2271
2271
  for (let P = 0; P < D; P++) {
2272
2272
  const R = ae.Children.toArray(f[P])[0];
2273
- ae.Children.toArray(R.props.children?.props?.children ?? R.props.children).forEach((k, E) => {
2274
- const M = k, I = { ...M.props, key: `overflow-${P}-${E}${M.key ?? ""}` };
2273
+ ae.Children.toArray(R.props.children?.props?.children ?? R.props.children).forEach((k, T) => {
2274
+ const F = k, I = { ...F.props, key: `overflow-${P}-${T}${F.key ?? ""}` };
2275
2275
  I.parentFloat && S && (I.parentFloat = S.floatReference);
2276
- const F = ae.cloneElement(M, I);
2277
- C.push(F);
2276
+ const O = ae.cloneElement(F, I);
2277
+ C.push(O);
2278
2278
  });
2279
2279
  }
2280
- const T = o(B, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (P) => P.spacing(0.25), paddingTop: (P) => P.spacing(0.5), paddingBottom: (P) => P.spacing(0.5), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), overflow: "hidden" }, children: C });
2281
- return ge({ ...S, children: T });
2280
+ const E = o(B, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (P) => P.spacing(0.25), paddingTop: (P) => P.spacing(0.5), paddingBottom: (P) => P.spacing(0.5), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), overflow: "hidden" }, children: C });
2281
+ return he({ ...S, children: E });
2282
2282
  }, [f]);
2283
- return H(B, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: $t([c, p, a]), ...l, children: [o(B, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: b ?? m }), o(B, { className: "overflow-palette-popup-button", sx: { display: f !== null && f.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: o(kt, { createPopupPanel: v, ref: s, parentFloat: w, createTooltip: ({ children: S }, C) => o(nt, { label: "More", description: "More toolbar options…", disabled: C, children: S }), icon: o(he, { iconKey: "MoreHorizontal" }) }) })] });
2283
+ return H(B, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: $t([c, p, a]), ...l, children: [o(B, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: b ?? m }), o(B, { className: "overflow-palette-popup-button", sx: { display: f !== null && f.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: o(Ct, { createPopupPanel: v, ref: s, parentFloat: w, createTooltip: ({ children: S }, C) => o(nt, { label: "More", description: "More toolbar options…", disabled: C, children: S }), icon: o(xe, { iconKey: "MoreHorizontal" }) }) })] });
2284
2284
  })), hi = "https://unpkg.com/@sheetxl/scripting-templates/dist", Rc = (n) => {
2285
2285
  if (n.metadata?.name) return n.metadata.name;
2286
2286
  let a = (n.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
@@ -2313,7 +2313,7 @@ const Cn = 0.12, Qr = (n, a) => {
2313
2313
  const { disabled: a, snippet: t, description: e, handleInsert: r, sx: l, ...c } = n;
2314
2314
  let p;
2315
2315
  const i = t.metadata?.icon;
2316
- return p = o(he, i === "formula" ? { iconKey: "ScriptFormula", size: En, style: Tn } : i === "macro" ? { iconKey: "ScriptMacro", size: En, style: Tn } : { iconKey: "ScriptAutoStart", size: En, style: Tn }), o(ct, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...l }, disabled: a, icon: p, onMouseDown: (s) => {
2316
+ return p = o(xe, i === "formula" ? { iconKey: "ScriptFormula", size: En, style: Tn } : i === "macro" ? { iconKey: "ScriptMacro", size: En, style: Tn } : { iconKey: "ScriptAutoStart", size: En, style: Tn }), o(ct, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...l }, disabled: a, icon: p, onMouseDown: (s) => {
2317
2317
  s.button === 0 && s.preventDefault();
2318
2318
  }, onMouseUp: (s) => {
2319
2319
  s.button === 0 && r(t);
@@ -2342,14 +2342,14 @@ const Cn = 0.12, Qr = (n, a) => {
2342
2342
  const C = i[S];
2343
2343
  C && w.push(o(Mc, { handleInsert: h, snippet: C }, C.path));
2344
2344
  }
2345
- const v = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [w.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: w }), o(Q, { orientation: "horizontal" })] }) : null, ke(N, { ...f, key: "help", command: t.getCommand("help") })] });
2346
- return ge({ ...b, children: v });
2345
+ const v = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [w.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: w }), o(Q, { orientation: "horizontal" })] }) : null, ke(M, { ...f, key: "help", command: t.getCommand("help") })] });
2346
+ return he({ ...b, children: v });
2347
2347
  }, [l, e, r, d, m]);
2348
2348
  return o(Se, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: u, icon: "ScriptInsert", ...p });
2349
2349
  })), fi = q(X((n, a) => {
2350
2350
  const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, c = Y((p) => {
2351
2351
  const { commandButtonProps: i, commandPopupProps: s } = p;
2352
- return o(le, { children: H("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(N, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(Nc, { ...i, commands: t }) }) })] }) });
2352
+ return o(le, { children: H("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(M, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(Nc, { ...i, commands: t }) }) })] }) });
2353
2353
  }, [t]);
2354
2354
  return o(an, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: c, ...l });
2355
2355
  }));
@@ -2372,52 +2372,52 @@ const bi = q(X((n, a) => {
2372
2372
  x(h), m(!1);
2373
2373
  }
2374
2374
  })();
2375
- }, [t]), g) return o(B, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Te(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, ...r }, ...s, children: o(Jl, {}) });
2375
+ }, [t]), g) return o(B, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Te(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: o(Jl, {}) });
2376
2376
  let y = null;
2377
- u && (y = H(B, { display: "flex", justifyContent: "center", alignItems: "center", className: Te(l, "script-select", "error-results"), sx: { background: (h) => h.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (h) => h.spacing(1), border: (h) => `1px solid ${h.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` }, ...s, children: [o(Pe, { color: "error", variant: "h6", component: "div", gutterBottom: !0, children: "Error loading Templates" }), o(Pe, { color: "error", component: "div", children: u })] }));
2377
+ u && (y = H(B, { display: "flex", justifyContent: "center", alignItems: "center", className: Te(l, "script-select", "error-results"), sx: { background: (h) => h.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (h) => h.spacing(1), border: (h) => `1px solid ${h.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, ...s, children: [o(Pe, { color: "error", variant: "h6", component: "div", gutterBottom: !0, children: "Error loading Templates" }), o(Pe, { color: "error", component: "div", children: u })] }));
2378
2378
  const f = (h) => {
2379
2379
  const w = h.metadata?.icon;
2380
- return w === "macro" ? o(he, { iconKey: "ScriptMacro", size: "1em" }) : w === "formula" ? o(he, { iconKey: "ScriptFormula", size: "1em" }) : w === "autostart" ? o(he, { iconKey: "ScriptAutoStart", size: "1em" }) : null;
2380
+ return w === "macro" ? o(xe, { iconKey: "ScriptMacro", size: "1em" }) : w === "formula" ? o(xe, { iconKey: "ScriptFormula", size: "1em" }) : w === "autostart" ? o(xe, { iconKey: "ScriptAutoStart", size: "1em" }) : null;
2381
2381
  };
2382
- return H(B, { ref: a, className: Te(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, ...r }, ...s, children: [H(B, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [o(Pe, { variant: "h6", gutterBottom: !0, children: "Script Template" }), o(Pe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), o(Pe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), o(B, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${i}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: d.map((h, w) => H(Jo, { variant: "outlined", sx: { minWidth: c, minHeight: p, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...w === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...w === 1 && { gridColumn: "1" } }, onClick: () => e?.(h), children: [H(B, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [o(Pe, { variant: "subtitle2", component: "div", children: h.metadata?.title || h.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), f(h)] }), h.metadata?.summary && o(Pe, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: h.metadata.summary })] }, `${h.path}-${w}`)) })] }), y] });
2382
+ return H(B, { ref: a, className: Te(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: [H(B, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [o(Pe, { variant: "h6", gutterBottom: !0, children: "Script Template" }), o(Pe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), o(Pe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), o(B, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${i}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: d.map((h, w) => H(Jo, { variant: "outlined", sx: { minWidth: c, minHeight: p, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...w === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...w === 1 && { gridColumn: "1" } }, onClick: () => e?.(h), children: [H(B, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [o(Pe, { variant: "subtitle2", component: "div", children: h.metadata?.title || h.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), f(h)] }), h.metadata?.summary && o(Pe, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: h.metadata.summary })] }, `${h.path}-${w}`)) })] }), y] });
2383
2383
  }));
2384
2384
  bi.displayName = "TemplateSelectPanel";
2385
2385
  const xi = q(X((n, a) => {
2386
- const { className: t, sx: e, editorProps: r, commands: l, readOnly: c = !1, frame: p, autoFocusSel: i, autoFocus: s = !0, scripts: d, ...x } = n, g = Ke(), [m, u] = _(!1), b = xe(!1), [y, f] = _({ message: "Loading", cursor: "", dirty: !1 }), [h, w] = _(null);
2386
+ const { className: t, sx: e, editorProps: r, commands: l, readOnly: c = !1, frame: p, autoFocusSel: i, autoFocus: s = !0, scripts: d, ...x } = n, g = Ke(), [m, u] = _(!1), b = be(!1), [y, f] = _({ message: "Loading", cursor: "", dirty: !1 }), [h, w] = _(null);
2387
2387
  de(() => {
2388
2388
  let L = !1;
2389
2389
  return w(null), (async function() {
2390
2390
  if (d && (await d.start(), !L)) {
2391
- const O = d.getModules().getItems()[0]?.getSource();
2392
- w({ source: O || null });
2391
+ const N = d.getModules().getItems()[0]?.getSource();
2392
+ w({ source: N || null });
2393
2393
  }
2394
2394
  })(), () => {
2395
2395
  L = !0;
2396
2396
  };
2397
2397
  }, [d]);
2398
2398
  const v = U((L) => {
2399
- f((O) => ({ ...O, ...L }));
2400
- }, []), S = xe(null), [C, D] = _(null), T = xe(null), P = Y((L) => {
2399
+ f((N) => ({ ...N, ...L }));
2400
+ }, []), S = be(null), [C, D] = _(null), E = be(null), P = Y((L) => {
2401
2401
  if (C) return C.focus(L), !0;
2402
2402
  if (i) {
2403
- const O = S.current?.querySelectorAll?.(i);
2404
- if (O && O.length > 0) return O[0]?.focus?.(L), !0;
2403
+ const N = S.current?.querySelectorAll?.(i);
2404
+ if (N && N.length > 0) return N[0]?.focus?.(L), !0;
2405
2405
  }
2406
2406
  return S.current?.focus?.(L), !1;
2407
- }, [C, i, s]), R = W(() => o(Wt, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), k = W(() => o(no, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (L) => L.spacing(0.5), marginRight: (L) => L.spacing(0.5), marginTop: (L) => L.spacing(1), marginBottom: (L) => L.spacing(1) }, children: o(fi, { commands: l }) }), [g, l]), E = W(() => o(B, { className: Te("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${g.palette.divider}` }, children: H("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.message }), o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.dirty ? "Unsaved" : "" }), o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.cursor })] }) }), [y]), M = W(() => H(B, { className: Te("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [k, o(B, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(Ll, { ref: S, loadingPanel: R, readOnly: c, frame: p, autoFocus: s, commands: l, onStatusChange: v, darkMode: g.palette.mode === "dark", ...r }) }), E] }), [g, l, k, E, m, R, c, r, s, i, p, v]), I = W(() => {
2407
+ }, [C, i, s]), R = W(() => o(Wt, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), k = W(() => o(no, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (L) => L.spacing(0.5), marginRight: (L) => L.spacing(0.5), marginTop: (L) => L.spacing(1), marginBottom: (L) => L.spacing(1) }, children: o(fi, { commands: l }) }), [g, l]), T = W(() => o(B, { className: Te("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${g.palette.divider}` }, children: H("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.message }), o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.dirty ? "Unsaved" : "" }), o(Pe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.cursor })] }) }), [y]), F = W(() => H(B, { className: Te("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [k, o(B, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(Ll, { ref: S, loadingPanel: R, readOnly: c, frame: p, autoFocus: s, commands: l, onStatusChange: v, darkMode: g.palette.mode === "dark", ...r }) }), T] }), [g, l, k, T, m, R, c, r, s, i, p, v]), I = W(() => {
2408
2408
  let L;
2409
- return h === null ? null : (h.source === null && (L = o(bi, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (O) => {
2410
- S.current?.getEditor()?.insertSnippet(O.content), w({ source: O.content ?? "" });
2411
- } })), o(B, { tabIndex: 0, className: Te("script-workspace", t), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (O) => {
2412
- O.isDefaultPrevented() || S.current?.focus();
2413
- }, children: H(B, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [M, L] }) }));
2414
- }, [k, M, t, h]), F = Ct(a, () => ({ isScriptWorkspaceElement: () => !0, focus: (L) => {
2409
+ return h === null ? null : (h.source === null && (L = o(bi, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (N) => {
2410
+ S.current?.getEditor()?.insertSnippet(N.content), w({ source: N.content ?? "" });
2411
+ } })), o(B, { tabIndex: 0, className: Te("script-workspace", t), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (N) => {
2412
+ N.isDefaultPrevented() || S.current?.focus();
2413
+ }, children: H(B, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [F, L] }) }));
2414
+ }, [k, F, t, h]), O = Tt(a, () => ({ isScriptWorkspaceElement: () => !0, focus: (L) => {
2415
2415
  P(L);
2416
2416
  } }), []);
2417
- return o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...e }, ref: F, ...x, onFocus: (L) => {
2418
- u(!0), b.current = !0, F.current?.contains(L.target) && L.target !== F.current && D(L.target), L.relatedTarget && !T.current && (T.current = L.relatedTarget), x?.onFocus?.(L);
2417
+ return o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...e }, ref: O, ...x, onFocus: (L) => {
2418
+ u(!0), b.current = !0, O.current?.contains(L.target) && L.target !== O.current && D(L.target), L.relatedTarget && !E.current && (E.current = L.relatedTarget), x?.onFocus?.(L);
2419
2419
  }, onBlur: (L) => {
2420
- F?.current?.contains(L.relatedTarget) || F?.current === L.relatedTarget || (T.current = null, b.current = !1, u(!1)), x?.onBlur?.(L);
2420
+ O?.current?.contains(L.relatedTarget) || O?.current === L.relatedTarget || (E.current = null, b.current = !1, u(!1)), x?.onBlur?.(L);
2421
2421
  }, children: I });
2422
2422
  }));
2423
2423
  xi.displayName = "ScriptWorkspace";
@@ -2437,19 +2437,19 @@ const Fc = (n, a) => {
2437
2437
  const d = { variant: re.Menuitem, parentFloat: n.floatReference, scope: "scripts", shortcut: null }, x = [], g = l.length;
2438
2438
  for (let u = 0; u < g; u++) {
2439
2439
  const b = l[u];
2440
- x.push(o(N, { ...d, command: t.getCommand("executeScript"), commandState: { declaration: b }, tooltipProps: { description: `Execute ${b.getName() ?? "macro"}` }, icon: o(he, { iconKey: "ScriptMacro" }), label: b.getName() ?? `Script '${b.getName()}'` }, `macro-${b.getName()}-${u}`));
2440
+ x.push(o(M, { ...d, command: t.getCommand("executeScript"), commandState: { declaration: b }, tooltipProps: { description: `Execute ${b.getName() ?? "macro"}` }, icon: o(xe, { iconKey: "ScriptMacro" }), label: b.getName() ?? `Script '${b.getName()}'` }, `macro-${b.getName()}-${u}`));
2441
2441
  }
2442
- const m = H(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [x.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: x }), o(Q, { orientation: "horizontal" })] }) : null, ke(N, { ...d, key: "show-editor", command: t.getCommand("showScriptEditor") })] });
2443
- return ge({ ...e, children: m });
2442
+ const m = H(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [x.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: x }), o(Q, { orientation: "horizontal" })] }) : null, ke(M, { ...d, key: "show-editor", command: t.getCommand("showScriptEditor") })] });
2443
+ return he({ ...e, children: m });
2444
2444
  }));
2445
2445
  yi.displayName = "RunScriptPopupPanel";
2446
2446
  const wi = q(X((n, a) => {
2447
2447
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = "showScriptEditor", i = Ie(t, ["executeScript", "showScriptEditor"])[0].context(), s = U((d, x) => {
2448
2448
  const g = o(yi, { ...d, commands: x });
2449
- return ge({ ...d, children: g });
2449
+ return he({ ...d, children: g });
2450
2450
  }, [l, i, e, r]);
2451
2451
  return o(Se, { ref: a, commands: t, commandHook: e, createPopupPanel: s, selected: t.getCommand(p).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: p, ...c });
2452
- })), Oc = (n) => o(N, { ...n }), Si = q(X((n, a) => {
2452
+ })), Bc = (n) => o(M, { ...n }), Si = q(X((n, a) => {
2453
2453
  const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, [c, p] = _(!1), i = Ie(t, ["executeScript", "showScriptEditor"]), s = i[0]?.context?.();
2454
2454
  de(() => {
2455
2455
  const g = s?.getScripts();
@@ -2480,46 +2480,36 @@ const wi = q(X((n, a) => {
2480
2480
  if (f > 0) {
2481
2481
  y = [];
2482
2482
  for (let D = 0; D < f; D++) {
2483
- const T = b[D], P = T.createCommand?.(d);
2483
+ const E = b[D], P = E.createCommand?.(d);
2484
2484
  if (!P) continue;
2485
- const R = { command: P, ...u }, k = (T.createCommandButton ?? Oc)(R);
2485
+ const R = { command: P, ...u }, k = (E.createCommandButton ?? Bc)(R);
2486
2486
  y.push(k);
2487
2487
  }
2488
2488
  }
2489
- const h = o(No, { ...u, command: t.getCommand("formatFontColor"), icon: o(he, { iconKey: "text.colored" }), isSplit: !0, panelProps: { disableAlpha: !0 } }), w = o(No, { ...u, command: t.getCommand("formatFillColor"), icon: o(he, { iconKey: "fill.colored" }), isSplit: !0, panelProps: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Ro.End } }), v = t.getCommand("undo") ? o(le, { children: o(Ha, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(le, { children: o(Ys, { ...u }) }) : null;
2489
+ const h = o(No, { ...u, command: t.getCommand("formatFontColor"), isSplit: !0, panelProps: { disableAlpha: !0 } }), w = o(No, { ...u, command: t.getCommand("formatFillColor"), isSplit: !0, panelProps: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Ro.End } }), v = t.getCommand("undo") ? o(le, { children: o(Ha, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(le, { children: o(Ys, { ...u }) }) : null;
2490
2490
  let C = null;
2491
- return c && (C = H(le, { children: [o(Q, {}), o(wi, { ...u })] })), H(Fo, { parentFloat: e, children: [v, null, v ? o(Q, {}) : null, o(ja, { ...u, command: t.getCommand("paste") }), o(N, { ...m, command: t.getCommand("formatPainterToggle") }), o(nr, { ...m, command: t.getCommand("copy") }), o(Q, {}), o(tc, { ...u, command: t.getCommand("formatFontFamily") }), o(Zs, { ...u, command: t.getCommand("formatFontSize") }), o(N, { ...m, command: t.getCommand("formatBoldToggle") }), o(N, { ...m, command: t.getCommand("formatItalicToggle") }), o(nc, { ...u }), o(oc, { ...u }), o(qs, { ...u }), w, h, o(Q, {}), o(Os, { ...u }), o(Bs, { ...u }), o(Is, { ...u }), o(As, { ...u }), o(Ks, { ...u }), o(Q, {}), o(Qs, { ...u }), o(lc, { command: t.getCommand("formatCellStyle"), ...u }), o(Fi, { command: t.getCommand("formatTableStyle"), ...u }), o(Q, {}), o(Aa, { ...u }), o(Ia, { ...u }), o(La, { ...u }), o(Q, {}), o(Oi, { ...u }), o(Js, { ...u }), o(Ba, { ...u }), o(za, { ...u }), S, C, y] });
2491
+ return c && (C = H(le, { children: [o(Q, {}), o(wi, { ...u })] })), H(Fo, { parentFloat: e, children: [v, null, v ? o(Q, {}) : null, o(ja, { ...u, command: t.getCommand("paste") }), o(M, { ...m, command: t.getCommand("formatPainterToggle") }), o(nr, { ...m, command: t.getCommand("copy") }), o(Q, {}), o(tc, { ...u, command: t.getCommand("formatFontFamily") }), o(Zs, { ...u, command: t.getCommand("formatFontSize") }), o(M, { ...m, command: t.getCommand("formatBoldToggle") }), o(M, { ...m, command: t.getCommand("formatItalicToggle") }), o(nc, { ...u }), o(oc, { ...u }), o(qs, { ...u }), w, h, o(Q, {}), o(Bs, { ...u }), o(Os, { ...u }), o(Is, { ...u }), o(As, { ...u }), o(Ks, { ...u }), o(Q, {}), o(Qs, { ...u }), o(Q, {}), o(lc, { command: t.getCommand("formatCellStyle"), ...u }), o(Ni, { command: t.getCommand("formatTableStyle"), ...u }), o(Q, {}), o(Aa, { ...u }), o(Ia, { ...u }), o(La, { ...u }), o(Q, {}), o(Bi, { ...u }), o(Js, { ...u }), o(Oa, { ...u }), o(za, { ...u }), S, C, y] });
2492
2492
  }, [t, i, c, d]);
2493
2493
  return o(an, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: x, ...l });
2494
2494
  }));
2495
2495
  Si.displayName = "HomeToolbar";
2496
2496
  const vi = q(X((n, a) => {
2497
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, preferSingleMenu: c = !0, showQuickButton: p = !0, variant: i = re.Toolbar, ...s } = n, d = Ie(t, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: x, allDisabled: g } = W(() => {
2498
- let u = null, b = 0;
2499
- for (let y = 0; y < d.length; y++) d[y] && !d[y]?.disabled() && (c && i === re.Menuitem && (u = b === 0 ? d[y] : null), b++);
2500
- return { singleMenuCommand: u, allDisabled: b === 0 };
2501
- }, [d]), m = U((u, b) => {
2502
- const y = { variant: re.Menuitem, commandHook: e, scope: "insertImage", disabled: l }, f = H(le, { children: [o(N, { ...y, command: b.getCommand("insertImageFromFile") }), o(N, { ...y, command: b.getCommand("insertImageFromURL") })] });
2503
- return ge({ ...u, children: f });
2504
- }, [l, e, r]);
2505
- return x ? o(N, { ref: a, variant: i, commandHook: e, disabled: l, command: x, ...s }) : o(Se, { ref: a, variant: i, quickCommand: "insertImageFromFile", commands: t, commandHook: e, scope: r, disabled: l || g, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: m, icon: "InsertImage", ...s });
2506
- })), ki = q(X((n, a) => {
2507
2497
  const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, c = Y((p) => {
2508
2498
  const { commandButtonProps: i, commandPopupProps: s } = p;
2509
- return H(Fo, { parentFloat: e, children: [o(N, { ...i, command: t.getCommand("insertTable") }), o(vi, { ...s }), null, o(N, { ...i, command: t.getCommand("updateHyperlink") }), o(N, { ...i, command: t.getCommand("updateComments") })] });
2499
+ return H(Fo, { parentFloat: e, children: [o(M, { ...i, command: t.getCommand("insertTable") }), o(Fi, { ...s }), null, o(M, { ...i, command: t.getCommand("updateHyperlink") }), o(M, { ...i, command: t.getCommand("updateComments") })] });
2510
2500
  }, [t]);
2511
2501
  return o(an, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: c, ...l });
2512
2502
  }));
2513
- ki.displayName = "InsertToolbar";
2514
- const Ci = q(X((n, a) => {
2503
+ vi.displayName = "InsertToolbar";
2504
+ const ki = q(X((n, a) => {
2515
2505
  const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, c = Y((p) => {
2516
2506
  const { commandButtonProps: i, commandPopupProps: s } = p;
2517
- return H(Fo, { parentFloat: e, children: [o(Xs, { ...s }), o(N, { ...i, command: t.getCommand("protectionSheetToggle") }), o(Q, {}), o(ec, { ...s }), o(rc, { ...s }), o(Q, {}), o(N, { ...i, command: t.getCommand("sheetViewToggleFormulaView"), scope: "view" }), o(N, { ...i, command: t.getCommand("sheetViewToggleShowZeros"), scope: "view" }), o(Q, {}), o(ac, { ...s }), o(ad, { command: t.getCommand("selectTheme"), ...s }), o(Q, {}), o(wi, { ...s, scope: "view" }), o(Q, {}), o(N, { ...i, command: t.getCommand("fullScreenToggle"), scope: "view" })] });
2507
+ return H(Fo, { parentFloat: e, children: [o(Xs, { ...s }), o(M, { ...i, command: t.getCommand("protectionSheetToggle") }), o(Q, {}), o(ec, { ...s }), o(rc, { ...s }), o(Q, {}), o(M, { ...i, command: t.getCommand("sheetViewToggleFormulaView"), scope: "view" }), o(M, { ...i, command: t.getCommand("sheetViewToggleShowZeros"), scope: "view" }), o(Q, {}), o(ac, { ...s }), o(ad, { command: t.getCommand("selectTheme"), ...s }), o(Q, {}), o(wi, { ...s, scope: "view" }), o(Q, {}), o(M, { ...i, command: t.getCommand("fullScreenToggle"), scope: "view" })] });
2518
2508
  }, [t]);
2519
2509
  return o(an, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: c, ...l });
2520
2510
  }));
2521
- Ci.displayName = "ViewToolbar";
2522
- const Ti = (n) => o(Ei, { ...n }), Bc = q((n) => {
2511
+ ki.displayName = "ViewToolbar";
2512
+ const Ci = (n) => o(Ti, { ...n }), Oc = q((n) => {
2523
2513
  const { sx: a, ...t } = n;
2524
2514
  return H(B, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e) => `${ye(e.palette.primary.main, 0.35)} solid 2px` } }, children: [o(Da, { disableRipple: !0, onMouseDown: (e) => {
2525
2515
  e.button === 0 && e.preventDefault();
@@ -2527,7 +2517,7 @@ const Ti = (n) => o(Ei, { ...n }), Bc = q((n) => {
2527
2517
  }), Ac = q((n) => {
2528
2518
  const { toolbars: a, value: t, onToolbarChange: e, sx: r, ...l } = n, c = W(() => {
2529
2519
  const p = [];
2530
- for (let i = 0; i < a.length; i++) p.push(o(Bc, { label: a[i].label }, a[i].label));
2520
+ for (let i = 0; i < a.length; i++) p.push(o(Oc, { label: a[i].label }, a[i].label));
2531
2521
  return p;
2532
2522
  }, [a]);
2533
2523
  return o(Ea, { value: t, onChange: (p, i) => {
@@ -2546,26 +2536,26 @@ const Ti = (n) => o(Ei, { ...n }), Bc = q((n) => {
2546
2536
  }
2547
2537
  return i;
2548
2538
  }, [a, t]);
2549
- return o(Xn, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (i) => i.spacing(0.5), paddingBottom: (i) => i.spacing(0.5), paddingLeft: (i) => i.spacing(2), color: (i) => i.palette.primary.main }, "& .MuiSelect-icon": { fill: (i) => i.palette.text.icon ?? i.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (i) => i.palette.text.icon ?? i.palette.action.active } }, ...r }, size: "small", children: o(es, { value: t, onChange: c, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` }, ...l, children: p }) });
2550
- }), Ei = q(X((n, a) => {
2539
+ return o(Xn, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (i) => i.spacing(0.5), paddingBottom: (i) => i.spacing(0.5), paddingLeft: (i) => i.spacing(2), color: (i) => i.palette.primary.main }, "& .MuiSelect-icon": { fill: (i) => i.palette.text.icon ?? i.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (i) => i.palette.text.icon ?? i.palette.action.active } }, ...r }, size: "small", children: o(es, { value: t, onChange: c, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, ...l, children: p }) });
2540
+ }), Ti = q(X((n, a) => {
2551
2541
  const { commands: t, selectWrapper: e, selectProps: r = {}, renderCompact: l = !1, paletteWrapper: c, toolbarsProps: p, paletteProps: i = {}, workbook: s, sx: d, ...x } = n, g = W(() => {
2552
2542
  const S = [], { ref: C, ...D } = p?.Home || {};
2553
2543
  S.push({ label: "Home", component: o(Si, { commands: t, ...D }) });
2554
- const { ref: T, ...P } = p?.Insert || {};
2555
- S.push({ label: "Insert", component: o(ki, { commands: t, ...P }) });
2544
+ const { ref: E, ...P } = p?.Insert || {};
2545
+ S.push({ label: "Insert", component: o(vi, { commands: t, ...P }) });
2556
2546
  const { ref: R, ...k } = p?.View || {};
2557
- return S.push({ label: "View", component: o(Ci, { commands: t, ...k }) }), S;
2547
+ return S.push({ label: "View", component: o(ki, { commands: t, ...k }) }), S;
2558
2548
  }, [t, s]), m = W(() => {
2559
2549
  const S = [];
2560
2550
  for (let C = 0; C < g.length; C++) S.push(ae.cloneElement(g[C].component, { ...g[C].component.props, key: g[C].key ?? g[C].label }));
2561
2551
  return S;
2562
2552
  }, [g]), [u, b] = _(0), y = (S) => {
2563
2553
  b(S);
2564
- }, f = W(() => o(l ? Ic : Ac, { toolbars: g, value: u, onToolbarChange: y, sx: r }), [g, u, r, l]), { sx: h, ...w } = i, v = o(no, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})`, marginLeft: (S) => S.spacing(1), marginRight: (S) => S.spacing(1), marginTop: (S) => S.spacing(0.5), marginBottom: (S) => S.spacing(0.5), ...h }, ...w, children: m[u] });
2554
+ }, f = W(() => o(l ? Ic : Ac, { toolbars: g, value: u, onToolbarChange: y, sx: r }), [g, u, r, l]), { sx: h, ...w } = i, v = o(no, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, marginLeft: (S) => S.spacing(1), marginRight: (S) => S.spacing(1), marginTop: (S) => S.spacing(0.5), marginBottom: (S) => S.spacing(0.5), ...h }, ...w, children: m[u] });
2565
2555
  return H(B, { ref: a, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (S) => S.spacing(0.5), "*": { userSelect: "none" }, ...d }, ...x, children: [e ? e(f) : f, c ? c(v) : v] });
2566
2556
  }));
2567
2557
  var Jr, ea;
2568
- Ei.displayName = "WorkbookToolbars", (function() {
2558
+ Ti.displayName = "WorkbookToolbars", (function() {
2569
2559
  if (ea) return Jr;
2570
2560
  ea = 1;
2571
2561
  var n = /^\s+|\s+$/g, a = /^[-+]0x[0-9a-f]+$/i, t = /^0b[01]+$/i, e = /^0o[0-7]+$/i, r = parseInt, l = typeof Do == "object" && Do && Do.Object === Object && Do, c = typeof self == "object" && self && self.Object === Object && self, p = l || c || Function("return this")(), i = Object.prototype.toString, s = Math.max, d = Math.min, x = function() {
@@ -2592,42 +2582,42 @@ Ei.displayName = "WorkbookToolbars", (function() {
2592
2582
  return y || e.test(u) ? r(u.slice(2), y ? 2 : 8) : a.test(u) ? NaN : +u;
2593
2583
  }
2594
2584
  Jr = function(u, b, y) {
2595
- var f, h, w, v, S, C, D = 0, T = !1, P = !1, R = !0;
2585
+ var f, h, w, v, S, C, D = 0, E = !1, P = !1, R = !0;
2596
2586
  if (typeof u != "function") throw new TypeError("Expected a function");
2597
2587
  function k(L) {
2598
- var O = f, z = h;
2599
- return f = h = void 0, D = L, v = u.apply(z, O);
2588
+ var N = f, z = h;
2589
+ return f = h = void 0, D = L, v = u.apply(z, N);
2600
2590
  }
2601
- function E(L) {
2602
- var O = L - C;
2603
- return C === void 0 || O >= b || O < 0 || P && L - D >= w;
2591
+ function T(L) {
2592
+ var N = L - C;
2593
+ return C === void 0 || N >= b || N < 0 || P && L - D >= w;
2604
2594
  }
2605
- function M() {
2595
+ function F() {
2606
2596
  var L = x();
2607
- if (E(L)) return I(L);
2608
- S = setTimeout(M, (function(O) {
2609
- var z = b - (O - C);
2610
- return P ? d(z, w - (O - D)) : z;
2597
+ if (T(L)) return I(L);
2598
+ S = setTimeout(F, (function(N) {
2599
+ var z = b - (N - C);
2600
+ return P ? d(z, w - (N - D)) : z;
2611
2601
  })(L));
2612
2602
  }
2613
2603
  function I(L) {
2614
2604
  return S = void 0, R && f ? k(L) : (f = h = void 0, v);
2615
2605
  }
2616
- function F() {
2617
- var L = x(), O = E(L);
2618
- if (f = arguments, h = this, C = L, O) {
2606
+ function O() {
2607
+ var L = x(), N = T(L);
2608
+ if (f = arguments, h = this, C = L, N) {
2619
2609
  if (S === void 0) return (function(z) {
2620
- return D = z, S = setTimeout(M, b), T ? k(z) : v;
2610
+ return D = z, S = setTimeout(F, b), E ? k(z) : v;
2621
2611
  })(C);
2622
- if (P) return S = setTimeout(M, b), k(C);
2612
+ if (P) return S = setTimeout(F, b), k(C);
2623
2613
  }
2624
- return S === void 0 && (S = setTimeout(M, b)), v;
2614
+ return S === void 0 && (S = setTimeout(F, b)), v;
2625
2615
  }
2626
- return b = m(b) || 0, g(y) && (T = !!y.leading, w = (P = "maxWait" in y) ? s(m(y.maxWait) || 0, b) : w, R = "trailing" in y ? !!y.trailing : R), F.cancel = function() {
2616
+ return b = m(b) || 0, g(y) && (E = !!y.leading, w = (P = "maxWait" in y) ? s(m(y.maxWait) || 0, b) : w, R = "trailing" in y ? !!y.trailing : R), O.cancel = function() {
2627
2617
  S !== void 0 && clearTimeout(S), D = 0, f = C = h = S = void 0;
2628
- }, F.flush = function() {
2618
+ }, O.flush = function() {
2629
2619
  return S === void 0 ? v : I(x());
2630
- }, F;
2620
+ }, O;
2631
2621
  };
2632
2622
  })();
2633
2623
  var ta, oa, na = { exports: {} }, Dn = {};
@@ -2743,49 +2733,49 @@ var lt = { DOM_UNAVAILABLE_ERROR: "DOM is unavailable server-side. Please use th
2743
2733
  t && document.removeEventListener(t, a);
2744
2734
  } };
2745
2735
  const zc = (n) => {
2746
- const { workbook: a, workbookElement: t, target: e, commands: r, darkMode: l, onNewWorkbook: c = Hc } = n, p = cn(), [i, s] = _(a?.getSelectedSheet()), [d, x] = _(a?.getSheets().getItems()), g = Y(c, [c]), m = Sa(), u = W(() => [new He("activateTask", e, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new He("showFormat", e, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [fe.Ctrl, fe.Shift] } }), new be("newCellStyle", e, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new be("deleteCellStyle", e, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new be("modifyCellStyle", e, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new He("find", e, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [fe.Ctrl] }, { key: "F5", modifiers: [fe.Shift] }] }), new He("findReplace", e, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [fe.Ctrl] }, { key: "H", modifiers: [fe.Ctrl, fe.Alt] }] }), new He("goto", e, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [fe.Ctrl] }] }), new He("workbookViewToggleExpandFormulaBar", e, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [fe.Ctrl, fe.Shift] } }), new He("workbookViewToggleShowFormulaBar", e, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new He("workbookViewToggleShowTabs", e, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new He("workbookViewToggleShowStatusBar", e, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new He("workbookViewToggleShowHorizontalScrollBar", e, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new He("workbookViewToggleShowVerticalScrollBar", e, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new be("hideSheet", e, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.", icon: "VisibilityOff" }), new be("deleteSheet", e, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new be("addSheet", e, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [fe.Shift] }, { key: "F1", modifiers: [fe.Alt, fe.Shift] }] }), new be("duplicateSheet", e, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new be("nextSheet", e, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl] }] }), new be("previousSheet", e, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl] }] }), new be("selectNextSheet", e, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectPreviousSheet", e, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectTheme", e, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new be("selectNamed", e, { label: (k) => k?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (k) => k?.getName() ?? "Select" }, description: "Select the item." }), new be("addNamedReference", e, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "InsertNamedRange" }), new be("editNamedReference", e, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeEdit" }), new be("deleteNamedReference", e, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new He("activeNameBox", e, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [fe.Alt] } }), new He("createNamedReferenceFromSelection", e, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [fe.Ctrl, fe.Shift] } }), new He("activeNameManager", e, { label: "Activate Name Manager", description: `Create, edit, delete, and find all the names used in the workbook.
2736
+ const { workbook: a, workbookElement: t, target: e, commands: r, darkMode: l, onNewWorkbook: c = Hc } = n, p = cn(), [i, s] = _(a?.getSelectedSheet()), [d, x] = _(a?.getSheets().getItems()), g = Y(c, [c]), m = Sa(), u = W(() => [new He("activateTask", e, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [ge.Ctrl, ge.Shift] } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [ge.Ctrl, ge.Shift] } }), new He("showFormat", e, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [ge.Ctrl, ge.Shift] } }), new fe("newCellStyle", e, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new fe("deleteCellStyle", e, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new fe("modifyCellStyle", e, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new He("find", e, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [ge.Ctrl] }, { key: "F5", modifiers: [ge.Shift] }] }), new He("findReplace", e, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [ge.Ctrl] }, { key: "H", modifiers: [ge.Ctrl, ge.Alt] }] }), new He("goto", e, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [ge.Ctrl] }] }), new He("workbookViewToggleExpandFormulaBar", e, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [ge.Ctrl, ge.Shift] } }), new He("workbookViewToggleShowFormulaBar", e, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new He("workbookViewToggleShowTabs", e, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new He("workbookViewToggleShowStatusBar", e, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new He("workbookViewToggleShowHorizontalScrollBar", e, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new He("workbookViewToggleShowVerticalScrollBar", e, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new fe("hideSheet", e, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.", icon: "VisibilityOff" }), new fe("deleteSheet", e, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new fe("addSheet", e, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [ge.Shift] }, { key: "F1", modifiers: [ge.Alt, ge.Shift] }] }), new fe("duplicateSheet", e, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new fe("nextSheet", e, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ge.Ctrl] }] }), new fe("previousSheet", e, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ge.Ctrl] }] }), new fe("selectNextSheet", e, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ge.Ctrl, ge.Shift] }] }), new fe("selectPreviousSheet", e, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ge.Ctrl, ge.Shift] }] }), new fe("selectTheme", e, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new fe("selectNamed", e, { label: (k) => k?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (k) => k?.getName() ?? "Select" }, description: "Select the item." }), new fe("addNamedReference", e, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "InsertNamedRange" }), new fe("editNamedReference", e, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeEdit" }), new fe("deleteNamedReference", e, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new He("activeNameBox", e, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [ge.Alt] } }), new He("createNamedReferenceFromSelection", e, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [ge.Ctrl, ge.Shift] } }), new He("activeNameManager", e, { label: "Activate Name Manager", description: `Create, edit, delete, and find all the names used in the workbook.
2747
2737
 
2748
- Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [fe.Ctrl] } }), new be("fullScreenToggle", e, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new be("showScriptEditor", e, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [fe.Alt] }] }), new be("executeScript", e, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("executeSelectedScript", e, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("saveScripts", e, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new be("maximumWorkbookToggle", e, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [fe.Ctrl] } }), new be("spellCheck", e, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new be("calculateAll", e, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new He("closeWorkbook", e, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [fe.Ctrl] } }), new He("newWorkbook", e, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), b = W(() => {
2738
+ Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [ge.Ctrl] } }), new fe("fullScreenToggle", e, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new fe("showScriptEditor", e, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [ge.Alt] }] }), new fe("executeScript", e, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new fe("executeSelectedScript", e, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new fe("saveScripts", e, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new fe("maximumWorkbookToggle", e, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [ge.Ctrl] } }), new fe("spellCheck", e, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new fe("calculateAll", e, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new He("closeWorkbook", e, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [ge.Ctrl] } }), new He("newWorkbook", e, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), b = W(() => {
2749
2739
  let k = null;
2750
2740
  return k = r ? r.createChildGroup(e, "workbook", !1) : new er(e, "workbook"), k.addCommands(u, !0), k;
2751
2741
  }, [r, u]), y = sn(), f = ae.useRef(null), h = Y(() => {
2752
- let k, E = null;
2753
- const M = b.getCommand("executeScript");
2754
- if (M.update({ disabled: !1, context: { getScripts: () => a.getScripts() } }), !M) return;
2742
+ let k, T = null;
2743
+ const F = b.getCommand("executeScript");
2744
+ if (F.update({ disabled: !1, context: { getScripts: () => a.getScripts() } }), !F) return;
2755
2745
  const I = b.getCommand("showScriptEditor");
2756
- I.updateCallback(function(O = !0) {
2757
- E ? E.close() : m.activateTaskPane("scriptEditor", {});
2746
+ I.updateCallback(function(N = !0) {
2747
+ T ? T.close() : m.activateTaskPane("scriptEditor", {});
2758
2748
  });
2759
- const F = b.getCommand("executeSelectedScript");
2760
- if (!F) return;
2761
- const L = { saveSource: async (O) => {
2749
+ const O = b.getCommand("executeSelectedScript");
2750
+ if (!O) return;
2751
+ const L = { saveSource: async (N) => {
2762
2752
  let z = null, ie = null;
2763
2753
  const J = a.getScripts();
2764
2754
  try {
2765
- O && (ie = await p.showBusy("Saving Scripts..."), z = await J.createModule({ source: O })), J.addModule("scripts", z, { replace: !0 }), ie?.();
2755
+ N && (ie = await p.showBusy("Saving Scripts..."), z = await J.createModule({ source: N })), J.addModule("scripts", z, { replace: !0 }), ie?.();
2766
2756
  } catch (pe) {
2767
2757
  ie?.(), console.warn("Unable to compile", pe), p.showError(pe);
2768
2758
  }
2769
2759
  return z;
2770
- }, addContainerListener: (O) => (w.current = O, () => {
2760
+ }, addContainerListener: (N) => (w.current = N, () => {
2771
2761
  w.current = null;
2772
- }), setSelectedFunction: (O) => {
2773
- k = O ?? f.current ?? null, Promise.resolve(k).then((z) => {
2774
- F.update({ disabled: z === null });
2762
+ }), setSelectedFunction: (N) => {
2763
+ k = N ?? f.current ?? null, Promise.resolve(k).then((z) => {
2764
+ O.update({ disabled: z === null });
2775
2765
  });
2776
- }, quickInsertFunction: (O) => {
2777
- const z = `=${O.toUpperCase()}(`, ie = { text: z + ")", editMode: !0, initialSelection: { start: z.length, end: z.length + 0 } };
2766
+ }, quickInsertFunction: (N) => {
2767
+ const z = `=${N.toUpperCase()}(`, ie = { text: z + ")", editMode: !0, initialSelection: { start: z.length, end: z.length + 0 } };
2778
2768
  y.setMode((J) => J?.key === "edit" ? { ...J, args: { ...J.args } } : { key: "edit", args: { stateAndCoords: null, start: ie } });
2779
- }, getSelectedFunction: () => k, setEditor: (O) => {
2780
- E = O ?? null, I.update({ state: E !== null });
2781
- }, getEditor: () => E, getRanges: (O) => {
2769
+ }, getSelectedFunction: () => k, setEditor: (N) => {
2770
+ T = N ?? null, I.update({ state: T !== null });
2771
+ }, getEditor: () => T, getRanges: (N) => {
2782
2772
  try {
2783
- return a.getRanges(O);
2773
+ return a.getRanges(N);
2784
2774
  } catch {
2785
2775
  }
2786
2776
  return null;
2787
2777
  }, getScripts: () => a.getScripts() };
2788
- F.update({ context: L });
2778
+ O.update({ context: L });
2789
2779
  }, [b, a, t, p]), w = ae.useRef(null);
2790
2780
  We(a, { onBeforeSave: async () => {
2791
2781
  await w.current?.onBeforeSave();
@@ -2798,21 +2788,21 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2798
2788
  }, onViewChange(k) {
2799
2789
  s(k?.getSelectedSheet());
2800
2790
  }, onProtectionChange: (k) => {
2801
- const E = { disabled: !k.getProtection().isStructureAllowed() };
2802
- b.getCommand("hideSheet").update(E), b.getCommand("deleteSheet").update(E), b.getCommand("addSheet").update(E), b.getCommand("duplicateSheet").update(E), b.getCommand("selectTheme").update(E), b.getCommand("addNamedReference").update(E), b.getCommand("editNamedReference").update(E), b.getCommand("deleteNamedReference").update(E);
2791
+ const T = { disabled: !k.getProtection().isStructureAllowed() };
2792
+ b.getCommand("hideSheet").update(T), b.getCommand("deleteSheet").update(T), b.getCommand("addSheet").update(T), b.getCommand("duplicateSheet").update(T), b.getCommand("selectTheme").update(T), b.getCommand("addNamedReference").update(T), b.getCommand("editNamedReference").update(T), b.getCommand("deleteNamedReference").update(T);
2803
2793
  }, onScriptsChange: (k) => {
2804
2794
  h();
2805
2795
  } });
2806
2796
  const { isFullscreenAvailable: v, isFullscreenEnabled: S, toggleFullscreen: C } = (function(k = {}) {
2807
- const { target: E, onChange: M, onError: I, requestFullScreenOptions: F } = k, [L, O] = _(!1), [z, ie] = _(null), [J, pe] = _(!1), j = U(() => lt.requestFullscreen(E?.current || null, F), [E, F]), K = U(() => lt.exitFullscreen(), []), ee = U(() => lt.fullscreenElement ? K() : j(), [j, K]), V = U((Z) => {
2797
+ const { target: T, onChange: F, onError: I, requestFullScreenOptions: O } = k, [L, N] = _(!1), [z, ie] = _(null), [J, pe] = _(!1), j = U(() => lt.requestFullscreen(T?.current || null, O), [T, O]), K = U(() => lt.exitFullscreen(), []), ee = U(() => lt.fullscreenElement ? K() : j(), [j, K]), V = U((Z) => {
2808
2798
  const oe = lt.fullscreenElement;
2809
- ie(oe), pe(!!oe), M?.(Z);
2810
- }, [M]), A = U((Z) => {
2799
+ ie(oe), pe(!!oe), F?.(Z);
2800
+ }, [F]), A = U((Z) => {
2811
2801
  const oe = lt.fullscreenElement;
2812
2802
  ie(oe), pe(!!oe), I?.(Z);
2813
2803
  }, [I]);
2814
2804
  return de(() => {
2815
- O(lt.fullscreenEnabled);
2805
+ N(lt.fullscreenEnabled);
2816
2806
  }, []), de(() => (lt.on("change", V), lt.on("error", A), () => {
2817
2807
  lt.off("change", V), lt.off("error", A);
2818
2808
  }), [V, A]), { isFullscreenAvailable: L, fullscreenElement: z, isFullscreenEnabled: J, enableFullscreen: j, disableFullscreen: K, toggleFullscreen: ee };
@@ -2820,51 +2810,51 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2820
2810
  de(() => {
2821
2811
  b.getCommand("selectTheme").update({ state: () => a.getTheme(), context: () => ({ theme: a.getTheme(), themes: D, darkMode: l }) });
2822
2812
  }, [a?.getTheme(), l]);
2823
- const T = Y(async function(k, E) {
2824
- let M = null;
2813
+ const E = Y(async function(k, T) {
2814
+ let F = null;
2825
2815
  const I = a.getScripts();
2826
2816
  if (k?.declaration || k?.functionName) {
2827
- const F = k.declaration ? k.declaration.getName() : k.functionName;
2828
- (await I.searchFunctions({ name: F })).length > 0 && (M = F);
2817
+ const O = k.declaration ? k.declaration.getName() : k.functionName;
2818
+ (await I.searchFunctions({ name: O })).length > 0 && (F = O);
2829
2819
  }
2830
- if (M) try {
2831
- await I.executeMacro(M), f.current = Promise.resolve({ source: null, name: M });
2832
- } catch (F) {
2833
- return void p.showError(F);
2820
+ if (F) try {
2821
+ await I.executeMacro(F), f.current = Promise.resolve({ source: null, name: F });
2822
+ } catch (O) {
2823
+ return void p.showError(O);
2834
2824
  }
2835
2825
  }, [a, p]);
2836
2826
  de(() => {
2837
2827
  b.getCommand("newCellStyle").updateCallback((k) => {
2838
- p.showInputOptions({ initialValue: (() => {
2839
- let E = 0;
2828
+ p.showInput({ initialValue: (() => {
2829
+ let T = 0;
2840
2830
  for (; ; ) {
2841
- E++;
2842
- const M = `Style ${E}`;
2831
+ T++;
2832
+ const F = `Style ${T}`;
2843
2833
  try {
2844
- return a.getStyles().validateStyleName(M, !0), M;
2834
+ return a.getStyles().validateStyleName(F, !0), F;
2845
2835
  } catch {
2846
2836
  }
2847
2837
  }
2848
- })(), title: b.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInputOption: async (E, M) => {
2838
+ })(), title: b.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInput: async (T, F) => {
2849
2839
  let I = null;
2850
2840
  try {
2851
- a.getStyles().validateStyleName(E, !1);
2852
- } catch (O) {
2853
- I = O.message;
2841
+ a.getStyles().validateStyleName(T, !1);
2842
+ } catch (N) {
2843
+ I = N.message;
2854
2844
  }
2855
- let F = a.getStyles().getNamed(E), L = I;
2856
- return !L && F && (L = `Update style '${F.getName()}'.`), { valid: I === null, message: L };
2857
- } }).then(({ input: E, option: M }) => {
2845
+ let O = a.getStyles().getNamed(T), L = I;
2846
+ return !L && O && (L = `Update style '${O.getName()}'.`), { valid: I === null, message: L };
2847
+ } }).then(({ input: T, option: F }) => {
2858
2848
  const I = a.getSelectedSheet().getSelectedRange();
2859
- if (M !== "Ok") return;
2860
- const F = a.getStyles().setNamed({ name: E, style: I.getCell().getStyle() });
2861
- I.getStyle().update({ named: F.getName() });
2849
+ if (F !== "Ok") return;
2850
+ const O = a.getStyles().setNamed({ name: T, style: I.getCell().getStyle() });
2851
+ I.getStyle().update({ named: O.getName() });
2862
2852
  });
2863
2853
  }), b.getCommand("deleteCellStyle").updateCallback((k) => {
2864
2854
  k.delete();
2865
2855
  }), b.getCommand("modifyCellStyle").updateCallback(({ named: k }) => {
2866
- const E = a.getSelectedSheet().getSelectedRange();
2867
- a.getStyles().setNamed({ name: k.getName(), style: E.getCell().getStyle() });
2856
+ const T = a.getSelectedSheet().getSelectedRange();
2857
+ a.getStyles().setNamed({ name: k.getName(), style: T.getCell().getStyle() });
2868
2858
  }), b.getCommand("hideSheet").updateCallback((k) => {
2869
2859
  a.getSheetAt(k).setVisibility(Ft.Visibility.Hidden);
2870
2860
  }), b.getCommand("deleteSheet").updateCallback(async (k) => {
@@ -2889,88 +2879,86 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2889
2879
  await p.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) === "Close" && window.close();
2890
2880
  }), b.getCommand("newWorkbook").updateCallback(() => {
2891
2881
  g?.();
2892
- }), b.getCommand("executeScript").updateCallback(T), b.getCommand("executeSelectedScript").updateCallback(T);
2882
+ }), b.getCommand("executeScript").updateCallback(E), b.getCommand("executeSelectedScript").updateCallback(E);
2893
2883
  }, [a, p]);
2894
2884
  const P = Y(async (k) => {
2895
- let E = 0, M = null, I = "Find & Replace";
2885
+ let T = 0, F = null, I = "Find & Replace";
2896
2886
  k?.replace && !k?.replaceOptions?.maxCount && (I = "Replace All");
2897
- const F = await p.showBusy(I);
2887
+ const O = await p.showBusy(I);
2898
2888
  try {
2899
2889
  const L = k?.scope ?? "sheet";
2900
- let O = null;
2890
+ let N = null;
2901
2891
  const z = a.getSelectedSheet(), ie = { from: z.getSelectedCell(), ...k.findOptions };
2902
- if (O = L === "sheet" ? a.getSelectedSheet().find(ie) : a.find(ie), k.replace) {
2903
- const J = a.replace(O, k.replaceText, k.replaceOptions);
2904
- E = J.count, k.replaceOptions.maxCount && (M = J.last);
2892
+ if (N = L === "sheet" ? a.getSelectedSheet().find(ie) : a.find(ie), k.replace) {
2893
+ const J = a.replace(N, k.replaceText, k.replaceOptions);
2894
+ T = J.count, k.replaceOptions.maxCount && (F = J.last);
2905
2895
  } else {
2906
- let J = O.next();
2907
- J.done || (E++, M = J.value);
2896
+ let J = N.next();
2897
+ J.done || (T++, F = J.value);
2908
2898
  }
2909
- M?.select({ autoFocus: !1 }), F?.(), !k.replaceOptions.maxCount && E > 1 && p.showMessage(`We replaced ${E} cells.`);
2899
+ F?.select({ autoFocus: !1 }), O?.(), !k.replaceOptions.maxCount && T > 1 && p.showMessage(`We replaced ${T} cells.`);
2910
2900
  } catch (L) {
2911
- F?.(), p.showError(L);
2901
+ O?.(), p.showError(L);
2912
2902
  }
2913
- return E;
2903
+ return T;
2914
2904
  }, [a, t]), R = Y((k) => {
2915
- const E = { value: k, context: { selection: () => {
2916
- const M = a.getSelectedRanges(), I = [];
2917
- for (let F = 0; F < M.getCount(); F++) {
2918
- const L = M.at(F).getFixed(!0).getCoords();
2919
- I.push(L);
2905
+ const T = { selection: () => {
2906
+ const I = a.getSelectedRanges(), O = I.getCount(), L = new Array(O);
2907
+ for (let N = 0; N < O; N++) {
2908
+ const z = I.at(N).getFixed(!0).getCoords();
2909
+ L[N] = z;
2920
2910
  }
2921
- return a.getRanges(I);
2922
- }, getNames: () => a.getNames() }, onUpdate: async (M) => {
2911
+ return a.getRanges(L);
2912
+ }, getNames: () => a.getNames() }, F = { initialValue: k, context: () => T, onInput: async (I) => {
2923
2913
  try {
2924
- await M.select();
2925
- } catch (I) {
2926
- p.showMessage(I.message, { type: wt.Error });
2914
+ await I.select();
2915
+ } catch (O) {
2916
+ p.showMessage(O.message, { type: St.Error });
2927
2917
  }
2928
2918
  } };
2929
- return p.showWindow("namedDetails", E);
2919
+ return p.showWindow("namedDetails", F);
2930
2920
  }, [p, a, t]);
2931
2921
  return de(() => {
2932
- const k = (E = !1) => {
2933
- const M = a.getSelectedCell(), I = { onFindOrReplace: P, onKeyDown: (F) => {
2934
- b.findCommandByEvent(F) !== b.getCommand("find") && b.findCommandByEvent(F) !== b.getCommand("findReplace") || F.preventDefault();
2935
- }, findOptions: { text: "" }, findText: M.toTextUnformatted(!0) };
2936
- I.replace = E, p.showWindow?.("find", I, { disableAutoDestroy: !0 });
2922
+ const k = (T = !1) => {
2923
+ const F = { initialValue: { findOptions: { text: a.getSelectedCell().toTextUnformatted(!0) }, replace: T }, context: () => P, onKeyDown: (I) => {
2924
+ b.findCommandByEvent(I) !== b.getCommand("find") && b.findCommandByEvent(I) !== b.getCommand("findReplace") || I.preventDefault();
2925
+ }, autoFocus: !0, disableAutoDestroy: !0 };
2926
+ p.showWindow("find", F);
2937
2927
  };
2938
2928
  b.getCommand("find")?.update({ disabled: !p.showWindow }).updateCallback(() => {
2939
2929
  k();
2940
2930
  }), b.getCommand("findReplace")?.update({ disabled: !p.showWindow }).updateCallback(() => {
2941
2931
  k(!0);
2942
2932
  }), b.getCommand("activateTask")?.update({ disabled: !p }).updateCallback(() => {
2943
- const E = { onInputOption: async (M) => {
2933
+ const T = { onInput: async (F) => {
2944
2934
  try {
2945
- m.activateTaskPane(M);
2935
+ m.activateTaskPane(F);
2946
2936
  } catch (I) {
2947
2937
  p.showError(I.message);
2948
2938
  }
2949
2939
  }, title: b.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
2950
- p.showInputOptions(E);
2940
+ p.showInput(T);
2951
2941
  }), b.getCommand("goto")?.update({ disabled: !p }).updateCallback(() => {
2952
- const E = { onInputOption: async (M) => {
2942
+ const T = { onInput: async (F) => {
2953
2943
  try {
2954
- await a.getRanges(M).select();
2944
+ await a.getRanges(F).select();
2955
2945
  } catch (I) {
2956
- p.showMessage(I.message, { type: wt.Error });
2946
+ p.showMessage(I.message, { type: St.Error });
2957
2947
  }
2958
- }, onKeyDown: (M) => {
2959
- b.findCommandByEvent(M) === b.getCommand("goto") && M.preventDefault();
2960
2948
  }, title: b.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
2961
- p.showInputOptions(E);
2962
- }), b.getCommand("selectNamed")?.update({ disabled: !p }).updateCallback(async (E) => {
2963
- if (E) try {
2964
- await E.select();
2965
- } catch (M) {
2966
- p.showError(M);
2949
+ p.showInput(T);
2950
+ }), b.getCommand("selectNamed")?.update({ disabled: !p }).updateCallback(async (T) => {
2951
+ if (T) try {
2952
+ await T.select();
2953
+ } catch (F) {
2954
+ p.showError(F);
2967
2955
  }
2968
- }), b.getCommand("addNamedReference")?.updateCallback(async function(E) {
2956
+ }), b.getCommand("addNamedReference")?.updateCallback(async function(T) {
2969
2957
  R(null);
2970
- }), b.getCommand("editNamedReference")?.updateCallback(async function(E) {
2971
- R(E);
2972
- }), b.getCommand("deleteNamedReference")?.updateCallback(async function(E) {
2973
- E?.delete?.();
2958
+ }), b.getCommand("editNamedReference")?.updateCallback(async function(T) {
2959
+ R(T);
2960
+ }), b.getCommand("deleteNamedReference")?.updateCallback(async function(T) {
2961
+ T?.delete?.();
2974
2962
  }), b.getCommand("activeNameBox")?.updateCallback(async function() {
2975
2963
  t?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
2976
2964
  });
@@ -2996,8 +2984,8 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2996
2984
  }, [d, i]), b;
2997
2985
  }, Hc = () => {
2998
2986
  window.open(window.origin.toString(), "sheetxl-" + gt.uuidV4(), "popup=true");
2999
- }, Wc = "_sheetxl-theme_4opcr_2", jc = "_sheetxl-workbook_g5t6x_5", $c = (n) => o(li, { ...n }), Vc = (n) => o(si, { ...n }), _c = (n) => o(ii, { ...n }), Di = q(X((n, a) => {
3000
- const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: p = !1, contextMenuProps: i, renderContextMenu: s = $c, sheetsAllProps: d, renderSheetsAll: x = Vc, sheetTabProps: g, renderSheetTab: m, background: u = "transparent", className: b, sx: y, borderWidth: f, borderColor: h, gridTheme: w, gridStyle: v, ...S } = n, [C, D] = _(t?.getSelectedSheetIndex()), [T, P] = _(t?.getSheets().getItems()), [R, k] = _(t?.getProtection());
2987
+ }, Wc = "_sheetxl-theme_4opcr_2", jc = "_sheetxl-workbook_g5t6x_5", $c = (n) => o(li, { ...n }), Vc = (n) => o(si, { ...n }), _c = (n) => o(ii, { ...n }), Ei = q(X((n, a) => {
2988
+ const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: p = !1, contextMenuProps: i, renderContextMenu: s = $c, sheetsAllProps: d, renderSheetsAll: x = Vc, sheetTabProps: g, renderSheetTab: m, background: u = "transparent", className: b, sx: y, borderWidth: f, borderColor: h, gridTheme: w, gridStyle: v, ...S } = n, [C, D] = _(t?.getSelectedSheetIndex()), [E, P] = _(t?.getSheets().getItems()), [R, k] = _(t?.getProtection());
3001
2989
  We(t, { onViewChange(ne) {
3002
2990
  D(ne?.getSelectedSheetIndex());
3003
2991
  }, onSheetsChange: (ne) => {
@@ -3005,29 +2993,29 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
3005
2993
  }, onProtectionChange: (ne) => {
3006
2994
  k(ne?.getProtection());
3007
2995
  } });
3008
- const E = p || !R.isStructureAllowed(), M = W(() => {
2996
+ const T = p || !R.isStructureAllowed(), F = W(() => {
3009
2997
  const ne = [];
3010
- for (let G = 0; G < T.length; G++) ne.push(T[G].getName());
2998
+ for (let G = 0; G < E.length; G++) ne.push(E[G].getName());
3011
2999
  return ne;
3012
- }, [T]), I = U((ne) => {
3000
+ }, [E]), I = U((ne) => {
3013
3001
  r?.(ne) !== !1 && (t.getSheetAt(ne).select(), l?.(ne));
3014
- }, [t, r, l]), F = U((ne, G) => {
3002
+ }, [t, r, l]), O = U((ne, G) => {
3015
3003
  t.getSheetAt(ne).setName(G), l?.(ne);
3016
3004
  }, [t, l]), L = U((ne, G) => {
3017
3005
  t.getSheetAt(ne).setPosition(G), l?.(G);
3018
- }, [t, l]), O = Y(() => {
3006
+ }, [t, l]), N = Y(() => {
3019
3007
  if (r?.(C) === !1) return;
3020
3008
  const ne = C + 1;
3021
3009
  t.getSheets().add({ name: void 0, autoSelect: !0 }), l?.(ne);
3022
- }, [t, r, l, C]), z = W(() => ({ placement: "top-start" }), []), ie = xe(null), [J, pe] = _(!1), j = U((ne) => {
3010
+ }, [t, r, l, C]), z = W(() => ({ placement: "top-start" }), []), ie = be(null), [J, pe] = _(!1), j = U((ne) => {
3023
3011
  const { closeFloatAll: G, floatReference: se } = ne;
3024
3012
  return x({ workbook: t, gridStyle: v, floatReference: se, closeFloatAll: G, ...d });
3025
- }, [x, d, c, t, v]), { reference: K, component: ee } = ao({ label: "allSheet", popperProps: z, anchor: ie.current, onOpen: () => pe(!0), onClose: () => pe(!1), createPopupPanel: j }), V = xe(null), [A, Z] = _(null), oe = U((ne) => {
3013
+ }, [x, d, c, t, v]), { reference: K, component: ee } = ao({ label: "allSheet", popperProps: z, anchor: ie.current, onOpen: () => pe(!0), onClose: () => pe(!1), createPopupPanel: j }), V = be(null), [A, Z] = _(null), oe = U((ne) => {
3026
3014
  const { floatReference: G } = ne;
3027
3015
  return s?.({ workbook: t, index: A?.index, tabStripRef: V.current, commands: e, disabled: c, floatReference: G, ...i });
3028
- }, [s, i, c, t, e, A]), { reference: Be, component: ve } = ao({ label: "sheetTab", popperProps: z, anchor: { getBoundingClientRect: () => new DOMRect(A?.left || 0, A?.top || 0, 0, 0) }, onClose: () => Z(null), createPopupPanel: oe });
3016
+ }, [s, i, c, t, e, A]), { reference: Oe, component: ve } = ao({ label: "sheetTab", popperProps: z, anchor: { getBoundingClientRect: () => new DOMRect(A?.left || 0, A?.top || 0, 0, 0) }, onClose: () => Z(null), createPopupPanel: oe });
3029
3017
  de(() => {
3030
- A ? Be.open(0) : Be.close(0);
3018
+ A ? Oe.open(0) : Oe.close(0);
3031
3019
  }, [A]);
3032
3020
  const Ne = U((ne, G) => {
3033
3021
  ne.preventDefault(), Z({ left: ne.clientX - 2, top: ne.clientY - 4, index: G });
@@ -3040,25 +3028,25 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
3040
3028
  return G ? (m ?? _c)({ sheet: G, gridTheme: w, onContextMenu: (se) => {
3041
3029
  I(ne.index), Ne(se, ne.index);
3042
3030
  }, ...ne, ...g }) : null;
3043
- }, [m, g, t, w]), Ve = W(() => E ? null : o(vt, { disableInteractive: !0, title: "New sheet", children: o(st, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (ne) => ne.palette.primary.main }, color: (ne) => ne.palette.text.icon ?? ne.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (ne) => {
3031
+ }, [m, g, t, w]), Ve = W(() => T ? null : o(kt, { disableInteractive: !0, title: "New sheet", children: o(st, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (ne) => ne.palette.primary.main }, color: (ne) => ne.palette.text.icon ?? ne.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (ne) => {
3044
3032
  ne.button === 0 && ne.preventDefault();
3045
- }, onClick: () => O(), children: o(he, { iconKey: "AddCircle" }) }) }), [c, E, O]);
3046
- return H(B, { ref: a, className: Te(b), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y }, ...S, children: [o(zl, { ref: V, selectedTabIndex: C, tabNames: M, onSelectedTabIndexChange: I, onTabNameChange: F, onTabMove: L, background: u, borderColor: h, borderWidth: f, activeColor: null, disabled: c, disableDrag: E, createScrollStartButton: ps, createScrollEndButton: ds, createScrollEdgeButton: cs, createTabButton: _e, createTabDivider: (ne) => {
3033
+ }, onClick: () => N(), children: o(xe, { iconKey: "AddCircle" }) }) }), [c, T, N]);
3034
+ return H(B, { ref: a, className: Te(b), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y }, ...S, children: [o(zl, { ref: V, selectedTabIndex: C, tabNames: F, onSelectedTabIndexChange: I, onTabNameChange: O, onTabMove: L, background: u, borderColor: h, borderWidth: f, activeColor: null, disabled: c, disableDrag: T, createScrollStartButton: ps, createScrollEndButton: ds, createScrollEdgeButton: cs, createTabButton: _e, createTabDivider: (ne) => {
3047
3035
  const { key: G, ...se } = ne;
3048
3036
  return o(Q, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (Re) => ye(Re.palette.divider, 0.25) }, ...se }, G);
3049
- }, editLabelProps: { readOnly: E, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (ne) => {
3037
+ }, editLabelProps: { readOnly: T, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (ne) => {
3050
3038
  t.isValidSheetNameCharacter(ne.key) || ne.preventDefault();
3051
3039
  }, onCancel: () => {
3052
3040
  l?.(C);
3053
- } }, children: o(vt, { disableInteractive: !0, title: J ? "" : "List all sheets", children: o(bt, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (ne) => ne.palette.text.icon ?? ne.palette.action.active }, ref: ie, dense: !0, outlined: !1, selected: J, color: "primary", "aria-label": "menu", onMouseDown: (ne) => {
3041
+ } }, children: o(kt, { disableInteractive: !0, title: J ? "" : "List all sheets", children: o(bt, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (ne) => ne.palette.text.icon ?? ne.palette.action.active }, ref: ie, dense: !0, outlined: !1, selected: J, color: "primary", "aria-label": "menu", onMouseDown: (ne) => {
3054
3042
  ne.button === 0 && ne.preventDefault();
3055
3043
  }, onClick: () => {
3056
3044
  J ? K.close(0) : K.open(0);
3057
- }, icon: o(he, { iconKey: "Menu" }) }) }) }), o("div", { style: { borderTop: `solid ${h} ${f}px`, minWidth: "4px" } }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: "none", display: "flex", alignItems: "center" }, children: Ve }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: 1, minWidth: "24px" } }), ve, ee] });
3045
+ }, icon: o(xe, { iconKey: "Menu" }) }) }) }), o("div", { style: { borderTop: `solid ${h} ${f}px`, minWidth: "4px" } }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: "none", display: "flex", alignItems: "center" }, children: Ve }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: 1, minWidth: "24px" } }), ve, ee] });
3058
3046
  }));
3059
- Di.displayName = "WorkbookStrip";
3060
- const Pi = q(X((n, a) => {
3061
- const { workbook: t, commands: e, disabled: r, sx: l, floatReference: c, className: p, ...i } = n, [s, d] = on((E) => E + 1, 0), [x, g] = _(t.getSelectedSheet()), [m, u] = _(x.getSelectedRanges()), [b, y] = _(x.getSelectedCell());
3047
+ Ei.displayName = "WorkbookStrip";
3048
+ const Di = q(X((n, a) => {
3049
+ const { workbook: t, commands: e, disabled: r, sx: l, floatReference: c, className: p, ...i } = n, [s, d] = on((T) => T + 1, 0), [x, g] = _(t.getSelectedSheet()), [m, u] = _(x.getSelectedRanges()), [b, y] = _(x.getSelectedCell());
3062
3050
  We(t, { onSheetsChange() {
3063
3051
  g(t.getSelectedSheet());
3064
3052
  } }), We(x.getSelection(), { onChange() {
@@ -3066,70 +3054,70 @@ const Pi = q(X((n, a) => {
3066
3054
  } }), Ie(e, [], { onChange: () => {
3067
3055
  d();
3068
3056
  } });
3069
- const f = W(() => ({}), []), h = W(() => ({ commandHook: { beforeExecute: (E, M) => c.closeAll(), onExecute() {
3057
+ const f = W(() => ({}), []), h = W(() => ({ commandHook: { beforeExecute: (T, F) => c.closeAll(), onExecute() {
3070
3058
  }, onError() {
3071
3059
  console.log("onError");
3072
3060
  } }, disabled: r, scope: "contextMenu", parentFloat: c }), [r, c]), w = W(() => ({ ...f, ...h, variant: re.Menuitem }), [f, h]), v = W(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...h }), [e, h, c]), S = [];
3073
3061
  let C = m.isEntireRows(), D = m.isEntireColumns();
3074
- m && (C && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(ke(N, { command: e.getCommand("hideColumns"), ...w, key: "context:" + S.length })), S.push(ke(N, { command: e.getCommand("unhideColumns"), ...w, key: "context:" + S.length }))), D && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(ke(N, { command: e.getCommand("hideRows"), ...w, key: "context:" + S.length })), S.push(ke(N, { command: e.getCommand("unhideRows"), ...w, key: "context:" + S.length }))), (C || D) && S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), C && (S.push(ke(N, { command: e.getCommand("autoFitColumns"), ...w, key: "context:" + S.length })), S.push(ke(N, { ...w, command: e.getCommand("resizeColumns"), key: "context:" + S.length }))), D && (S.push(ke(N, { command: e.getCommand("autoFitRows"), ...w, key: "context:" + S.length })), S.push(ke(N, { ...w, command: e.getCommand("resizeRows"), key: "context:" + S.length }))));
3075
- const T = [], P = e.getCommand("formatTableStyle"), R = P?.context()?.table();
3062
+ m && (C && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(ke(M, { command: e.getCommand("hideColumns"), ...w, key: "context:" + S.length })), S.push(ke(M, { command: e.getCommand("unhideColumns"), ...w, key: "context:" + S.length }))), D && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(ke(M, { command: e.getCommand("hideRows"), ...w, key: "context:" + S.length })), S.push(ke(M, { command: e.getCommand("unhideRows"), ...w, key: "context:" + S.length }))), (C || D) && S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), C && (S.push(ke(M, { command: e.getCommand("autoFitColumns"), ...w, key: "context:" + S.length })), S.push(ke(M, { ...w, command: e.getCommand("resizeColumns"), key: "context:" + S.length }))), D && (S.push(ke(M, { command: e.getCommand("autoFitRows"), ...w, key: "context:" + S.length })), S.push(ke(M, { ...w, command: e.getCommand("resizeRows"), key: "context:" + S.length }))));
3063
+ const E = [], P = e.getCommand("formatTableStyle"), R = P?.context()?.table();
3076
3064
  if (jt(P), !C && !D) {
3077
- if (T.push(o(Q, { orientation: "horizontal" }, "contextBefore:" + T.length)), b?.getHyperlink()) T.push(ke(tt, { ...v, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T.length, quickCommand: "openHyperlink" }));
3065
+ if (E.push(o(Q, { orientation: "horizontal" }, "contextBefore:" + E.length)), b?.getHyperlink()) E.push(ke(tt, { ...v, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + E.length, quickCommand: "openHyperlink" }));
3078
3066
  else {
3079
- const E = e.getCommand("updateHyperlink");
3080
- T.push(ke(N, { command: E, ...w, key: "contextBefore:" + T.length }));
3067
+ const T = e.getCommand("updateHyperlink");
3068
+ E.push(ke(M, { command: T, ...w, key: "contextBefore:" + E.length }));
3081
3069
  }
3082
- if (b?.getComments()) T.push(ke(tt, { ...v, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T.length, quickCommand: "updateComments" }));
3070
+ if (b?.getComments()) E.push(ke(tt, { ...v, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + E.length, quickCommand: "updateComments" }));
3083
3071
  else {
3084
- const E = e.getCommand("updateComments");
3085
- T.push(ke(N, { command: E, ...w, key: "contextBefore:" + T.length }));
3072
+ const T = e.getCommand("updateComments");
3073
+ E.push(ke(M, { command: T, ...w, key: "contextBefore:" + E.length }));
3086
3074
  }
3087
- R ? T.push(ke(tt, { ...v, variant: re.Menuitem, key: "contextBefore:" + T.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: R, quickCommand: "editTable" })) : T.push(ke(N, { command: e.getCommand("insertTable"), ...w, key: "context:" + S.length })), T.push(ke(vi, { ...v, key: "contextBefore:" + T.length }));
3075
+ R ? E.push(ke(tt, { ...v, variant: re.Menuitem, key: "contextBefore:" + E.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: R, quickCommand: "editTable" })) : E.push(ke(M, { command: e.getCommand("insertTable"), ...w, key: "context:" + S.length })), E.push(ke(Fi, { ...v, key: "contextBefore:" + E.length }));
3088
3076
  }
3089
- const k = H(le, { children: [o(N, { command: e.getCommand("cut"), ...w }), o(nr, { command: e.getCommand("copy"), ...w }), o(ja, { command: e.getCommand("paste"), ...v, includePasteAllInPopup: !1 }), o(Q, { orientation: "horizontal" }), o(za, { ...v }), o(Q, { orientation: "horizontal" }), o(Aa, { commands: e, ...v, disableSheet: !0 }), o(Ia, { commands: e, ...v, disableSheet: !0 }), o(Ba, { ...v }), T, S] });
3077
+ const k = H(le, { children: [o(M, { command: e.getCommand("cut"), ...w }), o(nr, { command: e.getCommand("copy"), ...w }), o(ja, { command: e.getCommand("paste"), ...v, includePasteAllInPopup: !1 }), o(Q, { orientation: "horizontal" }), o(za, { ...v }), o(Q, { orientation: "horizontal" }), o(Aa, { commands: e, ...v, disableSheet: !0 }), o(Ia, { commands: e, ...v, disableSheet: !0 }), o(Oa, { ...v }), E, S] });
3090
3078
  return o(B, { ref: a, className: Te("menu", p), sx: { ...l }, ...i, children: k });
3091
3079
  }));
3092
- Pi.displayName = "WorkbookContextMenu";
3080
+ Di.displayName = "WorkbookContextMenu";
3093
3081
  const nr = q(X((n, a) => {
3094
3082
  const { command: t, ...e } = n, r = sn(), [l, c] = _(!1), [p, i] = _("info");
3095
3083
  return de(() => {
3096
3084
  const s = r.getMode();
3097
3085
  c(s?.key === "copy" || s?.key === "cut"), i(s?.key === "cut" ? "warn" : "accent");
3098
- }, [r]), o(N, { ref: a, command: t, icon: o(he, { iconKey: "copy.walking", sourceProps: { isWalking: l, themedType: p } }), ...e });
3099
- })), Ri = q(X((n, a) => {
3086
+ }, [r]), o(M, { ref: a, command: t, icon: o(xe, { iconKey: "copy.walking", sourceProps: { isWalking: l, themedType: p } }), ...e });
3087
+ })), Pi = q(X((n, a) => {
3100
3088
  const { movable: t, commands: e, disabled: r, sx: l, floatReference: c, ...p } = n;
3101
3089
  We(t, { onAnyChange(m) {
3102
3090
  } });
3103
3091
  const i = W(() => ({}), []), s = W(() => ({ commandHook: { beforeExecute: (m, u) => c.closeAll(), onExecute() {
3104
3092
  }, onError() {
3105
3093
  console.log("onError");
3106
- } }, disabled: r, parentFloat: c }), [r, c]), d = W(() => ({ variant: re.Menuitem, ...i, ...s }), [i, s]), x = W(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...s }), [e, s, c]), g = H(le, { children: [o(nr, { command: e.getCommand("copy"), ...d, variant: re.Menuitem }), [], o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), o(tt, { ...x, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), o(Q, { orientation: "horizontal" }), o(N, { ...d, command: e.getCommand("toggleLockAspectRatio") }), o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
3094
+ } }, disabled: r, parentFloat: c }), [r, c]), d = W(() => ({ variant: re.Menuitem, ...i, ...s }), [i, s]), x = W(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...s }), [e, s, c]), g = H(le, { children: [o(nr, { command: e.getCommand("copy"), ...d, variant: re.Menuitem }), [], o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), o(tt, { ...x, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), o(Q, { orientation: "horizontal" }), o(M, { ...d, command: e.getCommand("toggleLockAspectRatio") }), o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), o(Q, { orientation: "horizontal" }), o(tt, { ...x, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
3107
3095
  return o(B, { ref: a, sx: { paddingTop: "4px", paddingBottom: "4px", ...l }, ...p, children: g });
3108
3096
  }));
3109
- Ri.displayName = "MovableContextMenu";
3110
- const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai, { ...n }), Kc = (n, a) => o(ri, { ref: a, ...n }), Xc = (n) => o(Wt, { ...n }), Yc = (n, a) => o(Hl, { ref: a, ...n }), Zc = (n) => o(Za, { ...n }), Qc = (n) => o(Di, { ...n }), Jc = { fireOnModelChange: !1 }, ia = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Mi = q(X((n, a) => {
3111
- const { workbook: t, createWorkbookOptions: e, onNewWorkbook: r, onElementLoad: l, autoFocus: c = !1, sx: p, style: i, className: s, onFocus: d, onBlur: x, onKeyDown: g, onRepeatCommandChange: m, commands: u, showFormulaBar: b, formulaBarProps: y, renderFormulaBar: f = Kc, showTabs: h, tabsProps: w, renderTabs: v = Qc, showStatusBar: S, statusBarProps: C, renderStatusBar: D = Zc, toolbarProps: T, renderToolbar: P = Ti, contextMenuSx: R, renderContextMenu: k = Gc, renderFilterMenu: E = qc, renderMovableMenu: M = Uc, renderLoadingPanel: I = Xc, loadingPanelProps: F, sheetProps: L, renderSheet: O = Yc, mainWrapper: z, showHorizontalScrollbar: ie, showVerticalScrollbar: J, gridTheme: pe, headersTheme: j, enableDarkImages: K, ...ee } = n, V = Ke(), A = Gn(), Z = W(() => {
3097
+ Pi.displayName = "MovableContextMenu";
3098
+ const Uc = (n) => o(Pi, { ...n }), Gc = (n) => o(Di, { ...n }), qc = (n) => o(ai, { ...n }), Kc = (n, a) => o(ri, { ref: a, ...n }), Xc = (n) => o(Wt, { ...n }), Yc = (n, a) => o(Hl, { ref: a, ...n }), Zc = (n) => o(Za, { ...n }), Qc = (n) => o(Ei, { ...n }), Jc = { fireOnModelChange: !1 }, ia = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Ri = q(X((n, a) => {
3099
+ const { workbook: t, createWorkbookOptions: e, onNewWorkbook: r, onElementLoad: l, autoFocus: c = !1, sx: p, style: i, className: s, onFocus: d, onBlur: x, onKeyDown: g, onRepeatCommandChange: m, commands: u, showFormulaBar: b, formulaBarProps: y, renderFormulaBar: f = Kc, showTabs: h, tabsProps: w, renderTabs: v = Qc, showStatusBar: S, statusBarProps: C, renderStatusBar: D = Zc, toolbarProps: E, renderToolbar: P = Ci, contextMenuSx: R, renderContextMenu: k = Gc, renderFilterMenu: T = qc, renderMovableMenu: F = Uc, renderLoadingPanel: I = Xc, loadingPanelProps: O, sheetProps: L, renderSheet: N = Yc, mainWrapper: z, showHorizontalScrollbar: ie, showVerticalScrollbar: J, gridTheme: pe, headersTheme: j, enableDarkImages: K, ...ee } = n, V = Ke(), A = Gn(), Z = W(() => {
3112
3100
  const $ = { theme: A.getDefaultTheme(), ...e };
3113
- return t ?? new Bn($);
3114
- }, [t]), oe = xe(null), [Be, ve] = _(!1), Ne = xe(null), _e = W(() => o(B, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Ne }), []), [Ve, ne] = _(!1), [G, se] = _(!1), Re = U(() => {
3101
+ return t ?? new On($);
3102
+ }, [t]), oe = be(null), [Oe, ve] = _(!1), Ne = be(null), _e = W(() => o(B, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Ne }), []), [Ve, ne] = _(!1), [G, se] = _(!1), Re = U(() => {
3115
3103
  ne(!0);
3116
- }, []), qe = xe(null), Ee = Ct(a, () => ({ isWorkbookElement: () => !0, getWorkbook: () => Z, getSheetElement: () => oe.current, getViewportElement: () => Ne.current, getFormulaBarElement: () => qe.current, focus() {
3104
+ }, []), qe = be(null), Ee = Tt(a, () => ({ isWorkbookElement: () => !0, getWorkbook: () => Z, getSheetElement: () => oe.current, getViewportElement: () => Ne.current, getFormulaBarElement: () => qe.current, focus() {
3117
3105
  oe && oe.current && oe.current.focus();
3118
- } }), [Z]), rt = xe(null);
3119
- St(() => {
3106
+ } }), [Z]), rt = be(null);
3107
+ vt(() => {
3120
3108
  !Ve || !Ee.current || (async () => (rt.current !== l && (await l?.({ source: Ee.current }), rt.current = l), se(!0)))();
3121
3109
  }, [Ve, Ee.current]), Xr(Ee.current);
3122
3110
  const Xe = U(($) => (oe.current?.submitEdit(), !0), []), dt = U(() => {
3123
3111
  requestAnimationFrame(() => {
3124
3112
  oe?.current?.focus();
3125
3113
  });
3126
- }, []), [Me, te] = _(Z?.getSelectedSheet()), [Ce, Tt] = _(Z?.getProtection());
3114
+ }, []), [Me, te] = _(Z?.getSelectedSheet()), [Ce, Et] = _(Z?.getProtection());
3127
3115
  We(Z, { onSheetsChange: ($) => {
3128
3116
  te($?.getSelectedSheet());
3129
3117
  }, onViewChange($) {
3130
3118
  te($?.getSelectedSheet());
3131
3119
  }, onProtectionChange: ($) => {
3132
- Tt($?.getProtection());
3120
+ Et($?.getProtection());
3133
3121
  } }), We(Z, { onRequestSelect: async ($, ue) => new Promise((Ae) => {
3134
3122
  oe.current.getSheet() !== ue ? oe.current.getGridElement()?.onViewChangeOnce(() => {
3135
3123
  oe.current.getSheet() !== ue && Ae(!1), Ae(!0);
@@ -3143,31 +3131,31 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3143
3131
  U(() => {
3144
3132
  oe.current.focus();
3145
3133
  }, []);
3146
- const Fe = zc({ workbook: Z, workbookElement: Ee.current, target: () => oe.current, commands: u, darkMode: Ue.body.darkMode, onNewWorkbook: r }), so = xe(null), [mn, cr] = _(!1), [dr, pr] = _(null), [ur, ol] = _(ho.Top), [co, nl] = _(Fl.EmptyBounds), hn = U(() => {
3134
+ const Fe = zc({ workbook: Z, workbookElement: Ee.current, target: () => oe.current, commands: u, darkMode: Ue.body.darkMode, onNewWorkbook: r }), so = be(null), [mn, cr] = _(!1), [dr, pr] = _(null), [ur, ol] = _(ho.Top), [co, nl] = _(Fl.EmptyBounds), hn = U(() => {
3147
3135
  cr(!1), pr(null);
3148
3136
  }, []), po = U(($, ue, Ae = ho.Top) => {
3149
3137
  nl($), ol(Ae), pr(ue), so.current !== null && setTimeout(() => {
3150
3138
  so.current !== null && so.current.update();
3151
3139
  }, 160), cr(!0);
3152
- }, []), [Gd, mr] = _("sheet"), Et = h ?? _t?.isShowTabs(), Dt = ie ?? _t?.isShowHorizontalScrollbar(), rl = b ?? _t?.isShowFormulaBar(), Ao = S ?? _t?.isShowStatusBar(), hr = J ?? _t?.isShowVerticalScrollbar(), Ut = Ue?.header?.edgeStrokeFill || "rgb(171,171,171)", al = W(() => Ao ? D({ sheet: Me, gridStyle: Ue, ...C }) : null, [D, C, Ao, Ue, Me]), il = W(() => P({ commands: Fe, workbook: Ee.current, ...T }), [Fe, P, T, V]), [ll, { width: gn }] = zt(), Pt = gn === 0 || gn > 560, fn = W(() => {
3153
- if (!Et) return null;
3140
+ }, []), [Gd, mr] = _("sheet"), Dt = h ?? _t?.isShowTabs(), Pt = ie ?? _t?.isShowHorizontalScrollbar(), rl = b ?? _t?.isShowFormulaBar(), Ao = S ?? _t?.isShowStatusBar(), hr = J ?? _t?.isShowVerticalScrollbar(), Ut = Ue?.header?.edgeStrokeFill || "rgb(171,171,171)", al = W(() => Ao ? D({ sheet: Me, gridStyle: Ue, ...C }) : null, [D, C, Ao, Ue, Me]), il = W(() => P({ commands: Fe, workbook: Ee.current, ...E }), [Fe, P, E, V]), [ll, { width: gn }] = zt(), Rt = gn === 0 || gn > 560, fn = W(() => {
3141
+ if (!Dt) return null;
3154
3142
  let $ = v({ background: Ue.body.fill, borderWidth: 1, borderColor: Ut, gridTheme: lo, gridStyle: Ue, onBeforeUserChange: Xe, onUserChange: dt, workbook: Z, commands: Fe, sheetTabProps: {}, ...w });
3155
- return Pt || ($ = o("div", { style: { flex: "none", display: "flex" }, children: $ })), $;
3156
- }, [v, w, V, Z, lo, Pt, Fe, Et]), gr = U(($) => {
3143
+ return Rt || ($ = o("div", { style: { flex: "none", display: "flex" }, children: $ })), $;
3144
+ }, [v, w, V, Z, lo, Rt, Fe, Dt]), gr = U(($) => {
3157
3145
  const { style: ue, ...Ae } = $;
3158
3146
  let je = null, Ye = null, $e = null;
3159
- if (Dt && (Ye = o("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${Ut} 1px`, flexDirection: "column", justifyContent: "center" }, children: o(Sr, { ...Ae, style: { paddingLeft: "4px", paddingRight: "4px", ...ue }, endGap: 700, sheet: Me, onShowTooltip: (Ge) => {
3147
+ if (Pt && (Ye = o("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${Ut} 1px`, flexDirection: "column", justifyContent: "center" }, children: o(Sr, { ...Ae, style: { paddingLeft: "4px", paddingRight: "4px", ...ue }, endGap: 700, sheet: Me, onShowTooltip: (Ge) => {
3160
3148
  po({ x: Ge.anchor.x, y: Ge.anchor.y, width: 0, height: 0 }, Ge.display, Ge.placement);
3161
- }, onCloseTooltip: () => hn() }) })), Et && Pt && ($e = fn), Et && Pt && !Dt && ($e = H(B, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [$e, o(B, { sx: { borderTop: `solid ${Ut} 1px`, flex: "1" } })] })), $e && Dt) je = o(Qn, { position: Z.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: Ge }) => {
3149
+ }, onCloseTooltip: () => hn() }) })), Dt && Rt && ($e = fn), Dt && Rt && !Pt && ($e = H(B, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [$e, o(B, { sx: { borderTop: `solid ${Ut} 1px`, flex: "1" } })] })), $e && Pt) je = o(Qn, { position: Z.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: Ge }) => {
3162
3150
  Z.getView().setTabRatio(Math.round(10 * Ge));
3163
3151
  }, minBefore: "200px", minAfter: "180px", resizerProps: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${V.palette.text.icon ?? V.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${Ut} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: $e, elementAfter: Ye });
3164
- else if (Dt) je = Ye;
3152
+ else if (Pt) je = Ye;
3165
3153
  else {
3166
3154
  if (!$e) return o(B, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: Ao ? null : `solid ${Ut} 1px` } });
3167
3155
  je = $e;
3168
3156
  }
3169
3157
  return o(B, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: je });
3170
- }, [Me, Xe, Z, Ue, lo, Fe, Et, Dt, Ao, Pt]), [Je, uo] = ae.useState(null), sl = W(() => ({ placement: "right-start", ...Je?.popperProps }), [Je?.popperProps]), { reference: fr, component: cl } = ao({ label: "contextMenu", popperProps: sl, anchor: Je?.anchor ?? { getBoundingClientRect: () => new DOMRect(Je?.clientX || 0, Je?.clientY || 0) }, onClose: () => uo(null), createPopupPanel: Je?.createPopupPanel });
3158
+ }, [Me, Xe, Z, Ue, lo, Fe, Dt, Pt, Ao, Rt]), [Je, uo] = ae.useState(null), sl = W(() => ({ placement: "right-start", ...Je?.popperProps }), [Je?.popperProps]), { reference: fr, component: cl } = ao({ label: "contextMenu", popperProps: sl, anchor: Je?.anchor ?? { getBoundingClientRect: () => new DOMRect(Je?.clientX || 0, Je?.clientY || 0) }, onClose: () => uo(null), createPopupPanel: Je?.createPopupPanel });
3171
3159
  de(() => {
3172
3160
  Je ? fr.open(0) : fr.close(0);
3173
3161
  }, [Je]);
@@ -3175,9 +3163,9 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3175
3163
  if ($?.isDefaultPrevented()) return !0;
3176
3164
  $.preventDefault(), Je && Je.anchor === $.currentTarget ? uo(null) : uo({ anchor: $.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (Ae) => {
3177
3165
  const { floatReference: je } = Ae;
3178
- return E({ filter: ue, commands: Fe, floatReference: je, sx: { ...R } });
3166
+ return T({ filter: ue, commands: Fe, floatReference: je, sx: { ...R } });
3179
3167
  } });
3180
- }, [E, R, Fe, Z, Je]), br = Y(($) => {
3168
+ }, [T, R, Fe, Z, Je]), br = Y(($) => {
3181
3169
  if ($.originalEvent?.isDefaultPrevented()) return !0;
3182
3170
  $.originalEvent?.preventDefault(), uo({ clientX: $.clientX, clientY: $.clientY, createPopupPanel: (ue) => {
3183
3171
  const { floatReference: Ae } = ue;
@@ -3187,11 +3175,11 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3187
3175
  if ($?.isDefaultPrevented()) return !0;
3188
3176
  $.preventDefault(), uo({ clientX: $.clientX, clientY: $.clientY, createPopupPanel: (Ae) => {
3189
3177
  const { floatReference: je } = Ae;
3190
- return M({ movable: ue, commands: Fe, floatReference: je, sx: { ...R } });
3178
+ return F({ movable: ue, commands: Fe, floatReference: je, sx: { ...R } });
3191
3179
  } });
3192
- }, [M, R, Fe]);
3180
+ }, [F, R, Fe]);
3193
3181
  W(() => {
3194
- const $ = [new He("openContextMenu", () => oe.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [fe.Shift] }, { key: "ContextMenu" }] })];
3182
+ const $ = [new He("openContextMenu", () => oe.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [ge.Shift] }, { key: "ContextMenu" }] })];
3195
3183
  Fe.addCommands($, !0);
3196
3184
  }, [Fe]), de(() => {
3197
3185
  Fe.getCommand("openContextMenu").updateCallback(() => {
@@ -3235,7 +3223,7 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3235
3223
  Fe?.getCommand("insertImageFromFile")?.execute({ file: ue, options: { bounds: { x: Ye.x, y: Ye.y } }, goto: { range: { ...$e } } });
3236
3224
  } else Fe?.getCommand("openWorkbook")?.execute(ue);
3237
3225
  }
3238
- }, [Fe, Io]), xl = W(() => Io ? o(B, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: ($) => $.palette.divider, color: ($) => $.palette.primary.dark }, children: o(Pe, { variant: "h4", children: Io }) }) : null, [Io]), xr = xe(null), yl = W(() => o(Wn, { in: !G, nodeRef: xr, timeout: 500, classNames: "animating", unmountOnExit: !0, children: o(B, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: I({ ref: xr, transitionDelay: "0", transparentBackground: !1, sx: { opacity: G ? 0 : p?.opacity, pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...F } }) }) }), [G, I, F]), wl = W(() => f({ sx: { marginTop: ($) => $.spacing(0.25), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, workbook: Z, sheetElement: oe.current, gridStyle: Ue, onFocus: gl, ...y, NamedCollectionEditorProps: { restoreFocus: ($) => oe.current.focus($), ...y?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Fe, ...y?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, qe), [f, y, Z, Ue, Fe, G]), Sl = U(($) => {
3226
+ }, [Fe, Io]), xl = W(() => Io ? o(B, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: ($) => $.palette.divider, color: ($) => $.palette.primary.dark }, children: o(Pe, { variant: "h4", children: Io }) }) : null, [Io]), xr = be(null), yl = W(() => o(Wn, { in: !G, nodeRef: xr, timeout: 500, classNames: "animating", unmountOnExit: !0, children: o(B, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: I({ ref: xr, transitionDelay: "0", transparentBackground: !1, sx: { opacity: G ? 0 : p?.opacity, pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...O } }) }) }), [G, I, O]), wl = W(() => f({ sx: { marginTop: ($) => $.spacing(0.25), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, workbook: Z, sheetElement: oe.current, gridStyle: Ue, onFocus: gl, ...y, NamedCollectionEditorProps: { restoreFocus: ($) => oe.current.focus($), ...y?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Fe, ...y?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, qe), [f, y, Z, Ue, Fe, G]), Sl = U(($) => {
3239
3227
  const { movable: ue, ...Ae } = $, je = { movable: ue, onContextMenuCapture: (Ge) => {
3240
3228
  pl(Ge, ue);
3241
3229
  }, ...Ae }, Ye = ue.getContent().getType();
@@ -3250,7 +3238,7 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3250
3238
  $e = o($l, { ...Ge });
3251
3239
  }
3252
3240
  return o("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: $e }, ue.getUUID());
3253
- }, []), yr = W(() => O({ style: ia, onFocus: hl, gridStyle: Ue, headersStyle: el, sheet: Me, commands: Fe, onSheetContextMenu: br, onViewportChange: ($) => {
3241
+ }, []), yr = W(() => N({ style: ia, onFocus: hl, gridStyle: Ue, headersStyle: el, sheet: Me, commands: Fe, onSheetContextMenu: br, onViewportChange: ($) => {
3254
3242
  tl($);
3255
3243
  }, showScrollbars: !1, viewportComponent: _e, onRepeatCommandChange: m, onElementLoad: Re, onShowColumnTooltip: ($) => {
3256
3244
  po($.anchor, $.display, ho.Top);
@@ -3263,10 +3251,10 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3263
3251
  }, ...L?.cellRenderProps } }, oe), [Fe, L, Me, Ue, m]), vl = W(() => {
3264
3252
  let $ = o(vs, { ref: ll, style: ia, viewport: sr, touchElement: oe.current?.getGridElement()?.stage, onScrollViewport: (ue) => {
3265
3253
  oe.current?.getGridElement()?.scrollTo(ue);
3266
- }, showHorizontalScrollbar: Dt || Et, showVerticalScrollbar: hr, createHorizontalScrollbar: gr, createVerticalScrollbar: fl, children: yr });
3267
- return Pt || gn === 0 || ($ = H(le, { children: [$, fn] })), z ? z($) : $;
3268
- }, [Dt, Et, gr, hr, sr, Pt, yr, fn, V, z]), kl = W(() => o(vt, { arrow: !0, disableInteractive: !0, open: mn, title: o(Pe, { variant: "subtitle2", component: "div", children: dr }), placement: ur, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: so, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: mn ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(co.x, co.y, co.width, co.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: o(B, {}) }), [mn, dr, ur, co, so]), Cl = W(() => ({ boxSizing: "border-box", background: ($) => $.palette.mode !== "dark" ? Ue.header.fill : $.palette.background.paper, "& *": { ...us(V), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${Ut} 1px` }, ...p }), [p, Ue]), Tl = W(() => o(B, { sx: { marginBottom: ($) => $.spacing(0.75) } }), []), El = W(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: G ? void 0 : 0, "--sxl-app-color-high-contrast": V.palette.primary.main, "--sxl-app-color-primary": V.palette.primary.main, "--sxl-app-color-primary-dark": V.palette.primary.dark, "--sxl-app-color-primary-light": V.palette.primary.light, "--sxl-app-color-info": V.palette.info.main, "--sxl-app-color-info-dark": V.palette.info.dark, "--sxl-app-color-info-light": V.palette.info.light, "--sxl-app-color-secondary": V.palette.secondary.main, "--sxl-app-color-secondary-dark": V.palette.secondary.dark, "--sxl-app-color-secondary-light": V.palette.secondary.light, "--sxl-app-color-success": V.palette.success.main, "--sxl-app-color-success-dark": V.palette.success.dark, "--sxl-app-color-success-light": V.palette.success.light, "--sxl-app-color-warning": V.palette.warning.main, "--sxl-app-color-warning-dark": V.palette.warning.dark, "--sxl-app-color-warning-light": V.palette.warning.light, "--sxl-app-color-error": V.palette.error.main, "--sxl-app-color-error-dark": V.palette.error.dark, "--sxl-app-color-error-light": V.palette.error.light, "--sxl-app-color-text": V.palette.text.primary, "--sxl-app-color-text-secondary": V.palette.text.secondary, "--sxl-app-color-text-disabled": V.palette.text.disabled, "--sxl-app-color-background": V.palette.background.paper, "--sxl-app-color-button-surface": V.palette.grey[600], "--sxl-app-color-shadow": V.palette.action.focus, "--sxl-app-color-grey": V.palette.grey[500], "--sxl-app-filter-dark-invert": Ue.body.darkMode && K ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ue.body.darkMode ? `linear-gradient(${ye("#fff", Oe(5))}, ${ye("#fff", Oe(5))})` : void 0 }), [Ue, V, G]), Dl = W(() => Te(Va), []);
3269
- return H(no, { className: Te("sheetxl-workbook", jc, { "Mui-focusVisible": Be }, Wc, s), sx: Cl, style: i, square: !1, ...ee, ref: Ee, onFocus: ($) => {
3254
+ }, showHorizontalScrollbar: Pt || Dt, showVerticalScrollbar: hr, createHorizontalScrollbar: gr, createVerticalScrollbar: fl, children: yr });
3255
+ return Rt || gn === 0 || ($ = H(le, { children: [$, fn] })), z ? z($) : $;
3256
+ }, [Pt, Dt, gr, hr, sr, Rt, yr, fn, V, z]), kl = W(() => o(kt, { arrow: !0, disableInteractive: !0, open: mn, title: o(Pe, { variant: "subtitle2", component: "div", children: dr }), placement: ur, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: so, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: mn ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(co.x, co.y, co.width, co.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: o(B, {}) }), [mn, dr, ur, co, so]), Cl = W(() => ({ boxSizing: "border-box", background: ($) => $.palette.mode !== "dark" ? Ue.header.fill : $.palette.background.paper, "& *": { ...us(V), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${Ut} 1px` }, ...p }), [p, Ue]), Tl = W(() => o(B, { sx: { marginBottom: ($) => $.spacing(0.75) } }), []), El = W(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: G ? void 0 : 0, "--sxl-app-color-high-contrast": V.palette.primary.main, "--sxl-app-color-primary": V.palette.primary.main, "--sxl-app-color-primary-dark": V.palette.primary.dark, "--sxl-app-color-primary-light": V.palette.primary.light, "--sxl-app-color-info": V.palette.info.main, "--sxl-app-color-info-dark": V.palette.info.dark, "--sxl-app-color-info-light": V.palette.info.light, "--sxl-app-color-secondary": V.palette.secondary.main, "--sxl-app-color-secondary-dark": V.palette.secondary.dark, "--sxl-app-color-secondary-light": V.palette.secondary.light, "--sxl-app-color-success": V.palette.success.main, "--sxl-app-color-success-dark": V.palette.success.dark, "--sxl-app-color-success-light": V.palette.success.light, "--sxl-app-color-warning": V.palette.warning.main, "--sxl-app-color-warning-dark": V.palette.warning.dark, "--sxl-app-color-warning-light": V.palette.warning.light, "--sxl-app-color-error": V.palette.error.main, "--sxl-app-color-error-dark": V.palette.error.dark, "--sxl-app-color-error-light": V.palette.error.light, "--sxl-app-color-text": V.palette.text.primary, "--sxl-app-color-text-secondary": V.palette.text.secondary, "--sxl-app-color-text-disabled": V.palette.text.disabled, "--sxl-app-color-background": V.palette.background.paper, "--sxl-app-color-button-surface": V.palette.grey[600], "--sxl-app-color-shadow": V.palette.action.focus, "--sxl-app-color-grey": V.palette.grey[500], "--sxl-app-filter-dark-invert": Ue.body.darkMode && K ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ue.body.darkMode ? `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` : void 0 }), [Ue, V, G]), Dl = W(() => Te(Va), []);
3257
+ return H(no, { className: Te("sheetxl-workbook", jc, { "Mui-focusVisible": Oe }, Wc, s), sx: Cl, style: i, square: !1, ...ee, ref: Ee, onFocus: ($) => {
3270
3258
  ve(!0), ml(), d?.($);
3271
3259
  }, onBlur: ($) => {
3272
3260
  ve(!1), x?.($);
@@ -3279,14 +3267,14 @@ const Uc = (n) => o(Ri, { ...n }), Gc = (n) => o(Pi, { ...n }), qc = (n) => o(ai
3279
3267
  }
3280
3268
  }, onDragEnter: xn, onDragLeave: xn, onDragOver: xn, onDrop: bl, children: [H("div", { className: Dl, style: El, children: [il, rl ? wl : null, Tl, vl, al, kl, cl, xl] }), yl] });
3281
3269
  }));
3282
- Mi.displayName = "WorkbookElement";
3283
- const ed = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": { color: (t) => t.palette.text.secondary }, backgroundColor: (t) => ye(t.palette.background.paper, 0.6), borderRadius: (t) => `${t.shape.borderRadius}px`, border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (t) => t.palette.background.paper }, "&:hover:not([disabled])": { border: (t) => `solid ${n ? t.palette.text?.primary : t.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (t) => `solid ${t.palette.primary.main} 1px !important`, border: (t) => `1px solid ${t.palette?.primary?.main} !important` } }, Ni = q(X((n, a) => {
3284
- const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: p = !1, hidden: i, ...s } = n, [d, x] = _(!1), [g, m] = _(!1), [u, b] = _(r ?? ""), [y, f] = _(""), [h, { width: w }] = zt(), [v, { width: S }] = zt(), [C, D] = _(!1), T = xe(null), P = xe(null), R = Ct(a, () => ({ requestWorkbookTitle: (k = null, E) => {
3285
- P.current = { onAccept: k, requestReason: E?.requestReason }, E?.selectAll && T.current?.select(), T.current?.focus(E);
3270
+ Ri.displayName = "WorkbookElement";
3271
+ const ed = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": { color: (t) => t.palette.text.secondary }, backgroundColor: (t) => ye(t.palette.background.paper, 0.6), borderRadius: (t) => `${t.shape.borderRadius}px`, border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (t) => t.palette.background.paper }, "&:hover:not([disabled])": { border: (t) => `solid ${n ? t.palette.text?.primary : t.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (t) => `solid ${t.palette.primary.main} 1px !important`, border: (t) => `1px solid ${t.palette?.primary?.main} !important` } }, Mi = q(X((n, a) => {
3272
+ const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: p = !1, hidden: i, ...s } = n, [d, x] = _(!1), [g, m] = _(!1), [u, b] = _(r ?? ""), [y, f] = _(""), [h, { width: w }] = zt(), [v, { width: S }] = zt(), [C, D] = _(!1), E = be(null), P = be(null), R = Tt(a, () => ({ requestWorkbookTitle: (k = null, T) => {
3273
+ P.current = { onAccept: k, requestReason: T?.requestReason }, T?.selectAll && E.current?.select(), E.current?.focus(T);
3286
3274
  }, focus: (k) => {
3287
- T.current?.focus(k);
3275
+ E.current?.focus(k);
3288
3276
  } }), []);
3289
- return St(() => {
3277
+ return vt(() => {
3290
3278
  D(r !== u), f(r), b(r);
3291
3279
  }, [r]), de(() => {
3292
3280
  C && w !== 0 && to.debounce(() => {
@@ -3296,7 +3284,7 @@ const ed = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": {
3296
3284
  m(u && !Jt.isValidWindowsFilename(u));
3297
3285
  }, [u]), i ? null : o(B, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: C ? "0" : "1", transition: C ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: $t([R, v, a]), ...s, children: o(nt, { label: P.current?.requestReason ?? "Workbook Name", children: H(B, { className: Te({ "Mui-focusVisible": d }), sx: { visibility: w === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...ed(!0, p), ...t }, children: [p ? o(Pe, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: u !== y ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (k) => g ? k.palette.error.dark : void 0 }, children: r ?? l }) : o(Kn, { sx: { width: `${Math.min(w + 3, Math.max(S, R.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (k) => g ? k.palette.error.dark : void 0, fontStyle: u !== y ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: !0, fullWidth: !1, multiline: !1, readOnly: p, spellCheck: !1, placeholder: l, onFocus: (k) => {
3298
3286
  x(!0), k.target?.select();
3299
- }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: T }, onBlur: () => {
3287
+ }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: E }, onBlur: () => {
3300
3288
  x(!1), g ? b(y) : (u !== y && (c?.(u), u && P.current?.onAccept?.(u, "blur")), P.current = null);
3301
3289
  }, onChange: (k) => {
3302
3290
  if (k.target.value.length > Jt.MAX_WORKBOOK_NAME_SIZE) return k.stopPropagation(), void k.preventDefault();
@@ -3307,49 +3295,49 @@ const ed = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": {
3307
3295
  }, 0)), P.current = null, k.stopPropagation(), k.preventDefault());
3308
3296
  }, value: u }), o(B, { ref: h, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: u !== y ? "italic" : void 0, fontFamily: (k) => k.typography.fontFamily, letterSpacing: "0.00938em" }, children: u || l })] }) }) });
3309
3297
  }));
3310
- Ni.displayName = "WorkbookTitle";
3298
+ Mi.displayName = "WorkbookTitle";
3311
3299
  const td = q(X((n, a) => {
3312
- const { title: t, commands: e, className: r, ...l } = n, c = cn(), [p, i] = _(!1), [s, d] = _(!1), x = xe(null), [g, m] = on((T) => T + 1, 0), [u, { width: b }] = zt(), y = Ie(e, ["editTable"])[0].context(), f = y.table(), [h, w] = _(() => f ? y.getNames().getRanges(f.getRange()) : null), v = W(() => f?.getName() ?? "", [f]);
3313
- We(y.table(), { onAnchorCoordsChange(T) {
3314
- w(y.getNames().getRanges(T.getRange()));
3315
- }, onProtectedChange(T) {
3300
+ const { title: t, commands: e, className: r, ...l } = n, c = cn(), [p, i] = _(!1), [s, d] = _(!1), x = be(null), [g, m] = on((E) => E + 1, 0), [u, { width: b }] = zt(), y = Ie(e, ["editTable"])[0].context(), f = y.table(), [h, w] = _(() => f ? y.getNames().getRanges(f.getRange()) : null), v = W(() => f?.getName() ?? "", [f]);
3301
+ We(y.table(), { onAnchorCoordsChange(E) {
3302
+ w(y.getNames().getRanges(E.getRange()));
3303
+ }, onProtectedChange(E) {
3316
3304
  m();
3317
3305
  } });
3318
- const S = Y((T) => {
3319
- y?.table().setName(T);
3320
- }, [y]), C = Y((T) => {
3321
- y?.table().resize(T.at(0));
3306
+ const S = Y((E) => {
3307
+ y?.table().setName(E);
3308
+ }, [y]), C = Y((E) => {
3309
+ y?.table().resize(E.at(0));
3322
3310
  }, [y]);
3323
3311
  let D = null;
3324
- return y.table() || (D = o(Pe, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), o(no, { square: !0, onFocus: () => i(!0), onBlur: (T) => {
3325
- x?.current?.contains(T.relatedTarget) || i(!1);
3326
- }, ref: $t([x, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (T) => T.spacing(1.5), paddingRight: (T) => T.spacing(1.5), paddingTop: (T) => T.spacing(1.5), paddingBottom: (T) => T.spacing(1.5), boxSizing: "border-box" }, className: Te("sxl-table-details-panel", r, { "sxl-has-focus": p }), ...l, children: D || H(B, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: y.table() ? 1 : 0 }, children: [o(B, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (T) => T.spacing(2), paddingLeft: (T) => T.spacing(2), paddingRight: (T) => T.spacing(2) }, children: H(B, { className: gc, children: [o(Ka, { formName: "name", defaultInput: v, value: f?.getName() ?? "No table", onChangeInput: S, onValidate: (T) => {
3327
- f && f.getName().toLowerCase() === T.toLowerCase() || y?.getNames().validateName(T);
3328
- }, disabled: f?.isProtected() ?? !0, onFocus: (T) => {
3329
- s || T.target?.select(), d(!0);
3330
- } }), o(Xa, { formName: "range", value: h, onChangeInput: C, resolvedAddress: y.getNames().getRanges.bind(y.getNames()), disabled: f?.isProtected() ?? !0, onFocus: (T) => {
3331
- s || T.target?.select(), d(!0);
3332
- } })] }) }), H(B, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (T) => T.spacing(0.5), marginTop: (T) => T.spacing(1) }, children: [o(Q, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(uc, { disabled: f?.isProtected(), styleOptions: f?.getStyleOptions() ?? null, onStyleOptionsChange: (T) => {
3333
- f.updateStyleOptions(T);
3334
- }, showHeaderRow: f?.getShowHeaders(), onShowHeaderRowChange: (T) => {
3312
+ return y.table() || (D = o(Pe, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), o(no, { square: !0, onFocus: () => i(!0), onBlur: (E) => {
3313
+ x?.current?.contains(E.relatedTarget) || i(!1);
3314
+ }, ref: $t([x, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (E) => E.spacing(1.5), paddingRight: (E) => E.spacing(1.5), paddingTop: (E) => E.spacing(1.5), paddingBottom: (E) => E.spacing(1.5), boxSizing: "border-box" }, className: Te("sxl-table-details-panel", r, { "sxl-has-focus": p }), ...l, children: D || H(B, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: y.table() ? 1 : 0 }, children: [o(B, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (E) => E.spacing(2), paddingLeft: (E) => E.spacing(2), paddingRight: (E) => E.spacing(2) }, children: H(B, { className: gc, children: [o(Ka, { formName: "name", defaultInput: v, value: f?.getName() ?? "No table", onChangeInput: S, onValidate: (E) => {
3315
+ f && f.getName().toLowerCase() === E.toLowerCase() || y?.getNames().validateName(E);
3316
+ }, disabled: f?.isProtected() ?? !0, onFocus: (E) => {
3317
+ s || E.target?.select(), d(!0);
3318
+ } }), o(Xa, { formName: "range", value: h, onChangeInput: C, resolvedAddress: y.getNames().getRanges.bind(y.getNames()), disabled: f?.isProtected() ?? !0, onFocus: (E) => {
3319
+ s || E.target?.select(), d(!0);
3320
+ } })] }) }), H(B, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", border: "red solid 2px", flexDirection: "column", containerType: "inline-size", gap: (E) => E.spacing(0.5), marginTop: (E) => E.spacing(1) }, children: [o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (E) => E.spacing(1), marginBottom: (E) => E.spacing(1) }, children: H("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(_a, { table: f, styles: y.styles(), bodyStyle: y.bodyStyle(), cellHeight: 30, isLive: !0 }), o(Ni, { command: e.getCommand("formatTableStyle"), commands: e, disabledQuickKey: !0 })] }) }), o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(uc, { disabled: f?.isProtected(), styleOptions: f?.getStyleOptions() ?? null, onStyleOptionsChange: (E) => {
3321
+ f.updateStyleOptions(E);
3322
+ }, showHeaderRow: f?.getShowHeaders(), onShowHeaderRowChange: (E) => {
3335
3323
  try {
3336
- f.setShowHeaders(T);
3324
+ f.setShowHeaders(E);
3337
3325
  } catch (P) {
3338
3326
  c.showError(P);
3339
3327
  }
3340
- }, showTotalRow: f?.getShowTotals(), onShowTotalRowChange: (T) => {
3328
+ }, showTotalRow: f?.getShowTotals(), onShowTotalRowChange: (E) => {
3341
3329
  try {
3342
- f.setShowTotals(T);
3330
+ f.setShowTotals(E);
3343
3331
  } catch (P) {
3344
3332
  c.showError(P);
3345
3333
  }
3346
- }, showFilterButton: f?.getFilter() ? f.getShowFilterButton() : null, onShowFilterButtonChange: (T) => {
3334
+ }, showFilterButton: f?.getFilter() ? f.getShowFilterButton() : null, onShowFilterButtonChange: (E) => {
3347
3335
  try {
3348
- f.setShowFilterButton(T);
3336
+ f.setShowFilterButton(E);
3349
3337
  } catch (P) {
3350
3338
  c.showError(P);
3351
3339
  }
3352
- } }), o(Q, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (T) => T.spacing(2), marginBottom: (T) => T.spacing(1) }, children: H("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(_a, { table: f, styles: y.styles(), bodyStyle: y.bodyStyle(), cellHeight: 30, isLive: !0 }), o(Fi, { command: e.getCommand("formatTableStyle"), commands: e, disabledQuickKey: !0 })] }) }), o(Q, { orientation: "horizontal" }), H(B, { className: fc, children: [o(N, { variant: re.Menuitem, command: e.getCommand("convertTableToRange"), commandState: f }), o(N, { variant: re.Menuitem, commandState: f, command: e.getCommand("deleteTable") })] })] })] }) });
3340
+ } }), o(Q, { orientation: "horizontal" }), H(B, { className: fc, children: [o(M, { variant: re.Menuitem, command: e.getCommand("convertTableToRange"), commandState: f }), o(M, { variant: re.Menuitem, commandState: f, command: e.getCommand("deleteTable") })] })] })] }) });
3353
3341
  })), od = (n, a) => {
3354
3342
  const { model: t, commands: e, entryKey: r, frame: l, ...c } = n;
3355
3343
  return o(td, { ref: a, commands: e, ...c });
@@ -3357,8 +3345,8 @@ const td = q(X((n, a) => {
3357
3345
  Jn.register("plugin-table", { icons: {} }), tn.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: od }, !0);
3358
3346
  }, rd = q((n) => {
3359
3347
  const { table: a, tableStyle: t, selectedTableStyleName: e, onSelectTableStyleName: r, styles: l, hasContextMenu: c = !0, bodyStyle: p, parentFloat: i, commands: s, disabled: d, commandHook: x, useCanvasPreview: g = !0, canvas: m, ...u } = n, b = U((w) => {
3360
- const v = { variant: re.Menuitem, commandHook: x, context: "table" }, S = H(le, { children: [o(N, { ...v, command: s.getCommand("formatTableStyleClearCellStyles"), commandState: t, disabled: d }), o(N, { ...v, style: { fontWeight: 550 }, command: s.getCommand("formatTableStyle"), commandState: { name: t.getName() }, disabled: d }), o(Q, { orientation: "horizontal" }), o(N, { ...v, command: s.getCommand("setDefaultTableStyle"), commandState: t.getName(), disabled: d }), o(Q, { orientation: "horizontal" }), o(N, { ...v, command: s.getCommand("deleteTableStyle"), commandState: t?.getName(), disabled: d || !t || t.isBuiltIn() })] });
3361
- return ge({ ...w, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: S }) }) });
3348
+ const v = { variant: re.Menuitem, commandHook: x, context: "table" }, S = H(le, { children: [o(M, { ...v, command: s.getCommand("formatTableStyleClearCellStyles"), commandState: t, disabled: d }), o(M, { ...v, style: { fontWeight: 550 }, command: s.getCommand("formatTableStyle"), commandState: { name: t.getName() }, disabled: d }), o(Q, { orientation: "horizontal" }), o(M, { ...v, command: s.getCommand("setDefaultTableStyle"), commandState: t.getName(), disabled: d }), o(Q, { orientation: "horizontal" }), o(M, { ...v, command: s.getCommand("deleteTableStyle"), commandState: t?.getName(), disabled: d || !t || t.isBuiltIn() })] });
3349
+ return he({ ...w, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: S }) }) });
3362
3350
  }, [s]), y = t?.getName() === e, f = W(() => {
3363
3351
  const w = { table: a, tableStyle: t, styles: l, bodyStyle: p };
3364
3352
  return g ? o(cc, { canvas: m, ...w }) : o(_a, { ...w });
@@ -3367,56 +3355,56 @@ const td = q(X((n, a) => {
3367
3355
  r?.(t?.getName());
3368
3356
  }, ...u, children: f }, t.getName());
3369
3357
  return c && (h = o(Ra, { label: a.getStyleOptions().name, parentFloat: i, createPopupPanel: b, children: h })), h;
3370
- }), Fi = q(X((n, a) => {
3358
+ }), Ni = q(X((n, a) => {
3371
3359
  const { commands: t, command: e, commandHook: r, selectedTable: l, onSelectTableStyleName: c, disabled: p = !1, bodyStyle: i, disabledQuickKey: s = !1, usePreviewIcon: d = !1, ...x } = n;
3372
3360
  jt(e);
3373
3361
  const g = e?.context(), m = g?.styles, u = l ?? g?.table?.();
3374
3362
  let b = "insertTable";
3375
3363
  u && (b = "editTable");
3376
3364
  const y = W(() => ((R, k) => {
3377
- const E = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
3378
- return new _n({ initialAnchor: E, styles: k, json: { name: "PreviewTable", ref: E, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: R } });
3365
+ const T = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
3366
+ return new _n({ initialAnchor: T, styles: k, json: { name: "PreviewTable", ref: T, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: R } });
3379
3367
  })(u?.getStyleOptions(), m?.()), [m?.().getDefaultTableStyle(), u?.getStyleOptions()]), f = u ?? y, [h, w] = _(f);
3380
3368
  de(() => {
3381
3369
  w(f);
3382
3370
  }, [f]);
3383
3371
  const v = i ?? g?.bodyStyle(), S = Y((R) => {
3384
3372
  c?.(R), e?.execute({ name: R }, r);
3385
- }, [e, c, r]), C = xe(null), D = U((R, k) => {
3386
- const E = { onSelectTableStyleName: S, styles: m(), parentFloat: R.floatReference };
3373
+ }, [e, c, r]), C = be(null), D = U((R, k) => {
3374
+ const T = { onSelectTableStyleName: S, styles: m(), parentFloat: R.floatReference };
3387
3375
  C.current || (C.current = document.createElement("canvas"));
3388
- const M = (j) => {
3376
+ const F = (j) => {
3389
3377
  const K = m().getTableStyle(j);
3390
- return K ? o(rd, { table: h, tableStyle: K, selectedTableStyleName: h.getStyleOptions().name, bodyStyle: g.bodyStyle(), commands: k, commandHook: r, canvas: C.current, ...E }, j) : null;
3378
+ return K ? o(rd, { table: h, tableStyle: K, selectedTableStyleName: h.getStyleOptions().name, bodyStyle: g.bodyStyle(), commands: k, commandHook: r, canvas: C.current, ...T }, j) : null;
3391
3379
  }, I = (j, K, ee = !0) => {
3392
3380
  const V = [];
3393
3381
  for (let A = 0; A < K.length; A++) {
3394
- const Z = M(K[A]);
3382
+ const Z = F(K[A]);
3395
3383
  Z && V.push(Z);
3396
3384
  }
3397
3385
  return V.length === 0 ? null : H(B, { children: [ee ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: j }, j + "-header"), o(B, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: V }, j + "-presets")] }, j);
3398
- }, F = [], L = m().getCustomTableStyles(), O = [];
3386
+ }, O = [], L = m().getCustomTableStyles(), N = [];
3399
3387
  if (L.length > 0) {
3400
- for (let j = 0; j < L.length; j++) L[j].isShownInTableStyles() && O.push(L[j].getName());
3401
- F.push(I("Custom", O, !1));
3388
+ for (let j = 0; j < L.length; j++) L[j].isShownInTableStyles() && N.push(L[j].getName());
3389
+ O.push(I("Custom", N, !1));
3402
3390
  }
3403
3391
  const z = [];
3404
3392
  u && !u.getStyleOptions().name && z.push(null);
3405
3393
  for (let j = 0; j < 21; j++) z.push("TableStyleLight" + (j + 1));
3406
- F.push(I("Light", z, O.length > 0));
3394
+ O.push(I("Light", z, N.length > 0));
3407
3395
  const ie = [];
3408
3396
  for (let j = 0; j < 28; j++) ie.push("TableStyleMedium" + (j + 1));
3409
- F.push(I("Medium", ie));
3397
+ O.push(I("Medium", ie));
3410
3398
  const J = [];
3411
3399
  for (let j = 0; j < 11; j++) J.push("TableStyleDark" + (j + 1));
3412
- F.push(I("Dark", J));
3400
+ O.push(I("Dark", J));
3413
3401
  let pe = null;
3414
- return u && (pe = H(le, { children: [o(Q, { orientation: "horizontal" }), o(N, { variant: re.Menuitem, command: k.getCommand("formatTableStyleClearTableStyle"), commandHook: r, disabled: p })] })), H(B, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (j) => `${j.shape.borderRadius}px`, paddingBottom: (j) => `${j.shape.borderRadius}px` }, children: [o(B, { onContextMenu: () => {
3415
- }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: F }), pe] });
3416
- }, [m, m?.().getTheme(), v, h]), T = p || !e || e.disabled(), P = W(() => {
3402
+ return u && (pe = H(le, { children: [o(Q, { orientation: "horizontal" }), o(M, { variant: re.Menuitem, command: k.getCommand("formatTableStyleClearTableStyle"), commandHook: r, disabled: p })] })), H(B, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (j) => `${j.shape.borderRadius}px`, paddingBottom: (j) => `${j.shape.borderRadius}px` }, children: [o(B, { onContextMenu: () => {
3403
+ }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: O }), pe] });
3404
+ }, [m, m?.().getTheme(), v, h]), E = p || !e || e.disabled(), P = W(() => {
3417
3405
  if (!g || !d) return e?.icon();
3418
- }, [h, v, T, e]);
3419
- return o(Se, { ref: a, quickCommand: s ? void 0 : b, createPopupPanel: D, commands: t, label: e?.label(), commandState: u, commandHook: r, selected: u !== null, createTooltip: ({ children: R }, k) => o(nt, { label: e?.label(), description: e?.description(), disabled: k, children: R }), disabled: T, icon: P, ...x });
3406
+ }, [h, v, E, e]);
3407
+ return o(Se, { ref: a, quickCommand: s ? void 0 : b, createPopupPanel: D, commands: t, label: e?.label(), commandState: u, commandHook: r, selected: u !== null, createTooltip: ({ children: R }, k) => o(nt, { label: e?.label(), description: e?.description(), disabled: k, children: R }), disabled: E, icon: P, ...x });
3420
3408
  })), ad = q(X((n, a) => {
3421
3409
  const { command: t, commandHook: e, selectedTheme: r, onSelectTheme: l, disabled: c = !1, darkMode: p, label: i, icon: s, variant: d, ...x } = n;
3422
3410
  jt(t);
@@ -3430,23 +3418,33 @@ const td = q(X((n, a) => {
3430
3418
  return o(yc, { ref: a, themes: g, selectedTheme: m, onSelectTheme: y, variant: d === re.Menuitem ? ot.Menuitem : ot.Toolbar, createTooltip: f, disabled: b, darkMode: u, ...x });
3431
3419
  })), id = q(X((n, a) => {
3432
3420
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["themeMode"])[0], i = Y((m, u) => {
3433
- const b = { variant: re.Menuitem, commandHook: e, scope: "appearance", disabled: l }, y = H(le, { children: [o(N, { ...b, command: p }), o(N, { ...b, command: u.getCommand("defaultThemeMode") }), o(Q, { orientation: "horizontal" }), o(N, { ...b, command: u.getCommand("enableDarkGrid") }), o(N, { ...b, command: u.getCommand("enableDarkImages") })] });
3434
- return ge({ ...m, children: y });
3421
+ const b = { variant: re.Menuitem, commandHook: e, scope: "appearance", disabled: l }, y = H(le, { children: [o(M, { ...b, command: p }), o(M, { ...b, command: u.getCommand("defaultThemeMode") }), o(Q, { orientation: "horizontal" }), o(M, { ...b, command: u.getCommand("enableDarkGrid") }), o(M, { ...b, command: u.getCommand("enableDarkImages") })] });
3422
+ return he({ ...m, children: y });
3435
3423
  }, [l, p, e, r]), s = p?.state(), d = Pa("(prefers-color-scheme: dark)"), x = s === "dark" || s === null && d, g = p?.state() !== null;
3436
3424
  return o(Se, { ref: a, quickCommand: "themeMode", commands: t, commandHook: e, createPopupPanel: i, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
3437
3425
  p?.execute(x ? "light" : "dark", e);
3438
3426
  }, selected: g, ...c });
3439
3427
  })), ld = q(X((n, a) => {
3440
3428
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, sx: c, ...p } = n, i = U((s, d) => {
3441
- const x = { variant: re.Menuitem, scope: "help", commandHook: { ...e, beforeExecute: (m, u) => e?.beforeExecute?.(m, u) !== !1 && s.floatReference.closeAll() }, disabled: l }, g = H(le, { children: [o(N, { ...x, command: d.getCommand("showKeyboardShortcuts") }), o(Q, { orientation: "horizontal" }), o(N, { ...x, command: d.getCommand("gotoUrlGithub") }), o(N, { ...x, command: d.getCommand("gotoUrlDiscord") }), o(N, { ...x, command: d.getCommand("gotoUrlDocumentation") }), o(N, { ...x, command: d.getCommand("gotoUrlIssue") })] });
3442
- return ge({ ...s, children: g });
3429
+ const x = { variant: re.Menuitem, scope: "help", commandHook: { ...e, beforeExecute: (m, u) => e?.beforeExecute?.(m, u) !== !1 && s.floatReference.closeAll() }, disabled: l }, g = H(le, { children: [o(M, { ...x, command: d.getCommand("showKeyboardShortcuts") }), o(Q, { orientation: "horizontal" }), o(M, { ...x, command: d.getCommand("gotoUrlGithub") }), o(M, { ...x, command: d.getCommand("gotoUrlDiscord") }), o(M, { ...x, command: d.getCommand("gotoUrlDocumentation") }), o(M, { ...x, command: d.getCommand("gotoUrlIssue") })] });
3430
+ return he({ ...s, children: g });
3443
3431
  }, [l, e]);
3444
- return o(Se, { ref: a, sx: c, commands: t, disabled: l, commandHook: e, scope: r, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: i, icon: o(he, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...p });
3445
- })), Oi = q(X((n, a) => {
3432
+ return o(Se, { ref: a, sx: c, commands: t, disabled: l, commandHook: e, scope: r, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: i, icon: o(xe, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...p });
3433
+ })), Fi = q(X((n, a) => {
3434
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, preferSingleMenu: c = !0, showQuickButton: p = !0, variant: i = re.Toolbar, ...s } = n, d = Ie(t, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: x, allDisabled: g } = W(() => {
3435
+ let u = null, b = 0;
3436
+ for (let y = 0; y < d.length; y++) d[y] && !d[y]?.disabled() && (c && i === re.Menuitem && (u = b === 0 ? d[y] : null), b++);
3437
+ return { singleMenuCommand: u, allDisabled: b === 0 };
3438
+ }, [d]), m = U((u, b) => {
3439
+ const y = { variant: re.Menuitem, commandHook: e, scope: "insertImage", disabled: l }, f = H(le, { children: [o(M, { ...y, command: b.getCommand("insertImageFromFile") }), o(M, { ...y, command: b.getCommand("insertImageFromURL") })] });
3440
+ return he({ ...u, children: f });
3441
+ }, [l, e, r]);
3442
+ return x ? o(M, { ref: a, variant: i, commandHook: e, disabled: l, command: x, ...s }) : o(Se, { ref: a, variant: i, quickCommand: "insertImageFromFile", commands: t, commandHook: e, scope: r, disabled: l || g, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: m, icon: "InsertImage", ...s });
3443
+ })), Bi = q(X((n, a) => {
3446
3444
  const { ...t } = n;
3447
3445
  return o(tt, { ref: a, ...t, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
3448
3446
  }));
3449
- Oi.displayName = "InsertFunctionSumCommandPopupButton";
3447
+ Bi.displayName = "InsertFunctionSumCommandPopupButton";
3450
3448
  const Pn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinancial" }, { key: "logical", label: "Logical", icon: "FormulaLogical" }, { key: "text", label: "Text", icon: "FormulaText" }, { key: "dateTime", label: "Date & Time", icon: "FormulaDateTime" }, { key: "lookupReference", label: "Lookup & Reference", icon: "FormulaLookupReference" }, { key: "mathTrig", label: "Math & Trig", icon: "FormulaMathTrig" }, { key: "statDist", label: "Statistical", icon: "FormulaStatistical" }, { key: "engineering", label: "Engineering", icon: "FormulaEngineering" }, { key: "information", label: "Information", icon: "FormulaInformation" }, { key: "cube", label: "Cube", icon: "FormulaCube" }, { key: "database", label: "Database", icon: "FormulaDatabase" }, { key: "web", label: "Web", icon: "FormulaWeb" }, { key: "custom", label: "Custom", icon: "FormulaCustom" }].map((n) => [n.key, n])), sd = q((n) => {
3451
3449
  const { command: a, formulaFunction: t, commandHook: e, disabled: r = !1, parentFloat: l, handleInsert: c, icon: p, label: i, sx: s, ...d } = n, x = new Promise((g) => {
3452
3450
  t.getDescriptor().then((m) => {
@@ -3465,7 +3463,7 @@ const Pn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinanc
3465
3463
  const b = Pn.get(t);
3466
3464
  if (!b) return console.warn("invalidate category", t), null;
3467
3465
  const y = { commandHook: r, ...m }, f = o(dd, { category: b.label, ...y, commands: u });
3468
- return ge({ ...m, children: f });
3466
+ return he({ ...m, children: f });
3469
3467
  }, [t, d, r, l]), g = Pn.get(t);
3470
3468
  return o(Se, { ref: a, commands: e, commandHook: r, createPopupPanel: x, label: g.label, tooltip: "Insert Function", icon: Pn.get(t)?.icon ?? "FormulaGroup", ...s });
3471
3469
  }));
@@ -3486,7 +3484,7 @@ const dd = q(X((n, a) => {
3486
3484
  const y = p[b];
3487
3485
  g[b] = o(sd, { command: m, formulaFunction: y, handleInsert: u }, `formula-${y.getName()}-${b}`);
3488
3486
  }
3489
- return ge({ ...l, children: o(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x > 0 ? o(le, { children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: g }) }) : null }) });
3487
+ return he({ ...l, children: o(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x > 0 ? o(le, { children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: g }) }) : null }) });
3490
3488
  })), pd = q(X((n, a) => {
3491
3489
  const { sx: t, style: e, className: r, licenseKey: l, renderLoadingPanel: c, ...p } = n;
3492
3490
  l && Eo.setLicenseKey(l);
@@ -3496,19 +3494,25 @@ const dd = q(X((n, a) => {
3496
3494
  }, [t, e, c]), s = W(() => ae.lazy(async () => await Promise.resolve().then(() => Ud)), []);
3497
3495
  return o(le, { children: o(va, { fallback: i, children: o(s, { ...p, className: r, renderLoadingPanel: c, sx: t, style: e, ref: a }) }) });
3498
3496
  }));
3499
- function Bi(n) {
3497
+ function Oi(n) {
3500
3498
  var a, t, e = "";
3501
3499
  if (typeof n == "string" || typeof n == "number") e += n;
3502
- else if (typeof n == "object") if (Array.isArray(n)) for (a = 0; a < n.length; a++) n[a] && (t = Bi(n[a])) && (e && (e += " "), e += t);
3500
+ else if (typeof n == "object") if (Array.isArray(n)) for (a = 0; a < n.length; a++) n[a] && (t = Oi(n[a])) && (e && (e += " "), e += t);
3503
3501
  else for (a in n) n[a] && (e && (e += " "), e += a);
3504
3502
  return e;
3505
3503
  }
3506
3504
  function Vt() {
3507
- for (var n, a, t = 0, e = ""; t < arguments.length; ) (n = arguments[t++]) && (a = Bi(n)) && (e && (e += " "), e += a);
3505
+ for (var n, a, t = 0, e = ""; t < arguments.length; ) (n = arguments[t++]) && (a = Oi(n)) && (e && (e += " "), e += a);
3508
3506
  return e;
3509
3507
  }
3510
3508
  pd.displayName = "Studio";
3511
- let ud = { data: "" }, md = (n) => typeof window == "object" ? ((n ? n.querySelector("#_goober") : window._goober) || Object.assign((n || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : n || ud, hd = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, gd = /\/\*[^]*?\*\/| +/g, la = /\n+/g, It = (n, a) => {
3509
+ let ud = { data: "" }, md = (n) => {
3510
+ if (typeof window == "object") {
3511
+ let a = (n ? n.querySelector("#_goober") : window._goober) || Object.assign(document.createElement("style"), { innerHTML: " ", id: "_goober" });
3512
+ return a.nonce = window.__nonce__, a.parentNode || (n || document.head).appendChild(a), a.firstChild;
3513
+ }
3514
+ return n || ud;
3515
+ }, hd = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, gd = /\/\*[^]*?\*\/| +/g, la = /\n+/g, It = (n, a) => {
3512
3516
  let t = "", e = "", r = "";
3513
3517
  for (let l in n) {
3514
3518
  let c = n[l];
@@ -3572,7 +3576,7 @@ function De() {
3572
3576
  function Li(n, a) {
3573
3577
  n.prototype = Object.create(a.prototype), n.prototype.constructor = n, n.__proto__ = a;
3574
3578
  }
3575
- function Oo(n, a) {
3579
+ function Bo(n, a) {
3576
3580
  if (n == null) return {};
3577
3581
  var t, e, r = {}, l = Object.keys(n);
3578
3582
  for (e = 0; e < l.length; e++) t = l[e], a.indexOf(t) >= 0 || (r[t] = n[t]);
@@ -3659,7 +3663,7 @@ var ca = function() {
3659
3663
  var e = this.state.status;
3660
3664
  if (e === Uo) return null;
3661
3665
  var r = this.props;
3662
- return (0, r.children)(e, Oo(r, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
3666
+ return (0, r.children)(e, Bo(r, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
3663
3667
  }, Ii(a, [{ key: "node", get: function() {
3664
3668
  var e, r = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
3665
3669
  if (!r) throw new Error("notistack - Custom snackbar is not refForwarding");
@@ -3731,7 +3735,7 @@ function Go(n, a) {
3731
3735
  }
3732
3736
  }
3733
3737
  var ji = X(function(n, a) {
3734
- var t = n.children, e = n.direction, r = e === void 0 ? "down" : e, l = n.in, c = n.style, p = n.timeout, i = p === void 0 ? 0 : p, s = n.onEnter, d = n.onEntered, x = n.onExit, g = n.onExited, m = Oo(n, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = xe(null), b = $n(t.ref, u), y = $n(b, a), f = U(function() {
3738
+ var t = n.children, e = n.direction, r = e === void 0 ? "down" : e, l = n.in, c = n.style, p = n.timeout, i = p === void 0 ? 0 : p, s = n.onEnter, d = n.onEntered, x = n.onExit, g = n.onExited, m = Bo(n, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = be(null), b = $n(t.ref, u), y = $n(b, a), f = U(function() {
3735
3739
  u.current && Go(r, u.current);
3736
3740
  }, [r]);
3737
3741
  return de(function() {
@@ -3739,9 +3743,9 @@ var ji = X(function(n, a) {
3739
3743
  var h = (function(v, S) {
3740
3744
  var C;
3741
3745
  function D() {
3742
- for (var T = this, P = arguments.length, R = new Array(P), k = 0; k < P; k++) R[k] = arguments[k];
3746
+ for (var E = this, P = arguments.length, R = new Array(P), k = 0; k < P; k++) R[k] = arguments[k];
3743
3747
  clearTimeout(C), C = setTimeout(function() {
3744
- v.apply(T, R);
3748
+ v.apply(E, R);
3745
3749
  }, S);
3746
3750
  }
3747
3751
  return S === void 0 && (S = 166), D.clear = function() {
@@ -3800,7 +3804,7 @@ var un = function(n) {
3800
3804
  var r, l, c;
3801
3805
  };
3802
3806
  };
3803
- function Bo(n) {
3807
+ function Oo(n) {
3804
3808
  return Object.entries(n).reduce(function(a, t) {
3805
3809
  var e, r = t[0], l = t[1];
3806
3810
  return De({}, a, ((e = {})[r] = jn(l), e));
@@ -3808,8 +3812,8 @@ function Bo(n) {
3808
3812
  }
3809
3813
  var Td = "notistack-SnackbarContainer", Ed = "notistack-Snackbar", $i = "notistack-CollapseWrapper", Dd = "notistack-MuiContent", Pd = function(n) {
3810
3814
  return "notistack-MuiContent-" + n;
3811
- }, ha = Bo({ root: { height: 0 }, entered: { height: "auto" } }), Mn = "0px", Vi = X(function(n, a) {
3812
- var t = n.children, e = n.in, r = n.onExited, l = xe(null), c = xe(null), p = $n(a, c), i = function() {
3815
+ }, ha = Oo({ root: { height: 0 }, entered: { height: "auto" } }), Mn = "0px", Vi = X(function(n, a) {
3816
+ var t = n.children, e = n.in, r = n.onExited, l = be(null), c = be(null), p = $n(a, c), i = function() {
3813
3817
  return l.current ? l.current.clientHeight : 0;
3814
3818
  };
3815
3819
  return ke(ar, { in: e, unmountOnExit: !0, onEnter: function(s) {
@@ -3843,9 +3847,9 @@ function Mo(n, a) {
3843
3847
  };
3844
3848
  }, Md);
3845
3849
  }
3846
- var Nd = typeof window < "u" ? St : de;
3850
+ var Nd = typeof window < "u" ? vt : de;
3847
3851
  function fa(n) {
3848
- var a = xe(n);
3852
+ var a = be(n);
3849
3853
  return Nd(function() {
3850
3854
  a.current = n;
3851
3855
  }), U(function() {
@@ -3853,7 +3857,7 @@ function fa(n) {
3853
3857
  }, []);
3854
3858
  }
3855
3859
  var Nn, _i = X(function(n, a) {
3856
- var t = n.children, e = n.className, r = n.autoHideDuration, l = n.disableWindowBlurListener, c = l !== void 0 && l, p = n.onClose, i = n.id, s = n.open, d = n.SnackbarProps, x = d === void 0 ? {} : d, g = xe(), m = fa(function() {
3860
+ var t = n.children, e = n.className, r = n.autoHideDuration, l = n.disableWindowBlurListener, c = l !== void 0 && l, p = n.onClose, i = n.id, s = n.open, d = n.SnackbarProps, x = d === void 0 ? {} : d, g = be(), m = fa(function() {
3857
3861
  p && p.apply(void 0, arguments);
3858
3862
  }), u = fa(function(f) {
3859
3863
  p && f != null && (g.current && clearTimeout(g.current), g.current = setTimeout(function() {
@@ -3881,21 +3885,21 @@ var Nn, _i = X(function(n, a) {
3881
3885
  } }), t);
3882
3886
  });
3883
3887
  _i.displayName = "Snackbar";
3884
- var Fd = Bo({ root: (Nn = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, Nn[Qo] = { flexGrow: "initial", minWidth: "288px" }, Nn) }), ir = X(function(n, a) {
3885
- var t = n.className, e = Oo(n, ["className"]);
3888
+ var Fd = Oo({ root: (Nn = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, Nn[Qo] = { flexGrow: "initial", minWidth: "288px" }, Nn) }), ir = X(function(n, a) {
3889
+ var t = n.className, e = Bo(n, ["className"]);
3886
3890
  return ae.createElement("div", Object.assign({ ref: a, className: Vt(Fd.root, t) }, e));
3887
3891
  });
3888
3892
  ir.displayName = "SnackbarContent";
3889
- var ko = Bo({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), ba = "notistack-snackbar", Ui = X(function(n, a) {
3893
+ var ko = Oo({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), ba = "notistack-snackbar", Ui = X(function(n, a) {
3890
3894
  var t = n.id, e = n.message, r = n.action, l = n.iconVariant, c = n.variant, p = n.hideIconVariant, i = n.style, s = n.className, d = l[c], x = r;
3891
3895
  return typeof x == "function" && (x = x(t)), ae.createElement(ir, { ref: a, role: "alert", "aria-describedby": ba, style: i, className: Vt(Dd, Pd(c), ko.root, ko[c], s, !p && d && ko.lessPadding) }, ae.createElement("div", { id: ba, className: ko.message }, p ? null : d, e), x && ae.createElement("div", { className: ko.action }, x));
3892
3896
  });
3893
3897
  Ui.displayName = "MaterialDesignContent";
3894
- var Co, Fn, qo, Ko, On, Od = q(Ui), Bd = Bo({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), Ad = function(n) {
3895
- var a = xe(), t = _(!0), e = t[0], r = t[1], l = Mo([n.snack.onClose, n.onClose]), c = U(function() {
3898
+ var Co, Fn, qo, Ko, Bn, Bd = q(Ui), Od = Oo({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), Ad = function(n) {
3899
+ var a = be(), t = _(!0), e = t[0], r = t[1], l = Mo([n.snack.onClose, n.onClose]), c = U(function() {
3896
3900
  a.current = setTimeout(function() {
3897
- r(function(T) {
3898
- return !T;
3901
+ r(function(E) {
3902
+ return !E;
3899
3903
  });
3900
3904
  }, 125);
3901
3905
  }, []);
@@ -3904,27 +3908,27 @@ var Co, Fn, qo, Ko, On, Od = q(Ui), Bd = Bo({ wrappedRoot: { width: "100%", posi
3904
3908
  a.current && clearTimeout(a.current);
3905
3909
  };
3906
3910
  }, []);
3907
- var p, i = n.snack, s = n.classes, d = n.Component, x = d === void 0 ? Od : d, g = W(function() {
3908
- return (function(T) {
3909
- T === void 0 && (T = {});
3911
+ var p, i = n.snack, s = n.classes, d = n.Component, x = d === void 0 ? Bd : d, g = W(function() {
3912
+ return (function(E) {
3913
+ E === void 0 && (E = {});
3910
3914
  var P = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
3911
- return Object.keys(T).filter(function(R) {
3915
+ return Object.keys(E).filter(function(R) {
3912
3916
  return !P[R];
3913
3917
  }).reduce(function(R, k) {
3914
- var E;
3915
- return De({}, R, ((E = {})[k] = T[k], E));
3918
+ var T;
3919
+ return De({}, R, ((T = {})[k] = E[k], T));
3916
3920
  }, {});
3917
3921
  })(s);
3918
- }, [s]), m = i.open, u = i.SnackbarProps, b = i.TransitionComponent, y = i.TransitionProps, f = i.transitionDuration, h = i.disableWindowBlurListener, w = i.content, v = Oo(i, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), S = De({ direction: (p = v.anchorOrigin, p.horizontal !== "center" ? ga[p.horizontal] : ga[p.vertical]), timeout: f }, y), C = w;
3922
+ }, [s]), m = i.open, u = i.SnackbarProps, b = i.TransitionComponent, y = i.TransitionProps, f = i.transitionDuration, h = i.disableWindowBlurListener, w = i.content, v = Bo(i, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), S = De({ direction: (p = v.anchorOrigin, p.horizontal !== "center" ? ga[p.horizontal] : ga[p.vertical]), timeout: f }, y), C = w;
3919
3923
  typeof C == "function" && (C = C(v.id, v.message));
3920
- var D = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(T, P) {
3924
+ var D = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(E, P) {
3921
3925
  var R;
3922
- return De({}, T, ((R = {})[P] = Mo([n.snack[P], n[P]], v.id), R));
3926
+ return De({}, E, ((R = {})[P] = Mo([n.snack[P], n[P]], v.id), R));
3923
3927
  }, {});
3924
- return ae.createElement(Vi, { in: e, onExited: D.onExited }, ae.createElement(_i, { open: m, id: v.id, disableWindowBlurListener: h, autoHideDuration: v.autoHideDuration, className: Vt(Bd.wrappedRoot, g.root, g[Rd(v.anchorOrigin)]), SnackbarProps: u, onClose: l }, ae.createElement(b, Object.assign({}, S, { appear: !0, in: m, onExit: D.onExit, onExited: c, onEnter: D.onEnter, onEntered: Mo([D.onEntered, function() {
3928
+ return ae.createElement(Vi, { in: e, onExited: D.onExited }, ae.createElement(_i, { open: m, id: v.id, disableWindowBlurListener: h, autoHideDuration: v.autoHideDuration, className: Vt(Od.wrappedRoot, g.root, g[Rd(v.anchorOrigin)]), SnackbarProps: u, onClose: l }, ae.createElement(b, Object.assign({}, S, { appear: !0, in: m, onExit: D.onExit, onExited: c, onEnter: D.onEnter, onEntered: Mo([D.onEntered, function() {
3925
3929
  n.snack.requestClose && l(null, "instructed", n.snack.id);
3926
3930
  }], v.id) }), C || ae.createElement(x, Object.assign({}, v)))));
3927
- }, To = { default: 20 }, Xo = { default: 6, dense: 2 }, xa = "." + $i, Yo = Bo({ root: (Co = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: eo(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Co[xa] = { padding: Xo.default + "px 0px", transition: "padding 300ms ease 0ms" }, Co.maxWidth = "calc(100% - " + 2 * To.default + "px)", Co[Rn] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Co), rootDense: (Fn = {}, Fn[xa] = { padding: Xo.dense + "px 0px" }, Fn), top: { top: To.default - Xo.default + "px", flexDirection: "column" }, bottom: { bottom: To.default - Xo.default + "px", flexDirection: "column-reverse" }, left: (qo = { left: To.default + "px" }, qo[Qo] = { alignItems: "flex-start" }, qo[Rn] = { left: "16px" }, qo), right: (Ko = { right: To.default + "px" }, Ko[Qo] = { alignItems: "flex-end" }, Ko[Rn] = { right: "16px" }, Ko), center: (On = { left: "50%", transform: "translateX(-50%)" }, On[Qo] = { alignItems: "center" }, On) }), Id = q(function(n) {
3931
+ }, To = { default: 20 }, Xo = { default: 6, dense: 2 }, xa = "." + $i, Yo = Oo({ root: (Co = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: eo(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Co[xa] = { padding: Xo.default + "px 0px", transition: "padding 300ms ease 0ms" }, Co.maxWidth = "calc(100% - " + 2 * To.default + "px)", Co[Rn] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Co), rootDense: (Fn = {}, Fn[xa] = { padding: Xo.dense + "px 0px" }, Fn), top: { top: To.default - Xo.default + "px", flexDirection: "column" }, bottom: { bottom: To.default - Xo.default + "px", flexDirection: "column-reverse" }, left: (qo = { left: To.default + "px" }, qo[Qo] = { alignItems: "flex-start" }, qo[Rn] = { left: "16px" }, qo), right: (Ko = { right: To.default + "px" }, Ko[Qo] = { alignItems: "flex-end" }, Ko[Rn] = { right: "16px" }, Ko), center: (Bn = { left: "50%", transform: "translateX(-50%)" }, Bn[Qo] = { alignItems: "center" }, Bn) }), Id = q(function(n) {
3928
3932
  var a = n.classes, t = a === void 0 ? {} : a, e = n.anchorOrigin, r = n.dense, l = n.children, c = Vt(Td, Yo[e.vertical], Yo[e.horizontal], Yo.root, t.containerRoot, t["containerAnchorOrigin" + rr(e)], r && Yo.rootDense);
3929
3933
  return ae.createElement("div", { className: c }, l);
3930
3934
  }), ya = function(n) {
@@ -3934,7 +3938,7 @@ var Co, Fn, qo, Ko, On, Od = q(Ui), Bd = Bo({ wrappedRoot: { width: "100%", posi
3934
3938
  var e;
3935
3939
  return (e = n.call(this, t) || this).enqueueSnackbar = function(r, l) {
3936
3940
  if (l === void 0 && (l = {}), r == null) throw new Error("enqueueSnackbar called with invalid argument");
3937
- var c = ya(r) ? r : l, p = ya(r) ? r.message : r, i = c.key, s = c.preventDuplicate, d = Oo(c, ["key", "preventDuplicate"]), x = _o(i), g = x ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), m = Cd(d, e.props), u = De({ id: g }, d, { message: p, open: !0, entered: !1, requestClose: !1, persist: m("persist"), action: m("action"), content: m("content"), variant: m("variant"), anchorOrigin: m("anchorOrigin"), disableWindowBlurListener: m("disableWindowBlurListener"), autoHideDuration: m("autoHideDuration"), hideIconVariant: m("hideIconVariant"), TransitionComponent: m("TransitionComponent"), transitionDuration: m("transitionDuration"), TransitionProps: m("TransitionProps", !0), iconVariant: m("iconVariant", !0), style: m("style", !0), SnackbarProps: m("SnackbarProps", !0), className: Vt(e.props.className, d.className) });
3941
+ var c = ya(r) ? r : l, p = ya(r) ? r.message : r, i = c.key, s = c.preventDuplicate, d = Bo(c, ["key", "preventDuplicate"]), x = _o(i), g = x ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), m = Cd(d, e.props), u = De({ id: g }, d, { message: p, open: !0, entered: !1, requestClose: !1, persist: m("persist"), action: m("action"), content: m("content"), variant: m("variant"), anchorOrigin: m("anchorOrigin"), disableWindowBlurListener: m("disableWindowBlurListener"), autoHideDuration: m("autoHideDuration"), hideIconVariant: m("hideIconVariant"), TransitionComponent: m("TransitionComponent"), transitionDuration: m("transitionDuration"), TransitionProps: m("TransitionProps", !0), iconVariant: m("iconVariant", !0), style: m("style", !0), SnackbarProps: m("SnackbarProps", !0), className: Vt(e.props.className, d.className) });
3938
3942
  return u.persist && (u.autoHideDuration = void 0), e.setState(function(b) {
3939
3943
  if (s === void 0 && e.props.preventDuplicate || s) {
3940
3944
  var y = function(w) {
@@ -4061,22 +4065,22 @@ const Lt = new Wd(), ut = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a39
4061
4065
  i(t);
4062
4066
  }, [t, i]);
4063
4067
  let y = g?.message;
4064
- return !y && qn(e) && (y = e), y || typeof e != "string" || (y = e), y || (y = `Unknown Error: ${e}`), o(ir, { ref: a, className: Te(ut.root, "error-snackbar"), children: H(ts, { className: ut.card, style: { backgroundColor: s.palette.error.dark, border: `1px solid ${s.palette.error.dark}` }, children: [H(os, { className: ut.actionRoot, children: [c ? null : r?.error, o(Pe, { variant: "body2", component: "div", className: ut.typography, children: y }), o("div", { style: { flex: "1 1 auto" } }), H("div", { className: ut.icons, children: [m ? o(st, { "aria-label": "Show more", size: "small", className: Te(ut.expand, { [ut.expandOpen]: d }), onClick: u, children: o(he, { iconKey: "ExpandMore" }) }) : null, o(st, { size: "small", className: ut.expand, onClick: b, children: o(he, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), m ? o(ns, { in: d, timeout: "auto", children: o("div", { className: ut.stackTraceContainer, style: { backgroundColor: s.palette.error.light, borderTop: `1px solid ${s.palette.error.main}` }, children: o(ms, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
4068
+ return !y && qn(e) && (y = e), y || typeof e != "string" || (y = e), y || (y = `Unknown Error: ${e}`), o(ir, { ref: a, className: Te(ut.root, "error-snackbar"), children: H(ts, { className: ut.card, style: { backgroundColor: s.palette.error.dark, border: `1px solid ${s.palette.error.dark}` }, children: [H(os, { className: ut.actionRoot, children: [c ? null : r?.error, o(Pe, { variant: "body2", component: "div", className: ut.typography, children: y }), o("div", { style: { flex: "1 1 auto" } }), H("div", { className: ut.icons, children: [m ? o(st, { "aria-label": "Show more", size: "small", className: Te(ut.expand, { [ut.expandOpen]: d }), onClick: u, children: o(xe, { iconKey: "ExpandMore" }) }) : null, o(st, { size: "small", className: ut.expand, onClick: b, children: o(xe, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), m ? o(ns, { in: d, timeout: "auto", children: o("div", { className: ut.stackTraceContainer, style: { backgroundColor: s.palette.error.light, borderTop: `1px solid ${s.palette.error.main}` }, children: o(ms, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
4065
4069
  }));
4066
4070
  qi.displayName = "ToastError";
4067
4071
  const Ki = q(X((n, a) => {
4068
4072
  const { commands: t, commandHook: e, scope: r = "workbook", disabled: l = !1, ...c } = n, p = Y((s) => {
4069
- const d = { variant: re.Menuitem, parentFloat: s.floatReference, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(N, { ...d, command: t.getCommand("newWorkbook") }), o(Q, { orientation: "horizontal" }), o(N, { ...d, command: t.getCommand("openWorkbook") }), o(Se, { ...d, commands: t, quickCommand: "saveWorkbook", createPopupPanel: (g) => {
4073
+ const d = { variant: re.Menuitem, parentFloat: s.floatReference, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(M, { ...d, command: t.getCommand("newWorkbook") }), o(Q, { orientation: "horizontal" }), o(M, { ...d, command: t.getCommand("openWorkbook") }), o(Se, { ...d, commands: t, quickCommand: "saveWorkbook", createPopupPanel: (g) => {
4070
4074
  const m = { ...d, parentFloat: g.floatReference, scope: "saveWorkbook" }, u = [];
4071
4075
  return Lt.getWriteFormats().forEach((b) => {
4072
4076
  if (b.isDefault) return;
4073
4077
  const y = b.key, f = t.getCommand(`saveWorkbookAs${y}`);
4074
- f ? u.push(ke(N, { ...m, key: y, command: f })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${y}'`);
4075
- }), ge({ ...g, children: u, onClick: () => {
4078
+ f ? u.push(ke(M, { ...m, key: y, command: f })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${y}'`);
4079
+ }), he({ ...g, children: u, onClick: () => {
4076
4080
  g.closeFloatAll();
4077
4081
  } });
4078
4082
  } })] });
4079
- return ge({ ...s, children: x, onClick: (g) => {
4083
+ return he({ ...s, children: x, onClick: (g) => {
4080
4084
  g.isDefaultPrevented || s.closeFloatAll();
4081
4085
  } });
4082
4086
  }, [l, t, e, r]), i = "File";
@@ -4092,55 +4096,55 @@ const jd = o(nt, { label: "SheetXL", description: "Visit me at sheetxl.com.", ch
4092
4096
  } } }) : null, u = p ? o(id, { commands: t, commandHook: { beforeExecute() {
4093
4097
  s?.closeAll();
4094
4098
  }, onError(f, h, w) {
4095
- } } }) : null, b = W(() => ({ paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }), []), y = xe(null);
4096
- return o(B, { ref: $t([y, d, a]), ...i, children: Ti({ commands: t, renderCompact: g, workbook: e, selectWrapper: (f) => H(B, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (h) => h.spacing(1), paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }, children: [H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (h) => h.spacing(0.5) }, children: [r, H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (h) => h.spacing(0.25) }, children: [m, f] })] }), o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), o(B, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: g && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), selectProps: b, toolbarsProps: { Home: { sx: {} } } }) });
4099
+ } } }) : null, b = W(() => ({ paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }), []), y = be(null);
4100
+ return o(B, { ref: $t([y, d, a]), ...i, children: Ci({ commands: t, renderCompact: g, workbook: e, selectWrapper: (f) => H(B, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (h) => h.spacing(1), paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }, children: [H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (h) => h.spacing(0.5) }, children: [r, H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (h) => h.spacing(0.25) }, children: [m, f] })] }), o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), o(B, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: g && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), selectProps: b, toolbarsProps: { Home: { sx: {} } } }) });
4097
4101
  }));
4098
4102
  Xi.displayName = "StudioToolbar";
4099
4103
  const Yi = q((n) => {
4100
4104
  const { workbook: a, setWorkbook: t, refWorkbookTitle: e, titleWorkbook: r, setWorkbookTitle: l, titlePlaceHolder: c, children: p, undoManager: i, commands: s, importExportDisabled: d, themeOptions: x } = n, g = ((b) => {
4101
- const { workbook: y, setWorkbook: f, importExportDisabled: h, workbookTitle: w = "export", setWorkbookTitle: v, requestWorkbookTitle: S, themeOptions: C, undoManager: D, commands: T, onExecute: P } = b, R = cn(), k = Y(C?.onModeChange, [C?.onModeChange]), E = Y(C?.onEnabledDarkGridChange, [C?.onEnabledDarkGridChange]), M = Y(C?.onEnabledDarkImagesChange, [C?.onEnabledDarkImagesChange]), I = Y(async (j = null, K = null) => {
4105
+ const { workbook: y, setWorkbook: f, importExportDisabled: h, workbookTitle: w = "export", setWorkbookTitle: v, requestWorkbookTitle: S, themeOptions: C, undoManager: D, commands: E, onExecute: P } = b, R = cn(), k = Y(C?.onModeChange, [C?.onModeChange]), T = Y(C?.onEnabledDarkGridChange, [C?.onEnabledDarkGridChange]), F = Y(C?.onEnabledDarkImagesChange, [C?.onEnabledDarkImagesChange]), I = Y(async (j = null, K = null) => {
4102
4106
  const ee = [];
4103
4107
  let V, A = null, Z = null;
4104
4108
  if (typeof j == "string" ? Z = j : A = j, V = A ? j : await to.openFileDialog(Z ?? Lt.getAllReadFormatTypeAsString().join(",")), !V) return null;
4105
4109
  const oe = { source: V, createWorkbookOptions: K, onWarning: (ve) => {
4106
4110
  ee.push(ve);
4107
- } }, Be = await Lt.read(oe, R);
4111
+ } }, Oe = await Lt.read(oe, R);
4108
4112
  return ee.length > 0 && (R.showMessage("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
4109
4113
  ` + ee.join(`
4110
- `))), Be;
4111
- }, [P, R, y]), F = Y(async (j, K, ee) => {
4114
+ `))), Oe;
4115
+ }, [P, R, y]), O = Y(async (j, K, ee) => {
4112
4116
  if (!K && S) {
4113
4117
  const V = await S("Enter Workbook name to " + (ee.isDefault ? "Save." : `Export as ${ee.description}.`));
4114
4118
  return V !== null && Lt.writeFile(V, j, { formatType: ee.key });
4115
4119
  }
4116
4120
  return Lt.writeFile(K, j, { formatType: ee.key });
4117
4121
  }, [R, y, S]), L = U(() => ({ contains: (j) => !0, focus() {
4118
- } }), []), O = W(() => {
4122
+ } }), []), N = W(() => {
4119
4123
  const j = [];
4120
4124
  h || (Lt.getWriteFormats().forEach((ee) => {
4121
4125
  const V = ee.isDefault, A = { label: V ? "Save Workbook" : `Save Workbook as ${ee.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${ee.description}` }, tags: ee.tags, description: `Save the workbook to the desktop${V ? "" : ` as ${ee.description}`}.`, icon: "FileDownloadAsSheet" };
4122
- V && (A.shortcut = { key: "S", modifiers: [fe.Ctrl] }, j.push(new be("saveWorkbookAs", L, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [fe.Shift, fe.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
4123
- F(y, null, ee).catch((Be) => {
4124
- R.showError(Be);
4126
+ V && (A.shortcut = { key: "S", modifiers: [ge.Ctrl] }, j.push(new fe("saveWorkbookAs", L, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [ge.Shift, ge.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
4127
+ O(y, null, ee).catch((Oe) => {
4128
+ R.showError(Oe);
4125
4129
  });
4126
4130
  })));
4127
4131
  const Z = ee.key, oe = V ? "saveWorkbook" : `saveWorkbookAs${Z}`;
4128
- Z === "CSV" ? A.icon = "FileDownloadAsCSV" : Z === "Excel" && (A.icon = "FileDownloadAsExcel"), j.push(new be(oe, L, A, (Be) => {
4129
- F(y, Be ?? w, ee).catch((ve) => {
4132
+ Z === "CSV" ? A.icon = "FileDownloadAsCSV" : Z === "Excel" && (A.icon = "FileDownloadAsExcel"), j.push(new fe(oe, L, A, (Oe) => {
4133
+ O(y, Oe ?? w, ee).catch((ve) => {
4130
4134
  R.showError(ve);
4131
4135
  });
4132
4136
  }));
4133
- }), j.push(new be("openWorkbook", L, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [fe.Ctrl] } }, async (ee = null) => {
4137
+ }), j.push(new fe("openWorkbook", L, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [ge.Ctrl] } }, async (ee = null) => {
4134
4138
  const V = { date1904: y.isDate1904(), ...y.options };
4135
4139
  try {
4136
4140
  const A = await I(ee, V);
4137
4141
  if (!A) return;
4138
- const Z = A.title, oe = A.workbook, Be = oe.getSelectedSheet();
4142
+ const Z = A.title, oe = A.workbook, Oe = oe.getSelectedSheet();
4139
4143
  if (A.formatType.mimeType === "text/csv") {
4140
4144
  const ve = y.findValidSheetName(Z);
4141
4145
  await y.doBatch(async () => {
4142
4146
  const Ne = { colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 };
4143
- let _e = Be.getUsedRange();
4147
+ let _e = Oe.getUsedRange();
4144
4148
  if (!_e) return void R.showMessage("The file appears to be blank.");
4145
4149
  _e = _e.getUnion(Ne), await y.getSheets().add({ name: ve, autoSelect: !0 }).getRange(Ne).copyFrom(_e);
4146
4150
  }, `Import CSV '${Z}'`);
@@ -4148,30 +4152,30 @@ const Yi = q((n) => {
4148
4152
  } catch (A) {
4149
4153
  R.showError(A);
4150
4154
  }
4151
- })), j.push(new be("openWorkbookFromUrl", L, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(ee) {
4155
+ })), j.push(new fe("openWorkbookFromUrl", L, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(ee) {
4152
4156
  if (!ee) {
4153
- const V = await R.showInputOptions({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
4157
+ const V = await R.showInput({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
4154
4158
  if (V.option !== "Open") return;
4155
4159
  ee = V.input;
4156
4160
  }
4157
4161
  ee && console.log("openWorkbookFromUrl", ee);
4158
4162
  })));
4159
4163
  let K = [];
4160
- return C && (K = [new be("themeMode", L, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new be("defaultThemeMode", L, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new be("enableDarkGrid", L, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new be("enableDarkImages", L, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...j, ...K, new He("help", L, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
4161
- }), new He("showKeyboardShortcuts", L, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [fe.Ctrl] } }, () => {
4162
- }), new be("gotoUrlGithub", L, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
4164
+ return C && (K = [new fe("themeMode", L, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new fe("defaultThemeMode", L, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new fe("enableDarkGrid", L, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new fe("enableDarkImages", L, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...j, ...K, new He("help", L, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
4165
+ }), new He("showKeyboardShortcuts", L, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [ge.Ctrl] } }, () => {
4166
+ }), new fe("gotoUrlGithub", L, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
4163
4167
  window?.open("https://github.com/sheetxl/sheetxl");
4164
- }), new be("gotoUrlDiscord", L, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
4168
+ }), new fe("gotoUrlDiscord", L, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
4165
4169
  window?.open("https://discord.gg/NTKdwUgK9p");
4166
- }), new be("gotoUrlDocumentation", L, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
4170
+ }), new fe("gotoUrlDocumentation", L, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
4167
4171
  window?.open("https://www.sheetxl.com/docs");
4168
- }), new be("gotoUrlIssue", L, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
4172
+ }), new fe("gotoUrlIssue", L, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
4169
4173
  window?.open("https://github.com/sheetxl/sheetxl/issues");
4170
4174
  })];
4171
- }, [y, w, R, h, C, T, D]), z = W(() => {
4175
+ }, [y, w, R, h, C, E, D]), z = W(() => {
4172
4176
  let j = null;
4173
- return j = T ? T.createChildGroup(L, "standaloneWorkbook", !1) : new er(L, "standaloneWorkbook"), j.addCommands(O, !0), j;
4174
- }, [T, O]);
4177
+ return j = E ? E.createChildGroup(L, "standaloneWorkbook", !1) : new er(L, "standaloneWorkbook"), j.addCommands(N, !0), j;
4178
+ }, [E, N]);
4175
4179
  ks({ manager: D, commands: z });
4176
4180
  const ie = Pa("(prefers-color-scheme: dark)"), { themeMode: J } = Ma();
4177
4181
  de(() => {
@@ -4182,22 +4186,22 @@ const Yi = q((n) => {
4182
4186
  }), z.getCommand("defaultThemeMode").update({ state: !C.mode, icon: ie ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
4183
4187
  k(null);
4184
4188
  }), z.getCommand("enableDarkGrid").update({ state: C.enableDarkGrid }).updateCallback(() => {
4185
- E(!C.enableDarkGrid);
4189
+ T(!C.enableDarkGrid);
4186
4190
  }), z.getCommand("enableDarkImages").update({ state: C.enableDarkImages }).updateCallback(() => {
4187
- M(!C.enableDarkImages);
4191
+ F(!C.enableDarkImages);
4188
4192
  });
4189
- }, [J, C, O]);
4193
+ }, [J, C, N]);
4190
4194
  const { showModal: pe } = hs();
4191
4195
  return de(() => {
4192
4196
  const j = () => new Promise((K, ee) => {
4193
- const V = ae.lazy(() => import("./B7ChnkonDRA2zazH.mjs")), A = pe(V, { title: "Shortcut Keys Reference", commands: z, onDone: () => {
4197
+ const V = ae.lazy(() => import("./Bt5mafuXg0WhvqQl.mjs")), A = pe(V, { title: "Shortcut Keys Reference", commands: z, onDone: () => {
4194
4198
  A.hide();
4195
4199
  }, slotProps: { transition: { onExited: () => {
4196
4200
  K(!0);
4197
4201
  } } } });
4198
4202
  });
4199
4203
  z.getCommand("showKeyboardShortcuts").updateCallback(() => j()), z.getCommand("help").updateCallback(() => j());
4200
- }, [O, z]), z;
4204
+ }, [N, z]), z;
4201
4205
  })({ workbook: a, setWorkbook: t, importExportDisabled: d, workbookTitle: r, setWorkbookTitle: l, commands: s, requestWorkbookTitle: (b) => new Promise((y) => {
4202
4206
  e.current ? e.current.requestWorkbookTitle((f, h) => {
4203
4207
  y(f);
@@ -4214,32 +4218,32 @@ const Zi = q((n) => {
4214
4218
  c((f) => ({ ...f, isMounted: !0 }));
4215
4219
  }, []), i = U(() => {
4216
4220
  c((f) => ({ ...f, isMounted: !1 }));
4217
- }, []), s = {}, d = gs(s), x = fs(s), g = bs(s), m = xe(/* @__PURE__ */ new Set()), u = W(() => {
4221
+ }, []), s = {}, d = gs(s), x = fs(s), g = bs(s), m = be(/* @__PURE__ */ new Set()), u = W(() => {
4218
4222
  const f = (v, S) => {
4219
4223
  if (S?.onceKey) {
4220
4224
  if (m.current.has(S.onceKey)) return;
4221
4225
  const D = new Set(m.current);
4222
4226
  D.add(S.onceKey), m.current = D;
4223
4227
  }
4224
- const C = { variant: S?.type ?? wt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: S?.preventDuplicate, persist: S?.persist ?? S?.type === wt.Error, action: (D) => o(st, { onClick: () => r(D), children: o(he, { iconKey: "Cancel" }) }) };
4228
+ const C = { variant: S?.type ?? St.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: S?.preventDuplicate, persist: S?.persist ?? S?.type === St.Error, action: (D) => o(st, { onClick: () => r(D), children: o(xe, { iconKey: "Cancel" }) }) };
4225
4229
  S?.enqueueProps && Object.assign(C, S.enqueueProps), v || console.log("message is 'null'", S), e(v ?? "Alert", C);
4226
4230
  }, h = { showMessage: f, showBusy: (v, S) => {
4227
4231
  let C = null;
4228
- const D = new Promise((T) => {
4229
- C = T;
4232
+ const D = new Promise((E) => {
4233
+ C = E;
4230
4234
  });
4231
- return c((T) => {
4232
- const P = new Map(T.starting);
4233
- return P.set(D, C), { ...T, label: v, starting: P };
4235
+ return c((E) => {
4236
+ const P = new Map(E.starting);
4237
+ return P.set(D, C), { ...E, label: v, starting: P };
4234
4238
  }), D;
4235
- }, showWindow: (v, S, C) => {
4236
- const D = { ...S, onKeyDown: (T) => {
4237
- T.isDefaultPrevented() || T.isPropagationStopped() || S?.onKeyDown?.(T);
4238
- } };
4239
- return d(v, { sort: () => import("./CA-_Kya2gsMrF9Ef.mjs"), numberFormat: () => import("./aeHM-2IGRQaGFohd.mjs"), hyperlink: () => import("./BzGH26JDt4xKZfM7.mjs"), comments: () => import("./lm9H6CMj_7o_ra2l.mjs"), find: () => import("./CGBRrUgnGzuP9FGo.mjs"), tableNew: () => import("./csScKLYnqrrlL197.mjs"), namedDetails: () => import("./BZPlU0oT2oGTQQgK.mjs") }[v], D, C);
4240
- }, showOptions: x, showInputOptions: g, showError: (v) => {
4241
- let S, C = wt.Error, D = "Unknown Error";
4242
- typeof v == "string" ? D = v : v instanceof Error && (S = v, v.message && (D = v.message)), v instanceof Ns && (C = wt.Info), f(D, { type: C, enqueueProps: { error: S } });
4239
+ }, showWindow: (v, S) => {
4240
+ const C = S;
4241
+ return S = { ...S, onKeyDown: (D) => {
4242
+ D.isDefaultPrevented() || D.isPropagationStopped() || C?.onKeyDown?.(D);
4243
+ } }, d(v, { sort: () => import("./CM2aBn9YvLNeeDKP.mjs"), numberFormat: () => import("./D3fJ2Y2akXy1Cea2.mjs"), hyperlink: () => import("./DBreu3Q0z7uri1up.mjs"), comments: () => import("./DkCrTK-q70GM5ZtY.mjs"), find: () => import("./DYbBkU4jsgMfwHKv.mjs"), tableNew: () => import("./uswYw8_B9PDchitz.mjs"), namedDetails: () => import("./DAM5zld1EMvhrTq7.mjs"), resizeHeader: () => import("./BhK8LG6eLNtnpyM8.mjs") }[v], S);
4244
+ }, showOptions: x, showInput: g, showError: (v) => {
4245
+ let S, C = St.Error, D = "Unknown Error";
4246
+ typeof v == "string" ? D = v : v instanceof Error && (S = v, v.message && (D = v.message)), v instanceof Ns && (C = St.Info), f(D, { type: C, enqueueProps: { error: S } });
4243
4247
  } }, w = new Cs();
4244
4248
  return w.setOverrides(h), w;
4245
4249
  }, []);
@@ -4268,53 +4272,53 @@ const $d = q(X((n, a) => {
4268
4272
  const y = p.getRegisteredTaskPane(b);
4269
4273
  if (!y) return null;
4270
4274
  let f = y.getIcon?.();
4271
- f && (typeof f == "string" && (f = o(he, { iconKey: f })), f = o("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: f }));
4275
+ f && (typeof f == "string" && (f = o(xe, { iconKey: f })), f = o("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: f }));
4272
4276
  const h = b === c;
4273
- return o(Da, { value: b, label: o(vt, { disableInteractive: !0, title: y.getTitle() ?? "", placement: "left-start", children: H(B, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (w) => w.palette.text.secondary }, children: [f && o(B, { sx: { display: "inline-block", transformOrigin: "center", color: (w) => w.palette.text.secondary }, children: f }), s && f ? null : o(Pe, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (w) => h ? w.palette.primary.main : w.palette.text.secondary }, children: y.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: Te("taskpane-strip-item", { "Mui-selected": h }), onClick: () => n.onSelect(b) }, b);
4274
- }), [r, c, l, p]), m = Ct(a, () => ({ isTaskPaneStrip: () => !0 }), []), u = W(() => Te("taskpane-strip", d), [d]);
4277
+ return o(Da, { value: b, label: o(kt, { disableInteractive: !0, title: y.getTitle() ?? "", placement: "left-start", children: H(B, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (w) => w.palette.text.secondary }, children: [f && o(B, { sx: { display: "inline-block", transformOrigin: "center", color: (w) => w.palette.text.secondary }, children: f }), s && f ? null : o(Pe, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (w) => h ? w.palette.primary.main : w.palette.text.secondary }, children: y.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: Te("taskpane-strip-item", { "Mui-selected": h }), onClick: () => n.onSelect(b) }, b);
4278
+ }), [r, c, l, p]), m = Tt(a, () => ({ isTaskPaneStrip: () => !0 }), []), u = W(() => Te("taskpane-strip", d), [d]);
4275
4279
  return o(B, { ref: m, className: u, sx: { paddingLeft: "2px", paddingTop: "4px", ...i }, ...x, children: o(Ea, { orientation: "vertical", variant: "scrollable", value: c, onChange: (b, y) => {
4276
4280
  l(y);
4277
4281
  }, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: g }) });
4278
4282
  })), Vd = (n, a) => o($d, { ref: a, ...n }), _d = ae.forwardRef((n, a) => {
4279
- const { commands: t, model: e, ...r } = n, l = Ke(), c = `solid ${ye(l.palette.divider, 0.2)} 1px`, p = `${l.shape.borderRadius ?? 4}px`, i = `${l.spacing?.(0.5) ?? 4}px`, s = xe(null);
4283
+ const { commands: t, model: e, ...r } = n, l = Ke(), c = `solid ${ye(l.palette.divider, 0.2)} 1px`, p = `${l.shape.borderRadius ?? 4}px`, i = `${l.spacing?.(0.5) ?? 4}px`, s = be(null);
4280
4284
  return o(_l, { model: e, ref: a, frameProps: { style: { border: c, borderRadius: p, marginBottom: i } }, alwaysShowStrip: !0, renderTaskPanelTitle: (d, x) => {
4281
4285
  const { title: g, icon: m, onClose: u, readOnly: b, focused: y, ...f } = d;
4282
4286
  return o(rs, { className: Te({ "Mui-selected": y }), sx: { display: "flex", flex: "1 1 %0", color: (h) => h.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (h) => `${h.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (h) => h.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (h) => ye(h.palette.action.hover, 0.03), borderBottom: (h) => `solid ${ye(h.palette.divider, 0.2)} 1px` }, ...f, children: H(B, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (h) => h.spacing(0.25), marginBottom: (h) => h.spacing(0.25), marginLeft: (h) => h.spacing(1), marginRight: (h) => h.spacing(1) }, children: [o(B, { sx: { flex: "1 1 100%", paddingLeft: (h) => h.spacing(1) }, children: g }), o(nt, { label: "Close", children: o(st, { "aria-label": "close", sx: { color: (h) => h.palette.text.icon ?? h.palette.action.active }, touchRippleRef: s, onPointerDown: (h) => {
4283
4287
  s.current?.start(h, { center: !1 }), h.stopPropagation(), h.preventDefault();
4284
4288
  }, onPointerUp: () => {
4285
4289
  u();
4286
- }, children: o(he, { iconKey: "Close" }) }) })] }) });
4290
+ }, children: o(xe, { iconKey: "Close" }) }) })] }) });
4287
4291
  }, renderTaskPaneStrip: Vd, ...n, onOpen: () => {
4288
4292
  n?.onOpen?.();
4289
4293
  }, onClose: () => {
4290
4294
  n?.onClose?.();
4291
4295
  }, commands: t, ...r });
4292
4296
  }), wa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Qi = q(X((n, a) => {
4293
- const { mainElement: t, sidebarElement: e, className: r, style: l, ...c } = n, p = Ke(), [i, { width: s }] = zt(), d = s > 530 || s === 0, x = xe(null);
4297
+ const { mainElement: t, sidebarElement: e, className: r, style: l, ...c } = n, p = Ke(), [i, { width: s }] = zt(), d = s > 530 || s === 0, x = be(null);
4294
4298
  let g = null, m = 4, u = 13;
4295
4299
  return d ? g = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (g = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", m = 13, u = 4), o(Qn, { ref: $t([x, i, a]), className: r, style: l ? { ...wa, ...l } : wa, ...c, fixedPane: "after", position: "40%", minAfter: d ? "280px" : "120px", splitDirection: d ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: d ? "6px" : void 0, minHeight: d ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${m}' height='${u}' viewBox='0 0 ${m} ${u}' version='1.1' fill='${p.palette.text.icon ?? p.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${g}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: d ? "left center" : "top center" } }, elementBefore: t, paneBeforeProps: { style: { flexDirection: "column", marginRight: e ? void 0 : "6px" } }, elementAfter: e, paneAfterProps: { style: { marginLeft: d ? "0px" : "4px", marginRight: d ? "8px" : "4px" } } });
4296
4300
  }));
4297
4301
  Qi.displayName = "StudioSplitPane", nd(), Jn.register("plugin-scripts", { icons: {} }), tn.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Fc }, !0);
4298
4302
  const Vn = q(X((n, a) => {
4299
- const { className: t, sx: e, style: r, onElementLoad: l, onError: c, undoManager: p, errorPanel: i = ys, onKeyDown: s, workbook: d, createWorkbookOptions: x, onWorkbookChange: g, logo: m, importExportDisabled: u = !1, themeOptions: b, autoFocus: y = !1, commands: f, title: h, onTitleChange: w, titleProps: v, renderLoadingPanel: S, ...C } = n, D = xe(null), T = Y(g, [g]), P = Y(w ?? v?.onTitleChange, [w ?? v?.onTitleChange]), R = v?.placeHolder ?? "Untitled", k = b?.mode, { themeMode: E, source: M } = Ma({ mode: k }), I = W(() => ({ ...b, light: Cr(!1, to.deepMerge(b?.theme ?? {}, b?.light ?? {})), dark: Cr(!0, to.deepMerge(b?.theme ?? {}, b?.dark ?? {})) }), [b]), F = E === An.Dark, [L, O] = _(null);
4303
+ const { className: t, sx: e, style: r, onElementLoad: l, onError: c, undoManager: p, errorPanel: i = ys, onKeyDown: s, workbook: d, createWorkbookOptions: x, onWorkbookChange: g, logo: m, importExportDisabled: u = !1, themeOptions: b, autoFocus: y = !1, commands: f, title: h, onTitleChange: w, titleProps: v, renderLoadingPanel: S, ...C } = n, D = be(null), E = Y(g, [g]), P = Y(w ?? v?.onTitleChange, [w ?? v?.onTitleChange]), R = v?.placeHolder ?? "Untitled", k = b?.mode, { themeMode: T, source: F } = Ma({ mode: k }), I = W(() => ({ ...b, light: Cr(!1, to.deepMerge(b?.theme ?? {}, b?.light ?? {})), dark: Cr(!0, to.deepMerge(b?.theme ?? {}, b?.dark ?? {})) }), [b]), O = T === An.Dark, [L, N] = _(null);
4300
4304
  de(() => {
4301
- O(p ?? new Fs());
4305
+ N(p ?? new Fs());
4302
4306
  }, [p]);
4303
4307
  const [z, ie] = _(null), [J, pe] = _(null), j = Gn();
4304
- St(() => {
4308
+ vt(() => {
4305
4309
  if (!d || Object.keys(d).length === 0 && !to.isPromiseLike(d)) {
4306
4310
  const te = { theme: j.getDefaultTheme(), ...x };
4307
- pe(new Bn(te));
4311
+ pe(new On(te));
4308
4312
  } else pe(d);
4309
- }, [d]), St(() => {
4313
+ }, [d]), vt(() => {
4310
4314
  if (J) {
4311
- if (J instanceof Bn) return ie({ workbook: J }), void (d !== J && T?.(J));
4315
+ if (J instanceof On) return ie({ workbook: J }), void (d !== J && E?.(J));
4312
4316
  (async () => {
4313
4317
  try {
4314
4318
  let te, Ce = await Promise.resolve(J);
4315
- Ce && Ce.source && (Ce = await Lt.read(Ce)), Ce.workbook ? (Z(Ce.title), te = Ce.workbook) : te = Ce, T?.(te), ie({ workbook: te });
4319
+ Ce && Ce.source && (Ce = await Lt.read(Ce)), Ce.workbook ? (Z(Ce.title), te = Ce.workbook) : te = Ce, E?.(te), ie({ workbook: te });
4316
4320
  } catch (te) {
4317
- T?.(null), ie({ error: te });
4321
+ E?.(null), ie({ error: te });
4318
4322
  }
4319
4323
  })();
4320
4324
  }
@@ -4339,20 +4343,20 @@ const Vn = q(X((n, a) => {
4339
4343
  }, [h ?? v?.title]), de(() => {
4340
4344
  P?.(A);
4341
4345
  }, [A]);
4342
- const [oe, Be] = _(null), ve = W(() => {
4346
+ const [oe, Oe] = _(null), ve = W(() => {
4343
4347
  const te = () => ({ contains: (Ce) => !0, focus() {
4344
4348
  } });
4345
4349
  return f ? f.createChildGroup(te, "application", !1) : new er(te, "application");
4346
4350
  }, [f]), Ne = Y(async (te) => {
4347
- Be(te.source.getViewportElement()), ee(te), ve.activate("sheet"), await Jn.prefetch(), l?.(te);
4351
+ Oe(te.source.getViewportElement()), ee(te), ve.activate("sheet"), await Jn.prefetch(), l?.(te);
4348
4352
  }, [ve]);
4349
4353
  de(() => {
4350
4354
  K && y && K.source?.focus(typeof y == "object" ? y : void 0);
4351
4355
  }, [K]);
4352
- const _e = xe(null), Ve = U((te) => {
4356
+ const _e = be(null), Ve = U((te) => {
4353
4357
  let Ce = null;
4354
- return v?.hidden || (Ce = o(Ni, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: D.current, ref: _e, title: A, placeHolder: R, onTitleChange: (Tt) => {
4355
- Z(Tt);
4358
+ return v?.hidden || (Ce = o(Mi, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: D.current, ref: _e, title: A, placeHolder: R, onTitleChange: (Et) => {
4359
+ Z(Et);
4356
4360
  } })), o(Xi, { ...te, logo: m, mainElement: Ce, showFileMenu: !u, showAppearanceMenu: !!(I?.onEnabledDarkGridChange || I?.onEnabledDarkImagesChange || I?.onModeChange) });
4357
4361
  }, [m, A, v, I, u, ve]);
4358
4362
  de(() => {
@@ -4367,33 +4371,33 @@ const Vn = q(X((n, a) => {
4367
4371
  }, [e, r, S]), G = U(({ error: te }) => (c?.(te), o(i, { sx: e, style: r, error: te ?? "Unable to display empty workbook." })), [e, r, c]), se = W(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (te) => te.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), [Re, qe] = _(null), Ee = U((te, Ce) => o(_d, { ref: Ce, model: J, commands: ve, ...te }), [ve, J]), rt = U((te) => o(Qi, { mainElement: te, sidebarElement: Re }), [Re]), Xe = $t([D, a]), dt = W(() => {
4368
4372
  if (!z) return ne;
4369
4373
  if (z.error || !z.workbook) return G({ error: z.error });
4370
- let te = null, Ce = null, Tt = !1;
4371
- return I && (te = F ? I.dark : I.light, Ce = F && I.enableDarkGrid ? I.dark : I.light, Tt = I.enableDarkImages), o(Mi, { sx: se, style: r, tabIndex: 0, autoFocus: !0, workbook: z.workbook, ref: Xe, renderToolbar: Ve, onElementLoad: Ne, onRepeatCommandChange: V, onKeyDown: (io) => {
4374
+ let te = null, Ce = null, Et = !1;
4375
+ return I && (te = O ? I.dark : I.light, Ce = O && I.enableDarkGrid ? I.dark : I.light, Et = I.enableDarkImages), o(Ri, { sx: se, style: r, tabIndex: 0, autoFocus: !0, workbook: z.workbook, ref: Xe, renderToolbar: Ve, onElementLoad: Ne, onRepeatCommandChange: V, onKeyDown: (io) => {
4372
4376
  s?.(io);
4373
- }, renderLoadingPanel: S, gridTheme: Ce, headersTheme: te, enableDarkImages: Tt, mainWrapper: rt, className: Te(t), onContextMenu: (io) => io.preventDefault(), ...C }, "WorkbookElement");
4377
+ }, renderLoadingPanel: S, gridTheme: Ce, headersTheme: te, enableDarkImages: Et, mainWrapper: rt, className: Te(t), onContextMenu: (io) => io.preventDefault(), ...C }, "WorkbookElement");
4374
4378
  }, [z, A, L, ne, S, I, C, Ve, se, rt]);
4375
- let Me = o(Ld, { maxSnack: 3, domRoot: oe, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (te, Ce, Tt) => {
4379
+ let Me = o(Ld, { maxSnack: 3, domRoot: oe, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (te, Ce, Et) => {
4376
4380
  D.current?.focus();
4377
- }, Components: { error: qi }, iconVariant: { success: o(Ca, { style: { marginRight: "8px" }, children: o("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: o(he, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: o(Ul, { createArea: Ee, onUpdateArea: (te) => {
4381
+ }, Components: { error: qi }, iconVariant: { success: o(Ca, { style: { marginRight: "8px" }, children: o("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: o(xe, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: o(Ul, { createArea: Ee, onUpdateArea: (te) => {
4378
4382
  qe(te);
4379
4383
  }, children: o(ws, { children: o(Zi, { children: o(Es, { children: o(Ds, { children: o(Yi, { workbook: z?.workbook, setWorkbook: pe, importExportDisabled: u, titlePlaceHolder: R, titleWorkbook: A, setWorkbookTitle: Z, refWorkbookTitle: _e, commands: ve, undoManager: L, themeOptions: I, children: dt }) }) }) }) }) }) });
4380
- return I && (Me = H(Na, { theme: F ? I.dark : I.light, children: [I.cssBaseline ? o(as, {}) : null, Me] })), Me;
4384
+ return I && (Me = H(Na, { theme: O ? I.dark : I.light, children: [I.cssBaseline ? o(as, {}) : null, Me] })), Me;
4381
4385
  }));
4382
4386
  Vn.displayName = "EagerStudio";
4383
4387
  const Ud = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Vn, default: Vn }, Symbol.toStringTag, { value: "Module" }));
4384
4388
  export {
4385
4389
  Vs as $,
4386
- Fi as A,
4390
+ Ni as A,
4387
4391
  qs as B,
4388
4392
  Ws as C,
4389
4393
  ad as D,
4390
4394
  id as E,
4391
4395
  Xs as F,
4392
4396
  ld as G,
4393
- Os as H,
4394
- vi as I,
4397
+ Bs as H,
4398
+ Fi as I,
4395
4399
  nr as J,
4396
- Oi as K,
4400
+ Bi as K,
4397
4401
  cd as L,
4398
4402
  Ks as M,
4399
4403
  Ka as N,
@@ -4404,7 +4408,7 @@ export {
4404
4408
  pd as S,
4405
4409
  As as T,
4406
4410
  Ha as U,
4407
- Bs as V,
4411
+ Os as V,
4408
4412
  ac as W,
4409
4413
  Us as X,
4410
4414
  Ls as Y,
@@ -4413,7 +4417,7 @@ export {
4413
4417
  Vt as a,
4414
4418
  tr as a0,
4415
4419
  Lo as a1,
4416
- Oa as a2,
4420
+ Ba as a2,
4417
4421
  bc as a3,
4418
4422
  xc as a4,
4419
4423
  yc as a5,
@@ -4433,10 +4437,10 @@ export {
4433
4437
  li as aj,
4434
4438
  si as ak,
4435
4439
  lp as al,
4436
- Mi as am,
4437
- Ni as an,
4438
- Pi as ao,
4439
- Di as ap,
4440
+ Ri as am,
4441
+ Mi as an,
4442
+ Di as ao,
4443
+ Ei as ap,
4440
4444
  zc as aq,
4441
4445
  Hc as ar,
4442
4446
  Qr as as,
@@ -4452,7 +4456,7 @@ export {
4452
4456
  Ys as h,
4453
4457
  Zs as i,
4454
4458
  Qs as j,
4455
- Ba as k,
4459
+ Oa as k,
4456
4460
  Js as l,
4457
4461
  Aa as m,
4458
4462
  Ia as n,