@sheetxl/studio-mui 0.7.7 → 0.7.8

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 (36) hide show
  1. package/browser/cjs/{BxlQ6aLh5_jUvk9w.cjs → Bt0-HMKtnBRB6IpI.cjs} +10 -10
  2. package/browser/cjs/{BJ4pZo7s81ynDlzw.cjs → CJW4-NCdaLzNEwgK.cjs} +1 -1
  3. package/browser/cjs/{j0lD5RrJ86CRlUNT.cjs → D36j1nR6-lEwM7Ht.cjs} +2 -2
  4. package/browser/cjs/{CJSNNa8ySxzuEmoy.cjs → D9RcTPcL8Gcds6uC.cjs} +2 -2
  5. package/browser/cjs/{Bpq9GrV7al7xxJ_d.cjs → DPenF_1mYgI8WaQf.cjs} +1 -1
  6. package/browser/cjs/{DeoOsY5TkIAydt9W.cjs → DQ1bXdi-D0uVKGFA.cjs} +2 -2
  7. package/browser/cjs/{Cg95aBJ4kuUq7jrz.cjs → Q234HX63V75h22HJ.cjs} +1 -1
  8. package/browser/cjs/{CUND2W1xMwqPOHwD.cjs → UoOVKSpyeYQ3Z04Y.cjs} +3 -3
  9. package/browser/cjs/{BCf8BQb2c8ANexW4.cjs → WN5FOSGC22Jy3dxz.cjs} +1 -1
  10. package/browser/cjs/index.cjs +2 -2
  11. package/browser/cjs/{Dcoq8P2O8-40waHl.cjs → rrppjlxhsrfwBStx.cjs} +2 -2
  12. package/browser/cjs/{Bf70UQlMT3b0NoOZ.cjs → zFlqPWNVl7CHv7Iw.cjs} +1 -1
  13. package/browser/esm/{7tCRjNmDM5kf3BFa.mjs → 5Fbp4sZTl6CHhmHk.mjs} +2 -2
  14. package/browser/esm/{BWxmPJd4f8qZMxaa.mjs → BD3NSZsAOvF6yczu.mjs} +3 -3
  15. package/browser/esm/{db-2uDA7mYS4QpHj.mjs → BiazW77hCkbuJPiW.mjs} +1 -1
  16. package/browser/esm/{CzdBzjYgP1i3pkPL.mjs → CUiplQS9rUodJwPi.mjs} +857 -857
  17. package/browser/esm/{DFppS_p4spncePDm.mjs → CagpAQXgCxrJrdGJ.mjs} +2 -2
  18. package/browser/esm/{CRDu7VFAa8NGcoHj.mjs → Ci4cqU4bR1IUSqrT.mjs} +1 -1
  19. package/browser/esm/{nzc1811Pk5-sKDu5.mjs → CoIXNZVIp9Q12qM2.mjs} +1 -1
  20. package/browser/esm/{BbHGWXif6ytyfyHI.mjs → Cp-QoTwVeQkQClpI.mjs} +1 -1
  21. package/browser/esm/{BkhHyCmy1MwVFS1b.mjs → D7PjwOCMi075qK5G.mjs} +2 -2
  22. package/browser/esm/{Cd02kMBZDsozIA98.mjs → Dx4t6SbPV2HSf_ub.mjs} +1 -1
  23. package/browser/esm/index.mjs +2 -2
  24. package/browser/esm/{Bo3cXzeDcP_Q9YvX.mjs → wenu-h35nL2_uEZp.mjs} +2 -2
  25. package/node/esm/{BVKo3uc0IreLNkkN.mjs → B21Usvp_sTqMHAZ4.mjs} +1 -1
  26. package/node/esm/{X3qO0PKREgY9FMZU.mjs → BAgtosqQwtrUsOYl.mjs} +1 -1
  27. package/node/esm/{rOozeXREjiU8jjPd.mjs → CYU-oRRhaNiOTVNa.mjs} +1 -1
  28. package/node/esm/{BnGsbrQwjcaUFAdt.mjs → Cfzjf7vBs29sO_g3.mjs} +1 -1
  29. package/node/esm/{BfnEq4EhLf8jJ0Gp.mjs → D1n7HgHfLVQZ0KhP.mjs} +1 -1
  30. package/node/esm/{CQhaL28vV1X6Xt2N.mjs → D60xUWK_BS-7PMLM.mjs} +1 -1
  31. package/node/esm/{BgR1PWucIb0Zucr4.mjs → DWhJA7EI9CmoBPDY.mjs} +1 -1
  32. package/node/esm/{BimlBylqyslj9fNg.mjs → DmdldJQanZCNdfA5.mjs} +1 -1
  33. package/node/esm/{DB2ryaj4_Y8Lgyy_.mjs → GzNLdpzukdCxYbbC.mjs} +1 -1
  34. package/node/esm/index.mjs +390 -390
  35. package/package.json +8 -8
  36. package/types/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.8
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -20,12 +20,12 @@ import { useFormContext as Kt } from "react-hook-form";
20
20
  import { ResizableBox as Gt } from "react-resizable";
21
21
  import { mergeRefs as Ut } from "react-merge-refs";
22
22
  import { useMeasure as _t } from "react-use";
23
- import { CommonUtils as jt, ChainedError as qt, ExpectedError as Xt, PartialError as Zt, UndoManager as Yt } from "@sheetxl/utils";
24
- import { CSSTransition as Qt } from "react-transition-group";
25
- import { useFullscreen as Jt } from "rooks";
26
- import { IOUtils as eo } from "@sheetxl/io";
27
- import { useSnackbar as to, SnackbarContent as oo, SnackbarProvider as no } from "notistack";
28
- const ao = $(O((e2, t2) => {
23
+ import { CommonUtils as jt, ChainedError as qt, ErrorUtils as Xt, ExpectedError as Zt, PartialError as Yt, UndoManager as Qt } from "@sheetxl/utils";
24
+ import { CSSTransition as Jt } from "react-transition-group";
25
+ import { useFullscreen as eo } from "rooks";
26
+ import { IOUtils as to } from "@sheetxl/io";
27
+ import { useSnackbar as oo, SnackbarContent as no, SnackbarProvider as ao } from "notistack";
28
+ const ro = $(O((e2, t2) => {
29
29
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = V(() => {
30
30
  for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3];
31
31
  return s2[0];
@@ -38,7 +38,7 @@ const ao = $(O((e2, t2) => {
38
38
  return Re({ ...e3, children: d3 });
39
39
  }, [r2, n2]);
40
40
  return z(Pe, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: m2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2?.key(), icon: d2?.icon() ?? "FormatAlignLeft", ...i2 });
41
- })), ro = $(O((e2, t2) => {
41
+ })), lo = $(O((e2, t2) => {
42
42
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = V(() => {
43
43
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
44
44
  return i2[0];
@@ -47,7 +47,7 @@ const ao = $(O((e2, t2) => {
47
47
  return Re({ ...e3, children: l3 });
48
48
  }, [r2, n2]);
49
49
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
50
- })), lo = $(O((e2, t2) => {
50
+ })), io = $(O((e2, t2) => {
51
51
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = V(() => {
52
52
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
53
53
  return i2[0];
@@ -56,7 +56,7 @@ const ao = $(O((e2, t2) => {
56
56
  return Re({ ...e3, children: l3 });
57
57
  }, [r2, n2, a2]);
58
58
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: d2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
59
- })), io = $(O((e2, t2) => {
59
+ })), so = $(O((e2, t2) => {
60
60
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = V(() => {
61
61
  const e3 = i2.length;
62
62
  for (let t3 = 0; t3 < e3; t3++) {
@@ -69,9 +69,9 @@ const ao = $(O((e2, t2) => {
69
69
  return Re({ ...e3, children: l3 });
70
70
  }, [r2, n2, a2, o2]), c2 = V(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
71
71
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: c2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d2, quickCommand: c2 ? "formatTextRotate0" : "formatTextRotate315", icon: s2?.icon() ?? "TextRotation315", ...l2 });
72
- })), so = { Preset: "preset", Custom: "custom" }, co = { Start: "start", End: "end" }, mo = {}, po = (e2, t2, o2, n2) => {
72
+ })), co = { Preset: "preset", Custom: "custom" }, mo = { Start: "start", End: "end" }, po = {}, uo = (e2, t2, o2, n2) => {
73
73
  const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
74
- if (mo[a2]) return mo[a2];
74
+ if (po[a2]) return po[a2];
75
75
  const r2 = ((e3, t3, o3, n3) => {
76
76
  if ("undefined" == typeof document && !n3) return null;
77
77
  const a3 = n3 ? new n3() : document.createElement("canvas");
@@ -79,11 +79,11 @@ const ao = $(O((e2, t2) => {
79
79
  const r3 = a3.getContext("2d");
80
80
  return r3 ? (r3.fillStyle = e3, r3.fillRect(0, 0, a3.width, a3.height), r3.fillStyle = t3, r3.fillRect(0, 0, o3, o3), r3.translate(o3, o3), r3.fillRect(0, 0, o3, o3), a3.toDataURL()) : null;
81
81
  })(e2, t2, o2, n2);
82
- return mo[a2] = r2, r2;
83
- }, uo = {}, go = $((e2) => {
84
- const { className: t2, style: o2 = ht.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = uo, children: d2, ...c2 } = e2, m2 = d2, p2 = V(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${po(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
82
+ return po[a2] = r2, r2;
83
+ }, go = {}, ho = $((e2) => {
84
+ const { className: t2, style: o2 = ht.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = go, children: d2, ...c2 } = e2, m2 = d2, p2 = V(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${uo(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
85
85
  return G(d2) ? W.cloneElement(d2, { ...m2.props }) : z("div", { style: p2, ...c2 });
86
- }), ho = $((e2) => {
86
+ }), fo = $((e2) => {
87
87
  const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = ht.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
88
88
  if (!t2) throw new Error("a selectedColor is required");
89
89
  const f2 = K((e3) => {
@@ -96,9 +96,9 @@ const ao = $(O((e2, t2) => {
96
96
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
97
97
  }, [n2, s2, t2]), w2 = K((e3) => {
98
98
  r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ft.Enter && o2?.(t2.toRGBA());
99
- }, [o2, r2, t2]), S2 = V(() => 1 === t2.toRGBA().alpha ? null : z(go, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
99
+ }, [o2, r2, t2]), S2 = V(() => 1 === t2.toRGBA().alpha ? null : z(ho, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
100
100
  return L("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: w2, onMouseOver: x2, onMouseLeave: b2, onFocus: y2, children: [S2, z("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
101
- }), fo = $((o2) => {
101
+ }), xo = $((o2) => {
102
102
  const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), x2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, b2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, y2 = [];
103
103
  y2.push({ [t.AdjustmentType.Inv]: true }), y2.push({ [t.AdjustmentType.Alpha]: 100 });
104
104
  const w2 = h2.adjust(y2), S2 = K(() => {
@@ -106,8 +106,8 @@ const ao = $(O((e2, t2) => {
106
106
  }, [i2, l2]), k2 = K((e2) => {
107
107
  s2?.(e2 ? l2 : null);
108
108
  }, [s2, l2]);
109
- return z(Me, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(ho, { selectedColor: h2, title: null, onSelectColor: S2, onPreviewColor: k2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [z("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: w2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x2 ? "1" : "0" } }), z("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: w2.toRGBA(u2).toString(), borderRadius: "50%", opacity: b2 ? "1" : "0" } })] }) }) });
110
- }), xo = $((e2) => {
109
+ return z(Me, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(fo, { selectedColor: h2, title: null, onSelectColor: S2, onPreviewColor: k2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [z("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: w2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x2 ? "1" : "0" } }), z("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: w2.toRGBA(u2).toString(), borderRadius: "50%", opacity: b2 ? "1" : "0" } })] }) }) });
110
+ }), bo = $((e2) => {
111
111
  const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = ht.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
112
112
  let u2;
113
113
  if (Array.isArray(n2[0])) u2 = n2;
@@ -125,7 +125,7 @@ const ao = $(O((e2, t2) => {
125
125
  let n3 = [], l3 = u2[t3];
126
126
  for (let e4 = 0; e4 < l3.length; e4++) {
127
127
  let i4 = l3[e4];
128
- n3.push(z(fo, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
128
+ n3.push(z(xo, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
129
129
  }
130
130
  let i3 = z(J, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
131
131
  e3.push(i3);
@@ -133,19 +133,19 @@ const ao = $(O((e2, t2) => {
133
133
  return e3;
134
134
  }, [u2, a2, r2, g2, h2]), x2 = V(() => t2 ? z(ee, { noWrap: true, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (e3) => e3.palette.text.secondary }, children: t2 }) : null, [t2]);
135
135
  return L(J, { style: { ...s2 }, children: [x2, z(J, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
136
- }), bo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), yo = (t2, o2, n2, a2, r2, l2) => {
137
- const i2 = bo(t2, o2);
136
+ }), yo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), wo = (t2, o2, n2, a2, r2, l2) => {
137
+ const i2 = yo(t2, o2);
138
138
  a2?.push(i2);
139
139
  const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
140
140
  r2?.set(d2, s2);
141
141
  const c2 = s2.toRGBA().toString();
142
142
  l2?.set(c2, s2);
143
- }, wo = W.lazy(() => import("./BfnEq4EhLf8jJ0Gp.mjs")), So = $(O((t2, a2) => {
144
- const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: k2 = "Automatic", autoColorPosition: C2 = co.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2, P2 = l2 || r2, D2 = gt(b2, [b2]), M2 = gt(y2, [y2]), F2 = gt(w2, [w2]), N2 = gt(f2, [f2]), B2 = gt(x2, [x2]), [E2, A2] = U(false), I2 = zt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
143
+ }, So = W.lazy(() => import("./D1n7HgHfLVQZ0KhP.mjs")), ko = $(O((t2, a2) => {
144
+ const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: k2 = "Automatic", autoColorPosition: C2 = mo.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2, P2 = l2 || r2, D2 = gt(b2, [b2]), M2 = gt(y2, [y2]), F2 = gt(w2, [w2]), N2 = gt(f2, [f2]), B2 = gt(x2, [x2]), [E2, A2] = U(false), I2 = zt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
145
145
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
146
- yo("Primary Background", "bg1", W2, n2, e2, t3), yo("Primary Text", "tx1", W2, n2, e2, t3), yo("Secondary Background", "bg2", W2, n2, e2, t3), yo("Secondary Text", "tx2", W2, n2, e2, t3), yo("Accent 1", "accent1", W2, n2, e2, t3), yo("Accent 2", "accent2", W2, n2, e2, t3), yo("Accent 3", "accent3", W2, n2, e2, t3), yo("Accent 4", "accent4", W2, n2, e2, t3), yo("Accent 5", "accent5", W2, n2, e2, t3), yo("Accent 6", "accent6", W2, n2, e2, t3);
146
+ wo("Primary Background", "bg1", W2, n2, e2, t3), wo("Primary Text", "tx1", W2, n2, e2, t3), wo("Secondary Background", "bg2", W2, n2, e2, t3), wo("Secondary Text", "tx2", W2, n2, e2, t3), wo("Accent 1", "accent1", W2, n2, e2, t3), wo("Accent 2", "accent2", W2, n2, e2, t3), wo("Accent 3", "accent3", W2, n2, e2, t3), wo("Accent 4", "accent4", W2, n2, e2, t3), wo("Accent 5", "accent5", W2, n2, e2, t3), wo("Accent 6", "accent6", W2, n2, e2, t3);
147
147
  const a3 = o.buildPalette(n2, W2, e2, t3), r3 = [];
148
- if (yo("Dark Red", "C00000", W2, r3, e2, t3), yo("Red", "FF0000", W2, r3, e2, t3), yo("Orange", "FFC000", W2, r3, e2, t3), yo("Yellow", "FFFF00", W2, r3, e2, t3), yo("Light Green", "92D050", W2, r3, e2, t3), yo("Green", "00B050", W2, r3, e2, t3), yo("Light Blue", "00B0F0", W2, r3, e2, t3), yo("Blue", "0070C0", W2, r3, e2, t3), yo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? yo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : yo("Transparent", "00000000", W2, r3, e2, t3), S2) {
148
+ if (wo("Dark Red", "C00000", W2, r3, e2, t3), wo("Red", "FF0000", W2, r3, e2, t3), wo("Orange", "FFC000", W2, r3, e2, t3), wo("Yellow", "FFFF00", W2, r3, e2, t3), wo("Light Green", "92D050", W2, r3, e2, t3), wo("Green", "00B050", W2, r3, e2, t3), wo("Light Blue", "00B0F0", W2, r3, e2, t3), wo("Blue", "0070C0", W2, r3, e2, t3), wo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? wo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : wo("Transparent", "00000000", W2, r3, e2, t3), S2) {
149
149
  const t4 = S2.toString();
150
150
  e2.set(t4, S2);
151
151
  }
@@ -163,7 +163,7 @@ const ao = $(O((e2, t2) => {
163
163
  G2((e2) => !e2);
164
164
  }, []);
165
165
  _(() => {
166
- if (m2) G2(m2 === so.Custom);
166
+ if (m2) G2(m2 === co.Custom);
167
167
  else if (r2) {
168
168
  let e2 = r2.toString(), t3 = $2.mapAllPresets.get(e2);
169
169
  t3 || (e2 = r2.toRGBA().toString(), t3 = $2.mapAllPresetsRGB.get(e2));
@@ -219,7 +219,7 @@ const ao = $(O((e2, t2) => {
219
219
  }, [$2, T2]), me2 = V(() => {
220
220
  if (!O2) return;
221
221
  const e2 = { opacity: O2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
222
- return z(j, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(wo, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
222
+ return z(j, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(So, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
223
223
  }, [O2, P2]), pe2 = V(() => ({ onClick: le2, alphaGrey: I2.palette.text.icon ?? I2.palette.action.active }), [le2, I2]), ue2 = V(() => {
224
224
  if (!S2) return null;
225
225
  const e2 = { description: k2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
@@ -227,17 +227,17 @@ const ao = $(O((e2, t2) => {
227
227
  re2(null);
228
228
  }, onClick: () => {
229
229
  se2(null);
230
- }, children: [z(J, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(fo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? S2 : r2, previewColor: null === l2 ? S2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, swatchProps: pe2 }) }), z(ee, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: k2 })] }) });
230
+ }, children: [z(J, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(xo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? S2 : r2, previewColor: null === l2 ? S2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, swatchProps: pe2 }) }), z(ee, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: k2 })] }) });
231
231
  }, [S2, k2, W2, r2, l2]);
232
- return L(J, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...R2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && C2 === co.Start ? L(H, { children: [ue2, z(ne, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(xo, { title: "Theme Colors", schemeColorLookup: W2, colorDefs: $2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(xo, { schemeColorLookup: W2, colorDefs: $2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(ne, { light: true, style: { marginBottom: "10px" } }), z(xo, { title: "Standard Colors", schemeColorLookup: W2, colorDefs: $2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), L("div", { style: { opacity: 0 === $2.recentColorsLimited.length ? "0" : void 0, display: 0 === $2.recentColorsLimited.length ? "none" : void 0 }, children: [z(ne, { light: true, style: { marginBottom: "10px" } }), z(xo, { title: "Recent Colors", schemeColorLookup: W2, colorDefs: $2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && C2 === co.End ? L(H, { children: [z(ne, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, z("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), z(ne, { light: true, style: { marginBottom: "10px" } }), L("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, z("div", { style: { flex: "1 1 100%", background: "pink" } }), z(ae, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
232
+ return L(J, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...R2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && C2 === mo.Start ? L(H, { children: [ue2, z(ne, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(bo, { title: "Theme Colors", schemeColorLookup: W2, colorDefs: $2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(bo, { schemeColorLookup: W2, colorDefs: $2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Standard Colors", schemeColorLookup: W2, colorDefs: $2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), L("div", { style: { opacity: 0 === $2.recentColorsLimited.length ? "0" : void 0, display: 0 === $2.recentColorsLimited.length ? "none" : void 0 }, children: [z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Recent Colors", schemeColorLookup: W2, colorDefs: $2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && C2 === mo.End ? L(H, { children: [z(ne, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, z("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), z(ne, { light: true, style: { marginBottom: "10px" } }), L("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, z("div", { style: { flex: "1 1 100%", background: "pink" } }), z(ae, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
233
233
  q2();
234
234
  }, children: z("div", O2 ? { children: "Preset" } : { children: "Custom" }) }), z(ae, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
235
235
  Promise.resolve(h2?.()).then(() => {
236
236
  ie2(Z2);
237
237
  });
238
238
  }, children: "Done" })] })] });
239
- })), ko = z(xt, { iconKey: "circle.colored" }), Co = $(O((e2, t2) => {
240
- const { selectedColor: o2, quickColor: n2, icon: a2 = ko, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ne.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = gt(i2, [i2]), x2 = gt(s2, [s2]), b2 = gt(d2, [d2]), [y2, w2] = U(() => {
239
+ })), Co = z(xt, { iconKey: "circle.colored" }), vo = $(O((e2, t2) => {
240
+ const { selectedColor: o2, quickColor: n2, icon: a2 = Co, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ne.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = gt(i2, [i2]), x2 = gt(s2, [s2]), b2 = gt(d2, [d2]), [y2, w2] = U(() => {
241
241
  }), S2 = n2 || (y2 || o2) || m2?.autoColor, k2 = q(false), C2 = K(() => {
242
242
  }, []), v2 = gt(() => {
243
243
  w2(o2);
@@ -251,21 +251,21 @@ const ao = $(O((e2, t2) => {
251
251
  b2?.(n2, false);
252
252
  }, [b2, n2]), [F2, N2] = U(false), B2 = K((e3) => {
253
253
  const { closeFloat: t3, closeFloatAll: n3 } = e3;
254
- return z(So, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
254
+ return z(ko, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
255
255
  e4.which === ft.Enter && (p2 ? n3() : t3());
256
256
  }, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: P2, onEyeDropStart: () => N2(true), onEyeDropStop: () => N2(false), compareRGB: u2, darkMode: g2 });
257
257
  }, [o2, y2, p2, S2, m2?.autoColor, g2]), E2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: B2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: D2, ...h2 };
258
258
  return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
259
- })), vo = 82, To = (e2) => {
260
- const { styleColor: t2, length: o2 = vo, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
259
+ })), To = 82, Ro = (e2) => {
260
+ const { styleColor: t2, length: o2 = To, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
261
261
  return z(re, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: z(x, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
262
- }, Ro = $(O((e2, t2) => {
262
+ }, Po = $(O((e2, t2) => {
263
263
  const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = gt(d2, []), h2 = K((e3) => {
264
264
  const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
265
265
  for (let e4 = 0; e4 < u3.length; e4++) {
266
266
  const t4 = u3[e4];
267
267
  if ("None" === t4.description && !c2) continue;
268
- const a2 = z(To, { styleColor: i2, length: vo, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
268
+ const a2 = z(Ro, { styleColor: i2, length: To, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
269
269
  let d4 = null;
270
270
  d4 = n2 ? L(H, { children: [z(J, { sx: { marginRight: "6px" }, children: t4.description }), L(J, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [z("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(z(Ae, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ie(4) }, paddingLeft: "16px", background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
271
271
  l3(), g2(t4.style);
@@ -277,10 +277,10 @@ const ao = $(O((e2, t2) => {
277
277
  }, [r2, c2, i2, s2, m2]), f2 = V(() => {
278
278
  const e3 = a.BuiltInDefinitions.get(s2);
279
279
  let t3;
280
- return t3 = "None" === e3.description ? z(J, { sx: { minWidth: `${vo}px` }, children: "None" }) : z(To, { styleColor: i2, length: vo, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), z(J, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ie() } }, children: t3 });
280
+ return t3 = "None" === e3.description ? z(J, { sx: { minWidth: `${To}px` }, children: "None" }) : z(Ro, { styleColor: i2, length: To, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), z(J, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ie() } }, children: t3 });
281
281
  }, [s2, i2]), x2 = V(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
282
282
  return o2 === Ne.Toolbar ? z(Be, { ...b2 }) : z(Ee, { ...b2 });
283
- })), Po = $(O((t2, o2) => {
283
+ })), Do = $(O((t2, o2) => {
284
284
  const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = gt(c2, [c2]), f2 = gt(m2, [m2]), [x2, y2] = U(), [w2, S2] = U(), k2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = gt((e2) => {
285
285
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
286
286
  let n3 = false;
@@ -316,17 +316,17 @@ const ao = $(O((e2, t2) => {
316
316
  return z(ze, { icon: T2(i3), sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
317
317
  o3(), D2(l4), P2(l4);
318
318
  } });
319
- }, m3 = L(H, { children: [L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = z(H, { children: L(J, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [z(Co, { variant: Ne.Toolbar, icon: z(xt, { iconKey: "stroke.colored" }), selectedColor: k2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
319
+ }, m3 = L(H, { children: [L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = z(H, { children: L(J, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [z(vo, { variant: Ne.Toolbar, icon: z(xt, { iconKey: "stroke.colored" }), selectedColor: k2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
320
320
  S2(e2);
321
321
  }, onSelectColor: (e2, t4) => {
322
322
  S2(e2);
323
- }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || k2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(Ro, { selectedStyle: k2, onSelectStyle: y2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
323
+ }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || k2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(Po, { selectedStyle: k2, onSelectStyle: y2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
324
324
  return L(J, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, z(Te, { orientation: "horizontal" }), d2 ? m3 : p3] });
325
325
  }, [k2, C2, n2, r2, s2]), F2 = V(() => T2(v2), [v2, s2]);
326
326
  return z(Be, { ref: o2, createPopupPanel: M2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(He, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
327
327
  h2?.(v2);
328
328
  }, quickButtonProps: { sx: {} }, disabled: i2, icon: F2, ...g2 });
329
- })), Do = $(O((e2, t2) => {
329
+ })), Mo = $(O((e2, t2) => {
330
330
  const { commands: o2, command: n2, commandHook: a2, variant: r2 = ut.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, x2 = pt(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, S2 = y2?.autoStyle ?? s2, k2 = m2 ?? y2?.quickBorder, C2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, R2 = gt((e3) => {
331
331
  y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
332
332
  }, [b2, p2, a2]), P2 = K((e3, t3) => {
@@ -334,26 +334,26 @@ const ao = $(O((e2, t2) => {
334
334
  let i3 = e3.children;
335
335
  return (b2?.disabled() || l2) && (i3 = z("div", { children: i3 })), z(We, { command: b2, placement: r2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
336
336
  }, [b2, l2]);
337
- return z(Po, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: k2, onSelectBorder: R2, createTooltip: P2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
338
- })), Mo = $(O((e2, t2) => {
337
+ return z(Do, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: k2, onSelectBorder: R2, createTooltip: P2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
338
+ })), Fo = $(O((e2, t2) => {
339
339
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
340
340
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("mergeToggle") }), z(ve, { ...o3, command: t3.getCommand("mergeHorizontal") }), z(ve, { ...o3, command: t3.getCommand("mergeVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unmerge") })] });
341
341
  return Re({ ...e3, children: l3 });
342
342
  }, [r2, n2, a2]);
343
343
  return z(Pe, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
344
- })), Fo = $(O((e2, t2) => {
344
+ })), No = $(O((e2, t2) => {
345
345
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
346
346
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("freezeToggle") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleHorizontal") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unfreeze") })] });
347
347
  return Re({ ...e3, children: l3 });
348
348
  }, [r2, n2, a2]);
349
349
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, 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", ...l2 });
350
- })), No = $(O((e2, t2) => {
350
+ })), Bo = $(O((e2, t2) => {
351
351
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
352
352
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("find") }), z(ve, { ...o3, command: t3.getCommand("findReplace") }), z(ve, { ...o3, command: t3.getCommand("goto") })] });
353
353
  return Re({ ...e3, children: l3 });
354
354
  }, [r2, n2, a2]);
355
355
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...l2 });
356
- })), Bo = $(O((e2, t2) => {
356
+ })), Eo = $(O((e2, t2) => {
357
357
  const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = y.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
358
358
  bt(o2);
359
359
  const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = U(g2), x2 = gt(() => {
@@ -405,7 +405,7 @@ const ao = $(O((e2, t2) => {
405
405
  return Re({ ...e3, children: l3 });
406
406
  }, [s2, o2?.state(), n2]);
407
407
  return z(Be, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...u2 });
408
- })), Eo = $((e2) => {
408
+ })), Ao = $((e2) => {
409
409
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: i2, ...s2 } = e2;
410
410
  return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? z($e, {}) : void 0, onMouseDown: (e3) => {
411
411
  0 === e3.button && e3.preventDefault();
@@ -414,7 +414,7 @@ const ao = $(O((e2, t2) => {
414
414
  }, onKeyDown: (e3) => {
415
415
  e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(r2.numberFormat);
416
416
  }, ...s2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(ee, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => Vt(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
417
- }), Ao = $(O((e2, t2) => {
417
+ }), Io = $(O((e2, t2) => {
418
418
  const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = pt(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = V(() => {
419
419
  if (!n2) return null;
420
420
  const e3 = { ...n2 };
@@ -432,9 +432,9 @@ const ao = $(O((e2, t2) => {
432
432
  }
433
433
  "" === t4 && i3[e4].formatType === l.Type.General && (t4 = "No specific format");
434
434
  const n3 = i3[e4].formatType === p2;
435
- d3.push(z(Eo, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
435
+ d3.push(z(Ao, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
436
436
  }
437
- const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = z(Eo, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
437
+ const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = z(Ao, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
438
438
  n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
439
439
  }, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), x2 = L(J, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ve, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2 })] }), b2 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), f3] });
440
440
  return Re({ ...e3, children: b2 });
@@ -443,19 +443,19 @@ const ao = $(O((e2, t2) => {
443
443
  return `${r.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
444
444
  }, [h2]);
445
445
  return z(Pe, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
446
- })), Io = $(O((e2, t2) => {
446
+ })), Lo = $(O((e2, t2) => {
447
447
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
448
448
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("clearAll") }), z(ve, { ...o3, command: t3.getCommand("clearFormats") }), z(ve, { ...o3, command: t3.getCommand("clearContents") }), z(ve, { ...o3, command: t3.getCommand("clearComments") }), z(ve, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
449
449
  return Re({ ...e3, children: a3 });
450
450
  }, [r2, n2, a2]);
451
451
  return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: "ClearAll", ...l2 });
452
- })), Lo = $(O((e2, t2) => {
452
+ })), Ho = $(O((e2, t2) => {
453
453
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
454
454
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("fillDown") }), z(ve, { ...o3, command: t3.getCommand("fillRight") }), z(ve, { ...o3, command: t3.getCommand("fillUp") }), z(ve, { ...o3, command: t3.getCommand("fillLeft") })] });
455
455
  return Re({ ...e3, children: a3 });
456
456
  }, [r2, n2, a2]);
457
457
  return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: "FillDown", ...l2 });
458
- })), Ho = $(O((e2, t2) => {
458
+ })), zo = $(O((e2, t2) => {
459
459
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = pt(o2, ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"]), { singleCommand: p2, allDisabled: u2 } = V(() => {
460
460
  let e3 = null, t3 = 0;
461
461
  for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
@@ -468,7 +468,7 @@ const ao = $(O((e2, t2) => {
468
468
  return Re({ ...e3, children: i3 });
469
469
  }, [r2, m2, n2, a2]);
470
470
  return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, tooltip: L(H, { children: [z("span", { children: "Insert new cells, rows or columns to your workbook." }), z("br", {}), z("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: g2, ...c2 });
471
- })), zo = $(O((e2, t2) => {
471
+ })), Wo = $(O((e2, t2) => {
472
472
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = pt(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = V(() => {
473
473
  let e3 = null, t3 = 0;
474
474
  for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
@@ -481,7 +481,7 @@ const ao = $(O((e2, t2) => {
481
481
  return Re({ ...e3, children: i3 });
482
482
  }, [r2, n2, a2]);
483
483
  return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, tooltip: L(H, { children: [z("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), z("br", {}), z("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: g2, ...c2 });
484
- })), Wo = $(O((t2, o2) => {
484
+ })), $o = $(O((t2, o2) => {
485
485
  const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = ut.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...x2 } = d2;
486
486
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
487
487
  bt(n2);
@@ -495,28 +495,28 @@ const ao = $(O((e2, t2) => {
495
495
  let s3 = e2.children;
496
496
  return (n2?.disabled() || l2) && (s3 = z("div", { children: s3 })), z(We, { command: n2, placement: i2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
497
497
  }, [n2, l2]);
498
- return z(Co, { ref: o2, panelProps: v2, icon: p2, quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
498
+ return z(vo, { ref: o2, panelProps: v2, icon: p2, quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
499
499
  }));
500
- Wo.displayName = "ColorCommandButton";
501
- const $o = $(O((e2, t2) => {
500
+ $o.displayName = "ColorCommandButton";
501
+ const Oo = $(O((e2, t2) => {
502
502
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = K((e3, t3) => {
503
- const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("gridlinesToggle") }), z(Wo, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true } }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
503
+ const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("gridlinesToggle") }), z($o, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true } }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
504
504
  return Re({ ...e3, children: l3 });
505
505
  }, [r2, n2]);
506
506
  return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: z(Oe, { command: s2[0], scope: "view" }), ...i2 });
507
- })), Oo = $(O((e2, t2) => {
507
+ })), Vo = $(O((e2, t2) => {
508
508
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
509
509
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sortAscending") }), z(ve, { ...o3, command: t3.getCommand("sortDescending") }), a3 ? z(ve, { ...o3, command: a3 }) : null, z(Te, { orientation: "horizontal" }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
510
510
  return Re({ ...e3, children: l3 });
511
511
  }, [r2, n2, a2]);
512
512
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "SortIncrease", ...l2 });
513
- })), Vo = $(O((e2, t2) => {
513
+ })), Ko = $(O((e2, t2) => {
514
514
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
515
515
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
516
516
  return Re({ ...e3, children: a3 });
517
517
  }, [r2, n2, a2]);
518
518
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "FilterToggle", ...l2 });
519
- })), Ko = $(O((e2, t2) => {
519
+ })), Go = $(O((e2, t2) => {
520
520
  const { quickCommand: o2, icon: n2, isRedo: a2 = false, nestRedo: r2 = true, undoManager: l2, scope: i2, sx: s2, disabled: d2, commands: c2, ...m2 } = e2, p2 = [o2];
521
521
  !a2 && r2 && p2.push("redo");
522
522
  const u2 = pt(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
@@ -553,7 +553,7 @@ const $o = $(O((e2, t2) => {
553
553
  let c3 = null;
554
554
  if (!a2 && r2) {
555
555
  const o4 = { scope: "undo", commands: t3, variant: ut.Menuitem, parentFloat: e3.floatReference };
556
- c3 = [], c3.push(z(Ko, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(Te, { orientation: "horizontal" }, "action:redo-div"));
556
+ c3 = [], c3.push(z(Go, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(Te, { orientation: "horizontal" }, "action:redo-div"));
557
557
  }
558
558
  const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
559
559
  e3.closeFloatAll();
@@ -563,17 +563,17 @@ const $o = $(O((e2, t2) => {
563
563
  return Re({ ...e3, children: m3 });
564
564
  }, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
565
565
  return z(Pe, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: z(H, { children: z("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? (a2 ? "Redo" : "Undo"), selected: false, ...m2 });
566
- })), Go = i.getFontList(), Uo = /* @__PURE__ */ new Map();
567
- for (let e2 = 0; e2 < Go.length; e2++) Uo.set(Go[e2].fontRef.getFamily(), Go[e2]);
568
- const _o = $(O((e2, t2) => {
566
+ })), Uo = i.getFontList(), _o = /* @__PURE__ */ new Map();
567
+ for (let e2 = 0; e2 < Uo.length; e2++) _o.set(Uo[e2].fontRef.getFamily(), Uo[e2]);
568
+ const jo = $(O((e2, t2) => {
569
569
  const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
570
570
  bt(o2);
571
571
  const m2 = o2?.state(), p2 = zt(), u2 = V(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = K((e3) => {
572
572
  const t3 = (e4) => {
573
573
  o2?.execute(e4, n2);
574
574
  }, a3 = [];
575
- for (let e4 = 0; e4 < Go.length; e4++) a3.push({ key: Go[e4].fontRef.getFamily(), description: Go[e4].fontRef.getFamily() });
576
- Uo.get(m2) || a3.unshift({ key: m2, description: m2 });
575
+ for (let e4 = 0; e4 < Uo.length; e4++) a3.push({ key: Uo[e4].fontRef.getFamily(), description: Uo[e4].fontRef.getFamily() });
576
+ _o.get(m2) || a3.unshift({ key: m2, description: m2 });
577
577
  const r2 = [];
578
578
  for (let e4 = 0; e4 < a3.length; e4++) {
579
579
  const n3 = a3[e4].key === m2;
@@ -589,7 +589,7 @@ const _o = $(O((e2, t2) => {
589
589
  return Re({ ...e3, children: i3 });
590
590
  }, [l2, o2?.state()]);
591
591
  return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
592
- })), jo = $(O((e2, t2) => {
592
+ })), qo = $(O((e2, t2) => {
593
593
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = V(() => {
594
594
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
595
595
  return i2[0];
@@ -598,7 +598,7 @@ const _o = $(O((e2, t2) => {
598
598
  return Re({ ...e3, children: a3 });
599
599
  }, [r2, n2, a2]);
600
600
  return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s2?.icon() ?? "TextStrike", ...l2 });
601
- })), qo = $(O((e2, t2) => {
601
+ })), Xo = $(O((e2, t2) => {
602
602
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
603
603
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
604
604
  return i2[0];
@@ -607,37 +607,37 @@ const _o = $(O((e2, t2) => {
607
607
  return Re({ ...e3, children: a3 });
608
608
  }, [r2, n2, a2]);
609
609
  return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: s2?.icon() ?? "TextUnderline", ...l2 });
610
- })), Xo = $(O((e2, t2) => {
610
+ })), Zo = $(O((e2, t2) => {
611
611
  const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = gt((e3, t3) => {
612
612
  const o3 = { variant: ut.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
613
613
  return l2 && (n3.push(X(ve, { ...o3, command: t3.getCommand("paste"), key: "paste" })), n3.push(z(Te, { orientation: "horizontal" }, "paste-div"))), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks" })), Re({ ...e3, children: n3 });
614
614
  }, [i2, a2, r2, l2]);
615
615
  return z(Pe, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: "paste", ...s2 });
616
- })), Zo = $(O((e2, t2) => {
616
+ })), Yo = $(O((e2, t2) => {
617
617
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = K((e3, t3) => {
618
618
  const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
619
619
  return Re({ ...e3, children: l3 });
620
620
  }, [r2, n2, a2]);
621
621
  return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: z(Oe, { command: s2[0], scope: "view" }), ...i2 });
622
- })), Yo = $(O((e2, t2) => {
622
+ })), Qo = $(O((e2, t2) => {
623
623
  const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = K((e3) => {
624
624
  const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
625
625
  return Re({ ...e3, children: l3 });
626
626
  }, [r2, o2, n2, a2]);
627
627
  return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: z(Oe, { icon: null, label: "Workbook View" }), ...l2 });
628
- })), Qo = $(O((e2, t2) => {
628
+ })), Jo = $(O((e2, t2) => {
629
629
  const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = V(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = V(() => p2.getStyle(), [p2, l2]), g2 = V(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), x2 = K(() => u2.getBorder(), [u2]);
630
630
  return z(J, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(b, { getBorderAt: x2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...s2?.style }, ...s2, children: z(J, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: z(J, { className: "text", children: o2 }) }) }) });
631
- })), Jo = $((e2) => {
631
+ })), en = $((e2) => {
632
632
  const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = K((e3) => {
633
633
  const t3 = { variant: ut.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = L(H, { children: [z(ve, { ...t3, style: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), z(ve, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
634
634
  return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
635
635
  }, []), h2 = o2?.getName() === n2?.getName();
636
636
  let f2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${h2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
637
637
  l2?.(o2);
638
- }, ...u2, children: z(Qo, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
638
+ }, ...u2, children: z(Jo, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
639
639
  return a2 && (f2 = z(Ke, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
640
- }), en = $(O((e2, t2) => {
640
+ }), tn = $(O((e2, t2) => {
641
641
  const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
642
642
  bt(n2);
643
643
  const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = gt((e3) => {
@@ -647,7 +647,7 @@ const _o = $(O((e2, t2) => {
647
647
  for (let e4 = 0; e4 < r2.length; e4++) l3.set(r2[e4].getName(), r2[e4]), null === g2().getNamed(r2[e4].getName()).getBuiltInID() && i3.push(r2[e4].getName());
648
648
  const c3 = (e4) => {
649
649
  let t4 = l3.get(e4);
650
- return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(Jo, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
650
+ return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(en, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
651
651
  }, m3 = (e4, t4, o3 = true) => {
652
652
  const n4 = [];
653
653
  for (let e5 = 0; e5 < t4.length; e5++) {
@@ -671,10 +671,10 @@ const _o = $(O((e2, t2) => {
671
671
  }, [h2, g2?.().getTheme(), f2]), y2 = gt((e3) => {
672
672
  const t3 = 18 / r.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
673
673
  return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
674
- }, [u2?.createTemporaryCell]), w2 = d2 || !n2 || n2.disabled(), S2 = V(() => u2 && m2 ? z(Qo, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: y2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: w2, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
674
+ }, [u2?.createTemporaryCell]), w2 = d2 || !n2 || n2.disabled(), S2 = V(() => u2 && m2 ? z(Jo, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: y2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: w2, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
675
675
  return z(Pe, { ref: t2, createPopupPanel: b2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: w2, label: n2?.label(), icon: S2, ...p2 });
676
- })), tn = "_sheetxl-reset_11z3j_1", on = 10, nn = $(O((e2, t2) => {
677
- const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = on, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = Z((e3) => e3 + 1, 0);
676
+ })), on = "_sheetxl-reset_11z3j_1", nn = 10, an = $(O((e2, t2) => {
677
+ const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = nn, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = Z((e3) => e3 + 1, 0);
678
678
  _(() => {
679
679
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
680
680
  f2();
@@ -707,10 +707,10 @@ const _o = $(O((e2, t2) => {
707
707
  }
708
708
  return t3;
709
709
  }, [x2, a2, r2]), S2 = K((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
710
- return z(J, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(b, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", tn), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
711
- })), an = (e2, t2, o2, n2, a2) => {
710
+ return z(J, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(b, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", on), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
711
+ })), rn = (e2, t2, o2, n2, a2) => {
712
712
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
713
- }, rn = $(O((e2, t2) => {
713
+ }, ln = $(O((e2, t2) => {
714
714
  const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = V(() => {
715
715
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
716
716
  return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: a2 });
@@ -740,24 +740,24 @@ const _o = $(O((e2, t2) => {
740
740
  const r3 = g2[5 * e4 + a3], l3 = a3 * o3, i3 = 9 * e4, s3 = r3.getBorder();
741
741
  if (!s3.isEmpty()) {
742
742
  const a4 = s3.getLeft();
743
- a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), an(t3, l3, i3, l3, i3 + 9));
743
+ a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3, i3 + 9));
744
744
  const r4 = s3.getTop();
745
- r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), an(t3, l3, i3, l3 + o3, 9 * e4));
745
+ r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3 + o3, 9 * e4));
746
746
  const d4 = s3.getRight();
747
- d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), an(t3, l3 + o3, i3, l3 + o3, i3 + 9));
747
+ d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), rn(t3, l3 + o3, i3, l3 + o3, i3 + 9));
748
748
  const c3 = s3.getBottom();
749
- c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), an(t3, l3, i3 + 9, l3 + o3, i3 + 9));
749
+ c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), rn(t3, l3, i3 + 9, l3 + o3, i3 + 9));
750
750
  }
751
751
  t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
752
752
  const d3 = 4, c2 = 2.5;
753
- an(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
753
+ rn(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
754
754
  }
755
755
  return `url(${e3.toDataURL()})`;
756
756
  }, [d2, u2, n2, r2]);
757
757
  return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
758
- })), ln = "_table-style-options-container_1kfn2_1", sn = "_table-style-options_1kfn2_1", dn = $(O((e2, t2) => {
758
+ })), sn = "_table-style-options-container_1kfn2_1", dn = "_table-style-options_1kfn2_1", cn = $(O((e2, t2) => {
759
759
  const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, className: m2, disabled: p2, ...u2 } = e2;
760
- return z("div", { className: ln, children: L(J, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...u2, ref: t2, className: mt(m2, sn), children: [r2 && z(ie, { control: z(se, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: p2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(ie, { control: z(se, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: p2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
760
+ return z("div", { className: sn, children: L(J, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...u2, ref: t2, className: mt(m2, dn), children: [r2 && z(ie, { control: z(se, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: p2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(ie, { control: z(se, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: p2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
761
761
  n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
762
762
  } }), label: "Banded Rows", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
763
763
  n2?.({ ...o2, showFirstColumn: !o2?.showFirstColumn });
@@ -766,7 +766,7 @@ const _o = $(O((e2, t2) => {
766
766
  } }), label: "Last Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
767
767
  n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
768
768
  } }), label: "Banded Columns", labelPlacement: "end" }), d2 && z(ie, { control: z(se, { checked: s2 ?? false, indeterminate: null == s2, disabled: p2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] }) });
769
- })), cn = "_range-row_akhf4_1", mn = "_action-row_akhf4_15", pn = $(O((e2, t2) => {
769
+ })), mn = "_range-row_akhf4_1", pn = "_action-row_akhf4_15", un = $(O((e2, t2) => {
770
770
  const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Kt(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = U(""), [b2, y2] = U(""), [w2, S2] = U(i2);
771
771
  _(() => {
772
772
  S2(i2), y2("");
@@ -792,17 +792,17 @@ const _o = $(O((e2, t2) => {
792
792
  e3.stopPropagation();
793
793
  } }) });
794
794
  }));
795
- pn.displayName = "NamedInput";
796
- const un = (e2) => null === e2 ? "" : e2.toString(), gn = $(O((e2, t2) => {
797
- const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Kt(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = U(""), [x2, b2] = U(false), [y2, w2] = U(() => un(d2));
795
+ un.displayName = "NamedInput";
796
+ const gn = (e2) => null === e2 ? "" : e2.toString(), hn = $(O((e2, t2) => {
797
+ const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Kt(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = U(""), [x2, b2] = U(false), [y2, w2] = U(() => gn(d2));
798
798
  _(() => {
799
- w2(un(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
799
+ w2(gn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
800
800
  }, [d2]);
801
801
  const S2 = gt((e3) => {
802
802
  let t3 = "";
803
803
  try {
804
804
  w2(e3);
805
- const t4 = un(d2), o3 = m2(e3);
805
+ const t4 = gn(d2), o3 = m2(e3);
806
806
  o3.toString() !== t4 && c2?.(o3);
807
807
  } catch (e4) {
808
808
  t3 = "Invalid Range";
@@ -810,7 +810,7 @@ const un = (e2) => null === e2 ? "" : e2.toString(), gn = $(O((e2, t2) => {
810
810
  o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), b2(true);
811
811
  }, [y2, c2, o2, u2]), k2 = gt(async (e3) => {
812
812
  if (x2 && e3.keyCode === ft.Escape) {
813
- const t3 = un(d2);
813
+ const t3 = gn(d2);
814
814
  w2(t3), f2(""), b2(false), e3.stopPropagation();
815
815
  }
816
816
  s2?.(e3);
@@ -825,28 +825,28 @@ const un = (e2) => null === e2 ? "" : e2.toString(), gn = $(O((e2, t2) => {
825
825
  e3.stopPropagation();
826
826
  } }) });
827
827
  }));
828
- gn.displayName = "RangeInput";
829
- const hn = [];
830
- hn.push(bo("Primary Background", "bg1")), hn.push(bo("Primary Text", "tx1")), hn.push(bo("Secondary Background", "bg2")), hn.push(bo("Secondary Text", "tx2")), hn.push(bo("Accent 1", "accent1")), hn.push(bo("Accent 2", "accent2")), hn.push(bo("Accent 3", "accent3")), hn.push(bo("Accent 4", "accent4")), hn.push(bo("Accent 5", "accent5")), hn.push(bo("Accent 6", "accent6"));
831
- const fn = (e2) => {
828
+ hn.displayName = "RangeInput";
829
+ const fn = [];
830
+ fn.push(yo("Primary Background", "bg1")), fn.push(yo("Primary Text", "tx1")), fn.push(yo("Secondary Background", "bg2")), fn.push(yo("Secondary Text", "tx2")), fn.push(yo("Accent 1", "accent1")), fn.push(yo("Accent 2", "accent2")), fn.push(yo("Accent 3", "accent3")), fn.push(yo("Accent 4", "accent4")), fn.push(yo("Accent 5", "accent5")), fn.push(yo("Accent 6", "accent6"));
831
+ const xn = (e2) => {
832
832
  const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = zt(), d2 = V(() => {
833
833
  let e3 = [];
834
- for (let o3 = 0; o3 < hn.length; o3++) {
835
- const a3 = hn[o3];
836
- e3.push(z(fo, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
834
+ for (let o3 = 0; o3 < fn.length; o3++) {
835
+ const a3 = fn[o3];
836
+ e3.push(z(xo, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
837
837
  }
838
838
  return z(J, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: z(J, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
839
839
  }, [t2, s2]);
840
840
  return z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${a2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: L(J, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => a2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [z(J, { sx: {}, children: t2.getName() }), L(J, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, z(J, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: z(Me, { disableInteractive: true, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } } }, title: z("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
841
841
  The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: z("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
842
- }, xn = $(O((e2, t2) => {
842
+ }, bn = $(O((e2, t2) => {
843
843
  const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = V(() => {
844
844
  const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
845
845
  if (0 === e3.length) return z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
846
846
  const r3 = e3.length;
847
847
  for (let o3 = 0; o3 < r3; o3++) {
848
848
  const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
849
- d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(Te, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(fn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
849
+ d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(Te, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(xn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
850
850
  0 === e4.button && e4.preventDefault();
851
851
  }, onMouseUp: (e4) => {
852
852
  0 === e4.button && a2(r4);
@@ -857,15 +857,15 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
857
857
  return t3;
858
858
  }, [n2, a2, i2]);
859
859
  return z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: L(J, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), z(Te, {}), z(J, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
860
- })), bn = $(O((e2, t2) => {
860
+ })), yn = $(O((e2, t2) => {
861
861
  const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Ne.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || z(xt, { iconKey: "Theme2" }), u2 = { createPopupPanel: K((e3) => {
862
862
  const { closeFloatAll: t3 } = e3;
863
- return z(xn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
863
+ return z(bn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
864
864
  e4.which === ft.Enter && t3();
865
865
  } });
866
866
  }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
867
867
  return s2 === Ne.Toolbar ? z(Be, { ref: t2, ...u2 }) : z(Ee, { ref: t2, ...u2 });
868
- })), yn = $(O((e2, t2) => {
868
+ })), wn = $(O((e2, t2) => {
869
869
  const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = U(() => o2.getView().getZoomScale()), [m2, p2] = U(null), u2 = q(0);
870
870
  w(o2, { onViewChange: () => {
871
871
  p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
@@ -912,8 +912,8 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
912
912
  g2(100);
913
913
  }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: T2 }, children: z("div", { children: Math.round(d2) + "%" }) })] })] });
914
914
  }));
915
- yn.displayName = "SheetZoomScale";
916
- const wn = $(O((e2, t2) => {
915
+ wn.displayName = "SheetZoomScale";
916
+ const Sn = $(O((e2, t2) => {
917
917
  const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
918
918
  Y(t2, () => ({}));
919
919
  const s2 = q(null);
@@ -927,10 +927,10 @@ const wn = $(O((e2, t2) => {
927
927
  const e3 = d2.getMode();
928
928
  return e3?.description ? e3.description : "Ready";
929
929
  }, [d2]), [m2, p2] = U(false);
930
- return L(J, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(J, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(yn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
930
+ return L(J, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(J, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(wn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
931
931
  }));
932
- wn.displayName = "StatusBar";
933
- const Sn = $(O((e2, t2) => {
932
+ Sn.displayName = "StatusBar";
933
+ const kn = $(O((e2, t2) => {
934
934
  const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...u2 } = e2, g2 = St(), [h2, f2] = U(null), [x2, b2] = U(() => l2.getSelectedRanges().getCoords()), [y2, S2] = U(false), { reference: k2 } = _e({ parentFloat: c2?.parentFloat }), [C2, v2] = U(() => s2 || !l2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2, P2] = U(T2), D2 = gt(() => {
935
935
  if (k2?.closeAll(), !R2) {
936
936
  const e4 = T2();
@@ -1055,9 +1055,9 @@ const Sn = $(O((e2, t2) => {
1055
1055
  } }), []);
1056
1056
  return z(J, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ut([j2, t2]), ...u2, children: z(Be, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2) }, parentFloat: k2, createPopupPanel: G2, onPopupOpen: () => S2(true), onPopupClose: () => S2(false), createTooltip: ({ children: e3 }, t3) => z(He, { title: t3 || y2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || y2 ? 0 : 1 }, children: e3 }), createQuickButton: O2 }) });
1057
1057
  }));
1058
- Sn.displayName = "NamedCollectionEditor";
1059
- const kn = (e2, t2) => z(Sn, { ref: t2, ...e2 }), Cn = $(O((e2, t2) => {
1060
- const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = kn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = U(n2?.getSelectedSheet());
1058
+ kn.displayName = "NamedCollectionEditor";
1059
+ const Cn = (e2, t2) => z(kn, { ref: t2, ...e2 }), vn = $(O((e2, t2) => {
1060
+ const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Cn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = U(n2?.getSelectedSheet());
1061
1061
  w(n2, { onSheetsChange: (e3) => {
1062
1062
  g2(e3?.getSelectedSheet());
1063
1063
  }, onViewChange(e3) {
@@ -1103,9 +1103,9 @@ const kn = (e2, t2) => z(Sn, { ref: t2, ...e2 }), Cn = $(O((e2, t2) => {
1103
1103
  a2.submitEdit();
1104
1104
  } }), z(ze, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: z(xt, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1105
1105
  0 === e3.button && e3.preventDefault();
1106
- } })] }), [b2, I2]), G2 = zt(), [_2, j2] = U(false), X2 = V(() => L(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [K2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * r.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, minHeight: "calc(100% - 2px)", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => b2 ? `${e3.palette.text.disabled} !important` : e3.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: () => j2(true), onBlur: () => j2(false), onMouseDown: (e3) => {
1106
+ } })] }), [b2, I2]), G2 = zt(), [_2, j2] = U(false), X2 = V(() => L(J, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [K2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * r.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => b2 ? `${e3.palette.text.disabled} !important` : e3.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: () => j2(true), onBlur: () => j2(false), onMouseDown: (e3) => {
1107
1107
  e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
1108
- }, children: [z(J, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Gt, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: B2, onResizeStop: N2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: W2 }) }), z(ze, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: z(xt, { iconKey: M2 > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (M2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1108
+ }, children: [z(J, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "-1px", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Gt, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: B2, onResizeStop: N2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: W2 }) }), z(ze, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: z(xt, { iconKey: M2 > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (M2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1109
1109
  0 === e3.button && e3.preventDefault();
1110
1110
  }, onClick: () => {
1111
1111
  const e3 = M2 > 1 ? 1 : P2;
@@ -1113,21 +1113,21 @@ const kn = (e2, t2) => z(Sn, { ref: t2, ...e2 }), Cn = $(O((e2, t2) => {
1113
1113
  } }), z(J, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: _2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [K2, W2, _2, M2, v2]), Z2 = V(() => O2 || X2 ? !O2 && X2 ? X2 : O2 && !X2 ? O2 : z(H, { children: z(vt, { 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='${G2.palette.text.icon ?? G2.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: O2, elementAfter: X2 }) }) : null, [O2, X2]), Y2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => $2.current }), []);
1114
1114
  return z(J, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: Z2 });
1115
1115
  }));
1116
- Cn.displayName = "FormulaBar";
1117
- const vn = $(O((e2, t2) => {
1116
+ vn.displayName = "FormulaBar";
1117
+ const Tn = $(O((e2, t2) => {
1118
1118
  const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1119
1119
  }, onError() {
1120
1120
  console.log("onError");
1121
1121
  } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ ...s2, ...d2, variant: ut.Menuitem }), [s2, d2]), m2 = L(H, { children: [z(ve, { ...c2, command: n2.getCommand("sortAscending") }), z(ve, { ...c2, command: n2.getCommand("sortDescending") }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("autoFilterClear") }), []] });
1122
1122
  return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1123
1123
  }));
1124
- vn.displayName = "FilterColumnMenu";
1125
- const Tn = $(O((e2, t2) => {
1124
+ Tn.displayName = "FilterColumnMenu";
1125
+ const Rn = $(O((e2, t2) => {
1126
1126
  const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Ct(t2, () => ({ isFilters: () => true }), []);
1127
1127
  return z("div", { ref: s2, className: mt("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: L("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: [z("div", { children: l2.getName() }), z("div", { children: "Filter Widget" })] }) });
1128
1128
  }));
1129
- Tn.displayName = "Filters";
1130
- const Rn = $(O((e2, t2) => {
1129
+ Rn.displayName = "Filters";
1130
+ const Pn = $(O((e2, t2) => {
1131
1131
  const { children: o2, sheet: n2, style: a2, className: r2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: x2 = 4, gridTheme: b2, ...y2 } = e2, [S2, k2] = U(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = U(() => n2 ? n2.getTabColor() : null);
1132
1132
  w(n2, { onProtectionChange: () => {
1133
1133
  k2(n2.getProtection().isLocked());
@@ -1147,8 +1147,8 @@ const Rn = $(O((e2, t2) => {
1147
1147
  const F2 = R2 ? z(J, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1148
1148
  return z(Ot, { theme: R2 ? b2 ?? T2 : T2, children: z(J, { ref: t2, className: mt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: z(Tt, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: R2 ? M2 : "transparent", children: z(ae, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: R2 ? "primary" : D2 || "text.secondary", backgroundColor: R2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: R2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: L(H, { children: [P2, L(J, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [L(J, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: R2 ? void 0 : "1px" }, children: [o2, F2] }), S2 ? z(xt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(J, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1149
1149
  }));
1150
- Rn.displayName = "SheetTab";
1151
- const Pn = $(O((e2, t2) => {
1150
+ Pn.displayName = "SheetTab";
1151
+ const Dn = $(O((e2, t2) => {
1152
1152
  const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = U(o2?.getProtection());
1153
1153
  w(o2, { onProtectionChange: (e3) => {
1154
1154
  u2(e3?.getProtection());
@@ -1162,11 +1162,11 @@ const Pn = $(O((e2, t2) => {
1162
1162
  Promise.resolve(i2.closeAll()).then(() => {
1163
1163
  c2?.startEdit(n2);
1164
1164
  });
1165
- }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), z(ve, { command: a2.getCommand("duplicateSheet"), ...f2, variant: ut.Menuitem }), z(ve, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: ut.Menuitem }), z(Wo, { variant: ut.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: co.End }, parentFloat: i2 }), z(Te, { orientation: "horizontal" }), z(ve, { command: a2.getCommand("hideSheet"), ...f2, variant: ut.Menuitem })] });
1165
+ }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), z(ve, { command: a2.getCommand("duplicateSheet"), ...f2, variant: ut.Menuitem }), z(ve, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: ut.Menuitem }), z($o, { variant: ut.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: mo.End }, parentFloat: i2 }), z(Te, { orientation: "horizontal" }), z(ve, { command: a2.getCommand("hideSheet"), ...f2, variant: ut.Menuitem })] });
1166
1166
  return z(J, { ref: t2, className: mt("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1167
1167
  }));
1168
- Pn.displayName = "SheetTabMenu";
1169
- const Dn = $(O((e2, t2) => {
1168
+ Dn.displayName = "SheetTabMenu";
1169
+ const Mn = $(O((e2, t2) => {
1170
1170
  const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = U(o2?.getSheets().getItems()), [c2, m2] = U(o2?.getProtection());
1171
1171
  w(o2, { onSheetsChange: (e3) => {
1172
1172
  d2(e3.getSheets().getItems());
@@ -1199,25 +1199,25 @@ const Dn = $(O((e2, t2) => {
1199
1199
  }, [o2, c2, s2, a2, n2]);
1200
1200
  return z(J, { ref: t2, className: mt("menu", l2), ...i2, children: p2 });
1201
1201
  }));
1202
- Dn.displayName = "SheetsAllMenu";
1203
- let Mn = false, Fn = false;
1204
- let Nn = null;
1205
- const Bn = async (e2) => {
1202
+ Mn.displayName = "SheetsAllMenu";
1203
+ let Fn = false, Nn = false;
1204
+ let Bn = null;
1205
+ const En = async (e2) => {
1206
1206
  const t2 = await g.getDetails();
1207
- if (Fn || t2.isEval()) {
1207
+ if (Nn || t2.isEval()) {
1208
1208
  try {
1209
1209
  const e3 = top ?? window;
1210
- e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => Nn?.getWorkbook(), getSelectedSheet: () => Nn?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Nn?.getWorkbook().getSelectedRange(), getRange: (e4) => Nn?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => Nn, getLicenseManager: () => g, moreExamples: () => {
1210
+ e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => Bn?.getWorkbook(), getSelectedSheet: () => Bn?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Bn?.getWorkbook().getSelectedRange(), getRange: (e4) => Bn?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => Bn, getLicenseManager: () => g, moreExamples: () => {
1211
1211
  const e4 = { "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." } };
1212
1212
  console.table(e4);
1213
1213
  } }));
1214
1214
  } catch (e3) {
1215
- e3 instanceof DOMException || console.error(e3), Mn = true;
1215
+ e3 instanceof DOMException || console.error(e3), Fn = true;
1216
1216
  }
1217
- if (Nn !== e2 && (Nn = e2, !Mn)) try {
1218
- Mn = true;
1217
+ if (Bn !== e2 && (Bn = e2, !Fn)) try {
1218
+ Fn = true;
1219
1219
  (top ?? window).SheetXL && (await g._validate(true), g.wasPrinted() && (() => {
1220
- jt.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), Mn = true;
1220
+ jt.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), Fn = true;
1221
1221
  const e3 = document.getElementById("openEditorLink");
1222
1222
  e3 && e3.addEventListener("click", (e4) => {
1223
1223
  e4.preventDefault(), console.log("openScriptEditor called from console");
@@ -1227,19 +1227,19 @@ const Bn = async (e2) => {
1227
1227
  e3 instanceof DOMException || console.error(e3);
1228
1228
  }
1229
1229
  }
1230
- }, En = (e2) => {
1231
- Fn = e2;
1232
- }, An = 0.12, In = (e2, t2) => {
1230
+ }, An = (e2) => {
1231
+ Nn = e2;
1232
+ }, In = 0.12, Ln = (e2, t2) => {
1233
1233
  const o2 = {}, n2 = (e3) => {
1234
1234
  const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
1235
- return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: qe(t3, An, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1235
+ return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: qe(t3, In, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1236
1236
  }, a2 = n2(t2);
1237
- o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: qe(o2.body.fill, An, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : qe(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : qe(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: qe(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: qe(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1237
+ o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: qe(o2.body.fill, In, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : qe(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : qe(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: qe(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: qe(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1238
1238
  const r2 = qe("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1239
- o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Vt(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Vt(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Vt(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: qe(a2.fill, An, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : qe(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : qe(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Vt(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Vt(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1239
+ o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Vt(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Vt(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Vt(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: qe(a2.fill, In, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : qe(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : qe(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Vt(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Vt(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1240
1240
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1241
1241
  return o2.selection = { fill: l2.palette?.primary?.main ? Vt(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Vt(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Vt(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Vt(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1242
- }, Ln = $(O((e2, t2) => {
1242
+ }, Hn = $(O((e2, t2) => {
1243
1243
  const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Ct(t2, () => ({}), []), [i2, s2] = _t(), d2 = q(null), c2 = q(null), [m2, p2] = W.useReducer((e3) => e3 + 1, 0), [u2, g2] = U(null), [h2, f2] = U(null), [x2, b2] = U(null), { reference: y2 } = _e({ parentFloat: a2, label: "overflow" });
1244
1244
  Q(() => {
1245
1245
  c2.current = { refs: [] };
@@ -1297,14 +1297,14 @@ const Bn = async (e2) => {
1297
1297
  return Re({ ...e3, children: n3 });
1298
1298
  }, [x2]);
1299
1299
  return L(J, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Ut([l2, i2, t2]), ...r2, children: [z(J, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: h2 ?? u2 }), z(J, { className: "overflow-palette-popup-button", sx: { display: null !== x2 && 0 === x2.length ? "none" : "flex", flex: "1 1 0" }, children: z(Be, { createPopupPanel: w2, ref: d2, parentFloat: y2, createTooltip: ({ children: e3 }, t3) => z(He, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: z(xt, { iconKey: "MoreHorizontal" }) }) })] });
1300
- })), Hn = "https://unpkg.com/@sheetxl/scripting-templates/dist", zn = (e2) => {
1300
+ })), zn = "https://unpkg.com/@sheetxl/scripting-templates/dist", Wn = (e2) => {
1301
1301
  if (e2.metadata?.name) return e2.metadata.name;
1302
1302
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
1303
1303
  if ("formula" === e2.metadata?.icon) return t2.toUpperCase();
1304
1304
  t2 = t2.replace(/([a-z])([A-Z])/g, "$1 $2");
1305
1305
  return t2.replace(/[-_]/g, " ").trim().split(/\s+/).map((e3) => e3.charAt(0).toUpperCase() + e3.slice(1)).join(" ");
1306
- }, Wn = async (e2) => {
1307
- const t2 = eo.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1306
+ }, $n = async (e2) => {
1307
+ const t2 = to.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1308
1308
  if (!o2.ok) throw new qt(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1309
1309
  const n2 = await o2.text();
1310
1310
  if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new qt(`Failed to retrieve directory at '${e2}'`);
@@ -1316,11 +1316,11 @@ const Bn = async (e2) => {
1316
1316
  }
1317
1317
  const r2 = a2.map(async (t3) => {
1318
1318
  try {
1319
- const o3 = eo.relativePath(e2, t3.path), n3 = await fetch(o3);
1319
+ const o3 = to.relativePath(e2, t3.path), n3 = await fetch(o3);
1320
1320
  if (!n3.ok) throw new Error(`Failed to fetch file at '${t3.path}': ${n3.statusText}`);
1321
1321
  const a3 = await n3.text();
1322
1322
  let r3 = t3.metadata;
1323
- r3?.title || (r3 = { title: zn(t3), ...r3 });
1323
+ r3?.title || (r3 = { title: Wn(t3), ...r3 });
1324
1324
  return { path: t3.path, content: a3, metadata: r3 };
1325
1325
  } catch (e3) {
1326
1326
  console.error(e3.message);
@@ -1328,23 +1328,23 @@ const Bn = async (e2) => {
1328
1328
  return null;
1329
1329
  });
1330
1330
  return (await Promise.all(r2)).filter((e3) => null !== e3);
1331
- }, $n = { marginRight: "4px" }, On = "1em", Vn = $((e2) => {
1331
+ }, On = { marginRight: "4px" }, Vn = "1em", Kn = $((e2) => {
1332
1332
  const { disabled: t2, snippet: o2, description: n2, handleInsert: a2, sx: r2, ...l2 } = e2;
1333
1333
  let i2;
1334
1334
  const s2 = o2.metadata?.icon;
1335
- return i2 = z(xt, "formula" === s2 ? { iconKey: "ScriptFormula", size: On, style: $n } : "macro" === s2 ? { iconKey: "ScriptMacro", size: On, style: $n } : { iconKey: "ScriptAutoStart", size: On, style: $n }), z(Ae, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1335
+ return i2 = z(xt, "formula" === s2 ? { iconKey: "ScriptFormula", size: Vn, style: On } : "macro" === s2 ? { iconKey: "ScriptMacro", size: Vn, style: On } : { iconKey: "ScriptAutoStart", size: Vn, style: On }), z(Ae, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1336
1336
  0 === e3.button && e3.preventDefault();
1337
1337
  }, onMouseUp: (e3) => {
1338
1338
  0 === e3.button && a2(o2);
1339
1339
  }, onKeyDown: (e3) => {
1340
1340
  e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(o2);
1341
1341
  }, ...l2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [z(ee, { component: "div", children: o2.metadata?.title ?? o2.path }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => Vt(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1342
- }), Kn = $(O((e2, t2) => {
1343
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Hn, ...i2 } = e2, [s2, d2] = U([]), [c2, m2] = U(true), p2 = pt(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1342
+ }), Gn = $(O((e2, t2) => {
1343
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = zn, ...i2 } = e2, [s2, d2] = U([]), [c2, m2] = U(true), p2 = pt(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1344
1344
  _(() => {
1345
1345
  (async () => {
1346
1346
  try {
1347
- const e3 = await Wn(l2);
1347
+ const e3 = await $n(l2);
1348
1348
  d2(e3);
1349
1349
  } catch (e3) {
1350
1350
  } finally {
@@ -1359,28 +1359,28 @@ const Bn = async (e2) => {
1359
1359
  }, i3 = [];
1360
1360
  for (let e4 = 0; e4 < s2.length; e4++) {
1361
1361
  const t4 = s2[e4];
1362
- t4 && i3.push(z(Vn, { handleInsert: l3, snippet: t4 }, t4.path));
1362
+ t4 && i3.push(z(Kn, { handleInsert: l3, snippet: t4 }, t4.path));
1363
1363
  }
1364
1364
  const d3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? L(H, { children: [z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), z(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...a3, key: "help", command: o2.getCommand("help") })] });
1365
1365
  return Re({ ...e3, children: d3 });
1366
1366
  }, [r2, n2, a2, c2, u2]);
1367
1367
  return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: "ScriptNew", ...i2 });
1368
- })), Gn = $(O((e2, t2) => {
1368
+ })), Un = $(O((e2, t2) => {
1369
1369
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1370
1370
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1371
- return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(Ln, { parentFloat: n2, style: {}, children: z(ve, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(Ln, { parentFloat: n2, style: {}, children: z(Kn, { ...t3, commands: o2 }) }) })] }) });
1371
+ return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(Hn, { parentFloat: n2, style: {}, children: z(ve, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(Hn, { parentFloat: n2, style: {}, children: z(Gn, { ...t3, commands: o2 }) }) })] }) });
1372
1372
  }, [o2]);
1373
1373
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1374
1374
  }));
1375
- Gn.displayName = "ScriptEditorToolbar";
1376
- const Un = $(O((e2, t2) => {
1377
- const { scriptPath: o2 = Hn, onScriptSelect: n2, sx: a2 = ht.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = U([]), [p2, u2] = U(true), [g2, h2] = U(null);
1375
+ Un.displayName = "ScriptEditorToolbar";
1376
+ const _n = $(O((e2, t2) => {
1377
+ const { scriptPath: o2 = zn, onScriptSelect: n2, sx: a2 = ht.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = U([]), [p2, u2] = U(true), [g2, h2] = U(null);
1378
1378
  if (_(() => {
1379
1379
  (async () => {
1380
1380
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
1381
1381
  try {
1382
1382
  u2(true), h2(null);
1383
- const t3 = await Wn(o2);
1383
+ const t3 = await $n(o2);
1384
1384
  for (let o3 = 0; o3 < t3.length; o3++) {
1385
1385
  const n3 = t3[o3];
1386
1386
  n3 && e3.push(n3);
@@ -1400,8 +1400,8 @@ const Un = $(O((e2, t2) => {
1400
1400
  };
1401
1401
  return L(J, { ref: t2, className: mt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...a2 }, ...d2, children: [L(J, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [z(ee, { variant: "h6", gutterBottom: true, children: "Script Template" }), z(ee, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), z(ee, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), z(J, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => L(ae, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [L(J, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [z(ee, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), x2(e3)] }), e3.metadata?.summary && z(ee, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
1402
1402
  }));
1403
- Un.displayName = "TemplateSelectPanel";
1404
- const _n = $(O((e2, t2) => {
1403
+ _n.displayName = "TemplateSelectPanel";
1404
+ const jn = $(O((e2, t2) => {
1405
1405
  const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, frame: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = zt(), [u2, g2] = U(false), h2 = q(false), [f2, x2] = U({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = U(null);
1406
1406
  _(() => {
1407
1407
  let e3 = false;
@@ -1423,9 +1423,9 @@ const _n = $(O((e2, t2) => {
1423
1423
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1424
1424
  }
1425
1425
  return S2.current?.focus?.(e3), false;
1426
- }, [k2, s2, d2]), P2 = V(() => z(Fe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), D2 = V(() => z(ue, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: z(Gn, { commands: r2 }) }), [p2, r2]), M2 = V(() => z(J, { className: mt("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 ${p2.palette.divider}` }, children: L("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), F2 = V(() => L(J, { className: mt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [D2, z(J, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: S2, loadingPanel: P2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, D2, M2, u2, P2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
1426
+ }, [k2, s2, d2]), P2 = V(() => z(Fe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), D2 = V(() => z(ue, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: z(Un, { commands: r2 }) }), [p2, r2]), M2 = V(() => z(J, { className: mt("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 ${p2.palette.divider}` }, children: L("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), F2 = V(() => L(J, { className: mt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [D2, z(J, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: S2, loadingPanel: P2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, D2, M2, u2, P2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
1427
1427
  let e3;
1428
- return null === b2 ? null : (null === b2.source && (e3 = z(Un, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1428
+ return null === b2 ? null : (null === b2.source && (e3 = z(_n, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1429
1429
  S2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
1430
1430
  } })), z(J, { tabIndex: 0, className: mt("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (e4) => {
1431
1431
  e4.isDefaultPrevented() || S2.current?.focus();
@@ -1439,11 +1439,11 @@ const _n = $(O((e2, t2) => {
1439
1439
  B2?.current?.contains(e3.relatedTarget) || B2?.current === e3.relatedTarget || (T2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1440
1440
  }, children: N2 });
1441
1441
  }));
1442
- _n.displayName = "ScriptWorkspace";
1443
- const jn = (e2, t2) => {
1442
+ jn.displayName = "ScriptWorkspace";
1443
+ const qn = (e2, t2) => {
1444
1444
  const { model: o2, commands: n2, entryKey: a2, frame: r2, ...l2 } = e2;
1445
- return z(_n, { ref: t2, readOnly: false, commands: n2, frame: r2, scripts: o2?.getScripts(), ...l2 });
1446
- }, qn = $(O((e2, t2) => {
1445
+ return z(jn, { ref: t2, readOnly: false, commands: n2, frame: r2, scripts: o2?.getScripts(), ...l2 });
1446
+ }, Xn = $(O((e2, t2) => {
1447
1447
  const { commands: o2, ...n2 } = e2, a2 = pt(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = U([]), [i2, s2] = U(false), d2 = a2[0]?.context?.();
1448
1448
  _(() => {
1449
1449
  const e3 = d2?.getScripts();
@@ -1462,14 +1462,14 @@ const jn = (e2, t2) => {
1462
1462
  const u2 = L(J, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? L(H, { children: [z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), z(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor") })] });
1463
1463
  return Re({ ...n2, children: u2 });
1464
1464
  }));
1465
- qn.displayName = "RunScriptPopupPanel";
1466
- const Xn = $(O((e2, t2) => {
1465
+ Xn.displayName = "RunScriptPopupPanel";
1466
+ const Zn = $(O((e2, t2) => {
1467
1467
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = pt(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = K((e3, t3) => {
1468
- const o3 = z(qn, { ...e3, commands: t3 });
1468
+ const o3 = z(Xn, { ...e3, commands: t3 });
1469
1469
  return Re({ ...e3, children: o3 });
1470
1470
  }, [r2, s2, n2, a2]);
1471
1471
  return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, ...l2 });
1472
- })), Zn = (e2) => z(ve, { ...e2 }), Yn = $(O((e2, t2) => {
1472
+ })), Yn = (e2) => z(ve, { ...e2 }), Qn = $(O((e2, t2) => {
1473
1473
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = U(false), s2 = pt(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1474
1474
  _(() => {
1475
1475
  const e3 = d2?.getScripts();
@@ -1502,19 +1502,19 @@ const Xn = $(O((e2, t2) => {
1502
1502
  for (let e4 = 0; e4 < s3; e4++) {
1503
1503
  const t4 = r3[e4], o3 = t4.createCommand?.(c2);
1504
1504
  if (!o3) continue;
1505
- const n3 = { command: o3, ...a3 }, l3 = (t4.createCommandButton ?? Zn)(n3);
1505
+ const n3 = { command: o3, ...a3 }, l3 = (t4.createCommandButton ?? Yn)(n3);
1506
1506
  i3.push(l3);
1507
1507
  }
1508
1508
  }
1509
- const d3 = z(Wo, { ...a3, command: o2.getCommand("formatFontColor"), icon: z(xt, { iconKey: "text.colored" }), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z(Wo, { ...a3, command: o2.getCommand("formatFillColor"), icon: z(xt, { iconKey: "fill.colored" }), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: co.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(Ko, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(No, { ...a3 }) }) : null;
1509
+ const d3 = z($o, { ...a3, command: o2.getCommand("formatFontColor"), icon: z(xt, { iconKey: "text.colored" }), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z($o, { ...a3, command: o2.getCommand("formatFillColor"), icon: z(xt, { iconKey: "fill.colored" }), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: mo.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(Go, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(Bo, { ...a3 }) }) : null;
1510
1510
  let g2 = null;
1511
- l2 && (g2 = L(H, { children: [z(Te, {}), z(Xn, { ...a3 })] }));
1512
- return L(Ln, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Xo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(ha, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(_o, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Bo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ve, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ve, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(qo, { ...a3 }), z(jo, { ...a3 }), z(Do, { ...a3 }), m3, d3, z(Te, {}), z(ao, { ...a3 }), z(ro, { ...a3 }), z(io, { ...a3 }), z(lo, { ...a3 }), z(Mo, { ...a3 }), z(Te, {}), z(Ao, { ...a3 }), z(en, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Ba, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(Ho, { ...a3 }), z(zo, { ...a3 }), z(Te, {}), z(Lo, { ...a3 }), null, z(Io, { ...a3 }), z(Oo, { ...a3 }), u2, g2, i3] });
1511
+ l2 && (g2 = L(H, { children: [z(Te, {}), z(Zn, { ...a3 })] }));
1512
+ return L(Hn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Zo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(fa, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(jo, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Eo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ve, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ve, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(Xo, { ...a3 }), z(qo, { ...a3 }), z(Mo, { ...a3 }), m3, d3, z(Te, {}), z(ro, { ...a3 }), z(lo, { ...a3 }), z(so, { ...a3 }), z(io, { ...a3 }), z(Fo, { ...a3 }), z(Te, {}), z(Io, { ...a3 }), z(tn, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Ea, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(zo, { ...a3 }), z(Wo, { ...a3 }), z(Te, {}), z(Ha, { ...a3 }), z(Ho, { ...a3 }), z(Lo, { ...a3 }), z(Vo, { ...a3 }), u2, g2, i3] });
1513
1513
  }, [o2, s2, l2, c2]);
1514
1514
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: m2, ...r2 });
1515
1515
  }));
1516
- Yn.displayName = "HomeToolbar";
1517
- const Qn = $(O((e2, t2) => {
1516
+ Qn.displayName = "HomeToolbar";
1517
+ const Jn = $(O((e2, t2) => {
1518
1518
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = ut.Toolbar, ...d2 } = e2, c2 = pt(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = V(() => {
1519
1519
  let e3 = null, t3 = 0;
1520
1520
  for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
@@ -1524,37 +1524,37 @@ const Qn = $(O((e2, t2) => {
1524
1524
  return Re({ ...e3, children: a3 });
1525
1525
  }, [r2, n2, a2]);
1526
1526
  return m2 ? z(ve, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(Pe, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: "InsertImage", ...d2 });
1527
- })), Jn = $(O((e2, t2) => {
1527
+ })), ea = $(O((e2, t2) => {
1528
1528
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1529
1529
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1530
- return L(Ln, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(Qn, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
1530
+ return L(Hn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(Jn, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
1531
1531
  }, [o2]);
1532
1532
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1533
1533
  }));
1534
- Jn.displayName = "InsertToolbar";
1535
- const ea = $(O((e2, t2) => {
1534
+ ea.displayName = "InsertToolbar";
1535
+ const ta = $(O((e2, t2) => {
1536
1536
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1537
1537
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1538
- return L(Ln, { parentFloat: n2, children: [z(Fo, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z($o, { ...a3 }), z(Zo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Yo, { ...a3 }), z(Ea, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(Xn, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1538
+ return L(Hn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(Oo, { ...a3 }), z(Yo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Qo, { ...a3 }), z(Aa, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(Zn, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1539
1539
  }, [o2]);
1540
1540
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1541
1541
  }));
1542
- ea.displayName = "ViewToolbar";
1543
- const ta = (e2) => z(ra, { ...e2 }), oa = $((e2) => {
1542
+ ta.displayName = "ViewToolbar";
1543
+ const oa = (e2) => z(la, { ...e2 }), na = $((e2) => {
1544
1544
  const { sx: t2, ...o2 } = e2;
1545
1545
  return L(J, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Wt(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [z(xe, { disableRipple: true, onMouseDown: (e3) => {
1546
1546
  0 === e3.button && e3.preventDefault();
1547
1547
  }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), z(J, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1548
- }), na = $((e2) => {
1548
+ }), aa = $((e2) => {
1549
1549
  const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = V(() => {
1550
1550
  const e3 = [];
1551
- for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(oa, { label: t2[o3].label }, t2[o3].label));
1551
+ for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(na, { label: t2[o3].label }, t2[o3].label));
1552
1552
  return e3;
1553
1553
  }, [t2]);
1554
1554
  return z(fe, { value: o2, onChange: (e3, t3) => {
1555
1555
  n2?.(t3);
1556
1556
  }, variant: "scrollable", scrollButtons: false, sx: { paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(0), paddingBottom: (e3) => e3.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (e3) => e3.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...a2 }, slotProps: { indicator: { children: z("span", { className: "MuiTabs-indicatorSpan" }) } }, ...r2, children: l2 });
1557
- }), aa = $((e2) => {
1557
+ }), ra = $((e2) => {
1558
1558
  const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = K((e3) => {
1559
1559
  n2?.(e3.target.value);
1560
1560
  }, [n2]), i2 = V(() => {
@@ -1568,26 +1568,26 @@ const ta = (e2) => z(ra, { ...e2 }), oa = $((e2) => {
1568
1568
  return e3;
1569
1569
  }, [t2, o2]);
1570
1570
  return z(de, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...a2 }, size: "small", children: z(he, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, ...r2, children: i2 }) });
1571
- }), ra = $(O((e2, t2) => {
1571
+ }), la = $(O((e2, t2) => {
1572
1572
  const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = V(() => {
1573
1573
  const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1574
- e3.push({ label: "Home", component: z(Yn, { commands: o2, ...n3 }) });
1574
+ e3.push({ label: "Home", component: z(Qn, { commands: o2, ...n3 }) });
1575
1575
  const { ref: a3, ...r3 } = i2?.Insert || {};
1576
- e3.push({ label: "Insert", component: z(Jn, { commands: o2, ...r3 }) });
1576
+ e3.push({ label: "Insert", component: z(ea, { commands: o2, ...r3 }) });
1577
1577
  const { ref: l3, ...s3 } = i2?.View || {};
1578
- return e3.push({ label: "View", component: z(ea, { commands: o2, ...s3 }) }), e3;
1578
+ return e3.push({ label: "View", component: z(ta, { commands: o2, ...s3 }) }), e3;
1579
1579
  }, [o2, d2]), u2 = V(() => {
1580
1580
  const e3 = [];
1581
1581
  for (let t3 = 0; t3 < p2.length; t3++) e3.push(W.cloneElement(p2[t3].component, { ...p2[t3].component.props, key: p2[t3].key ?? p2[t3].label }));
1582
1582
  return e3;
1583
1583
  }, [p2]), [g2, h2] = U(0), f2 = (e3) => {
1584
1584
  h2(e3);
1585
- }, x2 = V(() => z(r2 ? aa : na, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(ue, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...b2 }, ...y2, children: u2[g2] });
1585
+ }, x2 = V(() => z(r2 ? ra : aa, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(ue, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...b2 }, ...y2, children: u2[g2] });
1586
1586
  return L(J, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(x2) : x2, l2 ? l2(w2) : w2] });
1587
1587
  }));
1588
- ra.displayName = "WorkbookToolbars";
1589
- const la = (e2) => {
1590
- const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = ia } = e2, i2 = St(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), g2 = v(), h2 = V(() => [new Rt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Pt("newCellStyle", n2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new Pt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Pt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Rt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Dt.Ctrl] }, { key: "F5", modifiers: [Dt.Shift] }] }), new Rt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Dt.Ctrl] }, { key: "H", modifiers: [Dt.Ctrl, Dt.Alt] }] }), new Rt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "Goto", shortcut: [{ key: "G", modifiers: [Dt.Ctrl] }] }), new Rt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Rt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Rt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Rt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Rt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Pt("hideSheet", n2, { 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 Pt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Pt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Dt.Shift] }, { key: "F1", modifiers: [Dt.Alt, Dt.Shift] }] }), new Pt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Pt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl] }] }), new Pt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl] }] }), new Pt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Pt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Pt("addNamedReference", n2, { 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: "NamedRangeInsert" }), new Pt("editNamedReference", n2, { 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 Pt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "NamedRangeRemove" }), new Rt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Dt.Alt] } }), new Rt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("activeNameManager", n2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Dt.Ctrl] } }), new Pt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Pt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Dt.Alt] }] }), new Pt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Pt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Dt.Ctrl] } }), new Pt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Pt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Rt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Dt.Ctrl] } }), new Rt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
1588
+ la.displayName = "WorkbookToolbars";
1589
+ const ia = (e2) => {
1590
+ const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = sa } = e2, i2 = St(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), g2 = v(), h2 = V(() => [new Rt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Pt("newCellStyle", n2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new Pt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Pt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Rt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Dt.Ctrl] }, { key: "F5", modifiers: [Dt.Shift] }] }), new Rt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Dt.Ctrl] }, { key: "H", modifiers: [Dt.Ctrl, Dt.Alt] }] }), new Rt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "Goto", shortcut: [{ key: "G", modifiers: [Dt.Ctrl] }] }), new Rt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Rt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Rt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Rt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Rt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Pt("hideSheet", n2, { 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 Pt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Pt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Dt.Shift] }, { key: "F1", modifiers: [Dt.Alt, Dt.Shift] }] }), new Pt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Pt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl] }] }), new Pt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl] }] }), new Pt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Pt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Pt("addNamedReference", n2, { 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: "NamedRangeInsert" }), new Pt("editNamedReference", n2, { 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 Pt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "NamedRangeRemove" }), new Rt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Dt.Alt] } }), new Rt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("activeNameManager", n2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Dt.Ctrl] } }), new Pt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Pt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Dt.Alt] }] }), new Pt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Pt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Dt.Ctrl] } }), new Pt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Pt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Rt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Dt.Ctrl] } }), new Rt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
1591
1591
  let e3 = null;
1592
1592
  return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Mt(n2, "workbook"), e3.addCommands(h2, true), e3;
1593
1593
  }, [a2, h2]), x2 = wt(), b2 = W.useRef(null), y2 = gt(() => {
@@ -1651,7 +1651,7 @@ const la = (e2) => {
1651
1651
  }, onScriptsChange: (e3) => {
1652
1652
  y2();
1653
1653
  } });
1654
- const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: T2 } = Jt({ target: { current: o2 ?? document.body } }), P2 = R();
1654
+ const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: T2 } = eo({ target: { current: o2 ?? document.body } }), P2 = R();
1655
1655
  _(() => {
1656
1656
  f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: r2 }) });
1657
1657
  }, [t2?.getTheme(), r2]);
@@ -1831,10 +1831,10 @@ const la = (e2) => {
1831
1831
  const e3 = t2.getProtection().isStructureAllowed();
1832
1832
  f2.getCommand("hideSheet").update({ disabled: c2.length <= 1 || !e3 }), f2.getCommand("deleteSheet").update({ disabled: c2.length <= 1 || !e3 });
1833
1833
  }, [c2, s2]), f2;
1834
- }, ia = () => {
1834
+ }, sa = () => {
1835
1835
  window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
1836
- }, sa = "_sheetxl-theme_4opcr_2", da = "_sheetxl-workbook_g5t6x_5", ca = (e2) => z(Pn, { ...e2 }), ma = (e2) => z(Dn, { ...e2 }), pa = (e2) => z(Rn, { ...e2 }), ua = $(O((e2, t2) => {
1837
- const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ca, sheetsAllProps: c2, renderSheetsAll: m2 = ma, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...k2 } = e2, [C2, v2] = U(o2?.getSelectedSheetIndex()), [T2, R2] = U(o2?.getSheets().getItems()), [D2, M2] = U(o2?.getProtection());
1836
+ }, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Dn, { ...e2 }), pa = (e2) => z(Mn, { ...e2 }), ua = (e2) => z(Pn, { ...e2 }), ga = $(O((e2, t2) => {
1837
+ const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ma, sheetsAllProps: c2, renderSheetsAll: m2 = pa, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...k2 } = e2, [C2, v2] = U(o2?.getSelectedSheetIndex()), [T2, R2] = U(o2?.getSheets().getItems()), [D2, M2] = U(o2?.getProtection());
1838
1838
  w(o2, { onViewChange(e3) {
1839
1839
  v2(e3?.getSelectedSheetIndex());
1840
1840
  }, onSheetsChange: (e3) => {
@@ -1875,7 +1875,7 @@ const la = (e2) => {
1875
1875
  } catch (e4) {
1876
1876
  }
1877
1877
  if (!t3) return null;
1878
- return (u2 ?? pa)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
1878
+ return (u2 ?? ua)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
1879
1879
  B2(e3.index), ae2(t4, e3.index);
1880
1880
  }, ...e3, ...p2 });
1881
1881
  }, [u2, p2, o2, y2]), le2 = V(() => F2 ? null : z(Me, { disableInteractive: true, title: "New sheet", children: z(te, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
@@ -1894,8 +1894,8 @@ const la = (e2) => {
1894
1894
  $2 ? j2.close(0) : j2.open(0);
1895
1895
  }, icon: z(xt, { iconKey: "Menu" }) }) }) }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, minWidth: "4px" } }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: "none", display: "flex", alignItems: "center" }, children: le2 }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: 1, minWidth: "24px" } }), ne2, X2] });
1896
1896
  }));
1897
- ua.displayName = "WorkbookStrip";
1898
- const ga = $(O((e2, t2) => {
1897
+ ga.displayName = "WorkbookStrip";
1898
+ const ha = $(O((e2, t2) => {
1899
1899
  const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = U(o2.getSelectedSheet()), [u2, g2] = U(m2.getSelectedRanges()), [h2, f2] = U(m2.getSelectedCell());
1900
1900
  w(o2, { onSheetsChange() {
1901
1901
  p2(o2.getSelectedSheet());
@@ -1922,31 +1922,31 @@ const ga = $(O((e2, t2) => {
1922
1922
  const e3 = n2.getCommand("updateComments");
1923
1923
  T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
1924
1924
  }
1925
- P2 ? T2.push(X(je, { ...S2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: P2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + k2.length })), T2.push(X(Qn, { ...S2, key: "contextBefore:" + T2.length }));
1925
+ P2 ? T2.push(X(je, { ...S2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: P2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + k2.length })), T2.push(X(Jn, { ...S2, key: "contextBefore:" + T2.length }));
1926
1926
  }
1927
- const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(ha, { command: n2.getCommand("copy"), ...y2 }), z(Xo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Oo, { ...S2 }), z(Te, { orientation: "horizontal" }), z(Ho, { commands: n2, ...S2, disableSheet: true }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Io, { ...S2 }), T2, k2] });
1927
+ const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(fa, { command: n2.getCommand("copy"), ...y2 }), z(Zo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Vo, { ...S2 }), z(Te, { orientation: "horizontal" }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Wo, { commands: n2, ...S2, disableSheet: true }), z(Lo, { ...S2 }), T2, k2] });
1928
1928
  return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children: D2 });
1929
1929
  }));
1930
- ga.displayName = "WorkbookContextMenu";
1931
- const ha = $(O((e2, t2) => {
1930
+ ha.displayName = "WorkbookContextMenu";
1931
+ const fa = $(O((e2, t2) => {
1932
1932
  const { command: o2, ...n2 } = e2, a2 = wt(), [r2, l2] = U(false), [i2, s2] = U("info");
1933
1933
  return _(() => {
1934
1934
  const e3 = a2.getMode();
1935
1935
  l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
1936
1936
  }, [a2]), z(ve, { ref: t2, command: o2, icon: z(xt, { iconKey: "copy.walking", sourceProps: { isWalking: r2, themedType: i2 } }), ...n2 });
1937
- })), fa = $(O((e2, t2) => {
1937
+ })), xa = $(O((e2, t2) => {
1938
1938
  const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
1939
1939
  w(o2, { onAnyChange(e3) {
1940
1940
  } });
1941
1941
  const s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1942
1942
  }, onError() {
1943
1943
  console.log("onError");
1944
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ut.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(ha, { command: n2.getCommand("copy"), ...c2, variant: ut.Menuitem }), [], z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z(je, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
1944
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ut.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(fa, { command: n2.getCommand("copy"), ...c2, variant: ut.Menuitem }), [], z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z(je, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), z(Te, { orientation: "horizontal" }), z(je, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
1945
1945
  return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
1946
1946
  }));
1947
- fa.displayName = "MovableContextMenu";
1948
- const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) => z(vn, { ...e2 }), wa = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Sa = (e2) => z(Fe, { ...e2 }), ka = (e2, t2) => z(D, { ref: t2, ...e2 }), Ca = (e2) => z(wn, { ...e2 }), va = (e2) => z(ua, { ...e2 }), Ta = { fireOnModelChange: false }, Ra = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Pa = $(O((e2, t2) => {
1949
- const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, autoFocus: i2 = false, sx: s2, style: d2, className: c2, onFocus: m2, onBlur: p2, onKeyDown: u2, onRepeatCommandChange: g2, commands: x2, showFormulaBar: b2, formulaBarProps: y2, renderFormulaBar: S2 = wa, showTabs: k2, tabsProps: C2, renderTabs: v2 = va, showStatusBar: T2, statusBarProps: P2, renderStatusBar: D2 = Ca, toolbarProps: E2, renderToolbar: A2 = ta, contextMenuSx: I2, renderContextMenu: $2 = ba, renderFilterMenu: O2 = ya, renderMovableMenu: G2 = xa, renderLoadingPanel: j2 = Sa, loadingPanelProps: X2, sheetProps: Y2, renderSheet: te2 = ka, mainWrapper: oe2, showHorizontalScrollbar: ne2, showVerticalScrollbar: ae2, gridTheme: re2, headersTheme: le2, enableDarkImages: ie2, ...se2 } = e2, de2 = zt(), ce2 = R(), me2 = V(() => {
1947
+ xa.displayName = "MovableContextMenu";
1948
+ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) => z(Tn, { ...e2 }), Sa = (e2, t2) => z(vn, { ref: t2, ...e2 }), ka = (e2) => z(Fe, { ...e2 }), Ca = (e2, t2) => z(D, { ref: t2, ...e2 }), va = (e2) => z(Sn, { ...e2 }), Ta = (e2) => z(ga, { ...e2 }), Ra = { fireOnModelChange: false }, Pa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Da = $(O((e2, t2) => {
1949
+ const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, autoFocus: i2 = false, sx: s2, style: d2, className: c2, onFocus: m2, onBlur: p2, onKeyDown: u2, onRepeatCommandChange: g2, commands: x2, showFormulaBar: b2, formulaBarProps: y2, renderFormulaBar: S2 = Sa, showTabs: k2, tabsProps: C2, renderTabs: v2 = Ta, showStatusBar: T2, statusBarProps: P2, renderStatusBar: D2 = va, toolbarProps: E2, renderToolbar: A2 = oa, contextMenuSx: I2, renderContextMenu: $2 = ya, renderFilterMenu: O2 = wa, renderMovableMenu: G2 = ba, renderLoadingPanel: j2 = ka, loadingPanelProps: X2, sheetProps: Y2, renderSheet: te2 = Ca, mainWrapper: oe2, showHorizontalScrollbar: ne2, showVerticalScrollbar: ae2, gridTheme: re2, headersTheme: le2, enableDarkImages: ie2, ...se2 } = e2, de2 = zt(), ce2 = R(), me2 = V(() => {
1950
1950
  const e3 = { theme: ce2.getDefaultTheme(), ...a2 };
1951
1951
  return o2 ?? new h(e3);
1952
1952
  }, [o2]), pe2 = q(null), [ge2, he2] = U(false), fe2 = q(null), xe2 = V(() => z(J, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: fe2 }), []), [be2, ye2] = U(false), [we2, Se2] = U(false), ke2 = K(() => {
@@ -1959,7 +1959,7 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
1959
1959
  (async () => {
1960
1960
  Te2.current !== l2 && (await l2?.({ source: ve2.current }), Te2.current = l2), Se2(true);
1961
1961
  })();
1962
- }, [be2, ve2.current]), Bn(ve2.current);
1962
+ }, [be2, ve2.current]), En(ve2.current);
1963
1963
  const Re2 = K((e3) => (pe2.current?.submitEdit(), true), []), Pe2 = K(() => {
1964
1964
  requestAnimationFrame(() => {
1965
1965
  pe2?.current?.focus();
@@ -1975,16 +1975,16 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
1975
1975
  pe2.current.getSheet() !== t3 ? pe2.current.getGridElement()?.onViewChangeOnce(() => {
1976
1976
  pe2.current.getSheet() !== t3 && e4(false), e4(true);
1977
1977
  }) : e4(true);
1978
- }) }, Ta);
1978
+ }) }, Ra);
1979
1979
  const [Ae2, Ie2] = Z((e3) => e3 + 1, 0), Le2 = me2?.getView();
1980
1980
  w(Le2, { onViewChange: (e3) => {
1981
1981
  Ie2();
1982
1982
  } });
1983
- const He2 = re2 ?? de2, ze2 = V(() => In(de2, He2), [de2, He2]), We2 = le2 ?? de2, $e2 = V(() => In(de2, We2), [de2, We2]), [Oe2, Ve2] = U(null);
1983
+ const He2 = re2 ?? de2, ze2 = V(() => Ln(de2, He2), [de2, He2]), We2 = le2 ?? de2, $e2 = V(() => Ln(de2, We2), [de2, We2]), [Oe2, Ve2] = U(null);
1984
1984
  K(() => {
1985
1985
  pe2.current.focus();
1986
1986
  }, []);
1987
- const Ke2 = la({ workbook: me2, workbookElement: ve2.current, target: () => pe2.current, commands: x2, darkMode: ze2.body.darkMode, onNewWorkbook: r2 }), Ge2 = q(null), [Ue2, je2] = U(false), [qe2, Xe2] = U(null), [Ze2, Ye2] = U(Ft.Top), [Qe2, et2] = U(f.EmptyBounds), tt2 = K(() => {
1987
+ const Ke2 = ia({ workbook: me2, workbookElement: ve2.current, target: () => pe2.current, commands: x2, darkMode: ze2.body.darkMode, onNewWorkbook: r2 }), Ge2 = q(null), [Ue2, je2] = U(false), [qe2, Xe2] = U(null), [Ze2, Ye2] = U(Ft.Top), [Qe2, et2] = U(f.EmptyBounds), tt2 = K(() => {
1988
1988
  je2(false), Xe2(null);
1989
1989
  }, []), ot2 = K((e3, t3, o3 = Ft.Top) => {
1990
1990
  et2(e3), Ye2(o3), Xe2(t3), null !== Ge2.current && setTimeout(() => {
@@ -2048,7 +2048,7 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
2048
2048
  const At2 = gt((e3) => {
2049
2049
  Ke2?.dispatchToFocusedCommand(e3);
2050
2050
  }, [Ke2]), It2 = gt(() => {
2051
- Bn(ve2.current);
2051
+ En(ve2.current);
2052
2052
  }, [me2, ve2.current]), Lt2 = K(() => {
2053
2053
  at2("sheet");
2054
2054
  }, []), Ht2 = K(() => {
@@ -2076,7 +2076,7 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
2076
2076
  Ke2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2077
2077
  } else Ke2?.getCommand("openWorkbook")?.execute(t3);
2078
2078
  }
2079
- }, [Ke2, Vt2]), jt2 = V(() => Vt2 ? z(J, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(ee, { variant: "h4", children: Vt2 }) }) : null, [Vt2]), qt2 = q(null), Xt2 = V(() => z(Qt, { in: !we2, nodeRef: qt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(J, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: we2 ? "none" : s2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: j2({ ref: qt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: we2 ? 0 : s2?.opacity, pointerEvents: we2 ? "none" : s2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...X2 } }) }) }), [we2, j2, X2]), Zt2 = V(() => S2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: me2, sheetElement: pe2.current, gridStyle: ze2, onFocus: Ht2, ...y2, NamedCollectionEditorProps: { restoreFocus: (e3) => pe2.current.focus(e3), ...y2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ke2, ...y2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, Ce2), [S2, y2, me2, ze2, Ke2, we2]), Yt2 = K((e3) => {
2079
+ }, [Ke2, Vt2]), jt2 = V(() => Vt2 ? z(J, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(ee, { variant: "h4", children: Vt2 }) }) : null, [Vt2]), qt2 = q(null), Xt2 = V(() => z(Jt, { in: !we2, nodeRef: qt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(J, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: we2 ? "none" : s2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: j2({ ref: qt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: we2 ? 0 : s2?.opacity, pointerEvents: we2 ? "none" : s2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...X2 } }) }) }), [we2, j2, X2]), Zt2 = V(() => S2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: me2, sheetElement: pe2.current, gridStyle: ze2, onFocus: Ht2, ...y2, NamedCollectionEditorProps: { restoreFocus: (e3) => pe2.current.focus(e3), ...y2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ke2, ...y2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, Ce2), [S2, y2, me2, ze2, Ke2, we2]), Yt2 = K((e3) => {
2080
2080
  const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
2081
2081
  Et2(e4, t3);
2082
2082
  }, ...o3 }, a3 = t3.getContent().getType();
@@ -2091,7 +2091,7 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
2091
2091
  r3 = z(B, { ...e4 });
2092
2092
  }
2093
2093
  return z("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2094
- }, []), Jt2 = V(() => te2({ style: Ra, onFocus: Lt2, gridStyle: ze2, headersStyle: $e2, sheet: De2, commands: Ke2, onSheetContextMenu: Bt2, onViewportChange: (e3) => {
2094
+ }, []), Qt2 = V(() => te2({ style: Pa, onFocus: Lt2, gridStyle: ze2, headersStyle: $e2, sheet: De2, commands: Ke2, onSheetContextMenu: Bt2, onViewportChange: (e3) => {
2095
2095
  Ve2(e3);
2096
2096
  }, showScrollbars: false, viewportComponent: xe2, onRepeatCommandChange: g2, onElementLoad: ke2, onShowColumnTooltip: (e3) => {
2097
2097
  ot2(e3.anchor, e3.display, Ft.Top);
@@ -2102,12 +2102,12 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
2102
2102
  }, onCloseTooltip: () => tt2(), renderMovable: Yt2, ...Y2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2103
2103
  Y2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), Mt2(e3, t3);
2104
2104
  }, ...Y2?.cellRenderProps } }, pe2), [Ke2, Y2, De2, ze2, g2]), eo2 = V(() => {
2105
- let e3 = z(Nt, { ref: ht2, style: Ra, viewport: Oe2, touchElement: pe2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2105
+ let e3 = z(Nt, { ref: ht2, style: Pa, viewport: Oe2, touchElement: pe2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2106
2106
  pe2.current?.getGridElement()?.scrollTo(e4);
2107
- }, showHorizontalScrollbar: lt2 || rt2, showVerticalScrollbar: dt2, createHorizontalScrollbar: yt2, createVerticalScrollbar: Ot2, children: Jt2 });
2107
+ }, showHorizontalScrollbar: lt2 || rt2, showVerticalScrollbar: dt2, createHorizontalScrollbar: yt2, createVerticalScrollbar: Ot2, children: Qt2 });
2108
2108
  return xt2 || 0 === ft2 || (e3 = L(H, { children: [e3, bt2] })), oe2 ? oe2(e3) : e3;
2109
- }, [lt2, rt2, yt2, dt2, Oe2, xt2, Jt2, bt2, de2, oe2]), to2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: Ue2, title: z(ee, { variant: "subtitle2", component: "div", children: qe2 }), placement: Ze2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ge2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ue2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Qe2.x, Qe2.y, Qe2.width, Qe2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ue2, qe2, Ze2, Qe2, Ge2]), oo2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? ze2.header.fill : e3.palette.background.paper, "& *": { ...Je(de2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${ct2} 1px` }, ...s2 }), [s2, ze2]), no2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), ao2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: we2 ? void 0 : 0, "--sxl-app-color-high-contrast": de2.palette.primary.main, "--sxl-app-color-primary": de2.palette.primary.main, "--sxl-app-color-primary-dark": de2.palette.primary.dark, "--sxl-app-color-primary-light": de2.palette.primary.light, "--sxl-app-color-info": de2.palette.info.main, "--sxl-app-color-info-dark": de2.palette.info.dark, "--sxl-app-color-info-light": de2.palette.info.light, "--sxl-app-color-secondary": de2.palette.secondary.main, "--sxl-app-color-secondary-dark": de2.palette.secondary.dark, "--sxl-app-color-secondary-light": de2.palette.secondary.light, "--sxl-app-color-success": de2.palette.success.main, "--sxl-app-color-success-dark": de2.palette.success.dark, "--sxl-app-color-success-light": de2.palette.success.light, "--sxl-app-color-warning": de2.palette.warning.main, "--sxl-app-color-warning-dark": de2.palette.warning.dark, "--sxl-app-color-warning-light": de2.palette.warning.light, "--sxl-app-color-error": de2.palette.error.main, "--sxl-app-color-error-dark": de2.palette.error.dark, "--sxl-app-color-error-light": de2.palette.error.light, "--sxl-app-color-text": de2.palette.text.primary, "--sxl-app-color-text-secondary": de2.palette.text.secondary, "--sxl-app-color-text-disabled": de2.palette.text.disabled, "--sxl-app-color-background": de2.palette.background.paper, "--sxl-app-color-button-surface": de2.palette.grey[600], "--sxl-app-color-shadow": de2.palette.action.focus, "--sxl-app-color-grey": de2.palette.grey[500], "--sxl-app-filter-dark-invert": ze2.body.darkMode && ie2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": ze2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [ze2, de2, we2]), ro2 = V(() => mt(tn), []);
2110
- return L(ue, { className: mt("sheetxl-workbook", da, { "Mui-focusVisible": ge2 }, sa, c2), sx: oo2, style: d2, square: false, ...se2, ref: ve2, onFocus: (e3) => {
2109
+ }, [lt2, rt2, yt2, dt2, Oe2, xt2, Qt2, bt2, de2, oe2]), to2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: Ue2, title: z(ee, { variant: "subtitle2", component: "div", children: qe2 }), placement: Ze2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ge2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ue2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Qe2.x, Qe2.y, Qe2.width, Qe2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ue2, qe2, Ze2, Qe2, Ge2]), oo2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? ze2.header.fill : e3.palette.background.paper, "& *": { ...Je(de2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${ct2} 1px` }, ...s2 }), [s2, ze2]), no2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), ao2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: we2 ? void 0 : 0, "--sxl-app-color-high-contrast": de2.palette.primary.main, "--sxl-app-color-primary": de2.palette.primary.main, "--sxl-app-color-primary-dark": de2.palette.primary.dark, "--sxl-app-color-primary-light": de2.palette.primary.light, "--sxl-app-color-info": de2.palette.info.main, "--sxl-app-color-info-dark": de2.palette.info.dark, "--sxl-app-color-info-light": de2.palette.info.light, "--sxl-app-color-secondary": de2.palette.secondary.main, "--sxl-app-color-secondary-dark": de2.palette.secondary.dark, "--sxl-app-color-secondary-light": de2.palette.secondary.light, "--sxl-app-color-success": de2.palette.success.main, "--sxl-app-color-success-dark": de2.palette.success.dark, "--sxl-app-color-success-light": de2.palette.success.light, "--sxl-app-color-warning": de2.palette.warning.main, "--sxl-app-color-warning-dark": de2.palette.warning.dark, "--sxl-app-color-warning-light": de2.palette.warning.light, "--sxl-app-color-error": de2.palette.error.main, "--sxl-app-color-error-dark": de2.palette.error.dark, "--sxl-app-color-error-light": de2.palette.error.light, "--sxl-app-color-text": de2.palette.text.primary, "--sxl-app-color-text-secondary": de2.palette.text.secondary, "--sxl-app-color-text-disabled": de2.palette.text.disabled, "--sxl-app-color-background": de2.palette.background.paper, "--sxl-app-color-button-surface": de2.palette.grey[600], "--sxl-app-color-shadow": de2.palette.action.focus, "--sxl-app-color-grey": de2.palette.grey[500], "--sxl-app-filter-dark-invert": ze2.body.darkMode && ie2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": ze2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [ze2, de2, we2]), ro2 = V(() => mt(on), []);
2110
+ return L(ue, { className: mt("sheetxl-workbook", ca, { "Mui-focusVisible": ge2 }, da, c2), sx: oo2, style: d2, square: false, ...se2, ref: ve2, onFocus: (e3) => {
2111
2111
  he2(true), It2(), m2?.(e3);
2112
2112
  }, onBlur: (e3) => {
2113
2113
  he2(false), p2?.(e3);
@@ -2120,8 +2120,8 @@ const xa = (e2) => z(fa, { ...e2 }), ba = (e2) => z(ga, { ...e2 }), ya = (e2) =>
2120
2120
  }
2121
2121
  }, onDragEnter: Gt2, onDragLeave: Gt2, onDragOver: Gt2, onDrop: Ut2, children: [L("div", { className: ro2, style: ao2, children: [ut2, it2 ? Zt2 : null, no2, eo2, pt2, to2, Pt2, jt2] }), Xt2] });
2122
2122
  }));
2123
- Pa.displayName = "WorkbookElement";
2124
- const Da = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Wt(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, Ma = $(O((e2, t2) => {
2123
+ Da.displayName = "WorkbookElement";
2124
+ const Ma = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Wt(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, Fa = $(O((e2, t2) => {
2125
2125
  const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = U(false), [p2, u2] = U(false), [g2, h2] = U(a2 ?? ""), [f2, x2] = U(""), [b2, { width: y2 }] = _t(), [w2, { width: S2 }] = _t(), [k2, C2] = U(false), v2 = q(null), T2 = q(null), R2 = Ct(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2126
2126
  T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
2127
2127
  }, focus: (e3) => {
@@ -2134,22 +2134,22 @@ const Da = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
2134
2134
  C2(false);
2135
2135
  }, 300)();
2136
2136
  }, [k2, y2]), _(() => {
2137
- u2(g2 && !eo.isValidWindowsFilename(g2));
2138
- }, [g2]), s2 ? null : z(J, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k2 ? "0" : "1", transition: k2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ut([R2, w2, t2]), ...d2, children: z(He, { label: T2.current?.requestReason ?? "Workbook Name", children: L(J, { className: mt({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === y2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Da(true, i2), ...o2 }, children: [i2 ? z(ee, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: a2 ?? r2 }) : z(le, { sx: { width: `${Math.min(y2 + 3, Math.max(S2, R2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: r2, onFocus: (e3) => {
2137
+ u2(g2 && !to.isValidWindowsFilename(g2));
2138
+ }, [g2]), s2 ? null : z(J, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k2 ? "0" : "1", transition: k2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ut([R2, w2, t2]), ...d2, children: z(He, { label: T2.current?.requestReason ?? "Workbook Name", children: L(J, { className: mt({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === y2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Ma(true, i2), ...o2 }, children: [i2 ? z(ee, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: a2 ?? r2 }) : z(le, { sx: { width: `${Math.min(y2 + 3, Math.max(S2, R2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: r2, onFocus: (e3) => {
2139
2139
  m2(true), e3.target?.select();
2140
2140
  }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: v2 }, onBlur: () => {
2141
2141
  m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && T2.current?.onAccept?.(g2, "blur")), T2.current = null);
2142
2142
  }, onChange: (e3) => {
2143
- if (e3.target.value.length > eo.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2143
+ if (e3.target.value.length > to.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2144
2144
  h2(e3.target.value);
2145
2145
  }, onKeyDown: (e3) => {
2146
- (eo.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > eo.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ft.Enter || e3.which === ft.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (T2.current?.onAccept?.(g2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ft.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2146
+ (to.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > to.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ft.Enter || e3.which === ft.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (T2.current?.onAccept?.(g2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ft.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2147
2147
  e3.target?.select();
2148
2148
  }, 0)), T2.current = null, e3.stopPropagation(), e3.preventDefault());
2149
2149
  }, value: g2 }), z(J, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || r2 })] }) }) });
2150
2150
  }));
2151
- Ma.displayName = "WorkbookTitle";
2152
- const Fa = $(O((e2, t2) => {
2151
+ Fa.displayName = "WorkbookTitle";
2152
+ const Na = $(O((e2, t2) => {
2153
2153
  const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 = St(), [i2, s2] = U(false), [d2, c2] = U(false), m2 = q(null), [p2, u2] = Z((e3) => e3 + 1, 0), [g2, { width: h2 }] = _t(), f2 = pt(n2, ["editTable"])[0].context(), x2 = f2.table(), [b2, y2] = U(() => x2 ? f2.getNames().getRanges(x2.getRange()) : null), S2 = V(() => x2?.getName() ?? "", [x2]);
2154
2154
  w(f2.table(), { onAnchorCoordsChange(e3) {
2155
2155
  y2(f2.getNames().getRanges(e3.getRange()));
@@ -2164,13 +2164,13 @@ const Fa = $(O((e2, t2) => {
2164
2164
  let v2 = null;
2165
2165
  return f2.table() || (v2 = z(ee, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), z(ue, { square: true, onFocus: () => s2(true), onBlur: (e3) => {
2166
2166
  m2?.current?.contains(e3.relatedTarget) || s2(false);
2167
- }, ref: Ut([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: mt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(J, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(J, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(J, { className: cn, children: [z(pn, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: k2, onValidate: (e3) => {
2167
+ }, ref: Ut([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: mt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(J, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(J, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(J, { className: mn, children: [z(un, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: k2, onValidate: (e3) => {
2168
2168
  x2 && x2.getName().toLowerCase() === e3.toLowerCase() || f2?.getNames().validateName(e3);
2169
2169
  }, disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2170
2170
  d2 || e3.target?.select(), c2(true);
2171
- } }), z(gn, { formName: "range", value: b2, onChangeInput: C2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2171
+ } }), z(hn, { formName: "range", value: b2, onChangeInput: C2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2172
2172
  d2 || e3.target?.select(), c2(true);
2173
- } })] }) }), L(J, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(dn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
2173
+ } })] }) }), L(J, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(cn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
2174
2174
  x2.updateStyleOptions(e3);
2175
2175
  }, showHeaderRow: x2?.getShowHeaders(), onShowHeaderRowChange: (e3) => {
2176
2176
  try {
@@ -2190,20 +2190,20 @@ const Fa = $(O((e2, t2) => {
2190
2190
  } catch (e4) {
2191
2191
  l2.showError(e4);
2192
2192
  }
2193
- } }), z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (e3) => e3.spacing(2), marginBottom: (e3) => e3.spacing(1) }, children: L("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [z(nn, { table: x2, styles: f2.styles(), bodyStyle: f2.bodyStyle(), cellHeight: 30, isLive: true }), z(Ba, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(Te, { orientation: "horizontal" }), L(J, { className: mn, children: [z(ve, { variant: ut.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ve, { variant: ut.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
2194
- })), Na = $((e2) => {
2193
+ } }), z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (e3) => e3.spacing(2), marginBottom: (e3) => e3.spacing(1) }, children: L("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [z(an, { table: x2, styles: f2.styles(), bodyStyle: f2.bodyStyle(), cellHeight: 30, isLive: true }), z(Ea, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(Te, { orientation: "horizontal" }), L(J, { className: pn, children: [z(ve, { variant: ut.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ve, { variant: ut.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
2194
+ })), Ba = $((e2) => {
2195
2195
  const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: a2, styles: r2, hasContextMenu: l2 = true, bodyStyle: i2, parentFloat: s2, commands: d2, disabled: c2, commandHook: m2, useCanvasPreview: p2 = true, canvas: u2, ...g2 } = e2, h2 = K((e3) => {
2196
2196
  const t3 = { variant: ut.Menuitem, commandHook: m2, context: "table" }, n3 = L(H, { children: [z(ve, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2 }), z(ve, { ...t3, style: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
2197
2197
  return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
2198
2198
  }, [d2]), f2 = o2?.getName() === n2, x2 = V(() => {
2199
2199
  const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
2200
- return p2 ? z(rn, { canvas: u2, ...e3 }) : z(nn, { ...e3 });
2200
+ return p2 ? z(ln, { canvas: u2, ...e3 }) : z(an, { ...e3 });
2201
2201
  }, [t2, o2, r2, i2]);
2202
2202
  let b2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
2203
2203
  a2?.(o2?.getName());
2204
2204
  }, ...g2, children: x2 }, o2.getName());
2205
2205
  return l2 && (b2 = z(Ke, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
2206
- }), Ba = $(O((e2, t2) => {
2206
+ }), Ea = $(O((e2, t2) => {
2207
2207
  const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, disabledQuickKey: d2 = false, usePreviewIcon: m2 = false, ...p2 } = e2;
2208
2208
  bt(n2);
2209
2209
  const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.table?.();
@@ -2223,7 +2223,7 @@ const Fa = $(O((e2, t2) => {
2223
2223
  C2.current || (C2.current = document.createElement("canvas"));
2224
2224
  const n3 = (e4) => {
2225
2225
  const n4 = g2().getTableStyle(e4);
2226
- return n4 ? z(Na, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: C2.current, ...o3 }, e4) : null;
2226
+ return n4 ? z(Ba, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: C2.current, ...o3 }, e4) : null;
2227
2227
  }, r3 = (e4, t4, o4 = true) => {
2228
2228
  const a3 = [];
2229
2229
  for (let e5 = 0; e5 < t4.length; e5++) {
@@ -2253,7 +2253,7 @@ const Fa = $(O((e2, t2) => {
2253
2253
  if (!u2 || !m2) return n2?.icon();
2254
2254
  }, [y2, S2, T2, n2]);
2255
2255
  return z(Pe, { ref: t2, quickCommand: d2 ? void 0 : f2, createPopupPanel: v2, commands: o2, label: n2?.label(), commandState: h2, commandHook: a2, selected: null !== h2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: T2, icon: R2, ...p2 });
2256
- })), Ea = $(O((e2, t2) => {
2256
+ })), Aa = $(O((e2, t2) => {
2257
2257
  const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
2258
2258
  bt(o2);
2259
2259
  const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = gt((e3) => {
@@ -2263,8 +2263,8 @@ const Fa = $(O((e2, t2) => {
2263
2263
  let l3 = e3.children;
2264
2264
  return (h2 || t3) && (l3 = z("div", { children: l3 })), z(We, { command: o2, placement: c2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
2265
2265
  }, [o2, h2]);
2266
- return z(bn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
2267
- })), Aa = $(O((e2, t2) => {
2266
+ return z(yn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
2267
+ })), Ia = $(O((e2, t2) => {
2268
2268
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["themeMode"])[0], s2 = gt((e3, t3) => {
2269
2269
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: i2 }), z(ve, { ...o3, command: t3.getCommand("defaultThemeMode") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("enableDarkGrid") }), z(ve, { ...o3, command: t3.getCommand("enableDarkImages") })] });
2270
2270
  return Re({ ...e3, children: a3 });
@@ -2272,7 +2272,7 @@ const Fa = $(O((e2, t2) => {
2272
2272
  return z(Pe, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: s2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
2273
2273
  i2?.execute(m2 ? "light" : "dark", n2);
2274
2274
  }, selected: p2, ...l2 });
2275
- })), Ia = $(O((e2, t2) => {
2275
+ })), La = $(O((e2, t2) => {
2276
2276
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = K((e3, t3) => {
2277
2277
  const o3 = { variant: ut.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
2278
2278
  const a4 = n2?.beforeExecute?.(t4, o4);
@@ -2281,12 +2281,12 @@ const Fa = $(O((e2, t2) => {
2281
2281
  return Re({ ...e3, children: a3 });
2282
2282
  }, [r2, n2]);
2283
2283
  return z(Pe, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: z(xt, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...i2 });
2284
- })), La = $(O((e2, t2) => {
2284
+ })), Ha = $(O((e2, t2) => {
2285
2285
  const { ...o2 } = e2;
2286
2286
  return z(je, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
2287
2287
  }));
2288
- La.displayName = "InsertFunctionSumCommandPopupButton";
2289
- const Ha = 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((e2) => [e2.key, e2])), za = $((e2) => {
2288
+ Ha.displayName = "InsertFunctionSumCommandPopupButton";
2289
+ const za = 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((e2) => [e2.key, e2])), Wa = $((e2) => {
2290
2290
  const { command: t2, formulaFunction: o2, commandHook: n2, disabled: a2 = false, parentFloat: r2, handleInsert: l2, icon: i2, label: s2, sx: d2, ...c2 } = e2, m2 = new Promise((e3) => {
2291
2291
  o2.getDescriptor().then((t3) => {
2292
2292
  e3(t3.getSummary());
@@ -2299,17 +2299,17 @@ const Ha = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinanc
2299
2299
  }, onKeyDown: (e3) => {
2300
2300
  e3.keyCode === ft.Enter || (e3.keyCode, ft.Space);
2301
2301
  }, ...c2, children: z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", children: o2.getName() }) }) });
2302
- }), Wa = $(O((e2, t2) => {
2302
+ }), $a = $(O((e2, t2) => {
2303
2303
  const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = pt(n2, ["insertFunction"])[0], m2 = K((e3, t3) => {
2304
- const n3 = Ha.get(o2);
2304
+ const n3 = za.get(o2);
2305
2305
  if (!n3) return console.warn("invalidate category", o2), null;
2306
- const r3 = { commandHook: a2, ...e3 }, l3 = z($a, { category: n3.label, ...r3, commands: t3 });
2306
+ const r3 = { commandHook: a2, ...e3 }, l3 = z(Oa, { category: n3.label, ...r3, commands: t3 });
2307
2307
  return Re({ ...e3, children: l3 });
2308
- }, [o2, c2, a2, r2]), p2 = Ha.get(o2);
2309
- return z(Pe, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: Ha.get(o2)?.icon ?? "FormulaGroup", ...d2 });
2308
+ }, [o2, c2, a2, r2]), p2 = za.get(o2);
2309
+ return z(Pe, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: za.get(o2)?.icon ?? "FormulaGroup", ...d2 });
2310
2310
  }));
2311
- Wa.displayName = "InsertFunctionCommandPopupButton";
2312
- const $a = $(O((e2, t2) => {
2311
+ $a.displayName = "InsertFunctionCommandPopupButton";
2312
+ const Oa = $(O((e2, t2) => {
2313
2313
  const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = pt(o2, ["insertFunction"]), [i2, s2] = U([]), [d2, c2] = U(false);
2314
2314
  _(() => {
2315
2315
  (async () => {
@@ -2323,22 +2323,22 @@ const $a = $(O((e2, t2) => {
2323
2323
  };
2324
2324
  for (let e3 = 0; e3 < m2; e3++) {
2325
2325
  const t3 = i2[e3];
2326
- p2[e3] = z(za, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
2326
+ p2[e3] = z(Wa, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
2327
2327
  }
2328
2328
  return Re({ ...r2, children: z(J, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? z(H, { children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
2329
- })), Oa = $(O((e2, t2) => {
2329
+ })), Va = $(O((e2, t2) => {
2330
2330
  const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
2331
2331
  r2 && g.setLicenseKey(r2);
2332
2332
  const s2 = V(() => {
2333
2333
  const e3 = { transitionDelay: "160ms", transparentBackground: true };
2334
2334
  return z(J, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? z(Fe, { ...e3 }) });
2335
- }, [o2, n2, l2]), d2 = V(() => W.lazy(async () => await Promise.resolve().then(() => rr)), []);
2335
+ }, [o2, n2, l2]), d2 = V(() => W.lazy(async () => await Promise.resolve().then(() => lr)), []);
2336
2336
  return z(H, { children: z(j, { fallback: s2, children: z(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2337
2337
  }));
2338
- Oa.displayName = "Studio";
2339
- const Va = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], Ka = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
2340
- class Ga {
2341
- constructor(e2 = Va, t2 = Ka) {
2338
+ Va.displayName = "Studio";
2339
+ const Ka = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], Ga = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
2340
+ class Ua {
2341
+ constructor(e2 = Ka, t2 = Ga) {
2342
2342
  this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...e2]), this._writeFormatType = Object.freeze([...t2]);
2343
2343
  }
2344
2344
  getReadFormats() {
@@ -2379,21 +2379,21 @@ class Ga {
2379
2379
  }
2380
2380
  }
2381
2381
  }
2382
- const Ua = new Ga(), _a = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, ja = O((e2, t2) => {
2383
- const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = to(), d2 = zt(), [c2, m2] = U(false), p2 = r2 && !(r2 instanceof Xt), u2 = K(() => {
2382
+ const _a = new Ua(), ja = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, qa = $(O((e2, t2) => {
2383
+ const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = oo(), d2 = zt(), [c2, m2] = U(false), p2 = Xt.collectErrorChain(r2, true)?.[0]?.error, u2 = p2 && !(p2 instanceof Zt), g2 = K(() => {
2384
2384
  m2((e3) => !e3);
2385
- }, []), g2 = K(() => {
2385
+ }, []), h2 = K(() => {
2386
2386
  s2(o2);
2387
2387
  }, [o2, s2]);
2388
- let h2 = r2?.message;
2389
- return !h2 && G(n2) && (h2 = n2), h2 || "string" != typeof n2 || (h2 = n2), h2 || (h2 = `Unknown Error: ${n2}`), z(oo, { ref: t2, className: mt(_a.root, "error-snackbar"), children: L(ye, { className: _a.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: _a.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: _a.typography, children: h2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: _a.icons, children: [p2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(_a.expand, { [_a.expandOpen]: c2 }), onClick: u2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: _a.expand, onClick: g2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), p2 ? z(Se, { in: c2, timeout: "auto", unmountOnExit: true, children: z("div", { className: _a.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2390
- });
2391
- ja.displayName = "ToastError";
2392
- const qa = $(O((e2, t2) => {
2388
+ let f2 = p2?.message;
2389
+ return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(no, { ref: t2, className: mt(ja.root, "error-snackbar"), children: L(ye, { className: ja.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: ja.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: ja.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: ja.icons, children: [u2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(ja.expand, { [ja.expandOpen]: c2 }), onClick: g2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: ja.expand, onClick: h2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(Se, { in: c2, timeout: "auto", children: z("div", { className: ja.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2390
+ }));
2391
+ qa.displayName = "ToastError";
2392
+ const Xa = $(O((e2, t2) => {
2393
2393
  const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = gt((e3) => {
2394
2394
  const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("newWorkbook") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("openWorkbook") }), z(Pe, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
2395
2395
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
2396
- return Ua.getWriteFormats().forEach((e5) => {
2396
+ return _a.getWriteFormats().forEach((e5) => {
2397
2397
  if (e5.isDefault) return;
2398
2398
  const t4 = e5.key, r3 = o2.getCommand(`saveWorkbookAs${t4}`);
2399
2399
  r3 ? a3.push(X(ve, { ...n3, key: t4, command: r3 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${t4}'`);
@@ -2407,40 +2407,40 @@ const qa = $(O((e2, t2) => {
2407
2407
  }, [r2, o2, n2, a2]), s2 = "File";
2408
2408
  return z(Pe, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: s2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e3) => `calc(1.25rem + ${e3.spacing(2)}px)` } }, ...l2, createPopupPanel: i2, icon: z(Oe, { className: "label", icon: null, label: s2 }) });
2409
2409
  }));
2410
- qa.displayName = "StandaloneFileCommandButton";
2411
- const Xa = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(J, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(E, { onClick: () => {
2410
+ Xa.displayName = "StandaloneFileCommandButton";
2411
+ const Za = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(J, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(E, { onClick: () => {
2412
2412
  window?.open("https://www.sheetxl.com", "_blank");
2413
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Za = $(O((e2, t2) => {
2414
- const { commands: o2, workbook: n2, logo: a2 = Xa, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = _t(), p2 = m2 < 530, u2 = l2 ? z(qa, { commands: o2, commandHook: { beforeExecute() {
2413
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Ya = $(O((e2, t2) => {
2414
+ const { commands: o2, workbook: n2, logo: a2 = Za, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = _t(), p2 = m2 < 530, u2 = l2 ? z(Xa, { commands: o2, commandHook: { beforeExecute() {
2415
2415
  d2?.closeAll();
2416
2416
  }, onError(e3, t3, o3) {
2417
- } } }) : null, g2 = i2 ? z(Aa, { commands: o2, commandHook: { beforeExecute() {
2417
+ } } }) : null, g2 = i2 ? z(Ia, { commands: o2, commandHook: { beforeExecute() {
2418
2418
  d2?.closeAll();
2419
2419
  }, onError(e3, t3, o3) {
2420
2420
  } } }) : null, h2 = V(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = q(null);
2421
- return z(J, { ref: Ut([f2, c2, t2]), ...s2, children: ta({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => L(J, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), z(J, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2421
+ return z(J, { ref: Ut([f2, c2, t2]), ...s2, children: oa({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => L(J, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), z(J, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2422
2422
  }));
2423
- Za.displayName = "StudioToolbar";
2424
- const Ya = $((e2) => {
2423
+ Ya.displayName = "StudioToolbar";
2424
+ const Qa = $((e2) => {
2425
2425
  const { workbook: t2, setWorkbook: o2, refWorkbookTitle: n2, titleWorkbook: a2, setWorkbookTitle: r2, titlePlaceHolder: l2, children: i2, undoManager: s2, commands: d2, importExportDisabled: c2, themeOptions: m2 } = e2, p2 = ((e3) => {
2426
2426
  const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, requestWorkbookTitle: l3, themeOptions: i3, undoManager: s3, commands: d3, onExecute: c3 } = e3, m3 = St(), p3 = gt(i3?.onModeChange, [i3?.onModeChange]), u3 = gt(i3?.onEnabledDarkGridChange, [i3?.onEnabledDarkGridChange]), g3 = gt(i3?.onEnabledDarkImagesChange, [i3?.onEnabledDarkImagesChange]), h2 = gt(async (e4 = null, t4 = null) => {
2427
2427
  const o4 = [];
2428
2428
  let n4, a4 = null, r4 = null;
2429
- if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await jt.openFileDialog(r4 ?? Ua.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2429
+ if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await jt.openFileDialog(r4 ?? _a.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2430
2430
  const l4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
2431
2431
  o4.push(e5);
2432
- } }, i4 = await Ua.read(l4, m3);
2432
+ } }, i4 = await _a.read(l4, m3);
2433
2433
  return o4.length > 0 && (m3.showMessage("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), i4;
2434
2434
  }, [c3, m3, t3]), f2 = gt(async (e4, t4, o4) => {
2435
2435
  if (!t4 && l3) {
2436
2436
  const t5 = await l3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2437
- return null !== t5 && Ua.writeFile(t5, e4, { formatType: o4.key });
2437
+ return null !== t5 && _a.writeFile(t5, e4, { formatType: o4.key });
2438
2438
  }
2439
- return Ua.writeFile(t4, e4, { formatType: o4.key });
2439
+ return _a.writeFile(t4, e4, { formatType: o4.key });
2440
2440
  }, [m3, t3, l3]), x2 = K(() => ({ contains: (e4) => true, focus() {
2441
2441
  } }), []), b2 = V(() => {
2442
2442
  const e4 = [];
2443
- n3 || (Ua.getWriteFormats().forEach((o4) => {
2443
+ n3 || (_a.getWriteFormats().forEach((o4) => {
2444
2444
  const n4 = o4.isDefault, r4 = { label: n4 ? "Save Workbook" : `Save Workbook as ${o4.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${o4.description}` }, tags: o4.tags, description: `Save the workbook to the desktop${n4 ? "" : ` as ${o4.description}`}.`, icon: "FileDownloadAsSheet" };
2445
2445
  n4 && (r4.shortcut = { key: "S", modifiers: [Dt.Ctrl] }, e4.push(new Pt("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Dt.Shift, Dt.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2446
2446
  f2(t3, null, o4).catch((e5) => {
@@ -2515,7 +2515,7 @@ const Ya = $((e2) => {
2515
2515
  const { showModal: k2 } = nt();
2516
2516
  return _(() => {
2517
2517
  const e4 = () => new Promise((e5, t4) => {
2518
- const o4 = W.lazy(() => import("./CQhaL28vV1X6Xt2N.mjs")), n4 = k2(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2518
+ const o4 = W.lazy(() => import("./D60xUWK_BS-7PMLM.mjs")), n4 = k2(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2519
2519
  n4.hide();
2520
2520
  }, slotProps: { transition: { onExited: () => {
2521
2521
  e5(true);
@@ -2528,12 +2528,12 @@ const Ya = $((e2) => {
2528
2528
  t3(e4);
2529
2529
  }, { selectAll: true, requestReason: e3 }) : t3(l2);
2530
2530
  }), themeOptions: m2, undoManager: s2, onExecute: K(() => {
2531
- }, []) }), u2 = V(() => z(Ia, { commands: p2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [p2]), g2 = { commands: p2 };
2531
+ }, []) }), u2 = V(() => z(La, { commands: p2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [p2]), g2 = { commands: p2 };
2532
2532
  return t2 && (g2.statusBarProps = { childrenEnd: u2 }), i2 ? W.cloneElement(i2, g2) : null;
2533
2533
  });
2534
- Ya.displayName = "CommandsWrapper";
2535
- const Qa = $((e2) => {
2536
- const { children: t2 } = e2, o2 = to(), n2 = o2 ? o2.enqueueSnackbar : () => {
2534
+ Qa.displayName = "CommandsWrapper";
2535
+ const Ja = $((e2) => {
2536
+ const { children: t2 } = e2, o2 = oo(), n2 = o2 ? o2.enqueueSnackbar : () => {
2537
2537
  }, a2 = o2 ? o2.closeSnackbar : () => {
2538
2538
  }, [r2, l2] = U({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), i2 = K(() => {
2539
2539
  l2((e3) => ({ ...e3, isMounted: true }));
@@ -2562,10 +2562,10 @@ const Qa = $((e2) => {
2562
2562
  const n3 = { ...t4, onKeyDown: (e5) => {
2563
2563
  e5.isDefaultPrevented() || e5.isPropagationStopped() || t4?.onKeyDown?.(e5);
2564
2564
  } };
2565
- return c2(e4, { sort: () => import("./BimlBylqyslj9fNg.mjs"), numberFormat: () => import("./X3qO0PKREgY9FMZU.mjs"), hyperlink: () => import("./BnGsbrQwjcaUFAdt.mjs"), comments: () => import("./rOozeXREjiU8jjPd.mjs"), find: () => import("./BVKo3uc0IreLNkkN.mjs"), tableNew: () => import("./DB2ryaj4_Y8Lgyy_.mjs"), namedDetails: () => import("./BgR1PWucIb0Zucr4.mjs") }[e4], n3, o4);
2565
+ return c2(e4, { sort: () => import("./DmdldJQanZCNdfA5.mjs"), numberFormat: () => import("./BAgtosqQwtrUsOYl.mjs"), hyperlink: () => import("./Cfzjf7vBs29sO_g3.mjs"), comments: () => import("./CYU-oRRhaNiOTVNa.mjs"), find: () => import("./B21Usvp_sTqMHAZ4.mjs"), tableNew: () => import("./GzNLdpzukdCxYbbC.mjs"), namedDetails: () => import("./DWhJA7EI9CmoBPDY.mjs") }[e4], n3, o4);
2566
2566
  }, showOptions: m2, showInputOptions: p2, showError: (t4) => {
2567
2567
  let o4, n3 = kt.Error, a3 = "Unknown Error";
2568
- "string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Zt && (n3 = kt.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
2568
+ "string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Yt && (n3 = kt.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
2569
2569
  } }, o3 = new Et();
2570
2570
  return o3.setOverrides(t3), o3;
2571
2571
  }, []);
@@ -2590,8 +2590,8 @@ const Qa = $((e2) => {
2590
2590
  0 !== r2.starting.size || 0 !== r2.running.size ? f2(z(Fe, { icon: z(it, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: r2.label, onMount: i2, onUnmount: s2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : f2(null);
2591
2591
  }, [r2.starting, r2.running]), L(At, { notifier: g2, children: [h2, t2] });
2592
2592
  });
2593
- Qa.displayName = "SnackbarWrapper";
2594
- const Ja = $(O((e2, t2) => {
2593
+ Ja.displayName = "SnackbarWrapper";
2594
+ const er = $(O((e2, t2) => {
2595
2595
  const { children: o2, title: n2, taskPanes: a2, onSelect: r2, selected: l2, registry: i2 = T, style: s2, iconsOnly: d2, className: c2, ...m2 } = e2, p2 = V(() => a2.map((t3) => {
2596
2596
  const o3 = i2.getRegisteredTaskPane(t3);
2597
2597
  if (!o3) return null;
@@ -2603,7 +2603,7 @@ const Ja = $(O((e2, t2) => {
2603
2603
  return z(J, { ref: u2, className: g2, sx: { paddingLeft: "2px", paddingTop: "4px", ...s2 }, ...m2, children: z(fe, { orientation: "vertical", variant: "scrollable", value: l2, onChange: (e3, t3) => {
2604
2604
  r2(t3);
2605
2605
  }, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: p2 }) });
2606
- })), er = (e2, t2) => z(Ja, { ref: t2, ...e2 }), tr = W.forwardRef((e2, t2) => {
2606
+ })), tr = (e2, t2) => z(er, { ref: t2, ...e2 }), or = W.forwardRef((e2, t2) => {
2607
2607
  const { commands: o2, model: n2, ...a2 } = e2, r2 = zt(), l2 = `solid ${Wt(r2.palette.divider, 0.2)} 1px`, i2 = `${r2.shape.borderRadius ?? 4}px`, s2 = `${r2.spacing?.(0.5) ?? 4}px`, d2 = q(null);
2608
2608
  return z(A, { model: n2, ref: t2, frameProps: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3, t3) => {
2609
2609
  const { title: o3, icon: n3, onClose: a3, readOnly: r3, focused: l3, ...i3 } = e3;
@@ -2612,22 +2612,22 @@ const Ja = $(O((e2, t2) => {
2612
2612
  }, onPointerUp: () => {
2613
2613
  a3();
2614
2614
  }, children: z(xt, { iconKey: "Close" }) }) })] }) });
2615
- }, renderTaskPaneStrip: er, ...e2, onOpen: () => {
2615
+ }, renderTaskPaneStrip: tr, ...e2, onOpen: () => {
2616
2616
  e2?.onOpen?.();
2617
2617
  }, onClose: () => {
2618
2618
  e2?.onClose?.();
2619
2619
  }, commands: o2, ...a2 });
2620
- }), or = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, nr = $(O((e2, t2) => {
2620
+ }), nr = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, ar = $(O((e2, t2) => {
2621
2621
  const { mainElement: o2, sidebarElement: n2, className: a2, style: r2, ...l2 } = e2, i2 = zt(), [s2, { width: d2 }] = _t(), c2 = d2 > 530 || 0 === d2, m2 = q(null);
2622
2622
  let p2 = null, u2 = 4, g2 = 13;
2623
- return c2 ? p2 = "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" : (p2 = "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", u2 = 13, g2 = 4), z(vt, { ref: Ut([m2, s2, t2]), className: a2, style: r2 ? { ...or, ...r2 } : or, ...l2, fixedPane: "after", position: "40%", minAfter: c2 ? "280px" : "120px", splitDirection: c2 ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: c2 ? "6px" : void 0, minHeight: c2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${u2}' height='${g2}' viewBox='0 0 ${u2} ${g2}' version='1.1' fill='${i2.palette.text.icon ?? i2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p2}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: c2 ? "left center" : "top center" } }, elementBefore: o2, paneBeforeProps: { style: { flexDirection: "column", marginRight: n2 ? void 0 : "6px" } }, elementAfter: n2, paneAfterProps: { style: { marginLeft: c2 ? "0px" : "4px", marginRight: c2 ? "8px" : "4px" } } });
2623
+ return c2 ? p2 = "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" : (p2 = "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", u2 = 13, g2 = 4), z(vt, { ref: Ut([m2, s2, t2]), className: a2, style: r2 ? { ...nr, ...r2 } : nr, ...l2, fixedPane: "after", position: "40%", minAfter: c2 ? "280px" : "120px", splitDirection: c2 ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: c2 ? "6px" : void 0, minHeight: c2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${u2}' height='${g2}' viewBox='0 0 ${u2} ${g2}' version='1.1' fill='${i2.palette.text.icon ?? i2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p2}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: c2 ? "left center" : "top center" } }, elementBefore: o2, paneBeforeProps: { style: { flexDirection: "column", marginRight: n2 ? void 0 : "6px" } }, elementAfter: n2, paneAfterProps: { style: { marginLeft: c2 ? "0px" : "4px", marginRight: c2 ? "8px" : "4px" } } });
2624
2624
  }));
2625
- nr.displayName = "StudioSplitPane";
2626
- It.register("plugin-scripts", { icons: {} }), T.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: jn }, true);
2627
- const ar = $(O((e2, t2) => {
2625
+ ar.displayName = "StudioSplitPane";
2626
+ It.register("plugin-scripts", { icons: {} }), T.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: qn }, true);
2627
+ const rr = $(O((e2, t2) => {
2628
2628
  const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = st, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: x2 = false, commands: b2, title: y2, onTitleChange: w2, titleProps: S2, renderLoadingPanel: k2, ...C2 } = e2, v2 = q(null), T2 = gt(p2, [p2]), P2 = gt(w2 ?? S2?.onTitleChange, [w2 ?? S2?.onTitleChange]), D2 = S2?.placeHolder ?? "Untitled", M2 = f2?.mode, { themeMode: F2, source: N2 } = tt({ mode: M2 }), B2 = V(() => ({ ...f2, light: dt(false, jt.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: dt(true, jt.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), E2 = F2 === ot.Dark, [A2, H2] = U(null);
2629
2629
  _(() => {
2630
- H2(i2 ?? new Yt());
2630
+ H2(i2 ?? new Qt());
2631
2631
  }, [i2]);
2632
2632
  const [W2, $2] = U(null), [O2, G2] = U(null), j2 = R();
2633
2633
  Q(() => {
@@ -2641,7 +2641,7 @@ const ar = $(O((e2, t2) => {
2641
2641
  (async () => {
2642
2642
  try {
2643
2643
  let e3, t3 = await Promise.resolve(O2);
2644
- t3 && t3.source && (t3 = await Ua.read(t3)), t3.workbook ? (te2(t3.title), e3 = t3.workbook) : e3 = t3, T2?.(e3), $2({ workbook: e3 });
2644
+ t3 && t3.source && (t3 = await _a.read(t3)), t3.workbook ? (te2(t3.title), e3 = t3.workbook) : e3 = t3, T2?.(e3), $2({ workbook: e3 });
2645
2645
  } catch (e3) {
2646
2646
  T2?.(null), $2({ error: e3 });
2647
2647
  }
@@ -2679,9 +2679,9 @@ const ar = $(O((e2, t2) => {
2679
2679
  }, [X2]);
2680
2680
  const ie2 = q(null), se2 = K((e3) => {
2681
2681
  let t3 = null;
2682
- return S2?.hidden || (t3 = z(Ma, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
2682
+ return S2?.hidden || (t3 = z(Fa, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
2683
2683
  te2(e4);
2684
- } })), z(Za, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
2684
+ } })), z(Ya, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
2685
2685
  }, [u2, ee2, S2, B2, g2, ae2]);
2686
2686
  _(() => {
2687
2687
  const e3 = (e4) => e4.preventDefault();
@@ -2692,100 +2692,100 @@ const ar = $(O((e2, t2) => {
2692
2692
  const de2 = V(() => {
2693
2693
  const e3 = { transparentBackground: true };
2694
2694
  return z(J, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: k2?.(e3) ?? z(Fe, { ...e3 }) });
2695
- }, [n2, a2, k2]), ce2 = K(({ error: e3 }) => (l2?.(e3), z(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), me2 = V(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), [pe2, ue2] = U(null), ge2 = K((e3, t3) => z(tr, { ref: t3, model: O2, commands: ae2, ...e3 }), [ae2, O2]), he2 = K((e3) => z(nr, { mainElement: e3, sidebarElement: pe2 }), [pe2]), fe2 = Ut([v2, t2]), xe2 = V(() => {
2695
+ }, [n2, a2, k2]), ce2 = K(({ error: e3 }) => (l2?.(e3), z(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), me2 = V(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), [pe2, ue2] = U(null), ge2 = K((e3, t3) => z(or, { ref: t3, model: O2, commands: ae2, ...e3 }), [ae2, O2]), he2 = K((e3) => z(ar, { mainElement: e3, sidebarElement: pe2 }), [pe2]), fe2 = Ut([v2, t2]), xe2 = V(() => {
2696
2696
  if (!W2) return de2;
2697
2697
  if (W2.error || !W2.workbook) return ce2({ error: W2.error });
2698
2698
  let e3 = null, t3 = null, n3 = false;
2699
- return B2 && (e3 = E2 ? B2.dark : B2.light, t3 = E2 && B2.enableDarkGrid ? B2.dark : B2.light, n3 = B2.enableDarkImages), z(Pa, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: fe2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2699
+ return B2 && (e3 = E2 ? B2.dark : B2.light, t3 = E2 && B2.enableDarkGrid ? B2.dark : B2.light, n3 = B2.enableDarkImages), z(Da, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: fe2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2700
2700
  d2?.(e4);
2701
2701
  }, renderLoadingPanel: k2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, mainWrapper: he2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
2702
2702
  }, [W2, ee2, A2, de2, k2, B2, C2, se2, me2, he2]);
2703
- let be2 = z(no, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2703
+ let be2 = z(ao, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2704
2704
  v2.current?.focus();
2705
- }, Components: { error: ja }, iconVariant: { success: z(re, { style: { marginRight: "8px" }, children: z("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: z(xt, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: z(I, { createArea: ge2, onUpdateArea: (e3) => {
2705
+ }, Components: { error: qa }, iconVariant: { success: z(re, { style: { marginRight: "8px" }, children: z("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: z(xt, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: z(I, { createArea: ge2, onUpdateArea: (e3) => {
2706
2706
  ue2(e3);
2707
- }, children: z(ct, { children: z(Qa, { children: z(Lt, { children: z(Ht, { children: z(Ya, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
2707
+ }, children: z(ct, { children: z(Ja, { children: z(Lt, { children: z(Ht, { children: z(Qa, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
2708
2708
  return B2 && (be2 = L(Ot, { theme: E2 ? B2.dark : B2.light, children: [B2.cssBaseline ? z(Ce, {}) : null, be2] })), be2;
2709
2709
  }));
2710
- ar.displayName = "EagerStudio";
2711
- const rr = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: ar, default: ar }, Symbol.toStringTag, { value: "Module" }));
2710
+ rr.displayName = "EagerStudio";
2711
+ const lr = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: rr, default: rr }, Symbol.toStringTag, { value: "Module" }));
2712
2712
  export {
2713
- Aa as AppearanceCommandButton,
2714
- co as AutoColorPosition,
2715
- Do as BorderCommandButton,
2716
- Po as BorderPopupButton,
2717
- Ro as BorderStyleButton,
2718
- go as C,
2719
- Io as ClearCommandButton,
2720
- fo as ColorButton,
2721
- Wo as ColorCommandButton,
2722
- So as ColorPanel,
2723
- so as ColorPanelType,
2724
- Co as ColorPopupButton,
2713
+ Ia as AppearanceCommandButton,
2714
+ mo as AutoColorPosition,
2715
+ Mo as BorderCommandButton,
2716
+ Do as BorderPopupButton,
2717
+ Po as BorderStyleButton,
2718
+ ho as C,
2719
+ Lo as ClearCommandButton,
2720
+ xo as ColorButton,
2721
+ $o as ColorCommandButton,
2722
+ ko as ColorPanel,
2723
+ co as ColorPanelType,
2724
+ vo as ColorPopupButton,
2725
2725
  DefaultTaskPaneRegistry,
2726
- zo as DeleteCellsCommandButton,
2727
- Ea as DocThemeCommandButton,
2728
- ar as EagerStudio,
2729
- Lo as FillCommandButton,
2730
- vn as FilterColumnMenu,
2731
- Vo as FilterCommandButton,
2732
- Tn as Filters,
2733
- No as FindCommandButton,
2734
- _o as FontFamilyCommandButton,
2735
- Bo as FontSizeCommandButton,
2736
- Cn as FormulaBar,
2737
- Fo as FreezeCommandButton,
2738
- Ia as HelpCommandButton,
2739
- ao as HorizontalAlignCommandButton,
2740
- Ho as InsertCellsCommandButton,
2741
- Wa as InsertFunctionCommandPopupButton,
2742
- La as InsertFunctionSumCommandPopupButton,
2743
- Qn as InsertImageCommandButton,
2726
+ Wo as DeleteCellsCommandButton,
2727
+ Aa as DocThemeCommandButton,
2728
+ rr as EagerStudio,
2729
+ Ho as FillCommandButton,
2730
+ Tn as FilterColumnMenu,
2731
+ Ko as FilterCommandButton,
2732
+ Rn as Filters,
2733
+ Bo as FindCommandButton,
2734
+ jo as FontFamilyCommandButton,
2735
+ Eo as FontSizeCommandButton,
2736
+ vn as FormulaBar,
2737
+ No as FreezeCommandButton,
2738
+ La as HelpCommandButton,
2739
+ ro as HorizontalAlignCommandButton,
2740
+ zo as InsertCellsCommandButton,
2741
+ $a as InsertFunctionCommandPopupButton,
2742
+ Ha as InsertFunctionSumCommandPopupButton,
2743
+ Jn as InsertImageCommandButton,
2744
2744
  LicenseManager,
2745
- Mo as MergeCommandButton,
2746
- Sn as NamedCollectionEditor,
2747
- pn as NamedInput,
2748
- Ao as NumberFormatCommandButton,
2749
- Xo as PasteCommandButton,
2750
- en as PresetCellStylesCommandButton,
2751
- Ba as PresetTableStylesCommandButton,
2752
- gn as RangeInput,
2753
- Rn as SheetTab,
2754
- Pn as SheetTabMenu,
2755
- yn as SheetZoomScale,
2756
- Dn as SheetsAllMenu,
2757
- Oo as SortFilterCommandButton,
2758
- wn as StatusBar,
2759
- Oa as Studio,
2760
- To as StyledStrokeIcon,
2761
- Fa as TableDetailsPanel,
2762
- rn as TableStyleCanvasPreview,
2763
- dn as TableStyleOptionsPanel,
2764
- nn as TableStylePreview,
2765
- jo as TextEffectsCommandButton,
2766
- lo as TextOverflowCommandButton,
2767
- io as TextRotateCommandButton,
2768
- fn as ThemeSelectButton,
2769
- xn as ThemeSelectPanel,
2770
- bn as ThemeSelectPopupButton,
2771
- qo as UnderlineCommandButton,
2772
- Ko as UndoRedoCommandButton,
2773
- ro as VerticalAlignCommandButton,
2774
- $o as ViewGridLinesCommandButton,
2775
- Zo as ViewHeadingsCommandButton,
2776
- ha as WalkingCopyCommandButton,
2777
- ga as WorkbookContextMenu,
2778
- Pa as WorkbookElement,
2779
- Ua as WorkbookIO,
2780
- ua as WorkbookStrip,
2781
- Ma as WorkbookTitle,
2782
- Yo as WorkbookViewCommandButton,
2783
- Ga as _WorkbookIO,
2784
- In as createGridStyleFromMUITheme,
2785
- Oa as default,
2786
- ia as defaultNewWorkbook,
2787
- En as setPrintExamplesOnLoad,
2745
+ Fo as MergeCommandButton,
2746
+ kn as NamedCollectionEditor,
2747
+ un as NamedInput,
2748
+ Io as NumberFormatCommandButton,
2749
+ Zo as PasteCommandButton,
2750
+ tn as PresetCellStylesCommandButton,
2751
+ Ea as PresetTableStylesCommandButton,
2752
+ hn as RangeInput,
2753
+ Pn as SheetTab,
2754
+ Dn as SheetTabMenu,
2755
+ wn as SheetZoomScale,
2756
+ Mn as SheetsAllMenu,
2757
+ Vo as SortFilterCommandButton,
2758
+ Sn as StatusBar,
2759
+ Va as Studio,
2760
+ Ro as StyledStrokeIcon,
2761
+ Na as TableDetailsPanel,
2762
+ ln as TableStyleCanvasPreview,
2763
+ cn as TableStyleOptionsPanel,
2764
+ an as TableStylePreview,
2765
+ qo as TextEffectsCommandButton,
2766
+ io as TextOverflowCommandButton,
2767
+ so as TextRotateCommandButton,
2768
+ xn as ThemeSelectButton,
2769
+ bn as ThemeSelectPanel,
2770
+ yn as ThemeSelectPopupButton,
2771
+ Xo as UnderlineCommandButton,
2772
+ Go as UndoRedoCommandButton,
2773
+ lo as VerticalAlignCommandButton,
2774
+ Oo as ViewGridLinesCommandButton,
2775
+ Yo as ViewHeadingsCommandButton,
2776
+ fa as WalkingCopyCommandButton,
2777
+ ha as WorkbookContextMenu,
2778
+ Da as WorkbookElement,
2779
+ _a as WorkbookIO,
2780
+ ga as WorkbookStrip,
2781
+ Fa as WorkbookTitle,
2782
+ Qo as WorkbookViewCommandButton,
2783
+ Ua as _WorkbookIO,
2784
+ Ln as createGridStyleFromMUITheme,
2785
+ Va as default,
2786
+ sa as defaultNewWorkbook,
2787
+ An as setPrintExamplesOnLoad,
2788
2788
  useModelListener,
2789
2789
  useRangeListener,
2790
- la as useWorkbookCommands
2790
+ ia as useWorkbookCommands
2791
2791
  };