@sheetxl/studio-mui 0.7.1 → 0.7.2

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 (40) hide show
  1. package/browser/cjs/{0zdoj4t5vs4_eedx.cjs → B7w0OTmhuQrwQqVN.cjs} +2 -2
  2. package/browser/cjs/{SHUNdN6YerUm_zh0.cjs → BAbmJ4Ls0UAVWref.cjs} +3 -3
  3. package/browser/cjs/{BqeuvIOd7paX49hb.cjs → BTKJQTAiNX3PUH4J.cjs} +1 -1
  4. package/browser/cjs/{BrZGlewrJRyfwOLN.cjs → BvWKmFKC47AMDMFu.cjs} +2 -2
  5. package/browser/cjs/{C1mdbBdeeSE8j-2l.cjs → BwWj-AITfsL6qDpj.cjs} +1 -1
  6. package/browser/cjs/{j4O3LbnV-MQdCGnL.cjs → DI5l6QVkb01TsEwV.cjs} +2 -2
  7. package/browser/cjs/{DYJ5-2E_Cpgl7HHy.cjs → DZhb2mEKXfkKfz6x.cjs} +1 -1
  8. package/browser/cjs/{Bei8eu0nt3Be_0kq.cjs → DpVOTM5LqKLF9WSk.cjs} +1 -1
  9. package/browser/cjs/{C2WMAokhAaY1Q6aY.cjs → Dz_LzICPkmdzQlzy.cjs} +11 -11
  10. package/browser/cjs/{ZDi3YpVyXEp6VHRa.cjs → JOT43QluehBYwrKS.cjs} +1 -1
  11. package/browser/cjs/{Cu7zxL8vVf7_VpGg.cjs → Sm5xZWmdTjSCJxOx.cjs} +2 -2
  12. package/browser/cjs/{t30TUk-Pz0O3XsA2.cjs → Vrlvn1CfPRQisLYL.cjs} +2 -2
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/{zOdyr84LEC1-M-34.mjs → C4RZiafsbwfiLz-C.mjs} +1 -1
  15. package/browser/esm/{y1aA5EMpqvX0xsDJ.mjs → CGIwipEW4v4OPSB8.mjs} +1 -1
  16. package/browser/esm/{BlIMq3KT4ikbn85d.mjs → CMzmkaChmbnHntkb.mjs} +2 -2
  17. package/browser/esm/{Dj3g4V86aooyEmN8.mjs → CPjkuTz3sLh-etcJ.mjs} +1 -1
  18. package/browser/esm/{C5NceR-7xtfPeNDx.mjs → CPuHFKqFT5LF6fXj.mjs} +1 -1
  19. package/browser/esm/{Cmegw_5Z1vXfsU7M.mjs → CzxKHjziUuDxKzIn.mjs} +2 -2
  20. package/browser/esm/{BSkt8kVpPlytLe00.mjs → DLrKIbuNE76u-F3y.mjs} +1259 -1257
  21. package/browser/esm/{B_IcryGM8cQnpX3Y.mjs → DUS29WdqCMuVVLpm.mjs} +1 -1
  22. package/browser/esm/{ma96uUDBca_JwJcX.mjs → Dh7XtuX1cWz1nW_v.mjs} +3 -3
  23. package/browser/esm/{C3maPeIMXo1JTqfq.mjs → DzgkcKlJrnETrT-z.mjs} +2 -2
  24. package/browser/esm/{BLInw-Qtiau8QKA6.mjs → Q18D_b2fTBJ7QH7K.mjs} +2 -2
  25. package/browser/esm/{LKeNSWAaNLsfatuI.mjs → Su0kqIblR6zTAjB2.mjs} +2 -2
  26. package/browser/esm/index.mjs +81 -78
  27. package/licenses/dependencies.txt +139 -139
  28. package/node/esm/{BXodzQICT9FHa2c_.mjs → 1bQb13SILtJFnqBQ.mjs} +1 -1
  29. package/node/esm/{BllluEtzB5DUaB0c.mjs → 5715fftg6SqkmbCs.mjs} +1 -1
  30. package/node/esm/{zMd81OdjwyOkK45u.mjs → BNH5761S3vit417d.mjs} +1 -1
  31. package/node/esm/{CDrqD26HX89mI5s9.mjs → BYxSe-f9SXkVQCOn.mjs} +1 -1
  32. package/node/esm/{Boxbpsy8ED5zAExk.mjs → CJQiYToWJ-8AaD8d.mjs} +1 -1
  33. package/node/esm/{DAGMt01KTSqs_fUP.mjs → DfoPtVWCLOfcAoCg.mjs} +1 -1
  34. package/node/esm/{BY9pH_mkLDOVRdrk.mjs → Dw2SSXphjQ4gTuEe.mjs} +1 -1
  35. package/node/esm/{hIWFtfWn-gmPFjkV.mjs → _Nq9WHxw-bmMA6Eh.mjs} +1 -1
  36. package/node/esm/{AmqNMsjisqrNPrsf.mjs → d78UMCfSqw7_DwUj.mjs} +1 -1
  37. package/node/esm/index.mjs +1201 -1196
  38. package/node/esm/{Dam0uFX03RMvPexZ.mjs → uS3k2AKeGAjgsirO.mjs} +1 -1
  39. package/package.json +8 -8
  40. package/types/index.d.ts +6 -0
@@ -1,20 +1,21 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.1
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.2
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
7
  import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, IFont as r, NumberFormat as l, IFontCollection as i, IStyle as s, ITextFrame as d, Table as c, IFill as m, CoordUtils as p, ISheet as u, LicenseManager as g, Workbook as h, TypesUtils as f } from "@sheetxl/sdk";
8
8
  import { LicenseManager } from "@sheetxl/sdk";
9
- import { jsx as x, jsxs as b, Fragment as y } from "react/jsx-runtime";
10
- import w, { memo as k, forwardRef as S, useMemo as C, useCallback as v, isValidElement as T, useState as D, useEffect as P, Suspense as R, useRef as M, createElement as F, useReducer as B, useImperativeHandle as N, useLayoutEffect as E } from "react";
11
- import { Box as A, Typography as I, IconButton as L, MenuItem as H, Divider as W, Button as z, SvgIcon as $, Input as O, FormControlLabel as V, Checkbox as G, useMediaQuery as U, FormControl as j, TextField as _, InputAdornment as q, Slider as K, Paper as X, CircularProgress as Z, DialogTitle as J, Select as Y, Tabs as Q, Tab as ee, Card as te, CardActions as oe, Collapse as ne, CssBaseline as ae } from "@mui/material";
12
- import { themeIcon as re, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as de, defaultCreatePopupPanel as ce, CommandPopupButton as me, TextVerticalTopIcon as pe, TextVerticalCenterIcon as ue, TextVerticalBottomIcon as ge, TextHorizontalOverflowIcon as he, TextHorizontalWrapIcon as fe, TextHorizontalClipIcon as xe, TextHorizontalShrinkIcon as be, TextRotation315Icon as ye, TextRotation45Icon as we, TextRotation90Icon as ke, TextRotation2702Icon as Se, TextRotationCustomIcon as Ce, TextRotation0Icon as ve, InputCommandButton as Te, SimpleTooltip as De, LoadingPanel as Pe, PopupButtonType as Re, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Fe, ColorizedCircleIcon as Be, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as We, MergeAllIcon as ze, MergeHorizontalIcon as $e, MergeVerticalIcon as Oe, MergeUnMergeIcon as Ve, FreezeBothIcon as Ge, FreezeRowsIcon as Ue, FreezeColumnsIcon as je, FreezeIcon as _e, FindIcon as qe, FindReplaceIcon as Ke, GotoIcon as Xe, TextSizeIncreaseIcon as Ze, TextSizeDecreaseIcon as Je, SelectedIcon as Ye, CurrencyDollarIcon as Qe, PercentIcon as et, CommaIcon as tt, IncreaseDecimalIcon2 as ot, DecreaseDecimalIcon2 as nt, ClearAllIcon as at, ClearFormatsIcon as rt, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as dt, InsertColumn2Icon as ct, BlankIcon as mt, RemoveCellsIcon as pt, RemoveRowIcon as ut, RemoveColumn2Icon as gt, LabelIcon as ht, SortIncreaseIcon as ft, SortDecreaseIcon as xt, SortCustomIcon as bt, FilterToggleIcon as yt, FilterClearIcon as wt, FilterReapplyIcon as kt, RedoIcon as St, UndoIcon as Ct, TextStrikeIcon as vt, TextSuperscriptIcon as Tt, TextSubscriptIcon as Dt, TextUnderlineIcon as Pt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Ft, PasteIcon as Bt, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as Wt, ExhibitMenuHeader as zt, ContextMenu as $t, Theme2Icon as Ot, SystemDefaultDarkMode as Vt, SystemDefaultLightMode as Gt, GithubIcon as Ut, DiscordIcon as jt, DocumentationIcon as _t, TicketIcon as qt, HelpIcon as Kt, InsertImageIcon as Xt, WalkingCopyIcon as Zt, SimpleCommandPopupButton as Jt, FunctionThinIcon as Yt, FunctionSumIcon as Qt, FormulaGroupIcon as eo, FormulaFinancialIcon as to, FormulaLogicalIcon as oo, FormulaTextIcon as no, FormulaDateTimeIcon as ao, FormulaLookupReferenceIcon as ro, FormulaMathTrigIcon as lo, FormulaStatisticalIcon as io, FormulaEngineeringIcon as so, FormulaInformationIcon as co, FormulaCubeIcon as mo, FormulaDatabaseIcon as po, FormulaWebIcon as uo, FormulaCustomIcon as go, ExhibitOptionButton as ho, SelectRangeModeIcon as fo, hexToRGB as xo, useFloatStack as bo, CellSelectionIcon as yo, CellSelectionRemoveIcon as wo, CellSelectionEditIcon as ko, InsertTableIcon as So, CellSelectionInsertIcon as Co, CloseErrorIcon as vo, CheckSuccessIcon as To, FunctionIcon as Do, VisibilityOffIcon as Po, elevateColor as Ro, ThemedIcon as Mo, ScriptNewIcon as Fo, ScriptFormulaIcon as Bo, ScriptMacroIcon as No, ScriptSaveIcon as Eo, CommandToolbar as Ao, CodeIcon as Io, ScriptRunIcon as Lo, ColorizedTextIcon as Ho, ColorizedFillIcon as Wo, FormatPaintIcon as zo, TextBoldIcon as $o, TextItalicIcon as Oo, InsertHyperlinkIcon as Vo, InsertCommentIcon as Go, FormulaViewIcon as Uo, ViewZeroIcon as jo, FullScreenOffIcon as _o, FullScreenIcon as qo, createScrollEdgeButton as Ko, createScrollEndButton as Xo, createScrollStartButton as Zo, HideColumnIcon as Jo, ShowColumnIcon as Yo, HideRowIcon as Qo, ShowRowIcon as en, ColumnsResizeAutoIcon as tn, RowsResizeAutoIcon as on, CutIcon as nn, DrawAspectIcon as an, DrawAlignLeftIcon as rn, DrawResizeIcon as ln, DrawAlignDistributeVertIcon as sn, DrawAlignDistributeHorzIcon as dn, DrawAlignBottomIcon as cn, DrawAlignMiddleIcon as mn, DrawAlignTopIcon as pn, DrawAlignRightIcon as un, DrawAlignCenterIcon as gn, DrawMoveBackwardIcon as hn, DrawToBackIcon as fn, DrawMoveForwardIcon as xn, DrawToFrontIcon as bn, scrollbarTheming as yn, StackTrace as wn, FileNewIcon as kn, FileOpenIcon as Sn, FileDownloadAsCSVIcon as Cn, FileDownloadAsExcelIcon as vn, FileDownloadAsSheetIcon as Tn, useResolvedThemeMode as Dn, ThemeMode as Pn, useModal as Rn, useLazyWindow as Mn, useOptionsDialog as Fn, useInputDialog as Bn, AnimatedTraversingEllipsisIcon as Nn, ErrorPanel as En, createExhibitTheme as An, ModalProvider as In, ErrorAlertIcon as Ln } from "@sheetxl/utils-mui";
13
- import Hn from "clsx";
14
- import { FormatAlignLeft as Wn, FormatAlignCenter as zn, FormatAlignRight as $n, FormatAlignJustify as On, Colorize as Vn, DarkMode as Gn, LightMode as Un, Keyboard as jn, Remove as _n, Add as qn, ExpandLess as Kn, ExpandMore as Xn, Lock as Zn, MoreHoriz as Jn, WebhookOutlined as Yn, Close as Qn, AddCircleOutline as ea, Menu as ta, CancelOutlined as oa } from "@mui/icons-material";
15
- import { useCommands as na, CommandButtonType as aa, useCallbackRef as ra, ReactUtils as la, KeyCodes as ia, useCommand as sa, useEditMode as da, useMouseDownAndHoldListener as ca, NotificationType as ma, useImperativeElement as pa, SplitPane as ua, RoundedTab as ga, SimpleCommand as ha, Command as fa, KeyModifiers as xa, CommandGroup as ba, ToolTipPlacement as ya, ScrollPane as wa, useUndoManager as ka } from "@sheetxl/utils-react";
16
- import { useTheme as Sa, alpha as Ca, getOverlayAlpha as va, ThemeProvider as Ta } from "@mui/material/styles";
17
- import { StyledStrokePath as Da, StaticBorderRenderer as Pa, FontUtils as Ra, useModelListener as Ma, createCellEditStateFromCell as Fa, SheetCellEditor as Ba, ScriptEditor as Na, useDocThemes as Ea, TabStrip as Aa, SheetElement as Ia, SheetScrollbar as La, PictureEditor as Ha, ChartEditor as Wa, EmptyFrame as za, LogoNoPaddingIcon as $a } from "@sheetxl/react";
9
+ import { StyledStrokePath as x, StaticBorderRenderer as b, FontUtils as y, useModelListener as w, createCellEditStateFromCell as k, SheetCellEditor as S, ScriptEditor as C, useDocThemes as v, TabStrip as T, SheetElement as D, SheetScrollbar as P, PictureEditor as R, ChartEditor as M, EmptyFrame as F, LogoNoPaddingIcon as B } from "@sheetxl/react";
10
+ import { useModelListener, useRangeListener } from "@sheetxl/react";
11
+ import { jsx as N, jsxs as E, Fragment as A } from "react/jsx-runtime";
12
+ import I, { memo as L, forwardRef as H, useMemo as W, useCallback as z, isValidElement as $, useState as O, useEffect as V, Suspense as G, useRef as U, createElement as j, useReducer as _, useImperativeHandle as q, useLayoutEffect as K } from "react";
13
+ import { Box as X, Typography as Z, IconButton as J, MenuItem as Y, Divider as Q, Button as ee, SvgIcon as te, Input as oe, FormControlLabel as ne, Checkbox as ae, useMediaQuery as re, FormControl as le, TextField as ie, InputAdornment as se, Slider as de, Paper as ce, CircularProgress as me, DialogTitle as pe, Select as ue, Tabs as ge, Tab as he, Card as fe, CardActions as xe, Collapse as be, CssBaseline as ye } from "@mui/material";
14
+ import { themeIcon as we, CommandButton as ke, ExhibitDivider as Se, FormatIndentDecreaseIcon as Ce, FormatIndentIncreaseIcon as ve, defaultCreatePopupPanel as Te, CommandPopupButton as De, TextVerticalTopIcon as Pe, TextVerticalCenterIcon as Re, TextVerticalBottomIcon as Me, TextHorizontalOverflowIcon as Fe, TextHorizontalWrapIcon as Be, TextHorizontalClipIcon as Ne, TextHorizontalShrinkIcon as Ee, TextRotation315Icon as Ae, TextRotation45Icon as Ie, TextRotation90Icon as Le, TextRotation2702Icon as He, TextRotationCustomIcon as We, TextRotation0Icon as ze, InputCommandButton as $e, SimpleTooltip as Oe, LoadingPanel as Ve, PopupButtonType as Ge, ExhibitPopupIconButton as Ue, ExhibitPopupMenuItem as je, ColorizedCircleIcon as _e, ExhibitMenuItem as qe, createStrokeShadowFilter as Ke, strokeShadowFilter as Xe, ColorizedStrokeIcon as Ze, ExhibitTooltip as Je, ExhibitIconButton as Ye, CommandTooltip as Qe, MergeAllIcon as et, MergeHorizontalIcon as tt, MergeVerticalIcon as ot, MergeUnMergeIcon as nt, FreezeBothIcon as at, FreezeRowsIcon as rt, FreezeColumnsIcon as lt, FreezeIcon as it, FindIcon as st, FindReplaceIcon as dt, GotoIcon as ct, TextSizeIncreaseIcon as mt, TextSizeDecreaseIcon as pt, SelectedIcon as ut, CurrencyDollarIcon as gt, PercentIcon as ht, CommaIcon as ft, IncreaseDecimalIcon2 as xt, DecreaseDecimalIcon2 as bt, ClearAllIcon as yt, ClearFormatsIcon as wt, ClearContentsIcon as kt, FillDownIcon as St, InsertCells as Ct, InsertRowIcon as vt, InsertColumn2Icon as Tt, BlankIcon as Dt, RemoveCellsIcon as Pt, RemoveRowIcon as Rt, RemoveColumn2Icon as Mt, LabelIcon as Ft, SortIncreaseIcon as Bt, SortDecreaseIcon as Nt, SortCustomIcon as Et, FilterToggleIcon as At, FilterClearIcon as It, FilterReapplyIcon as Lt, RedoIcon as Ht, UndoIcon as Wt, TextStrikeIcon as zt, TextSuperscriptIcon as $t, TextSubscriptIcon as Ot, TextUnderlineIcon as Vt, TextUnderlineDoubleIcon as Gt, TextUnderlineAccountingIcon as Ut, TextUnderlineAccountingDoubleIcon as jt, PasteIcon as _t, PasteValuesIcon as qt, PasteFormatsIcon as Kt, PasteFormulasIcon as Xt, PasteTransposeIcon as Zt, PasteLinksIcon as Jt, NewPresetStylesIcon as Yt, PresetStylesIcon as Qt, ExhibitMenuHeader as eo, ContextMenu as to, Theme2Icon as oo, SystemDefaultDarkMode as no, SystemDefaultLightMode as ao, GithubIcon as ro, DiscordIcon as lo, DocumentationIcon as io, TicketIcon as so, HelpIcon as co, InsertImageIcon as mo, WalkingCopyIcon as po, SimpleCommandPopupButton as uo, FunctionThinIcon as go, FunctionSumIcon as ho, FormulaGroupIcon as fo, FormulaFinancialIcon as xo, FormulaLogicalIcon as bo, FormulaTextIcon as yo, FormulaDateTimeIcon as wo, FormulaLookupReferenceIcon as ko, FormulaMathTrigIcon as So, FormulaStatisticalIcon as Co, FormulaEngineeringIcon as vo, FormulaInformationIcon as To, FormulaCubeIcon as Do, FormulaDatabaseIcon as Po, FormulaWebIcon as Ro, FormulaCustomIcon as Mo, ExhibitOptionButton as Fo, SelectRangeModeIcon as Bo, hexToRGB as No, useFloatStack as Eo, CellSelectionIcon as Ao, CellSelectionRemoveIcon as Io, CellSelectionEditIcon as Lo, InsertTableIcon as Ho, CellSelectionInsertIcon as Wo, CloseErrorIcon as zo, CheckSuccessIcon as $o, FunctionIcon as Oo, VisibilityOffIcon as Vo, elevateColor as Go, ThemedIcon as Uo, ScriptNewIcon as jo, ScriptFormulaIcon as _o, ScriptMacroIcon as qo, ScriptSaveIcon as Ko, CommandToolbar as Xo, CodeIcon as Zo, ScriptRunIcon as Jo, ColorizedTextIcon as Yo, ColorizedFillIcon as Qo, FormatPaintIcon as en, TextBoldIcon as tn, TextItalicIcon as on, InsertHyperlinkIcon as nn, InsertCommentIcon as an, FormulaViewIcon as rn, ViewZeroIcon as ln, FullScreenOffIcon as sn, FullScreenIcon as dn, createScrollEdgeButton as cn, createScrollEndButton as mn, createScrollStartButton as pn, HideColumnIcon as un, ShowColumnIcon as gn, HideRowIcon as hn, ShowRowIcon as fn, ColumnsResizeAutoIcon as xn, RowsResizeAutoIcon as bn, CutIcon as yn, DrawAspectIcon as wn, DrawAlignLeftIcon as kn, DrawResizeIcon as Sn, DrawAlignDistributeVertIcon as Cn, DrawAlignDistributeHorzIcon as vn, DrawAlignBottomIcon as Tn, DrawAlignMiddleIcon as Dn, DrawAlignTopIcon as Pn, DrawAlignRightIcon as Rn, DrawAlignCenterIcon as Mn, DrawMoveBackwardIcon as Fn, DrawToBackIcon as Bn, DrawMoveForwardIcon as Nn, DrawToFrontIcon as En, scrollbarTheming as An, StackTrace as In, FileNewIcon as Ln, FileOpenIcon as Hn, FileDownloadAsCSVIcon as Wn, FileDownloadAsExcelIcon as zn, FileDownloadAsSheetIcon as $n, useResolvedThemeMode as On, ThemeMode as Vn, useModal as Gn, useLazyWindow as Un, useOptionsDialog as jn, useInputDialog as _n, AnimatedTraversingEllipsisIcon as qn, ErrorPanel as Kn, createExhibitTheme as Xn, ModalProvider as Zn, ErrorAlertIcon as Jn } from "@sheetxl/utils-mui";
15
+ import Yn from "clsx";
16
+ import { FormatAlignLeft as Qn, FormatAlignCenter as ea, FormatAlignRight as ta, FormatAlignJustify as oa, Colorize as na, DarkMode as aa, LightMode as ra, Keyboard as la, Remove as ia, Add as sa, ExpandLess as da, ExpandMore as ca, Lock as ma, MoreHoriz as pa, WebhookOutlined as ua, Close as ga, AddCircleOutline as ha, Menu as fa, CancelOutlined as xa } from "@mui/icons-material";
17
+ import { useCommands as ba, CommandButtonType as ya, useCallbackRef as wa, ReactUtils as ka, KeyCodes as Sa, useCommand as Ca, useEditMode as va, useMouseDownAndHoldListener as Ta, NotificationType as Da, useImperativeElement as Pa, SplitPane as Ra, RoundedTab as Ma, SimpleCommand as Fa, Command as Ba, KeyModifiers as Na, CommandGroup as Ea, ToolTipPlacement as Aa, ScrollPane as Ia, useUndoManager as La } from "@sheetxl/utils-react";
18
+ import { useTheme as Ha, alpha as Wa, getOverlayAlpha as za, ThemeProvider as $a } from "@mui/material/styles";
18
19
  import { alpha as Oa } from "@mui/system";
19
20
  import { useFormContext as Va } from "react-hook-form";
20
21
  import { ResizableBox as Ga } from "react-resizable";
@@ -26,62 +27,62 @@ import { useFullscreen as Ja } from "rooks";
26
27
  import { IOUtils as Ya } from "@sheetxl/io";
27
28
  import { ErrorBoundary as Qa } from "react-error-boundary";
28
29
  import { useSnackbar as er, SnackbarContent as tr, SnackbarProvider as or } from "notistack";
29
- const nr = k(S((e2, t2) => {
30
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = C(() => {
30
+ const nr = L(H((e2, t2) => {
31
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ba(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = W(() => {
31
32
  for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3].key();
32
33
  return s2[0]?.key();
33
- }, [s2]), c2 = C(() => {
34
+ }, [s2]), c2 = W(() => {
34
35
  const e3 = /* @__PURE__ */ new Map();
35
- return e3.set("formatAlignLeftToggle", re(x(Wn, {}))), e3.set("formatAlignCenterToggle", re(x(zn, {}))), e3.set("formatAlignRightToggle", re(x($n, {}))), e3.set("formatAlignJustifyToggle", re(x(On, {}))), e3.set("formatAlignCenterContinuousToggle", re(x(zn, {}))), e3.set("formatAlignFillToggle", re(x(On, {}))), e3.set("formatAlignDistributedHorizontalToggle", re(x(On, {}))), e3;
36
- }, []), m2 = C(() => {
36
+ return e3.set("formatAlignLeftToggle", we(N(Qn, {}))), e3.set("formatAlignCenterToggle", we(N(ea, {}))), e3.set("formatAlignRightToggle", we(N(ta, {}))), e3.set("formatAlignJustifyToggle", we(N(oa, {}))), e3.set("formatAlignCenterContinuousToggle", we(N(ea, {}))), e3.set("formatAlignFillToggle", we(N(oa, {}))), e3.set("formatAlignDistributedHorizontalToggle", we(N(oa, {}))), e3;
37
+ }, []), m2 = W(() => {
37
38
  if (!n2) return null;
38
39
  const e3 = { ...n2 };
39
40
  return delete e3.beforeExecute, e3;
40
- }, [n2]), p2 = v((e3, t3) => {
41
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: c2.get("formatAlignLeftToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: c2.get("formatAlignCenterToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: c2.get("formatAlignRightToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: c2.get("formatAlignJustifyToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: c2.get("formatAlignCenterContinuousToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: c2.get("formatAlignFillToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: c2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = b(A, { sx: { className: Hn("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(de, {})) })] }), d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
42
- return ce({ ...e3, children: d3 });
41
+ }, [n2]), p2 = z((e3, t3) => {
42
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: c2.get("formatAlignLeftToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: c2.get("formatAlignCenterToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: c2.get("formatAlignRightToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: c2.get("formatAlignJustifyToggle") }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: c2.get("formatAlignCenterContinuousToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: c2.get("formatAlignFillToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: c2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = E(X, { sx: { className: Yn("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [N(ke, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: a2, disabled: r2, icon: we(N(Ce, {})) }), N(ke, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: a2, disabled: r2, icon: we(N(ve, {})) })] }), d3 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, N(Se, { orientation: "horizontal" }), N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
43
+ return Te({ ...e3, children: d3 });
43
44
  }, [r2, n2]);
44
- return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? x(Wn, {}), ...i2 });
45
- })), ar = k(S((e2, t2) => {
46
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = C(() => {
45
+ return N(De, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? N(Qn, {}), ...i2 });
46
+ })), ar = L(H((e2, t2) => {
47
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = W(() => {
47
48
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
48
49
  return i2[0]?.key();
49
- }, [i2]), d2 = C(() => {
50
+ }, [i2]), d2 = W(() => {
50
51
  const e3 = /* @__PURE__ */ new Map();
51
- return e3.set("formatAlignTopToggle", re(x(pe, {}))), e3.set("formatAlignMiddleToggle", re(x(ue, {}))), e3.set("formatAlignBottomToggle", re(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", re(x(On, {}))), e3.set("formatAlignDistributedVerticalToggle", re(x(On, {}))), e3;
52
- }, []), c2 = v((e3, t3) => {
53
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: d2.get("formatAlignTopToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: d2.get("formatAlignMiddleToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: d2.get("formatAlignBottomToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: d2.get("formatAlignJustifyVerticalToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: d2.get("formatAlignDistributedVerticalToggle") })] });
54
- return ce({ ...e3, children: l3 });
52
+ return e3.set("formatAlignTopToggle", we(N(Pe, {}))), e3.set("formatAlignMiddleToggle", we(N(Re, {}))), e3.set("formatAlignBottomToggle", we(N(Me, {}))), e3.set("formatAlignJustifyVerticalToggle", we(N(oa, {}))), e3.set("formatAlignDistributedVerticalToggle", we(N(oa, {}))), e3;
53
+ }, []), c2 = z((e3, t3) => {
54
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: d2.get("formatAlignTopToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: d2.get("formatAlignMiddleToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: d2.get("formatAlignBottomToggle") }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: d2.get("formatAlignJustifyVerticalToggle") }), N(ke, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: d2.get("formatAlignDistributedVerticalToggle") })] });
55
+ return Te({ ...e3, children: l3 });
55
56
  }, [r2, n2, d2]);
56
- return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: d2.get(s2) ?? re(x(ge, {})), ...l2 });
57
- })), rr = k(S((e2, t2) => {
58
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = C(() => {
57
+ return N(De, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: d2.get(s2) ?? we(N(Me, {})), ...l2 });
58
+ })), rr = L(H((e2, t2) => {
59
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = W(() => {
59
60
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
60
61
  return i2[0]?.key();
61
- }, [i2]), d2 = C(() => {
62
+ }, [i2]), d2 = W(() => {
62
63
  const e3 = /* @__PURE__ */ new Map();
63
- return e3.set("formatTextOverflowVisibleToggle", re(x(he, {}))), e3.set("formatTextOverflowWrapToggle", re(x(fe, {}))), e3.set("formatTextOverflowClipToggle", re(x(xe, {}))), e3.set("formatTextOverflowShrinkToggle", re(x(be, {}))), e3;
64
- }, []), c2 = ra((e3, t3) => {
65
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: d2.get("formatTextOverflowVisibleToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: d2.get("formatTextOverflowWrapToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: d2.get("formatTextOverflowClipToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: d2.get("formatTextOverflowShrinkToggle") })] });
66
- return ce({ ...e3, children: l3 });
64
+ return e3.set("formatTextOverflowVisibleToggle", we(N(Fe, {}))), e3.set("formatTextOverflowWrapToggle", we(N(Be, {}))), e3.set("formatTextOverflowClipToggle", we(N(Ne, {}))), e3.set("formatTextOverflowShrinkToggle", we(N(Ee, {}))), e3;
65
+ }, []), c2 = wa((e3, t3) => {
66
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: d2.get("formatTextOverflowVisibleToggle") }), N(ke, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: d2.get("formatTextOverflowWrapToggle") }), N(ke, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: d2.get("formatTextOverflowClipToggle") }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: d2.get("formatTextOverflowShrinkToggle") })] });
67
+ return Te({ ...e3, children: l3 });
67
68
  }, [r2, n2, a2]);
68
- return x(me, { 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: c2, icon: d2.get(s2) ?? re(x(he, {})), ...l2 });
69
- })), lr = k(S((e2, t2) => {
70
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = C(() => {
69
+ return N(De, { 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: c2, icon: d2.get(s2) ?? we(N(Fe, {})), ...l2 });
70
+ })), lr = L(H((e2, t2) => {
71
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = W(() => {
71
72
  const e3 = i2.length;
72
73
  for (let t3 = 0; t3 < e3; t3++) {
73
74
  const e4 = i2[t3];
74
75
  if (e4?.state()) return e4.key();
75
76
  }
76
77
  return i2[1]?.key();
77
- }, [i2]), d2 = C(() => {
78
+ }, [i2]), d2 = W(() => {
78
79
  const e3 = /* @__PURE__ */ new Map();
79
- return e3.set("formatTextRotate0", re(x(ye, {}))), e3.set("formatTextRotate315", re(x(ye, {}))), e3.set("formatTextRotate45", re(x(we, {}))), e3.set("formatTextRotate90", re(x(ke, {}))), e3.set("formatTextRotate270", re(x(Se, {}))), e3.set("formatTextRotateCustom", re(x(Ce, {}))), e3;
80
- }, []), c2 = v((e3, t3) => {
81
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: re(x(ve, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: re(x(ye, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: re(x(we, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: re(x(ke, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: re(x(Se, {})) }), x(ie, { orientation: "horizontal" }), x(Te, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: re(x(Ce, {})), label: "Custom" })] });
82
- return ce({ ...e3, children: l3 });
83
- }, [r2, n2, a2, o2]), m2 = C(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
84
- return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: m2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: c2, quickCommand: m2 ? "formatTextRotate0" : "formatTextRotate315", icon: re(d2.get(s2) ?? x(ye, {})), ...l2 });
80
+ return e3.set("formatTextRotate0", we(N(Ae, {}))), e3.set("formatTextRotate315", we(N(Ae, {}))), e3.set("formatTextRotate45", we(N(Ie, {}))), e3.set("formatTextRotate90", we(N(Le, {}))), e3.set("formatTextRotate270", we(N(He, {}))), e3.set("formatTextRotateCustom", we(N(We, {}))), e3;
81
+ }, []), c2 = z((e3, t3) => {
82
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: we(N(ze, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: we(N(Ae, {})) }), N(ke, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: we(N(Ie, {})) }), N(ke, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: we(N(Le, {})) }), N(ke, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: we(N(He, {})) }), N(Se, { orientation: "horizontal" }), N($e, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: we(N(We, {})), label: "Custom" })] });
83
+ return Te({ ...e3, children: l3 });
84
+ }, [r2, n2, a2, o2]), m2 = W(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
85
+ return N(De, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: m2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: c2, quickCommand: m2 ? "formatTextRotate0" : "formatTextRotate315", icon: we(d2.get(s2) ?? N(Ae, {})), ...l2 });
85
86
  })), ir = { Preset: "preset", Custom: "custom" }, sr = { Start: "start", End: "end" }, dr = {}, cr = (e2, t2, o2, n2) => {
86
87
  const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
87
88
  if (dr[a2]) return dr[a2];
@@ -93,59 +94,59 @@ const nr = k(S((e2, t2) => {
93
94
  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;
94
95
  })(e2, t2, o2, n2);
95
96
  return dr[a2] = r2, r2;
96
- }, mr = {}, pr = k((e2) => {
97
- const { className: t2, style: o2 = la.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = mr, children: d2, ...c2 } = e2, m2 = d2, p2 = C(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${cr(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
98
- return T(d2) ? w.cloneElement(d2, { ...m2.props }) : x("div", { style: p2, ...c2 });
99
- }), ur = k((e2) => {
100
- const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = la.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
97
+ }, mr = {}, pr = L((e2) => {
98
+ const { className: t2, style: o2 = ka.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = mr, children: d2, ...c2 } = e2, m2 = d2, p2 = W(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${cr(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
99
+ return $(d2) ? I.cloneElement(d2, { ...m2.props }) : N("div", { style: p2, ...c2 });
100
+ }), ur = L((e2) => {
101
+ const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = ka.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
101
102
  if (!t2) throw new Error("a selectedColor is required");
102
- const f2 = v((e3) => {
103
+ const f2 = z((e3) => {
103
104
  a2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
104
- }, [o2, n2, a2, t2]), y2 = v((e3) => {
105
+ }, [o2, n2, a2, t2]), x2 = z((e3) => {
105
106
  l2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
106
- }, [n2, l2, t2]), w2 = v((e3) => {
107
+ }, [n2, l2, t2]), b2 = z((e3) => {
107
108
  i2?.(e3), e3.isDefaultPrevented();
108
- }, [n2, i2]), k2 = v((e3) => {
109
+ }, [n2, i2]), y2 = z((e3) => {
109
110
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
110
- }, [n2, s2, t2]), S2 = v((e3) => {
111
- r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ia.Enter && o2?.(t2.toRGBA());
112
- }, [o2, r2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(pr, { 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]);
113
- return b("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: S2, onMouseOver: y2, onMouseLeave: w2, onFocus: k2, children: [T2, x("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
114
- }), gr = k((o2) => {
115
- 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(), y2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, w2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, k2 = [];
116
- k2.push({ [t.AdjustmentType.Inv]: true }), k2.push({ [t.AdjustmentType.Alpha]: 100 });
117
- const S2 = h2.adjust(k2), C2 = v(() => {
111
+ }, [n2, s2, t2]), w2 = z((e3) => {
112
+ r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === Sa.Enter && o2?.(t2.toRGBA());
113
+ }, [o2, r2, t2]), k2 = W(() => 1 === t2.toRGBA().alpha ? null : N(pr, { 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]);
114
+ return E("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: [k2, N("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
115
+ }), gr = L((o2) => {
116
+ 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 = [];
117
+ y2.push({ [t.AdjustmentType.Inv]: true }), y2.push({ [t.AdjustmentType.Alpha]: 100 });
118
+ const w2 = h2.adjust(y2), k2 = z(() => {
118
119
  i2?.(l2);
119
- }, [i2, l2]), T2 = v((e2) => {
120
+ }, [i2, l2]), S2 = z((e2) => {
120
121
  s2?.(e2 ? l2 : null);
121
122
  }, [s2, l2]);
122
- return x(De, { 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: x("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: b(ur, { selectedColor: h2, title: null, onSelectColor: C2, onPreviewColor: T2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [x("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: S2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: y2 ? "1" : "0" } }), x("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: S2.toRGBA(u2).toString(), borderRadius: "50%", opacity: w2 ? "1" : "0" } })] }) }) });
123
- }), hr = k((e2) => {
124
- const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = la.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
123
+ return N(Oe, { 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: N("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: E(ur, { selectedColor: h2, title: null, onSelectColor: k2, onPreviewColor: S2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [N("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" } }), N("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" } })] }) }) });
124
+ }), hr = L((e2) => {
125
+ const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = ka.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
125
126
  let u2;
126
127
  if (Array.isArray(n2[0])) u2 = n2;
127
128
  else {
128
129
  u2 = [];
129
130
  for (let e3 = 0; e3 < n2.length; e3++) u2.push([n2[e3]]);
130
131
  }
131
- const g2 = v((e3) => {
132
+ const g2 = z((e3) => {
132
133
  l2?.(e3);
133
- }, [l2]), h2 = v((e3) => {
134
+ }, [l2]), h2 = z((e3) => {
134
135
  i2?.(e3);
135
- }, [i2]), f2 = C(() => {
136
+ }, [i2]), f2 = W(() => {
136
137
  let e3 = [];
137
138
  for (let t3 = 0; t3 < u2.length; t3++) {
138
139
  let n3 = [], l3 = u2[t3];
139
140
  for (let e4 = 0; e4 < l3.length; e4++) {
140
141
  let i4 = l3[e4];
141
- n3.push(x(gr, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
142
+ n3.push(N(gr, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
142
143
  }
143
- let i3 = x(A, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
144
+ let i3 = N(X, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
144
145
  e3.push(i3);
145
146
  }
146
147
  return e3;
147
- }, [u2, a2, r2, g2, h2]), y2 = C(() => t2 ? x(I, { 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]);
148
- return b(A, { style: { ...s2 }, children: [y2, x(A, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
148
+ }, [u2, a2, r2, g2, h2]), x2 = W(() => t2 ? N(Z, { 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]);
149
+ return E(X, { style: { ...s2 }, children: [x2, N(X, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
149
150
  }), fr = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), xr = (t2, o2, n2, a2, r2, l2) => {
150
151
  const i2 = fr(t2, o2);
151
152
  a2?.push(i2);
@@ -153,14 +154,14 @@ const nr = k(S((e2, t2) => {
153
154
  r2?.set(d2, s2);
154
155
  const c2 = s2.toRGBA().toString();
155
156
  l2?.set(c2, s2);
156
- }, br = w.lazy(() => import("./DAGMt01KTSqs_fUP.mjs")), yr = k(S((t2, a2) => {
157
- 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: w2, onPreviewColor: k2, onPreviewColorImmediate: S2, onSelectColor: T2, autoColor: M2, autoColorLabel: F2 = "Automatic", autoColorPosition: B2 = sr.Start, compareRGB: N2 = false, darkMode: E2 = false, ...$2 } = t2, O2 = l2 || r2, V2 = ra(k2, [k2]), G2 = ra(S2, [S2]), U2 = ra(T2, [T2]), j2 = ra(f2, [f2]), _2 = ra(w2, [w2]), [q2, K2] = D(false), X2 = Sa(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
157
+ }, br = I.lazy(() => import("./DfoPtVWCLOfcAoCg.mjs")), yr = L(H((t2, a2) => {
158
+ 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: k2, autoColorLabel: S2 = "Automatic", autoColorPosition: C2 = sr.Start, compareRGB: v2 = false, darkMode: T2 = false, ...D2 } = t2, P2 = l2 || r2, R2 = wa(b2, [b2]), M2 = wa(y2, [y2]), F2 = wa(w2, [w2]), B2 = wa(f2, [f2]), I2 = wa(x2, [x2]), [L2, H2] = O(false), $2 = Ha(), U2 = W(() => s2 || e.getDefaultSchemeLookup(), [s2]), j2 = W(() => {
158
159
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
159
- xr("Primary Background", "bg1", Z2, n2, e2, t3), xr("Primary Text", "tx1", Z2, n2, e2, t3), xr("Secondary Background", "bg2", Z2, n2, e2, t3), xr("Secondary Text", "tx2", Z2, n2, e2, t3), xr("Accent 1", "accent1", Z2, n2, e2, t3), xr("Accent 2", "accent2", Z2, n2, e2, t3), xr("Accent 3", "accent3", Z2, n2, e2, t3), xr("Accent 4", "accent4", Z2, n2, e2, t3), xr("Accent 5", "accent5", Z2, n2, e2, t3), xr("Accent 6", "accent6", Z2, n2, e2, t3);
160
- const a3 = o.buildPalette(n2, Z2, e2, t3), r3 = [];
161
- if (xr("Dark Red", "C00000", Z2, r3, e2, t3), xr("Red", "FF0000", Z2, r3, e2, t3), xr("Orange", "FFC000", Z2, r3, e2, t3), xr("Yellow", "FFFF00", Z2, r3, e2, t3), xr("Light Green", "92D050", Z2, r3, e2, t3), xr("Green", "00B050", Z2, r3, e2, t3), xr("Light Blue", "00B0F0", Z2, r3, e2, t3), xr("Blue", "0070C0", Z2, r3, e2, t3), xr("Dark Blue", "002060", Z2, r3, e2, t3), d2 ? xr("Purple Is A Fruit", "7030A0", Z2, r3, e2, t3) : xr("Transparent", "00000000", Z2, r3, e2, t3), M2) {
162
- const t4 = M2.toString();
163
- e2.set(t4, M2);
160
+ xr("Primary Background", "bg1", U2, n2, e2, t3), xr("Primary Text", "tx1", U2, n2, e2, t3), xr("Secondary Background", "bg2", U2, n2, e2, t3), xr("Secondary Text", "tx2", U2, n2, e2, t3), xr("Accent 1", "accent1", U2, n2, e2, t3), xr("Accent 2", "accent2", U2, n2, e2, t3), xr("Accent 3", "accent3", U2, n2, e2, t3), xr("Accent 4", "accent4", U2, n2, e2, t3), xr("Accent 5", "accent5", U2, n2, e2, t3), xr("Accent 6", "accent6", U2, n2, e2, t3);
161
+ const a3 = o.buildPalette(n2, U2, e2, t3), r3 = [];
162
+ if (xr("Dark Red", "C00000", U2, r3, e2, t3), xr("Red", "FF0000", U2, r3, e2, t3), xr("Orange", "FFC000", U2, r3, e2, t3), xr("Yellow", "FFFF00", U2, r3, e2, t3), xr("Light Green", "92D050", U2, r3, e2, t3), xr("Green", "00B050", U2, r3, e2, t3), xr("Light Blue", "00B0F0", U2, r3, e2, t3), xr("Blue", "0070C0", U2, r3, e2, t3), xr("Dark Blue", "002060", U2, r3, e2, t3), d2 ? xr("Purple Is A Fruit", "7030A0", U2, r3, e2, t3) : xr("Transparent", "00000000", U2, r3, e2, t3), k2) {
163
+ const t4 = k2.toString();
164
+ e2.set(t4, k2);
164
165
  }
165
166
  const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, c3 = [];
166
167
  for (let e3 = 0; s3 && e3 < s3.length; e3++) {
@@ -168,145 +169,145 @@ const nr = k(S((e2, t2) => {
168
169
  l3.set(t4, s3[e3]), c3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
169
170
  }
170
171
  return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
171
- }, [Z2, i2, d2, M2]);
172
- P(() => {
172
+ }, [U2, i2, d2, k2]);
173
+ V(() => {
173
174
  g2?.();
174
175
  }, []);
175
- const [Y2, Q2] = D(false), ee2 = v(() => {
176
- Q2((e2) => !e2);
176
+ const [_2, q2] = O(false), K2 = z(() => {
177
+ q2((e2) => !e2);
177
178
  }, []);
178
- P(() => {
179
- if (m2) Q2(m2 === ir.Custom);
179
+ V(() => {
180
+ if (m2) q2(m2 === ir.Custom);
180
181
  else if (r2) {
181
- let e2 = r2.toString(), t3 = J2.mapAllPresets.get(e2);
182
- t3 || (e2 = r2.toRGBA().toString(), t3 = J2.mapAllPresetsRGB.get(e2));
183
- const o2 = J2.mapRecent.get(e2);
184
- Q2(!t3 && !o2);
182
+ let e2 = r2.toString(), t3 = j2.mapAllPresets.get(e2);
183
+ t3 || (e2 = r2.toRGBA().toString(), t3 = j2.mapAllPresetsRGB.get(e2));
184
+ const o2 = j2.mapRecent.get(e2);
185
+ q2(!t3 && !o2);
185
186
  }
186
187
  }, [r2, m2]);
187
- const te2 = v(n.debounce((e2) => {
188
- V2?.(e2);
189
- }, c2), [V2, c2]), [oe2, ne2] = D();
190
- P(() => {
188
+ const te2 = z(n.debounce((e2) => {
189
+ R2?.(e2);
190
+ }, c2), [R2, c2]), [oe2, ne2] = O();
191
+ V(() => {
191
192
  ne2(l2 || r2);
192
193
  }, [l2, r2]);
193
- const ae2 = ra((e2) => {
194
- G2 && (G2(e2), te2(e2));
195
- }, [G2]), re2 = ra((t3) => {
196
- ae2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null);
197
- }, [Z2]), le2 = v((e2) => {
198
- e2.ctrlKey && Q2(true);
199
- }, []), ie2 = ra((e2) => {
194
+ const ae2 = wa((e2) => {
195
+ M2 && (M2(e2), te2(e2));
196
+ }, [M2]), re2 = wa((t3) => {
197
+ ae2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, U2) : null);
198
+ }, [U2]), le2 = z((e2) => {
199
+ e2.ctrlKey && q2(true);
200
+ }, []), ie2 = wa((e2) => {
200
201
  let t3 = false;
201
202
  if (e2) {
202
203
  const o2 = e2.toString();
203
- t3 = !J2.mapAllPresets.has(o2);
204
+ t3 = !j2.mapAllPresets.has(o2);
204
205
  }
205
- U2?.(e2, t3);
206
- }, [U2, J2]), se2 = ra((t3) => {
207
- const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null;
206
+ F2?.(e2, t3);
207
+ }, [F2, j2]), se2 = wa((t3) => {
208
+ const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, U2) : null;
208
209
  Promise.resolve(h2?.()).then(() => {
209
210
  ie2(o2);
210
211
  });
211
- }, [Z2, h2]), de2 = ra((t3) => {
212
- ae2(t3 ? new e(t3, Z2) : null);
213
- }, [Z2]), ce2 = C(() => {
214
- if (void 0 === window.EyeDropper) return x(y, {});
215
- return x(L, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
216
- K2(true), j2?.(), await new EyeDropper().open().then((t3) => {
217
- K2(false), _2?.();
218
- let o2 = new e(t3.sRGBHex), n2 = o2.toString(), a3 = J2.mapAllPresets.get(n2);
219
- if (a3 || (n2 = o2.toRGBA().toString(), a3 = J2.mapAllPresetsRGB.get(n2)), !a3) {
212
+ }, [U2, h2]), de2 = wa((t3) => {
213
+ ae2(t3 ? new e(t3, U2) : null);
214
+ }, [U2]), ce2 = W(() => {
215
+ if (void 0 === window.EyeDropper) return N(A, {});
216
+ return N(J, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
217
+ H2(true), B2?.(), await new EyeDropper().open().then((t3) => {
218
+ H2(false), I2?.();
219
+ let o2 = new e(t3.sRGBHex), n2 = o2.toString(), a3 = j2.mapAllPresets.get(n2);
220
+ if (a3 || (n2 = o2.toRGBA().toString(), a3 = j2.mapAllPresetsRGB.get(n2)), !a3) {
220
221
  const e2 = o2.toRGBA(), t4 = 3;
221
222
  let n3 = 255;
222
- J2.mapAllPresetsRGB.forEach((o3, r3) => {
223
+ j2.mapAllPresetsRGB.forEach((o3, r3) => {
223
224
  const l3 = o3.toRGBA(), i3 = Math.abs(l3.red - e2.red) + Math.abs(l3.blue - e2.blue) + Math.abs(l3.green - e2.green);
224
225
  i3 < t4 && i3 < n3 && (a3 = o3);
225
226
  });
226
227
  }
227
- Q2(!a3), ae2(a3 || o2);
228
+ q2(!a3), ae2(a3 || o2);
228
229
  }).catch((e2) => {
229
- K2(false), "AbortError" !== e2?.name && console.error(e2);
230
+ H2(false), "AbortError" !== e2?.name && console.error(e2);
230
231
  });
231
- }, children: x(Vn, {}) });
232
- }, [J2, E2]), me2 = C(() => {
233
- if (!Y2) return;
234
- const e2 = { opacity: Y2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
235
- return x(R, { fallback: x("div", { style: e2, children: x(Pe, {}) }), children: x(br, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
236
- }, [Y2, O2]), pe2 = C(() => ({ onClick: le2, alphaGrey: X2.palette.text.icon ?? X2.palette.action.active }), [le2, X2]), ue2 = C(() => {
237
- if (!M2) return null;
238
- const e2 = { description: F2, definition: { val: M2.getVal(), adjs: M2.getAdjustments() } };
239
- return x(y, { children: b(H, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
232
+ }, children: N(na, {}) });
233
+ }, [j2, T2]), me2 = W(() => {
234
+ if (!_2) return;
235
+ const e2 = { opacity: _2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
236
+ return N(G, { fallback: N("div", { style: e2, children: N(Ve, {}) }), children: N(br, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
237
+ }, [_2, P2]), pe2 = W(() => ({ onClick: le2, alphaGrey: $2.palette.text.icon ?? $2.palette.action.active }), [le2, $2]), ue2 = W(() => {
238
+ if (!k2) return null;
239
+ const e2 = { description: S2, definition: { val: k2.getVal(), adjs: k2.getAdjustments() } };
240
+ return N(A, { children: E(Y, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
240
241
  re2(null);
241
242
  }, onClick: () => {
242
243
  se2(null);
243
- }, children: [x(A, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(gr, { schemeColorLookup: Z2, colorDef: e2, selectedColor: null === r2 ? M2 : r2, previewColor: null === l2 ? M2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: E2, compareRGB: N2, swatchProps: pe2 }) }), x(I, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: F2 })] }) });
244
- }, [M2, F2, Z2, r2, l2]);
245
- return b(A, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...$2, children: [b("div", { style: { position: "relative", display: "flex" }, children: [b("div", { style: { opacity: Y2 ? "0" : 1 }, children: [ue2 && B2 === sr.Start ? b(y, { children: [ue2, x(W, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(hr, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(hr, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(W, { light: true, style: { marginBottom: "10px" } }), x(hr, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), b("div", { style: { opacity: 0 === J2.recentColorsLimited.length ? "0" : void 0, display: 0 === J2.recentColorsLimited.length ? "none" : void 0 }, children: [x(W, { light: true, style: { marginBottom: "10px" } }), x(hr, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 })] }), ue2 && B2 === sr.End ? b(y, { children: [x(W, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(W, { light: true, style: { marginBottom: "10px" } }), b("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, x("div", { style: { flex: "1 1 100%", background: "pink" } }), x(z, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
246
- ee2();
247
- }, children: x("div", Y2 ? { children: "Preset" } : { children: "Custom" }) }), x(z, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
244
+ }, children: [N(X, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: N(gr, { schemeColorLookup: U2, colorDef: e2, selectedColor: null === r2 ? k2 : r2, previewColor: null === l2 ? k2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, swatchProps: pe2 }) }), N(Z, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: S2 })] }) });
245
+ }, [k2, S2, U2, r2, l2]);
246
+ return E(X, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...D2, children: [E("div", { style: { position: "relative", display: "flex" }, children: [E("div", { style: { opacity: _2 ? "0" : 1 }, children: [ue2 && C2 === sr.Start ? E(A, { children: [ue2, N(Q, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, N(hr, { title: "Theme Colors", schemeColorLookup: U2, colorDefs: j2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), N(hr, { schemeColorLookup: U2, colorDefs: j2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), N(Q, { light: true, style: { marginBottom: "10px" } }), N(hr, { title: "Standard Colors", schemeColorLookup: U2, colorDefs: j2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), E("div", { style: { opacity: 0 === j2.recentColorsLimited.length ? "0" : void 0, display: 0 === j2.recentColorsLimited.length ? "none" : void 0 }, children: [N(Q, { light: true, style: { marginBottom: "10px" } }), N(hr, { title: "Recent Colors", schemeColorLookup: U2, colorDefs: j2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && C2 === sr.End ? E(A, { children: [N(Q, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, N("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), N(Q, { light: true, style: { marginBottom: "10px" } }), E("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, N("div", { style: { flex: "1 1 100%", background: "pink" } }), N(ee, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
247
+ K2();
248
+ }, children: N("div", _2 ? { children: "Preset" } : { children: "Custom" }) }), N(ee, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
248
249
  Promise.resolve(h2?.()).then(() => {
249
250
  ie2(oe2);
250
251
  });
251
252
  }, children: "Done" })] })] });
252
- })), wr = x(Be, {}), kr = k(S((e2, t2) => {
253
- const { selectedColor: o2, quickColor: n2, icon: a2 = wr, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Re.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = ra(i2, [i2]), b2 = ra(s2, [s2]), y2 = ra(d2, [d2]), [w2, k2] = D(() => {
254
- }), S2 = n2 || (w2 || o2) || m2?.autoColor, T2 = M(false), P2 = v(() => {
255
- }, []), R2 = ra(() => {
256
- k2(o2);
257
- }, [o2]), F2 = ra((e3) => {
258
- T2.current || (k2(e3), f2?.(e3));
259
- }, [f2]), B2 = ra((e3) => {
260
- T2.current || (k2(e3), b2?.(e3));
261
- }, [b2]), N2 = ra((e3, t3) => {
262
- T2.current || (k2(void 0), y2?.(e3, t3));
263
- }, [y2]), E2 = C(() => x(A, { sx: { width: "24px", height: "24px", color: "inherit", "--sxl-color-active": `${S2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${S2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [S2, a2, g2]), I2 = ra((e3) => {
264
- y2?.(n2, false);
265
- }, [y2, n2]), [L2, H2] = D(false), W2 = v((e3) => {
253
+ })), wr = N(_e, {}), kr = L(H((e2, t2) => {
254
+ const { selectedColor: o2, quickColor: n2, icon: a2 = wr, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ge.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = wa(i2, [i2]), x2 = wa(s2, [s2]), b2 = wa(d2, [d2]), [y2, w2] = O(() => {
255
+ }), k2 = n2 || (y2 || o2) || m2?.autoColor, S2 = U(false), C2 = z(() => {
256
+ }, []), v2 = wa(() => {
257
+ w2(o2);
258
+ }, [o2]), T2 = wa((e3) => {
259
+ S2.current || (w2(e3), f2?.(e3));
260
+ }, [f2]), D2 = wa((e3) => {
261
+ S2.current || (w2(e3), x2?.(e3));
262
+ }, [x2]), P2 = wa((e3, t3) => {
263
+ S2.current || (w2(void 0), b2?.(e3, t3));
264
+ }, [b2]), R2 = W(() => N(X, { sx: { width: "24px", height: "24px", color: "inherit", "--sxl-color-active": `${k2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${k2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [k2, a2, g2]), M2 = wa((e3) => {
265
+ b2?.(n2, false);
266
+ }, [b2, n2]), [F2, B2] = O(false), E2 = z((e3) => {
266
267
  const { closeFloat: t3, closeFloatAll: n3 } = e3;
267
- return x(yr, { ...m2, selectedColor: o2, previewColor: w2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
268
- e4.which === ia.Enter && (p2 ? n3() : t3());
269
- }, onPreviewColorImmediate: B2, onPreviewColor: F2, onSelectColor: N2, onEyeDropStart: () => H2(true), onEyeDropStop: () => H2(false), compareRGB: u2, darkMode: g2 });
270
- }, [o2, w2, p2, S2, m2?.autoColor, g2]), z2 = { onQuickClick: n2 ? I2 : void 0, createPopupPanel: W2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: R2, onPopupClose: P2, tooltip: r2 || l2 || "Color", label: l2, icon: E2, ...h2 };
271
- return c2 === Re.Toolbar ? x(Me, { ref: t2, ...z2 }) : x(Fe, { ref: t2, ...z2 });
268
+ return N(yr, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
269
+ e4.which === Sa.Enter && (p2 ? n3() : t3());
270
+ }, onPreviewColorImmediate: D2, onPreviewColor: T2, onSelectColor: P2, onEyeDropStart: () => B2(true), onEyeDropStop: () => B2(false), compareRGB: u2, darkMode: g2 });
271
+ }, [o2, y2, p2, k2, m2?.autoColor, g2]), A2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: E2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: R2, ...h2 };
272
+ return c2 === Ge.Toolbar ? N(Ue, { ref: t2, ...A2 }) : N(je, { ref: t2, ...A2 });
272
273
  })), Sr = 82, Cr = (e2) => {
273
274
  const { styleColor: t2, length: o2 = Sr, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
274
- return x($, { 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: x(Da, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
275
- }, vr = k(S((e2, t2) => {
276
- 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 = ra(d2, []), h2 = v((e3) => {
275
+ return N(te, { 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: N(x, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
276
+ }, vr = L(H((e2, t2) => {
277
+ 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 = wa(d2, []), h2 = z((e3) => {
277
278
  const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
278
279
  for (let e4 = 0; e4 < u3.length; e4++) {
279
280
  const t4 = u3[e4];
280
281
  if ("None" === t4.description && !c2) continue;
281
- const a2 = x(Cr, { styleColor: i2, length: Sr, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
282
+ const a2 = N(Cr, { styleColor: i2, length: Sr, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
282
283
  let d4 = null;
283
- d4 = n2 ? b(y, { children: [x(A, { sx: { marginRight: "6px" }, children: t4.description }), b(A, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [x("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
284
+ d4 = n2 ? E(A, { children: [N(X, { sx: { marginRight: "6px" }, children: t4.description }), E(X, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [N("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(N(qe, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ke(4) }, paddingLeft: "16px", background: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
284
285
  l3(), g2(t4.style);
285
286
  }, onKeyDown: (e5) => {
286
- e5.which === ia.Enter && l3();
287
+ e5.which === Sa.Enter && l3();
287
288
  }, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
288
289
  }
289
- return x(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
290
- }, [r2, c2, i2, s2, m2]), f2 = C(() => {
290
+ return N(X, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
291
+ }, [r2, c2, i2, s2, m2]), f2 = W(() => {
291
292
  const e3 = a.BuiltInDefinitions.get(s2);
292
293
  let t3;
293
- return t3 = "None" === e3.description ? x(A, { sx: { minWidth: `${Sr}px` }, children: "None" }) : x(Cr, { styleColor: i2, length: Sr, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), x(A, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ee() } }, children: t3 });
294
- }, [s2, i2]), w2 = C(() => a.BuiltInDefinitions.get(s2), [s2]), k2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
295
- return o2 === Re.Toolbar ? x(Me, { ...k2 }) : x(Fe, { ...k2 });
296
- })), Tr = k(S((t2, o2) => {
297
- 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 = ra(c2, [c2]), f2 = ra(m2, [m2]), [w2, k2] = D(), [S2, T2] = D(), P2 = w2 ?? l2, R2 = S2 ?? n2, M2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, F2 = ra((e2) => {
294
+ return t3 = "None" === e3.description ? N(X, { sx: { minWidth: `${Sr}px` }, children: "None" }) : N(Cr, { styleColor: i2, length: Sr, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), N(X, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ke() } }, children: t3 });
295
+ }, [s2, i2]), x2 = W(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
296
+ return o2 === Ge.Toolbar ? N(Ue, { ...b2 }) : N(je, { ...b2 });
297
+ })), Tr = L(H((t2, o2) => {
298
+ 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 = wa(c2, [c2]), f2 = wa(m2, [m2]), [x2, y2] = O(), [w2, k2] = O(), S2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = wa((e2) => {
298
299
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
299
300
  let n3 = false;
300
301
  for (let r4 = 0; r4 < o3.length; r4++) e2[o3[r4]]?.style && (t3[o3[r4]] = { style: e2[o3[r4]].style, color: e2[o3[r4]].color }, n3 || t3[o3[r4]].style === a.StrokeStyle.None || (n3 = true));
301
302
  o3.length < 6 && (n3 = true);
302
303
  const r3 = n3 ? t3.left : null, l3 = n3 ? t3.top : null, i3 = n3 ? t3.right : null, d3 = n3 ? t3.bottom : null, c3 = n3 ? t3.vertical : null, m3 = n3 ? t3.horizontal : null;
303
304
  let p3 = "";
304
- return l3 || r3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), r3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || r3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), r3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || r3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), b("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [x($, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: x("path", { d: p3 }) }), x(A, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Ae } }, children: x(Pa, { getBorderAt: (e3, n4) => {
305
+ return l3 || r3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), r3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || r3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), r3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || r3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), E("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [N(te, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: N("path", { d: p3 }) }), N(X, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Xe } }, children: N(b, { getBorderAt: (e3, n4) => {
305
306
  if (!u2 || 0 === o3.length) return null;
306
307
  const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
307
308
  return 0 === a2 ? (l4.top = t3.top, l4.bottom = t3.horizontal) : (l4.top = t3.horizontal, l4.bottom = t3.bottom), 0 === r4 ? (l4.left = t3.left, l4.right = t3.vertical) : (l4.left = t3.vertical, l4.right = t3.right), u2?.(l4);
308
309
  }, width: 18, height: 18, darkMode: s2, style: { top: "0px", left: "0px", width: "18px", height: "18px", minWidth: "18px", minHeight: "18px", position: "relative" } }) })] });
309
- }, [R2, P2, s2]), B2 = v((e2, t3, o3) => {
310
+ }, [C2, S2, s2]), D2 = z((e2, t3, o3) => {
310
311
  let n3 = null;
311
312
  if (e2 && e2.length > 0) {
312
313
  let a2 = null;
@@ -314,120 +315,120 @@ const nr = k(S((e2, t2) => {
314
315
  for (let t4 = 0; t4 < e2.length; t4++) n3[e2[t4]] = a2;
315
316
  }
316
317
  return n3;
317
- }, []), N2 = v((e2) => {
318
+ }, []), P2 = z((e2) => {
318
319
  h2?.(e2);
319
- }, []), E2 = v((e2) => {
320
+ }, []), R2 = z((e2) => {
320
321
  f2?.(e2);
321
- }, []), I2 = v((t3) => {
322
+ }, []), M2 = z((t3) => {
322
323
  const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
323
- const l4 = B2(e2, R2 ?? null, r3 ? a.StrokeStyle.None : P2 ?? null), i3 = r3 ? B2([], R2 ?? null, P2 ?? null) : l4;
324
- return x(He, { icon: F2(i3), sx: { background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
325
- o3(), E2(l4), N2(l4);
324
+ const l4 = D2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : S2 ?? null), i3 = r3 ? D2([], C2 ?? null, S2 ?? null) : l4;
325
+ return N(Ye, { icon: T2(i3), sx: { background: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
326
+ o3(), R2(l4), P2(l4);
326
327
  } });
327
- }, m3 = b(y, { children: [b(A, { 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")] }), b(A, { 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 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(kr, { variant: Re.Toolbar, icon: x(Ie, {}), selectedColor: P2 === a.StrokeStyle.None ? new e("transparent") : R2, onPreviewColor: (e2) => {
328
- T2(e2);
328
+ }, m3 = E(A, { children: [E(X, { 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")] }), E(X, { 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 = N(A, { children: E(X, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [N(kr, { variant: Ge.Toolbar, icon: N(Ze, {}), selectedColor: S2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
329
+ k2(e2);
329
330
  }, onSelectColor: (e2, t4) => {
330
- T2(e2);
331
- }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || P2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(vr, { selectedStyle: P2, onSelectStyle: k2, styleColor: R2, darkMode: s2, variant: Re.Toolbar, parentFloat: l3 })] }) });
332
- return b(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, x(ie, { orientation: "horizontal" }), d2 ? m3 : p3] });
333
- }, [P2, R2, n2, r2, s2]), L2 = C(() => F2(M2), [M2, s2]);
334
- return x(Me, { ref: o2, createPopupPanel: I2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => x(Le, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
335
- h2?.(M2);
336
- }, quickButtonProps: { sx: {} }, disabled: i2, icon: L2, ...g2 });
337
- })), Dr = k(S((e2, t2) => {
338
- const { commands: o2, command: n2, commandHook: a2, variant: r2 = aa.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, b2 = na(o2, ["formatBorder"]), y2 = n2 ?? b2[0], w2 = y2?.context() ?? null, k2 = w2?.autoColor ?? i2, S2 = w2?.autoStyle ?? s2, C2 = m2 ?? w2?.quickBorder, T2 = u2 ?? w2?.darkMode, D2 = c2 ?? w2?.createTemporaryBorder, P2 = d2 ?? w2?.schemeLookup, R2 = ra((e3) => {
339
- w2?.onBorderSelect && w2.onBorderSelect(e3), p2?.(e3), y2?.execute(e3, a2);
340
- }, [y2, p2, a2]), M2 = v((e3, t3) => {
331
+ k2(e2);
332
+ }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || S2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), N(vr, { selectedStyle: S2, onSelectStyle: y2, styleColor: C2, darkMode: s2, variant: Ge.Toolbar, parentFloat: l3 })] }) });
333
+ return E(X, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, N(Se, { orientation: "horizontal" }), d2 ? m3 : p3] });
334
+ }, [S2, C2, n2, r2, s2]), F2 = W(() => T2(v2), [v2, s2]);
335
+ return N(Ue, { ref: o2, createPopupPanel: M2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => N(Je, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
336
+ h2?.(v2);
337
+ }, quickButtonProps: { sx: {} }, disabled: i2, icon: F2, ...g2 });
338
+ })), Dr = L(H((e2, t2) => {
339
+ const { commands: o2, command: n2, commandHook: a2, variant: r2 = ya.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 = ba(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, k2 = y2?.autoStyle ?? s2, S2 = m2 ?? y2?.quickBorder, C2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, D2 = wa((e3) => {
340
+ y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
341
+ }, [b2, p2, a2]), P2 = z((e3, t3) => {
341
342
  const { children: o3, title: n3, ...a3 } = e3;
342
343
  let i3 = e3.children;
343
- return (y2?.disabled() || l2) && (i3 = x("div", { children: i3 })), x(We, { command: y2, placement: r2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
344
- }, [y2, l2]);
345
- return x(Tr, { ref: t2, autoColor: k2, darkMode: T2, autoStrokeStyle: S2, createTemporaryBorder: D2, schemeLookup: P2, selectedBorder: C2, onSelectBorder: R2, createTooltip: M2, disabled: l2 || !y2 || y2.disabled(), ...f2 });
346
- })), Pr = k(S((e2, t2) => {
347
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
348
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("mergeToggle"), icon: re(x(ze, {})) }), x(le, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: re(x($e, {})) }), x(le, { ...o3, command: t3.getCommand("mergeVertical"), icon: re(x(Oe, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unmerge"), icon: re(x(Ve, {})) })] });
349
- return ce({ ...e3, children: l3 });
344
+ return (b2?.disabled() || l2) && (i3 = N("div", { children: i3 })), N(Qe, { command: b2, placement: r2 === ya.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
345
+ }, [b2, l2]);
346
+ return N(Tr, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: k2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: S2, onSelectBorder: D2, createTooltip: P2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
347
+ })), Pr = L(H((e2, t2) => {
348
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
349
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("mergeToggle"), icon: we(N(et, {})) }), N(ke, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: we(N(tt, {})) }), N(ke, { ...o3, command: t3.getCommand("mergeVertical"), icon: we(N(ot, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("unmerge"), icon: we(N(nt, {})) })] });
350
+ return Te({ ...e3, children: l3 });
350
351
  }, [r2, n2, a2]);
351
- return x(me, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: re(x(ze, {})), ...l2 });
352
- })), Rr = k(S((e2, t2) => {
353
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
354
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("freezeToggle"), icon: re(x(Ge, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: re(x(Ue, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: re(x(je, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unfreeze"), icon: x(Ve, {}) })] });
355
- return ce({ ...e3, children: l3 });
352
+ return N(De, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: we(N(et, {})), ...l2 });
353
+ })), Rr = L(H((e2, t2) => {
354
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
355
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("freezeToggle"), icon: we(N(at, {})) }), N(ke, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: we(N(rt, {})) }), N(ke, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: we(N(lt, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("unfreeze"), icon: N(nt, {}) })] });
356
+ return Te({ ...e3, children: l3 });
356
357
  }, [r2, n2, a2]);
357
- return x(me, { 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: x(_e, {}), ...l2 });
358
- })), Mr = k(S((e2, t2) => {
359
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
360
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("find"), icon: re(x(qe, {})) }), x(le, { ...o3, command: t3.getCommand("findReplace"), icon: re(x(Ke, {})) }), x(le, { ...o3, command: t3.getCommand("goto"), icon: re(x(Xe, {})) })] });
361
- return ce({ ...e3, children: l3 });
358
+ return N(De, { 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: N(it, {}), ...l2 });
359
+ })), Mr = L(H((e2, t2) => {
360
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
361
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("find"), icon: we(N(st, {})) }), N(ke, { ...o3, command: t3.getCommand("findReplace"), icon: we(N(dt, {})) }), N(ke, { ...o3, command: t3.getCommand("goto"), icon: we(N(ct, {})) })] });
362
+ return Te({ ...e3, children: l3 });
362
363
  }, [r2, n2, a2]);
363
- return x(me, { 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: re(x(qe, {})), ...l2 });
364
- })), Fr = k(S((e2, t2) => {
365
- const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = Ra.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
366
- sa(o2);
367
- const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 = ra(() => {
364
+ return N(De, { 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: we(N(st, {})), ...l2 });
365
+ })), Fr = L(H((e2, t2) => {
366
+ 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;
367
+ Ca(o2);
368
+ const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = O(g2), x2 = wa(() => {
368
369
  const e3 = parseFloat(h2);
369
370
  isNaN(e3) ? f2(g2()) : parseFloat(g2()) !== e3 && o2.execute(e3, n2);
370
371
  }, [g2, o2, h2, n2]);
371
- P(() => {
372
+ V(() => {
372
373
  f2(g2());
373
374
  }, [o2?.state()]);
374
- const w2 = C(() => {
375
+ const b2 = W(() => {
375
376
  if (!n2) return null;
376
377
  const e3 = { ...n2 };
377
378
  return delete e3.beforeExecute, e3;
378
- }, [n2]), k2 = na(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = C(() => k2 ? b(A, { className: Hn("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [x(le, { command: k2[0], commandHook: w2, icon: re(x(Ze, {})) }), x(le, { command: k2[1], icon: re(x(Je, {})) })] }) : null, [k2]), T2 = Sa(), R2 = C(() => `${r.getSharedMeasurer()("12.3", Math.round(T2.typography.fontSize), T2.typography.fontFamily).width}px`, [T2]), M2 = v((e3) => {
379
+ }, [n2]), w2 = ba(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), k2 = W(() => w2 ? E(X, { className: Yn("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [N(ke, { command: w2[0], commandHook: b2, icon: we(N(mt, {})) }), N(ke, { command: w2[1], icon: we(N(pt, {})) })] }) : null, [w2]), S2 = Ha(), C2 = W(() => `${r.getSharedMeasurer()("12.3", Math.round(S2.typography.fontSize), S2.typography.fontFamily).width}px`, [S2]), v2 = z((e3) => {
379
380
  const { onMouseDown: t3, onMouseUp: n3, ...a3 } = e3;
380
- return x(L, { component: "div", ...a3, disableRipple: true, children: x(O, { inputMode: "numeric", disabled: s2 || !o2 || o2.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: R2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: h2, onFocus: (e4) => {
381
+ return N(J, { component: "div", ...a3, disableRipple: true, children: N(oe, { inputMode: "numeric", disabled: s2 || !o2 || o2.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: C2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: h2, onFocus: (e4) => {
381
382
  e4.target?.select();
382
383
  }, onKeyDown: (e4) => {
383
- if (e4.which === ia.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), y2());
384
- else if (e4.which === ia.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
384
+ if (e4.which === Sa.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), x2());
385
+ else if (e4.which === Sa.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
385
386
  e4.target?.select();
386
387
  }, 0), e4.stopPropagation(), e4.preventDefault());
387
388
  else {
388
389
  if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
389
390
  if (e4.key.match("[0-9.]") && (h2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
390
- if (e4.which === ia.Space) return void e4.preventDefault();
391
+ if (e4.which === Sa.Space) return void e4.preventDefault();
391
392
  }
392
393
  }, onBlur: () => {
393
- y2();
394
+ x2();
394
395
  }, onChange: (e4) => {
395
396
  if (e4.target.value.length > 4) return e4.stopPropagation(), void e4.preventDefault();
396
397
  f2(e4.target.value);
397
398
  } }) });
398
- }, [h2, s2, o2]), F2 = v((e3) => {
399
+ }, [h2, s2, o2]), T2 = z((e3) => {
399
400
  const t3 = (e4) => {
400
401
  o2?.execute(e4, n2);
401
402
  }, a3 = o2?.state(), r2 = [];
402
403
  for (let e4 = 0; e4 < i2.length; e4++) {
403
404
  const n3 = i2[e4] === a3;
404
- r2.push(x(Ne, { selected: n3, icon: n3 ? x(Ye, {}) : void 0, disabled: s2 || !o2 || o2.disabled(), onMouseDown: (e5) => {
405
+ r2.push(N(qe, { selected: n3, icon: n3 ? N(ut, {}) : void 0, disabled: s2 || !o2 || o2.disabled(), onMouseDown: (e5) => {
405
406
  0 === e5.button && e5.preventDefault();
406
407
  }, onMouseUp: (o3) => {
407
408
  0 === o3.button && t3(i2[e4]);
408
409
  }, onKeyDown: (o3) => {
409
- o3.keyCode !== ia.Enter && o3.keyCode !== ia.Space || t3(i2[e4]);
410
- }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
410
+ o3.keyCode !== Sa.Enter && o3.keyCode !== Sa.Space || t3(i2[e4]);
411
+ }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: N(X, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
411
412
  }
412
- const l3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [S2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
413
- return ce({ ...e3, children: l3 });
413
+ const l3 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [k2, N(Se, { orientation: "horizontal" }), N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
414
+ return Te({ ...e3, children: l3 });
414
415
  }, [s2, o2?.state(), n2]);
415
- return x(Me, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: F2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: M2, ...u2 });
416
- })), Br = k((e2) => {
416
+ return N(Ue, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...u2 });
417
+ })), Br = L((e2) => {
417
418
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: i2, ...s2 } = e2;
418
- return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? x(Ye, {}) : void 0, onMouseDown: (e3) => {
419
+ return N(qe, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? N(ut, {}) : void 0, onMouseDown: (e3) => {
419
420
  0 === e3.button && e3.preventDefault();
420
421
  }, onMouseUp: (e3) => {
421
422
  0 === e3.button && a2(r2.numberFormat);
422
423
  }, onKeyDown: (e3) => {
423
- e3.keyCode !== ia.Enter && e3.keyCode !== ia.Space || a2(r2.numberFormat);
424
- }, ...s2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
425
- }), Nr = k(S((e2, t2) => {
426
- const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = na(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = C(() => {
424
+ e3.keyCode !== Sa.Enter && e3.keyCode !== Sa.Space || a2(r2.numberFormat);
425
+ }, ...s2, children: E(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [E(Z, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), N(Z, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
426
+ }), Nr = L(H((e2, t2) => {
427
+ const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = ba(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = W(() => {
427
428
  if (!n2) return null;
428
429
  const e3 = { ...n2 };
429
430
  return delete e3.beforeExecute, e3;
430
- }, [n2]), g2 = v((e3, t3) => {
431
+ }, [n2]), g2 = z((e3, t3) => {
431
432
  const o3 = (e4) => {
432
433
  n2?.beforeExecute?.(m2, m2?.state()), m2.execute(e4, n2), n2?.onExecute?.(m2, m2?.state());
433
434
  }, r2 = m2?.context()(), i3 = l.Styles.lookupPrimary(), d3 = [];
@@ -440,149 +441,149 @@ const nr = k(S((e2, t2) => {
440
441
  }
441
442
  "" === t4 && i3[e4].formatType === l.Type.General && (t4 = "No specific format");
442
443
  const n3 = i3[e4].formatType === p2;
443
- d3.push(x(Br, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
444
+ d3.push(N(Br, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
444
445
  }
445
- const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(Br, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
446
+ const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = N(Br, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
446
447
  n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
447
- }, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), y2 = b(A, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(nt, {})) })] }), w2 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [y2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), f3] });
448
- return ce({ ...e3, children: w2 });
449
- }, [m2?.context(), m2?.state(), n2, a2]), h2 = Sa(), f2 = C(() => {
448
+ }, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), x2 = E(X, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [N(ke, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2, icon: N(gt, {}) }), N(ke, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2, icon: N(ht, {}) }), N(ke, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2, icon: N(ft, {}) }), N(ke, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2, icon: we(N(xt, {})) }), N(ke, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2, icon: we(N(bt, {})) })] }), b2 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, N(Se, { orientation: "horizontal" }), N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), N(Se, { orientation: "horizontal" }), f3] });
449
+ return Te({ ...e3, children: b2 });
450
+ }, [m2?.context(), m2?.state(), n2, a2]), h2 = Ha(), f2 = W(() => {
450
451
  const e3 = l.Type.MediumTime;
451
452
  return `${r.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
452
453
  }, [h2]);
453
- return x(me, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: x(A, { 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: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
454
- })), Er = k(S((e2, t2) => {
455
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
456
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("clearAll"), icon: x(at, {}) }), x(le, { ...o3, command: t3.getCommand("clearFormats"), icon: re(x(rt, {})) }), x(le, { ...o3, command: t3.getCommand("clearContents"), icon: re(x(lt, {})) }), x(le, { ...o3, command: t3.getCommand("clearComments") }), x(le, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
457
- return ce({ ...e3, children: a3 });
454
+ return N(De, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: N(X, { 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: N(X, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
455
+ })), Er = L(H((e2, t2) => {
456
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
457
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("clearAll"), icon: N(yt, {}) }), N(ke, { ...o3, command: t3.getCommand("clearFormats"), icon: we(N(wt, {})) }), N(ke, { ...o3, command: t3.getCommand("clearContents"), icon: we(N(kt, {})) }), N(ke, { ...o3, command: t3.getCommand("clearComments") }), N(ke, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
458
+ return Te({ ...e3, children: a3 });
458
459
  }, [r2, n2, a2]);
459
- return x(me, { 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: x(at, {}), ...l2 });
460
- })), Ar = k(S((e2, t2) => {
461
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
462
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("fillDown"), icon: re(x(it, {})) }), x(le, { ...o3, command: t3.getCommand("fillRight"), icon: re(x(it, { sx: { transform: "rotate(270deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillUp"), icon: re(x(it, { sx: { transform: "rotate(180deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillLeft"), icon: re(x(it, { sx: { transform: "rotate(90deg)" } })) })] });
463
- return ce({ ...e3, children: a3 });
460
+ return N(De, { 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: N(yt, {}), ...l2 });
461
+ })), Ar = L(H((e2, t2) => {
462
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
463
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("fillDown"), icon: we(N(St, {})) }), N(ke, { ...o3, command: t3.getCommand("fillRight"), icon: we(N(St, { sx: { transform: "rotate(270deg)" } })) }), N(ke, { ...o3, command: t3.getCommand("fillUp"), icon: we(N(St, { sx: { transform: "rotate(180deg)" } })) }), N(ke, { ...o3, command: t3.getCommand("fillLeft"), icon: we(N(St, { sx: { transform: "rotate(90deg)" } })) })] });
464
+ return Te({ ...e3, children: a3 });
464
465
  }, [r2, n2, a2]);
465
- return x(me, { 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: re(x(it, {})), ...l2 });
466
- })), Ir = k(S((e2, t2) => {
467
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = aa.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = na(o2, m2), { singleCommand: u2, allDisabled: g2 } = C(() => {
466
+ return N(De, { 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: we(N(St, {})), ...l2 });
467
+ })), Ir = L(H((e2, t2) => {
468
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ya.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = ba(o2, m2), { singleCommand: u2, allDisabled: g2 } = W(() => {
468
469
  let e3 = null, t3 = 0;
469
- for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 === aa.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
470
+ for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 === ya.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
470
471
  return { singleCommand: e3, allDisabled: 0 === t3 };
471
- }, [p2]), h2 = C(() => {
472
+ }, [p2]), h2 = W(() => {
472
473
  const e3 = /* @__PURE__ */ new Map();
473
- return e3.set("insertCellsShiftDown", re(x(st, {}))), e3.set("insertCellsShiftRight", re(x(st, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", re(x(dt, {}))), e3.set("insertColumns", re(x(ct, {}))), e3;
474
- }, []), f2 = v((e3, t3) => {
474
+ return e3.set("insertCellsShiftDown", we(N(Ct, {}))), e3.set("insertCellsShiftRight", we(N(Ct, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", we(N(vt, {}))), e3.set("insertColumns", we(N(Tt, {}))), e3;
475
+ }, []), f2 = z((e3, t3) => {
475
476
  let o3 = null;
476
- const a3 = { variant: aa.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
477
- l2 || (o3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: t3.getCommand("addSheet"), icon: re(x(mt, {})) })] }));
478
- const i3 = b(y, { children: [x(le, { ...a3, command: p2[0], icon: h2.get(m2[0]) }), x(le, { ...a3, command: p2[1], icon: h2.get(m2[1]) }), x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: p2[2], icon: h2.get(m2[2]) }), x(le, { ...a3, command: p2[3], icon: h2.get(m2[3]) }), o3] });
479
- return ce({ ...e3, children: i3 });
477
+ const a3 = { variant: ya.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
478
+ l2 || (o3 = E(A, { children: [N(Se, { orientation: "horizontal" }), N(ke, { ...a3, command: t3.getCommand("addSheet"), icon: we(N(Dt, {})) })] }));
479
+ const i3 = E(A, { children: [N(ke, { ...a3, command: p2[0], icon: h2.get(m2[0]) }), N(ke, { ...a3, command: p2[1], icon: h2.get(m2[1]) }), N(Se, { orientation: "horizontal" }), N(ke, { ...a3, command: p2[2], icon: h2.get(m2[2]) }), N(ke, { ...a3, command: p2[3], icon: h2.get(m2[3]) }), o3] });
480
+ return Te({ ...e3, children: i3 });
480
481
  }, [r2, p2, n2, a2, h2]);
481
- return u2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, icon: h2.get(u2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: b(y, { children: [x("span", { children: "Insert new cells, rows or columns to your workbook." }), x("br", {}), x("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: f2, icon: re(x(ct, {})), ...c2 });
482
- })), Lr = k(S((e2, t2) => {
483
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = aa.Toolbar, ...c2 } = e2, m2 = na(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = C(() => {
482
+ return u2 ? N(ke, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, icon: h2.get(u2.key()), ...c2 }) : N(De, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: E(A, { children: [N("span", { children: "Insert new cells, rows or columns to your workbook." }), N("br", {}), N("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: f2, icon: we(N(Tt, {})), ...c2 });
483
+ })), Lr = L(H((e2, t2) => {
484
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ya.Toolbar, ...c2 } = e2, m2 = ba(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = W(() => {
484
485
  let e3 = null, t3 = 0;
485
- for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === aa.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
486
+ for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === ya.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
486
487
  return { singleCommand: e3, allDisabled: 0 === t3 };
487
- }, [m2]), g2 = C(() => {
488
+ }, [m2]), g2 = W(() => {
488
489
  const e3 = /* @__PURE__ */ new Map();
489
- return e3.set("deleteCellsShiftUp", re(x(pt, { sx: { transform: "rotate(0deg)" } }))), e3.set("deleteCellsShiftLeft", re(x(pt, { sx: { transform: "rotate(270deg)" } }))), e3.set("deleteRows", re(x(ut, {}))), e3.set("deleteColumns", re(x(gt, {}))), e3;
490
- }, []), h2 = v((e3, t3) => {
491
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
490
+ return e3.set("deleteCellsShiftUp", we(N(Pt, { sx: { transform: "rotate(0deg)" } }))), e3.set("deleteCellsShiftLeft", we(N(Pt, { sx: { transform: "rotate(270deg)" } }))), e3.set("deleteRows", we(N(Rt, {}))), e3.set("deleteColumns", we(N(Mt, {}))), e3;
491
+ }, []), h2 = z((e3, t3) => {
492
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
492
493
  let a3 = null;
493
- l2 || (a3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteSheet"), icon: re(x(mt, {})) })] }));
494
- const i3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("deleteCellsShiftUp"), icon: g2.get("deleteCellsShiftUp") }), x(le, { ...o3, command: t3.getCommand("deleteCellsShiftLeft"), icon: g2.get("deleteCellsShiftLeft") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteRows"), icon: g2.get("deleteRows") }), x(le, { ...o3, command: t3.getCommand("deleteColumns"), icon: g2.get("deleteColumns") }), a3] });
495
- return ce({ ...e3, children: i3 });
494
+ l2 || (a3 = E(A, { children: [N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("deleteSheet"), icon: we(N(Dt, {})) })] }));
495
+ const i3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("deleteCellsShiftUp"), icon: g2.get("deleteCellsShiftUp") }), N(ke, { ...o3, command: t3.getCommand("deleteCellsShiftLeft"), icon: g2.get("deleteCellsShiftLeft") }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("deleteRows"), icon: g2.get("deleteRows") }), N(ke, { ...o3, command: t3.getCommand("deleteColumns"), icon: g2.get("deleteColumns") }), a3] });
496
+ return Te({ ...e3, children: i3 });
496
497
  }, [r2, n2, a2, g2]);
497
- return p2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, icon: g2.get(p2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, tooltip: b(y, { children: [x("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), x("br", {}), x("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, icon: re(x(gt, {})), ...c2 });
498
- })), Hr = k(S((t2, o2) => {
499
- const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = aa.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = d2;
498
+ return p2 ? N(ke, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, icon: g2.get(p2.key()), ...c2 }) : N(De, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, tooltip: E(A, { children: [N("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), N("br", {}), N("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, icon: we(N(Mt, {})), ...c2 });
499
+ })), Hr = L(H((t2, o2) => {
500
+ const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = ya.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...x2 } = d2;
500
501
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
501
- sa(n2);
502
- const y2 = n2?.context();
503
- let w2 = s2 ?? y2?.quickColor;
504
- c2 && !w2 && (w2 = new e("transparent"));
505
- const k2 = g2 ?? y2?.autoColor, S2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, P2 = C(() => ({ autoColor: k2, schemeLookup: S2, recentColors: T2, darkMode: D2, ...b2 }), [k2, S2, T2, D2]), R2 = ra((e2, t3) => {
506
- e2 && t3 && y2?.addRecentColor && y2.addRecentColor(e2), y2?.onColorSelect && y2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
507
- }, [n2, r2, a2, y2]), M2 = v((e2, t3) => {
502
+ Ca(n2);
503
+ const b2 = n2?.context();
504
+ let y2 = s2 ?? b2?.quickColor;
505
+ c2 && !y2 && (y2 = new e("transparent"));
506
+ const w2 = g2 ?? b2?.autoColor, k2 = h2 ?? b2?.schemeLookup, S2 = f2 ?? b2?.recentColors, C2 = m2 ?? b2?.darkMode, v2 = W(() => ({ autoColor: w2, schemeLookup: k2, recentColors: S2, darkMode: C2, ...x2 }), [w2, k2, S2, C2]), T2 = wa((e2, t3) => {
507
+ e2 && t3 && b2?.addRecentColor && b2.addRecentColor(e2), b2?.onColorSelect && b2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
508
+ }, [n2, r2, a2, b2]), D2 = z((e2, t3) => {
508
509
  const { children: o3, title: a3, ...r3 } = e2;
509
510
  let s3 = e2.children;
510
- return (n2?.disabled() || l2) && (s3 = x("div", { children: s3 })), x(We, { command: n2, placement: i2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
511
+ return (n2?.disabled() || l2) && (s3 = N("div", { children: s3 })), N(Qe, { command: n2, placement: i2 === ya.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
511
512
  }, [n2, l2]);
512
- return x(kr, { ref: o2, panelProps: P2, icon: p2, quickColor: w2, selectedColor: n2?.state(), onSelectColor: R2, variant: i2 === aa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: M2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: D2, ...u2 });
513
+ return N(kr, { ref: o2, panelProps: v2, icon: p2, quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ya.Menuitem ? Ge.Menuitem : Ge.Toolbar, createTooltip: D2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
513
514
  }));
514
515
  Hr.displayName = "ColorCommandButton";
515
- const Wr = k(S((e2, t2) => {
516
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = v((e3, t3) => {
517
- const o3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("gridlinesToggle") }), x(Hr, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true } }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
518
- return ce({ ...e3, children: l3 });
516
+ const Wr = L(H((e2, t2) => {
517
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ba(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = z((e3, t3) => {
518
+ const o3 = { variant: ya.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("gridlinesToggle") }), N(Hr, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: N(Ze, {}), panelProps: { disableAlpha: true } }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), N(ke, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
519
+ return Te({ ...e3, children: l3 });
519
520
  }, [r2, n2]);
520
- return x(me, { 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: x(ht, { command: s2[0], scope: "view" }), ...i2 });
521
- })), zr = k(S((e2, t2) => {
522
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
523
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...o3, command: t3.getCommand("sortDescending"), icon: re(x(xt, {})) }), a3 ? x(le, { ...o3, command: a3, icon: re(x(bt, {})) }) : null, x(ie, { orientation: "horizontal" }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
524
- return ce({ ...e3, children: l3 });
521
+ return N(De, { 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: N(Ft, { command: s2[0], scope: "view" }), ...i2 });
522
+ })), zr = L(H((e2, t2) => {
523
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
524
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("sortAscending"), icon: we(N(Bt, {})) }), N(ke, { ...o3, command: t3.getCommand("sortDescending"), icon: we(N(Nt, {})) }), a3 ? N(ke, { ...o3, command: a3, icon: we(N(Et, {})) }) : null, N(Se, { orientation: "horizontal" }), N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: we(N(At, {})) }), N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: we(N(It, {})) }), N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: we(N(Lt, {})) })] });
525
+ return Te({ ...e3, children: l3 });
525
526
  }, [r2, n2, a2]);
526
- return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: re(x(ft, {})), ...l2 });
527
- })), $r = k(S((e2, t2) => {
528
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
529
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
530
- return ce({ ...e3, children: a3 });
527
+ return N(De, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", tooltip: E(A, { children: [N("span", { children: "Organize your data so it's easier to analyze." }), N("br", {}), N("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: we(N(Bt, {})), ...l2 });
528
+ })), $r = L(H((e2, t2) => {
529
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = z((e3, t3) => {
530
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: we(N(At, {})) }), N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: we(N(It, {})) }), N(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: we(N(Lt, {})) })] });
531
+ return Te({ ...e3, children: a3 });
531
532
  }, [r2, n2, a2]);
532
- return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: re(x(yt, {})), ...l2 });
533
- })), Or = k(S((e2, t2) => {
533
+ return N(De, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: E(A, { children: [N("span", { children: "Organize your data so it's easier to analyze." }), N("br", {}), N("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: we(N(At, {})), ...l2 });
534
+ })), Or = L(H((e2, t2) => {
534
535
  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];
535
536
  !a2 && r2 && p2.push("redo");
536
- const u2 = na(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
537
- let w2 = d2;
538
- d2 || (w2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (w2 = false));
539
- const [k2, S2] = D(0), C2 = v((e3, t3) => {
540
- let o3 = 0 === k2 ? "Cancel" : `${g2.label()} ${k2} Action${1 === k2 ? "" : "s"}`, n3 = false;
537
+ const u2 = ba(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
538
+ let x2 = d2;
539
+ d2 || (x2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (x2 = false));
540
+ const [b2, y2] = O(0), w2 = z((e3, t3) => {
541
+ let o3 = 0 === b2 ? "Cancel" : `${g2.label()} ${b2} Action${1 === b2 ? "" : "s"}`, n3 = false;
541
542
  f2 || (n3 = true), n3 || (n3 = r2 ? !f2.hasRedo() && !f2.hasUndo() : !f2.hasRedo());
542
543
  const l3 = (e4) => {
543
544
  g2.execute(e4);
544
- }, i3 = x(Ne, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: null, onMouseEnter: () => {
545
- S2(0);
545
+ }, i3 = N(qe, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: null, onMouseEnter: () => {
546
+ y2(0);
546
547
  }, onMouseDown: (e4) => {
547
548
  0 === e4.button && e4.preventDefault();
548
549
  }, onMouseUp: (e4) => {
549
- 0 === e4.button && l3(k2);
550
+ 0 === e4.button && l3(b2);
550
551
  }, onKeyDown: (e4) => {
551
- e4.isDefaultPrevented() || e4.keyCode !== ia.Enter && e4.keyCode !== ia.Space || l3(k2);
552
- }, children: x(I, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
552
+ e4.isDefaultPrevented() || e4.keyCode !== Sa.Enter && e4.keyCode !== Sa.Space || l3(b2);
553
+ }, children: N(Z, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
553
554
  if (n3) return i3;
554
555
  const s3 = a2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), d3 = [];
555
556
  for (let e4 = 0; e4 < s3.length; e4++) {
556
557
  const t4 = s3[e4];
557
- d3.push(x(Ne, { sx: { maxWidth: "360px", display: "flex" }, icon: x(mt, {}), disabled: w2, selected: e4 < k2, onMouseEnter: () => {
558
- S2(e4 + 1);
558
+ d3.push(N(qe, { sx: { maxWidth: "360px", display: "flex" }, icon: N(Dt, {}), disabled: x2, selected: e4 < b2, onMouseEnter: () => {
559
+ y2(e4 + 1);
559
560
  }, onMouseDown: (e5) => {
560
561
  0 === e5.button && e5.preventDefault();
561
562
  }, onMouseUp: (t5) => {
562
563
  0 === t5.button && l3(e4 + 1);
563
564
  }, onKeyDown: (t5) => {
564
- t5.isDefaultPrevented() || t5.keyCode !== ia.Enter && t5.keyCode !== ia.Space || l3(e4 + 1);
565
- }, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [x(I, { component: "div", children: t4 }), x(mt, {})] }) }, `action:${e4}`));
565
+ t5.isDefaultPrevented() || t5.keyCode !== Sa.Enter && t5.keyCode !== Sa.Space || l3(e4 + 1);
566
+ }, children: E(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [N(Z, { component: "div", children: t4 }), N(Dt, {})] }) }, `action:${e4}`));
566
567
  }
567
568
  let c3 = null;
568
569
  if (!a2 && r2) {
569
- const o4 = { scope: "undo", commands: t3, variant: aa.Menuitem, parentFloat: e3.floatReference };
570
- c3 = [], c3.push(x(Or, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
570
+ const o4 = { scope: "undo", commands: t3, variant: ya.Menuitem, parentFloat: e3.floatReference };
571
+ c3 = [], c3.push(N(Or, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(N(Se, { orientation: "horizontal" }, "action:redo-div"));
571
572
  }
572
- const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
+ const m3 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
574
  e3.closeFloatAll();
574
575
  }, onMouseLeave: () => {
575
- S2(0);
576
- }, children: [c3, x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), i3] });
577
- return ce({ ...e3, children: m3 });
578
- }, [g2?.context(), g2?.state(), i2, f2, k2, w2]);
579
- return x(me, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: w2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? re(x(a2 ? St : Ct, {})), selected: false, ...m2 });
576
+ y2(0);
577
+ }, children: [c3, N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), N(Se, { orientation: "horizontal" }), i3] });
578
+ return Te({ ...e3, children: m3 });
579
+ }, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
580
+ return N(De, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: N(A, { children: N("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? we(N(a2 ? Ht : Wt, {})), selected: false, ...m2 });
580
581
  })), Vr = i.getFontList(), Gr = /* @__PURE__ */ new Map();
581
582
  for (let e2 = 0; e2 < Vr.length; e2++) Gr.set(Vr[e2].fontRef.getFamily(), Vr[e2]);
582
- const Ur = k(S((e2, t2) => {
583
+ const Ur = L(H((e2, t2) => {
583
584
  const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
584
- sa(o2);
585
- const m2 = o2?.state(), p2 = Sa(), u2 = C(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = v((e3) => {
585
+ Ca(o2);
586
+ const m2 = o2?.state(), p2 = Ha(), u2 = W(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = z((e3) => {
586
587
  const t3 = (e4) => {
587
588
  o2?.execute(e4, n2);
588
589
  }, a3 = [];
@@ -591,131 +592,131 @@ const Ur = k(S((e2, t2) => {
591
592
  const r2 = [];
592
593
  for (let e4 = 0; e4 < a3.length; e4++) {
593
594
  const n3 = a3[e4].key === m2;
594
- r2.push(x(Ne, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: n3, disabled: l2 || !o2 || o2.disabled(), icon: n3 ? x(Ye, {}) : void 0, onMouseUp: (o3) => {
595
+ r2.push(N(qe, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: n3, disabled: l2 || !o2 || o2.disabled(), icon: n3 ? N(ut, {}) : void 0, onMouseUp: (o3) => {
595
596
  0 === o3.button && t3(a3[e4].key);
596
597
  }, onMouseDown: (e5) => {
597
598
  0 === e5.button && e5.preventDefault();
598
599
  }, onKeyDown: (o3) => {
599
- o3.keyCode !== ia.Enter && o3.keyCode !== ia.Space || t3(a3[e4].key);
600
- }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
600
+ o3.keyCode !== Sa.Enter && o3.keyCode !== Sa.Space || t3(a3[e4].key);
601
+ }, children: N(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: N(Z, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
601
602
  }
602
- const i3 = x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 }) });
603
- return ce({ ...e3, children: i3 });
603
+ const i3 = N(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 }) });
604
+ return Te({ ...e3, children: i3 });
604
605
  }, [l2, o2?.state()]);
605
- return x(Me, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: x(A, { 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: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
606
- })), jr = k(S((e2, t2) => {
607
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = C(() => {
606
+ return N(Ue, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: N(X, { 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: N(X, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
607
+ })), jr = L(H((e2, t2) => {
608
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = W(() => {
608
609
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
609
610
  return i2[0]?.key();
610
- }, [i2]), d2 = C(() => {
611
+ }, [i2]), d2 = W(() => {
611
612
  const e3 = /* @__PURE__ */ new Map();
612
- return e3.set("formatStrikeThroughToggle", re(x(vt, {}))), e3.set("formatSuperscriptToggle", re(x(Tt, {}))), e3.set("formatSubscriptToggle", re(x(Dt, {}))), e3;
613
- }, []), c2 = v((e3, t3) => {
614
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: d2.get("formatStrikeThroughToggle") }), x(le, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: d2.get("formatSuperscriptToggle") }), x(le, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: d2.get("formatSubscriptToggle") })] });
615
- return ce({ ...e3, children: a3 });
613
+ return e3.set("formatStrikeThroughToggle", we(N(zt, {}))), e3.set("formatSuperscriptToggle", we(N($t, {}))), e3.set("formatSubscriptToggle", we(N(Ot, {}))), e3;
614
+ }, []), c2 = z((e3, t3) => {
615
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: d2.get("formatStrikeThroughToggle") }), N(ke, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: d2.get("formatSuperscriptToggle") }), N(ke, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: d2.get("formatSubscriptToggle") })] });
616
+ return Te({ ...e3, children: a3 });
616
617
  }, [r2, n2, a2]);
617
- return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: d2.get(s2) ?? re(x(vt, {})), ...l2 });
618
- })), _r = k(S((e2, t2) => {
619
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = C(() => {
618
+ return N(De, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: d2.get(s2) ?? we(N(zt, {})), ...l2 });
619
+ })), _r = L(H((e2, t2) => {
620
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = W(() => {
620
621
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
621
622
  return i2[0]?.key();
622
- }, [i2]), d2 = C(() => {
623
+ }, [i2]), d2 = W(() => {
623
624
  const e3 = /* @__PURE__ */ new Map();
624
- return e3.set("formatUnderlinedToggle", re(x(Pt, {}))), e3.set("formatUnderlinedDoubleToggle", re(x(Rt, {}))), e3.set("formatUnderlinedAccountingToggle", re(x(Mt, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", re(x(Ft, {}))), e3;
625
- }, []), c2 = v((e3, t3) => {
626
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: re(x(Pt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: re(x(Rt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: re(x(Mt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: re(x(Ft, {})) })] });
627
- return ce({ ...e3, children: a3 });
625
+ return e3.set("formatUnderlinedToggle", we(N(Vt, {}))), e3.set("formatUnderlinedDoubleToggle", we(N(Gt, {}))), e3.set("formatUnderlinedAccountingToggle", we(N(Ut, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", we(N(jt, {}))), e3;
626
+ }, []), c2 = z((e3, t3) => {
627
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: we(N(Vt, {})) }), N(ke, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: we(N(Gt, {})) }), N(ke, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: we(N(Ut, {})) }), N(ke, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: we(N(jt, {})) })] });
628
+ return Te({ ...e3, children: a3 });
628
629
  }, [r2, n2, a2]);
629
- return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? re(x(Pt, {})), ...l2 });
630
- })), qr = k(S((e2, t2) => {
631
- const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = ra((e3, t3) => {
632
- const o3 = { variant: aa.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
633
- return l2 && (n3.push(F(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Bt, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(F(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: re(x(Nt, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: re(x(Et, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: re(x(At, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: re(x(It, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: re(x(Lt, {})) })), ce({ ...e3, children: n3 });
630
+ return N(De, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? we(N(Vt, {})), ...l2 });
631
+ })), qr = L(H((e2, t2) => {
632
+ const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = wa((e3, t3) => {
633
+ const o3 = { variant: ya.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
634
+ return l2 && (n3.push(j(ke, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: N(_t, {}) })), n3.push(N(Se, { orientation: "horizontal" }, "paste-div"))), n3.push(j(ke, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: we(N(qt, {})) })), n3.push(j(ke, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: we(N(Kt, {})) })), n3.push(j(ke, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: we(N(Xt, {})) })), n3.push(j(ke, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: we(N(Zt, {})) })), n3.push(j(ke, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: we(N(Jt, {})) })), Te({ ...e3, children: n3 });
634
635
  }, [i2, a2, r2, l2]);
635
- return x(me, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: x(Bt, {}), ...s2 });
636
- })), Kr = k(S((e2, t2) => {
637
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = v((e3, t3) => {
638
- const o3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
639
- return ce({ ...e3, children: l3 });
636
+ return N(De, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: N(_t, {}), ...s2 });
637
+ })), Kr = L(H((e2, t2) => {
638
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ba(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = z((e3, t3) => {
639
+ const o3 = { variant: ya.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), N(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), N(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
640
+ return Te({ ...e3, children: l3 });
640
641
  }, [r2, n2, a2]);
641
- return x(me, { 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: x(ht, { command: s2[0], scope: "view" }), ...i2 });
642
- })), Xr = k(S((e2, t2) => {
643
- const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = v((e3) => {
644
- const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
645
- return ce({ ...e3, children: l3 });
642
+ return N(De, { 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: N(Ft, { command: s2[0], scope: "view" }), ...i2 });
643
+ })), Xr = L(H((e2, t2) => {
644
+ const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = z((e3) => {
645
+ const t3 = { variant: ya.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), N(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), N(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), N(Se, { orientation: "horizontal" }), N(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), N(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
646
+ return Te({ ...e3, children: l3 });
646
647
  }, [r2, o2, n2, a2]);
647
- return x(me, { 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: x(ht, { icon: null, label: "Workbook View" }), ...l2 });
648
- })), Zr = k(S((e2, t2) => {
649
- const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = C(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = C(() => p2.getStyle(), [p2, l2]), g2 = C(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), b2 = v(() => u2.getBorder(), [u2]);
650
- return x(A, { ref: t2, sx: { width: "100px", 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: x(Pa, { getBorderAt: b2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...s2?.style }, ...s2, children: x(A, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: x(A, { className: "text", children: o2 }) }) }) });
651
- })), Jr = k((e2) => {
652
- 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 = v((e3) => {
653
- const t3 = { variant: aa.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), x(le, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
654
- return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
648
+ return N(De, { 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: N(Ft, { icon: null, label: "Workbook View" }), ...l2 });
649
+ })), Zr = L(H((e2, t2) => {
650
+ const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = W(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = W(() => p2.getStyle(), [p2, l2]), g2 = W(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), x2 = z(() => u2.getBorder(), [u2]);
651
+ return N(X, { ref: t2, sx: { width: "100px", 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: N(b, { getBorderAt: x2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...s2?.style }, ...s2, children: N(X, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: N(X, { className: "text", children: o2 }) }) }) });
652
+ })), Jr = L((e2) => {
653
+ 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 = z((e3) => {
654
+ const t3 = { variant: ya.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = E(A, { children: [N(ke, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: we(N(Qt, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), N(ke, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
655
+ return Te({ ...e3, children: N(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
655
656
  }, []), h2 = o2?.getName() === n2?.getName();
656
- let f2 = x(He, { 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: () => {
657
+ let f2 = N(Ye, { 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: () => {
657
658
  l2?.(o2);
658
- }, ...u2, children: x(Zr, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
659
- return a2 && (f2 = x($t, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
660
- }), Yr = k(S((e2, t2) => {
659
+ }, ...u2, children: N(Zr, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
660
+ return a2 && (f2 = N(to, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
661
+ }), Yr = L(H((e2, t2) => {
661
662
  const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
662
- sa(n2);
663
- const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 = ra((e3) => {
663
+ Ca(n2);
664
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = wa((e3) => {
664
665
  i2?.(e3), n2?.execute(e3, a2);
665
- }, [n2, i2, a2]), w2 = v((e3, t3) => {
666
- const n3 = { onSelectNamed: y2, styles: g2(), parentFloat: e3.floatReference }, r2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
666
+ }, [n2, i2, a2]), b2 = z((e3, t3) => {
667
+ const n3 = { onSelectNamed: x2, styles: g2(), parentFloat: e3.floatReference }, r2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
667
668
  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());
668
669
  const c3 = (e4) => {
669
670
  let t4 = l3.get(e4);
670
- return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(Jr, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
671
+ return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : N(Jr, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
671
672
  }, m3 = (e4, t4, o3 = true) => {
672
673
  const n4 = [];
673
674
  for (let e5 = 0; e5 < t4.length; e5++) {
674
675
  const o4 = c3(t4[e5]);
675
676
  o4 && n4.push(o4);
676
677
  }
677
- return 0 === n4.length ? null : b(A, { children: [o3 ? x(ie, { orientation: "horizontal" }) : null, x(zt, { children: e4 }, e4 + "-header"), x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
678
+ return 0 === n4.length ? null : E(X, { children: [o3 ? N(Se, { orientation: "horizontal" }) : null, N(eo, { children: e4 }, e4 + "-header"), N(X, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
678
679
  }, p3 = (e4, t4) => {
679
680
  const o3 = [];
680
681
  for (let e5 = 0; e5 < t4.length; e5++) {
681
682
  const n4 = c3(t4[e5]);
682
683
  n4 && o3.push(n4);
683
684
  }
684
- return 0 === o3.length ? null : x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
685
+ return 0 === o3.length ? null : N(X, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
685
686
  }, f3 = [];
686
687
  f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [s.BuiltInName.Normal, s.BuiltInName.Bad, s.BuiltInName.Good, s.BuiltInName.Neutral], i3.length > 0)), f3.push(m3("Data and Model", [s.BuiltInName.Calculation, s.BuiltInName.CheckCell, s.BuiltInName.ExplanatoryText, s.BuiltInName.FollowedHyperlink, s.BuiltInName.Hyperlink, s.BuiltInName.Input, s.BuiltInName.LinkedCell, s.BuiltInName.Note, s.BuiltInName.Output, s.BuiltInName.WarningText])), f3.push(m3("Titles and Headings", [s.BuiltInName.Heading1, s.BuiltInName.Heading2, s.BuiltInName.Heading3, s.BuiltInName.Heading4, s.BuiltInName.Title, s.BuiltInName.Total]));
687
- let w3 = [];
688
- var k3, S3;
689
- return w3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), w3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), w3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), w3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), w3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), w3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((k3 = "Themed Cell Styles", S3 = w3, b(A, { children: [x(ie, { orientation: "horizontal" }), x(zt, { children: k3 }, k3 + "-header"), x(A, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: S3 }, k3 + "-presets")] }, k3))), f3.push(m3("Number Format", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.BuiltInName.Percent])), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
690
- }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant: aa.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: d2, icon: re(x(Ht, {})) })] });
691
- }, [h2, g2?.().getTheme(), f2]), k2 = ra((e3) => {
688
+ let b3 = [];
689
+ var y3, w3;
690
+ return b3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), b3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), b3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), b3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), b3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), b3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, E(X, { children: [N(Se, { orientation: "horizontal" }), N(eo, { children: y3 }, y3 + "-header"), N(X, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: w3 }, y3 + "-presets")] }, y3))), f3.push(m3("Number Format", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.BuiltInName.Percent])), E(X, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [N(X, { onContextMenu: () => {
691
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), N(Se, { orientation: "horizontal" }), N(ke, { variant: ya.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: d2, icon: we(N(Yt, {})) })] });
692
+ }, [h2, g2?.().getTheme(), f2]), y2 = wa((e3) => {
692
693
  const t3 = 18 / r.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
693
694
  return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
694
- }, [u2?.createTemporaryCell]), S2 = d2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(Zr, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: k2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: S2, sx: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: {} }) : re(x(Wt, {})), [h2, f2, S2]);
695
- return x(me, { ref: t2, createPopupPanel: w2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: S2, label: n2?.label(), icon: T2, ...p2 });
696
- })), Qr = "_sheetxl-reset_11z3j_1", el = 10, tl = k(S((e2, t2) => {
697
- const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = el, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = B((e3) => e3 + 1, 0);
698
- P(() => {
695
+ }, [u2?.createTemporaryCell]), w2 = d2 || !n2 || n2.disabled(), k2 = W(() => u2 && m2 ? N(Zr, { 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: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: {} }) : we(N(Qt, {})), [h2, f2, w2]);
696
+ return N(De, { ref: t2, createPopupPanel: b2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: w2, label: n2?.label(), icon: k2, ...p2 });
697
+ })), Qr = "_sheetxl-reset_11z3j_1", el = 10, tl = L(H((e2, t2) => {
698
+ const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = el, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = _((e3) => e3 + 1, 0);
699
+ V(() => {
699
700
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
700
701
  f2();
701
702
  } });
702
703
  }, [n2, p2]);
703
- const b2 = C(() => {
704
+ const x2 = W(() => {
704
705
  let e3 = n2?.toJSON() ?? {};
705
706
  const t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
706
707
  return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: o2 });
707
- }, [h2, n2, a2, o2]), y2 = C(() => {
708
+ }, [h2, n2, a2, o2]), y2 = W(() => {
708
709
  const e3 = [];
709
710
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
710
- const n3 = b2.getStyleAt({ colIndex: o3, rowIndex: t3 });
711
+ const n3 = x2.getStyleAt({ colIndex: o3, rowIndex: t3 });
711
712
  e3.push(n3);
712
713
  }
713
714
  return e3;
714
- }, [b2]), w2 = C(() => {
715
+ }, [x2]), w2 = W(() => {
715
716
  const e3 = (e4, t4, o3) => {
716
717
  let n3 = o3.getFill().toCSS(r2?.darkMode ?? false);
717
718
  const a3 = g2 - (t4 < 4 ? 1 : 0), l3 = m2 - (e4 < 4 ? 1 : 0), i3 = o3.getFont().getFill().toCSS(r2?.darkMode ?? false);
718
- return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (g2 - 1), top: e4 * (m2 - 1), width: a3, height: l3 }, x("td", { className: `table-style-fill ${e4}-${t4}`, style: n3, children: x("div", { className: `table-style-text ${e4}-${t4}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (a3 - 6) / 2, top: (l3 - 1) / 2, borderTop: `1px solid ${i3}` } }) }, `${e4}-${t4}`);
719
+ return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (g2 - 1), top: e4 * (m2 - 1), width: a3, height: l3 }, N("td", { className: `table-style-fill ${e4}-${t4}`, style: n3, children: N("div", { className: `table-style-text ${e4}-${t4}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (a3 - 6) / 2, top: (l3 - 1) / 2, borderTop: `1px solid ${i3}` } }) }, `${e4}-${t4}`);
719
720
  }, t3 = [];
720
721
  for (let o3 = 0; o3 < 5; o3++) {
721
722
  const n3 = [];
@@ -723,25 +724,25 @@ const Ur = k(S((e2, t2) => {
723
724
  const a3 = y2[5 * o3 + t4];
724
725
  n3.push(e3(o3, t4, a3));
725
726
  }
726
- t3.push(x("tr", { children: n3 }, o3));
727
+ t3.push(N("tr", { children: n3 }, o3));
727
728
  }
728
729
  return t3;
729
- }, [b2, a2, r2]), k2 = v((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
730
- return x(A, { 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: x(Pa, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: Hn(s2, "sheetxl-table-preview", Qr), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
730
+ }, [x2, a2, r2]), k2 = z((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
731
+ return N(X, { 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: N(b, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: N("table", { className: Yn(s2, "sheetxl-table-preview", Qr), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: N("tbody", { children: w2 }) }) }) });
731
732
  })), ol = (e2, t2, o2, n2, a2) => {
732
733
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
733
- }, nl = k(S((e2, t2) => {
734
- const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = C(() => {
734
+ }, nl = L(H((e2, t2) => {
735
+ const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = W(() => {
735
736
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
736
737
  return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: a2 });
737
- }, [o2, n2, a2]), g2 = C(() => {
738
+ }, [o2, n2, a2]), g2 = W(() => {
738
739
  const e3 = [];
739
740
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
740
741
  const n3 = u2.getStyleAt({ colIndex: o3, rowIndex: t3 });
741
742
  e3.push(n3);
742
743
  }
743
744
  return e3;
744
- }, [u2]), h2 = C(() => {
745
+ }, [u2]), h2 = W(() => {
745
746
  let e3 = d2;
746
747
  if (d2 || (e3 = document.createElement("canvas")), !e3) return null;
747
748
  61 !== e3.width && (e3.width = 61), 46 !== e3.height && (e3.height = 46);
@@ -774,58 +775,58 @@ const Ur = k(S((e2, t2) => {
774
775
  }
775
776
  return `url(${e3.toDataURL()})`;
776
777
  }, [d2, u2, n2, r2]);
777
- return x("div", { ref: t2, className: Hn("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
778
- })), al = k(S((e2, t2) => {
778
+ return N("div", { ref: t2, className: Yn("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
779
+ })), al = L(H((e2, t2) => {
779
780
  const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, disabled: m2, ...p2 } = e2;
780
- return b(A, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", 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 }, ...p2, ref: t2, children: [r2 && x(V, { control: x(G, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && x(V, { control: x(G, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
781
+ return E(X, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", 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 }, ...p2, ref: t2, children: [r2 && N(ne, { control: N(ae, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && N(ne, { control: N(ae, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), N(ne, { control: N(ae, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
781
782
  n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
782
- } }), label: "Banded Rows", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
783
+ } }), label: "Banded Rows", labelPlacement: "end" }), N(ne, { control: N(ae, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
783
784
  n2?.({ ...o2, showFirstColumn: !o2?.showFirstColumn });
784
- } }), label: "First Column", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
785
+ } }), label: "First Column", labelPlacement: "end" }), N(ne, { control: N(ae, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
785
786
  n2?.({ ...o2, showLastColumn: !o2?.showLastColumn });
786
- } }), label: "Last Column", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
787
+ } }), label: "Last Column", labelPlacement: "end" }), N(ne, { control: N(ae, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
787
788
  n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
788
- } }), label: "Banded Columns", labelPlacement: "end" }), d2 && x(V, { control: x(G, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
789
- })), rl = k((e2) => {
790
- 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 = v((e3) => {
791
- const t3 = { variant: aa.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: re(x(Wt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
792
- return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
793
- }, [d2]), f2 = o2?.getName() === n2, w2 = C(() => {
789
+ } }), label: "Banded Columns", labelPlacement: "end" }), d2 && N(ne, { control: N(ae, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
790
+ })), rl = L((e2) => {
791
+ 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 = z((e3) => {
792
+ const t3 = { variant: ya.Menuitem, commandHook: m2, context: "table" }, n3 = E(A, { children: [N(ke, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: we(N(Qt, {})) }), N(ke, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: we(N(Qt, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), N(Se, { orientation: "horizontal" }), N(ke, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
793
+ return Te({ ...e3, children: N(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
794
+ }, [d2]), f2 = o2?.getName() === n2, x2 = W(() => {
794
795
  const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
795
- return p2 ? x(nl, { canvas: u2, ...e3 }) : x(tl, { ...e3 });
796
+ return p2 ? N(nl, { canvas: u2, ...e3 }) : N(tl, { ...e3 });
796
797
  }, [t2, o2, r2, i2]);
797
- let k2 = x(He, { 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: () => {
798
+ let b2 = N(Ye, { 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: () => {
798
799
  a2?.(o2?.getName());
799
- }, ...g2, children: w2 }, o2.getName());
800
- return l2 && (k2 = x($t, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: k2 })), k2;
801
- }), ll = k(S((e2, t2) => {
800
+ }, ...g2, children: x2 }, o2.getName());
801
+ return l2 && (b2 = N(to, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
802
+ }), ll = L(H((e2, t2) => {
802
803
  const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: d2 = false, ...m2 } = e2;
803
- sa(n2);
804
+ Ca(n2);
804
805
  const p2 = n2?.context(), u2 = p2?.styles, g2 = r2 ?? p2?.table?.();
805
806
  let h2 = "insertTable";
806
807
  g2 && (h2 = "editTable");
807
- const f2 = C(() => ((e3, t3) => {
808
+ const f2 = W(() => ((e3, t3) => {
808
809
  const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
809
810
  return new c({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
810
- })(g2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), g2?.getStyleOptions()]), w2 = g2 ?? f2, [k2, S2] = D(w2);
811
- P(() => {
812
- S2(w2);
813
- }, [w2]);
814
- const T2 = s2 ?? p2?.bodyStyle(), R2 = ra((e3) => {
811
+ })(g2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), g2?.getStyleOptions()]), x2 = g2 ?? f2, [b2, y2] = O(x2);
812
+ V(() => {
813
+ y2(x2);
814
+ }, [x2]);
815
+ const w2 = s2 ?? p2?.bodyStyle(), k2 = wa((e3) => {
815
816
  l2?.(e3), n2?.execute({ name: e3 }, a2);
816
- }, [n2, l2, a2]), F2 = M(null), B2 = v((e3, t3) => {
817
- const o3 = { onSelectTableStyleName: R2, styles: u2(), parentFloat: e3.floatReference };
818
- F2.current || (F2.current = document.createElement("canvas"));
817
+ }, [n2, l2, a2]), S2 = U(null), C2 = z((e3, t3) => {
818
+ const o3 = { onSelectTableStyleName: k2, styles: u2(), parentFloat: e3.floatReference };
819
+ S2.current || (S2.current = document.createElement("canvas"));
819
820
  const n3 = (e4) => {
820
821
  const n4 = u2().getTableStyle(e4);
821
- return n4 ? x(rl, { table: k2, tableStyle: n4, selectedTableStyleName: k2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: a2, canvas: F2.current, ...o3 }, e4) : null;
822
+ return n4 ? N(rl, { table: b2, tableStyle: n4, selectedTableStyleName: b2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: a2, canvas: S2.current, ...o3 }, e4) : null;
822
823
  }, r3 = (e4, t4, o4 = true) => {
823
824
  const a3 = [];
824
825
  for (let e5 = 0; e5 < t4.length; e5++) {
825
826
  const o5 = n3(t4[e5]);
826
827
  o5 && a3.push(o5);
827
828
  }
828
- return 0 === a3.length ? null : b(A, { children: [o4 ? x(ie, { orientation: "horizontal" }) : null, x(zt, { children: e4 }, e4 + "-header"), x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
829
+ return 0 === a3.length ? null : E(X, { children: [o4 ? N(Se, { orientation: "horizontal" }) : null, N(eo, { children: e4 }, e4 + "-header"), N(X, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
829
830
  }, l3 = [], s3 = u2().getCustomTableStyles(), d3 = [];
830
831
  if (s3.length > 0) {
831
832
  for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
@@ -842,136 +843,136 @@ const Ur = k(S((e2, t2) => {
842
843
  for (let e4 = 0; e4 < 11; e4++) h3.push("TableStyleDark" + (e4 + 1));
843
844
  l3.push(r3("Dark", h3));
844
845
  let f3 = null;
845
- return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant: aa.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2, icon: re(x(rt, {})) })] })), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
846
+ return g2 && (f3 = E(A, { children: [N(Se, { orientation: "horizontal" }), N(ke, { variant: ya.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2, icon: we(N(wt, {})) })] })), E(X, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [N(X, { onContextMenu: () => {
846
847
  }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
847
- }, [u2, u2?.().getTheme(), T2, k2]), N2 = i2 || !n2 || n2.disabled(), E2 = C(() => {
848
- if (!p2 || !d2) return re(x(Wt, {}));
849
- }, [k2, T2, N2]);
850
- return x(me, { ref: t2, quickCommand: h2, createPopupPanel: B2, commands: o2, label: n2?.label(), commandState: g2, commandHook: a2, selected: null !== g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: N2, icon: E2, ...m2 });
848
+ }, [u2, u2?.().getTheme(), w2, b2]), v2 = i2 || !n2 || n2.disabled(), T2 = W(() => {
849
+ if (!p2 || !d2) return we(N(Qt, {}));
850
+ }, [b2, w2, v2]);
851
+ return N(De, { ref: t2, quickCommand: h2, createPopupPanel: C2, commands: o2, label: n2?.label(), commandState: g2, commandHook: a2, selected: null !== g2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: v2, icon: T2, ...m2 });
851
852
  })), il = [];
852
853
  il.push(fr("Primary Background", "bg1")), il.push(fr("Primary Text", "tx1")), il.push(fr("Secondary Background", "bg2")), il.push(fr("Secondary Text", "tx2")), il.push(fr("Accent 1", "accent1")), il.push(fr("Accent 2", "accent2")), il.push(fr("Accent 3", "accent3")), il.push(fr("Accent 4", "accent4")), il.push(fr("Accent 5", "accent5")), il.push(fr("Accent 6", "accent6"));
853
854
  const sl = (e2) => {
854
- const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = Sa(), d2 = C(() => {
855
+ const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = Ha(), d2 = W(() => {
855
856
  let e3 = [];
856
857
  for (let o3 = 0; o3 < il.length; o3++) {
857
858
  const a3 = il[o3];
858
- e3.push(x(gr, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
859
+ e3.push(N(gr, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
859
860
  }
860
- return x(A, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: x(A, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
861
+ return N(X, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: N(X, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
861
862
  }, [t2, s2]);
862
- return x(He, { 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: b(A, { 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: [x(A, { sx: {}, children: t2.getName() }), b(A, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, x(A, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: x("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
863
- The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: x("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
864
- }, dl = k(S((e2, t2) => {
865
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = C(() => {
863
+ return N(Ye, { 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: E(X, { 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: [N(X, { sx: {}, children: t2.getName() }), E(X, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, N(X, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: N(Oe, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: N("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
864
+ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: N("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
865
+ }, dl = L(H((e2, t2) => {
866
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = W(() => {
866
867
  const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
867
- if (0 === e3.length) return x(zt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
868
+ if (0 === e3.length) return N(eo, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
868
869
  const r3 = e3.length;
869
870
  for (let o3 = 0; o3 < r3; o3++) {
870
871
  const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
871
- d3 && d3.isCustom() !== r4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(sl, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
872
+ d3 && d3.isCustom() !== r4.isCustom() && t3.push(N(Se, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(N(sl, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
872
873
  0 === e4.button && e4.preventDefault();
873
874
  }, onMouseUp: (e4) => {
874
875
  0 === e4.button && a2(r4);
875
876
  }, onKeyDown: (e4) => {
876
- e4.keyCode !== ia.Enter && e4.keyCode !== ia.Space || a2(r4);
877
+ e4.keyCode !== Sa.Enter && e4.keyCode !== Sa.Space || a2(r4);
877
878
  } }, r4.getName()));
878
879
  }
879
880
  return t3;
880
881
  }, [n2, a2, i2]);
881
- return x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: b(A, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [x(zt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), x(ie, {}), x(A, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
882
- })), cl = k(S((e2, t2) => {
883
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Re.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || re(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
882
+ return N(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: E(X, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [N(eo, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), N(Se, {}), N(X, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
883
+ })), cl = L(H((e2, t2) => {
884
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Ge.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || we(N(oo, {})), u2 = { createPopupPanel: z((e3) => {
884
885
  const { closeFloatAll: t3 } = e3;
885
- return x(dl, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
886
- e4.which === ia.Enter && t3();
886
+ return N(dl, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
887
+ e4.which === Sa.Enter && t3();
887
888
  } });
888
889
  }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
889
- return s2 === Re.Toolbar ? x(Me, { ref: t2, ...u2 }) : x(Fe, { ref: t2, ...u2 });
890
- })), ml = k(S((e2, t2) => {
890
+ return s2 === Ge.Toolbar ? N(Ue, { ref: t2, ...u2 }) : N(je, { ref: t2, ...u2 });
891
+ })), ml = L(H((e2, t2) => {
891
892
  const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
892
- sa(o2);
893
- const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = ra((e3) => {
893
+ Ca(o2);
894
+ const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = wa((e3) => {
894
895
  r2?.(e3), o2?.execute(e3, n2);
895
- }, [r2, n2]), b2 = v((e3, t3) => {
896
+ }, [r2, n2]), x2 = z((e3, t3) => {
896
897
  const { children: n3, title: a3, ...r3 } = e3;
897
898
  let l3 = e3.children;
898
- return (h2 || t3) && (l3 = x("div", { children: l3 })), x(We, { command: o2, placement: c2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
899
+ return (h2 || t3) && (l3 = N("div", { children: l3 })), N(Qe, { command: o2, placement: c2 === ya.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
899
900
  }, [o2, h2]);
900
- return x(cl, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === aa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: re(x(Ot, {})), ...m2 });
901
- })), pl = k(S((e2, t2) => {
902
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = ra((e3, t3) => {
903
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: i2, icon: re(x(m2 ? Gn : Un, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: re(x(c2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
904
- return ce({ ...e3, children: a3 });
901
+ return N(cl, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ya.Menuitem ? Ge.Menuitem : Ge.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, icon: we(N(oo, {})), ...m2 });
902
+ })), pl = L(H((e2, t2) => {
903
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ba(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = re("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = wa((e3, t3) => {
904
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: i2, icon: we(N(m2 ? aa : ra, {})) }), N(ke, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: we(N(c2 ? no : ao, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("enableDarkGrid") }), N(ke, { ...o3, command: t3.getCommand("enableDarkImages") })] });
905
+ return Te({ ...e3, children: a3 });
905
906
  }, [r2, i2, n2, a2, c2, s2, d2]);
906
- return x(me, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: p2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
907
+ return N(De, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: p2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
907
908
  i2?.execute(m2 ? "light" : "dark", n2);
908
- }, selected: d2, icon: re(x(m2 ? Gn : Un, {})), ...l2 });
909
- })), ul = k(S((e2, t2) => {
910
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = v((e3, t3) => {
911
- const o3 = { variant: aa.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
909
+ }, selected: d2, icon: we(N(m2 ? aa : ra, {})), ...l2 });
910
+ })), ul = L(H((e2, t2) => {
911
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = z((e3, t3) => {
912
+ const o3 = { variant: ya.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
912
913
  const a4 = n2?.beforeExecute?.(t4, o4);
913
914
  return false !== a4 && e3.floatReference.closeAll();
914
- } }, disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: re(x(jn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("gotoUrlGithub"), icon: re(x(Ut, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDiscord"), icon: re(x(jt, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDocumentation"), icon: re(x(_t, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlIssue"), icon: re(x(qt, {})) })] });
915
- return ce({ ...e3, children: a3 });
915
+ } }, disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: we(N(la, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...o3, command: t3.getCommand("gotoUrlGithub"), icon: we(N(ro, {})) }), N(ke, { ...o3, command: t3.getCommand("gotoUrlDiscord"), icon: we(N(lo, {})) }), N(ke, { ...o3, command: t3.getCommand("gotoUrlDocumentation"), icon: we(N(io, {})) }), N(ke, { ...o3, command: t3.getCommand("gotoUrlIssue"), icon: we(N(so, {})) })] });
916
+ return Te({ ...e3, children: a3 });
916
917
  }, [r2, n2]);
917
- return x(me, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: re(x(Kt, { sx: { transform: "scale(0.75)" } })), ...i2 });
918
- })), gl = k(S((e2, t2) => {
919
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = aa.Toolbar, ...d2 } = e2, c2 = na(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
918
+ return N(De, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: we(N(co, { sx: { transform: "scale(0.75)" } })), ...i2 });
919
+ })), gl = L(H((e2, t2) => {
920
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = ya.Toolbar, ...d2 } = e2, c2 = ba(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = W(() => {
920
921
  let e3 = null, t3 = 0;
921
- for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === aa.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
922
+ for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ya.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
922
923
  return { singleMenuCommand: e3, allDisabled: 0 === t3 };
923
- }, [c2]), u2 = v((e3, t3) => {
924
- const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: re(x(Xt, {})) }), x(le, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: re(x(Xt, {})) })] });
925
- return ce({ ...e3, children: a3 });
924
+ }, [c2]), u2 = z((e3, t3) => {
925
+ const o3 = { variant: ya.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = E(A, { children: [N(ke, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: we(N(mo, {})) }), N(ke, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: we(N(mo, {})) })] });
926
+ return Te({ ...e3, children: a3 });
926
927
  }, [r2, n2, a2]);
927
- return m2 ? x(le, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, icon: re(x(Xt, {})), ...d2 }) : x(me, { 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: re(x(Xt, {})), ...d2 });
928
- })), hl = k(S((e2, t2) => {
929
- const { command: o2, ...n2 } = e2, a2 = da(), [r2, l2] = D(false), [i2, s2] = D("info");
930
- return P(() => {
928
+ return m2 ? N(ke, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, icon: we(N(mo, {})), ...d2 }) : N(De, { 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: we(N(mo, {})), ...d2 });
929
+ })), hl = L(H((e2, t2) => {
930
+ const { command: o2, ...n2 } = e2, a2 = va(), [r2, l2] = O(false), [i2, s2] = O("info");
931
+ return V(() => {
931
932
  const e3 = a2.getMode();
932
933
  l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warning" : "info");
933
- }, [a2]), x(le, { ref: t2, command: o2, icon: re(x(Zt, { isWalking: r2, themedType: i2 })), ...n2 });
934
- })), fl = k(S((e2, t2) => {
934
+ }, [a2]), N(ke, { ref: t2, command: o2, icon: we(N(po, { isWalking: r2, themedType: i2 })), ...n2 });
935
+ })), fl = L(H((e2, t2) => {
935
936
  const { ...o2 } = e2;
936
- return x(Jt, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions.", icon: (e3) => {
937
+ return N(uo, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions.", icon: (e3) => {
937
938
  const t3 = e3?.key();
938
939
  switch (t3) {
939
940
  case "insertFunctionSum":
940
- return re(x(Qt, {}));
941
+ return we(N(ho, {}));
941
942
  case "insertFunction":
942
- return re(x(Yt, {}));
943
+ return we(N(go, {}));
943
944
  default:
944
945
  return null;
945
946
  }
946
947
  } });
947
948
  }));
948
949
  fl.displayName = "InsertFunctionSumCommandPopupButton";
949
- const xl = new Map([{ key: "financial", label: "Financial", icon: x(to, {}) }, { key: "logical", label: "Logical", icon: x(oo, {}) }, { key: "text", label: "Text", icon: x(no, {}) }, { key: "dateTime", label: "Date & Time", icon: x(ao, {}) }, { key: "lookupReference", label: "Lookup & Reference", icon: x(ro, {}) }, { key: "mathTrig", label: "Math & Trig", icon: x(lo, {}) }, { key: "statDist", label: "Statistical", icon: x(io, {}) }, { key: "engineering", label: "Engineering", icon: x(so, {}) }, { key: "information", label: "Information", icon: x(co, {}) }, { key: "cube", label: "Cube", icon: x(mo, {}) }, { key: "database", label: "Database", icon: x(po, {}) }, { key: "web", label: "Web", icon: x(uo, {}) }, { key: "custom", label: "Custom", icon: x(go, {}) }].map((e2) => [e2.key, e2])), bl = k((e2) => {
950
+ const xl = new Map([{ key: "financial", label: "Financial", icon: N(xo, {}) }, { key: "logical", label: "Logical", icon: N(bo, {}) }, { key: "text", label: "Text", icon: N(yo, {}) }, { key: "dateTime", label: "Date & Time", icon: N(wo, {}) }, { key: "lookupReference", label: "Lookup & Reference", icon: N(ko, {}) }, { key: "mathTrig", label: "Math & Trig", icon: N(So, {}) }, { key: "statDist", label: "Statistical", icon: N(Co, {}) }, { key: "engineering", label: "Engineering", icon: N(vo, {}) }, { key: "information", label: "Information", icon: N(To, {}) }, { key: "cube", label: "Cube", icon: N(Do, {}) }, { key: "database", label: "Database", icon: N(Po, {}) }, { key: "web", label: "Web", icon: N(Ro, {}) }, { key: "custom", label: "Custom", icon: N(Mo, {}) }].map((e2) => [e2.key, e2])), bl = L((e2) => {
950
951
  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) => {
951
952
  o2.getDescriptor().then((t3) => {
952
953
  e3(t3.getSummary());
953
954
  });
954
955
  });
955
- return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, tooltipProps: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
956
+ return N(qe, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, tooltipProps: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
956
957
  0 === e3.button && e3.preventDefault();
957
958
  }, onMouseUp: (e3) => {
958
959
  0 === e3.button && l2(o2);
959
960
  }, onKeyDown: (e3) => {
960
- e3.keyCode === ia.Enter || (e3.keyCode, ia.Space);
961
- }, ...c2, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", children: o2.getName() }) }) });
962
- }), yl = k(S((e2, t2) => {
963
- const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = na(n2, ["insertFunction"])[0], m2 = v((e3, t3) => {
961
+ e3.keyCode === Sa.Enter || (e3.keyCode, Sa.Space);
962
+ }, ...c2, children: N(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: N(Z, { component: "div", children: o2.getName() }) }) });
963
+ }), yl = L(H((e2, t2) => {
964
+ const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = ba(n2, ["insertFunction"])[0], m2 = z((e3, t3) => {
964
965
  const n3 = xl.get(o2);
965
966
  if (!n3) return console.warn("invalidate category", o2), null;
966
- const r3 = { commandHook: a2, ...e3 }, l3 = x(wl, { category: n3.label, ...r3, commands: t3 });
967
- return ce({ ...e3, children: l3 });
967
+ const r3 = { commandHook: a2, ...e3 }, l3 = N(wl, { category: n3.label, ...r3, commands: t3 });
968
+ return Te({ ...e3, children: l3 });
968
969
  }, [o2, c2, a2, r2]), p2 = xl.get(o2);
969
- return x(me, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: re(xl.get(o2)?.icon ?? x(eo, {})), ...d2 });
970
+ return N(De, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: we(xl.get(o2)?.icon ?? N(fo, {})), ...d2 });
970
971
  }));
971
972
  yl.displayName = "InsertFunctionCommandPopupButton";
972
- const wl = k(S((e2, t2) => {
973
- const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = na(o2, ["insertFunction"]), [i2, s2] = D([]), [d2, c2] = D(false);
974
- P(() => {
973
+ const wl = L(H((e2, t2) => {
974
+ const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = ba(o2, ["insertFunction"]), [i2, s2] = O([]), [d2, c2] = O(false);
975
+ V(() => {
975
976
  (async () => {
976
977
  c2(true);
977
978
  const e3 = l2[0]?.context(), t3 = await e3.searchByCategory(n2);
@@ -983,153 +984,153 @@ const wl = k(S((e2, t2) => {
983
984
  };
984
985
  for (let e3 = 0; e3 < m2; e3++) {
985
986
  const t3 = i2[e3];
986
- p2[e3] = x(bl, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
987
+ p2[e3] = N(bl, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
987
988
  }
988
- return ce({ ...r2, children: x(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? x(y, { children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
989
- })), kl = k(S((e2, t2) => {
990
- 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 = Va(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [k2, S2] = D(i2);
991
- P(() => {
992
- S2(i2), w2("");
989
+ return Te({ ...r2, children: N(X, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? N(A, { children: N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
990
+ })), kl = L(H((e2, t2) => {
991
+ 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 = Va(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = O(""), [b2, y2] = O(""), [w2, k2] = O(i2);
992
+ V(() => {
993
+ k2(i2), y2("");
993
994
  }, [i2]);
994
- const C2 = ra((e3) => {
995
+ const S2 = wa((e3) => {
995
996
  let t3 = "";
996
997
  try {
997
- S2(e3), m2?.(e3), c2?.(e3);
998
+ k2(e3), m2?.(e3), c2?.(e3);
998
999
  } catch (e4) {
999
1000
  t3 = e4.message ?? "Invalid Name";
1000
1001
  }
1001
- s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), w2(t3);
1002
- }, [i2, m2, c2]), T2 = ra(async (e3) => {
1003
- e3.keyCode === ia.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
1004
- }, [p2, f2, i2, g2]), R2 = ra((e3) => {
1005
- b2(e3.target.value ?? "");
1006
- }, []), M2 = ra((e3) => {
1007
- b2(""), h2?.onBlur(e3);
1008
- }, []), F2 = v((e3) => {
1009
- C2(e3.target.value), h2?.onChange(e3);
1002
+ s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), y2(t3);
1003
+ }, [i2, m2, c2]), C2 = wa(async (e3) => {
1004
+ e3.keyCode === Sa.Escape && f2 !== i2 && (S2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
1005
+ }, [p2, f2, i2, g2]), v2 = wa((e3) => {
1006
+ x2(e3.target.value ?? "");
1007
+ }, []), T2 = wa((e3) => {
1008
+ x2(""), h2?.onBlur(e3);
1009
+ }, []), D2 = z((e3) => {
1010
+ S2(e3.target.value), h2?.onChange(e3);
1010
1011
  }, [h2]);
1011
- return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: Hn("named-input", a2), ...u2, children: x(_, { label: "Name", placeholder: l2, onFocus: R2, onBlur: M2, inputRef: h2?.ref, disabled: o2, error: !!y2, helperText: y2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` } } }, value: k2 ?? "", onChange: F2, onKeyDownCapture: T2, onContextMenu: (e3) => {
1012
+ return N(le, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: Yn("named-input", a2), ...u2, children: N(ie, { label: "Name", placeholder: l2, onFocus: v2, onBlur: T2, inputRef: h2?.ref, disabled: o2, error: !!b2, helperText: b2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` } } }, value: w2 ?? "", onChange: D2, onKeyDownCapture: C2, onContextMenu: (e3) => {
1012
1013
  e3.stopPropagation();
1013
1014
  } }) });
1014
1015
  }));
1015
1016
  kl.displayName = "NamedInput";
1016
- const Sl = (e2) => null === e2 ? "" : e2.toString(), Cl = k(S((e2, t2) => {
1017
- const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Va(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, k2] = D(() => Sl(d2));
1018
- P(() => {
1019
- k2(Sl(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
1017
+ const Sl = (e2) => null === e2 ? "" : e2.toString(), Cl = L(H((e2, t2) => {
1018
+ const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Va(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = O(""), [x2, b2] = O(false), [y2, w2] = O(() => Sl(d2));
1019
+ V(() => {
1020
+ w2(Sl(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
1020
1021
  }, [d2]);
1021
- const S2 = ra((e3) => {
1022
+ const k2 = wa((e3) => {
1022
1023
  let t3 = "";
1023
1024
  try {
1024
- k2(e3);
1025
+ w2(e3);
1025
1026
  const t4 = Sl(d2), o3 = m2(e3);
1026
1027
  o3.toString() !== t4 && c2?.(o3);
1027
1028
  } catch (e4) {
1028
1029
  t3 = "Invalid Range";
1029
1030
  }
1030
- o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), y2(true);
1031
- }, [w2, c2, o2, u2]), T2 = ra(async (e3) => {
1032
- if (b2 && e3.keyCode === ia.Escape) {
1031
+ o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), b2(true);
1032
+ }, [y2, c2, o2, u2]), S2 = wa(async (e3) => {
1033
+ if (x2 && e3.keyCode === Sa.Escape) {
1033
1034
  const t3 = Sl(d2);
1034
- k2(t3), f2(""), y2(false), e3.stopPropagation();
1035
+ w2(t3), f2(""), b2(false), e3.stopPropagation();
1035
1036
  }
1036
1037
  s2?.(e3);
1037
- }, [d2, c2, s2, b2]), R2 = ra((e3) => {
1038
+ }, [d2, c2, s2, x2]), C2 = wa((e3) => {
1038
1039
  g2?.onBlur(e3);
1039
- }, [g2]), M2 = v((e3) => {
1040
- S2(e3.target.value), g2?.onChange(e3);
1041
- }, [g2]), [F2, B2] = D(false), N2 = C(() => x(q, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: x(ho, { disabled: true, selected: F2, onSelectToggle: (e3) => {
1042
- B2(e3);
1043
- }, label: "Select Range", icon: re(x(fo, {})) }) }), [F2]);
1044
- return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: Hn("range-input", l2), ...p2, children: x(_, { label: "Range", placeholder: "Enter Range", onBlur: R2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, endAdornment: N2 }, value: w2 ?? "", onChange: M2, onKeyDownCapture: T2, onContextMenu: (e3) => {
1040
+ }, [g2]), v2 = z((e3) => {
1041
+ k2(e3.target.value), g2?.onChange(e3);
1042
+ }, [g2]), [T2, D2] = O(false), P2 = W(() => N(se, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: N(Fo, { disabled: true, selected: T2, onSelectToggle: (e3) => {
1043
+ D2(e3);
1044
+ }, label: "Select Range", icon: we(N(Bo, {})) }) }), [T2]);
1045
+ return N(le, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: Yn("range-input", l2), ...p2, children: N(ie, { label: "Range", placeholder: "Enter Range", onBlur: C2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, endAdornment: P2 }, value: y2 ?? "", onChange: v2, onKeyDownCapture: S2, onContextMenu: (e3) => {
1045
1046
  e3.stopPropagation();
1046
1047
  } }) });
1047
1048
  }));
1048
1049
  Cl.displayName = "RangeInput";
1049
- const vl = k(S((e2, t2) => {
1050
- const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = M(0);
1051
- Ma(o2, { onViewChange: () => {
1050
+ const vl = L(H((e2, t2) => {
1051
+ const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = O(() => o2.getView().getZoomScale()), [m2, p2] = O(null), u2 = U(0);
1052
+ w(o2, { onViewChange: () => {
1052
1053
  p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
1053
- } }), P(() => {
1054
+ } }), V(() => {
1054
1055
  u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
1055
- }, [o2]), P(() => {
1056
+ }, [o2]), V(() => {
1056
1057
  0 !== u2.current && n.debounce(() => {
1057
1058
  d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
1058
1059
  }, l2)();
1059
1060
  }, [d2, l2]);
1060
- const g2 = ra((e3) => {
1061
+ const g2 = wa((e3) => {
1061
1062
  let t3 = e3;
1062
1063
  e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
1063
1064
  }, [o2]), h2 = (e3) => {
1064
1065
  let t3 = e3;
1065
1066
  return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
1066
- }, f2 = h2(d2), [y2, w2] = D(null), k2 = M(null), S2 = v(() => {
1067
- const e3 = y2;
1067
+ }, f2 = h2(d2), [x2, b2] = O(null), y2 = U(null), k2 = z(() => {
1068
+ const e3 = x2;
1068
1069
  e3 && requestAnimationFrame(() => {
1069
- k2.current?.contains(document.activeElement) && e3.focus();
1070
+ y2.current?.contains(document.activeElement) && e3.focus();
1070
1071
  });
1071
- }, []), T2 = ca(() => {
1072
+ }, []), S2 = Ta(() => {
1072
1073
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
1073
- }), R2 = ca(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), F2 = Sa(), B2 = C(() => `${r.getSharedMeasurer()("100%", Math.round(F2.typography.fontSize), F2.typography.fontFamily).width}px`, [F2]);
1074
- return b(A, { ref: t2, className: Hn(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
1075
- e3.relatedTarget && !y2 && w2(e3.relatedTarget);
1074
+ }), C2 = Ta(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = Ha(), T2 = W(() => `${r.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
1075
+ return E(X, { ref: t2, className: Yn(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
1076
+ e3.relatedTarget && !x2 && b2(e3.relatedTarget);
1076
1077
  }, onBlur: (e3) => {
1077
- y2 && !k2?.current?.contains(e3.relatedTarget) && w2(null);
1078
+ x2 && !y2?.current?.contains(e3.relatedTarget) && b2(null);
1078
1079
  }, onMouseDown: (e3) => {
1079
1080
  0 === e3.button && e3.preventDefault();
1080
1081
  }, onMouseUp: (e3) => {
1081
- 0 === e3.button && S2();
1082
- }, ...s2, children: [x(De, { disableInteractive: true, title: "Zoom Out", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1083
- 0 !== e3.button ? e3.preventDefault() : T2(e3);
1084
- }, children: x(_n, {}) }) }), x(K, { ref: k2, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (e3) => `0px 0px 0px 3px ${xo(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${xo(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
1082
+ 0 === e3.button && k2();
1083
+ }, ...s2, children: [N(Oe, { disableInteractive: true, title: "Zoom Out", children: N(J, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1084
+ 0 !== e3.button ? e3.preventDefault() : S2(e3);
1085
+ }, children: N(ia, {}) }) }), N(de, { ref: y2, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (e3) => `0px 0px 0px 3px ${No(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${No(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
1085
1086
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
1086
1087
  }, onKeyDown: (e3) => {
1087
- e3.which === ia.Down || e3.which === ia.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ia.Up || e3.which === ia.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ia.Enter && e3.which !== ia.Escape || S2();
1088
+ e3.which === Sa.Down || e3.which === Sa.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === Sa.Up || e3.which === Sa.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== Sa.Enter && e3.which !== Sa.Escape || k2();
1088
1089
  }, onChange: (e3, t3) => {
1089
1090
  Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
1090
- }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), x(De, { disableInteractive: true, title: "Zoom In", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1091
- 0 !== e3.button ? e3.preventDefault() : R2(e3);
1092
- }, children: x(qn, {}) }) }), b(A, { sx: { display: "flex", flexDirection: "row" }, children: [x(A, { sx: { minWidth: "8px" } }), x(I, { noWrap: true, component: "div", onClick: () => {
1091
+ }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), N(Oe, { disableInteractive: true, title: "Zoom In", children: N(J, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1092
+ 0 !== e3.button ? e3.preventDefault() : C2(e3);
1093
+ }, children: N(sa, {}) }) }), E(X, { sx: { display: "flex", flexDirection: "row" }, children: [N(X, { sx: { minWidth: "8px" } }), N(Z, { noWrap: true, component: "div", onClick: () => {
1093
1094
  g2(100);
1094
- }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: B2 }, children: x("div", { children: Math.round(d2) + "%" }) })] })] });
1095
+ }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: T2 }, children: N("div", { children: Math.round(d2) + "%" }) })] })] });
1095
1096
  }));
1096
1097
  vl.displayName = "SheetZoomScale";
1097
- const Tl = k(S((e2, t2) => {
1098
+ const Tl = L(H((e2, t2) => {
1098
1099
  const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
1099
- N(t2, () => ({}));
1100
- const s2 = M(null);
1101
- P(() => {
1100
+ q(t2, () => ({}));
1101
+ const s2 = U(null);
1102
+ V(() => {
1102
1103
  const e3 = (e4) => e4.preventDefault();
1103
1104
  return s2.current?.addEventListener("wheel", e3, { passive: false }), () => {
1104
1105
  s2.current?.removeEventListener("wheel", e3);
1105
1106
  };
1106
1107
  }, []);
1107
- const d2 = da(), c2 = C(() => {
1108
+ const d2 = va(), c2 = W(() => {
1108
1109
  const e3 = d2.getMode();
1109
1110
  return e3?.description ? e3.description : "Ready";
1110
- }, [d2]), [m2, p2] = D(false);
1111
- return b(A, { 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, x("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? x(A, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(vl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1111
+ }, [d2]), [m2, p2] = O(false);
1112
+ return E(X, { 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, N("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: N(Z, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? N(X, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, N(Se, { style: { marginTop: "6px", marginBottom: "6px" } }), N(vl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1112
1113
  }));
1113
1114
  Tl.displayName = "StatusBar";
1114
- const Dl = k(S((e2, t2) => {
1115
- const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, k2] = D(() => l2.getSelectedRanges().getCoords()), [S2, C2] = D(false), { reference: T2 } = bo({ parentFloat: c2?.parentFloat }), [R2, B2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 = ra(() => {
1116
- if (T2?.closeAll(), !E2) {
1117
- const e4 = N2();
1118
- return I2(N2()), e4;
1115
+ const Dl = L(H((e2, t2) => {
1116
+ const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = O(null), [x2, b2] = O(() => l2.getSelectedRanges().getCoords()), [y2, k2] = O(false), { reference: S2 } = Eo({ parentFloat: c2?.parentFloat }), [C2, v2] = O(() => s2 || !l2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [D2, P2] = O(T2), R2 = wa(() => {
1117
+ if (S2?.closeAll(), !D2) {
1118
+ const e4 = T2();
1119
+ return P2(T2()), e4;
1119
1120
  }
1120
- if (N2() === E2) return E2;
1121
- const e3 = E2.trim().toLowerCase();
1122
- if ("r" === e3 || "c" === e3) return E2;
1121
+ if (T2() === D2) return D2;
1122
+ const e3 = D2.trim().toLowerCase();
1123
+ if ("r" === e3 || "c" === e3) return D2;
1123
1124
  try {
1124
- const e4 = l2.getRanges(E2);
1125
+ const e4 = l2.getRanges(D2);
1125
1126
  if (e4) return e4.toString();
1126
1127
  } catch (e4) {
1127
1128
  }
1128
- const t3 = a2.getByName(E2);
1129
- if (t3 && t3.getRanges()) return E2;
1129
+ const t3 = a2.getByName(D2);
1130
+ if (t3 && t3.getRanges()) return D2;
1130
1131
  let o3 = null;
1131
1132
  try {
1132
- const e4 = l2.getRanges(E2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
1133
+ const e4 = l2.getRanges(D2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
1133
1134
  o3 = l2.getRanges(t4);
1134
1135
  } catch (e4) {
1135
1136
  }
@@ -1138,17 +1139,17 @@ const Dl = k(S((e2, t2) => {
1138
1139
  o3 = l2.getRanges(e4);
1139
1140
  }
1140
1141
  try {
1141
- let e4 = a2.getByName(E2);
1142
- R2 || e4 || (e4 = a2.addReference(E2, o3)), e4 && f2({ text: e4.getName() });
1142
+ let e4 = a2.getByName(D2);
1143
+ C2 || e4 || (e4 = a2.addReference(D2, o3)), e4 && f2({ text: e4.getName() });
1143
1144
  } catch (e4) {
1144
- I2(N2()), u2.showMessage?.(e4.message, { type: ma.Error });
1145
+ P2(T2()), u2.showMessage?.(e4.message, { type: Da.Error });
1145
1146
  }
1146
1147
  return null;
1147
- }, [E2, a2, T2, R2]), W2 = ra(() => {
1148
+ }, [D2, a2, S2, C2]), M2 = wa(() => {
1148
1149
  if (l2.isClosed()) return;
1149
1150
  const e3 = [];
1150
- for (let t4 = 0; t4 < w2.length; t4++) {
1151
- const o4 = w2[t4];
1151
+ for (let t4 = 0; t4 < x2.length; t4++) {
1152
+ const o4 = x2[t4];
1152
1153
  e3.push({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...o4 });
1153
1154
  }
1154
1155
  let t3 = null;
@@ -1158,227 +1159,227 @@ const Dl = k(S((e2, t2) => {
1158
1159
  }
1159
1160
  let o3 = null;
1160
1161
  o3 = t3?.length > 0 ? t3[0].getName() : l2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
1161
- }, [l2, w2]), [z2, $2] = D(() => a2?.getItems() ?? null);
1162
- Ma(a2, { onCollectionChange(e3) {
1163
- $2(a2.getItems()), W2();
1162
+ }, [l2, x2]), [F2, B2] = O(() => a2?.getItems() ?? null);
1163
+ w(a2, { onCollectionChange(e3) {
1164
+ B2(a2.getItems()), M2();
1164
1165
  }, onClose(e3) {
1165
- $2([]);
1166
- } }), P(() => {
1167
- I2(N2());
1168
- }, [h2, w2]);
1169
- const [V2, G2] = D(l2?.getSelectedSheet());
1170
- Ma(l2, { onProtectionChange: (e3) => {
1171
- B2(s2 || !e3.getProtection().isStructureAllowed());
1166
+ B2([]);
1167
+ } }), V(() => {
1168
+ P2(T2());
1169
+ }, [h2, x2]);
1170
+ const [I2, L2] = O(l2?.getSelectedSheet());
1171
+ w(l2, { onProtectionChange: (e3) => {
1172
+ v2(s2 || !e3.getProtection().isStructureAllowed());
1172
1173
  }, onSheetsChange: (e3) => {
1173
- G2(e3?.getSelectedSheet());
1174
+ L2(e3?.getSelectedSheet());
1174
1175
  }, onViewChange(e3) {
1175
- G2(e3?.getSelectedSheet());
1176
+ L2(e3?.getSelectedSheet());
1176
1177
  } });
1177
- const [U2, j2] = D(null), _2 = ra(n.debounce(W2, U2 ? 320 : 0), []);
1178
- Ma(V2.getSelection(), { onChange: () => {
1179
- k2((e3) => {
1178
+ const [H2, W2] = O(null), $2 = wa(n.debounce(M2, H2 ? 320 : 0), []);
1179
+ w(I2.getSelection(), { onChange: () => {
1180
+ b2((e3) => {
1180
1181
  const t3 = l2.getSelectedRanges().getCoords();
1181
1182
  return p.isEqualRangesArrays(t3, e3) ? e3 : t3;
1182
1183
  });
1183
1184
  }, onAdjustingChange: (e3) => {
1184
- j2(e3.getAdjusting());
1185
- } }), P(() => {
1186
- if (U2) {
1185
+ W2(e3.getAdjusting());
1186
+ } }), V(() => {
1187
+ if (H2) {
1187
1188
  const e3 = l2.getSelectedRange(), t3 = e3.getRowCount(), o3 = e3.getColumnCount();
1188
1189
  let n2 = `${t3}R x ${o3}C`;
1189
1190
  if (n2.length > 17 && (n2 = `${t3}x${o3}`), t3 > 1 || o3 > 1) return void f2({ text: n2, fontStyle: "italic", justifyContent: "center" });
1190
1191
  }
1191
- f2({ text: l2.getSelectedSheet().getSelectedRange().toString() }), _2();
1192
- }, [w2, l2, U2]);
1193
- const q2 = M(null), K2 = v((e3) => {
1192
+ f2({ text: l2.getSelectedSheet().getSelectedRange().toString() }), $2();
1193
+ }, [x2, l2, H2]);
1194
+ const G2 = U(null), _2 = z((e3) => {
1194
1195
  const { onMouseDown: t3, onMouseUp: o3, ...n2 } = e3;
1195
- return x(L, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: x(O, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: q2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", fontSize: 11 * r.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: E2, onFocus: (e4) => {
1196
+ return N(J, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: N(oe, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: G2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", fontSize: 11 * r.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: D2, onFocus: (e4) => {
1196
1197
  e4.target?.select();
1197
1198
  }, onKeyDown: (e4) => {
1198
- if (e4.which === ia.Enter || e4.which === ia.Tab) {
1199
- let t4 = E2;
1200
- N2() !== E2 && (e4.stopPropagation(), e4.preventDefault(), t4 = H2()), t4 ? X2(t4) : i2?.();
1201
- } else if (e4.which === ia.Escape) N2() !== E2 ? (I2(N2()), setTimeout(() => {
1199
+ if (e4.which === Sa.Enter || e4.which === Sa.Tab) {
1200
+ let t4 = D2;
1201
+ T2() !== D2 && (e4.stopPropagation(), e4.preventDefault(), t4 = R2()), t4 ? q2(t4) : i2?.();
1202
+ } else if (e4.which === Sa.Escape) T2() !== D2 ? (P2(T2()), setTimeout(() => {
1202
1203
  e4.target?.select();
1203
1204
  }, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
1204
- else if (e4.which === ia.Space) return void e4.stopPropagation();
1205
+ else if (e4.which === Sa.Space) return void e4.stopPropagation();
1205
1206
  }, onBlur: () => {
1206
- I2(N2());
1207
+ P2(T2());
1207
1208
  }, onChange: (e4) => {
1208
- I2(e4.target.value);
1209
+ P2(e4.target.value);
1209
1210
  } }) });
1210
- }, [E2, h2]), X2 = ra(async (e3) => {
1211
+ }, [D2, h2]), q2 = wa(async (e3) => {
1211
1212
  try {
1212
- T2?.closeAll();
1213
+ S2?.closeAll();
1213
1214
  const t3 = a2.lookupByRanges(e3)?.[0];
1214
1215
  t3 && await t3?.select(), await l2.getRanges(e3)?.select();
1215
1216
  } catch (e4) {
1216
- u2.showMessage?.(e4.message, { type: ma.Error });
1217
+ u2.showMessage?.(e4.message, { type: Da.Error });
1217
1218
  }
1218
- }, [a2, u2, l2]), Z2 = v((e3) => {
1219
+ }, [a2, u2, l2]), K2 = z((e3) => {
1219
1220
  setTimeout(() => {
1220
- C2(true);
1221
+ k2(true);
1221
1222
  }, 0);
1222
- const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1223
+ const t3 = { variant: ya.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (S2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1223
1224
  let o3 = a2.getItems({ scope: l2?.getSelectedSheet().getName() });
1224
1225
  o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
1225
- const n2 = R2 ? null : ["editNamedReference", "deleteNamedReference"], r2 = R2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1226
+ const n2 = C2 ? null : ["editNamedReference", "deleteNamedReference"], r2 = C2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1226
1227
  for (let e4 = 0; e4 < s3; e4++) {
1227
1228
  const a3 = o3[e4], l3 = a3.getRanges();
1228
1229
  if (!l3 || a3.isHidden()) continue;
1229
1230
  const s4 = a3.getType();
1230
- s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(x(ie, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(x(zt, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(F(Jt, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: (e5) => {
1231
+ s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(N(Se, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(N(eo, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(j(uo, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: (e5) => {
1231
1232
  switch (e5.key()) {
1232
1233
  case "editNamedReference":
1233
- return re(x(ko, {}));
1234
+ return we(N(Lo, {}));
1234
1235
  case "deleteNamedReference":
1235
- return re(x(wo, {}));
1236
+ return we(N(Io, {}));
1236
1237
  default:
1237
- return re(x(yo, {}));
1238
+ return we(N(Ao, {}));
1238
1239
  }
1239
- } })) : "table" === s4 && i3.push(F(Jt, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || d2, icon: (e5) => {
1240
+ } })) : "table" === s4 && i3.push(j(uo, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || d2, icon: (e5) => {
1240
1241
  e5.key();
1241
- return re(x(So, {}));
1242
+ return we(N(Ho, {}));
1242
1243
  } }));
1243
1244
  }
1244
- const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [R2 ? null : x(le, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference"), icon: re(x(Co, {})) }), i3 && i3.length > 0 ? b(y, { children: [R2 ? null : x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1245
- return ce({ ...e3, children: m3 });
1246
- }, [l2, z2, a2, h2, R2]), J2 = pa(t2, () => ({ focus(e3) {
1247
- q2.current?.focus(e3);
1245
+ const m3 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [C2 ? null : N(ke, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference"), icon: we(N(Wo, {})) }), i3 && i3.length > 0 ? E(A, { children: [C2 ? null : N(Se, { orientation: "horizontal" }), N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1246
+ return Te({ ...e3, children: m3 });
1247
+ }, [l2, F2, a2, h2, C2]), Z2 = Pa(t2, () => ({ focus(e3) {
1248
+ G2.current?.focus(e3);
1248
1249
  } }), []);
1249
- return x(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ua([J2, t2]), ...g2, children: x(Me, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2) }, parentFloat: T2, createPopupPanel: Z2, onPopupOpen: () => C2(true), onPopupClose: () => C2(false), createTooltip: ({ children: e3 }, t3) => x(Le, { title: t3 || S2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || S2 ? 0 : 1 }, children: e3 }), createQuickButton: K2 }) });
1250
+ return N(X, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ua([Z2, t2]), ...g2, children: N(Ue, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Wa(e3.palette.divider, 0.2) }, parentFloat: S2, createPopupPanel: K2, onPopupOpen: () => k2(true), onPopupClose: () => k2(false), createTooltip: ({ children: e3 }, t3) => N(Je, { title: t3 || y2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || y2 ? 0 : 1 }, children: e3 }), createQuickButton: _2 }) });
1250
1251
  }));
1251
1252
  Dl.displayName = "NamedCollectionEditor";
1252
- const Pl = (e2, t2) => x(Dl, { ref: t2, ...e2 }), Rl = k(S((e2, t2) => {
1253
- const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Pl, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
1254
- Ma(n2, { onSheetsChange: (e3) => {
1253
+ const Pl = (e2, t2) => N(Dl, { ref: t2, ...e2 }), Rl = L(H((e2, t2) => {
1254
+ const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Pl, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = O(n2?.getSelectedSheet());
1255
+ w(n2, { onSheetsChange: (e3) => {
1255
1256
  g2(e3?.getSelectedSheet());
1256
1257
  }, onViewChange(e3) {
1257
1258
  g2(e3?.getSelectedSheet());
1258
1259
  } });
1259
- const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), k2 = c2 || !w2.isEditAllowed(), S2 = M(null), v2 = C(() => ({ fontSize: 11 }), []);
1260
- Ma(u2.getSelection(), { onChange: () => {
1260
+ const [h2, f2] = O(u2.getSelection().getCoords().cell), x2 = u2.getRange(h2).getCell(), b2 = c2 || !x2.isEditAllowed(), y2 = U(null), C2 = W(() => ({ fontSize: 11 }), []);
1261
+ w(u2.getSelection(), { onChange: () => {
1261
1262
  f2(u2.getSelection().getCoords().cell);
1262
- } }), Ma(u2, { onProtectionChange() {
1263
+ } }), w(u2, { onProtectionChange() {
1263
1264
  f2(u2.getSelection().getCoords().cell);
1264
1265
  } });
1265
- const T2 = S2.current?.getLineHeight() ?? 20, [P2, R2] = D(T2), [F2, B2] = D(5), [N2, E2] = D(1), I2 = ra((e3, { size: t3 }) => {
1266
+ const v2 = y2.current?.getLineHeight() ?? 20, [T2, D2] = O(v2), [P2, R2] = O(5), [M2, F2] = O(1), B2 = wa((e3, { size: t3 }) => {
1266
1267
  e3.preventDefault(), e3.stopPropagation();
1267
- const o3 = Math.floor(t3.height / T2);
1268
- R2(o3 * T2 + 1), o3 > 1 && B2(o3);
1269
- }, [T2]), L2 = ra((e3, { size: t3 }) => {
1270
- const o3 = Math.floor(t3.height / T2);
1271
- E2(o3);
1272
- }, [T2]), H2 = da(), W2 = H2.getMode();
1268
+ const o3 = Math.floor(t3.height / v2);
1269
+ D2(o3 * v2 + 1), o3 > 1 && R2(o3);
1270
+ }, [v2]), I2 = wa((e3, { size: t3 }) => {
1271
+ const o3 = Math.floor(t3.height / v2);
1272
+ F2(o3);
1273
+ }, [v2]), L2 = va(), H2 = L2.getMode();
1273
1274
  let z2 = null;
1274
- "edit" === W2?.key && (z2 = W2.args?.stateAndCoords);
1275
- const $2 = C(() => {
1275
+ "edit" === H2?.key && (z2 = H2.args?.stateAndCoords);
1276
+ const $2 = W(() => {
1276
1277
  let e3 = z2?.editState;
1277
- return e3 || (e3 = Fa(() => u2.getRange(h2).getCell())), x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: x(Ba, { ref: S2, activeCoords: h2, sheet: u2, onFocus: () => {
1278
+ return e3 || (e3 = k(() => u2.getRange(h2).getCell())), N(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: N(S, { ref: y2, activeCoords: h2, sheet: u2, onFocus: () => {
1278
1279
  a2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
1279
- }, defaultTextStyle: v2, useRichStyling: false, disabled: k2, onChangeEdit: (e4) => {
1280
+ }, defaultTextStyle: C2, useRichStyling: false, disabled: b2, onChangeEdit: (e4) => {
1280
1281
  if (void 0 !== e4.dirty) {
1281
1282
  const t3 = { sheet: u2, coords: h2, editState: e4 };
1282
- H2.setMode((e5) => ({ ...e5, args: { ...e5?.args, stateAndCoords: t3 } }));
1283
+ L2.setMode((e5) => ({ ...e5, args: { ...e5?.args, stateAndCoords: t3 } }));
1283
1284
  }
1284
1285
  }, editState: e3, commands: m2, onCancelEdit: () => {
1285
1286
  a2?.cancelEdit(), a2?.focus();
1286
1287
  }, onSubmitEdit: () => {
1287
1288
  a2?.submitEdit(), a2?.focus();
1288
- }, linesVisible: N2 }) });
1289
- }, [u2, z2, h2, N2, a2]), O2 = M(null), V2 = C(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, k2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2)} 1px` }, children: [x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: re(x(vo, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: k2 || null === z2, onMouseDown: (e3) => {
1289
+ }, linesVisible: M2 }) });
1290
+ }, [u2, z2, h2, M2, a2]), V2 = U(null), G2 = W(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, V2) : null, [d2, s2, i2, u2, n2, b2]), j2 = W(() => E(ce, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Wa(e3.palette.divider, 0.2)} 1px` }, children: [N(Ye, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: we(N(zo, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: b2 || null === z2, onMouseDown: (e3) => {
1290
1291
  0 === e3.button && e3.preventDefault();
1291
1292
  }, onClick: () => {
1292
1293
  a2.cancelEdit();
1293
- } }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: re(x(To, {})), tooltipProps: { label: "Enter", simple: true }, disabled: k2 || null === z2, onMouseDown: (e3) => {
1294
+ } }), N(Ye, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: we(N($o, {})), tooltipProps: { label: "Enter", simple: true }, disabled: b2 || null === z2, onMouseDown: (e3) => {
1294
1295
  0 === e3.button && e3.preventDefault();
1295
1296
  }, onClick: () => {
1296
1297
  a2.submitEdit();
1297
- } }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: re(x(Do, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1298
+ } }), N(Ye, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: we(N(Oo, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1298
1299
  0 === e3.button && e3.preventDefault();
1299
- } })] }), [k2, z2]), U2 = Sa(), [j2, _2] = D(false), q2 = C(() => b(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, b(X, { 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" }, boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => k2 ? `${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: () => _2(true), onBlur: () => _2(false), onMouseDown: (e3) => {
1300
+ } })] }), [b2, z2]), _2 = Ha(), [q2, K2] = O(false), Z2 = W(() => E(X, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [j2, E(ce, { 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" }, boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Wa(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: () => K2(true), onBlur: () => K2(false), onMouseDown: (e3) => {
1300
1301
  e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
1301
- }, children: [x(A, { 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: x(Ga, { height: P2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: L2, onResizeStop: I2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), x(He, { 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: re(x(N2 > 1 ? Kn : Xn, {})), tooltipProps: { label: (N2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1302
+ }, children: [N(X, { 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: N(Ga, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: I2, onResizeStop: B2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), N(Ye, { 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: we(N(M2 > 1 ? da : ca, {})), tooltipProps: { label: (M2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1302
1303
  0 === e3.button && e3.preventDefault();
1303
1304
  }, onClick: () => {
1304
- const e3 = N2 > 1 ? 1 : F2;
1305
- R2(e3 * T2 + 1), E2(e3);
1306
- } }), x(A, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [G2, $2, j2, N2, T2]), K2 = C(() => V2 || q2 ? !V2 && q2 ? q2 : V2 && !q2 ? V2 : x(y, { children: x(ua, { 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='${U2.palette.text.icon ?? U2.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: V2, elementAfter: q2 }) }) : null, [V2, q2]), Z2 = pa(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1307
- return x(A, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Z2, ...p2, children: K2 });
1305
+ const e3 = M2 > 1 ? 1 : P2;
1306
+ D2(e3 * v2 + 1), F2(e3);
1307
+ } }), N(X, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: q2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [j2, $2, q2, M2, v2]), J2 = W(() => G2 || Z2 ? !G2 && Z2 ? Z2 : G2 && !Z2 ? G2 : N(A, { children: N(Ra, { 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='${_2.palette.text.icon ?? _2.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: G2, elementAfter: Z2 }) }) : null, [G2, Z2]), Y2 = Pa(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => V2.current }), []);
1308
+ return N(X, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: J2 });
1308
1309
  }));
1309
1310
  Rl.displayName = "FormulaBar";
1310
- const Ml = k(S((e2, t2) => {
1311
- const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1311
+ const Ml = L(H((e2, t2) => {
1312
+ const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = W(() => ({}), []), d2 = W(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1312
1313
  }, onError() {
1313
1314
  console.log("onError");
1314
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ ...s2, ...d2, variant: aa.Menuitem }), [s2, d2]), m2 = b(y, { children: [x(le, { ...c2, command: n2.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...c2, command: n2.getCommand("sortDescending"), icon: re(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), []] });
1315
- return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1315
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = W(() => ({ ...s2, ...d2, variant: ya.Menuitem }), [s2, d2]), m2 = E(A, { children: [N(ke, { ...c2, command: n2.getCommand("sortAscending"), icon: we(N(Bt, {})) }), N(ke, { ...c2, command: n2.getCommand("sortDescending"), icon: we(N(Nt, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...c2, command: n2.getCommand("autoFilterClear"), icon: we(N(It, {})) }), []] });
1316
+ return N(X, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1316
1317
  }));
1317
1318
  Ml.displayName = "FilterColumnMenu";
1318
- const Fl = k(S((e2, t2) => {
1319
- const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = pa(t2, () => ({ isFilters: () => true }), []);
1320
- return x("div", { ref: s2, className: Hn("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: b("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: [x("div", { children: l2.getName() }), x("div", { children: "Filter Widget" })] }) });
1319
+ const Fl = L(H((e2, t2) => {
1320
+ const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Pa(t2, () => ({ isFilters: () => true }), []);
1321
+ return N("div", { ref: s2, className: Yn("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: E("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: [N("div", { children: l2.getName() }), N("div", { children: "Filter Widget" })] }) });
1321
1322
  }));
1322
1323
  Fl.displayName = "Filters";
1323
- const Bl = k(S((e2, t2) => {
1324
- 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: w2 = 4, gridTheme: k2, ...S2 } = e2, [C2, v2] = D(() => !!n2 && n2.getProtection().isLocked()), [T2, P2] = D(() => n2 ? n2.getTabColor() : null);
1325
- Ma(n2, { onProtectionChange: () => {
1326
- v2(n2.getProtection().isLocked());
1324
+ const Bl = L(H((e2, t2) => {
1325
+ 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, [k2, S2] = O(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = O(() => n2 ? n2.getTabColor() : null);
1326
+ w(n2, { onProtectionChange: () => {
1327
+ S2(n2.getProtection().isLocked());
1327
1328
  }, onTabColorChange: () => {
1328
- P2(n2.getTabColor());
1329
+ v2(n2.getTabColor());
1329
1330
  }, onStyleChange: () => {
1330
- P2(n2.getTabColor());
1331
+ v2(n2.getTabColor());
1331
1332
  } });
1332
- const R2 = Sa(), M2 = m2 === i2;
1333
- let F2 = null, B2 = null;
1334
- if (T2 || p2) {
1333
+ const T2 = Ha(), D2 = m2 === i2;
1334
+ let P2 = null, R2 = null;
1335
+ if (C2 || p2) {
1335
1336
  let e3 = f2;
1336
- T2 ? (B2 = T2.toBlackOrWhite().toCSS(), e3 = T2?.toCSS()) : M2 || (e3 = R2.palette.background.paper), F2 = x(A, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: M2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => M2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: M2 && T2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1337
+ C2 ? (R2 = C2.toBlackOrWhite().toCSS(), e3 = C2?.toCSS()) : D2 || (e3 = T2.palette.background.paper), P2 = N(X, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: D2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => D2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: D2 && C2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1337
1338
  }
1338
- let N2 = null;
1339
- "string" == typeof u2 ? N2 = u2 : u2?.toCSS && (N2 = u2.toCSS());
1340
- const E2 = M2 ? x(A, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1341
- return x(Ta, { theme: M2 ? k2 ?? R2 : R2, children: x(A, { ref: t2, className: Hn(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...S2, children: x(ga, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: M2 ? N2 : "transparent", children: x(z, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: M2 ? "primary" : B2 || "text.secondary", backgroundColor: M2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: M2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: b(y, { children: [F2, b(A, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [b(A, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: M2 ? void 0 : "1px" }, children: [o2, E2] }), C2 ? x(Zn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(A, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1339
+ let M2 = null;
1340
+ "string" == typeof u2 ? M2 = u2 : u2?.toCSS && (M2 = u2.toCSS());
1341
+ const F2 = D2 ? N(X, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1342
+ return N($a, { theme: D2 ? b2 ?? T2 : T2, children: N(X, { ref: t2, className: Yn(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: D2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: N(Ma, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: D2 ? M2 : "transparent", children: N(ee, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: D2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: D2 ? "primary" : R2 || "text.secondary", backgroundColor: D2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: D2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: E(A, { children: [P2, E(X, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [E(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: D2 ? void 0 : "1px" }, children: [o2, F2] }), k2 ? N(ma, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : N(X, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1342
1343
  }));
1343
1344
  Bl.displayName = "SheetTab";
1344
- const Nl = k(S((e2, t2) => {
1345
- const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = D(o2?.getProtection());
1346
- Ma(o2, { onProtectionChange: (e3) => {
1345
+ const Nl = L(H((e2, t2) => {
1346
+ const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = O(o2?.getProtection());
1347
+ w(o2, { onProtectionChange: (e3) => {
1347
1348
  u2(e3?.getProtection());
1348
1349
  } });
1349
- const g2 = C(() => ({}), []), h2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1350
+ const g2 = W(() => ({}), []), h2 = W(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1350
1351
  }, onError() {
1351
1352
  console.log("onError");
1352
- } }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = C(() => ({ ...g2, ...h2 }), [g2, h2]), w2 = b(y, { children: [x(le, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant: aa.Menuitem }), x(le, { command: a2.getCommand("deleteSheet"), ...f2, variant: aa.Menuitem }), b(Ne, { onMouseDown: (e3) => {
1353
+ } }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = W(() => ({ ...g2, ...h2 }), [g2, h2]), x2 = E(A, { children: [N(ke, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant: ya.Menuitem }), N(ke, { command: a2.getCommand("deleteSheet"), ...f2, variant: ya.Menuitem }), E(qe, { onMouseDown: (e3) => {
1353
1354
  0 === e3.button && e3.preventDefault();
1354
1355
  }, onMouseUp: () => {
1355
1356
  Promise.resolve(i2.closeAll()).then(() => {
1356
1357
  c2?.startEdit(n2);
1357
1358
  });
1358
- }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), x(le, { command: a2.getCommand("duplicateSheet"), ...f2, variant: aa.Menuitem }), x(le, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: aa.Menuitem, icon: x(Zn, {}) }), x(Hr, { variant: aa.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: sr.End }, parentFloat: i2 }), x(ie, { orientation: "horizontal" }), x(le, { command: a2.getCommand("hideSheet"), ...f2, variant: aa.Menuitem, icon: re(x(Po, {})) })] });
1359
- return x(A, { ref: t2, className: Hn("menu", d2), sx: { ...s2 }, ...m2, children: w2 });
1359
+ }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), N(ke, { command: a2.getCommand("duplicateSheet"), ...f2, variant: ya.Menuitem }), N(ke, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: ya.Menuitem, icon: N(ma, {}) }), N(Hr, { variant: ya.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: N(Ze, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: sr.End }, parentFloat: i2 }), N(Se, { orientation: "horizontal" }), N(ke, { command: a2.getCommand("hideSheet"), ...f2, variant: ya.Menuitem, icon: we(N(Vo, {})) })] });
1360
+ return N(X, { ref: t2, className: Yn("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1360
1361
  }));
1361
1362
  Nl.displayName = "SheetTabMenu";
1362
- const El = k(S((e2, t2) => {
1363
- const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = D(o2?.getSheets().getItems()), [c2, m2] = D(o2?.getProtection());
1364
- Ma(o2, { onSheetsChange: (e3) => {
1363
+ const El = L(H((e2, t2) => {
1364
+ const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = O(o2?.getSheets().getItems()), [c2, m2] = O(o2?.getProtection());
1365
+ w(o2, { onSheetsChange: (e3) => {
1365
1366
  d2(e3.getSheets().getItems());
1366
1367
  }, onProtectionChange: (e3) => {
1367
1368
  m2(e3?.getProtection());
1368
1369
  } });
1369
- const p2 = C(() => {
1370
+ const p2 = W(() => {
1370
1371
  const e3 = [], t3 = o2.getSheets().getItems({ visibility: u.Visibility.Hidden }), r3 = o2.getSelectedSheet();
1371
1372
  for (let o3 = 0; o3 < t3.length; o3++) {
1372
1373
  const l3 = t3[o3], i3 = l3.getVisibility();
1373
1374
  if (i3 === u.Visibility.VeryHidden) continue;
1374
1375
  const s3 = r3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1375
1376
  let g2 = null, h2 = null, f2 = p3;
1376
- m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = x(A, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: x(A, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === u.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1377
- let w2 = null;
1378
- d3 && (w2 = x(Zn, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = re(x(Po, { style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), w2 && (w2 = x(A, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: w2 })), e3.push(x(Ne, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1377
+ m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = N(X, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: N(X, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === u.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1378
+ let x2 = null;
1379
+ d3 && (x2 = N(ma, { color: "secondary" })), i3 !== u.Visibility.Visible && (x2 = we(N(Vo, { style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), x2 && (x2 = N(X, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: x2 })), e3.push(N(qe, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1379
1380
  let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
1380
1381
  return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = Oa(t4, e4.palette.action.disabledOpacity)), t4;
1381
- }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? x(Ye, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1382
+ }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? N(ut, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1382
1383
  Promise.resolve(a2.closeAll()).then(() => {
1383
1384
  try {
1384
1385
  l3.select();
@@ -1386,11 +1387,11 @@ const El = k(S((e2, t2) => {
1386
1387
  console.error(e4);
1387
1388
  }
1388
1389
  });
1389
- }, children: b(y, { children: [g2, b(A, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [b(A, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), x(A, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), w2] })] }) }, "" + o3));
1390
+ }, children: E(A, { children: [g2, E(X, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [E(X, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), N(X, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), x2] })] }) }, "" + o3));
1390
1391
  }
1391
1392
  return e3;
1392
1393
  }, [o2, c2, s2, a2, n2]);
1393
- return x(A, { ref: t2, className: Hn("menu", l2), ...i2, children: p2 });
1394
+ return N(X, { ref: t2, className: Yn("menu", l2), ...i2, children: p2 });
1394
1395
  }));
1395
1396
  El.displayName = "SheetsAllMenu";
1396
1397
  let Al = false, Il = false;
@@ -1425,30 +1426,30 @@ const Hl = async (e2) => {
1425
1426
  }, zl = 0.12, $l = (e2, t2) => {
1426
1427
  const o2 = {}, n2 = (e3) => {
1427
1428
  const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
1428
- 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: Ro(t3, zl, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1429
+ 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: Go(t3, zl, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1429
1430
  }, a2 = n2(t2);
1430
- o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: Ro(o2.body.fill, zl, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : Ro(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : Ro(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: Ro(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: Ro(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1431
- const r2 = Ro("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1432
- o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Oa(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Oa(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Oa(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: Ro(a2.fill, zl, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : Ro(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : Ro(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Oa(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Oa(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1431
+ o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: Go(o2.body.fill, zl, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : Go(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : Go(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: Go(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: Go(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1432
+ const r2 = Go("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1433
+ o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Oa(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Oa(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Oa(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: Go(a2.fill, zl, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : Go(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : Go(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Oa(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Oa(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1433
1434
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1434
1435
  return o2.selection = { fill: l2.palette?.primary?.main ? Oa(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Oa(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Oa(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Oa(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1435
- }, Ol = k(S((e2, t2) => {
1436
- const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = pa(t2, () => ({}), []), [i2, s2] = Xa(), d2 = M(null), c2 = M(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, k2] = D(null), { reference: S2 } = bo({ parentFloat: a2, label: "overflow" });
1437
- E(() => {
1436
+ }, Ol = L(H((e2, t2) => {
1437
+ const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Pa(t2, () => ({}), []), [i2, s2] = Xa(), d2 = U(null), c2 = U(null), [m2, p2] = I.useReducer((e3) => e3 + 1, 0), [u2, g2] = O(null), [h2, f2] = O(null), [x2, b2] = O(null), { reference: y2 } = Eo({ parentFloat: a2, label: "overflow" });
1438
+ K(() => {
1438
1439
  c2.current = { refs: [] };
1439
- const e3 = [], t3 = w.Children.toArray(o2);
1440
+ const e3 = [], t3 = I.Children.toArray(o2);
1440
1441
  let n3 = 0;
1441
1442
  t3.forEach((o3, a3) => {
1442
- e3.push(x(A, { sx: { display: "flex" }, ref: (e4) => {
1443
+ e3.push(N(X, { sx: { display: "flex" }, ref: (e4) => {
1443
1444
  n3++, n3 === t3.length && p2();
1444
1445
  const o4 = { current: null };
1445
1446
  o4.current = e4, c2.current.refs[a3] = o4;
1446
1447
  }, children: o3 }, a3));
1447
1448
  }), g2(e3);
1448
- }, [o2, s2]), E(() => {
1449
+ }, [o2, s2]), K(() => {
1449
1450
  if (!u2) return;
1450
1451
  const e3 = c2.current.refs, t3 = e3 ? e3.length : 0;
1451
- if (!l2.current || 0 === t3) return f2(null), void k2(null);
1452
+ if (!l2.current || 0 === t3) return f2(null), void b2(null);
1452
1453
  const o3 = l2.current?.getBoundingClientRect(), n3 = [], a3 = [];
1453
1454
  let r3 = 0, i3 = false;
1454
1455
  for (let n4 = 0; !i3 && n4 < t3; n4++) {
@@ -1461,7 +1462,7 @@ const Hl = async (e2) => {
1461
1462
  const a4 = t4.current.getBoundingClientRect();
1462
1463
  r3 += a4?.width, r3 > o3.width && (i3 = true);
1463
1464
  }
1464
- if (!i3) return f2(null), void k2([]);
1465
+ if (!i3) return f2(null), void b2([]);
1465
1466
  const s3 = d2.current?.getBoundingClientRect();
1466
1467
  r3 = 0;
1467
1468
  for (let l3 = 0; l3 < t3; l3++) {
@@ -1473,23 +1474,23 @@ const Hl = async (e2) => {
1473
1474
  }
1474
1475
  i4 ? n3.push(u2[l3]) : a3.push(u2[l3]);
1475
1476
  }
1476
- f2(n3.length > 0 ? n3 : null), k2(a3.length > 0 ? a3 : null);
1477
- }, [o2, u2, s2, S2, m2]);
1478
- const C2 = ra((e3) => {
1479
- const t3 = [], o3 = y2.length;
1477
+ f2(n3.length > 0 ? n3 : null), b2(a3.length > 0 ? a3 : null);
1478
+ }, [o2, u2, s2, y2, m2]);
1479
+ const w2 = wa((e3) => {
1480
+ const t3 = [], o3 = x2.length;
1480
1481
  for (let n4 = 0; n4 < o3; n4++) {
1481
- const o4 = w.Children.toArray(y2[n4])[0];
1482
- w.Children.toArray(o4.props.children?.props?.children ?? o4.props.children).forEach((o5, a3) => {
1482
+ const o4 = I.Children.toArray(x2[n4])[0];
1483
+ I.Children.toArray(o4.props.children?.props?.children ?? o4.props.children).forEach((o5, a3) => {
1483
1484
  const r3 = o5, l3 = { ...r3.props, key: `overflow-${n4}-${a3}${r3.key ?? ""}` };
1484
1485
  l3.parentFloat && e3 && (l3.parentFloat = e3.floatReference);
1485
- const i3 = w.cloneElement(r3, l3);
1486
+ const i3 = I.cloneElement(r3, l3);
1486
1487
  t3.push(i3);
1487
1488
  });
1488
1489
  }
1489
- const n3 = x(A, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1490
- return ce({ ...e3, children: n3 });
1491
- }, [y2]);
1492
- return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Ua([l2, i2, t2]), ...r2, children: [x(A, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: h2 ?? u2 }), x(A, { sx: { display: null !== y2 && 0 === y2.length ? "none" : "flex", flex: "1 1 0" }, children: x(Me, { createPopupPanel: C2, ref: d2, parentFloat: S2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(Mo, { children: x(Jn, {}) }) }) })] });
1490
+ const n3 = N(X, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1491
+ return Te({ ...e3, children: n3 });
1492
+ }, [x2]);
1493
+ return E(X, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Ua([l2, i2, t2]), ...r2, children: [N(X, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: h2 ?? u2 }), N(X, { sx: { display: null !== x2 && 0 === x2.length ? "none" : "flex", flex: "1 1 0" }, children: N(Ue, { createPopupPanel: w2, ref: d2, parentFloat: y2, createTooltip: ({ children: e3 }, t3) => N(Je, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: N(Uo, { children: N(pa, {}) }) }) })] });
1493
1494
  })), Vl = "https://unpkg.com/@sheetxl/scripting-templates/dist", Gl = (e2) => {
1494
1495
  if (e2.metadata?.name) return e2.metadata.name;
1495
1496
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
@@ -1521,19 +1522,19 @@ const Hl = async (e2) => {
1521
1522
  return null;
1522
1523
  });
1523
1524
  return (await Promise.all(r2)).filter((e3) => null !== e3);
1524
- }, jl = { fontSize: "0.8rem", marginRight: "4px" }, _l = k((e2) => {
1525
+ }, jl = { fontSize: "0.8rem", marginRight: "4px" }, _l = L((e2) => {
1525
1526
  const { disabled: t2, snippet: o2, description: n2, handleInsert: a2, sx: r2, ...l2 } = e2;
1526
1527
  let i2;
1527
- return i2 = "formula" === o2.metadata?.icon ? x(Bo, { sx: jl }) : "macro" === o2.metadata?.icon ? x(No, { sx: jl }) : x(Yn, { sx: jl }), x(Ne, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1528
+ return i2 = "formula" === o2.metadata?.icon ? N(_o, { sx: jl }) : "macro" === o2.metadata?.icon ? N(qo, { sx: jl }) : N(ua, { sx: jl }), N(qe, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1528
1529
  0 === e3.button && e3.preventDefault();
1529
1530
  }, onMouseUp: (e3) => {
1530
1531
  0 === e3.button && a2(o2);
1531
1532
  }, onKeyDown: (e3) => {
1532
- e3.keyCode !== ia.Enter && e3.keyCode !== ia.Space || a2(o2);
1533
- }, ...l2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [x(I, { component: "div", children: o2.metadata?.title ?? o2.path }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1534
- }), ql = k(S((e2, t2) => {
1535
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Vl, ...i2 } = e2, [s2, d2] = D([]), [c2, m2] = D(true), p2 = na(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1536
- P(() => {
1533
+ e3.keyCode !== Sa.Enter && e3.keyCode !== Sa.Space || a2(o2);
1534
+ }, ...l2, children: E(X, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [N(Z, { component: "div", children: o2.metadata?.title ?? o2.path }), N(Z, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1535
+ }), ql = L(H((e2, t2) => {
1536
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Vl, ...i2 } = e2, [s2, d2] = O([]), [c2, m2] = O(true), p2 = ba(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1537
+ V(() => {
1537
1538
  (async () => {
1538
1539
  try {
1539
1540
  const e3 = await Ul(l2);
@@ -1544,30 +1545,30 @@ const Hl = async (e2) => {
1544
1545
  }
1545
1546
  })();
1546
1547
  }, [l2]);
1547
- const g2 = v((e3, t3) => {
1548
- if (c2) return x("div", { children: "Loading..." });
1549
- const a3 = { variant: aa.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1548
+ const g2 = z((e3, t3) => {
1549
+ if (c2) return N("div", { children: "Loading..." });
1550
+ const a3 = { variant: ya.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1550
1551
  u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
1551
1552
  }, i3 = [];
1552
1553
  for (let e4 = 0; e4 < s2.length; e4++) {
1553
1554
  const t4 = s2[e4];
1554
- t4 && i3.push(x(_l, { handleInsert: l3, snippet: t4 }, t4.path));
1555
+ t4 && i3.push(N(_l, { handleInsert: l3, snippet: t4 }, t4.path));
1555
1556
  }
1556
- const d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...a3, key: "help", command: o2.getCommand("help"), icon: re(x(_t, {})) })] });
1557
- return ce({ ...e3, children: d3 });
1557
+ const d3 = E(X, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? E(A, { children: [N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), N(Se, { orientation: "horizontal" })] }) : null, j(ke, { ...a3, key: "help", command: o2.getCommand("help"), icon: we(N(io, {})) })] });
1558
+ return Te({ ...e3, children: d3 });
1558
1559
  }, [r2, n2, a2, c2, u2]);
1559
- return x(me, { 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: re(x(Fo, {})), ...i2 });
1560
- })), Kl = k(S((e2, t2) => {
1561
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
1560
+ return N(De, { 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: we(N(jo, {})), ...i2 });
1561
+ })), Kl = L(H((e2, t2) => {
1562
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = wa((e3) => {
1562
1563
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1563
- return x(y, { children: b("div", { style: { display: "flex", flex: "1 1 100%" }, children: [x("div", { children: x(Ol, { parentFloat: n2, style: {}, children: x(le, { ...t3, command: o2.getCommand("saveScripts"), icon: re(x(Eo, {})) }) }) }), x("div", { style: { flex: "1 1 100%" } }), x("div", { children: x(Ol, { parentFloat: n2, style: {}, children: x(ql, { ...t3, commands: o2 }) }) })] }) });
1564
+ return N(A, { children: E("div", { style: { display: "flex", flex: "1 1 100%" }, children: [N("div", { children: N(Ol, { parentFloat: n2, style: {}, children: N(ke, { ...t3, command: o2.getCommand("saveScripts"), icon: we(N(Ko, {})) }) }) }), N("div", { style: { flex: "1 1 100%" } }), N("div", { children: N(Ol, { parentFloat: n2, style: {}, children: N(ql, { ...t3, commands: o2 }) }) })] }) });
1564
1565
  }, [o2]);
1565
- return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1566
+ return N(Xo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1566
1567
  }));
1567
1568
  Kl.displayName = "ScriptEditorToolbar";
1568
- const Xl = { fontSize: "1rem" }, Zl = k(S((e2, t2) => {
1569
- const { scriptPath: o2 = Vl, onScriptSelect: n2, sx: a2 = la.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
1570
- if (P(() => {
1569
+ const Xl = { fontSize: "1rem" }, Zl = L(H((e2, t2) => {
1570
+ const { scriptPath: o2 = Vl, onScriptSelect: n2, sx: a2 = ka.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = O([]), [p2, u2] = O(true), [g2, h2] = O(null);
1571
+ if (V(() => {
1571
1572
  (async () => {
1572
1573
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
1573
1574
  try {
@@ -1583,64 +1584,64 @@ const Xl = { fontSize: "1rem" }, Zl = k(S((e2, t2) => {
1583
1584
  m2(e3), u2(false);
1584
1585
  }
1585
1586
  })();
1586
- }, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Hn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...a2 }, ...d2, children: x(Z, {}) });
1587
+ }, [o2]), p2) return N(X, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Yn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, ...a2 }, ...d2, children: N(me, {}) });
1587
1588
  let f2 = null;
1588
- g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className: Hn(r2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, ...d2, children: [x(I, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), x(I, { color: "error", component: "div", children: g2 })] }));
1589
- const y2 = (e3) => {
1589
+ g2 && (f2 = E(X, { display: "flex", justifyContent: "center", alignItems: "center", className: Yn(r2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, ...d2, children: [N(Z, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), N(Z, { color: "error", component: "div", children: g2 })] }));
1590
+ const x2 = (e3) => {
1590
1591
  const t3 = e3.metadata?.icon;
1591
- return "macro" === t3 ? x(No, { sx: Xl }) : "formula" === t3 ? x(Bo, { sx: Xl }) : "autostart" === t3 ? x(Yn, { sx: Xl }) : null;
1592
+ return "macro" === t3 ? N(qo, { sx: Xl }) : "formula" === t3 ? N(_o, { sx: Xl }) : "autostart" === t3 ? N(ua, { sx: Xl }) : null;
1592
1593
  };
1593
- return b(A, { ref: t2, className: Hn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...a2 }, ...d2, children: [b(A, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [x(I, { variant: "h6", gutterBottom: true, children: "Script Template" }), x(I, { 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." }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), x(A, { 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) => b(z, { 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: [b(A, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [x(I, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), y2(e3)] }), e3.metadata?.summary && x(I, { 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] });
1594
+ return E(X, { ref: t2, className: Yn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, ...a2 }, ...d2, children: [E(X, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [N(Z, { variant: "h6", gutterBottom: true, children: "Script Template" }), N(Z, { 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." }), N(Z, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), N(X, { 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) => E(ee, { 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: [E(X, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [N(Z, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), x2(e3)] }), e3.metadata?.summary && N(Z, { 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] });
1594
1595
  }));
1595
1596
  Zl.displayName = "TemplateSelectPanel";
1596
- const Jl = k(S((e2, t2) => {
1597
- const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = Sa(), [u2, g2] = D(false), h2 = M(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, k2] = D(null);
1598
- P(() => {
1597
+ const Jl = L(H((e2, t2) => {
1598
+ const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = Ha(), [u2, g2] = O(false), h2 = U(false), [f2, x2] = O({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = O(null);
1599
+ V(() => {
1599
1600
  let e3 = false;
1600
- return k2(null), (async function() {
1601
+ return y2(null), (async function() {
1601
1602
  if (c2 && (await c2.start(), !e3)) {
1602
1603
  const e4 = c2.getModules().getItems()[0]?.getSource();
1603
- k2({ source: e4 || null });
1604
+ y2({ source: e4 || null });
1604
1605
  }
1605
1606
  })(), () => {
1606
1607
  e3 = true;
1607
1608
  };
1608
1609
  }, [c2]);
1609
- const S2 = v((e3) => {
1610
- y2((t3) => ({ ...t3, ...e3 }));
1611
- }, []), T2 = M(null), R2 = M(null), [F2, B2] = D(null), N2 = M(null), E2 = ra((e3) => {
1612
- if (F2) return F2.focus(e3), true;
1610
+ const w2 = z((e3) => {
1611
+ x2((t3) => ({ ...t3, ...e3 }));
1612
+ }, []), k2 = U(null), S2 = U(null), [v2, T2] = O(null), D2 = U(null), P2 = wa((e3) => {
1613
+ if (v2) return v2.focus(e3), true;
1613
1614
  if (s2) {
1614
- const t3 = R2.current?.querySelectorAll?.(s2);
1615
+ const t3 = S2.current?.querySelectorAll?.(s2);
1615
1616
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1616
1617
  }
1617
- return R2.current?.focus?.(e3), false;
1618
- }, [F2, s2, d2]), H2 = C(() => x(Pe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), W2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: x(Kl, { commands: r2 }) }), [p2, r2]), z2 = C(() => x(A, { className: Hn("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: b("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [x(I, { 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 }), x(I, { 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" : "" }), x(I, { 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]), $2 = C(() => b(A, { className: Hn("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [W2, x(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(Na, { ref: R2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: d2, commands: r2, onStatusChange: S2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), z2] }), [p2, r2, W2, z2, u2, H2, l2, a2, d2, s2, i2, S2]), O2 = C(() => x(J, { className: Hn({ "Mui-selected": h2.current }), sx: { display: "flex", color: (e3) => e3.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e3) => `${e3.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e3) => e3.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e3) => Ca(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${Ca(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1619
- e3.isDefaultPrevented() || (e3.preventDefault(), E2());
1620
- }, children: b(A, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e3) => e3.spacing(0.25), marginBottom: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, children: [x(A, { sx: { flex: "1 1 100%", paddingLeft: (e3) => e3.spacing(1) }, children: "Script (Typescript)" }), x(Le, { label: "Close", children: x(L, { "aria-label": "close", sx: { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, touchRippleRef: T2, onPointerDown: (e3) => {
1621
- T2.current?.start(e3, { center: false }), e3.stopPropagation(), e3.preventDefault();
1618
+ return S2.current?.focus?.(e3), false;
1619
+ }, [v2, s2, d2]), R2 = W(() => N(Ve, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), M2 = W(() => N(ce, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})`, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: N(Kl, { commands: r2 }) }), [p2, r2]), F2 = W(() => N(X, { className: Yn("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: E("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [N(Z, { 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 }), N(Z, { 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" : "" }), N(Z, { 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]), B2 = W(() => E(X, { className: Yn("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [M2, N(X, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: N(C, { ref: S2, loadingPanel: R2, readOnly: l2, onClose: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), F2] }), [p2, r2, M2, F2, u2, R2, l2, a2, d2, s2, i2, w2]), A2 = W(() => N(pe, { className: Yn({ "Mui-selected": h2.current }), sx: { display: "flex", color: (e3) => e3.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e3) => `${e3.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e3) => e3.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e3) => Wa(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${Wa(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1620
+ e3.isDefaultPrevented() || (e3.preventDefault(), P2());
1621
+ }, children: E(X, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e3) => e3.spacing(0.25), marginBottom: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, children: [N(X, { sx: { flex: "1 1 100%", paddingLeft: (e3) => e3.spacing(1) }, children: "Script (Typescript)" }), N(Je, { label: "Close", children: N(J, { "aria-label": "close", sx: { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, touchRippleRef: k2, onPointerDown: (e3) => {
1622
+ k2.current?.start(e3, { center: false }), e3.stopPropagation(), e3.preventDefault();
1622
1623
  }, onPointerUp: () => {
1623
- R2.current?.close();
1624
- }, children: x(Qn, {}) }) })] }) }), [p2, u2]), V2 = C(() => {
1624
+ S2.current?.close();
1625
+ }, children: N(ga, {}) }) })] }) }), [p2, u2]), I2 = W(() => {
1625
1626
  let e3;
1626
- return null === w2 ? null : (null === w2.source && (e3 = x(Zl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1627
- R2.current?.getEditor().insertSnippet(e4.content), k2({ source: e4.content ?? "" });
1628
- } })), b(A, { tabIndex: 0, className: Hn("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, onPointerDown: (e4) => {
1629
- e4.isDefaultPrevented() || R2.current?.focus();
1630
- }, children: [O2, b(A, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [$2, e3] })] }));
1631
- }, [W2, $2, o2, w2]), G2 = pa(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1632
- E2(e3);
1627
+ return null === b2 ? null : (null === b2.source && (e3 = N(Zl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1628
+ S2.current?.getEditor().insertSnippet(e4.content), y2({ source: e4.content ?? "" });
1629
+ } })), E(X, { tabIndex: 0, className: Yn("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, onPointerDown: (e4) => {
1630
+ e4.isDefaultPrevented() || S2.current?.focus();
1631
+ }, children: [A2, E(X, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [B2, e3] })] }));
1632
+ }, [M2, B2, o2, b2]), L2 = Pa(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1633
+ P2(e3);
1633
1634
  } }), []);
1634
- return x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: G2, ...m2, onFocus: (e3) => {
1635
- g2(true), h2.current = true, G2.current?.contains(e3.target) && e3.target !== G2.current && B2(e3.target), e3.relatedTarget && !N2.current && (N2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1635
+ return N(X, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: L2, ...m2, onFocus: (e3) => {
1636
+ g2(true), h2.current = true, L2.current?.contains(e3.target) && e3.target !== L2.current && T2(e3.target), e3.relatedTarget && !D2.current && (D2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1636
1637
  }, onBlur: (e3) => {
1637
- G2?.current?.contains(e3.relatedTarget) || G2?.current === e3.relatedTarget || (N2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1638
- }, children: V2 });
1638
+ L2?.current?.contains(e3.relatedTarget) || L2?.current === e3.relatedTarget || (D2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1639
+ }, children: I2 });
1639
1640
  }));
1640
1641
  Jl.displayName = "ScriptWorkspace";
1641
- const Yl = k(S((e2, t2) => {
1642
- const { commands: o2, ...n2 } = e2, a2 = na(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = D([]), [i2, s2] = D(false), d2 = a2[0]?.context?.();
1643
- P(() => {
1642
+ const Yl = L(H((e2, t2) => {
1643
+ const { commands: o2, ...n2 } = e2, a2 = ba(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = O([]), [i2, s2] = O(false), d2 = a2[0]?.context?.();
1644
+ V(() => {
1644
1645
  const e3 = d2?.getScripts();
1645
1646
  if (!e3) return;
1646
1647
  (async () => {
@@ -1649,24 +1650,24 @@ const Yl = k(S((e2, t2) => {
1649
1650
  l2(t3), s2(false);
1650
1651
  })();
1651
1652
  }, []);
1652
- const c2 = { variant: aa.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
1653
+ const c2 = { variant: ya.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
1653
1654
  for (let e3 = 0; e3 < p2; e3++) {
1654
1655
  const t3 = r2[e3];
1655
- m2.push(x(le, { ...c2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: re(x(No, {})), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
1656
+ m2.push(N(ke, { ...c2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: we(N(qo, {})), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
1656
1657
  }
1657
- const u2 = b(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor"), icon: re(x(Io, {})) })] });
1658
- return ce({ ...n2, children: u2 });
1658
+ const u2 = E(X, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? E(A, { children: [N(X, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), N(Se, { orientation: "horizontal" })] }) : null, j(ke, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor"), icon: we(N(Zo, {})) })] });
1659
+ return Te({ ...n2, children: u2 });
1659
1660
  }));
1660
1661
  Yl.displayName = "RunScriptPopupPanel";
1661
- const Ql = k(S((e2, t2) => {
1662
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = na(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = v((e3, t3) => {
1663
- const o3 = x(Yl, { ...e3, commands: t3 });
1664
- return ce({ ...e3, children: o3 });
1662
+ const Ql = L(H((e2, t2) => {
1663
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = ba(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = z((e3, t3) => {
1664
+ const o3 = N(Yl, { ...e3, commands: t3 });
1665
+ return Te({ ...e3, children: o3 });
1665
1666
  }, [r2, s2, n2, a2]);
1666
- return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, icon: re(x(Lo, {})), ...l2 });
1667
- })), ei = k(S((e2, t2) => {
1668
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = D(false), s2 = na(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1669
- P(() => {
1667
+ return N(De, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, icon: we(N(Jo, {})), ...l2 });
1668
+ })), ei = L(H((e2, t2) => {
1669
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = O(false), s2 = ba(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1670
+ V(() => {
1670
1671
  const e3 = d2?.getScripts();
1671
1672
  if (!e3) return;
1672
1673
  const t3 = s2[1], o3 = async () => {
@@ -1688,82 +1689,82 @@ const Ql = k(S((e2, t2) => {
1688
1689
  a3(), n3();
1689
1690
  };
1690
1691
  }, [d2]);
1691
- const c2 = v((e3) => {
1692
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = x(Hr, { ...a3, command: o2.getCommand("formatFontColor"), icon: x(Ho, {}), isSplit: true, panelProps: { disableAlpha: true } }), i3 = x(Hr, { ...a3, command: o2.getCommand("formatFillColor"), icon: x(Wo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: sr.End } }), s3 = o2.getCommand("undo") ? x(y, { children: x(Or, { ...a3, quickCommand: "undo" }) }) : null, d3 = o2.getCommand("find") ? x(y, { children: x(Mr, { ...a3 }) }) : null;
1692
+ const c2 = z((e3) => {
1693
+ const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = N(Hr, { ...a3, command: o2.getCommand("formatFontColor"), icon: N(Yo, {}), isSplit: true, panelProps: { disableAlpha: true } }), i3 = N(Hr, { ...a3, command: o2.getCommand("formatFillColor"), icon: N(Qo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: sr.End } }), s3 = o2.getCommand("undo") ? N(A, { children: N(Or, { ...a3, quickCommand: "undo" }) }) : null, d3 = o2.getCommand("find") ? N(A, { children: N(Mr, { ...a3 }) }) : null;
1693
1694
  let c3 = null;
1694
- l2 && (c3 = b(y, { children: [x(ie, {}), x(Ql, { ...a3 })] }));
1695
- return b(Ol, { parentFloat: n2, children: [s3, null, s3 ? x(ie, {}) : null, x(qr, { ...a3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: re(x(zo, {})) }), x(hl, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Ur, { ...a3, command: o2.getCommand("formatFontFamily") }), x(Fr, { ...a3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x($o, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Oo, {}) }), x(_r, { ...a3 }), x(jr, { ...a3 }), r3, x(ie, {}), i3, x(Dr, { ...a3 }), x(Pr, { ...a3 }), x(ie, {}), x(nr, { ...a3 }), x(ar, { ...a3 }), x(rr, { ...a3 }), x(lr, { ...a3 }), x(ie, {}), x(Nr, { ...a3 }), x(Yr, { command: o2.getCommand("formatCellStyle"), ...a3 }), x(ll, { command: o2.getCommand("formatTableStyle"), ...a3 }), x(ie, {}), x(Ir, { ...a3 }), x(Lr, { ...a3 }), x(ie, {}), x(Ar, { ...a3 }), null, x(Er, { ...a3 }), x(zr, { ...a3 }), d3, c3] });
1695
+ l2 && (c3 = E(A, { children: [N(Se, {}), N(Ql, { ...a3 })] }));
1696
+ return E(Ol, { parentFloat: n2, children: [s3, null, s3 ? N(Se, {}) : null, N(qr, { ...a3, command: o2.getCommand("paste") }), N(ke, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: we(N(en, {})) }), N(hl, { ...t3, command: o2.getCommand("copy") }), N(Se, {}), N(Ur, { ...a3, command: o2.getCommand("formatFontFamily") }), N(Fr, { ...a3, command: o2.getCommand("formatFontSize") }), N(ke, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: N(tn, {}) }), N(ke, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: N(on, {}) }), N(_r, { ...a3 }), N(jr, { ...a3 }), r3, N(Se, {}), i3, N(Dr, { ...a3 }), N(Pr, { ...a3 }), N(Se, {}), N(nr, { ...a3 }), N(ar, { ...a3 }), N(rr, { ...a3 }), N(lr, { ...a3 }), N(Se, {}), N(Nr, { ...a3 }), N(Yr, { command: o2.getCommand("formatCellStyle"), ...a3 }), N(ll, { command: o2.getCommand("formatTableStyle"), ...a3 }), N(Se, {}), N(Ir, { ...a3 }), N(Lr, { ...a3 }), N(Se, {}), N(Ar, { ...a3 }), null, N(Er, { ...a3 }), N(zr, { ...a3 }), d3, c3] });
1696
1697
  }, [o2, s2, l2]);
1697
- return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: c2, ...r2 });
1698
+ return N(Xo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: c2, ...r2 });
1698
1699
  }));
1699
1700
  ei.displayName = "HomeToolbar";
1700
- const ti = k(S((e2, t2) => {
1701
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
1701
+ const ti = L(H((e2, t2) => {
1702
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = wa((e3) => {
1702
1703
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1703
- return b(Ol, { parentFloat: n2, children: [null, x(le, { ...t3, command: o2.getCommand("updateHyperlink"), icon: re(x(Vo, {})) }), x(le, { ...t3, command: o2.getCommand("updateComments"), icon: re(x(Go, {})) }), x(gl, { ...a3 }), x(le, { ...t3, command: o2.getCommand("insertTable"), icon: re(x(So, {})) })] });
1704
+ return E(Ol, { parentFloat: n2, children: [null, N(ke, { ...t3, command: o2.getCommand("updateHyperlink"), icon: we(N(nn, {})) }), N(ke, { ...t3, command: o2.getCommand("updateComments"), icon: we(N(an, {})) }), N(gl, { ...a3 }), N(ke, { ...t3, command: o2.getCommand("insertTable"), icon: we(N(Ho, {})) })] });
1704
1705
  }, [o2]);
1705
- return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1706
+ return N(Xo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1706
1707
  }));
1707
1708
  ti.displayName = "InsertToolbar";
1708
- const oi = k(S((e2, t2) => {
1709
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
1709
+ const oi = L(H((e2, t2) => {
1710
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = wa((e3) => {
1710
1711
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1711
- return b(Ol, { parentFloat: n2, children: [x(Rr, { ...a3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(Zn, { color: "secondary" }) }), x(ie, {}), x(Wr, { ...a3 }), x(Kr, { ...a3 }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: re(x(Uo, {})) }), x(le, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: re(x(jo, {})) }), x(ie, {}), x(Xr, { ...a3 }), x(ml, { command: o2.getCommand("selectTheme"), ...a3 }), x(ie, {}), x(Ql, { ...a3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => re(o2.getCommand("fullScreenToggle").state() ? x(_o, {}) : x(qo, {})) })] });
1712
+ return E(Ol, { parentFloat: n2, children: [N(Rr, { ...a3 }), N(ke, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: N(ma, { color: "secondary" }) }), N(Se, {}), N(Wr, { ...a3 }), N(Kr, { ...a3 }), N(Se, {}), N(ke, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: we(N(rn, {})) }), N(ke, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: we(N(ln, {})) }), N(Se, {}), N(Xr, { ...a3 }), N(ml, { command: o2.getCommand("selectTheme"), ...a3 }), N(Se, {}), N(Ql, { ...a3, scope: "view" }), N(Se, {}), N(ke, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => we(o2.getCommand("fullScreenToggle").state() ? N(sn, {}) : N(dn, {})) })] });
1712
1713
  }, [o2]);
1713
- return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1714
+ return N(Xo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1714
1715
  }));
1715
1716
  oi.displayName = "ViewToolbar";
1716
- const ni = (e2) => x(ii, { ...e2 }), ai = k((e2) => {
1717
+ const ni = (e2) => N(ii, { ...e2 }), ai = L((e2) => {
1717
1718
  const { sx: t2, ...o2 } = e2;
1718
- return b(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Ca(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [x(ee, { disableRipple: true, onMouseDown: (e3) => {
1719
+ return E(X, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Wa(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [N(he, { disableRipple: true, onMouseDown: (e3) => {
1719
1720
  0 === e3.button && e3.preventDefault();
1720
- }, 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 }), x(A, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1721
- }), ri = k((e2) => {
1722
- const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = C(() => {
1721
+ }, 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 }), N(X, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1722
+ }), ri = L((e2) => {
1723
+ const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = W(() => {
1723
1724
  const e3 = [];
1724
- for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(ai, { label: t2[o3].label }, t2[o3].label));
1725
+ for (let o3 = 0; o3 < t2.length; o3++) e3.push(N(ai, { label: t2[o3].label }, t2[o3].label));
1725
1726
  return e3;
1726
1727
  }, [t2]);
1727
- return x(Q, { value: o2, onChange: (e3, t3) => {
1728
+ return N(ge, { value: o2, onChange: (e3, t3) => {
1728
1729
  n2?.(t3);
1729
- }, 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 }, TabIndicatorProps: { children: x("span", { className: "MuiTabs-indicatorSpan" }) }, ...r2, children: l2 });
1730
- }), li = k((e2) => {
1731
- const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = v((e3) => {
1730
+ }, 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 }, TabIndicatorProps: { children: N("span", { className: "MuiTabs-indicatorSpan" }) }, ...r2, children: l2 });
1731
+ }), li = L((e2) => {
1732
+ const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = z((e3) => {
1732
1733
  n2?.(e3.target.value);
1733
- }, [n2]), i2 = C(() => {
1734
+ }, [n2]), i2 = W(() => {
1734
1735
  const e3 = [];
1735
1736
  for (let n3 = 0; n3 < t2.length; n3++) {
1736
1737
  const a3 = t2[n3].label;
1737
- e3.push(x(H, { value: n3, sx: { color: (e4) => {
1738
+ e3.push(N(Y, { value: n3, sx: { color: (e4) => {
1738
1739
  if (o2 === n3) return e4.palette.primary.main;
1739
1740
  } }, children: a3 }, a3));
1740
1741
  }
1741
1742
  return e3;
1742
1743
  }, [t2, o2]);
1743
- return x(j, { 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: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, ...r2, children: i2 }) });
1744
- }), ii = k(S((e2, t2) => {
1745
- const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = C(() => {
1744
+ return N(le, { 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: N(ue, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` }, ...r2, children: i2 }) });
1745
+ }), ii = L(H((e2, t2) => {
1746
+ const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = W(() => {
1746
1747
  const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1747
- e3.push({ label: "Home", component: x(ei, { commands: o2, ...n3 }) });
1748
+ e3.push({ label: "Home", component: N(ei, { commands: o2, ...n3 }) });
1748
1749
  const { ref: a3, ...r3 } = i2?.Insert || {};
1749
- e3.push({ label: "Insert", component: x(ti, { commands: o2, ...r3 }) });
1750
+ e3.push({ label: "Insert", component: N(ti, { commands: o2, ...r3 }) });
1750
1751
  const { ref: l3, ...s3 } = i2?.View || {};
1751
- return e3.push({ label: "View", component: x(oi, { commands: o2, ...s3 }) }), e3;
1752
- }, [o2, d2]), u2 = C(() => {
1752
+ return e3.push({ label: "View", component: N(oi, { commands: o2, ...s3 }) }), e3;
1753
+ }, [o2, d2]), u2 = W(() => {
1753
1754
  const e3 = [];
1754
- 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 }));
1755
+ for (let t3 = 0; t3 < p2.length; t3++) e3.push(I.cloneElement(p2[t3].component, { ...p2[t3].component.props, key: p2[t3].key ?? p2[t3].label }));
1755
1756
  return e3;
1756
- }, [p2]), [g2, h2] = D(0), f2 = (e3) => {
1757
+ }, [p2]), [g2, h2] = O(0), f2 = (e3) => {
1757
1758
  h2(e3);
1758
- }, y2 = C(() => x(r2 ? li : ri, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: k2, ...S2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...k2 }, ...S2, children: u2[g2] });
1759
- return b(A, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(y2) : y2, l2 ? l2(v2) : v2] });
1759
+ }, x2 = W(() => N(r2 ? li : ri, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = N(ce, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(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] });
1760
+ return E(X, { 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] });
1760
1761
  }));
1761
1762
  ii.displayName = "WorkbookToolbars";
1762
1763
  const si = (e2) => {
1763
- const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = di } = e2, [d2, c2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().getItems()), g2 = ra(i2, [i2]), h2 = ra(s2, [s2]), f2 = C(() => [new ha("workbookStatistics", a2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("showFormat", a2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [xa.Ctrl, xa.Shift] } }), new fa("newCellStyle", a2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new fa("deleteCellStyle", a2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new fa("modifyCellStyle", a2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new ha("find", a2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [xa.Ctrl] }, { key: "F5", modifiers: [xa.Shift] }] }), new ha("findReplace", a2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [xa.Ctrl] }, { key: "H", modifiers: [xa.Ctrl, xa.Alt] }] }), new ha("goto", a2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [xa.Ctrl] }] }), new ha("workbookViewToggleExpandFormulaBar", a2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("workbookViewToggleShowFormulaBar", a2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new ha("workbookViewToggleShowTabs", a2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new ha("workbookViewToggleShowStatusBar", a2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new ha("workbookViewToggleShowHorizontalScrollBar", a2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new ha("workbookViewToggleShowVerticalScrollBar", a2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new fa("hideSheet", a2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs." }), new fa("deleteSheet", a2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new fa("addSheet", a2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [xa.Shift] }, { key: "F1", modifiers: [xa.Alt, xa.Shift] }] }), new fa("duplicateSheet", a2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new fa("nextSheet", a2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [xa.Ctrl] }] }), new fa("previousSheet", a2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [xa.Ctrl] }] }), new fa("selectNextSheet", a2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [xa.Ctrl, xa.Shift] }] }), new fa("selectPreviousSheet", a2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [xa.Ctrl, xa.Shift] }] }), new fa("selectTheme", a2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new fa("selectNamed", a2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new fa("addNamedReference", a2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new fa("editNamedReference", a2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new fa("deleteNamedReference", a2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new ha("activeNameBox", a2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [xa.Alt] } }), new ha("createNamedReferenceFromSelection", a2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("activeNameManager", a2, { 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: [xa.Ctrl] } }), new fa("fullScreenToggle", a2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new fa("showScriptEditor", a2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [xa.Alt] }] }), new fa("executeScript", a2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new fa("executeSelectedScript", a2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new fa("saveScripts", a2, { label: "Save Script", description: "Save the current scripts." }), new fa("maximumWorkbookToggle", a2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [xa.Ctrl] } }), new fa("spellCheck", a2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new fa("calculateAll", a2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new ha("closeWorkbook", a2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [xa.Ctrl] } }), new ha("newWorkbook", a2, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x2 = C(() => {
1764
+ const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = di } = e2, [d2, c2] = O(t2?.getSelectedSheet()), [m2, p2] = O(t2?.getSheets().getItems()), g2 = wa(i2, [i2]), h2 = wa(s2, [s2]), f2 = W(() => [new Fa("workbookStatistics", a2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Na.Ctrl, Na.Shift] } }), new Fa("showFormat", a2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Na.Ctrl, Na.Shift] } }), new Ba("newCellStyle", a2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new Ba("deleteCellStyle", a2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Ba("modifyCellStyle", a2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Fa("find", a2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [Na.Ctrl] }, { key: "F5", modifiers: [Na.Shift] }] }), new Fa("findReplace", a2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [Na.Ctrl] }, { key: "H", modifiers: [Na.Ctrl, Na.Alt] }] }), new Fa("goto", a2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [Na.Ctrl] }] }), new Fa("workbookViewToggleExpandFormulaBar", a2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Na.Ctrl, Na.Shift] } }), new Fa("workbookViewToggleShowFormulaBar", a2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Fa("workbookViewToggleShowTabs", a2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Fa("workbookViewToggleShowStatusBar", a2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Fa("workbookViewToggleShowHorizontalScrollBar", a2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Fa("workbookViewToggleShowVerticalScrollBar", a2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Ba("hideSheet", a2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs." }), new Ba("deleteSheet", a2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Ba("addSheet", a2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Na.Shift] }, { key: "F1", modifiers: [Na.Alt, Na.Shift] }] }), new Ba("duplicateSheet", a2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Ba("nextSheet", a2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Na.Ctrl] }] }), new Ba("previousSheet", a2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Na.Ctrl] }] }), new Ba("selectNextSheet", a2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Na.Ctrl, Na.Shift] }] }), new Ba("selectPreviousSheet", a2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Na.Ctrl, Na.Shift] }] }), new Ba("selectTheme", a2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Ba("selectNamed", a2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Ba("addNamedReference", a2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new Ba("editNamedReference", a2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new Ba("deleteNamedReference", a2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new Fa("activeNameBox", a2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Na.Alt] } }), new Fa("createNamedReferenceFromSelection", a2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Na.Ctrl, Na.Shift] } }), new Fa("activeNameManager", a2, { 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: [Na.Ctrl] } }), new Ba("fullScreenToggle", a2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new Ba("showScriptEditor", a2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [Na.Alt] }] }), new Ba("executeScript", a2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new Ba("executeSelectedScript", a2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new Ba("saveScripts", a2, { label: "Save Script", description: "Save the current scripts." }), new Ba("maximumWorkbookToggle", a2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Na.Ctrl] } }), new Ba("spellCheck", a2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Ba("calculateAll", a2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new Fa("closeWorkbook", a2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Na.Ctrl] } }), new Fa("newWorkbook", a2, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x2 = W(() => {
1764
1765
  let e3 = null;
1765
- return e3 = r2 ? r2.createChildGroup(a2, "workbook", false) : new ba(a2, "workbook"), e3.addCommands(f2, true), e3;
1766
- }, [r2, f2]), b2 = da(), y2 = w.useRef(null), k2 = ra(() => {
1766
+ return e3 = r2 ? r2.createChildGroup(a2, "workbook", false) : new Ea(a2, "workbook"), e3.addCommands(f2, true), e3;
1767
+ }, [r2, f2]), b2 = va(), y2 = I.useRef(null), k2 = wa(() => {
1767
1768
  let e3, o3 = null;
1768
1769
  const a3 = x2.getCommand("executeScript");
1769
1770
  if (a3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !a3) return;
@@ -1805,8 +1806,8 @@ const si = (e2) => {
1805
1806
  return null;
1806
1807
  }, getScripts: () => t2.getScripts() };
1807
1808
  l3.update({ context: i3 });
1808
- }, [x2, t2, o2, n2]), S2 = w.useRef(null);
1809
- Ma(t2, { onBeforeSave: async () => {
1809
+ }, [x2, t2, o2, n2]), S2 = I.useRef(null);
1810
+ w(t2, { onBeforeSave: async () => {
1810
1811
  await S2.current?.onBeforeSave();
1811
1812
  }, onProtectionChange: () => {
1812
1813
  S2.current?.onReadonlyChange();
@@ -1814,7 +1815,7 @@ const si = (e2) => {
1814
1815
  (async () => {
1815
1816
  await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
1816
1817
  })();
1817
- } }), Ma(t2, { onSheetsChange: (e3) => {
1818
+ } }), w(t2, { onSheetsChange: (e3) => {
1818
1819
  p2(e3.getSheets().getItems());
1819
1820
  }, onViewChange(e3) {
1820
1821
  c2(e3?.getSelectedSheet());
@@ -1824,11 +1825,11 @@ const si = (e2) => {
1824
1825
  }, onScriptsChange: (e3) => {
1825
1826
  k2();
1826
1827
  } });
1827
- const { isFullscreenAvailable: v2, isFullscreenEnabled: T2, toggleFullscreen: R2 } = Ja({ target: { current: o2 ?? document.body } }), M2 = Ea();
1828
- P(() => {
1829
- x2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: M2, darkMode: l2 }) });
1828
+ const { isFullscreenAvailable: C2, isFullscreenEnabled: T2, toggleFullscreen: D2 } = Ja({ target: { current: o2 ?? document.body } }), P2 = v();
1829
+ V(() => {
1830
+ x2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: l2 }) });
1830
1831
  }, [t2?.getTheme(), l2]);
1831
- const F2 = ra(async function(e3, o3) {
1832
+ const R2 = wa(async function(e3, o3) {
1832
1833
  let a3 = null;
1833
1834
  const r3 = t2.getScripts();
1834
1835
  if (e3?.declaration || e3?.functionName) {
@@ -1842,7 +1843,7 @@ const si = (e2) => {
1842
1843
  return void n2?.showError?.(e4);
1843
1844
  }
1844
1845
  }, [t2, n2]);
1845
- P(() => {
1846
+ V(() => {
1846
1847
  x2.getCommand("newCellStyle").updateCallback((e3) => {
1847
1848
  n2?.showInputOptions?.({ initialValue: (() => {
1848
1849
  let e4 = 0;
@@ -1899,9 +1900,9 @@ const si = (e2) => {
1899
1900
  "Close" === await n2?.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) && window.close();
1900
1901
  }), x2.getCommand("newWorkbook").updateCallback(() => {
1901
1902
  h2?.();
1902
- }), x2.getCommand("executeScript").updateCallback(F2), x2.getCommand("executeSelectedScript").updateCallback(F2);
1903
+ }), x2.getCommand("executeScript").updateCallback(R2), x2.getCommand("executeSelectedScript").updateCallback(R2);
1903
1904
  }, [t2, n2]);
1904
- const B2 = ra(async (e3) => {
1905
+ const M2 = wa(async (e3) => {
1905
1906
  let o3 = 0, a3 = null, r3 = "Find & Replace";
1906
1907
  e3?.replace && !e3?.replaceOptions?.maxCount && (r3 = "Replace All");
1907
1908
  const l3 = await n2?.showBusy?.(r3);
@@ -1921,7 +1922,7 @@ const si = (e2) => {
1921
1922
  l3?.(), n2?.showError?.(e4);
1922
1923
  }
1923
1924
  return o3;
1924
- }, [t2, o2]), N2 = ra((e3) => {
1925
+ }, [t2, o2]), F2 = wa((e3) => {
1925
1926
  const o3 = { value: e3, context: { selection: () => {
1926
1927
  const e4 = t2.getSelectedRanges(), o4 = [];
1927
1928
  for (let t3 = 0; t3 < e4.getCount(); t3++) {
@@ -1933,14 +1934,14 @@ const si = (e2) => {
1933
1934
  try {
1934
1935
  await e4.select();
1935
1936
  } catch (e5) {
1936
- n2?.showMessage?.(e5.message, { type: ma.Error });
1937
+ n2?.showMessage?.(e5.message, { type: Da.Error });
1937
1938
  }
1938
1939
  } };
1939
1940
  return n2.showWindow?.("namedDetails", o3);
1940
1941
  }, [n2, t2, o2]);
1941
- return P(() => {
1942
+ return V(() => {
1942
1943
  const e3 = (e4 = false) => {
1943
- const o3 = t2.getSelectedCell(), a3 = { onFindOrReplace: B2, onKeyDown: (e5) => {
1944
+ const o3 = t2.getSelectedCell(), a3 = { onFindOrReplace: M2, onKeyDown: (e5) => {
1944
1945
  x2.findCommandByEvent(e5) !== x2.getCommand("find") && x2.findCommandByEvent(e5) !== x2.getCommand("findReplace") || e5.preventDefault();
1945
1946
  }, findOptions: {}, findText: o3.toTextUnformatted(true) };
1946
1947
  a3.replace = e4, n2.showWindow?.("find", a3, { disableAutoDestroy: true });
@@ -1954,7 +1955,7 @@ const si = (e2) => {
1954
1955
  try {
1955
1956
  await t2.getRanges(e5).select();
1956
1957
  } catch (e6) {
1957
- n2?.showMessage?.(e6.message, { type: ma.Error });
1958
+ n2?.showMessage?.(e6.message, { type: Da.Error });
1958
1959
  }
1959
1960
  }, onKeyDown: (e5) => {
1960
1961
  x2.findCommandByEvent(e5) === x2.getCommand("goto") && e5.preventDefault();
@@ -1967,15 +1968,15 @@ const si = (e2) => {
1967
1968
  n2?.showError?.(e5);
1968
1969
  }
1969
1970
  }), x2.getCommand("addNamedReference")?.updateCallback(async function(e4) {
1970
- N2(null);
1971
+ F2(null);
1971
1972
  }), x2.getCommand("editNamedReference")?.updateCallback(async function(e4) {
1972
- N2(e4);
1973
+ F2(e4);
1973
1974
  }), x2.getCommand("deleteNamedReference")?.updateCallback(async function(e4) {
1974
1975
  e4?.delete?.();
1975
1976
  }), x2.getCommand("activeNameBox")?.updateCallback(async function() {
1976
1977
  o2?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
1977
1978
  });
1978
- }, [o2, t2, n2]), Ma(t2?.getView(), { onViewChange: (e3) => {
1979
+ }, [o2, t2, n2]), w(t2?.getView(), { onViewChange: (e3) => {
1979
1980
  x2.getCommand("workbookViewToggleShowFormulaBar").update({ state: e3.isShowFormulaBar() }).updateCallback(() => {
1980
1981
  e3.setShowFormulaBar(!e3.isShowFormulaBar());
1981
1982
  }), x2.getCommand("workbookViewToggleShowTabs").update({ state: e3.isShowTabs() }).updateCallback(() => {
@@ -1987,387 +1988,389 @@ const si = (e2) => {
1987
1988
  }), x2.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: e3.isShowVerticalScrollbar() }).updateCallback(() => {
1988
1989
  e3.setShowVerticalScrollbar(!e3.isShowVerticalScrollbar());
1989
1990
  });
1990
- } }), P(() => {
1991
- x2.getCommand("fullScreenToggle").update({ state: T2, disabled: !v2 }).updateCallback(() => {
1992
- R2();
1991
+ } }), V(() => {
1992
+ x2.getCommand("fullScreenToggle").update({ state: T2, disabled: !C2 }).updateCallback(() => {
1993
+ D2();
1993
1994
  });
1994
- }, [T2, v2]), P(() => {
1995
+ }, [T2, C2]), V(() => {
1995
1996
  const e3 = t2.getProtection().isStructureAllowed();
1996
1997
  x2.getCommand("hideSheet").update({ disabled: m2.length <= 1 || !e3 }), x2.getCommand("deleteSheet").update({ disabled: m2.length <= 1 || !e3 });
1997
1998
  }, [m2, d2]), x2;
1998
1999
  }, di = () => {
1999
2000
  window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
2000
- }, ci = "_sheetxl-theme_4opcr_2", mi = "_sheetxl-workbook_g5t6x_5", pi = (e2) => x(Nl, { ...e2 }), ui = (e2) => x(El, { ...e2 }), gi = (e2) => x(Bl, { ...e2 }), hi = k(S((e2, t2) => {
2001
- const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = pi, sheetsAllProps: c2, renderSheetsAll: m2 = ui, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: k2, gridTheme: S2, gridStyle: T2, ...R2 } = e2, [F2, B2] = D(o2?.getSelectedSheetIndex()), [N2, E2] = D(o2?.getSheets().getItems()), [I2, H2] = D(o2?.getProtection());
2002
- Ma(o2, { onViewChange(e3) {
2003
- B2(e3?.getSelectedSheetIndex());
2001
+ }, ci = "_sheetxl-theme_4opcr_2", mi = "_sheetxl-workbook_g5t6x_5", pi = (e2) => N(Nl, { ...e2 }), ui = (e2) => N(El, { ...e2 }), gi = (e2) => N(Bl, { ...e2 }), hi = L(H((e2, t2) => {
2002
+ const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = pi, sheetsAllProps: c2, renderSheetsAll: m2 = ui, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: x2, borderWidth: b2, borderColor: y2, gridTheme: k2, gridStyle: S2, ...C2 } = e2, [v2, D2] = O(o2?.getSelectedSheetIndex()), [P2, R2] = O(o2?.getSheets().getItems()), [M2, F2] = O(o2?.getProtection());
2003
+ w(o2, { onViewChange(e3) {
2004
+ D2(e3?.getSelectedSheetIndex());
2004
2005
  }, onSheetsChange: (e3) => {
2005
- E2(e3.getSheets().getItems());
2006
+ R2(e3.getSheets().getItems());
2006
2007
  }, onProtectionChange: (e3) => {
2007
- H2(e3?.getProtection());
2008
+ F2(e3?.getProtection());
2008
2009
  } });
2009
- const W2 = i2 || !I2.isStructureAllowed(), z2 = C(() => {
2010
+ const B2 = i2 || !M2.isStructureAllowed(), A2 = W(() => {
2010
2011
  const e3 = [];
2011
- for (let t3 = 0; t3 < N2.length; t3++) e3.push(N2[t3].getName());
2012
+ for (let t3 = 0; t3 < P2.length; t3++) e3.push(P2[t3].getName());
2012
2013
  return e3;
2013
- }, [N2]), $2 = v((e3) => {
2014
+ }, [P2]), I2 = z((e3) => {
2014
2015
  false !== a2?.(e3) && (o2.getSheetAt(e3).select(), r2?.(e3));
2015
- }, [o2, a2, r2]), O2 = v((e3, t3) => {
2016
+ }, [o2, a2, r2]), L2 = z((e3, t3) => {
2016
2017
  o2.getSheetAt(e3).setName(t3), r2?.(e3);
2017
- }, [o2, r2]), V2 = v((e3, t3) => {
2018
+ }, [o2, r2]), H2 = z((e3, t3) => {
2018
2019
  o2.getSheetAt(e3).setPosition(t3), r2?.(t3);
2019
- }, [o2, r2]), G2 = ra(() => {
2020
- if (false === a2?.(F2)) return;
2021
- const e3 = F2 + 1;
2020
+ }, [o2, r2]), $2 = wa(() => {
2021
+ if (false === a2?.(v2)) return;
2022
+ const e3 = v2 + 1;
2022
2023
  o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
2023
- }, [o2, a2, r2, F2]), U2 = C(() => ({ placement: "top-start" }), []), j2 = M(null), [_2, q2] = D(false), K2 = v((e3) => {
2024
+ }, [o2, a2, r2, v2]), G2 = W(() => ({ placement: "top-start" }), []), j2 = U(null), [_2, q2] = O(false), K2 = z((e3) => {
2024
2025
  const { closeFloatAll: t3, floatReference: n3 } = e3;
2025
- return m2({ workbook: o2, gridStyle: T2, floatReference: n3, closeFloatAll: t3, ...c2 });
2026
- }, [m2, c2, l2, o2, T2]), { reference: X2, component: Z2 } = bo({ label: "allSheet", popperProps: U2, anchor: j2.current, onOpen: () => q2(true), onClose: () => q2(false), createPopupPanel: K2 }), J2 = M(null), [Y2, Q2] = D(null), ee2 = v((e3) => {
2026
+ return m2({ workbook: o2, gridStyle: S2, floatReference: n3, closeFloatAll: t3, ...c2 });
2027
+ }, [m2, c2, l2, o2, S2]), { reference: Z2, component: Y2 } = Eo({ label: "allSheet", popperProps: G2, anchor: j2.current, onOpen: () => q2(true), onClose: () => q2(false), createPopupPanel: K2 }), Q2 = U(null), [ee2, te2] = O(null), oe2 = z((e3) => {
2027
2028
  const { floatReference: t3 } = e3;
2028
- return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: J2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
2029
- }, [d2, s2, l2, o2, n2, Y2]), { reference: te2, component: oe2 } = bo({ label: "sheetTab", popperProps: U2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
2030
- P(() => {
2031
- Y2 ? te2.open(0) : te2.close(0);
2032
- }, [Y2]);
2033
- const ne2 = v((e3, t3) => {
2034
- e3.preventDefault(), Q2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
2035
- }, []), ae2 = ra((e3) => {
2029
+ return d2?.({ workbook: o2, index: ee2?.index, tabStripRef: Q2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
2030
+ }, [d2, s2, l2, o2, n2, ee2]), { reference: ne2, component: ae2 } = Eo({ label: "sheetTab", popperProps: G2, anchor: { getBoundingClientRect: () => new DOMRect(ee2?.left || 0, ee2?.top || 0, 0, 0) }, onClose: () => te2(null), createPopupPanel: oe2 });
2031
+ V(() => {
2032
+ ee2 ? ne2.open(0) : ne2.close(0);
2033
+ }, [ee2]);
2034
+ const re2 = z((e3, t3) => {
2035
+ e3.preventDefault(), te2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
2036
+ }, []), le2 = wa((e3) => {
2036
2037
  let t3;
2037
2038
  try {
2038
2039
  t3 = o2?.getSheetAt(e3.index);
2039
2040
  } catch (e4) {
2040
2041
  }
2041
2042
  if (!t3) return null;
2042
- return (u2 ?? gi)({ sheet: t3, gridTheme: S2, onContextMenu: (t4) => {
2043
- $2(e3.index), ne2(t4, e3.index);
2043
+ return (u2 ?? gi)({ sheet: t3, gridTheme: k2, onContextMenu: (t4) => {
2044
+ I2(e3.index), re2(t4, e3.index);
2044
2045
  }, ...e3, ...p2 });
2045
- }, [u2, p2, o2, S2]), re2 = C(() => W2 ? null : x(De, { disableInteractive: true, title: "New sheet", children: x(L, { 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) => {
2046
+ }, [u2, p2, o2, k2]), ie2 = W(() => B2 ? null : N(Oe, { disableInteractive: true, title: "New sheet", children: N(J, { 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) => {
2046
2047
  0 === e3.button && e3.preventDefault();
2047
- }, onClick: () => G2(), children: x(ea, {}) }) }), [l2, W2, G2]);
2048
- return b(A, { ref: t2, className: Hn(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y2 }, ...R2, children: [x(Aa, { ref: J2, selectedTabIndex: F2, tabNames: z2, onSelectedTabIndexChange: $2, onTabNameChange: O2, onTabMove: V2, background: g2, borderColor: k2, borderWidth: w2, activeColor: null, disabled: l2, disableDrag: W2, createScrollStartButton: Zo, createScrollEndButton: Xo, createScrollEdgeButton: Ko, createTabButton: ae2, createTabDivider: (e3) => {
2048
+ }, onClick: () => $2(), children: N(ha, {}) }) }), [l2, B2, $2]);
2049
+ return E(X, { ref: t2, className: Yn(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...x2 }, ...C2, children: [N(T, { ref: Q2, selectedTabIndex: v2, tabNames: A2, onSelectedTabIndexChange: I2, onTabNameChange: L2, onTabMove: H2, background: g2, borderColor: y2, borderWidth: b2, activeColor: null, disabled: l2, disableDrag: B2, createScrollStartButton: pn, createScrollEndButton: mn, createScrollEdgeButton: cn, createTabButton: le2, createTabDivider: (e3) => {
2049
2050
  const { key: t3, ...o3 } = e3;
2050
- return x(ie, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Ca(e4.palette.divider, 0.25) }, ...o3 }, t3);
2051
- }, editLabelProps: { readOnly: W2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
2051
+ return N(Se, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Wa(e4.palette.divider, 0.25) }, ...o3 }, t3);
2052
+ }, editLabelProps: { readOnly: B2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
2052
2053
  o2.isValidSheetNameCharacter(e3.key) || e3.preventDefault();
2053
2054
  }, onCancel: () => {
2054
- r2?.(F2);
2055
- }, notifier: f2 }, children: x(De, { disableInteractive: true, title: _2 ? "" : "List all sheets", children: x(He, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ref: j2, dense: true, outlined: false, selected: _2, color: "primary", "aria-label": "menu", onMouseDown: (e3) => {
2055
+ r2?.(v2);
2056
+ }, notifier: f2 }, children: N(Oe, { disableInteractive: true, title: _2 ? "" : "List all sheets", children: N(Ye, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ref: j2, dense: true, outlined: false, selected: _2, color: "primary", "aria-label": "menu", onMouseDown: (e3) => {
2056
2057
  0 === e3.button && e3.preventDefault();
2057
2058
  }, onClick: () => {
2058
- _2 ? X2.close(0) : X2.open(0);
2059
- }, icon: x(ta, {}) }) }) }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, minWidth: "4px" } }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: "none", display: "flex", alignItems: "center" }, children: re2 }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: 1, minWidth: "24px" } }), oe2, Z2] });
2059
+ _2 ? Z2.close(0) : Z2.open(0);
2060
+ }, icon: N(fa, {}) }) }) }), N("div", { style: { borderTop: `solid ${y2} ${b2}px`, minWidth: "4px" } }), N("div", { style: { borderTop: `solid ${y2} ${b2}px`, flex: "none", display: "flex", alignItems: "center" }, children: ie2 }), N("div", { style: { borderTop: `solid ${y2} ${b2}px`, flex: 1, minWidth: "24px" } }), ae2, Y2] });
2060
2061
  }));
2061
2062
  hi.displayName = "WorkbookStrip";
2062
- const fi = k(S((e2, t2) => {
2063
- const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = B((e3) => e3 + 1, 0), [m2, p2] = D(o2.getSelectedSheet()), [u2, g2] = D(m2.getSelectedRanges()), [h2, f2] = D(m2.getSelectedCell());
2064
- Ma(o2, { onSheetsChange() {
2063
+ const fi = L(H((e2, t2) => {
2064
+ const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = _((e3) => e3 + 1, 0), [m2, p2] = O(o2.getSelectedSheet()), [u2, g2] = O(m2.getSelectedRanges()), [h2, f2] = O(m2.getSelectedCell());
2065
+ w(o2, { onSheetsChange() {
2065
2066
  p2(o2.getSelectedSheet());
2066
- } }), Ma(m2.getSelection(), { onChange() {
2067
+ } }), w(m2.getSelection(), { onChange() {
2067
2068
  g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
2068
- } }), na(n2, [], { onChange: () => {
2069
+ } }), ba(n2, [], { onChange: () => {
2069
2070
  c2();
2070
2071
  } });
2071
- const w2 = C(() => ({}), []), k2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2072
+ const x2 = W(() => ({}), []), b2 = W(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2072
2073
  }, onError() {
2073
2074
  console.log("onError");
2074
- } }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), S2 = C(() => ({ ...w2, ...k2, variant: aa.Menuitem }), [w2, k2]), v2 = C(() => ({ commands: n2, variant: aa.Menuitem, parentFloat: l2, ...k2 }), [n2, k2, l2]), T2 = [];
2075
- let P2 = u2.isEntireRows(), R2 = u2.isEntireColumns();
2076
- u2 && (P2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(F(le, { command: n2.getCommand("hideColumns"), ...S2, icon: re(x(Jo, {})), key: "context:" + T2.length })), T2.push(F(le, { command: n2.getCommand("unhideColumns"), ...S2, icon: re(x(Yo, {})), key: "context:" + T2.length }))), R2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(F(le, { command: n2.getCommand("hideRows"), ...S2, icon: re(x(Qo, {})), key: "context:" + T2.length })), T2.push(F(le, { command: n2.getCommand("unhideRows"), ...S2, icon: re(x(en, {})), key: "context:" + T2.length }))), (P2 || R2) && T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), P2 && T2.push(F(le, { command: n2.getCommand("autoFitColumns"), ...S2, icon: re(x(tn, {})), key: "context:" + T2.length })), R2 && T2.push(F(le, { command: n2.getCommand("autoFitRows"), ...S2, icon: re(x(on, {})), key: "context:" + T2.length })));
2077
- const M2 = [], N2 = n2.getCommand("formatTableStyle"), E2 = N2?.context()?.table();
2078
- if (sa(N2), !P2 && !R2) {
2079
- if (M2.push(x(ie, { orientation: "horizontal" }, "contextBefore:" + M2.length)), h2?.getHyperlink()) M2.push(F(Jt, { ...v2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + M2.length, quickCommand: "openHyperlink", icon: (e3) => "openHyperlink" === e3.key() ? re(x(Vo, {})) : null }));
2075
+ } }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = W(() => ({ ...x2, ...b2, variant: ya.Menuitem }), [x2, b2]), k2 = W(() => ({ commands: n2, variant: ya.Menuitem, parentFloat: l2, ...b2 }), [n2, b2, l2]), S2 = [];
2076
+ let C2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
2077
+ u2 && (C2 && (S2.push(N(Se, { orientation: "horizontal" }, "context:" + S2.length)), S2.push(j(ke, { command: n2.getCommand("hideColumns"), ...y2, icon: we(N(un, {})), key: "context:" + S2.length })), S2.push(j(ke, { command: n2.getCommand("unhideColumns"), ...y2, icon: we(N(gn, {})), key: "context:" + S2.length }))), v2 && (S2.push(N(Se, { orientation: "horizontal" }, "context:" + S2.length)), S2.push(j(ke, { command: n2.getCommand("hideRows"), ...y2, icon: we(N(hn, {})), key: "context:" + S2.length })), S2.push(j(ke, { command: n2.getCommand("unhideRows"), ...y2, icon: we(N(fn, {})), key: "context:" + S2.length }))), (C2 || v2) && S2.push(N(Se, { orientation: "horizontal" }, "context:" + S2.length)), C2 && S2.push(j(ke, { command: n2.getCommand("autoFitColumns"), ...y2, icon: we(N(xn, {})), key: "context:" + S2.length })), v2 && S2.push(j(ke, { command: n2.getCommand("autoFitRows"), ...y2, icon: we(N(bn, {})), key: "context:" + S2.length })));
2078
+ const T2 = [], D2 = n2.getCommand("formatTableStyle"), P2 = D2?.context()?.table();
2079
+ if (Ca(D2), !C2 && !v2) {
2080
+ if (T2.push(N(Se, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(j(uo, { ...k2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink", icon: (e3) => "openHyperlink" === e3.key() ? we(N(nn, {})) : null }));
2080
2081
  else {
2081
2082
  const e3 = n2.getCommand("updateHyperlink");
2082
- M2.push(F(le, { command: e3, ...S2, icon: re(x(Vo, {})), key: "contextBefore:" + M2.length }));
2083
+ T2.push(j(ke, { command: e3, ...y2, icon: we(N(nn, {})), key: "contextBefore:" + T2.length }));
2083
2084
  }
2084
- if (h2?.getComments()) M2.push(F(Jt, { ...v2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + M2.length, quickCommand: "updateComments", icon: (e3) => "updateComments" === e3.key() ? re(x(Go, {})) : null }));
2085
+ if (h2?.getComments()) T2.push(j(uo, { ...k2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments", icon: (e3) => "updateComments" === e3.key() ? we(N(an, {})) : null }));
2085
2086
  else {
2086
2087
  const e3 = n2.getCommand("updateComments");
2087
- M2.push(F(le, { command: e3, ...S2, icon: re(x(Go, {})), key: "contextBefore:" + M2.length }));
2088
+ T2.push(j(ke, { command: e3, ...y2, icon: we(N(an, {})), key: "contextBefore:" + T2.length }));
2088
2089
  }
2089
- E2 ? M2.push(F(Jt, { ...v2, variant: aa.Menuitem, key: "contextBefore:" + M2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: E2, quickCommand: "editTable", icon: (e3) => {
2090
+ P2 ? T2.push(j(uo, { ...k2, variant: ya.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: P2, quickCommand: "editTable", icon: (e3) => {
2090
2091
  e3.key();
2091
- return re(x(So, {}));
2092
- } })) : M2.push(F(le, { command: n2.getCommand("insertTable"), ...S2, icon: re(x(So, {})), key: "context:" + T2.length })), M2.push(F(gl, { ...v2, key: "contextBefore:" + M2.length }));
2092
+ return we(N(Ho, {}));
2093
+ } })) : T2.push(j(ke, { command: n2.getCommand("insertTable"), ...y2, icon: we(N(Ho, {})), key: "context:" + S2.length })), T2.push(j(gl, { ...k2, key: "contextBefore:" + T2.length }));
2093
2094
  }
2094
- const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...S2, icon: x(nn, {}) }), x(hl, { command: n2.getCommand("copy"), ...S2 }), x(qr, { command: n2.getCommand("paste"), ...v2, includePasteAllInPopup: false }), x(ie, { orientation: "horizontal" }), x(zr, { ...v2 }), x(ie, { orientation: "horizontal" }), x(Ir, { commands: n2, ...v2, disableSheet: true }), x(Lr, { commands: n2, ...v2, disableSheet: true }), x(Er, { ...v2 }), M2, T2] });
2095
- return x(A, { ref: t2, className: Hn("menu", i2), sx: { ...r2 }, ...s2, children: I2 });
2095
+ const R2 = E(A, { children: [N(ke, { command: n2.getCommand("cut"), ...y2, icon: N(yn, {}) }), N(hl, { command: n2.getCommand("copy"), ...y2 }), N(qr, { command: n2.getCommand("paste"), ...k2, includePasteAllInPopup: false }), N(Se, { orientation: "horizontal" }), N(zr, { ...k2 }), N(Se, { orientation: "horizontal" }), N(Ir, { commands: n2, ...k2, disableSheet: true }), N(Lr, { commands: n2, ...k2, disableSheet: true }), N(Er, { ...k2 }), T2, S2] });
2096
+ return N(X, { ref: t2, className: Yn("menu", i2), sx: { ...r2 }, ...s2, children: R2 });
2096
2097
  }));
2097
2098
  fi.displayName = "WorkbookContextMenu";
2098
- const xi = k(S((e2, t2) => {
2099
+ const xi = L(H((e2, t2) => {
2099
2100
  const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
2100
- Ma(o2, { onAnyChange(e3) {
2101
+ w(o2, { onAnyChange(e3) {
2101
2102
  } });
2102
- const s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2103
+ const s2 = W(() => ({}), []), d2 = W(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2103
2104
  }, onError() {
2104
2105
  console.log("onError");
2105
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ variant: aa.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = C(() => ({ commands: n2, variant: aa.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
2106
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = W(() => ({ variant: ya.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = W(() => ({ commands: n2, variant: ya.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
2106
2107
  const t3 = e3?.key();
2107
2108
  switch (t3) {
2108
2109
  case "moveToFront":
2109
- return re(x(bn, {}));
2110
+ return we(N(En, {}));
2110
2111
  case "moveForward":
2111
- return re(x(xn, {}));
2112
+ return we(N(Nn, {}));
2112
2113
  case "moveToBack":
2113
- return re(x(fn, {}));
2114
+ return we(N(Bn, {}));
2114
2115
  case "moveBackward":
2115
- return re(x(hn, {}));
2116
+ return we(N(Fn, {}));
2116
2117
  case "toggleLockAspectRatio":
2117
- return re(x(an, {}));
2118
+ return we(N(wn, {}));
2118
2119
  case "formatDrawAlignLeft":
2119
- return re(x(rn, {}));
2120
+ return we(N(kn, {}));
2120
2121
  case "formatDrawAlignCenter":
2121
- return re(x(gn, {}));
2122
+ return we(N(Mn, {}));
2122
2123
  case "formatDrawAlignRight":
2123
- return re(x(un, {}));
2124
+ return we(N(Rn, {}));
2124
2125
  case "formatDrawAlignTop":
2125
- return re(x(pn, {}));
2126
+ return we(N(Pn, {}));
2126
2127
  case "formatDrawAlignMiddle":
2127
- return re(x(mn, {}));
2128
+ return we(N(Dn, {}));
2128
2129
  case "formatDrawAlignBottom":
2129
- return re(x(cn, {}));
2130
+ return we(N(Tn, {}));
2130
2131
  case "formatDrawDistributeHorz":
2131
- return re(x(dn, {}));
2132
+ return we(N(vn, {}));
2132
2133
  case "formatDrawDistributeVert":
2133
- return re(x(sn, {}));
2134
+ return we(N(Cn, {}));
2134
2135
  case "formatAnchorTypeTwoCell":
2135
2136
  case "formatAnchorTypeOneCell":
2136
2137
  case "formatAnchorTypeAbsolute":
2137
- return re(x(ln, {}));
2138
+ return we(N(Sn, {}));
2138
2139
  default:
2139
2140
  return null;
2140
2141
  }
2141
- }, u2 = b(y, { children: [x(hl, { command: n2.getCommand("copy"), ...c2, variant: aa.Menuitem }), [], x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: p2 }), x(Jt, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: p2 }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("toggleLockAspectRatio"), icon: re(x(an, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2142
+ }, u2 = E(A, { children: [N(hl, { command: n2.getCommand("copy"), ...c2, variant: ya.Menuitem }), [], N(Se, { orientation: "horizontal" }), N(uo, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: p2 }), N(uo, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: p2 }), N(Se, { orientation: "horizontal" }), N(ke, { ...c2, command: n2.getCommand("toggleLockAspectRatio"), icon: we(N(wn, {})) }), N(Se, { orientation: "horizontal" }), N(uo, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2142
2143
  const t3 = p2(e3);
2143
- return t3 || re(x(rn, {}));
2144
- }, tooltip: "Quickly change the placement of your drawings." }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (e3) => {
2144
+ return t3 || we(N(kn, {}));
2145
+ }, tooltip: "Quickly change the placement of your drawings." }), N(Se, { orientation: "horizontal" }), N(uo, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (e3) => {
2145
2146
  const t3 = p2(e3);
2146
- return t3 || re(x(ln, {}));
2147
+ return t3 || we(N(Sn, {}));
2147
2148
  }, tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
2148
- return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: u2 });
2149
+ return N(X, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: u2 });
2149
2150
  }));
2150
2151
  xi.displayName = "MovableContextMenu";
2151
- const bi = (e2) => x(xi, { ...e2 }), yi = (e2) => x(fi, { ...e2 }), wi = (e2) => x(Ml, { ...e2 }), ki = (e2, t2) => x(Rl, { ref: t2, ...e2 }), Si = (e2) => x(Pe, { ...e2 }), Ci = (e2, t2) => x(Ia, { ref: t2, ...e2 }), vi = (e2) => x(Tl, { ...e2 }), Ti = (e2) => x(hi, { ...e2 }), Di = { fireOnModelChange: false }, Pi = { flex: "1 1 100%", display: "flex" }, Ri = k(S((e2, t2) => {
2152
- const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: k2, commands: S2, showFormulaBar: T2, formulaBarProps: R2, renderFormulaBar: F2 = ki, showTabs: N2, tabsProps: L2, renderTabs: H2 = Ti, showStatusBar: W2, statusBarProps: z2, renderStatusBar: $2 = vi, toolbarProps: O2, renderToolbar: V2 = ni, contextMenuSx: G2, renderContextMenu: U2 = yi, renderFilterMenu: j2 = wi, renderMovableMenu: _2 = bi, renderLoadingPanel: q2 = Si, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = Ci, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, ae2 = Sa(), re2 = Ea(), le2 = C(() => {
2153
- const e3 = { theme: re2.getDefaultTheme(), ...a2 };
2152
+ const bi = (e2) => N(xi, { ...e2 }), yi = (e2) => N(fi, { ...e2 }), wi = (e2) => N(Ml, { ...e2 }), ki = (e2, t2) => N(Rl, { ref: t2, ...e2 }), Si = (e2) => N(Ve, { ...e2 }), Ci = (e2, t2) => N(D, { ref: t2, ...e2 }), vi = (e2) => N(Tl, { ...e2 }), Ti = (e2) => N(hi, { ...e2 }), Di = { fireOnModelChange: false }, Pi = { flex: "1 1 100%", display: "flex" }, Ri = L(H((e2, t2) => {
2153
+ const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: x2, commands: b2, showFormulaBar: y2, formulaBarProps: k2, renderFormulaBar: S2 = ki, showTabs: C2, tabsProps: T2, renderTabs: D2 = Ti, showStatusBar: B2, statusBarProps: L2, renderStatusBar: H2 = vi, toolbarProps: $2, renderToolbar: G2 = ni, contextMenuSx: j2, renderContextMenu: q2 = yi, renderFilterMenu: J2 = wi, renderMovableMenu: Y2 = bi, renderLoadingPanel: Q2 = Si, loadingPanelProps: ee2, sheetProps: te2, renderSheet: oe2 = Ci, showHorizontalScrollbar: ne2, showVerticalScrollbar: ae2, gridTheme: re2, headersTheme: le2, enableDarkImages: ie2, ...se2 } = e2, de2 = Ha(), me2 = v(), pe2 = W(() => {
2154
+ const e3 = { theme: me2.getDefaultTheme(), ...a2 };
2154
2155
  return o2 ?? new h(e3);
2155
- }, [o2]), ie2 = M(null), [se2, de2] = D(false), ce2 = M(null), me2 = C(() => x(A, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: ce2 }), []), [pe2, ue2] = D(false), [ge2, he2] = D(false), fe2 = v(() => {
2156
- ue2(true);
2157
- }, []), xe2 = M(null), be2 = pa(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => ce2.current, getFormulaBarElement: () => xe2.current, focus() {
2158
- ie2 && ie2.current && ie2.current.focus();
2159
- } }), [le2]), ye2 = M(null);
2160
- E(() => {
2161
- pe2 && be2.current && (he2(true), ye2.current !== l2 && (l2?.({ source: be2.current }), ye2.current = l2));
2162
- }, [pe2, be2.current]), Hl(be2.current);
2163
- const we2 = v((e3) => (ie2.current?.submitEdit(), true), []), ke2 = v(() => {
2156
+ }, [o2]), ue2 = U(null), [ge2, he2] = O(false), fe2 = U(null), xe2 = W(() => N(X, { 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] = O(false), [we2, ke2] = O(false), Se2 = z(() => {
2157
+ ye2(true);
2158
+ }, []), Ce2 = U(null), ve2 = Pa(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => pe2, getSheetElement: () => ue2.current, getViewportElement: () => fe2.current, getFormulaBarElement: () => Ce2.current, focus() {
2159
+ ue2 && ue2.current && ue2.current.focus();
2160
+ } }), [pe2]), Te2 = U(null);
2161
+ K(() => {
2162
+ be2 && ve2.current && (ke2(true), Te2.current !== l2 && (l2?.({ source: ve2.current }), Te2.current = l2));
2163
+ }, [be2, ve2.current]), Hl(ve2.current);
2164
+ const De2 = z((e3) => (ue2.current?.submitEdit(), true), []), Pe2 = z(() => {
2164
2165
  requestAnimationFrame(() => {
2165
- ie2?.current?.focus();
2166
+ ue2?.current?.focus();
2166
2167
  });
2167
- }, []), [Se2, Ce2] = D(le2?.getSelectedSheet()), [ve2, Te2] = D(le2?.getProtection());
2168
- Ma(le2, { onSheetsChange: (e3) => {
2169
- Ce2(e3?.getSelectedSheet());
2168
+ }, []), [Re2, Me2] = O(pe2?.getSelectedSheet()), [Fe2, Be2] = O(pe2?.getProtection());
2169
+ w(pe2, { onSheetsChange: (e3) => {
2170
+ Me2(e3?.getSelectedSheet());
2170
2171
  }, onViewChange(e3) {
2171
- Ce2(e3?.getSelectedSheet());
2172
+ Me2(e3?.getSelectedSheet());
2172
2173
  }, onProtectionChange: (e3) => {
2173
- Te2(e3?.getProtection());
2174
- } }), Ma(le2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
2175
- ie2.current.getSheet() !== t3 ? ie2.current.getGridElement()?.onViewChangeOnce(() => {
2176
- ie2.current.getSheet() !== t3 && e4(false), e4(true);
2174
+ Be2(e3?.getProtection());
2175
+ } }), w(pe2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
2176
+ ue2.current.getSheet() !== t3 ? ue2.current.getGridElement()?.onViewChangeOnce(() => {
2177
+ ue2.current.getSheet() !== t3 && e4(false), e4(true);
2177
2178
  }) : e4(true);
2178
2179
  }) }, Di);
2179
- const [Re2, Me2] = B((e3) => e3 + 1, 0), Fe2 = le2?.getView();
2180
- Ma(Fe2, { onViewChange: (e3) => {
2181
- Me2();
2180
+ const [Ne2, Ee2] = _((e3) => e3 + 1, 0), Ae2 = pe2?.getView();
2181
+ w(Ae2, { onViewChange: (e3) => {
2182
+ Ee2();
2182
2183
  } });
2183
- const Be2 = ee2 ?? ae2, Ne2 = C(() => $l(ae2, Be2), [ae2, Be2]), Ee2 = te2 ?? ae2, Ae2 = C(() => $l(ae2, Ee2), [ae2, Ee2]), [Ie2, Le2] = D(null);
2184
- v(() => {
2185
- ie2.current.focus();
2184
+ const Ie2 = re2 ?? de2, Le2 = W(() => $l(de2, Ie2), [de2, Ie2]), He2 = le2 ?? de2, We2 = W(() => $l(de2, He2), [de2, He2]), [ze2, $e2] = O(null);
2185
+ z(() => {
2186
+ ue2.current.focus();
2186
2187
  }, []);
2187
- const [He2, We2] = D(false), ze2 = M(null), $e2 = si({ workbook: le2, workbookElement: be2.current, target: () => ie2.current, notifier: i2, commands: S2, darkMode: Ne2.body.darkMode, onNewWorkbook: r2, onShowSidebar: () => {
2188
- He2 ? ze2.current?.focus() : We2(true);
2189
- } }), Oe2 = M(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(ya.Top), [Ke2, Xe2] = D(f.EmptyBounds), Ze2 = () => {
2190
- Ge2(false), je2(null);
2191
- }, Je2 = (e3, t3, o3 = ya.Top) => {
2192
- Xe2(e3), qe2(o3), je2(t3), null !== Oe2.current && Oe2.current.update(), Ge2(true);
2193
- }, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Fe2?.isShowTabs(), tt2 = Y2 ?? Fe2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Fe2?.isShowFormulaBar(), nt2 = W2 ?? Fe2?.isShowStatusBar(), at2 = Q2 ?? Fe2?.isShowVerticalScrollbar(), rt2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...z2 }) : null, [$2, z2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, ae2]), [st2, { width: dt2 }] = Xa(), ct2 = 0 === dt2 || dt2 > 560, mt2 = C(() => {
2194
- if (!et2) return null;
2195
- let e3 = H2({ background: Ne2.body.fill, borderWidth: 1, borderColor: rt2, gridTheme: Be2, gridStyle: Ne2, onBeforeUserChange: we2, onUserChange: ke2, workbook: le2, commands: $e2, sheetTabProps: {}, notifier: i2, ...L2 });
2196
- return ct2 || (e3 = x("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2197
- }, [H2, L2, i2, ae2, le2, Be2, ct2, $e2, et2]), pt2 = v((e3) => {
2188
+ const [Ge2, Ue2] = O(false), je2 = U(null), _e2 = si({ workbook: pe2, workbookElement: ve2.current, target: () => ue2.current, notifier: i2, commands: b2, darkMode: Le2.body.darkMode, onNewWorkbook: r2, onShowSidebar: () => {
2189
+ Ge2 ? je2.current?.focus() : Ue2(true);
2190
+ } }), qe2 = U(null), [Ke2, Xe2] = O(false), [Ze2, Je2] = O(null), [Ye2, Qe2] = O(Aa.Top), [et2, tt2] = O(f.EmptyBounds), ot2 = z(() => {
2191
+ Xe2(false), Je2(null);
2192
+ }, []), nt2 = z((e3, t3, o3 = Aa.Top) => {
2193
+ tt2(e3), Qe2(o3), Je2(t3), null !== qe2.current && setTimeout(() => {
2194
+ null !== qe2.current && qe2.current.update();
2195
+ }, 160), Xe2(true);
2196
+ }, []), [at2, rt2] = O("sheet"), lt2 = C2 ?? Ae2?.isShowTabs(), it2 = ne2 ?? Ae2?.isShowHorizontalScrollbar(), st2 = y2 ?? Ae2?.isShowFormulaBar(), dt2 = B2 ?? Ae2?.isShowStatusBar(), ct2 = ae2 ?? Ae2?.isShowVerticalScrollbar(), mt2 = Le2?.header?.edgeStrokeFill || "rgb(171,171,171)", pt2 = W(() => dt2 ? H2({ sheet: Re2, gridStyle: Le2, ...L2 }) : null, [H2, L2, dt2, Le2, Re2]), ut2 = W(() => G2({ commands: _e2, workbook: ve2.current, ...$2 }), [_e2, G2, $2, de2]), [gt2, { width: ht2 }] = Xa(), ft2 = 0 === ht2 || ht2 > 560, xt2 = W(() => {
2197
+ if (!lt2) return null;
2198
+ let e3 = D2({ background: Le2.body.fill, borderWidth: 1, borderColor: mt2, gridTheme: Ie2, gridStyle: Le2, onBeforeUserChange: De2, onUserChange: Pe2, workbook: pe2, commands: _e2, sheetTabProps: {}, notifier: i2, ...T2 });
2199
+ return ft2 || (e3 = N("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2200
+ }, [D2, T2, i2, de2, pe2, Ie2, ft2, _e2, lt2]), bt2 = z((e3) => {
2198
2201
  const t3 = n.getOS() === n.OSType.Firefox;
2199
2202
  let o3 = null, a3 = null, r3 = null;
2200
- if (tt2 && (a3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${rt2} 1px`, maxWidth: "100%" }, children: x(La, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (ct2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: Se2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2201
- Je2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2202
- }, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (r3 = mt2), et2 && ct2 && !tt2 && (r3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, x(A, { sx: { borderTop: `solid ${rt2} 1px`, flex: "1" } })] })), r3 && tt2) o3 = x(ua, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2203
- le2.getView().setTabRatio(Math.round(10 * e4));
2204
- }, minBefore: "200px", minAfter: "180px", resizerProps: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${ae2.palette.text.icon ?? ae2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${rt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2205
- else if (tt2) o3 = a3;
2203
+ if (it2 && (a3 = N("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${mt2} 1px`, maxWidth: "100%" }, children: N(P, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (ft2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: Re2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2204
+ nt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2205
+ }, onCloseTooltip: () => ot2() }) })), lt2 && ft2 && (r3 = xt2), lt2 && ft2 && !it2 && (r3 = E(X, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, N(X, { sx: { borderTop: `solid ${mt2} 1px`, flex: "1" } })] })), r3 && it2) o3 = N(Ra, { position: pe2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2206
+ pe2.getView().setTabRatio(Math.round(10 * e4));
2207
+ }, minBefore: "200px", minAfter: "180px", resizerProps: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${de2.palette.text.icon ?? de2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${mt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2208
+ else if (it2) o3 = a3;
2206
2209
  else {
2207
- if (!r3) return x(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: nt2 ? null : `solid ${rt2} 1px` } });
2210
+ if (!r3) return N(X, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: dt2 ? null : `solid ${mt2} 1px` } });
2208
2211
  o3 = r3;
2209
2212
  }
2210
- return x(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2211
- }, [Se2, we2, le2, Ne2, Be2, $e2, et2, tt2, nt2, ct2]), [ut2, gt2] = w.useState(null), ht2 = C(() => ({ placement: "right-start", ...ut2?.popperProps }), [ut2?.popperProps]), { reference: ft2, component: xt2 } = bo({ label: "contextMenu", popperProps: ht2, anchor: ut2?.anchor ?? { getBoundingClientRect: () => new DOMRect(ut2?.clientX || 0, ut2?.clientY || 0) }, onClose: () => gt2(null), createPopupPanel: ut2?.createPopupPanel });
2212
- P(() => {
2213
- ut2 ? ft2.open(0) : ft2.close(0);
2214
- }, [ut2]);
2215
- const bt2 = ra((e3, t3) => {
2213
+ return N(X, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2214
+ }, [Re2, De2, pe2, Le2, Ie2, _e2, lt2, it2, dt2, ft2]), [yt2, wt2] = I.useState(null), kt2 = W(() => ({ placement: "right-start", ...yt2?.popperProps }), [yt2?.popperProps]), { reference: St2, component: Ct2 } = Eo({ label: "contextMenu", popperProps: kt2, anchor: yt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(yt2?.clientX || 0, yt2?.clientY || 0) }, onClose: () => wt2(null), createPopupPanel: yt2?.createPopupPanel });
2215
+ V(() => {
2216
+ yt2 ? St2.open(0) : St2.close(0);
2217
+ }, [yt2]);
2218
+ const vt2 = wa((e3, t3) => {
2216
2219
  if (e3?.isDefaultPrevented()) return true;
2217
- e3.preventDefault(), ut2 && ut2.anchor === e3.currentTarget ? gt2(null) : gt2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2220
+ e3.preventDefault(), yt2 && yt2.anchor === e3.currentTarget ? wt2(null) : wt2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2218
2221
  const { floatReference: o3 } = e4;
2219
- return j2({ filter: t3, commands: $e2, floatReference: o3, sx: { ...G2 } });
2222
+ return J2({ filter: t3, commands: _e2, floatReference: o3, sx: { ...j2 } });
2220
2223
  } });
2221
- }, [j2, G2, $e2, le2, ut2]), yt2 = ra((e3) => {
2224
+ }, [J2, j2, _e2, pe2, yt2]), Tt2 = wa((e3) => {
2222
2225
  if (e3.originalEvent?.isDefaultPrevented()) return true;
2223
- e3.originalEvent?.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2226
+ e3.originalEvent?.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2224
2227
  const { floatReference: t3 } = e4;
2225
- return U2({ commands: $e2, workbook: le2, floatReference: t3, sx: { ...G2 } });
2228
+ return q2({ commands: _e2, workbook: pe2, floatReference: t3, sx: { ...j2 } });
2226
2229
  } });
2227
- }, [U2, G2, $e2, le2]), wt2 = ra((e3, t3) => {
2230
+ }, [q2, j2, _e2, pe2]), Dt2 = wa((e3, t3) => {
2228
2231
  if (e3?.isDefaultPrevented()) return true;
2229
- e3.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2232
+ e3.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2230
2233
  const { floatReference: o3 } = e4;
2231
- return _2({ movable: t3, commands: $e2, floatReference: o3, sx: { ...G2 } });
2234
+ return Y2({ movable: t3, commands: _e2, floatReference: o3, sx: { ...j2 } });
2232
2235
  } });
2233
- }, [_2, G2, $e2]);
2234
- C(() => {
2235
- const e3 = [new ha("openContextMenu", () => ie2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [xa.Shift] }, { key: "ContextMenu" }] })];
2236
- $e2.addCommands(e3, true);
2237
- }, [$e2]), P(() => {
2238
- $e2.getCommand("openContextMenu").updateCallback(() => {
2239
- const e3 = Se2.getSelection().getCoords().cell;
2240
- ie2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2236
+ }, [Y2, j2, _e2]);
2237
+ W(() => {
2238
+ const e3 = [new Fa("openContextMenu", () => ue2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Na.Shift] }, { key: "ContextMenu" }] })];
2239
+ _e2.addCommands(e3, true);
2240
+ }, [_e2]), V(() => {
2241
+ _e2.getCommand("openContextMenu").updateCallback(() => {
2242
+ const e3 = Re2.getSelection().getCoords().cell;
2243
+ ue2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2241
2244
  requestAnimationFrame(() => {
2242
- const o3 = Se2.getView().getZoomScale() / 100, n2 = Se2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = Se2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = ie2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2243
- yt2({ clientX: n2 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2245
+ const o3 = Re2.getView().getZoomScale() / 100, n2 = Re2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = Re2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = ue2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2246
+ Tt2({ clientX: n2 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2244
2247
  });
2245
2248
  });
2246
2249
  });
2247
- }, [Se2]);
2248
- const kt2 = ra((e3) => {
2249
- $e2?.dispatchToFocusedCommand(e3);
2250
- }, [$e2]), St2 = ra(() => {
2251
- Hl(be2.current);
2252
- }, [le2, be2.current]), Ct2 = v(() => {
2253
- Qe2("sheet");
2254
- }, []), vt2 = v(() => {
2255
- Qe2("formulaBar");
2256
- }, []), Tt2 = ra((e3) => {
2250
+ }, [Re2]);
2251
+ const Pt2 = wa((e3) => {
2252
+ _e2?.dispatchToFocusedCommand(e3);
2253
+ }, [_e2]), Rt2 = wa(() => {
2254
+ Hl(ve2.current);
2255
+ }, [pe2, ve2.current]), Mt2 = z(() => {
2256
+ rt2("sheet");
2257
+ }, []), Ft2 = z(() => {
2258
+ rt2("formulaBar");
2259
+ }, []), Bt2 = wa((e3) => {
2257
2260
  const t3 = n.getOS() === n.OSType.Firefox;
2258
- return x(La, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: Se2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2259
- Je2(e4.anchor, e4.display, ya.Left);
2260
- }, onCloseTooltip: () => Ze2() });
2261
- }, [Se2]);
2262
- P(() => {
2263
- s2 && ie2 && ie2.current && ie2.current.focus();
2261
+ return N(P, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: Re2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2262
+ nt2(e4.anchor, e4.display, Aa.Left);
2263
+ }, onCloseTooltip: () => ot2() });
2264
+ }, [Re2]);
2265
+ V(() => {
2266
+ s2 && ue2 && ue2.current && ue2.current.focus();
2264
2267
  }, []);
2265
- const [Dt2, Pt2] = w.useState(null), Rt2 = v((e3) => {
2266
- $e2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Pt2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Pt2(null), e3.preventDefault());
2267
- }, [$e2]), Mt2 = ra((e3) => {
2268
- if ($e2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Pt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2268
+ const [Nt2, Et2] = I.useState(null), At2 = z((e3) => {
2269
+ _e2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Et2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Et2(null), e3.preventDefault());
2270
+ }, [_e2]), It2 = wa((e3) => {
2271
+ if (_e2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Et2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2269
2272
  const t3 = e3.dataTransfer.files[0];
2270
2273
  if (!t3) return;
2271
2274
  if (t3?.type?.startsWith("image/")) {
2272
- const o3 = ie2.current?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2275
+ const o3 = ue2.current?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2273
2276
  if (!o3) return;
2274
2277
  const n2 = o3.getRelativePointFromClient(e3.clientX, e3.clientY), a3 = o3.toAbsoluteBounds({ ...n2, width: 0, height: 0 }), r3 = o3.getCellCoordsFromClient(e3.clientX, e3.clientY);
2275
2278
  if (!r3) return;
2276
- $e2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2277
- } else $e2?.getCommand("openWorkbook")?.execute(t3);
2279
+ _e2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2280
+ } else _e2?.getCommand("openWorkbook")?.execute(t3);
2278
2281
  }
2279
- }, [$e2, Dt2]), Ft2 = C(() => Dt2 ? x(A, { 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: x(I, { variant: "h4", children: Dt2 }) }) : null, [Dt2]), Bt2 = M(null), Nt2 = C(() => x(Za, { in: !ge2, nodeRef: Bt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: x(A, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: q2({ ref: Bt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ge2 ? 0 : d2?.opacity, pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...K2 } }) }) }), [ge2, q2, K2]), Et2 = C(() => F2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: le2, sheetElement: ie2.current, gridStyle: Ne2, onFocus: vt2, ...R2, NamedCollectionEditorProps: { restoreFocus: (e3) => ie2.current.focus(e3), notifier: i2, ...R2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: $e2, ...R2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, xe2), [F2, R2, le2, Ne2, $e2, ge2]), At2 = v((e3) => {
2282
+ }, [_e2, Nt2]), Lt2 = W(() => Nt2 ? N(X, { 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: N(Z, { variant: "h4", children: Nt2 }) }) : null, [Nt2]), Ht2 = U(null), Wt2 = W(() => N(Za, { in: !we2, nodeRef: Ht2, timeout: 500, classNames: "animating", unmountOnExit: true, children: N(X, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: we2 ? "none" : d2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: Q2({ ref: Ht2, transitionDelay: "0", transparentBackground: false, sx: { opacity: we2 ? 0 : d2?.opacity, pointerEvents: we2 ? "none" : d2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...ee2 } }) }) }), [we2, Q2, ee2]), zt2 = W(() => S2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: pe2, sheetElement: ue2.current, gridStyle: Le2, onFocus: Ft2, ...k2, NamedCollectionEditorProps: { restoreFocus: (e3) => ue2.current.focus(e3), notifier: i2, ...k2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: _e2, ...k2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, Ce2), [S2, k2, pe2, Le2, _e2, we2]), $t2 = z((e3) => {
2280
2283
  const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
2281
- wt2(e4, t3);
2284
+ Dt2(e4, t3);
2282
2285
  }, ...o3 }, a3 = t3.getContent().getType();
2283
2286
  let r3 = null;
2284
- if ("picture" === a3) return x(Ha, { loadingPanel: x(Pe, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
2287
+ if ("picture" === a3) return N(R, { loadingPanel: N(Ve, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
2285
2288
  if ("chart" === a3) {
2286
2289
  const e4 = { ...n2, chart: t3.getContent() };
2287
- return x(Wa, { ...e4 });
2290
+ return N(M, { ...e4 });
2288
2291
  }
2289
2292
  if (r3 = `Float of type '${a3}'.`, "string" == typeof r3) {
2290
2293
  const e4 = { ...n2, description: r3 };
2291
- r3 = x(za, { ...e4 });
2294
+ r3 = N(F, { ...e4 });
2292
2295
  }
2293
- return x("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2294
- }, []), It2 = C(() => J2({ style: Pi, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ae2, sheet: Se2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
2295
- Le2(e3);
2296
- }, showScrollbars: false, viewportComponent: me2, onRepeatCommandChange: k2, onElementLoad: fe2, onShowColumnTooltip: (e3) => {
2297
- Je2(e3.anchor, e3.display, ya.Top);
2296
+ return N("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2297
+ }, []), Ot2 = W(() => oe2({ style: Pi, onFocus: Mt2, notifier: i2, gridStyle: Le2, headersStyle: We2, sheet: Re2, commands: _e2, onSheetContextMenu: Tt2, onViewportChange: (e3) => {
2298
+ $e2(e3);
2299
+ }, showScrollbars: false, viewportComponent: xe2, onRepeatCommandChange: x2, onElementLoad: Se2, onShowColumnTooltip: (e3) => {
2300
+ nt2(e3.anchor, e3.display, Aa.Top);
2298
2301
  }, onShowRowTooltip: (e3) => {
2299
- Je2(e3.anchor, e3.display, ya.Right);
2302
+ nt2(e3.anchor, e3.display, Aa.Right);
2300
2303
  }, onShowTooltip: (e3) => {
2301
- Je2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2302
- }, onCloseTooltip: () => Ze2(), renderMovable: At2, ...Z2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2303
- Z2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), bt2(e3, t3);
2304
- }, ...Z2?.cellRenderProps } }, ie2), [J2, $e2, Z2, Se2, Ne2, i2, k2]), Lt2 = C(() => {
2305
- if (!He2) return null;
2306
- const e3 = !ve2.isStructureAllowed();
2307
- return x(Jl, { sx: { marginBottom: (e4) => e4.spacing(0.5), border: (t3) => `solid ${e3 ? t3.palette.action.disabled : Ca(t3.palette.divider, 0.2)} 1px`, borderRadius: (e4) => `${e4.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
2308
- We2(false), requestAnimationFrame(() => {
2309
- ie2.current.focus();
2304
+ nt2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2305
+ }, onCloseTooltip: () => ot2(), renderMovable: $t2, ...te2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2306
+ te2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), vt2(e3, t3);
2307
+ }, ...te2?.cellRenderProps } }, ue2), [oe2, _e2, te2, Re2, Le2, i2, x2]), Vt2 = W(() => {
2308
+ if (!Ge2) return null;
2309
+ const e3 = !Fe2.isStructureAllowed();
2310
+ return N(Jl, { sx: { marginBottom: (e4) => e4.spacing(0.5), border: (t3) => `solid ${e3 ? t3.palette.action.disabled : Wa(t3.palette.divider, 0.2)} 1px`, borderRadius: (e4) => `${e4.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
2311
+ Ue2(false), requestAnimationFrame(() => {
2312
+ ue2.current.focus();
2310
2313
  });
2311
- }, readOnly: e3, commands: $e2, ref: ze2, scripts: le2.getScripts() });
2312
- }, [He2, $e2, le2, i2, ve2]), Ht2 = C(() => {
2313
- const e3 = x(wa, { style: { ...Pi, marginRight: Lt2 && ct2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2314
- ie2.current?.getGridElement()?.scrollTo(e4);
2315
- }, showHorizontalScrollbar: tt2 || et2, showVerticalScrollbar: at2, createHorizontalScrollbar: pt2, createVerticalScrollbar: Tt2, children: It2 });
2314
+ }, readOnly: e3, commands: _e2, ref: je2, scripts: pe2.getScripts() });
2315
+ }, [Ge2, _e2, pe2, i2, Fe2]), Gt2 = W(() => {
2316
+ const e3 = N(Ia, { style: { ...Pi, marginRight: Vt2 && ft2 ? "0px" : "6px" }, viewport: ze2, touchElement: ue2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2317
+ ue2.current?.getGridElement()?.scrollTo(e4);
2318
+ }, showHorizontalScrollbar: it2 || lt2, showVerticalScrollbar: ct2, createHorizontalScrollbar: bt2, createVerticalScrollbar: Bt2, children: Ot2 });
2316
2319
  let t3 = e3;
2317
- ct2 || (t3 = b(y, { children: [e3, mt2] }));
2320
+ ft2 || (t3 = E(A, { children: [e3, xt2] }));
2318
2321
  let o3 = null, n2 = 4, a3 = 13;
2319
- return ct2 ? o3 = "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" : (o3 = "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", n2 = 13, a3 = 4), x(ua, { fixedPane: "after", position: "40%", minAfter: ct2 ? "280px" : "120px", splitDirection: ct2 ? "row" : "column", style: Pi, ref: st2, resizerProps: { className: "styled-resizer", style: { minWidth: ct2 ? "6px" : void 0, minHeight: ct2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${ae2.palette.text.icon ?? ae2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: ct2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Lt2, paneAfterProps: { style: { marginLeft: ct2 ? "0px" : "4px", marginRight: ct2 ? "8px" : "4px" } } });
2320
- }, [tt2, et2, pt2, at2, Ie2, Lt2, It2, mt2, ae2, ct2]), Wt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...yn(ae2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${rt2} 1px` }, ...d2 }), [d2, Ne2]);
2321
- return b(X, { className: Hn("sheetxl-workbook", mi, { "Mui-focusVisible": se2 }, ci, m2), sx: Wt2, style: c2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
2322
- de2(true), St2(), p2?.(e3);
2322
+ return ft2 ? o3 = "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" : (o3 = "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", n2 = 13, a3 = 4), N(Ra, { fixedPane: "after", position: "40%", minAfter: ft2 ? "280px" : "120px", splitDirection: ft2 ? "row" : "column", style: Pi, ref: gt2, resizerProps: { className: "styled-resizer", style: { minWidth: ft2 ? "6px" : void 0, minHeight: ft2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${de2.palette.text.icon ?? de2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: ft2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Vt2, paneAfterProps: { style: { marginLeft: ft2 ? "0px" : "4px", marginRight: ft2 ? "8px" : "4px" } } });
2323
+ }, [it2, lt2, bt2, ct2, ze2, Vt2, Ot2, xt2, de2, ft2]), Ut2 = W(() => N(Oe, { arrow: true, disableInteractive: true, open: Ke2, title: N(Z, { variant: "subtitle2", component: "div", children: Ze2 }), placement: Ye2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: qe2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ke2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(et2.x, et2.y, et2.width, et2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: N(X, {}) }), [Ke2, Ze2, Ye2, et2, qe2]), jt2 = W(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Le2.header.fill : e3.palette.background.paper, "& *": { ...An(de2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${mt2} 1px` }, ...d2 }), [d2, Le2]), _t2 = W(() => N(X, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), qt2 = W(() => ({ 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": Le2.body.darkMode && ie2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Le2.body.darkMode ? `linear-gradient(${Wa("#fff", za(5))}, ${Wa("#fff", za(5))})` : void 0 }), [Le2, de2, we2]), Kt2 = W(() => Yn(Qr), []);
2324
+ return E(ce, { className: Yn("sheetxl-workbook", mi, { "Mui-focusVisible": ge2 }, ci, m2), sx: jt2, style: c2, square: false, ...se2, ref: ve2, onFocus: (e3) => {
2325
+ he2(true), Rt2(), p2?.(e3);
2323
2326
  }, onBlur: (e3) => {
2324
- de2(false), u2?.(e3);
2327
+ he2(false), u2?.(e3);
2325
2328
  }, onKeyDown: (e3) => {
2326
- kt2(e3), g2?.(e3);
2329
+ Pt2(e3), g2?.(e3);
2327
2330
  }, onDragStart: (e3) => {
2328
2331
  if (e3.target.src) {
2329
2332
  const t3 = new Image();
2330
2333
  t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
2331
2334
  }
2332
- }, onDragEnter: Rt2, onDragLeave: Rt2, onDragOver: Rt2, onDrop: Mt2, children: [b("div", { className: Hn(Qr), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ge2 ? void 0 : 0, "--sxl-app-color-high-contrast": ae2.palette.primary.main, "--sxl-app-color-primary": ae2.palette.primary.main, "--sxl-app-color-primary-dark": ae2.palette.primary.dark, "--sxl-app-color-primary-light": ae2.palette.primary.light, "--sxl-app-color-info": ae2.palette.info.main, "--sxl-app-color-info-dark": ae2.palette.info.dark, "--sxl-app-color-info-light": ae2.palette.info.light, "--sxl-app-color-secondary": ae2.palette.secondary.main, "--sxl-app-color-secondary-dark": ae2.palette.secondary.dark, "--sxl-app-color-secondary-light": ae2.palette.secondary.light, "--sxl-app-color-success": ae2.palette.success.main, "--sxl-app-color-success-dark": ae2.palette.success.dark, "--sxl-app-color-success-light": ae2.palette.success.light, "--sxl-app-color-warning": ae2.palette.warning.main, "--sxl-app-color-warning-dark": ae2.palette.warning.dark, "--sxl-app-color-warning-light": ae2.palette.warning.light, "--sxl-app-color-error": ae2.palette.error.main, "--sxl-app-color-error-dark": ae2.palette.error.dark, "--sxl-app-color-error-light": ae2.palette.error.light, "--sxl-app-color-text": ae2.palette.text.primary, "--sxl-app-color-text-secondary": ae2.palette.text.secondary, "--sxl-app-color-text-disabled": ae2.palette.text.disabled, "--sxl-app-color-background": ae2.palette.background.paper, "--sxl-app-color-button-surface": ae2.palette.grey[600], "--sxl-app-color-shadow": ae2.palette.action.focus, "--sxl-app-color-grey": ae2.palette.grey[500], "--sxl-app-filter-dark-invert": Ne2.body.darkMode && oe2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ne2.body.darkMode ? `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` : void 0 }, children: [it2, ot2 ? Et2 : null, x(A, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), Ht2, lt2, x(De, { arrow: true, disableInteractive: true, open: Ve2, title: x(I, { variant: "subtitle2", component: "div", children: Ue2 }), placement: _e2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: Oe2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ve2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ke2.x, Ke2.y, Ke2.width, Ke2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: x(A, {}) }), xt2, Ft2] }), Nt2] });
2335
+ }, onDragEnter: At2, onDragLeave: At2, onDragOver: At2, onDrop: It2, children: [E("div", { className: Kt2, style: qt2, children: [ut2, st2 ? zt2 : null, _t2, Gt2, pt2, Ut2, Ct2, Lt2] }), Wt2] });
2333
2336
  }));
2334
2337
  Ri.displayName = "WorkbookElement";
2335
- const Mi = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Ca(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` } }, Fi = k(S((e2, t2) => {
2336
- const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(a2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] = Xa(), [S2, { width: C2 }] = Xa(), [v2, T2] = D(false), R2 = M(null), F2 = M(null), B2 = pa(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2337
- F2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && R2.current?.select(), R2.current?.focus(t3);
2338
+ const Mi = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Wa(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` } }, Fi = L(H((e2, t2) => {
2339
+ const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = O(false), [p2, u2] = O(false), [g2, h2] = O(a2 ?? ""), [f2, x2] = O(""), [b2, { width: y2 }] = Xa(), [w2, { width: k2 }] = Xa(), [S2, C2] = O(false), v2 = U(null), T2 = U(null), D2 = Pa(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2340
+ T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
2338
2341
  }, focus: (e3) => {
2339
- R2.current?.focus(e3);
2342
+ v2.current?.focus(e3);
2340
2343
  } }), []);
2341
- return E(() => {
2342
- T2(a2 !== g2), y2(a2), h2(a2);
2343
- }, [a2]), P(() => {
2344
- v2 && 0 !== k2 && ja.debounce(() => {
2345
- T2(false);
2344
+ return K(() => {
2345
+ C2(a2 !== g2), x2(a2), h2(a2);
2346
+ }, [a2]), V(() => {
2347
+ S2 && 0 !== y2 && ja.debounce(() => {
2348
+ C2(false);
2346
2349
  }, 300)();
2347
- }, [v2, k2]), P(() => {
2350
+ }, [S2, y2]), V(() => {
2348
2351
  u2(g2 && !Ya.isValidWindowsFilename(g2));
2349
- }, [g2]), s2 ? null : x(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v2 ? "0" : "1", transition: v2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ua([B2, S2, t2]), ...d2, children: x(Le, { label: F2.current?.requestReason ?? "Workbook Name", children: b(A, { className: Hn({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === k2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Mi(true, i2), ...o2 }, children: [i2 ? x(I, { 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 }) : x(O, { sx: { width: `${Math.min(k2 + 3, Math.max(C2, B2.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) => {
2352
+ }, [g2]), s2 ? null : N(X, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: S2 ? "0" : "1", transition: S2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ua([D2, w2, t2]), ...d2, children: N(Je, { label: T2.current?.requestReason ?? "Workbook Name", children: E(X, { className: Yn({ "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", ...Mi(true, i2), ...o2 }, children: [i2 ? N(Z, { 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 }) : N(oe, { sx: { width: `${Math.min(y2 + 3, Math.max(k2, D2.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) => {
2350
2353
  m2(true), e3.target?.select();
2351
- }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: R2 }, onBlur: () => {
2352
- m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && F2.current?.onAccept?.(g2, "blur")), F2.current = null);
2354
+ }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: v2 }, onBlur: () => {
2355
+ m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && T2.current?.onAccept?.(g2, "blur")), T2.current = null);
2353
2356
  }, onChange: (e3) => {
2354
2357
  if (e3.target.value.length > Ya.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2355
2358
  h2(e3.target.value);
2356
2359
  }, onKeyDown: (e3) => {
2357
- (Ya.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Ya.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ia.Enter || e3.which === ia.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (F2.current?.onAccept?.(g2, "keydown"), F2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ia.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2360
+ (Ya.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Ya.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === Sa.Enter || e3.which === Sa.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (T2.current?.onAccept?.(g2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === Sa.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2358
2361
  e3.target?.select();
2359
- }, 0)), F2.current = null, e3.stopPropagation(), e3.preventDefault());
2360
- }, value: g2 }), x(A, { ref: w2, 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 })] }) }) });
2362
+ }, 0)), T2.current = null, e3.stopPropagation(), e3.preventDefault());
2363
+ }, value: g2 }), N(X, { 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 })] }) }) });
2361
2364
  }));
2362
2365
  Fi.displayName = "WorkbookTitle";
2363
- const Bi = k(S((e2, t2) => {
2366
+ const Bi = L(H((e2, t2) => {
2364
2367
  const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
2365
2368
  r2 && g.setLicenseKey(r2);
2366
- const s2 = C(() => {
2369
+ const s2 = W(() => {
2367
2370
  const e3 = { transitionDelay: "160ms", transparentBackground: true };
2368
- return x(A, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? x(Pe, { ...e3 }) });
2369
- }, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() => Gi)), []);
2370
- return x(y, { children: x(R, { fallback: s2, children: x(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2371
+ return N(X, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? N(Ve, { ...e3 }) });
2372
+ }, [o2, n2, l2]), d2 = W(() => I.lazy(async () => await Promise.resolve().then(() => Gi)), []);
2373
+ return N(A, { children: N(G, { fallback: s2, children: N(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2371
2374
  }));
2372
2375
  Bi.displayName = "Studio";
2373
2376
  const Ni = [{ 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 }], Ei = [{ 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 }];
@@ -2413,65 +2416,65 @@ class Ai {
2413
2416
  }
2414
2417
  }
2415
2418
  }
2416
- const Ii = new Ai(), Li = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Hi = S((e2, t2) => {
2417
- const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = er(), d2 = Sa(), [c2, m2] = D(false), p2 = v(() => {
2419
+ const Ii = new Ai(), Li = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Hi = H((e2, t2) => {
2420
+ const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = er(), d2 = Ha(), [c2, m2] = O(false), p2 = z(() => {
2418
2421
  m2((e3) => !e3);
2419
- }, []), u2 = v(() => {
2422
+ }, []), u2 = z(() => {
2420
2423
  s2(o2);
2421
2424
  }, [o2, s2]);
2422
2425
  let g2 = r2?.message;
2423
- return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(tr, { ref: t2, className: Hn(Li.root, "error-snackbar"), children: b(te, { className: Li.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [b(oe, { className: Li.actionRoot, children: [l2 ? null : a2?.error, x(I, { variant: "body2", component: "div", className: Li.typography, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: Li.icons, children: [r2 ? x(L, { "aria-label": "Show more", size: "small", className: Hn(Li.expand, { [Li.expandOpen]: c2 }), onClick: p2, children: x(Xn, {}) }) : null, x(L, { size: "small", className: Li.expand, onClick: u2, children: x(Qn, { fontSize: "small" }) })] })] }), r2 ? x(ne, { in: c2, timeout: "auto", unmountOnExit: true, children: x("div", { className: Li.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: x(wn, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2426
+ return !g2 && $(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), N(tr, { ref: t2, className: Yn(Li.root, "error-snackbar"), children: E(fe, { className: Li.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [E(xe, { className: Li.actionRoot, children: [l2 ? null : a2?.error, N(Z, { variant: "body2", component: "div", className: Li.typography, children: g2 }), N("div", { style: { flex: "1 1 auto" } }), E("div", { className: Li.icons, children: [r2 ? N(J, { "aria-label": "Show more", size: "small", className: Yn(Li.expand, { [Li.expandOpen]: c2 }), onClick: p2, children: N(ca, {}) }) : null, N(J, { size: "small", className: Li.expand, onClick: u2, children: N(ga, { fontSize: "small" }) })] })] }), r2 ? N(be, { in: c2, timeout: "auto", unmountOnExit: true, children: N("div", { className: Li.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: N(In, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2424
2427
  });
2425
2428
  Hi.displayName = "ToastError";
2426
- const Wi = k(S((e2, t2) => {
2427
- const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = ra((e3) => {
2428
- const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("newWorkbook"), icon: re(x(kn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("openWorkbook"), icon: re(x(Sn, {})) }), x(me, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: re(x(Tn, {})), createPopupPanel: (e4) => {
2429
+ const Wi = L(H((e2, t2) => {
2430
+ const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = wa((e3) => {
2431
+ const t3 = { variant: ya.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = E(A, { children: [N(ke, { ...t3, command: o2.getCommand("newWorkbook"), icon: we(N(Ln, {})) }), N(Se, { orientation: "horizontal" }), N(ke, { ...t3, command: o2.getCommand("openWorkbook"), icon: we(N(Hn, {})) }), N(De, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: we(N($n, {})), createPopupPanel: (e4) => {
2429
2432
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
2430
2433
  return Ii.getWriteFormats().forEach((e5) => {
2431
2434
  if (e5.isDefault) return;
2432
2435
  let t4 = null;
2433
- "CSV" === e5.key ? t4 = re(x(Cn, {})) : "Excel" === e5.key && (t4 = re(x(vn, {})));
2436
+ "CSV" === e5.key ? t4 = we(N(Wn, {})) : "Excel" === e5.key && (t4 = we(N(zn, {})));
2434
2437
  const r3 = o2.getCommand(`saveWorkbookAs${e5.key}`);
2435
- r3 ? a3.push(F(le, { ...n3, key: e5.key, command: r3, icon: t4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${e5.key}'`);
2436
- }), ce({ ...e4, children: a3, onClick: () => {
2438
+ r3 ? a3.push(j(ke, { ...n3, key: e5.key, command: r3, icon: t4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${e5.key}'`);
2439
+ }), Te({ ...e4, children: a3, onClick: () => {
2437
2440
  e4.closeFloatAll();
2438
2441
  } });
2439
2442
  } })] });
2440
- return ce({ ...e3, children: l3, onClick: (t4) => {
2443
+ return Te({ ...e3, children: l3, onClick: (t4) => {
2441
2444
  t4.isDefaultPrevented || e3.closeFloatAll();
2442
2445
  } });
2443
2446
  }, [r2, o2, n2, a2]), s2 = "File";
2444
- return x(me, { 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: x(ht, { className: "label", icon: null, label: s2 }) });
2447
+ return N(De, { 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: N(Ft, { className: "label", icon: null, label: s2 }) });
2445
2448
  }));
2446
2449
  Wi.displayName = "StandaloneFileCommandButton";
2447
- const zi = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x($a, { onClick: () => {
2450
+ const zi = N(Je, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: N(X, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: N(B, { onClick: () => {
2448
2451
  window?.open("https://www.sheetxl.com", "_blank");
2449
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), $i = k(S((e2, t2) => {
2450
- const { commands: o2, workbook: n2, logo: a2 = zi, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = bo(), [c2, { width: m2 }] = Xa(), p2 = m2 < 530, u2 = l2 ? x(Wi, { commands: o2, commandHook: { beforeExecute() {
2452
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), $i = L(H((e2, t2) => {
2453
+ const { commands: o2, workbook: n2, logo: a2 = zi, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = Eo(), [c2, { width: m2 }] = Xa(), p2 = m2 < 530, u2 = l2 ? N(Wi, { commands: o2, commandHook: { beforeExecute() {
2451
2454
  d2?.closeAll();
2452
2455
  }, onError(e3, t3, o3) {
2453
- } } }) : null, g2 = i2 ? x(pl, { commands: o2, commandHook: { beforeExecute() {
2456
+ } } }) : null, g2 = i2 ? N(pl, { commands: o2, commandHook: { beforeExecute() {
2454
2457
  d2?.closeAll();
2455
2458
  }, onError(e3, t3, o3) {
2456
- } } }) : null, h2 = C(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = M(null);
2457
- return x(A, { ref: Ua([f2, c2, t2]), ...s2, children: ni({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => b(A, { 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: [b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), x(A, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2459
+ } } }) : null, h2 = W(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = U(null);
2460
+ return N(X, { ref: Ua([f2, c2, t2]), ...s2, children: ni({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => E(X, { 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: [E(X, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, E(X, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), N(X, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), N(X, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2458
2461
  }));
2459
2462
  $i.displayName = "StudioToolbar";
2460
- const Oi = k(S((e2, t2) => {
2463
+ const Oi = L(H((e2, t2) => {
2461
2464
  const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = er(), g2 = u2 ? u2.enqueueSnackbar : () => {
2462
2465
  }, h2 = u2 ? u2.closeSnackbar : () => {
2463
- }, [f2, k2] = D({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), S2 = v(() => {
2464
- k2((e3) => ({ ...e3, isMounted: true }));
2465
- }, []), T2 = v(() => {
2466
- k2((e3) => ({ ...e3, isMounted: false }));
2467
- }, []), R2 = {}, F2 = Mn(R2), B2 = Fn(R2), N2 = Bn(R2), E2 = M(/* @__PURE__ */ new Set()), A2 = C(() => {
2466
+ }, [f2, x2] = O({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), b2 = z(() => {
2467
+ x2((e3) => ({ ...e3, isMounted: true }));
2468
+ }, []), y2 = z(() => {
2469
+ x2((e3) => ({ ...e3, isMounted: false }));
2470
+ }, []), w2 = {}, k2 = Un(w2), S2 = jn(w2), C2 = _n(w2), v2 = U(/* @__PURE__ */ new Set()), T2 = W(() => {
2468
2471
  const e3 = (e4, t3) => {
2469
2472
  if (t3?.onceKey) {
2470
- if (E2.current.has(t3.onceKey)) return;
2471
- const e5 = new Set(E2.current);
2472
- e5.add(t3.onceKey), E2.current = e5;
2473
+ if (v2.current.has(t3.onceKey)) return;
2474
+ const e5 = new Set(v2.current);
2475
+ e5.add(t3.onceKey), v2.current = e5;
2473
2476
  }
2474
- const o3 = { variant: t3?.type ?? ma.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === ma.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x(oa, {}) }) };
2477
+ const o3 = { variant: t3?.type ?? Da.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === Da.Error, action: (e5) => N(J, { onClick: () => h2(e5), children: N(xa, {}) }) };
2475
2478
  t3?.enqueueProps && Object.assign(o3, t3.enqueueProps), e4 || console.log("message is 'null'", t3), g2(e4 ?? "Alert", o3);
2476
2479
  };
2477
2480
  return { showMessage: e3, showBusy: (e4, t3) => {
@@ -2479,7 +2482,7 @@ const Oi = k(S((e2, t2) => {
2479
2482
  const n3 = new Promise((e5) => {
2480
2483
  o3 = e5;
2481
2484
  });
2482
- return k2((t4) => {
2485
+ return x2((t4) => {
2483
2486
  const a3 = new Map(t4.starting);
2484
2487
  a3.set(n3, o3);
2485
2488
  return { ...t4, label: e4, starting: a3 };
@@ -2488,14 +2491,14 @@ const Oi = k(S((e2, t2) => {
2488
2491
  const n3 = { ...t3, onKeyDown: (e5) => {
2489
2492
  c2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t3?.onKeyDown?.(e5);
2490
2493
  } };
2491
- return F2(e4, { sort: () => import("./CDrqD26HX89mI5s9.mjs"), numberFormat: () => import("./BXodzQICT9FHa2c_.mjs"), hyperlink: () => import("./zMd81OdjwyOkK45u.mjs"), comments: () => import("./hIWFtfWn-gmPFjkV.mjs"), find: () => import("./BY9pH_mkLDOVRdrk.mjs"), tableDetails: () => import("./Dam0uFX03RMvPexZ.mjs"), tableNew: () => import("./BllluEtzB5DUaB0c.mjs"), namedDetails: () => import("./Boxbpsy8ED5zAExk.mjs") }[e4], n3, o3);
2492
- }, showOptions: B2, showInputOptions: N2, showError: (t3) => {
2493
- let o3, n3 = ma.Error, a3 = "Unknown Error";
2494
- "string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof qa && (n3 = ma.Info), e3(a3, { type: n3, enqueueProps: { error: o3 } });
2494
+ return k2(e4, { sort: () => import("./BYxSe-f9SXkVQCOn.mjs"), numberFormat: () => import("./1bQb13SILtJFnqBQ.mjs"), hyperlink: () => import("./BNH5761S3vit417d.mjs"), comments: () => import("./_Nq9WHxw-bmMA6Eh.mjs"), find: () => import("./Dw2SSXphjQ4gTuEe.mjs"), tableDetails: () => import("./uS3k2AKeGAjgsirO.mjs"), tableNew: () => import("./5715fftg6SqkmbCs.mjs"), namedDetails: () => import("./CJQiYToWJ-8AaD8d.mjs") }[e4], n3, o3);
2495
+ }, showOptions: S2, showInputOptions: C2, showError: (t3) => {
2496
+ let o3, n3 = Da.Error, a3 = "Unknown Error";
2497
+ "string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof qa && (n3 = Da.Info), e3(a3, { type: n3, enqueueProps: { error: o3 } });
2495
2498
  } };
2496
- }, []), I2 = v(() => {
2497
- }, []), H2 = ((e3) => {
2498
- const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = ra(s3?.onModeChange, [s3?.onModeChange]), u3 = ra(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = ra(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = ra(async (e4 = null, t4 = null) => {
2499
+ }, []), D2 = z(() => {
2500
+ }, []), P2 = ((e3) => {
2501
+ const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = wa(s3?.onModeChange, [s3?.onModeChange]), u3 = wa(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = wa(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = wa(async (e4 = null, t4 = null) => {
2499
2502
  const o4 = [];
2500
2503
  let n4, a4 = null, r4 = null;
2501
2504
  if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await ja.openFileDialog(r4 ?? Ii.getAllReadFormatTypeAsString().join(",")), !n4) return null;
@@ -2503,29 +2506,29 @@ const Oi = k(S((e2, t2) => {
2503
2506
  o4.push(e5);
2504
2507
  } }, s4 = await Ii.read(i4, l3);
2505
2508
  return o4.length > 0 && (l3?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), s4;
2506
- }, [m3, l3, t3]), f3 = ra(async (e4, t4, o4) => {
2509
+ }, [m3, l3, t3]), f3 = wa(async (e4, t4, o4) => {
2507
2510
  if (!t4 && i3) {
2508
2511
  const t5 = await i3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2509
2512
  return null !== t5 && Ii.writeFile(t5, e4, { formatType: o4.key });
2510
2513
  }
2511
2514
  return Ii.writeFile(t4, e4, { formatType: o4.key });
2512
- }, [l3, t3, i3]), x2 = v(() => ({ contains: (e4) => true, focus() {
2513
- } }), []), b2 = C(() => {
2515
+ }, [l3, t3, i3]), x3 = z(() => ({ contains: (e4) => true, focus() {
2516
+ } }), []), b3 = W(() => {
2514
2517
  const e4 = [];
2515
2518
  n3 || (Ii.getWriteFormats().forEach((o4) => {
2516
2519
  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}`}.` };
2517
- n4 && (r4.shortcut = { key: "S", modifiers: [xa.Ctrl] }, e4.push(new fa("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [xa.Shift, xa.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2520
+ n4 && (r4.shortcut = { key: "S", modifiers: [Na.Ctrl] }, e4.push(new Ba("saveWorkbookAs", x3, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Na.Shift, Na.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2518
2521
  f3(t3, null, o4).catch((e5) => {
2519
2522
  l3?.showError?.(e5);
2520
2523
  });
2521
2524
  })));
2522
2525
  const i5 = n4 ? "saveWorkbook" : `saveWorkbookAs${o4.key}`;
2523
- e4.push(new fa(i5, x2, r4, (e5) => {
2526
+ e4.push(new Ba(i5, x3, r4, (e5) => {
2524
2527
  f3(t3, e5 ?? a3, o4).catch((e6) => {
2525
2528
  l3?.showError?.(e6);
2526
2529
  });
2527
2530
  }));
2528
- }), e4.push(new fa("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [xa.Ctrl] } }, async (e5 = null) => {
2531
+ }), e4.push(new Ba("openWorkbook", x3, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [Na.Ctrl] } }, async (e5 = null) => {
2529
2532
  const n4 = { date1904: t3.isDate1904(), ...t3.options };
2530
2533
  try {
2531
2534
  const a4 = await h3(e5, n4);
@@ -2543,7 +2546,7 @@ const Oi = k(S((e2, t2) => {
2543
2546
  } catch (e6) {
2544
2547
  l3?.showError?.(e6);
2545
2548
  }
2546
- })), e4.push(new fa("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2549
+ })), e4.push(new Ba("openWorkbookFromUrl", x3, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2547
2550
  if (!e5) {
2548
2551
  const t4 = await l3?.showInputOptions?.({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
2549
2552
  if ("Open" !== t4.option) return;
@@ -2552,58 +2555,58 @@ const Oi = k(S((e2, t2) => {
2552
2555
  e5 && console.log("openWorkbookFromUrl", e5);
2553
2556
  })));
2554
2557
  let i4 = [];
2555
- return s3 && (i4 = [new fa("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new fa("defaultThemeMode", x2, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new fa("enableDarkGrid", x2, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new fa("enableDarkImages", x2, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, ...i4, new ha("help", x2, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
2556
- }), new ha("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [xa.Ctrl] } }, () => {
2557
- }), new fa("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
2558
+ return s3 && (i4 = [new Ba("themeMode", x3, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Ba("defaultThemeMode", x3, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new Ba("enableDarkGrid", x3, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new Ba("enableDarkImages", x3, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, ...i4, new Fa("help", x3, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
2559
+ }), new Fa("showKeyboardShortcuts", x3, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [Na.Ctrl] } }, () => {
2560
+ }), new Ba("gotoUrlGithub", x3, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
2558
2561
  window?.open("https://github.com/sheetxl/sheetxl");
2559
- }), new fa("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord." }, () => {
2562
+ }), new Ba("gotoUrlDiscord", x3, { label: "Discord", description: "Join our community on discord." }, () => {
2560
2563
  window?.open("https://discord.gg/NTKdwUgK9p");
2561
- }), new fa("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation." }, () => {
2564
+ }), new Ba("gotoUrlDocumentation", x3, { label: "Documentation", description: "Read the documentation." }, () => {
2562
2565
  window?.open("https://www.sheetxl.com/docs");
2563
- }), new fa("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
2566
+ }), new Ba("gotoUrlIssue", x3, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
2564
2567
  window?.open("https://github.com/sheetxl/sheetxl/issues");
2565
2568
  })];
2566
- }, [t3, a3, l3, n3, s3, c3, d3]), y2 = C(() => {
2569
+ }, [t3, a3, l3, n3, s3, c3, d3]), y3 = W(() => {
2567
2570
  let e4 = null;
2568
- return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new ba(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2569
- }, [c3, b2]);
2570
- ka({ manager: d3, commands: y2, notifier: l3 });
2571
- const { themeMode: k3 } = Dn();
2572
- P(() => {
2573
- if (!s3 || !y2) return;
2574
- const e4 = "dark" === s3.mode || !s3.mode && "dark" === k3;
2575
- y2.getCommand("themeMode").update({ state: s3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
2576
- p3(e4 ? Pn.Light : Pn.Dark);
2577
- }), y2.getCommand("defaultThemeMode").update({ state: !s3.mode }).updateCallback(() => {
2571
+ return e4 = c3 ? c3.createChildGroup(x3, "standaloneWorkbook", false) : new Ea(x3, "standaloneWorkbook"), e4.addCommands(b3, true), e4;
2572
+ }, [c3, b3]);
2573
+ La({ manager: d3, commands: y3, notifier: l3 });
2574
+ const { themeMode: w3 } = On();
2575
+ V(() => {
2576
+ if (!s3 || !y3) return;
2577
+ const e4 = "dark" === s3.mode || !s3.mode && "dark" === w3;
2578
+ y3.getCommand("themeMode").update({ state: s3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
2579
+ p3(e4 ? Vn.Light : Vn.Dark);
2580
+ }), y3.getCommand("defaultThemeMode").update({ state: !s3.mode }).updateCallback(() => {
2578
2581
  p3(null);
2579
- }), y2.getCommand("enableDarkGrid").update({ state: s3.enableDarkGrid }).updateCallback(() => {
2582
+ }), y3.getCommand("enableDarkGrid").update({ state: s3.enableDarkGrid }).updateCallback(() => {
2580
2583
  u3(!s3.enableDarkGrid);
2581
- }), y2.getCommand("enableDarkImages").update({ state: s3.enableDarkImages }).updateCallback(() => {
2584
+ }), y3.getCommand("enableDarkImages").update({ state: s3.enableDarkImages }).updateCallback(() => {
2582
2585
  g3(!s3.enableDarkImages);
2583
2586
  });
2584
- }, [k3, s3, b2]);
2585
- const { showModal: S3 } = Rn();
2586
- return P(() => {
2587
+ }, [w3, s3, b3]);
2588
+ const { showModal: k3 } = Gn();
2589
+ return V(() => {
2587
2590
  const e4 = () => new Promise((e5, t4) => {
2588
- const o4 = w.lazy(() => import("./AmqNMsjisqrNPrsf.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2591
+ const o4 = I.lazy(() => import("./d78UMCfSqw7_DwUj.mjs")), n4 = k3(o4, { title: "Shortcut Keys Reference", commands: y3, onDone: () => {
2589
2592
  n4.hide();
2590
2593
  }, TransitionProps: { onExited: () => {
2591
2594
  e5(true);
2592
2595
  } } });
2593
2596
  });
2594
- y2.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), y2.getCommand("help").updateCallback(() => e4());
2595
- }, [b2, y2]), y2;
2597
+ y3.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), y3.getCommand("help").updateCallback(() => e4());
2598
+ }, [b3, y3]), y3;
2596
2599
  })({ workbook: o2, setWorkbook: n2, importExportDisabled: m2, workbookTitle: r2, setWorkbookTitle: l2, commands: c2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2597
2600
  a2.current ? a2.current.requestWorkbookTitle((e4, o3) => {
2598
2601
  t3(e4);
2599
2602
  }, { selectAll: true, requestReason: e3 }) : t3(i2);
2600
- }), themeOptions: p2, undoManager: d2, notifier: A2, onExecute: I2 });
2601
- P(() => {
2602
- f2.starting.size <= 0 || !f2.isMounted || k2((e3) => {
2603
+ }), themeOptions: p2, undoManager: d2, notifier: T2, onExecute: D2 });
2604
+ V(() => {
2605
+ f2.starting.size <= 0 || !f2.isMounted || x2((e3) => {
2603
2606
  const t3 = new Map(e3.running);
2604
2607
  e3.starting.forEach((e4, o3) => {
2605
2608
  const n3 = () => {
2606
- k2((e5) => {
2609
+ x2((e5) => {
2607
2610
  const t4 = new Map(e5.running);
2608
2611
  t4.delete(o3);
2609
2612
  return { ...e5, running: t4 };
@@ -2614,94 +2617,94 @@ const Oi = k(S((e2, t2) => {
2614
2617
  return { ...e3, starting: /* @__PURE__ */ new Map(), running: t3 };
2615
2618
  });
2616
2619
  }, [f2]);
2617
- const [W2, z2] = D(null);
2618
- P(() => {
2619
- 0 !== f2.starting.size || 0 !== f2.running.size ? z2(x(Pe, { icon: x(Nn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: S2, onUnmount: T2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : z2(null);
2620
+ const [R2, M2] = O(null);
2621
+ V(() => {
2622
+ 0 !== f2.starting.size || 0 !== f2.running.size ? M2(N(Ve, { icon: N(qn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: b2, onUnmount: y2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : M2(null);
2620
2623
  }, [f2.starting, f2.running]);
2621
- const $2 = C(() => x(ul, { commands: H2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [H2]), O2 = { notifier: A2, commands: H2 };
2622
- return o2 && (O2.statusBarProps = { childrenEnd: $2 }), b(y, { children: [W2, s2 ? w.cloneElement(s2, O2) : null] });
2624
+ const F2 = W(() => N(ul, { commands: P2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [P2]), B2 = { notifier: T2, commands: P2 };
2625
+ return o2 && (B2.statusBarProps = { childrenEnd: F2 }), E(A, { children: [R2, s2 ? I.cloneElement(s2, B2) : null] });
2623
2626
  }));
2624
2627
  Oi.displayName = "SnackbarAndCommandsWrapper";
2625
- const Vi = k(S((e2, t2) => {
2626
- const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = En, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: y2 = false, commands: w2, title: k2, onTitleChange: S2, titleProps: T2, renderLoadingPanel: R2, ...F2 } = e2, B2 = M(null), N2 = ra(p2, [p2]), I2 = ra(S2 ?? T2?.onTitleChange, [S2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: W2, source: z2 } = Dn({ mode: H2 }), O2 = C(() => ({ ...f2, light: An(false, ja.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: An(true, ja.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = W2 === Pn.Dark, [G2, U2] = D(null);
2627
- P(() => {
2628
- U2(i2 ?? new Ka());
2628
+ const Vi = L(H((e2, t2) => {
2629
+ const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = Kn, 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: k2, renderLoadingPanel: S2, ...C2 } = e2, T2 = U(null), D2 = wa(p2, [p2]), P2 = wa(w2 ?? k2?.onTitleChange, [w2 ?? k2?.onTitleChange]), R2 = k2?.placeHolder ?? "Untitled", M2 = f2?.mode, { themeMode: F2, source: B2 } = On({ mode: M2 }), A2 = W(() => ({ ...f2, light: Xn(false, ja.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: Xn(true, ja.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), I2 = F2 === Vn.Dark, [L2, H2] = O(null);
2630
+ V(() => {
2631
+ H2(i2 ?? new Ka());
2629
2632
  }, [i2]);
2630
- const [j2, _2] = D(null), [q2, K2] = D(null), X2 = Ea();
2631
- E(() => {
2633
+ const [$2, G2] = O(null), [j2, _2] = O(null), q2 = v();
2634
+ K(() => {
2632
2635
  if (!c2 || 0 === Object.keys(c2).length && !ja.isPromiseLike(c2)) {
2633
- const e3 = { theme: X2.getDefaultTheme(), ...m2 };
2634
- K2(new h(e3));
2635
- } else K2(c2);
2636
- }, [c2]), E(() => {
2637
- if (!q2) return;
2638
- if (q2 instanceof h) return _2({ workbook: q2 }), void (c2 !== q2 && N2?.(q2));
2636
+ const e3 = { theme: q2.getDefaultTheme(), ...m2 };
2637
+ _2(new h(e3));
2638
+ } else _2(c2);
2639
+ }, [c2]), K(() => {
2640
+ if (!j2) return;
2641
+ if (j2 instanceof h) return G2({ workbook: j2 }), void (c2 !== j2 && D2?.(j2));
2639
2642
  (async () => {
2640
2643
  try {
2641
- let e3, t3 = await Promise.resolve(q2);
2642
- t3 && t3.source && (t3 = await Ii.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
2644
+ let e3, t3 = await Promise.resolve(j2);
2645
+ t3 && t3.source && (t3 = await Ii.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, D2?.(e3), G2({ workbook: e3 });
2643
2646
  } catch (e3) {
2644
- N2?.(null), _2({ error: e3 });
2647
+ D2?.(null), G2({ error: e3 });
2645
2648
  }
2646
2649
  })();
2647
- }, [q2]);
2648
- const [Z2, J2] = D(null);
2649
- P(() => {
2650
- if (!G2 || !j2) return;
2651
- G2.clear();
2652
- const e3 = j2?.workbook?.getTransactions();
2650
+ }, [j2]);
2651
+ const [Z2, J2] = O(null);
2652
+ V(() => {
2653
+ if (!L2 || !$2) return;
2654
+ L2.clear();
2655
+ const e3 = $2?.workbook?.getTransactions();
2653
2656
  if (!e3) return;
2654
2657
  return e3.addListener({ onCommitEnd: (t3) => {
2655
- t3.getDescription() ? G2.addUndoOperation({ description: t3.getDescription(), undo: () => (e3.revert(t3.getId()), Z2.source?.focus(), () => {
2658
+ t3.getDescription() ? L2.addUndoOperation({ description: t3.getDescription(), undo: () => (e3.revert(t3.getId()), Z2.source?.focus(), () => {
2656
2659
  e3.restore(t3.getId()), Z2.source?.focus();
2657
2660
  }) }) : console.warn("commit has no description", t3);
2658
2661
  } });
2659
- }, [G2, j2, Z2]);
2660
- const Y2 = ra((e3) => {
2661
- e3 ? G2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : G2.setRepeatableOperation(null);
2662
- }, [G2]), [Q2, ee2] = D(k2 ?? T2?.title ?? "");
2663
- P(() => {
2664
- ee2(k2 ?? T2?.title ?? "");
2665
- }, [k2 ?? T2?.title]), P(() => {
2666
- I2?.(Q2);
2662
+ }, [L2, $2, Z2]);
2663
+ const Y2 = wa((e3) => {
2664
+ e3 ? L2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : L2.setRepeatableOperation(null);
2665
+ }, [L2]), [Q2, ee2] = O(y2 ?? k2?.title ?? "");
2666
+ V(() => {
2667
+ ee2(y2 ?? k2?.title ?? "");
2668
+ }, [y2 ?? k2?.title]), V(() => {
2669
+ P2?.(Q2);
2667
2670
  }, [Q2]);
2668
- const [te2, oe2] = D(null), ne2 = C(() => {
2671
+ const [oe2, ne2] = O(null), ae2 = W(() => {
2669
2672
  const e3 = () => ({ contains: (e4) => true, focus() {
2670
2673
  } });
2671
- return w2 ? w2.createChildGroup(e3, "application", false) : new ba(e3, "application");
2672
- }, [w2]), re2 = ra((e3) => {
2673
- oe2(e3.source.getViewportElement()), J2(e3), ne2.activate("sheet"), r2?.(e3);
2674
- }, [ne2]);
2675
- P(() => {
2676
- Z2 && y2 && Z2.source?.focus("object" == typeof y2 ? y2 : void 0);
2674
+ return b2 ? b2.createChildGroup(e3, "application", false) : new Ea(e3, "application");
2675
+ }, [b2]), re2 = wa((e3) => {
2676
+ ne2(e3.source.getViewportElement()), J2(e3), ae2.activate("sheet"), r2?.(e3);
2677
+ }, [ae2]);
2678
+ V(() => {
2679
+ Z2 && x2 && Z2.source?.focus("object" == typeof x2 ? x2 : void 0);
2677
2680
  }, [Z2]);
2678
- const le2 = M(null), ie2 = v((e3) => {
2681
+ const le2 = U(null), ie2 = z((e3) => {
2679
2682
  let t3 = null;
2680
- return T2?.hidden || (t3 = x(Fi, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: B2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
2683
+ return k2?.hidden || (t3 = N(Fi, { ...k2, style: { maxWidth: "100%", ...k2?.style }, workbook: T2.current, ref: le2, title: Q2, placeHolder: R2, onTitleChange: (e4) => {
2681
2684
  ee2(e4);
2682
- } })), x($i, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
2683
- }, [u2, Q2, T2, O2, g2, ne2]);
2684
- P(() => {
2685
+ } })), N($i, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(A2?.onEnabledDarkGridChange || A2?.onEnabledDarkImagesChange || A2?.onModeChange) });
2686
+ }, [u2, Q2, k2, A2, g2, ae2]);
2687
+ V(() => {
2685
2688
  const e3 = (e4) => e4.preventDefault();
2686
- return B2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2687
- B2.current?.removeEventListener("wheel", e3);
2689
+ return T2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2690
+ T2.current?.removeEventListener("wheel", e3);
2688
2691
  };
2689
2692
  }, []);
2690
- const se2 = C(() => {
2693
+ const se2 = W(() => {
2691
2694
  const e3 = { transparentBackground: true };
2692
- return x(A, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: R2?.(e3) ?? x(Pe, { ...e3 }) });
2693
- }, [n2, a2, R2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), ce2 = C(() => ({ ...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]), me2 = Ua([B2, t2]), pe2 = C(() => {
2694
- if (!j2) return se2;
2695
- if (j2.error || !j2.workbook) return de2({ error: j2.error });
2695
+ return N(X, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: S2?.(e3) ?? N(Ve, { ...e3 }) });
2696
+ }, [n2, a2, S2]), de2 = z(({ error: e3 }) => (l2?.(e3), N(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), ce2 = W(() => ({ ...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]), me2 = Ua([T2, t2]), pe2 = W(() => {
2697
+ if (!$2) return se2;
2698
+ if ($2.error || !$2.workbook) return de2({ error: $2.error });
2696
2699
  let e3 = null, t3 = null, n3 = false;
2697
- return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(Ri, { sx: ce2, style: a2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: re2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2700
+ return A2 && (e3 = I2 ? A2.dark : A2.light, t3 = I2 && A2.enableDarkGrid ? A2.dark : A2.light, n3 = A2.enableDarkImages), N(Ri, { sx: ce2, style: a2, tabIndex: 0, autoFocus: true, workbook: $2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: re2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2698
2701
  d2?.(e4);
2699
- }, renderLoadingPanel: R2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: Hn(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...F2 }, "WorkbookElement");
2700
- }, [j2, Q2, G2, se2, R2, O2, F2, ie2, ce2]);
2701
- let ue2 = x(Qa, { fallbackRender: de2, children: x(or, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2702
- B2.current?.focus();
2703
- }, Components: { error: Hi }, iconVariant: { success: x($, { style: { marginRight: "8px" }, children: x("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: x(Ln, { style: { marginRight: "8px" } }) }, children: x(In, { children: x(Oi, { workbook: j2?.workbook, setWorkbook: K2, importExportDisabled: g2, titlePlaceHolder: L2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ne2, undoManager: G2, themeOptions: O2, children: pe2 }) }) }) });
2704
- return O2 && (ue2 = b(Ta, { theme: V2 ? O2.dark : O2.light, children: [O2.cssBaseline ? x(ae, {}) : null, ue2] })), ue2;
2702
+ }, renderLoadingPanel: S2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: Yn(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
2703
+ }, [$2, Q2, L2, se2, S2, A2, C2, ie2, ce2]);
2704
+ let ue2 = N(Qa, { fallbackRender: de2, children: N(or, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2705
+ T2.current?.focus();
2706
+ }, Components: { error: Hi }, iconVariant: { success: N(te, { style: { marginRight: "8px" }, children: N("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: N(Jn, { style: { marginRight: "8px" } }) }, children: N(Zn, { children: N(Oi, { workbook: $2?.workbook, setWorkbook: _2, importExportDisabled: g2, titlePlaceHolder: R2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ae2, undoManager: L2, themeOptions: A2, children: pe2 }) }) }) });
2707
+ return A2 && (ue2 = E($a, { theme: I2 ? A2.dark : A2.light, children: [A2.cssBaseline ? N(ye, {}) : null, ue2] })), ue2;
2705
2708
  }));
2706
2709
  Vi.displayName = "EagerStudio";
2707
2710
  const Gi = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Vi, default: Vi }, Symbol.toStringTag, { value: "Module" }));
@@ -2783,5 +2786,7 @@ export {
2783
2786
  Bi as default,
2784
2787
  di as defaultNewWorkbook,
2785
2788
  Wl as setPrintExamplesOnLoad,
2789
+ useModelListener,
2790
+ useRangeListener,
2786
2791
  si as useWorkbookCommands
2787
2792
  };